/* Enhanced TOC styling */
.heading-anchor {
  display: inline-block;
  width: 0;
  height: 0;
  overflow: hidden;
  text-indent: -9999px;
}
.toc {
  padding: 1.25rem;
  background-color: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  max-height: 80vh;
  overflow-y: auto;
  border: none !important; /* Remove border */
}

/* Larger Summary title */
.toc h2 {
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  margin-bottom: 0.75rem !important;
  color: #111827;
}

/* Separator between summary and headings */
.toc h2:after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  background-color: #e5e7eb;
  margin: 0.75rem 0 1rem 0;
}

/* Style TOC links to match your theme */
.toc ul {
  list-style: none !important;
  margin-left: 0 !important;
  padding-left: 0.75rem !important;
}

.toc li {
  margin-bottom: 0.5rem;
}

.toc a {
  color: #374151;
  text-decoration: none;
  font-size: 0.95rem;
  display: block;
  padding: 0.25rem 0;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
  padding-left: 0.75rem;
  margin-left: -0.75rem;
}

.toc a:hover {
  color: #f97316; /* Match your theme's accent color */
  border-left: 2px solid #f97316;
  background-color: rgba(249, 115, 22, 0.05);
}

/* Make sure sticky behavior works */
#toc-inner {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 2rem !important;
  z-index: 50 !important;
}

/* Ensure the parent container doesn't affect sticky positioning */
aside {
  contain: none !important;
  overflow: visible !important;
}

