:root {
  --mc-deep: #0a0d2a;
  --mc-glow: #6fb5ff;
  --mc-canvas: #f5f4ef;
  --mc-ink: #14161c;
  --mc-hairline: #e6e3d8;
  --mc-blue: #0c4f8d;
  --mc-blue-light: #e8f1fa;
  --mc-blue-muted: rgba(12, 79, 141, 0.08);
  --mc-sidebar-w: 200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--mg-font-body, 'Barlow', system-ui, sans-serif); color: var(--mc-ink); background: var(--mc-canvas); overflow-x: hidden; }
h1, h2, h3 { font-family: var(--mg-font-display, 'Rajdhani', system-ui, sans-serif); text-wrap: pretty; }
p, li { line-height: 1.7; text-wrap: pretty; }
a { color: var(--mc-blue); }
code { font-family: var(--mg-font-mono, 'JetBrains Mono', monospace); font-size: 0.85em; background: rgba(0,0,0,0.04); padding: 2px 6px; border-radius: 4px; }

/* Nav handled by shared.css */

/* Layout: sidebar TOC + main content */
.docs-layout {
  display: flex;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
}

.docs-toc {
  width: var(--mc-sidebar-w);
  flex-shrink: 0;
  padding: 32px 0;
  position: sticky;
  top: 52px;
  height: fit-content;
  max-height: calc(100vh - 52px);
  overflow-y: auto;
}

.docs-toc__title {
  font-family: 'Inter Tight', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.4);
  margin-bottom: 12px;
}

.docs-toc__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs-toc__list a {
  display: block;
  font-size: 12px;
  color: rgba(0,0,0,0.55);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 4px;
  border-left: 2px solid transparent;
  transition: all 120ms;
}

.docs-toc__list a:hover {
  color: var(--mc-ink);
  background: var(--mc-blue-muted);
}

.docs-toc__list a.active {
  color: var(--mc-blue);
  border-left-color: var(--mc-blue);
  background: var(--mc-blue-muted);
  font-weight: 600;
}

.docs-toc__list a.toc-h3 {
  padding-left: 20px;
  font-size: 11px;
}

/* Main content */
.docs-body {
  flex: 1;
  min-width: 0;
  padding: 48px 0 80px 48px;
}

.docs-body h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.docs-body .docs-breadcrumb {
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.docs-body .docs-breadcrumb a {
  color: var(--mc-blue);
  text-decoration: none;
}

.docs-body .docs-breadcrumb a:hover {
  color: var(--mc-glow);
}

.docs-body .docs-lede {
  font-size: 1.05rem;
  color: #555;
  margin-bottom: 32px;
}

.docs-body h2 {
  font-size: 1.3rem;
  margin: 40px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--mc-hairline);
}

.docs-body h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.docs-body h3 {
  font-size: 1rem;
  margin: 28px 0 8px;
  color: var(--mc-blue);
}

.docs-body p { margin-bottom: 12px; }
.docs-body ul { margin: 0 0 16px 20px; }
.docs-body li { margin-bottom: 6px; }

.docs-code {
  background: var(--mc-deep);
  color: rgba(255,255,255,0.85);
  border-radius: 8px;
  padding: 16px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  margin: 12px 0 20px;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 12px 0 20px;
}

.docs-table th {
  text-align: left;
  font-weight: 600;
  padding: 8px 12px;
  background: rgba(0,0,0,0.03);
  border-bottom: 1px solid var(--mc-hairline);
}

.docs-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--mc-hairline);
}

.docs-table code {
  background: rgba(0,0,0,0.04);
  padding: 1px 5px;
  border-radius: 3px;
}

/* Responsive */
@media (max-width: 768px) {
  .docs-layout { flex-direction: column; padding: 0 16px; }
  .docs-toc {
    display: none;
  }
  .docs-body {
    padding: 24px 0 80px;
    overflow-x: hidden;
  }
  .docs-body .docs-code,
  .docs-body .docs-table {
    overflow-x: auto;
    max-width: 100%;
  }
  .docs-nav__links a { padding: 12px 10px; font-size: 12px; }
  .board-examples { grid-template-columns: 1fr; }
}

/* Board generation examples */
.board-examples {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin: 24px 0 40px;
}
.board-example-card {
  border: 1px solid var(--mc-hairline);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}
.board-example-svg {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  margin-bottom: 12px;
}
.board-example-svg svg {
  max-width: 100%;
  max-height: 260px;
}
.board-example-info h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}
.board-example-info p {
  font-size: 0.88rem;
  color: #555;
  margin-bottom: 6px;
}
.board-example-info code {
  font-size: 0.8rem;
}
.board-example-error {
  color: #999;
  font-style: italic;
  font-size: 0.85rem;
}
