/* The side contents and the tabs of a page (nav() in engine.js), shared with the site's sales page
   (public/web/landing.html), which draws the same list from its own sections. It uses the tokens of engine.css; a
   page without engine.css (the landing) defines the ones it needs. The plugin and the HTML export join it to
   engine.css. */
/* side contents and tabs (nav() in engine.js) */
section.blk {
  scroll-margin-top: 20px;
}
#toc {
  display: none;
  position: fixed;
  left: 20px;
  top: 28px;
  bottom: 24px;
  width: 220px;
  overflow-y: auto;
  font-size: 13.5px;
  font-family: var(--ui-font);
  z-index: 20;
  scrollbar-width: thin;
}
body.hastoc #toc {
  display: block;
}
#toc .tsw {
  display: flex;
  gap: 4px;
  margin: 0 0 14px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: max(0px, calc(var(--radius) - 3px));
}
#toc .tsw button {
  flex: 1;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--dim);
  font: inherit;
  font-size: 12.5px;
  padding: 5px 0;
  cursor: pointer;
}
#toc .tsw button.on {
  background: var(--accent-bg);
  color: var(--accent);
}
#toc .tsw button.tfold {
  flex: 0 0 28px;
  font-size: 14px;
}
#toc .tsw button.tfold:hover {
  color: var(--ink);
}
#toc a {
  display: block;
  color: var(--dim);
  text-decoration: none;
  padding: 5px 10px;
  line-height: 1.35;
  border-left: 2px solid var(--line);
}
#toc a:hover {
  color: var(--ink);
}
#toc a.tl.on {
  color: var(--ink);
  border-left-color: var(--accent);
}
#toc .tsub {
  display: none;
  margin-bottom: 4px;
}
#toc .tsub.on {
  display: block;
}
#toc a.th {
  font-size: 12.5px;
  padding: 3px 10px 3px 22px;
}
#tocbtn {
  display: none;
}
.tabstrip {
  display: none;
}
body.tabs section.blk.off {
  display: none;
}
body.tabs .part {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
@media (min-width: 1300px) {
  body.hastoc {
    padding-left: calc(270px * var(--space));
  }
  body.hastoc.tocshut {
    padding-left: calc(48px * var(--space));
  }
  body.hastoc.tocshut #toc {
    display: none;
  }
  body.hastoc.tocshut #tocbtn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    left: 14px;
    top: 28px;
    z-index: 21;
    width: 32px;
    height: 32px;
    border-radius: max(0px, calc(var(--radius) - 4px));
    background: none;
    border: 1px solid var(--line);
    color: var(--dim);
    font-size: 16px;
    cursor: pointer;
  }
  body.hastoc.tocshut #tocbtn:hover {
    color: var(--ink);
  }
}
@media (max-width: 1299px) {
  #toc .tsw button.tfold {
    display: none;
  }
  body.hastoc #toc {
    display: none;
    top: auto;
    bottom: 64px;
    max-height: calc(100vh - 90px);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--lift-shadow);
  }
  body.hastoc.tocopen #toc {
    display: block;
  }
  body.hastoc #tocbtn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 21;
    width: 40px;
    height: 40px;
    border-radius: var(--pill);
    background: var(--btn);
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 18px;
    cursor: pointer;
    box-shadow: var(--float-shadow);
  }
  body.tabs .tabstrip {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg);
    padding: 10px 0;
    margin: -10px 0 18px;
  }
  .tabstrip button {
    white-space: nowrap;
    background: var(--btn);
    border: 1px solid var(--line);
    color: var(--dim);
    border-radius: var(--pill);
    padding: 6px 12px;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
  }
  .tabstrip button.on {
    background: var(--accent-bg);
    border-color: var(--accent-line);
    color: var(--accent);
  }
}
