.toc {
  padding-block: var(--space-lg) 0;
}

.toc__box {
  background: var(--color-bg-dark);
  border-radius: var(--radius-card);
  padding: var(--space-md) var(--space-card-padding);
}

.toc__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: var(--space-sm);
}

.toc__title {
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-semibold);
  color: var(--color-heading-gold);
}

.toc__arrow {
  color: var(--color-accent-yellow);
  flex-shrink: 0;
  transition: transform var(--transition-base);
}

.toc__toggle[aria-expanded="true"] .toc__arrow {
  transform: rotate(180deg);
}

.toc__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  margin-top: var(--space-sm);
}

.toc__list[hidden] {
  display: none;
}

.toc__list li {
  border-bottom: 1px solid var(--color-border-subtle);
}

.toc__list li:last-child {
  border-bottom: none;
}

.toc__list a {
  display: block;
  padding: var(--space-2xs) 0;
  font-size: var(--font-size-small);
  color: var(--color-text-primary);
}

.toc__list a:hover {
  color: var(--color-accent-yellow);
}
