/* ============================================================
   SouloClaw Docs — styles.css
   Dark mode, purple accent, sidebar layout
   ============================================================ */

:root {
  --bg: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --border: #2a2a3a;
  --border-light: #1e1e2e;
  --text: #e8e8f0;
  --text-muted: #8888aa;
  --text-dim: #555570;
  --accent: #7c3aed;
  --accent-light: #9d5cff;
  --accent-dim: #3b1a7e;
  --accent-bg: rgba(124, 58, 237, 0.1);
  --accent-bg-hover: rgba(124, 58, 237, 0.2);
  --blue: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.1);
  --green: #10b981;
  --red: #ef4444;
  --yellow: #f59e0b;
  --code-bg: #0d0d16;
  --sidebar-width: 260px;
  --header-height: 60px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  min-height: 100vh;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  padding: 0 20px;
  max-width: 100%;
}

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

.logo span:first-child { font-size: 18px; }
.logo-sub {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 14px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: all 0.2s;
}

.lang-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  font-family: var(--font-sans);
}

.lang-btn:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.layout {
  display: flex;
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  overflow-y: auto;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  z-index: 50;
}

.sidebar-inner {
  padding: 24px 0 40px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sidebar-section {
  margin-bottom: 8px;
}

.sidebar-label {
  padding: 4px 20px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.sidebar-nav {
  list-style: none;
}

.sidebar-nav li {
  margin: 0;
}

.nav-link {
  display: block;
  padding: 8px 20px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.15s;
  border-left: 2px solid transparent;
}

.nav-link:hover {
  color: var(--text);
  background: var(--bg-card);
}

.nav-link.active {
  color: var(--accent-light);
  border-left-color: var(--accent);
  background: var(--accent-bg);
}

.sidebar-footer {
  margin-top: auto;
  padding: 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 16px;
}

.sidebar-footer-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.2s;
}

.sidebar-footer-link:hover {
  color: var(--text-muted);
}

/* Mobile overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 49;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: calc(100vh - var(--header-height));
}

/* ============================================================
   PAGE SECTIONS
   ============================================================ */
.page {
  display: none;
  padding: 48px 64px;
  max-width: 900px;
}

.page.active {
  display: block;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.page-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-bg);
  color: var(--accent-light);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
}

.page-title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff 0%, #9d5cff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-desc {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================================
   CONTENT BODY
   ============================================================ */
.content-body {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.content-body h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: -24px; /* compensate gap */
}

.content-body h2 + * {
  margin-top: 0;
}

.content-body p {
  color: var(--text-muted);
  line-height: 1.7;
}

/* ============================================================
   CALLOUT
   ============================================================ */
.callout {
  display: flex;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid;
}

.callout-purple {
  background: var(--accent-bg);
  border-color: var(--accent-dim);
}

.callout-blue {
  background: var(--blue-bg);
  border-color: rgba(59, 130, 246, 0.3);
}

.callout-icon {
  font-size: 24px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}

.callout strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.callout p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* ============================================================
   FEATURE LIST
   ============================================================ */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-muted);
  padding: 10px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  font-size: 14px;
}

.feature-list li::before {
  content: "→";
  color: var(--accent);
  flex-shrink: 0;
  font-weight: 700;
}

.feature-list li strong {
  color: var(--text);
}

/* ============================================================
   COMPARISON GRID
   ============================================================ */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.comparison-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.comparison-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 14px;
}

.comparison-openclaw {
  background: rgba(59, 130, 246, 0.1);
  color: var(--blue);
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.comparison-soulo {
  background: var(--accent-bg);
  color: var(--accent-light);
  border-bottom: 1px solid var(--accent-dim);
}

.comparison-icon { font-size: 18px; }

.comparison-list {
  list-style: none;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comparison-list li {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg);
  border-radius: var(--radius);
}

.comparison-list li strong {
  color: var(--text);
}

/* ============================================================
   BRAIN GRID
   ============================================================ */
.brain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.brain-card {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all 0.2s;
}

.brain-card:hover {
  border-color: var(--accent-dim);
  background: var(--bg-card-hover);
}

.brain-icon { font-size: 28px; margin-bottom: 8px; }
.brain-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.brain-module {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-light);
  margin-bottom: 4px;
}

.brain-desc {
  font-size: 11px;
  color: var(--text-dim);
}

