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

:root {
  --bg: #050508;
  --bg-elevated: #0c0d12;
  --bg-card: #10121a;
  --bg-card-hover: #141722;
  --bg-code: #090d14;
  --line: rgba(255, 255, 255, 0.06);
  --line-accent: rgba(125, 211, 252, 0.22);
  --accent: #7dd3fc;
  --accent-dim: #0ea5e9;
  --accent-glow: rgba(14, 165, 233, 0.25);
  --ok: #22c55e;
  --bad: #ef4444;
  --text: #eceef4;
  --muted: #8b93a8;
  --dim: #555b6e;
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --sidebar-w: 240px;
  --topbar-h: 60px;
  --shadow-glow: 0 0 80px rgba(14, 165, 233, 0.1), 0 0 120px rgba(125, 211, 252, 0.05);
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #bae6fd; }

img, video { max-width: 100%; height: auto; display: block; }

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 300;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: var(--radius-xs);
  font-weight: 600;
  font-size: 0.875rem;
}

.skip-link:focus { top: 1rem; }

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient::before {
  content: '';
  position: absolute;
  top: -15%;
  left: -10%;
  width: 55%;
  height: 55%;
  background: radial-gradient(ellipse, rgba(14, 165, 233, 0.07) 0%, transparent 70%);
}

.ambient::after {
  content: '';
  position: absolute;
  bottom: -10%;
  right: -10%;
  width: 45%;
  height: 45%;
  background: radial-gradient(ellipse, rgba(125, 211, 252, 0.04) 0%, transparent 70%);
}

.grid-overlay {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  background: rgba(5, 5, 8, 0.78);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
}

.brand span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.9rem;
}

.topbar nav {
  display: flex;
  gap: 0.15rem;
  margin-left: auto;
}

.topbar nav a {
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-xs);
  color: var(--muted);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.topbar nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.topbar .btn { margin-left: 0.25rem; font-size: 0.85rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 0.45rem;
  cursor: pointer;
  color: var(--text);
  margin-left: auto;
}

.nav-toggle svg { display: block; }

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(5, 5, 8, 0.94);
  backdrop-filter: blur(16px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  transition: color 0.2s;
}

.mobile-menu a:hover { color: var(--accent); }

.mobile-menu .nav-cta-mobile {
  margin-top: 0.75rem;
  background: var(--accent-dim);
  color: #fff;
  font-size: 0.95rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
}

/* Docs layout */
.docs-layout {
  position: relative;
  z-index: 1;
  display: flex;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem;
  gap: 1.75rem;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--topbar-h) + 1rem);
  height: calc(100vh - var(--topbar-h) - 2rem);
  overflow-y: auto;
  padding: 0.5rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--line-accent) transparent;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--line-accent); border-radius: 2px; }

.sidebar .nav-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--dim);
  padding: 0 0.75rem 0.6rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.5rem;
}

.nav-list { list-style: none; padding: 0; margin: 0; }

.nav-list li { margin: 2px 0; }

.nav-list a {
  display: block;
  padding: 0.45rem 0.75rem;
  color: var(--muted);
  text-decoration: none;
  border-radius: var(--radius-xs);
  font-size: 0.84rem;
  line-height: 1.4;
  transition: color 0.15s, background 0.15s;
  border-left: 2px solid transparent;
}

.nav-list a:hover {
  color: var(--text);
  background: rgba(125, 211, 252, 0.05);
}

.nav-list a.active {
  color: var(--accent);
  background: rgba(125, 211, 252, 0.08);
  border-left-color: var(--accent);
  font-weight: 500;
}

.sidebar .telemetry {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}

.sidebar .telemetry li {
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.25rem 0.75rem;
}

.sidebar .telemetry b { color: var(--text); font-size: 0.72rem; }

.docs-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 1.25rem;
}

/* Sections */
.pane {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  transition: border-color 0.25s;
}

.pane:hover { border-color: var(--line-accent); }

.pane h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.pane > p {
  color: var(--muted);
  margin: 0 0 1rem;
  max-width: 65ch;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  align-items: stretch;
}

.hero-content { display: flex; flex-direction: column; justify-content: center; }

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.7rem;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--muted);
}

.badge-live {
  border-color: rgba(34, 197, 94, 0.25);
  color: var(--ok);
  background: rgba(34, 197, 94, 0.06);
}

