/* Docs layout */
.docs-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-docs);
}

.docs-main {
  flex: 1;
  padding: 48px 0 80px;
}

.docs-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 32px;
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.15s;
}

.docs-back:hover {
  color: var(--accent);
}

.docs-back::before {
  content: '←';
}

.docs-article {
  max-width: 760px;
}

/* Docs index */
.docs-index {
  max-width: 720px;
}

.docs-index__heading {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 12px;
}

.docs-index__intro {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.docs-index__list {
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.docs-index__item + .docs-index__item {
  border-top: 1px solid var(--border);
}

.docs-index__link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 24px;
  background: var(--bg-elevated);
  transition: background 0.15s;
}

.docs-index__link:hover {
  background: var(--bg-surface);
}

.docs-index__title {
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
}

.docs-index__slug {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

.docs-index__empty {
  font-size: 17px;
  color: var(--text-muted);
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
}

.docs-index__empty code {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-secondary);
}

/* Markdown content */
.docs-content {
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
}

.docs-content > :first-child {
  margin-top: 0;
}

.docs-content h1,
.docs-content h2,
.docs-content h3,
.docs-content h4 {
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.docs-content h1 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin: 0 0 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.docs-content h2 {
  font-size: 1.625rem;
  margin: 48px 0 16px;
}

.docs-content h3 {
  font-size: 1.35rem;
  margin: 32px 0 12px;
}

.docs-content h4 {
  font-size: 1.125rem;
  margin: 24px 0 8px;
}

.docs-content p {
  margin: 0 0 16px;
}

.docs-content strong {
  color: var(--text);
  font-weight: 600;
}

.docs-content em {
  font-style: italic;
  color: var(--text-secondary);
}

.docs-content a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.3);
  transition: text-decoration-color 0.15s;
}

.docs-content a:hover {
  text-decoration-color: var(--text);
}

.docs-content ul,
.docs-content ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

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

.docs-content li::marker {
  color: var(--text-muted);
}

.docs-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

.docs-content blockquote {
  margin: 0 0 16px;
  padding: 16px 20px;
  border-left: 3px solid var(--border-strong);
  background: var(--bg-elevated);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted);
}

.docs-content table {
  width: 100%;
  margin: 0 0 24px;
  border-collapse: collapse;
  font-size: 15px;
}

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

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

.docs-content img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin: 0 0 16px;
}

/* Code */
.docs-code {
  margin: 0 0 20px;
  padding: 18px 20px;
  overflow-x: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.docs-code__block {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  color: #d4d4d4;
  white-space: pre;
}

.docs-code__inline {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 2px 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
}

/* Hint boxes */
.docs-hint {
  margin: 24px 0;
  padding: 16px 20px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}

.docs-hint > :first-child {
  margin-top: 0;
}

.docs-hint > :last-child {
  margin-bottom: 0;
}

.docs-hint::before {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.docs-hint--info::before {
  content: 'Hint';
}

.docs-hint--tip::before {
  content: 'Tip';
}

.docs-hint--warning::before {
  content: 'Warning';
}

.docs-hint--note::before {
  content: 'Note';
}

.docs-hint p {
  margin-bottom: 8px;
}

.docs-hint p:last-child {
  margin-bottom: 0;
}
