#toc {
  position: fixed;
  top: 105px;
  right: 25px;
  width: 24px;
  height: 24px;
  color: #fff;
  background-color: #fff;
  z-index: 999;
  border-radius: 4px;
  overflow: hidden;
  font-size: 12px;
  transition: width 0.5s, height 0.5s;
}
#toc.toc {
  display: block;
}
#toc.toc.disabled {
  display: none;
}
#toc.expand {
  width: fit-content;
  height: fit-content;
}
#toc .control {
  position: relative;
  width: 100%;
  height: 24px;
  box-sizing: border-box;
  background: #409eff;
  transition: 0.5s;
  border: 1px dashed #409eff;
}
#toc.expand .control {
  cursor: move;
}
#toc .control .icon {
  position: absolute;
  display: block;
  width: 16px;
  height: 16px;
  right: 2px;
  top: 2px;
  transition: 0.5s;
  cursor: pointer;
}
#toc .control .icon svg {
  float: right;
}
#toc .content {
  width: fit-content;
  height: fit-content;
  padding: 10px;
  max-height: 80vh;
  overflow-y: scroll;
}
#toc ul,
#toc li {
  margin: 0;
  padding: 0;
}
.toc ul {
  padding-top: 4px;
}
#toc ul ul {
  padding-left: 8px;
}
.toc li {
  list-style: none;
  padding: 0 10px;
  line-height: 24px;
}
.toc li a {
  cursor: pointer;
  color: #444;
}
.toc li.active > a {
  color: #409eff;
}

#toc .content::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background-color: #fff;
}
#toc .content::-webkit-scrollbar-track {
  display: none;
}
#toc .content::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background-color: #dddfe1;
}
#toc .content::-webkit-scrollbar-button {
  display: none;
}

/* dark */
#toc.dark {
  background-color: #181a1b;
  .control {
    background-color: transparent;
    border: 1px dashed #f59794;
  }
  li a {
    color: #bbb;
  }
}
#toc.dark .control {
  background-color: transparent;
  border: 1px dashed #f59794;
}
#toc.dark .content::-webkit-scrollbar {
  background-color: #181a1b;
}
#toc.dark .content::-webkit-scrollbar-thumb {
  background-color: #555;
}
#toc.dark li a {
  color: #bbb;
}
#toc.dark li.active > a {
  color: #fff;
}
