/* Documentation wiki (/docs/, generated by tools/docs.mjs, 2026-11-17). Loaded after account.css and theme-tokens.css:
   uses their tokens (--bg, --surface, --line, --accent, ...) so every site style also styles the docs. */
body.docs { min-height: 100vh; display: flex; flex-direction: column; }
.docs-layout { flex: 1; width: 100%; max-width: 84rem; margin: 0 auto; display: grid; grid-template-columns: 16rem minmax(0, 1fr) 13rem; gap: 2rem; padding: 0 1rem; }
.docs-main { max-width: 50rem; margin: 0; padding: 2rem 0 3rem; min-width: 0; }
.docs-side { position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto; padding: 1.5rem 0 2rem; }
.docs-menu { display: none; }
.docs-nav-group { margin: 1.25rem 0 0.35rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.docs-nav ul, .docs-toc ul, .docs-results { list-style: none; margin: 0; padding: 0; }
.docs-nav a { display: block; padding: 0.3rem 0.6rem; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 0.95rem; }
.docs-nav a:hover { background: var(--surface-2); }
.docs-nav a[aria-current="page"] { background: var(--surface-2); font-weight: 700; box-shadow: inset 3px 0 0 var(--highlight); }
.docs-search { position: relative; }
.docs-search input { width: 100%; }
.docs-results { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18); max-height: 60vh; overflow-y: auto; }
.docs-results a { display: block; padding: 0.5rem 0.75rem; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); }
.docs-results a:hover, .docs-results a:focus { background: var(--surface-2); }
.docs-results small { display: block; color: var(--muted); }
.docs-results li:last-child a { border-bottom: 0; }
.docs-toc { position: sticky; top: 0; align-self: start; padding: 2rem 0; font-size: 0.88rem; max-height: 100vh; overflow-y: auto; }
.docs-toc-title { margin: 0 0 0.5rem; font-weight: 700; color: var(--muted); }
.docs-toc a { display: block; padding: 0.2rem 0; color: var(--muted); text-decoration: none; }
.docs-toc a:hover { color: var(--text); }
.docs-toc .toc-3 a { padding-left: 0.8rem; font-size: 0.84rem; }
.docs-crumb { margin: 0 0 0.25rem; color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.docs-body h2 { margin: 2.25rem 0 0.75rem; font-size: 1.4rem; }
.docs-body h3 { margin: 1.6rem 0 0.5rem; font-size: 1.12rem; }
.docs-body h4 { margin: 1.2rem 0 0.4rem; font-size: 1rem; }
.docs-body h2, .docs-body h3, .docs-body h4 { position: relative; scroll-margin-top: 1rem; }
.docs-body .anchor { position: absolute; left: -1.1em; padding-right: 0.3em; color: var(--muted); text-decoration: none; opacity: 0; }
.docs-body h2:hover .anchor, .docs-body h3:hover .anchor, .docs-body h4:hover .anchor, .docs-body .anchor:focus { opacity: 1; }
.docs-body p, .docs-body li { line-height: 1.65; }
.docs-body ul, .docs-body ol { padding-left: 1.4rem; }
.docs-body li { margin: 0 0 0.35rem; }
.docs-body li > ul, .docs-body li > ol { margin-top: 0.35rem; }
.docs-body code { font-family: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, Menlo, monospace; font-size: 0.88em; background: var(--surface-2); padding: 0.08em 0.35em; border-radius: 5px; overflow-wrap: anywhere; }
.docs-body .code { position: relative; margin: 0 0 1.25rem; }
.docs-body pre { margin: 0; padding: 1rem 1.1rem; overflow-x: auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; line-height: 1.5; }
.docs-body pre code { background: none; padding: 0; font-size: 0.86rem; overflow-wrap: normal; white-space: pre; }
.docs-body .copy { position: absolute; top: 0.45rem; right: 0.45rem; padding: 0.2rem 0.6rem; font: inherit; font-size: 0.8rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.docs-body .copy:hover { color: var(--text); }
.docs-body .table-wrap { margin: 0 0 1.25rem; }
.docs-body td, .docs-body th { vertical-align: top; }
.docs-body th { white-space: normal; }
.docs-body td code { white-space: nowrap; overflow-wrap: normal; }
.docs-body .al-center { text-align: center; }
.docs-body .al-right { text-align: right; }
.docs-body blockquote { margin: 0 0 1.25rem; padding: 0.25rem 1rem; border-left: 4px solid var(--line); color: var(--muted); }
.callout { margin: 0 0 1.25rem; padding: 0.8rem 1rem; border-radius: 10px; border: 1px solid var(--line); border-left-width: 5px; background: var(--surface); }
.callout > :last-child { margin-bottom: 0; }
.callout-title { margin: 0 0 0.3rem; font-weight: 700; }
.callout-note { border-left-color: var(--link); }
.callout-tip { border-left-color: var(--ok); }
.callout-tip .callout-title { color: var(--ok); }
.callout-warning { border-left-color: var(--warn); background: var(--warn-bg); }
.callout-warning .callout-title { color: var(--warn); }
.callout-planned { border-left-color: var(--highlight); border-style: dashed; border-left-style: solid; }
.callout-planned .callout-title { color: var(--highlight); }
.docs-raw { margin: 2rem 0 0; font-size: 0.88rem; color: var(--muted); }
.docs-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
.docs-pager a { display: block; padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; background: var(--surface); }
.docs-pager a:hover { border-color: var(--accent); }
.docs-pager a span { display: block; font-size: 0.8rem; color: var(--muted); }
.docs-pager .next { text-align: right; }
@media (max-width: 1180px) {
  .docs-layout { grid-template-columns: 15rem minmax(0, 1fr); }
  .docs-toc { display: none; }
}
@media (max-width: 820px) {
  .docs-layout { display: block; padding: 0 16px; }
  .docs-side { position: static; max-height: none; padding: 1rem 0 0; }
  .docs-menu { display: inline-block; margin: 0 0 0.75rem; }
  .docs-nav { display: none; }
  .docs-nav.open { display: block; }
  .docs-main { padding-top: 1rem; }
  .docs-body .anchor { display: none; }
}
@media print {
  .docs-side, .docs-toc, .docs-pager, .site-head nav, .docs-raw, .copy { display: none !important; }
  .docs-layout { display: block; }
}