.badge-live::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0); }
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 1rem;
}

.hero h1 .gradient {
  background: linear-gradient(135deg, var(--accent) 0%, #bae6fd 50%, var(--accent-dim) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lead {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 52ch;
  margin: 0 0 1.5rem;
}

.row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Terminal */
.terminal {
  background: var(--bg-code);
  border: 1px solid var(--line-accent);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-glow);
  display: flex;
  flex-direction: column;
  min-height: 240px;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--line);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot:nth-child(1) { background: #ef4444; }
.terminal-dot:nth-child(2) { background: #f5a623; }
.terminal-dot:nth-child(3) { background: #22c55e; }

.terminal-title {
  margin-left: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--dim);
}

#terminalStream {
  flex: 1;
  max-height: 220px;
  overflow-y: auto;
  padding: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

#terminalStream::-webkit-scrollbar { width: 5px; }
#terminalStream::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

#terminalStream pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: pre-wrap;
  color: #b7f6c9;
}

#terminalStream pre::after {
  content: '_';
  animation: termBlink 1s step-end infinite;
}

@keyframes termBlink { 50% { opacity: 0; } }

/* Architecture */
.arch-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin: 1.25rem 0;
  padding: 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.arch-node {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--line-accent);
  border-radius: var(--radius-xs);
  color: var(--text);
}

.arch-arrow {
  color: var(--accent);
  font-size: 1.1rem;
}

.arch-line {
  font-family: var(--font-mono);
  font-size: 1rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--line-accent);
  transform: translateY(-1px);
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--accent);
}

.feature-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Tabs & code */
.tabs {
  display: flex;
  gap: 0.35rem;
  margin: 0.75rem 0;
  flex-wrap: wrap;
}

.tabs button {
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--muted);
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.tabs button:hover { color: var(--text); }

.tabs button.active {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(125, 211, 252, 0.08);
}

.codewrap { position: relative; }

.codewrap .code {
  display: none;
  border: 1px solid var(--line);
  padding: 1rem 1.1rem;
  background: var(--bg-code);
  overflow: auto;
  border-radius: var(--radius-sm);
  margin: 0;
}

.codewrap .code.active { display: block; }

.code code,
#testLog code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  white-space: pre-wrap;
  color: #b7f6c9;
}

.code-header {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--text);
  padding: 0.65rem 1.15rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: all 0.2s;
}

.btn:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.btn.primary {
  border-color: var(--accent-dim);
  background: var(--accent-dim);
  color: #fff;
}

.btn.primary:hover {
  background: #0284c7;
  border-color: #0284c7;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn.ghost {
  background: transparent;
}

.btn.ghost:hover { background: rgba(255, 255, 255, 0.03); }

/* Video */
.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}

.video-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.video-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent);
}

.video-card video {
  width: 100%;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
  background: #000;
}

.demo-video {
  width: 100%;
  border: 1px solid var(--line);
  background: #000;
  border-radius: var(--radius-sm);
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.pricing-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--line-accent);
  box-shadow: var(--shadow-glow);
}

.pricing-card .badge-promo {
  position: absolute;
  top: -10px;
  right: 12px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  text-transform: uppercase;
  border-radius: var(--radius-xs);
  letter-spacing: 0.04em;
}

.pricing-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.pricing .price {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.pricing .price small {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 500;
}

.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.pricing-card ul li::before {
  content: '✓ ';
  color: var(--ok);
  font-weight: 600;
}

.original-price {
  color: var(--dim);
  text-decoration: line-through;
  font-size: 1.3rem;
  margin-right: 0.25rem;
}

.founder-note {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin: 0;
}

.renew-note {
  color: var(--dim);
  font-size: 0.78rem;
  margin-top: 0.35rem;
}

.pricing-card input[type="email"],
.pricing-card input[type="text"],
.pricing-card input[type="password"],
.field-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  background: var(--bg-code);
  color: var(--text);
  margin-bottom: 0.5rem;
  border-radius: var(--radius-xs);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

.pricing-card input:focus,
.field-input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-msg {
  font-size: 0.85rem;
  color: var(--accent);
  margin-top: 0.25rem;
}

.form-msg.error { color: var(--bad); }

.resend-hint {
  font-size: 0.78rem;
  margin-top: 0.35rem;
  color: var(--dim);
}

/* FAQ */
.faq details {
  border-top: 1px solid var(--line);
  padding: 0.85rem 0;
}

.faq details:last-child { border-bottom: 1px solid var(--line); }

.faq details summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq details summary::-webkit-details-marker { display: none; }

.faq details summary::after {
  content: '+';
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 400;
}

.faq details[open] summary::after { content: '−'; }

.faq details p {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 60ch;
}

/* Loyalty */
.loyalty-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.loyalty-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 0.75rem;
}