/* ============================================================
   INFO GRID
   ============================================================ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.info-card {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.info-icon { font-size: 20px; margin-bottom: 8px; }
.info-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-light);
  margin-bottom: 4px;
}
.info-desc { font-size: 12px; color: var(--text-dim); }

/* ============================================================
   ARCHITECTURE TABLE
   ============================================================ */
.arch-table {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.arch-row {
  display: grid;
  grid-template-columns: 180px 1fr 2fr;
  border-bottom: 1px solid var(--border-light);
}

.arch-row:last-child { border-bottom: none; }

.arch-header {
  background: var(--bg-card);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.arch-row > div {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.arch-row:not(.arch-header):hover {
  background: var(--bg-card);
}

.arch-brain { font-weight: 500; color: var(--text); }

.arch-row code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-light);
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ============================================================
   CODE BLOCK
   ============================================================ */
.code-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.code-lang {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.code-block pre {
  padding: 20px;
  overflow-x: auto;
  font-size: 13px;
}

.code-block code {
  font-family: var(--font-mono);
  color: #a0cfff;
  line-height: 1.6;
}

/* ============================================================
   AXIS GRID
   ============================================================ */
.axis-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.axis-card {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.axis-icon { font-size: 24px; margin-bottom: 10px; }
.axis-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.axis-card p { font-size: 13px; color: var(--text-muted); }

/* ============================================================
   AGENT ID GRID
   ============================================================ */
.agent-id-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agent-id-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.agent-id-key code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-light);
  white-space: nowrap;
}

.agent-id-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================================
   GATE GRID
   ============================================================ */
.gate-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.gate-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.gate-header {
  padding: 10px 16px;
  background: var(--bg-card);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
}

.gate-content {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gate-ex {
  font-size: 13px;
  padding: 6px 10px;
  border-radius: var(--radius);
}

.gate-ex.pass {
  background: rgba(16, 185, 129, 0.1);
  color: var(--green);
}

.gate-ex.fail {
  background: rgba(239, 68, 68, 0.08);
  color: var(--red);
}

/* ============================================================
   CONDITION GRID
   ============================================================ */
.condition-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.condition-card {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
}

.condition-num {
  font-size: 36px;
  font-weight: 900;
  color: var(--accent-dim);
  position: absolute;
  top: 12px;
  right: 16px;
  line-height: 1;
  opacity: 0.7;
}

.condition-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
  padding-right: 40px;
}

.condition-card p { font-size: 13px; color: var(--text-muted); }

/* ============================================================
   LEARNING GRID
   ============================================================ */
.learning-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.learning-card {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.learning-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.learning-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.learning-tag {
  padding: 3px 8px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.learning-tag.realtime {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green);
}

.learning-tag.async {
  background: var(--blue-bg);
  color: var(--blue);
}

.learning-card p { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }

.layers-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.layer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-muted);
}

.layer-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 2px 7px;
  border-radius: 100px;
  white-space: nowrap;
}

/* ============================================================
   TIER GRID
   ============================================================ */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.tier-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.tier-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
}

.tier-0 .tier-badge { background: rgba(85, 85, 112, 0.2); color: var(--text-dim); }
.tier-1 .tier-badge { background: var(--blue-bg); color: var(--blue); }
.tier-2 .tier-badge { background: rgba(16, 185, 129, 0.1); color: var(--green); }
.tier-3 .tier-badge { background: var(--accent-bg); color: var(--accent-light); }

