:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --surface-2: #242424;
  --border: #333;
  --text: #e8e8e8;
  --muted: #999;
  --accent: #6e9eff;
  --accent-dim: rgba(110, 158, 255, 0.08);
  --danger: #ff5f56;
  --warning: #e0a030;
  --success: #4ade80;
  --radius: 6px;
  --radius-lg: 10px;
  --sidebar-width: 220px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.7;
  font-size: 0.92rem;
}

/* Layout */
.layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 10;
}

.sidebar-brand {
  padding: 0 1.25rem 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.sidebar-brand h1 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.sidebar-brand p {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.sidebar nav a {
  display: block;
  padding: 0.5rem 1.25rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.15s;
  border-left: 2px solid transparent;
}

.sidebar nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.sidebar nav a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-dim);
}

.sidebar nav .nav-section {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 1rem 1.25rem 0.35rem;
  font-weight: 600;
  opacity: 0.6;
}

/* Main content */
.main {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 2.5rem 3rem 4rem;
  max-width: 800px;
}

.main h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.main h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.main h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.lead {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.main p {
  margin-bottom: 1rem;
}

.main ul, .main ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.main li {
  margin-bottom: 0.4rem;
}

/* Links */
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Screenshots */
.screenshot {
  margin: 1.5rem 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

.screenshot img {
  display: block;
  width: 100%;
  height: auto;
}

.screenshot-caption {
  padding: 0.65rem 1rem;
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  line-height: 1.5;
}

/* Info boxes */
.box {
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: 0.85rem;
  line-height: 1.6;
}

.box-info {
  background: var(--accent-dim);
  border: 1px solid rgba(110, 158, 255, 0.2);
}

.box-warning {
  background: rgba(224, 160, 48, 0.08);
  border: 1px solid rgba(224, 160, 48, 0.2);
}

.box-warning strong { color: var(--warning); }
.box-info strong { color: var(--accent); }

.box-danger {
  background: rgba(255, 95, 86, 0.06);
  border: 1px solid rgba(255, 95, 86, 0.2);
}

.box-danger strong { color: var(--danger); }

/* Code / config blocks */
code {
  background: var(--surface-2);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.82rem;
  color: var(--accent);
}

pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1rem 0;
  line-height: 1.6;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.8rem;
  color: var(--text);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.82rem;
}

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

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--border);
}

td code {
  font-size: 0.78rem;
}

/* Feature cards */
.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.feature h3 {
  font-size: 0.88rem;
  margin-top: 0;
  margin-bottom: 0.35rem;
}

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

/* Steps */
.steps {
  counter-reset: step;
  margin: 1.5rem 0;
  padding-left: 0;
  list-style: none;
}

.steps li {
  counter-increment: step;
  padding-left: 2.5rem;
  position: relative;
  margin-bottom: 1.25rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.6rem;
  height: 1.6rem;
  background: var(--accent-dim);
  border: 1px solid rgba(110, 158, 255, 0.3);
  border-radius: 50%;
  text-align: center;
  line-height: 1.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 20;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

/* Back to app link */
.back-to-app {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  font-size: 0.82rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: filter 0.15s;
}

.back-to-app:hover {
  filter: brightness(1.15);
  text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
  .menu-toggle { display: block; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
    z-index: 15;
  }

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

  .main {
    margin-left: 0;
    padding: 3.5rem 1.25rem 3rem;
  }

  .features { grid-template-columns: 1fr; }

  table { font-size: 0.75rem; }
  th, td { padding: 0.45rem 0.5rem; }
}
