.toc-wrapper {
  background: #f9f9f9;
  border: 1px solid #ddd;
  padding: 1em;
  font-family: sans-serif;
  max-width: 100%;
}
.toc-title {
  font-weight: bold;
  display: block;
  margin-bottom: 0.5em;
}
.toc-list,
.toc-sublist {
  list-style: none;
  padding-left: 1em;
  margin: 0;
}
.toc-item {
  margin-bottom: 0.2em;
  position: relative;
}
.toc-item a {
  text-decoration: none;
  color: #333;
  display: flex;
  align-items: center;
}
.arrow {
	 cursor: pointer;
  display: inline-block;
  width: 0;
  height: 0;
  margin-right: 6px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #333;
  transition: transform 0.2s;
}


.has-children .arrow {
  margin-right: 6px;
}
.has-children .arrow.open {
  transform: rotate(180deg);
}

.toc-collapsed-wrapper {
    border: 1px solid #ddd;
    margin: 10px 0;
    font-size: 14px;
}

.toc-collapsed-header {
    cursor: pointer;
    background: #f9f9f9;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
	padding: 6px 10px;
    font-size: 14px;
}

.toc-collapsed-header .arrow {
    display: inline-block;
    width: 0; 
    height: 0; 
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #333;
    transition: transform 0.2s ease;
}

.toc-collapsed-header.expanded .arrow {
    transform: rotate(180deg);
}

.toc-collapsed-body {
    background-color: #fff;
	padding: 5px 10px;
    max-height: 210px; 
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px; 
}

.toc-collapsed-body:hover {
    scroll-behavior: smooth;
}

.toc-collapsed-body::-webkit-scrollbar {
    width: 6px;
}
.toc-collapsed-body::-webkit-scrollbar-thumb {
    background-color: #aaa;
    border-radius: 3px;
}
.toc-collapsed-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.toc-collapsed-body .toc-title {
    display: none;
}