.tier-0 { border-color: #2a2a3a; }
.tier-1 { border-color: rgba(59, 130, 246, 0.3); }
.tier-2 { border-color: rgba(16, 185, 129, 0.3); }
.tier-3 { border-color: var(--accent-dim); }

.tier-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.tier-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.tier-trigger {
  font-size: 12px;
  color: var(--text-dim);
  padding: 6px 10px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}

/* ============================================================
   EMOTION GRID
   ============================================================ */
.emotion-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.emotion-card {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.emotion-emoji { font-size: 28px; margin-bottom: 8px; }
.emotion-name {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-light);
  font-weight: 700;
  margin-bottom: 4px;
}
.emotion-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.emotion-decay { font-size: 11px; color: var(--text-dim); }

/* ============================================================
   ROUTING TABLE
   ============================================================ */
.routing-table {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.routing-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  border-bottom: 1px solid var(--border-light);
}

.routing-row:last-child { border-bottom: none; }

.routing-header {
  background: var(--bg-card);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.routing-row > div {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.routing-row:not(.routing-header):hover { background: var(--bg-card); }

.routing-row code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--yellow);
  background: rgba(245, 158, 11, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ============================================================
   TOOLS LIST
   ============================================================ */
.tools-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tool-card {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s;
}

.tool-card:hover { border-color: var(--accent-dim); }

.tool-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.tool-icon { font-size: 22px; margin-top: 2px; }

.tool-name {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-light);
  display: block;
  margin-bottom: 4px;
}

.tool-tag {
  font-size: 12px;
  color: var(--text-dim);
}

.tool-card > p { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }

.tool-card .code-block { margin-top: 0; }

/* ============================================================
   API ENDPOINTS
   ============================================================ */
.api-endpoint {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.api-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.method {
  padding: 4px 10px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

.method.post { background: rgba(16, 185, 129, 0.15); color: var(--green); }
.method.get { background: var(--blue-bg); color: var(--blue); }

.api-header code {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
}

.api-desc {
  padding: 14px 20px;
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
}

.api-params {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-light);
}

.param-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.param-row code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--yellow);
  background: rgba(245, 158, 11, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.param-row span { color: var(--text-muted); }

.api-endpoint .code-block {
  border: none;
  border-top: 1px solid var(--border-light);
  border-radius: 0;
}

.api-endpoint .code-block:last-child { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* ============================================================
   CHARACTER GRID
   ============================================================ */
.char-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.char-card {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all 0.2s;
}

.char-card:hover {
  border-color: var(--accent-dim);
  background: var(--bg-card-hover);
}

.char-card.char-special {
  border-color: var(--accent-dim);
  background: var(--accent-bg);
}

.char-avatar { font-size: 32px; margin-bottom: 8px; }
.char-name { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.char-lang { font-size: 11px; color: var(--accent-light); margin-bottom: 6px; }
.char-desc { font-size: 12px; color: var(--text-muted); }

/* ============================================================
   STEPS
   ============================================================ */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step {
  display: flex;
  gap: 16px;
  position: relative;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 19px;
  top: 44px;
  bottom: -8px;
  width: 2px;
  background: var(--border);
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-bg);
  border: 2px solid var(--accent-dim);
  color: var(--accent-light);
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
}

.step-content {
  padding-bottom: 24px;
  flex: 1;
}

.step-content h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  margin-top: 8px;
}

.step-content p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* ============================================================
   NEXT SECTION
   ============================================================ */
.next-section {
  padding-top: 8px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  margin-left: var(--sidebar-width);
  border-top: 1px solid var(--border);
  padding: 20px 64px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-dim);
  max-width: 900px;
}

.footer-inner a {
  color: var(--text-dim);
  text-decoration: none;
}

.footer-inner a:hover { color: var(--text-muted); }

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   CODE (INLINE)
   ============================================================ */
code {
  font-family: var(--font-mono);
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--accent-light);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .page {
    padding: 40px 40px;
  }

  .brain-grid { grid-template-columns: repeat(3, 1fr); }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .char-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 60;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.active {
    display: block;
  }

  .hamburger {
    display: flex;
  }

  .main {
    margin-left: 0;
  }

  .footer {
    margin-left: 0;
  }

  .page {
    padding: 24px 20px;
  }

  .page-title { font-size: 26px; }

  .comparison-grid { grid-template-columns: 1fr; }
  .brain-grid { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .axis-grid { grid-template-columns: 1fr; }
  .condition-grid { grid-template-columns: 1fr; }
  .learning-grid { grid-template-columns: 1fr; }
  .tier-grid { grid-template-columns: 1fr; }
  .emotion-grid { grid-template-columns: repeat(2, 1fr); }
  .gate-grid { grid-template-columns: 1fr; }
  .char-grid { grid-template-columns: repeat(2, 1fr); }

  .arch-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .arch-row > div:not(:last-child) {
    border-bottom: 1px solid var(--border-light);
  }

  .routing-row {
    grid-template-columns: 1fr;
  }

  .routing-row > div:first-child {
    border-bottom: 1px solid var(--border-light);
  }

  .footer-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .btn-outline { display: none; }
}

@media (max-width: 480px) {
  .brain-grid { grid-template-columns: repeat(2, 1fr); }
  .char-grid { grid-template-columns: repeat(2, 1fr); }
  .emotion-grid { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .page { padding: 20px 16px; }
  .page-title { font-size: 22px; }
}
