/* =============================
   MCP Depot — Stylesheet
   Theme: zinc dark, single accent, editorial
   ============================= */

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

:root {
  --bg:           #0c0c0c;
  --surface:      #161616;
  --surface-2:    #1f1f1f;
  --border:       #2e2e2e;
  --border-light: #3d3d3d;
  --accent:       #f97316;
  --accent-dim:   rgba(249,115,22,0.1);
  --text:         #f5f5f5;
  --text-muted:   #737373;
  --text-subtle:  #a3a3a3;
  --code-bg:      #0c0c0c;
  --red:          #f87171;
  --green:        #4ade80;
  --blue:         #60a5fa;
  --yellow:       #fbbf24;
  --radius:       8px;
  --radius-sm:    5px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--text); }
p { color: var(--text-subtle); }
h1,h2,h3,h4,h5 { font-weight: 600; line-height: 1.2; color: var(--text); letter-spacing: -0.02em; }
code, pre { font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace; }

/* ---- Utility ---- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 28px; }

.label-tag {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-muted);
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase;
}
.label-tag::before {
  content: '';
  display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--accent);
}

.accent { color: var(--accent); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 20px; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 500; cursor: pointer;
  transition: all 0.15s; border: none; text-decoration: none;
  font-family: inherit; letter-spacing: -0.01em;
}
.btn-primary {
  background: var(--accent); color: #000;
}
.btn-primary:hover {
  background: #fb923c; color: #000;
}
.btn-outline {
  background: transparent; color: var(--text-subtle);
  border: 1px solid var(--border-light);
}
.btn-outline:hover { border-color: var(--text-muted); color: var(--text); }
.btn-lg { padding: 11px 24px; font-size: 0.9375rem; border-radius: var(--radius); }
.btn-ghost {
  background: var(--surface); color: var(--text-subtle);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

/* ---- Nav ---- */
nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(12,12,12,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center;
  justify-content: space-between; height: 56px;
}
.nav-logo {
  display: flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: 0.9375rem; color: var(--text);
  text-decoration: none; letter-spacing: -0.02em;
}
.logo-mark {
  width: 28px; height: 28px;
  border-radius: 7px;
  display: block; flex-shrink: 0;
}
.nav-links {
  display: flex; align-items: center; gap: 32px;
}
.nav-links a {
  color: var(--text-muted); font-size: 0.875rem; font-weight: 400;
  transition: color 0.12s; text-decoration: none;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.github-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: var(--radius-sm);
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.8125rem; font-weight: 400;
  transition: all 0.12s; text-decoration: none; font-family: inherit;
}
.github-btn:hover { background: var(--surface); color: var(--text); border-color: var(--border-light); }
.github-btn svg { flex-shrink: 0; }

/* ---- Hamburger menu ---- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: background 0.12s;
  flex-shrink: 0;
}
.hamburger:hover { background: var(--surface); }
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}
nav.nav-open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
nav.nav-open .hamburger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
nav.nav-open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Demo status dot ---- */
.demo-btn { gap: 7px; }
.demo-status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  flex-shrink: 0;
  transition: background 0.3s;
}
.demo-status-dot.online {
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74,222,128,0.6);
  animation: demo-pulse 2s infinite;
}
.demo-status-dot.offline { background: #f87171; }
@keyframes demo-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74,222,128,0.6); }
  70%  { box-shadow: 0 0 0 5px rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}

/* ---- Demo button live glow ---- */
.demo-btn-live {
  border-color: rgba(74,222,128,0.5) !important;
  box-shadow: 0 0 0 0 rgba(74,222,128,0.3);
  animation: btn-live-pulse 2.5s infinite;
}
@keyframes btn-live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74,222,128,0.35); }
  60%  { box-shadow: 0 0 0 7px rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}

/* ---- Demo warning modal ---- */
#demo-modal {
  position: fixed; inset: 0; z-index: 9000;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.demo-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}
