:root {
  --doc-sidebar: 280px;
  --doc-code-bg: rgba(22, 33, 62, 0.6);
}

body.manual-page { padding-top: 72px; }

.doc-layout {
  display: grid;
  grid-template-columns: var(--doc-sidebar) 1fr;
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

@media (max-width: 991px) {
  .doc-layout { grid-template-columns: 1fr; }
  .doc-sidebar { position: static !important; max-height: none !important; }
}

.doc-sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.doc-sidebar h6 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 1rem 0 0.5rem;
}

.doc-sidebar h6:first-child { margin-top: 0; }

.doc-sidebar a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.doc-sidebar a:hover,
.doc-sidebar a.active {
  color: var(--text);
  background: rgba(233, 69, 96, 0.1);
}

.doc-content h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.doc-lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 720px;
  margin-bottom: 2rem;
}

.doc-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 3rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 88px;
}

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

.doc-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.75rem 0 0.75rem;
  color: var(--primary-soft);
}

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

.doc-content p { margin-bottom: 0.85rem; }
.doc-content ul,
.doc-content ol { margin-bottom: 1rem; padding-left: 1.25rem; }
.doc-content li { margin-bottom: 0.4rem; }
.doc-content strong { color: var(--text); }
.doc-content a { color: var(--primary-soft); }

.doc-content code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--doc-code-bg);
  color: var(--ok);
  padding: 0.15rem 0.45rem;
  border-radius: 5px;
}

.doc-content pre {
  background: var(--doc-code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
}

.doc-content pre code {
  background: none;
  padding: 0;
  color: var(--text);
  font-size: 0.85rem;
}

.callout {
  background: var(--glass);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}

.callout.success { border-left-color: var(--ok); }
.callout.warn { border-left-color: #f59e0b; }

.callout-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.step-list {
  counter-reset: steps;
  list-style: none;
  padding-left: 0;
}

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

.step-list li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.75rem;
  height: 1.75rem;
  background: linear-gradient(135deg, var(--primary), #c23152);
  color: #fff;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mode-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.9rem;
}

.mode-table th,
.mode-table td {
  border: 1px solid var(--border);
  padding: 0.65rem 0.85rem;
  text-align: left;
}

.mode-table th {
  background: rgba(233, 69, 96, 0.12);
  color: var(--text);
  font-weight: 600;
}

.mode-table td { color: var(--muted); }

.kbd-table td:first-child {
  font-family: var(--mono);
  color: var(--ok);
  white-space: nowrap;
  width: 180px;
}

.badge-pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(233, 69, 96, 0.15);
  color: var(--primary-soft);
  border: 1px solid var(--border);
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.model-card-doc {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.model-card-doc .role {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  font-weight: 600;
}

.model-card-doc .name {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text);
  margin: 0.35rem 0;
}

.model-card-doc p {
  font-size: 0.82rem;
  margin: 0;
}

.doc-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(233, 69, 96, 0.12);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  color: var(--primary-soft);
  margin-bottom: 1rem;
}
