
.docs-toc-mobile {
  display: none;
  margin-bottom: var(--sp-space-6);
}

@media (max-width: 1200px) {
  .docs-toc-mobile {
    display: block;
  }
}

.toc-mobile-details {
  border: 1px solid var(--sp-color-border);
  border-radius: var(--sp-corners-md);
  background: var(--sp-color-surface);
}

.toc-mobile-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-space-2) var(--sp-space-4);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.toc-mobile-summary::marker {
  display: none;
}

.toc-mobile-label {
  font-family: var(--sp-font-heading);
  font-size: var(--sp-text-sm);
  font-weight: var(--sp-font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--sp-tracking-wide);
  color: var(--sp-color-text-secondary);
}

.toc-mobile-chevron {
  transition: transform var(--sp-duration-fast) var(--sp-ease-default);
  color: var(--sp-color-text-secondary);
}

.toc-mobile-details[open] .toc-mobile-chevron {
  transform: rotate(180deg);
}

.toc-mobile-nav {
  padding: 0 var(--sp-space-4) var(--sp-space-4);
  border-top: 1px solid var(--sp-color-border);
  max-height: 50vh;
  overflow-y: auto;
}

.toc-content--mobile ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-content--mobile li {
  margin: 0;
}

.toc-content--mobile a {
  display: block;
  padding: var(--sp-space-2) 0;
  padding-left: var(--sp-space-3);
  color: var(--sp-color-text-secondary);
  text-decoration: none;
  font-size: var(--sp-text-sm);
  line-height: var(--sp-leading-normal);
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: color var(--sp-duration-fast) var(--sp-ease-default);
}

.toc-content--mobile a:hover {
  color: var(--sp-color-text-primary);
  border-left-color: var(--sp-color-text-primary);
}

.toc-content--mobile a.active {
  color: var(--sp-color-primary);
  border-left-color: var(--sp-color-primary);
}

.toc-content--mobile ul ul {
  padding-left: var(--sp-space-5);
}

.toc-content--mobile ul ul a {
  font-size: var(--sp-text-sm);
  padding-top: var(--sp-space-1);
  padding-bottom: var(--sp-space-1);
}

@media (prefers-reduced-motion: reduce) {
  .toc-mobile-chevron,
  .toc-content--mobile a {
    transition: none;
  }
}