.demo-modal-box {
  position: relative; z-index: 1;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 480px; width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
  animation: modal-in 0.18s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.demo-modal-header {
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 18px;
}
.demo-modal-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: rgba(251,146,60,0.12);
  border: 1px solid rgba(251,146,60,0.25);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.demo-modal-icon svg { width: 22px; height: 22px; }
.demo-modal-box h2 {
  font-size: 1.125rem; font-weight: 600;
  color: var(--text); margin: 0 0 6px;
}
.demo-modal-status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.75rem; color: var(--text-muted);
}
.demo-modal-box > p, #demo-state-online > p, #demo-state-offline > p {
  font-size: 0.875rem; color: var(--text-muted);
  margin: 0 0 12px; line-height: 1.5;
}
.demo-modal-list {
  list-style: none; padding: 0; margin: 0 0 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.demo-modal-list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.8125rem; color: var(--text-muted); line-height: 1.45;
}
.demo-modal-list li svg {
  width: 15px; height: 15px;
  flex-shrink: 0; margin-top: 1px;
  color: var(--text-subtle);
}
.demo-modal-list li strong { color: var(--text); }
.demo-modal-creds {
  font-size: 0.8125rem; color: var(--text-muted);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px; margin: 0 0 20px !important;
  line-height: 1.6;
}
.demo-modal-creds code {
  font-family: var(--font-mono, monospace);
  font-size: 0.8125rem;
  color: var(--accent);
  background: rgba(251,146,60,0.1);
  padding: 1px 5px; border-radius: 4px;
}
.demo-modal-actions {
  display: flex; gap: 10px; justify-content: flex-end;
}

/* ---- Hero ---- */
.hero {
  padding: 96px 0 80px;
  text-align: center;
}
.hero-eyebrow { margin-bottom: 24px; }
.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  margin-bottom: 20px;
  font-weight: 700;
  letter-spacing: -0.04em;
  position: relative;

  /* Animated gradient text */
  background: linear-gradient(
    120deg,
    #f5f5f5 0%,
    #f97316 25%,
    #fb923c 40%,
    #f5f5f5 55%,
    #f97316 75%,
    #f5f5f5 100%
  );
  background-size: 250% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: hero-gradient 5s linear infinite;
}

@keyframes hero-gradient {
  0%   { background-position: 0% center; }
  100% { background-position: 250% center; }
}

/* Smoke / glow behind the h1 */
.hero h1::before {
  content: '';
  position: absolute;
  inset: -40px -60px;
  background: radial-gradient(ellipse 80% 60% at 50% 50%,
    rgba(249,115,22,0.18) 0%,
    rgba(249,115,22,0.06) 50%,
    transparent 75%
  );
  filter: blur(28px);
  z-index: -1;
  animation: hero-smoke 6s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes hero-smoke {
  0%   { opacity: 0.7; transform: scale(1)    translateY(0px); }
  50%  { opacity: 1;   transform: scale(1.06) translateY(-6px); }
  100% { opacity: 0.6; transform: scale(0.97) translateY(4px); }
}

/* Light theme: softer glow */
[data-theme="light"] .hero h1 {
  background: linear-gradient(
    120deg,
    #111111 0%,
    #ea580c 25%,
    #f97316 40%,
    #111111 55%,
    #ea580c 75%,
    #111111 100%
  );
  background-size: 250% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="light"] .hero h1::before {
  background: radial-gradient(ellipse 80% 60% at 50% 50%,
    rgba(234,88,12,0.12) 0%,
    rgba(234,88,12,0.04) 50%,
    transparent 75%
  );
}
.hero-desc {
  font-size: 1.0625rem; max-width: 520px; margin: 0 auto 36px;
  color: var(--text-subtle); line-height: 1.7;
}
.hero-actions {
  display: flex; gap: 12px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 56px;
}
.hero-stats {
  display: flex; justify-content: center; gap: 56px;
  margin-bottom: 56px; flex-wrap: wrap;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
}
.stat { text-align: center; }
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--text); letter-spacing: -0.04em; }
.stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.06em; }

