/* MotorHub — in-article table of contents */

.mh-toc {
  margin: 0 0 1.35rem;
  max-width: var(--mh-text-measure, 48rem);
}

.mh-toc__details {
  border: 1px solid rgba(127, 127, 127, 0.28);
  border-radius: 10px;
  background: rgba(127, 127, 127, 0.06);
  padding: 0.35rem 0.85rem 0.55rem;
}

.mh-toc__summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  list-style: none;
  padding: 0.45rem 0;
}

.mh-toc__summary::-webkit-details-marker {
  display: none;
}

.mh-toc__summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.45rem;
  color: var(--mh-accent, #f87800);
  transition: transform 0.15s ease;
}

.mh-toc__details[open] > .mh-toc__summary::before {
  transform: rotate(90deg);
}

.mh-toc__list {
  margin: 0 0 0.35rem;
  padding: 0 0 0 1.15rem;
}

.mh-toc__item {
  margin: 0.28rem 0;
  line-height: 1.4;
}

.mh-toc__item--h3 {
  margin-left: 0.85rem;
  font-size: 0.92em;
}

.mh-toc__link {
  text-decoration: none;
  color: inherit;
}

.mh-toc__link:hover,
.mh-toc__link:focus-visible {
  color: var(--mh-accent, #f87800);
  text-decoration: underline;
}

html[data-mh-theme="light"] .mh-toc__details {
  background: #f4f6f8;
  border-color: rgba(0, 0, 0, 0.1);
}

@media (prefers-reduced-motion: reduce) {
  .mh-toc__summary::before {
    transition: none;
  }
}
