%expanding-nav {
  $block-padding: 1.75rem;
  background-color: var(--grey-100);

  &[open] {
    padding-bottom: 1.5rem;
  }

  &__summary {
    align-items: center;
    background-color: var(--grey-100);
    cursor: pointer;
    list-style: none;
    padding: 1rem $block-padding;

    // Chrome/Webkit needs this non-standard selector
    &::-webkit-details-marker {
      display: none;
    }
  }

  &__title {
    display: inline-block;
    width: calc(100% - 2rem);
  }

  &__nav {
    margin-top: 0.75rem;
    padding-left: $block-padding;
    padding-right: $block-padding;
  }

  &--expand {
    display: inline-block;
    transform: scale(0.75);
  }

  &__link {
    display: inline-block;
    width: 100%;

    &[data-active] {
      position: relative;
      z-index: 1;

      &::after {
        background-color: var(--bkg);
        border-left: 4px solid var(--blue-700);
        content: '';
        height: calc(100% + var(--padding) * 2);
        position: absolute;
        top: calc(var(--padding) * -1);
        z-index: -1;
      }
    }
  }

  // Need to use tags selectors because ToC plugin doesn't allow for class customization
  ol,
  ul {
    list-style: none;

    ol,
    ul {
      margin-top: 0.75rem;
      padding-left: 1rem;
    }
  }

  li + li {
    margin-top: 1rem;
  }
}