/* Terminal window */
.terminal {
  max-width: 640px; margin: 0 auto;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  text-align: left;
}
.terminal-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px; background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red    { background: #3f3f3f; }
.dot-yellow { background: #3f3f3f; }
.dot-green  { background: #3f3f3f; }
.terminal-title {
  font-size: 0.72rem; color: var(--text-muted);
  margin-left: 8px; font-family: monospace;
}
.terminal-body { padding: 20px 22px; font-size: 0.8125rem; }
.terminal-body pre { white-space: pre; overflow-x: auto; line-height: 1.8; }
.t-key    { color: var(--text-subtle); }
.t-str    { color: var(--text-subtle); }
.t-val    { color: var(--green); }
.t-muted  { color: var(--text-muted); }
.t-prompt { color: var(--text-muted); user-select: none; }
.t-cmd    { color: var(--text); }
.t-comment{ color: var(--text-muted); }

/* ---- Section base ---- */
section { padding: 80px 0; }
.section-label {
  display: block; font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 { font-size: clamp(1.625rem, 3vw, 2.25rem); margin-bottom: 12px; }
.section-header p { max-width: 500px; margin: 0 auto; font-size: 1rem; }

/* ---- Divider ---- */
.section-divider {
  border: none; border-top: 1px solid var(--border); margin: 0;
}

/* ---- Why section ---- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.why-card {
  background: var(--surface);
  padding: 32px;
  transition: background 0.15s;
}
.why-card:hover { background: var(--surface-2); }
.why-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; color: var(--accent);
}
.why-card h3 { font-size: 1rem; margin-bottom: 10px; font-weight: 600; }

/* ---- Features ---- */
.features-section { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1px;
}
.feature-card {
  background: var(--bg);
  padding: 24px;
  border-left: 2px solid transparent;
  transition: border-color 0.15s;
  position: relative;
}
.feature-card:hover { border-left-color: var(--accent); }
.feature-icon { height: 28px; display: flex; align-items: center; margin-bottom: 14px; }
.feature-icon svg { width: 20px; height: 20px; color: var(--text-muted); }
.feature-card h3 { font-size: 0.9rem; margin-bottom: 7px; font-weight: 600; }
.feature-card p { font-size: 0.85rem; }
.feature-tag {
  display: inline-block; margin-top: 14px;
  font-size: 0.67rem; font-weight: 600;
  padding: 2px 7px; border-radius: 3px;
  background: var(--surface-2);
  color: var(--text-muted); letter-spacing: 0.06em;
  border: 1px solid var(--border);
}

/* ---- How it works ---- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.step {
  padding: 36px 32px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  transition: background 0.15s;
}
.step:last-child { border-right: none; }
.step:hover { background: var(--surface-2); }
.step-num {
  font-size: 0.72rem; font-weight: 600; color: var(--accent);
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 16px; display: block;
}
.step h3 { margin-bottom: 10px; font-size: 1rem; }

/* ---- Quick Start ---- */
.quickstart-section {
  border-top: 1px solid var(--border);
}
.quickstart-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start;
}
.quickstart-grid h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 12px; }
.quickstart-grid > div > p { margin-bottom: 28px; }
.checklist { list-style: none; margin-bottom: 36px; }
.checklist li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 9px 0; font-size: 0.9rem; color: var(--text-subtle);
  border-bottom: 1px solid var(--border);
}
.checklist li:last-child { border-bottom: none; }
.check-icon { color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.check-icon svg { width: 13px; height: 13px; }

/* Code block widget */
.code-widget {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.code-widget-tabs {
  display: flex; background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.code-tab {
  padding: 9px 16px; font-size: 0.78rem; cursor: pointer;
  color: var(--text-muted); font-family: monospace;
  border-bottom: 2px solid transparent;
  transition: all 0.12s; user-select: none; white-space: nowrap;
  font-size: 0.75rem; letter-spacing: 0.02em;
}
.code-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.code-tab:hover:not(.active) { color: var(--text-subtle); }
.code-panel { display: none; padding: 18px 20px; }
.code-panel.active { display: block; }
.code-panel pre {
  font-size: 0.8rem; color: var(--text); white-space: pre; overflow-x: auto;
  line-height: 1.75;
}

/* ---- Clients section ---- */
.clients-section { text-align: center; }
.clients-label {
  font-size: 0.72rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 24px;
}
.clients-grid {
  display: flex; justify-content: center; align-items: center;
  gap: 8px; flex-wrap: wrap;
}
.client-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: 4px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.8125rem; font-weight: 400;
  transition: all 0.12s;
}
.client-chip:hover { border-color: var(--border-light); color: var(--text-subtle); }
.client-chip-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); opacity: 0.7;
}

/* ---- Footer ---- */
footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
}
.footer-top {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}
.footer-brand .nav-logo { margin-bottom: 12px; }
.footer-brand p { font-size: 0.85rem; max-width: 240px; }
.footer-col h4 {
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text); margin-bottom: 16px;
}
.footer-col a {
  display: block; font-size: 0.85rem;
  color: var(--text-muted); margin-bottom: 10px;
  transition: color 0.12s; text-decoration: none;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--border);
  flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { font-size: 0.8rem; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .step { border-right: none; border-bottom: 1px solid var(--border); }
  .step:last-child { border-bottom: none; }
}
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 56px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    gap: 0;
    padding: 0 28px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    z-index: 199;
  }
  nav.nav-open .nav-links {
    max-height: 400px;
    padding: 8px 28px 16px;
  }
  .nav-links a {
    padding: 11px 0;
    width: 100%;
    border-bottom: 1px solid var(--border);
    font-size: 0.9375rem;
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-right .btn-ghost { display: none; }
  .quickstart-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 64px 0 56px; }
  section { padding: 56px 0; }
  .footer-top { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; gap: 1px; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  nav.nav-open .nav-links { padding: 8px 16px 16px; }
  .docs-content { padding: 20px 16px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn-lg { width: 100%; justify-content: center; }
  .hero-stats { gap: 32px; }
  .demo-modal-box { padding: 24px 20px; }
}

/* =============================
   DOCS PAGE STYLES
   ============================= */

.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 56px);
  overflow-x: hidden;
}
.docs-layout > * { min-width: 0; }