.loyalty-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.loyalty-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.loyalty-form .field-input {
  flex: 1;
  min-width: 200px;
  margin-bottom: 0;
}

.disclaimer {
  font-size: 0.75rem;
  color: var(--dim);
  font-style: italic;
  margin-top: 1rem;
  max-width: 55ch;
}

/* Tables */
table { width: 100%; border-collapse: collapse; }

th, td {
  border: 1px solid var(--line);
  padding: 0.6rem 0.75rem;
  text-align: left;
}

th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--bg-elevated);
}

td { color: var(--muted); font-size: 0.88rem; }
td.ok { color: var(--ok); font-weight: 600; }
td.bad { color: var(--bad); font-weight: 600; }

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  padding: 2rem 1.5rem;
  color: var(--dim);
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  text-align: center;
  max-width: 65ch;
  margin: 0 auto;
  line-height: 1.6;
}

.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

/* Guide page */
.guide-content { max-width: 720px; }

.guide-content h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.guide-content .subtitle { color: var(--muted); margin-bottom: 2rem; }

.guide-content h2 {
  font-family: var(--font-display);
  color: var(--accent);
  margin-top: 2.5rem;
  margin-bottom: 0.85rem;
  font-size: 1.2rem;
  scroll-margin-top: calc(var(--topbar-h) + 1rem);
}

.guide-content h2:first-of-type { margin-top: 1rem; }

.guide-content p,
.guide-content li { color: var(--muted); line-height: 1.7; }

.guide-content strong { color: var(--text); }

.guide-content code {
  background: var(--bg-code);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-xs);
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

.highlight {
  border-left: 3px solid var(--accent);
  padding: 0.85rem 1rem;
  background: var(--bg-elevated);
  margin: 1rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.highlight p { margin: 0; color: var(--muted); }

.step {
  display: flex;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.step-num {
  background: var(--accent-dim);
  color: #fff;
  font-weight: 700;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.82rem;
  font-family: var(--font-mono);
}

.step-text { flex: 1; }

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.tool-item {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  padding: 0.55rem 0.75rem;
  font-size: 0.84rem;
  border-radius: var(--radius-xs);
}

.tool-item strong { color: var(--accent); }

.guide-content details {
  border-top: 1px solid var(--line);
  padding: 0.75rem 0;
}

.guide-content details summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 500;
}

.guide-content details p { margin-top: 0.5rem; }

.guide-content ul { padding-left: 1.25rem; }
.guide-content ul li { margin: 0.35rem 0; }

.guide-content table { margin: 0.75rem 0; }

.guide-footer {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  padding-top: 1.25rem;
  color: var(--dim);
  font-size: 0.82rem;
}

/* Console controls */
.console-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.console-controls label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.console-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

#testLog {
  margin-top: 1rem;
  max-height: 200px;
  overflow-y: auto;
}

/* Mobile sidebar */
.mobile-nav-toggle {
  display: none;
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 101;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--accent-glow);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-toggle span {
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.mobile-nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.mobile-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }

.mobile-nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

.backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 99;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-accent); border-radius: 3px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; }
  #terminalStream { max-height: 160px; }
}

@media (max-width: 860px) {
  .docs-layout {
    padding: 1rem;
    flex-direction: column;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    z-index: 100;
    background: var(--bg);
    border-right: 1px solid var(--line);
    padding: 4.5rem 0.75rem 1.5rem;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

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

  .mobile-nav-toggle { display: flex; }

  .topbar nav { display: none; }
  .topbar .btn.primary { display: none; }
  .nav-toggle { display: block; }
}

@media (max-width: 600px) {
  .tool-grid { grid-template-columns: 1fr; }
  .loyalty-form { flex-direction: column; }
  .arch-flow { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}