/* Documentation page */

.docs-label {
  margin-left: 4px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}
.docs-actions { display: flex; align-items: center; gap: 6px; }
@media (max-width: 479px) { .hide-xs, .docs-label { display: none; } }

.docs-shell {
  display: grid;
  gap: 40px;
  padding-top: 32px;
  padding-bottom: 64px;
}
@media (min-width: 1024px) { .docs-shell { grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding-top: 48px; } }

.docs-aside { display: none; }
@media (min-width: 1024px) { .docs-aside { display: block; } }

.docs-toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow-y: auto;
  padding-right: 8px;
  border-right: 1px dotted var(--border);
}
.docs-toc-title {
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.docs-toc ul { list-style: none; }
.docs-toc ul ul { margin: 2px 0 6px 10px; padding-left: 10px; border-left: 1px solid var(--divider); }
.docs-toc a {
  display: block;
  padding: 4px 0;
  font-size: 13px;
  line-height: 18px;
  color: var(--muted);
  transition: color .15s;
}
.docs-toc > ul > li > a { font-weight: 500; color: var(--muted-strong); }
.docs-toc a:hover { color: var(--ink); }
.docs-toc a.active { color: var(--primary); }

.docs-jump { margin-bottom: 32px; }
@media (min-width: 1024px) { .docs-jump { display: none; } }

.docs-intro { padding-bottom: 32px; margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.docs-intro .h2 { margin-top: 12px; }
.docs-intro .lead { margin-top: 12px; max-width: 40rem; }

.docs-content { max-width: 720px; font-size: 15px; line-height: 1.7; color: var(--muted-strong); }
.docs-chapter { padding: 40px 0 8px; border-bottom: 1px dotted var(--border); }
.docs-chapter:last-child { border-bottom: 0; }

.docs-content h2 {
  font-size: 1.625rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 12px;
}
.docs-content h3 {
  margin: 36px 0 10px;
  font-size: 1.125rem;
  font-weight: 550;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.docs-content p { margin: 0 0 16px; }
.docs-content strong { font-weight: 600; color: var(--ink); }
.docs-content a { color: var(--primary); text-decoration: underline; text-decoration-color: var(--primary-30); text-underline-offset: 3px; }
.docs-content a:hover { text-decoration-color: var(--primary); }
.docs-content ul, .docs-content ol { margin: 0 0 16px; padding-left: 22px; }
.docs-content li { margin-bottom: 6px; }
.docs-content li::marker { color: var(--muted); }
.docs-content ol ol { margin-top: 6px; }
.docs-content code {
  padding: 1px 6px;
  border: 1px solid var(--divider);
  border-radius: 5px;
  background: var(--surface);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--ink);
}

.docs-content table {
  width: 100%;
  margin: 8px 0 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.5;
}
.docs-content th {
  padding: 10px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.docs-content td { padding: 10px 14px; border-bottom: 1px solid var(--divider); vertical-align: top; }
.docs-content tr:last-child td { border-bottom: 0; }
.docs-content td:first-child { width: 34%; font-weight: 500; color: var(--ink); }

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  color: var(--muted-strong);
  white-space: nowrap;
}
.status-chip.is-accent { border-color: var(--primary-30); background: var(--primary-8); color: var(--primary); }

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: 5px;
  background: var(--ink);
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  color: #fff;
  white-space: nowrap;
}
.role-badge .ti { font-size: 13px; }

.flow-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 20px;
  padding: 14px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--canvas);
}
.flow-strip > .ti { font-size: 13px; color: #a8a29e; }
.flow-note { font-size: 13px; color: var(--muted); }

.doc-callout {
  margin: 4px 0 20px;
  padding: 14px 16px 14px 18px;
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--canvas);
  font-size: 14px;
  line-height: 1.65;
}
.callout-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.callout-title .ti { font-size: 16px; color: var(--primary); }