/* Sidebar */
.docs-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 28px 0;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
}
.docs-sidebar::-webkit-scrollbar { width: 4px; }
.docs-sidebar::-webkit-scrollbar-track { background: transparent; }
.docs-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.sidebar-section { margin-bottom: 24px; padding: 0 16px; }
.sidebar-section-title {
  font-size: 0.67rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted); margin-bottom: 6px; padding-left: 8px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 4px;
  font-size: 0.8375rem; color: var(--text-muted);
  text-decoration: none; transition: all 0.12s;
  margin-bottom: 1px;
}
.sidebar-link:hover { background: var(--surface-2); color: var(--text-subtle); }
.sidebar-link.active { background: var(--accent-dim); color: var(--text); }
.slink-icon { display: flex; align-items: center; width: 18px; }
.slink-icon svg { width: 13px; height: 13px; }
.sidebar-link.sidebar-sub { padding-left: 28px; font-size: 0.8rem; color: var(--text-muted); }

/* Docs content */
.docs-content { padding: 44px 52px; max-width: 780px; width: 100%; overflow-wrap: break-word; word-break: break-word; min-width: 0; }

.docs-content h1 { font-size: 2rem; margin-bottom: 12px; letter-spacing: -0.04em; }
.docs-content h2 {
  font-size: 1.375rem; margin-top: 52px; margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.docs-content h3 { font-size: 1.05rem; margin-top: 28px; margin-bottom: 10px; }
.docs-content h4 { font-size: 0.9375rem; margin-top: 20px; margin-bottom: 8px; }
.docs-content p { margin-bottom: 16px; line-height: 1.75; }
.docs-content ul, .docs-content ol { padding-left: 22px; margin-bottom: 18px; }
.docs-content li { margin-bottom: 7px; color: var(--text-subtle); }
.docs-content strong { color: var(--text); }
.docs-content a { color: var(--accent); }
.docs-content a:hover { text-decoration: underline; }
.docs-lead { font-size: 1.0625rem; color: var(--text-subtle); margin-bottom: 36px; line-height: 1.8; }
.docs-divider { border: none; border-top: 1px solid var(--border); margin: 44px 0; }

/* Inline code */
.docs-content :not(pre) > code {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 6px;
  font-size: 0.85em; color: var(--text-subtle);
}

/* Code blocks in docs */
.code-block {
  background: var(--code-bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: clip; margin: 18px 0;
}
.code-block-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.code-block-lang {
  font-size: 0.7rem; color: var(--text-muted); font-family: monospace;
  font-weight: 500; letter-spacing: 0.04em;
}
.code-copy-btn {
  background: none; border: none; color: var(--text-muted);
  font-size: 0.75rem; cursor: pointer; padding: 3px 8px;
  border-radius: 4px; font-family: inherit; transition: color 0.12s;
}
.code-copy-btn:hover { color: var(--text); }
.code-block pre { padding: 16px 18px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.code-block code {
  font-size: 0.8125rem; color: var(--text); line-height: 1.75;
  background: none; border: none; padding: 0;
}

/* Callouts */
.callout {
  border-radius: var(--radius-sm); padding: 14px 18px;
  margin: 20px 0; display: flex; gap: 12px; align-items: flex-start;
  border-left: 3px solid;
}
.callout-info    { background: rgba(96,165,250,0.06); border-color: var(--blue); }
.callout-warning { background: rgba(251,191,36,0.06); border-color: var(--yellow); }
.callout-tip     { background: rgba(74,222,128,0.06); border-color: var(--green); }
.callout-icon { display: flex; align-items: flex-start; flex-shrink: 0; margin-top: 2px; }
.callout-icon svg { width: 15px; height: 15px; }
.callout-info .callout-icon    { color: var(--blue); }
.callout-warning .callout-icon { color: var(--yellow); }
.callout-tip .callout-icon     { color: var(--green); }
.callout p { margin: 0; font-size: 0.875rem; }
.callout strong { color: var(--text); }

/* Steps in docs */
.doc-steps { list-style: none; padding: 0; counter-reset: step; margin: 20px 0; }
.doc-steps li {
  counter-increment: step; display: flex; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--border); color: var(--text-subtle);
}
.doc-steps li:last-child { border-bottom: none; }
.doc-steps li::before {
  content: counter(step); flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-muted); font-weight: 600; font-size: 0.75rem;
  display: flex; align-items: center; justify-content: center;
}

/* Tables */
.prop-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prop-table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.prop-table th {
  text-align: left; padding: 9px 14px;
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-muted);
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.prop-table td {
  padding: 11px 14px; border-bottom: 1px solid var(--border);
  font-size: 0.85rem; color: var(--text-subtle);
}
.prop-table tr:hover td { background: rgba(255,255,255,0.015); }
.prop-table td code {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 3px; padding: 1px 6px;
  font-size: 0.82em; color: var(--text-subtle);
}
.prop-required {
  display: inline-block; font-size: 0.68rem; font-weight: 600;
  padding: 1px 6px; border-radius: 3px;
  background: rgba(249,115,22,0.1); color: var(--accent);
}
.prop-optional {
  display: inline-block; font-size: 0.68rem; font-weight: 600;
  padding: 1px 6px; border-radius: 3px;
  background: var(--surface-2); color: var(--text-muted);
  border: 1px solid var(--border);
}

/* Docs next/prev nav */
.docs-nav {
  display: flex; justify-content: space-between;
  margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--border);
}
.docs-nav-link {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  text-decoration: none; max-width: 200px; transition: border-color 0.15s;
}
.docs-nav-link:hover { border-color: var(--border-light); }
.docs-nav-link.next { text-align: right; }
.docs-nav-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.docs-nav-title { font-size: 0.875rem; font-weight: 500; color: var(--text); }

