/* Table of contents (templates/components/docs-toc): h2 and h3 links on a
 * thin track, with a marker beside the heading being read. The shell
 * (docs.css) places the column; this styles inside it. */

.docs-toc {
  font-family: var(--d-font);
}

.docs-toc__title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 18px;
  text-transform: uppercase;
  color: var(--d-fg);
}

.docs-toc__list {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--d-line-strong);
}

.docs-toc__marker {
  position: absolute;
  top: 0;
  left: -1px;
  width: 2px;
  height: 0;
  border-radius: 2px;
  background: var(--d-fg);
  opacity: 0;
  transition:
    transform 0.2s ease,
    height 0.2s ease,
    opacity 0.2s ease;
}

.docs-toc__marker.is-visible {
  opacity: 1;
}

.docs-toc__link {
  display: block;
  padding: 5px 0 5px 12px;
  font-size: 13px;
  line-height: 18px;
  color: var(--d-muted);
  text-decoration: none;
  transition: color 0.12s ease;
}

.docs-toc__item--nested .docs-toc__link {
  padding-left: 24px;
}

.docs-toc__link:hover {
  color: var(--d-fg);
}

.docs-toc__link.docs-toc__link--active {
  color: var(--d-fg);
  font-weight: 500;
}

.docs-toc__link:focus-visible {
  outline: 2px solid var(--d-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .docs-toc__marker,
  .docs-toc__link {
    transition: none;
  }
}
