/* Draws the site navigation as the product's sidebar: a search field and the numbered landing sections, the manual among them; the manual's chapters and subsections appear only as search results. */

.side{display:none}
@media (min-width:1100px){
  .side{display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0;z-index:7;width:var(--side-w);background:var(--ink2);border-right:1px solid var(--line);font-size:13px;overflow-y:auto;scrollbar-width:thin}
  .shell{margin-left:var(--side-w)}
}
.side-head{display:flex;align-items:center;justify-content:space-between;height:var(--top-h);flex:none;padding:0 12px 0 16px}
/* The search field: typing filters the tree below in place. */
.side-search{position:relative;display:flex;align-items:center;flex:none;margin:2px 12px 10px}
.side-search .ic{position:absolute;left:9px;width:14px;height:14px;color:var(--dim);pointer-events:none}
.side-search input{all:unset;box-sizing:border-box;width:100%;height:30px;padding:0 44px 0 30px;border:1px solid var(--line2);border-radius:5px;background:var(--well);font:13px var(--sans);color:var(--tx)}
.side-search input::placeholder{color:var(--ph)}
.side-search input:focus{border-color:var(--hi)}
.side-search input::-webkit-search-cancel-button{display:none}
.side-search kbd{position:absolute;right:7px;padding:1px 5px;border:1px solid var(--kbd-line);border-radius:3px;background:var(--kbd-bg);font:11px var(--sans);color:var(--dim);pointer-events:none}
.side-search input:focus+kbd,.side-search input:not(:placeholder-shown)+kbd{display:none}

/* The tree: two groups under quiet headers, one row per section; a manual chapter shows its subsections while it is being read. */
.tree-sec{padding:0 8px 12px}
.tree-sec a{display:flex;align-items:center;gap:10px;min-width:0;height:28px;padding:0 8px;border-radius:4px;color:var(--tx);white-space:nowrap}
.tree-sec a:hover{background:var(--ink3);text-decoration:none}
.tree-sec a.on{background:var(--row-on);color:var(--on)}
.tree-sec a span.t{overflow:hidden;text-overflow:ellipsis}
.tree-sec a.tree-h{height:24px;margin-top:14px;font:600 11px var(--sans);letter-spacing:.07em;text-transform:uppercase;color:var(--dim)}
.tree-sec a.tree-h:first-child{margin-top:0}
.tree-sec a.tree-h.on{background:none;color:var(--strong)}
.tree-sec .no{flex:none;min-width:1.6em;font:11.5px var(--mono);color:var(--faint)}
.tree-sec a.on .no{color:var(--soft-fg)}
.tree-sec summary{display:flex;align-items:center;list-style:none;cursor:pointer;border-radius:4px}
.tree-sec summary::-webkit-details-marker{display:none}
.tree-sec summary:focus-visible{outline:1px solid var(--hi);outline-offset:-1px}
.tree-sec summary>a{flex:1}
.tree-sec .tw{flex:none;width:20px;height:20px;margin-left:-22px;padding:4px;border-radius:3px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;color:var(--faint);opacity:0;transition:transform .15s,opacity .15s}
.tree-sec summary:hover .tw,.tree-sec details[open]>summary>.tw{opacity:1}
.tree-sec .tw:hover{background:var(--hover);color:var(--strong)}
.tree-sec details[open]>summary>.tw{transform:rotate(90deg)}
.tree-sec a.sub{position:relative;height:26px;margin-left:calc(1.6em + 8px);padding-left:12px;color:var(--dim);font-size:12.5px}
.tree-sec a.sub::before{content:"";position:absolute;left:0;top:3px;bottom:3px;border-left:1px solid var(--guide)}
.tree-sec a.sub.on{color:var(--on)}
.tree-sec a.sub.on::before{border-color:var(--hi)}
.tree-sec details[open]{padding-bottom:4px}
/* The manual's chapters are listed by the reader's own Outline, so the tree shows them only as search results. */
.tree-sec:not(.searching) .in-man{display:none}
/* While searching, only the rows that match show; a chapter stays as the heading of its matching subsections. */
.tree-sec.searching .miss{display:none}
.tree-sec.searching .ctx>summary>a{color:var(--dim)}
.tree-sec.searching .tw{display:none}
.tree-none{margin:10px 8px;font-size:12.5px;line-height:1.5;color:var(--dim)}
/* File-type badges, in the product's file colours. */
.ft{flex:none;width:22px;font:700 8.5px/1 var(--mono);letter-spacing:.02em;color:var(--c,var(--file-ref))}
.side-foot{margin-top:auto;padding:10px 8px 12px;border-top:1px solid var(--line);display:grid;gap:1px}
.side-foot a{display:flex;align-items:center;gap:9px;height:28px;padding:0 10px;border-radius:4px;color:var(--dim)}
.side-foot a:hover{background:var(--ink3);color:var(--tx);text-decoration:none}
.side-foot .heart{color:var(--heart)}

/* The top bar's button collapses the sidebar and brings it back; collapsed, the page takes the full width and the top bar names the section. */
.side-tg{display:none}
@media (min-width:1100px){
  .side{transition:transform .2s,visibility 0s}
  .shell{transition:margin-left .2s}
  .side-tg{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;flex:none;width:28px;height:28px;margin-left:-8px;border-radius:4px;color:var(--dim);cursor:pointer}
  .side-tg:hover{background:var(--hover);color:var(--strong)}
  .side-tg:focus-visible{outline:1px solid var(--hi);outline-offset:-1px}
  .side-tg svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.3}
  html.side-off .side{transform:translateX(-100%);visibility:hidden;transition:transform .2s,visibility 0s .2s}
  html.side-off .shell{margin-left:0}
}
@media (prefers-reduced-motion:reduce){.side,.shell{transition:none!important}}
/* With a subsection current, the chapter keeps only its colour, so one row is lit. */
.tree-sec details:has(a.sub.on)>summary>a.on{background:none;color:var(--strong)}