/* ---- Lucide icon sizing ---- */
.label-tag svg             { width: 12px; height: 12px; }
.why-icon svg              { width: 20px; height: 20px; }
.feature-icon svg          { width: 20px; height: 20px; color: var(--text-muted); }
.callout-icon svg          { width: 15px; height: 15px; }
.check-icon svg            { width: 13px; height: 13px; }

@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar {
    position: static; height: auto;
    border-right: none; border-bottom: 1px solid var(--border);
  }
  .docs-content { padding: 28px 20px; }
}

/* =============================
   THEME TOGGLE BUTTON
   ============================= */

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  padding: 6px 7px;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-light);
}
.theme-toggle svg { width: 16px; height: 16px; }

/* Show correct icon: dark mode → sun icon; light mode → moon icon */
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"]  .theme-toggle .icon-sun  { display: flex; }
[data-theme="light"] .theme-toggle .icon-moon { display: flex; }

/* =============================
   LIGHT THEME
   ============================= */

[data-theme="light"] {
  --bg:           #ffffff;
  --surface:      #f5f5f5;
  --surface-2:    #ebebeb;
  --border:       #e0e0e0;
  --border-light: #cccccc;
  --accent:       #ea580c;
  --accent-dim:   rgba(234,88,12,0.08);
  --text:         #111111;
  --text-muted:   #505050;
  --text-subtle:  #3d3d3d;
  --code-bg:      #f5f5f5;
  --red:          #dc2626;
  --green:        #16a34a;
  --blue:         #2563eb;
  --yellow:       #b45309;
}

/* Nav */
[data-theme="light"] nav {
  background: rgba(255,255,255,0.92);
}

