.cd-toc-page {
  margin-top: -0.25rem;

  & li {
    position: relative;
    display: flex;
    align-items: center;
  }

  & li::after {
    content: "";
    display: block;
    position: absolute;
    inset: 0;
    background-color: var(--cd-color-accent-fg);
    border-radius: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    z-index: -1;
  }

  & li:has(a.active)::after {
    opacity: 0.15;
  }

  & a {
    display: flex;
    align-items: center;
    color: rgb(82 82 91);
    padding: 0.3rem 0 0.3rem 0.5rem;
  }
  & a:hover:not(.active) {
    & span {
      text-decoration: underline;
    }
  }

  & li.indent-0 a {
    padding-left: 0rem;
    font-size: smaller;
    text-transform: uppercase;
    font-weight: bold;
    border-bottom-width: 1px;
  }
  & li.indent-1 a {
    padding-left: 0rem;
    font-weight: bold;
  }
  & li.indent-2 a { padding-left: 1rem; }
  & li.indent-3 a { padding-left: 1.5rem; }
  & li.indent-4 a { padding-left: 2rem; }
  & li.indent-5 a { padding-left: 2.5rem; }
  & li.indent-6 a { padding-left: 3rem; }

  & li a::before {
    content: "";
    display: inline-flex;
    align-items: center;
    justify-content: right;
    line-height: 1;
    height: 8px;
    width: 8px;
    margin: 0 0.5rem 0 0.5rem;
    flex-grow: 0;
    flex-shrink: 0;
  }
  li.indent-2 a::before { content: "○" }
  li.indent-3 a::before { content: "•" }
  li.indent-4 a::before { content: "·" }
  li.indent-5 a::before { content: "⁃" }
  li.indent-6 a::before { content: "·" }

  & li a.active::before {
    content: "";
    border-radius: 3px;
    background-color: var(--cd-color-accent-fg);
  }
}
