.floating-toc {
  position: fixed;
  z-index: 20;
  top: 132px;
  right: max(20px, calc((100vw - 1492px) / 2));
  width: 220px;
  max-height: calc(100vh - 166px);
  overflow-y: auto;
  padding: 3px 4px 3px 17px;
  border-left: 1px solid #dfe1e6;
  scrollbar-width: thin;
  scrollbar-color: #cbd0da transparent;
}

.floating-toc__title {
  margin-bottom: 8px;
  color: #8a90a0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.floating-toc__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.floating-toc__list li + li {
  margin-top: 2px;
}

.floating-toc__list a {
  position: relative;
  display: block;
  padding: 5px 4px 5px 12px;
  color: #747b8b;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.35;
  text-decoration: none;
  transition: color .15s ease;
}

.floating-toc__list a::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: -18px;
  width: 3px;
  border-radius: 3px;
  background: transparent;
  content: "";
}

.floating-toc__list a:hover {
  color: #343b49;
}

.floating-toc__list a[aria-current="location"] {
  color: #ef476f;
  font-weight: 750;
}

.floating-toc__list a[aria-current="location"]::before {
  background: #ef476f;
}

@media (min-width: 1025px) {
  .article-content {
    width: min(1140px, calc(100% - 392px));
    margin-left: max(136px, calc((100vw - 1260px) / 2));
    margin-right: auto;
  }
}

@media (max-width: 1024px) {
  .floating-toc {
    position: static;
    width: auto;
    max-width: 900px;
    max-height: none;
    margin: 24px auto 4px;
    padding: 14px 17px 15px;
    overflow: visible;
    border: 1px solid #dfe1e6;
    border-left: 4px solid #ef476f;
    border-radius: 10px;
    background: #fff;
  }

  .floating-toc__title {
    margin-bottom: 7px;
  }

  .floating-toc__list a {
    padding-left: 0;
  }

  .floating-toc__list a::before {
    display: none;
  }
}

@media (max-width: 760px) {
  .floating-toc {
    margin-inline: 20px;
  }
}