/* Links */
[data-theme="light"] a { color: var(--accent); }
[data-theme="light"] a:hover { color: #111; }

/* Buttons: prevent anchor override from making primary button text invisible */
[data-theme="light"] .btn-primary,
[data-theme="light"] .btn-primary:hover { color: #fff; }

/* Inline code in docs */
[data-theme="light"] .docs-content :not(pre) > code {
  background: #f0f0f0;
  border-color: #d4d4d4;
  color: #374151;
}

/* Prop table code cells */
[data-theme="light"] .prop-table td code {
  background: #f0f0f0;
  border-color: #d4d4d4;
  color: #374151;
}

/* Table row hover visible in light mode */
[data-theme="light"] .prop-table tr:hover td { background: rgba(0,0,0,0.03); }

/* Callout backgrounds: slightly stronger tint on white */
[data-theme="light"] .callout-info    { background: rgba(37,99,235,0.07); }
[data-theme="light"] .callout-warning { background: rgba(180,83,9,0.07); }
[data-theme="light"] .callout-tip     { background: rgba(22,163,74,0.07); }

/* ---- Keep all code/terminal blocks dark in light mode ---- */

[data-theme="light"] .terminal {
  background: #0f0f0f;
  border-color: #2a2a2a;
}
[data-theme="light"] .terminal-bar {
  background: #191919;
  border-color: #2a2a2a;
}
/* Terminal text: force light colors since background stays dark */
[data-theme="light"] .terminal-title { color: #737373; }
[data-theme="light"] .t-cmd          { color: #f5f5f5; }
[data-theme="light"] .t-key          { color: #a3a3a3; }
[data-theme="light"] .t-str          { color: #a3a3a3; }
[data-theme="light"] .t-val          { color: #4ade80; }
[data-theme="light"] .t-muted        { color: #8a8a8a; }
[data-theme="light"] .t-prompt       { color: #8a8a8a; }
[data-theme="light"] .t-comment      { color: #6b6b6b; }

[data-theme="light"] .code-widget {
  background: #0f0f0f;
  border-color: #2a2a2a;
}
[data-theme="light"] .code-widget-tabs {
  background: #191919;
  border-color: #2a2a2a;
}
[data-theme="light"] .code-tab { color: #737373; }
[data-theme="light"] .code-tab.active { color: #f5f5f5; }
[data-theme="light"] .code-panel pre { color: #f5f5f5; }

[data-theme="light"] .code-block {
  background: #0f0f0f;
  border-color: #2a2a2a;
}
[data-theme="light"] .code-block-header {
  background: #191919;
  border-color: #2a2a2a;
}
[data-theme="light"] .code-block-lang { color: #737373; }
[data-theme="light"] .code-copy-btn { color: #737373; }
[data-theme="light"] .code-copy-btn:hover { color: #d4d4d4; }
[data-theme="light"] .code-block code { color: #f5f5f5; }


/* ======= ARCHITECTURE SECTION ======= */

.arch-section { padding: 100px 0; }

.arch-diagram-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.arch-svg {
  width: 100%;
  height: auto;
  max-width: 880px;
  display: block;
  margin: 0 auto;
  font-family: var(--font-sans, 'DM Sans', system-ui, sans-serif);
}

/* Box styles */
.arch-box        { fill: var(--surface); stroke: var(--border); stroke-width: 1.5; }
.arch-box--dashed { stroke-dasharray: 5 3; }
.arch-hub        { fill: rgba(249,115,22,0.04); stroke: var(--accent); stroke-width: 2; }
.arch-inner-box  { fill: var(--surface-2); stroke: var(--border-light); stroke-width: 1; }
.arch-protocol-badge { fill: rgba(249,115,22,0.08); stroke: rgba(249,115,22,0.25); stroke-width: 1; }
.arch-pg-bar     { fill: var(--surface); stroke: var(--border-light); stroke-width: 1; }

/* Text styles */
.arch-col-label    { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; fill: var(--text-muted); }
.arch-label        { font-size: 12px; font-weight: 600; fill: var(--text); }
.arch-label--muted { fill: var(--text-muted); font-weight: 500; }
.arch-sub          { font-size: 9.5px; fill: var(--text-muted); }
.arch-hub-title    { font-size: 14px; font-weight: 700; fill: var(--accent); letter-spacing: -0.3px; }
.arch-protocol-label { font-size: 10.5px; font-weight: 500; fill: var(--accent); }
.arch-inner-title  { font-size: 11px; font-weight: 600; fill: var(--text); }
.arch-inner-item   { font-size: 9px; fill: var(--text-muted); }
.arch-pg-label     { font-size: 10.5px; font-weight: 500; fill: var(--text-muted); }

/* Animated flow lines */
@keyframes arch-flow {
  to { stroke-dashoffset: -12; }
}
.arch-flow        { stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: 7 5; animation: arch-flow 0.65s linear infinite; }
.arch-flow--d1    { animation-delay: -0.13s; }
.arch-flow--d2    { animation-delay: -0.26s; }
.arch-flow--d3    { animation-delay: -0.39s; }
.arch-flow--d4    { animation-delay: -0.52s; }


/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .arch-flow { animation: none; }
}

/* ======= ROADMAP SECTION ======= */

.roadmap-section { padding: 100px 0; }

.roadmap-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
}
.roadmap-tag--next {
  background: rgba(249,115,22,0.15);
  color: var(--accent);
  border: 1px solid rgba(249,115,22,0.3);
}
.roadmap-tag--planned {
  background: rgba(96,165,250,0.1);
  color: var(--blue);
  border: 1px solid rgba(96,165,250,0.2);
}

/* Flagship card */
.roadmap-flagship {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 40px;
  margin-top: 48px;
}
.roadmap-flagship-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 12px 0 16px;
}
.roadmap-flagship-content > p {
  color: var(--text-subtle);
  line-height: 1.7;
  max-width: 720px;
  margin-bottom: 28px;
}
.roadmap-note {
  margin-top: 20px !important;
  font-size: 0.875rem;
  color: var(--text-muted) !important;
}

/* Flow steps */
.roadmap-flow {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.flow-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: var(--text-subtle);
  font-size: 0.9rem;
  line-height: 1.5;
}
.flow-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

/* Roadmap CTA */
.roadmap-cta {
  text-align: center;
  margin-top: 56px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}
.roadmap-cta p {
  font-size: 1.1rem;
  color: var(--text-subtle);
  margin-bottom: 20px;
}

/* Light mode overrides */
[data-theme="light"] .roadmap-flagship {
  background: var(--surface);
  border-color: var(--border);
  border-left-color: var(--accent);
}
[data-theme="light"] .flow-step { color: var(--text-subtle); }

/* ======= ADDITIONAL MOBILE RESPONSIVE FIXES ======= */


@media (max-width: 768px) {
  /* Features grid: force single column so 250px min doesn't overflow */
  .features-grid { grid-template-columns: 1fr; }

  /* Hero title: clamp tighter on small viewports */
  .hero h1 { font-size: clamp(1.75rem, 8vw, 2.5rem); }

  /* Terminal: ensure horizontal scroll on small screens */
  .terminal-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .terminal { min-width: 420px; }

  /* Docs mobile sidebar toggle */
  .docs-sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    background: var(--surface);
    border: none;
    border-bottom: 1px solid var(--border);
    color: var(--text-subtle);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
  }
  .docs-sidebar-toggle svg { transition: transform 0.2s; }
  .docs-sidebar-toggle.open svg { transform: rotate(180deg); }
  .docs-sidebar-body { display: none; }
  .docs-sidebar-body.open { display: block; }
}

@media (min-width: 769px) {
  /* Hide toggle button on desktop */
  .docs-sidebar-toggle { display: none; }
  .docs-sidebar-body { display: block !important; }
}

@media (max-width: 480px) {
  /* Docs heading sizes */
  .docs-content h1 { font-size: 1.5rem; }
  .docs-content h2 { font-size: 1.125rem; margin-top: 36px; }
  .docs-content h3 { font-size: 1rem; }

  /* Prop/reference tables: smaller text so they fit */
  .prop-table-wrap { font-size: 0.8rem; }
  .prop-table th, .prop-table td { padding: 8px 10px; white-space: nowrap; }

  /* Why-item: reduce padding */
  .why-item { padding: 20px; }

  /* Arch section: reduce vertical padding */
  .arch-section { padding: 60px 0; }

  /* Demo modal: ensure it fits in viewport height */
  .demo-modal-box { max-height: 90vh; overflow-y: auto; }
}
