/* ==========================================================================
   Table of contents (quick navigation) block
   ========================================================================== */

.toc {
  background: var(--color-surface);
  border-radius: var(--radius-card-sm);
  padding: var(--space-lg);
  margin-top: var(--space-section);
}

.toc__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.75rem;
  color: var(--color-gold);
  font-weight: var(--fw-semibold);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.toc__toggle-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  transition: transform var(--transition-base);
}

.toc[data-open="true"] .toc__toggle-icon {
  transform: rotate(180deg);
}

.toc__panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height var(--transition-base);
}

.toc[data-open="true"] .toc__panel {
  max-height: 1200px;
}

.toc__list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-top: 1rem;
}

.toc__list a {
  display: block;
  color: var(--color-text);
  font-size: 0.9375rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--color-border-subtle);
}

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

.toc__list a:hover,
.toc__list a:focus-visible {
  color: var(--color-gold);
}

/* The TOC stays collapsible/expandable at every breakpoint (toggle button
   and icon remain active on desktop too); only the default open/closed
   state differs by screen size, handled in toc.js. */
