.toc {
  width: max-content;
  max-width: 100%;
  background: var(--semi-color-fill-1);
  border-radius: 0.5rem;
  opacity: 0.75;

  &.visible {
    padding: 0.75rem;
    margin: 0.75em 0;
  }

  .list {
    padding: 0;
    margin: 0 0 12px;
    list-style: none;

    &::before {
      display: block;
      font-size: 0.75rem;
      font-weight: 700;
      letter-spacing: 0.025rem;
      text-transform: uppercase;
      content: '目录';
      opacity: 0.5;
    }
  }

  .item {
    a:hover {
      opacity: 0.5;
    }

    &--3 {
      padding-left: 1rem;
    }

    &--4 {
      padding-left: 2rem;
    }

    &--5 {
      padding-left: 3rem;
    }

    &--6 {
      padding-left: 4rem;
    }
  }
}
