/* A guide page before Unicom opens on it, and without script: Unicom's look (its style.css and unicom.css, loaded first, hold the
   article's own rules) on a page that scrolls like a document. Made by build-docs.py from the plugin's Markdown. */

:root { --ok: #40a02b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ok: #a6e3a1; } }
:root[data-theme="dark"] { --ok: #a6e3a1; }

html:has(body.docs), body.docs { height: auto; }
body.docs { overflow: visible; }
.docs .shell { --side: 268px; height: auto; min-height: 100vh; min-height: 100dvh; align-items: start; }
.docs .side { position: sticky; top: 0; height: 100vh; height: 100dvh; }
.docs .main { overflow: visible; min-height: calc(100vh - 16px); }
.docs .page { height: auto; overflow: visible; }

/* The tree, as Unicom draws its Help group */
.tint-support { --tint: var(--mauve); }
.tint-guide { --tint: var(--lavender); }
.tint-discussions { --tint: var(--ok); }
.agent-mark.support { color: var(--mauve); }
.agent-mark.guide { color: var(--lavender); }
.agent-mark.discussions { color: var(--ok); }
.tree-group .side-title { text-transform: uppercase; letter-spacing: .06em; }
.side-item .agent-mark { margin-right: 4px; }
.side-item.on, .side-tab.on { background: color-mix(in srgb, var(--tint, var(--sub)) 21%, transparent); box-shadow: inset 2.5px 0 0 var(--tint, var(--sub)); color: var(--strong); }
.side-tab.on span { font-weight: 560; }
.side-tab.docs-book { margin-top: 6px; color: var(--text); font-weight: 580; }
.side-tab.docs-book:first-child { margin-top: 0; }
.side-tab.docs-section { height: 25px; padding-left: 20px; color: var(--o2); font-size: 12.5px; }
.side-tab.docs-section:hover { color: var(--text); }

/* Search: the box of the tree, its results over the page */
.docs-find { position: relative; cursor: text; }
.docs-find input { flex: 1; min-width: 0; height: 100%; padding: 0; background: none; border: 0; outline: 0; color: var(--text); font-size: 13.5px; }
.docs-find input::-webkit-search-cancel-button { display: none; }
.docs-find:focus-within { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lavender) 60%, transparent); }
.docs-results {
  position: absolute; z-index: 20; top: 98px; left: 14px; width: min(560px, calc(100vw - 28px)); max-height: min(70vh, 640px); overflow: auto;
  padding: 6px; border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow);
}
.docs-hit { display: grid; gap: 2px; padding: 9px 11px; border-radius: 8px; color: var(--text); }
.docs-hit:hover, .docs-hit.on { background: var(--hover); }
.docs-hit b { color: var(--strong); font-size: 14px; font-weight: 600; }
.docs-hit small { color: var(--o2); font-size: 12px; }
.docs-hit span { color: var(--sub); font-size: 13px; line-height: 1.45; }
.docs-hit mark { padding: 0 1px; border-radius: 3px; color: var(--strong); background: color-mix(in srgb, var(--yellow) 34%, transparent); }
.docs-nothing { padding: 14px; color: var(--o2); text-align: center; }

/* Language and theme, at the foot of the tree. Only the page before Unicom opens (body.docs): Unicom's own menu, which opens
   leftwards inside the tree, keeps its rules. */
.docs .side-foot { gap: 8px; }
.docs .language-menu { position: relative; min-width: 0; }
.docs .language-menu summary {
  display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 8px; border-radius: 8px; color: var(--sub); font-size: 13px;
  list-style: none; cursor: pointer; white-space: nowrap; transition: background 110ms, color 110ms;
}
.docs .language-menu summary::-webkit-details-marker { display: none; }
.docs .language-menu summary:hover, .docs .language-menu[open] summary { background: var(--hover); color: var(--strong); }
.docs .language-menu summary .icon { color: var(--o1); }
.docs .language-list {
  position: absolute; bottom: 36px; left: 0; z-index: 25; display: grid; min-width: 190px; padding: 5px; border-radius: 11px;
  background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow);
}
.docs .language-list a { display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 9px; border-radius: 7px; color: var(--text); font-size: 13.5px; }
.docs .language-list a:hover { background: var(--hover); color: var(--strong); }
.docs .language-list a[aria-current] { color: var(--strong); font-weight: 600; background: color-mix(in srgb, var(--lavender) 16%, transparent); }
/* The flags here and on the language chooser at /docs/, which loads no unicom.css */
.flag { flex: none; display: block; border-radius: 2.5px; box-shadow: 0 0 0 1px var(--line); overflow: hidden; }

/* The language chooser at /docs/, for a reader without script */
.docs-chooser { max-width: 420px; margin: 12vh auto; padding: 24px; }
.docs-chooser h1 { margin-bottom: 18px; font-size: 24px; }
.docs-chooser ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.docs-chooser a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; color: var(--text); font-size: 15px; box-shadow: inset 0 0 0 1px var(--line); }
.docs-chooser a:hover { background: var(--hover); }

@media (max-width: 860px) {
  .docs .shell { min-height: 100vh; }
  .docs .side { position: fixed; height: auto; }     /* Unicom's drawer, as on its own pages */
  .docs .top-bar { position: sticky; top: 0; z-index: 10; background: var(--crust); }
  .docs .main { min-height: auto; }
  .docs-results { position: fixed; top: 112px; left: 8px; right: 8px; width: auto; }
  .docs-body h2 { font-size: 18px; }
  .docs-pager { flex-direction: column; }
  .docs-pager a { max-width: none; }
  .side-scrim[hidden] { display: none; }
}

/* The theme button shows the theme in force: automatic (no data-theme, the system's), light or dark (docs.js). */
[data-theme-toggle] [data-shows] { display: none; }
:root:not([data-theme]) [data-theme-toggle] [data-shows="auto"],
:root[data-theme="light"] [data-theme-toggle] [data-shows="light"],
:root[data-theme="dark"] [data-theme-toggle] [data-shows="dark"] { display: contents; }
