/*
 * Documentation pages (docs.js): the menu on the left (the docs pages, the open page's sections
 * under it, written into the page by npm run site:layout) and the text on the right. From 900px
 * the menu stays in view while the text scrolls; narrower, it folds into "On this page" above
 * the text. Colours come from the site's own variables.
 */
.docs-page { padding-top: 28px; padding-bottom: 24px; }
.docs-head { max-width: 860px; margin: 0 0 28px; }
.docs-head h1 { font-size: clamp(32px, 5vw, 46px); line-height: 1.1; letter-spacing: -.02em; margin: 6px 0 12px; }
.docs-head .lede { margin: 0; }
.docs-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; align-items: start; }
.docs-nav { position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow-y: auto; overscroll-behavior: contain; font-size: 14px; padding-right: 6px; scrollbar-width: thin; }
.docs-toc > summary { display: none; }
.docs-pages, .docs-sections, .docs-sections ul { list-style: none; margin: 0; padding: 0; }
.docs-pages > li + li { margin-top: 2px; }
.docs-pages > li > a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; font-weight: 700; color: var(--ink); text-decoration: none; }
.docs-pages > li > a:hover { background: var(--card); }
.docs-pages > li > a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.docs-pages small { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 12px; }
.docs-sections { margin: 6px 0 12px 12px; border-left: 1px solid var(--line); }
.docs-sections a { display: block; margin-left: -1px; padding: 5px 12px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.docs-sections a:hover { color: var(--ink); }
.docs-sections a.is-active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.docs-sections .docs-sub a { padding-left: 24px; font-size: 13px; }
.docs-nav a:focus-visible, .docs-toc > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.docs-body { min-width: 0; max-width: 820px; }
/* The page's own content styles (.legal, .sdk-guide) without their centring. */
.docs-layout .docs-body.legal { margin: 0; padding: 0; max-width: 820px; }
.docs-body h2[id], .docs-body h3[id] { scroll-margin-top: 92px; }
.docs-body > h2:first-child, .docs-body > section:first-child > h2:first-child { margin-top: 0; }
.docs-body > h2 { padding-top: 26px; border-top: 1px solid var(--line); }
.docs-body > h2:first-child { padding-top: 0; border-top: 0; }
.docs-next { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 40px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.docs-next a { display: grid; gap: 2px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-decoration: none; color: var(--ink); font-weight: 700; min-width: 200px; }
.docs-next a span { color: var(--muted); font-size: 12px; font-weight: 600; }
.docs-next a:hover { border-color: var(--accent); }
.docs-next a.next { text-align: right; margin-left: auto; }
@media (max-width: 899px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .docs-nav { position: static; max-height: none; overflow: visible; padding: 0; }
  .docs-toc { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 0 14px; }
  .docs-toc > summary { display: list-item; cursor: pointer; padding: 12px 0; font-weight: 700; }
  .docs-toc[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
  .docs-toc .docs-pages { padding-bottom: 10px; }
}

/* ---------- API reference pieces (from AtlasAR's API page) ---------- */
.endpoint { margin: 8px 0 34px; }
.ep-path { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 12px; }
.ep-path code { font: 600 14.5px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.method { display: inline-block; min-width: 58px; padding: 3px 8px; border-radius: 6px; font: 700 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-align: center; letter-spacing: .02em; }
.method.get { background: color-mix(in srgb, #0e8a6c 15%, transparent); color: #0b7d62; }
.method.post { background: color-mix(in srgb, #2b5ee6 15%, transparent); color: #2756d6; }
.method.delete { background: color-mix(in srgb, #d23a2c 14%, transparent); color: #c0392b; }
@media (prefers-color-scheme: dark) { .method.get { color: #5fd3a6; } .method.post { color: #8fb0ff; } .method.delete { color: #ff8a7a; } }
.ep-tag { padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: var(--muted); }
.ep-tag.plan { border-color: transparent; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
table.params { width: 100%; border-collapse: collapse; margin: 6px 0 16px; font-size: 14.5px; }
table.params th, table.params td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.params th { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
table.params td:first-child { white-space: nowrap; }
table.params td:first-child code { font: 600 13.5px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ptype { color: var(--muted); font: 12.5px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.preq { margin-left: 6px; color: #c0392b; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.docs-body h4 { margin: 18px 0 6px; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.callout { margin: 16px 0; padding: 12px 16px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; background: var(--card); font-size: 15px; }
.callout.warn { border-left-color: #d97706; }
.docs-body .code { margin: 10px 0 16px; }
.docs-head .actions { margin-top: 18px; }
