/* Documentation layout — extends styles.css tokens */

.docs-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding: 120px 0 80px;
  min-height: 100vh;
}

.docs-sidebar {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(16, 21, 30, 0.72);
  backdrop-filter: blur(12px);
}

.docs-sidebar-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.docs-nav-group {
  margin-bottom: 18px;
}

.docs-nav-group h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.docs-nav-group a {
  display: block;
  padding: 7px 10px;
  font-size: 14px;
  color: var(--text-muted);
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.docs-nav-group a:hover,
.docs-nav-group a.active {
  color: var(--primary);
  background: var(--primary-soft);
}

.docs-main {
  min-width: 0;
}

.docs-hero {
  margin-bottom: 40px;
}

.docs-hero .eyebrow {
  display: inline-block;
  margin-bottom: 12px;
}

.docs-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.docs-hero p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 640px;
}

.docs-section {
  margin-bottom: 48px;
  scroll-margin-top: 96px;
}

.docs-section h2 {
  font-size: 1.5rem;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.docs-section h3 {
  font-size: 1.1rem;
  margin: 24px 0 10px;
  color: var(--text);
}

.docs-section p,
.docs-section li {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.75;
}

.docs-section p {
  margin-bottom: 12px;
}

.docs-section ul,
.docs-section ol {
  margin: 0 0 16px 1.25rem;
}

.docs-section li {
  margin-bottom: 8px;
}

.docs-section li strong {
  color: var(--text);
}

.docs-callout {
  margin: 20px 0;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: rgba(56, 189, 248, 0.06);
  font-size: 14px;
  color: var(--text-muted);
}

.docs-callout strong {
  color: var(--accent);
}

.docs-callout--warn {
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.06);
}

.docs-callout--warn strong {
  color: #fbbf24;
}

.docs-table-wrap {
  overflow-x: auto;
  margin: 16px 0 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.docs-table th,
.docs-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.docs-table th {
  background: var(--bg-elevated);
  color: var(--text);
  font-weight: 600;
}

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

.docs-table tr:last-child td {
  border-bottom: none;
}

.docs-steps {
  counter-reset: step;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.docs-steps li {
  position: relative;
  padding-left: 44px;
  margin-bottom: 18px;
}

.docs-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.docs-code {
  margin: 14px 0 18px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #070a10;
  border: 1px solid var(--border);
  font-family: 'Cascadia Code', 'Consolas', monospace;
  font-size: 13px;
  color: #cbd5e1;
  overflow-x: auto;
}

.docs-kbd {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 12px;
  color: var(--text);
}

.header .nav-link--active {
  color: var(--primary);
}

@media (max-width: 960px) {
  .docs-layout {
    grid-template-columns: 1fr;
    padding-top: 100px;
  }

  .docs-sidebar {
    position: static;
    max-height: none;
  }
}
