/* ── Docs CSS ── */

.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 48px;
  min-height: calc(100vh - 60px);
}

/* Sidebar */
.docs-sidebar {
  padding: 40px 0;
  position: sticky;
  top: 80px;
  height: fit-content;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.docs-nav { display: flex; flex-direction: column; gap: 24px; }
.docs-nav-group { display: flex; flex-direction: column; gap: 2px; }
.docs-nav-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text3); padding: 0 10px;
  margin-bottom: 4px;
}
.docs-nav-link {
  display: block; padding: 6px 10px; border-radius: 6px;
  font-size: 13px; color: var(--text2); text-decoration: none;
  transition: all 0.15s;
}
.docs-nav-link:hover { color: var(--text); background: var(--bg2); }
.docs-nav-link.active { color: var(--accent2); background: var(--accent3); font-weight: 600; }

/* Content */
.docs-content { padding: 40px 0 80px; }
.docs-hero { margin-bottom: 48px; }
.docs-hero .tag { margin-bottom: 12px; }
.docs-hero h1 { margin-bottom: 10px; }
.docs-content section { padding: 0; margin-bottom: 8px; }
.docs-content h2 { margin-bottom: 16px; font-size: 1.7rem; }
.docs-content h3 { margin-top: 20px; margin-bottom: 10px; font-size: 1.1rem; }
.docs-content p { margin-bottom: 14px; font-size: 15px; line-height: 1.7; }

/* Lists */
.doc-steps, .doc-list {
  margin: 14px 0; padding-left: 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.doc-steps li, .doc-list li { font-size: 15px; color: var(--text2); line-height: 1.6; }

/* Callouts */
.doc-note, .doc-tip, .doc-warning {
  border-radius: 10px; padding: 14px 18px; margin: 16px 0; font-size: 14px;
}
.doc-note { background: var(--bg2); border-left: 3px solid var(--text3); }
.doc-tip { background: #f0fdf4; border-left: 3px solid #22c55e; }
[data-theme="dark"] .doc-tip { background: #14532d22; border-left-color: #4ade80; }
.doc-warning { background: #fff7ed; border-left: 3px solid #f59e0b; }
[data-theme="dark"] .doc-warning { background: #7c2d1222; border-left-color: #fb923c; }
.doc-note strong, .doc-tip strong, .doc-warning strong {
  display: block; margin-bottom: 6px; color: var(--text);
}
.doc-note p, .doc-tip p, .doc-warning p { margin: 0; color: var(--text2); }

/* Example */
.doc-example { background: var(--bg2); border-radius: 10px; padding: 16px 20px; margin: 16px 0; }
.doc-example p { font-size: 14px; margin-bottom: 8px; }
.doc-example pre { margin: 8px 0; }
.de-row { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.de-row:last-child { border-bottom: none; }
.de-row.bad span:first-child { color: #b91c1c; }
.de-row.good span:first-child { color: #15803d; }
[data-theme="dark"] .de-row.good span:first-child { color: #4ade80; }

/* Table */
.doc-table { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin: 16px 0; }
.dt-row { display: grid; grid-template-columns: 1fr 1fr 2fr; padding: 10px 16px; font-size: 14px; border-bottom: 1px solid var(--border); gap: 12px; align-items: center; }
.dt-row:last-child { border-bottom: none; }
.dt-row.header { background: var(--bg2); font-weight: 700; font-size: 12px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px; }
.dt-row:not(.header):hover { background: var(--bg2); }

@media (max-width: 800px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { display: none; }
  .dt-row { grid-template-columns: 1fr 1fr; }
  .dt-row > span:nth-child(3) { grid-column: span 2; color: var(--text3); font-size: 13px; }
}
