/* Docs-specific layout, layered over the shared site tokens in style.css. */

.docs-layout {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
}

.toc { position: sticky; top: 2rem; }
.toc-title { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 1rem; }
.toc nav { display: flex; flex-direction: column; gap: 0.15rem; }
.toc a { padding: 0.4rem 0.7rem; border-radius: 8px; font-size: 0.92rem; color: var(--muted); border-left: 2px solid transparent; transition: color 0.15s ease, background 0.15s ease; }
.toc a:hover { color: var(--text); background: var(--panel); }

.docs-body { max-width: 44rem; min-width: 0; }
.docs-body h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -0.02em; }
.docs-lede { color: var(--muted); font-size: 1.1rem; margin: 0.6rem 0 2.5rem; }

.docs-body section { padding-top: 2.5rem; margin-top: 2.5rem; border-top: 1px solid var(--line); scroll-margin-top: 1.5rem; }
.docs-body section:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }
.docs-body h2 { font-family: var(--display); font-weight: 600; font-size: 1.6rem; letter-spacing: -0.01em; margin-bottom: 1rem; }
.docs-body h3 { font-family: var(--display); font-weight: 600; font-size: 1.12rem; margin: 1.6rem 0 0.6rem; color: var(--text); }
.docs-body p { color: var(--muted); margin-bottom: 1rem; }
.docs-body ul, .docs-body ol { color: var(--muted); margin: 0 0 1.2rem 1.3rem; }
.docs-body li { margin-bottom: 0.5rem; }
.docs-body strong { color: var(--text); font-weight: 600; }
.docs-body code { font-family: var(--mono); font-size: 0.85em; color: var(--signal); background: rgba(76,224,179,0.08); padding: 0.1rem 0.4rem; border-radius: 5px; }

.docs-body pre { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 1.2rem 1.4rem; overflow-x: auto; margin-bottom: 1.4rem; }
.docs-body pre code { color: var(--text); background: none; padding: 0; font-size: 0.86rem; line-height: 1.7; }

.callout { background: rgba(255,106,61,0.06); border: 1px solid rgba(255,106,61,0.3); border-left: 3px solid var(--spark); border-radius: 10px; padding: 1rem 1.3rem; color: var(--text); font-size: 0.95rem; margin: 1.5rem 0; }

.spec-table { width: 100%; border-collapse: collapse; margin: 1.2rem 0 1.4rem; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.spec-table th { text-align: left; font-family: var(--mono); font-weight: 500; font-size: 0.85rem; color: var(--signal); background: var(--panel); padding: 0.7rem 1rem; width: 34%; vertical-align: top; border-bottom: 1px solid var(--line); }
.spec-table td { color: var(--muted); font-size: 0.92rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); background: rgba(15,21,34,0.4); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }

@media (max-width: 860px) {
  .docs-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .toc { position: static; border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
  .toc nav { flex-direction: row; flex-wrap: wrap; }
}
