/* TOC+ Show more / Show less — keeps all links in DOM */
#toc_container.toc-collapse-enabled .toc_list {
  max-height: 200px;
  overflow: hidden;
  position: relative;
  transition: max-height 0.25s ease;
}

#toc_container.toc-collapse-enabled.toc-expanded .toc_list {
  max-height: none;
  overflow: visible;
}

#toc_container.toc-collapse-enabled:not(.toc-expanded) .toc_list::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(249, 249, 249, 0), #f9f9f9);
}

#toc_container.toc-collapse-enabled.toc_white:not(.toc-expanded) .toc_list::after {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
}

#toc_container .toc-show-more {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 0;
  background: none;
  border: 0;
  color: #0073aa;
  font-size: 90%;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

#toc_container .toc-show-more:hover,
#toc_container .toc-show-more:focus {
  color: #005177;
}
