.toc {
  position: relative;
}

@media (min-width: 992px) {
  .toc {
    display: flex;
    justify-content: center;
  }

  .toc__container {
    width: calc(100%/12*8);
    padding-left: 1.9444rem;
    padding-right: 1.9444rem;
  }
}

@media (min-width: 1024px) {
  .toc {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    /* margin-right: -5rem; */
    /* width: max(17rem, min(20vw, 22rem)); */
    width: 20rem;
  }

  .toc__container {
    position: sticky;
    top: 5rem;
    width:100%;
    padding-left: 0;
    padding-right: 0;
  }
}

@media (min-width: 160px) {
  .toc {
    margin-right: -1rem;
  }
}

.toc__title {
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
}

@media (min-width: 1024px) {
  .toc__nav {
    max-height: 80vh;
    overflow-y: auto;
  }
}

.toc .toc__nav ol {
  max-width: max-content;
  padding-left: 0;
  margin-bottom: 0;
}

.toc .toc__item {
  padding: 0.2rem 1rem 0.2rem 3rem;
  margin-bottom: 0;
  transition: background-color 0.2s ease;
}

.toc .toc__item:before {
  right: calc(100% - 3rem);
  padding-top: 0.35rem;
  /* color: black; */
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.toc__item.active {
  background-color: #DCDFEC;
}

.toc .toc__item.active:is(:hover) {
  background-color: #294aff;
}

.toc__item a {
  color: black;
  font-size: 0.9rem;
  line-height: 1;
  text-decoration: none;
  transition: color 0.2s ease;
}

.toc__item a:is(:focus, :hover) {
  text-decoration: none;
}

.toc .toc__item.active:is(:hover) a,
.toc .toc__item.active:is(:hover):before {
  color: white;
}