/* Docs layout — extends the site's styles.css (same CSS variables). */
.docs-shell { max-width: 1240px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; }
.docs-shell.with-toc { grid-template-columns: 240px minmax(0, 1fr) 200px; }

/* sidebar */
.docs-side { position: sticky; top: 62px; align-self: start; height: calc(100vh - 62px); overflow-y: auto; padding: 28px 0 60px; }
.docs-side h4 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 22px 0 8px; }
.docs-side a { display: block; color: #b6c2d4; font-size: 0.9rem; padding: 5px 12px; border-radius: 7px; border-left: 2px solid transparent; }
.docs-side a:hover { color: var(--text); text-decoration: none; background: var(--panel-2); }
.docs-side a.active { color: var(--brand-2); border-left-color: var(--brand); background: var(--panel-2); }
.docs-side .lang-pill { display: inline-flex; align-items: center; gap: 8px; }
.docs-side .soon { color: #475569; cursor: default; }
.docs-side .soon:hover { background: none; color: #475569; }

/* main column */
.docs-main { padding: 36px 0 120px; min-width: 0; }
.docs-main h1 { font-size: 2.2rem; margin: 0 0 8px; }
.docs-main h2 { font-size: 1.5rem; margin: 52px 0 14px; padding-top: 12px; border-top: 1px solid var(--border); scroll-margin-top: 78px; }
.docs-main h3 { font-size: 1.12rem; margin: 30px 0 10px; scroll-margin-top: 78px; }
.docs-main p { color: #c6d2e2; }
.docs-main ul, .docs-main ol { color: #c6d2e2; }
.docs-main li { margin: 4px 0; }
.docs-lead { font-size: 1.1rem; color: var(--muted) !important; margin: 0 0 8px; }
.docs-main a { color: var(--accent); }

/* inline code + code blocks */
.docs-main :not(pre) > code { background: #131c2e; border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; font-size: 0.86em; color: #e6b980; }
.code { position: relative; background: #0b1120; border: 1px solid var(--border); border-radius: 10px; margin: 14px 0; }
.code pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-size: 0.85rem; line-height: 1.65; }
.code pre code { color: #d6e2f0; white-space: pre; }
.code .copy { position: absolute; top: 8px; right: 8px; background: #1b2740; color: #9fb0c8; border: 1px solid var(--border); border-radius: 6px; padding: 3px 10px; font-size: 0.72rem; cursor: pointer; opacity: 0; transition: opacity .15s; }
.code:hover .copy { opacity: 1; }
.code .copy:hover { color: #fff; background: #243a5c; }
.code .lbl { position: absolute; top: 8px; left: 14px; font-size: 0.68rem; color: #5b6b85; text-transform: uppercase; letter-spacing: 0.06em; }
.code.has-label pre { padding-top: 30px; }

/* tables (enum reference) */
.docs-main table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 0.9rem; }
.docs-main th, .docs-main td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.docs-main th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.docs-main td code { color: #e6b980; }

/* callouts */
.note { border-left: 3px solid var(--accent); background: rgba(56,189,248,0.07); border-radius: 0 8px 8px 0; padding: 12px 16px; margin: 16px 0; font-size: 0.92rem; }
.note.warn { border-left-color: var(--brand); background: rgba(249,115,22,0.08); }
.note.pro { border-left-color: var(--green); background: rgba(52,211,153,0.07); }
.note b { color: var(--text); }

/* method signature chip */
.api { margin: 26px 0 6px; }
.api code { background: #0d1726; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; display: inline-block; color: #cfe0f2; font-size: 0.9rem; }
.badge { display: inline-block; font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 7px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }
.badge.lic { background: var(--brand); color: #1a0e02; }
.badge.free { background: #1f2937; color: var(--muted); }

/* right TOC */
.docs-toc { position: sticky; top: 62px; align-self: start; height: calc(100vh - 62px); overflow-y: auto; padding: 36px 0; font-size: 0.82rem; }
.docs-toc h4 { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 10px; }
.docs-toc a { display: block; color: #7e8ca3; padding: 3px 0; }
.docs-toc a:hover, .docs-toc a.active { color: var(--text); text-decoration: none; }

/* docs landing cards */
.lang-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; margin-top: 30px; }
.lang-card { display: block; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 22px; color: var(--text); }
.lang-card:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-2px); transition: all .15s; }
.lang-card.soon { opacity: 0.5; pointer-events: none; }
.lang-card h3 { margin: 0 0 4px; }
.lang-card small { color: var(--muted); }

@media (max-width: 1100px) { .docs-shell.with-toc { grid-template-columns: 240px minmax(0,1fr); } .docs-toc { display: none; } }
@media (max-width: 820px) {
  .docs-shell, .docs-shell.with-toc { grid-template-columns: 1fr; }
  .docs-side { position: static; height: auto; border-bottom: 1px solid var(--border); }
}
