.post-floating-toc-container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 60px;
  box-sizing: border-box;
}

.post-floating-toc {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
}

.post-floating-toc__title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.post-floating-toc__list {
  counter-reset: toc-item;
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.post-floating-toc__list ol {
  counter-reset: toc-item;
  margin: 6px 0 0 1.4em;
  padding-left: 0;
}

.post-floating-toc__item {
  margin: 6px 0;
  counter-increment: toc-item;
}

.post-floating-toc__link,
.post-floating-toc__link:visited,
.post-floating-toc__link:active,
.post-floating-toc__link:focus-visible {
  display: inline-block;
  position: relative;
  padding-left: 2.6em;
  color: #aaaaaa;
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-floating-toc__link::before {
  content: counters(toc-item, ".");
  color: currentColor;
  font-variant-numeric: tabular-nums;
  position: absolute;
  left: 0;
  width: 2.2em;
  text-align: right;
}

.post-floating-toc__item > .post-floating-toc__list {
  margin-left: 0.6em;
}

.post-floating-toc__link:hover,
.post-floating-toc__link:focus-visible {
  color: #276ef1;
  text-decoration: underline;
}

.post-floating-toc__link.is-active,
.post-floating-toc__link.is-active:visited,
.post-floating-toc__link.is-active:active,
.post-floating-toc__link.is-active:focus-visible {
  color: #ffffff;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.post-floating-toc-container--floating {
  position: fixed;
  z-index: 900;
  margin: 0;
  padding: 0;
  max-width: none;
  width: auto;
}

.post-floating-toc-container--floating .post-floating-toc {
  width: min(280px, 22vw);
  max-height: calc(
    100vh - var(--site-header-height) - var(--admin-bar-height) - 32px
  );
  overflow: auto;
  padding: 0;
}

@media (max-width: 1479px) {
  .post-floating-toc__item::before {
    left: -0.2em;
  }
}

@media (max-width: 570px) {
  .post-floating-toc-container {
    margin-bottom: 40px;
  }

  .post-floating-toc {
    margin-bottom: 40px;
  }
}
