/* Docs: sidebar, article, "on this page". Also the legal pages. */
.docs-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr) 210px; gap: 40px; padding-top: 32px; }
.docs-sidebar { position: sticky; top: calc(var(--header-h) + 20px); align-self: start; max-height: calc(100vh - var(--header-h) - 40px); overflow: auto; padding-bottom: 24px; }
.docs-search { margin-bottom: 16px; }
.docs-search input { width: 100%; }
.docs-results { list-style: none; padding: 0; margin: -6px 0 16px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.docs-results a { display: block; padding: 8px 12px; color: var(--text); border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.docs-results a:hover { background: var(--panel-2); text-decoration: none; }
.docs-results small { display: block; color: var(--muted); font-size: 0.78rem; }
.docs-nav-section { margin-bottom: 20px; }
.docs-nav-section h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 8px; }
.docs-nav-section ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; }
.docs-nav-section a { display: block; padding: 5px 10px; border-radius: 6px; color: var(--text-2); font-size: 0.93rem; }
.docs-nav-section a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.docs-nav-section a[aria-current="page"] { background: rgba(98, 225, 111, 0.12); color: var(--green); font-weight: 600; }
.docs-article { min-width: 0; padding-bottom: 40px; }
.docs-crumb { color: var(--green); font-family: var(--pixel); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 10px; }
.docs-article h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
.docs-lead { font-size: 1.15rem; color: var(--text-2); }
.docs-article h2 { font-size: 1.5rem; margin-top: 2.2em; padding-top: 0.6em; border-top: 1px solid var(--line); }
.docs-article h3 { font-size: 1.12rem; margin-top: 1.8em; }
.docs-article .anchor { float: left; margin-left: -1em; padding-right: 0.3em; color: var(--muted); opacity: 0; text-decoration: none; }
.docs-article h2:hover .anchor, .docs-article h3:hover .anchor { opacity: 1; }
.docs-article p, .docs-article li { color: var(--text-2); }
.docs-article li { margin: 4px 0; }
.docs-article strong, .docs-article b { color: var(--text); }
.docs-article img.shot { display: block; max-width: 100%; border-radius: 10px; border: 1px solid var(--line-2); margin: 16px 0; }
.docs-article pre { position: relative; }
.copy-code { position: absolute; top: 8px; right: 8px; font: 600 0.72rem var(--font); padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted); cursor: pointer; opacity: 0; transition: opacity 0.15s; }
.docs-article pre:hover .copy-code { opacity: 1; }
.table-wrap { overflow-x: auto; margin: 14px 0; }
.docs-article table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
.docs-article th, .docs-article td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text-2); }
.docs-article th { color: var(--text); background: var(--panel); font-weight: 700; }
.docs-article td code { white-space: nowrap; }
.docs-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 56px; }
.docs-pager a { display: block; padding: 14px 18px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); font-weight: 600; }
.docs-pager a:hover { border-color: var(--green); text-decoration: none; }
.docs-pager small { display: block; color: var(--muted); font-weight: 500; font-size: 0.8rem; }
.docs-next { text-align: right; }
.docs-toc { position: sticky; top: calc(var(--header-h) + 20px); align-self: start; font-size: 0.86rem; }
.docs-toc h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 10px; }
.docs-toc ul { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.docs-toc a { display: block; padding: 4px 12px; color: var(--muted); margin-left: -1px; border-left: 2px solid transparent; }
.docs-toc a:hover { color: var(--text); text-decoration: none; }
.docs-toc a.active { color: var(--green); border-left-color: var(--green); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 18px 0; }
.cards a { display: block; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); }
.cards a:hover { border-color: var(--green); text-decoration: none; }
.cards a b { display: block; margin-bottom: 4px; }
.cards a span { color: var(--muted); font-size: 0.9rem; }
.cards img { width: 32px; height: 32px; image-rendering: pixelated; margin-bottom: 10px; display: block; }
@media (max-width: 1180px) { .docs-layout { grid-template-columns: 230px minmax(0, 1fr); } .docs-toc { display: none; } }
@media (max-width: 820px) { .docs-layout { grid-template-columns: 1fr; gap: 12px; } .docs-sidebar { position: static; max-height: none; padding-bottom: 0; } .docs-nav { display: none; } }
.legal { max-width: 760px; padding: 56px 0 20px; }
.legal h2 { font-size: 1.3rem; margin-top: 1.8em; }
.legal p, .legal li { color: var(--text-2); }
.changelog-entry { margin-top: 40px; padding-top: 8px; border-top: 1px solid var(--line); }
.changelog-entry h2 { margin: 0.8em 0 4px; }
.changelog-entry h2 a { color: var(--text); }
.changelog-entry h3 { font-size: 1rem; margin: 1.4em 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.changelog-entry li { margin: 5px 0; }
.changelog-meta { color: var(--muted); font-size: 0.9rem; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Screenshots: taken at 2x; click to see full size. */
.shot { width: fit-content; max-width: 100%; margin: 8px 0 24px; border: 1px solid var(--line-2); border-radius: 14px; background: #0a0d12; padding: 8px; }
.shot img { display: block; max-width: 100%; height: auto; border-radius: 8px; cursor: zoom-in; image-rendering: auto; }
.shot figcaption { font-size: 0.86rem; line-height: 1.5; color: var(--muted); padding: 9px 6px 3px; }
.shot-zoom { max-width: min(1600px, 96vw); max-height: 94vh; padding: 0; border: 1px solid var(--line-2); border-radius: 14px; background: #0a0d12; overflow: auto; }
.shot-zoom::backdrop { background: rgba(4, 6, 10, 0.88); }
.shot-zoom img { display: block; max-width: 100%; height: auto; cursor: zoom-out; }
.shots-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.shots-row .shot { flex: 1 1 260px; }
