.toc-col {
  order: 2;
  width: var(--toc-width, 280px);
  position: sticky;
  top: var(--toc-top, 88px);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.toc-sidebar {
  order: 2;
  width: var(--toc-width, 280px);
  position: sticky;
  top: var(--toc-top, 88px);
  max-height: var(--toc-sidebar-max-height, 60vh);
  overflow: hidden;
  align-self: start;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(181, 193, 239, 0.4);
  border-radius: var(--radius);
  padding: var(--space-3xl) 22px;
  box-shadow: 0 10px 28px rgba(47,73,179,0.08);
  backdrop-filter: blur(10px);
  margin-bottom: var(--toc-margin-bottom, 20px);
}

.toc-col .toc-sidebar {
  order: initial;
  width: 100%;
  position: relative;
  top: auto;
  align-self: stretch;
}

.toc-sidebar-compact {
  --toc-width: 280px;
  --toc-top: 88px;
  --toc-link-line-height: 1.75;
}

.toc-title {
  font-size: var(--text-eyebrow-size);
  font-weight: var(--font-weight-bold);
  color: var(--gray-500);
  letter-spacing: var(--letter-spacing-eyebrow);
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
  padding-left: 12px;
  border-left: 3px solid rgba(47,73,179,0.7);
}

.toc-list {
  list-style: none;
  max-height: var(--toc-list-max-height, calc(var(--toc-sidebar-max-height, 60vh) - 72px));
  overflow-y: auto;
  padding-bottom: var(--space-3xl);
  scrollbar-width: thin;
  scrollbar-color: var(--gray-200) transparent;
}

.toc-list::-webkit-scrollbar { width: 4px; }
.toc-list::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: var(--radius-sm); }
.toc-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}
.toc-list li + li { margin-top: 2px; }

.toc-list a,
.toc-sidebar .toc-list a {
  flex: 1;
  font-size: var(--text-ui-size);
  color: var(--gray-500);
  text-decoration: none;
  text-decoration-color: transparent;
  display: block;
  padding: 6px 12px;
  border-left: 3px solid rgba(181, 193, 239, 0.42);
  transition: var(--transition-all-fast);
  font-weight: var(--font-weight-medium);
  line-height: var(--toc-link-line-height, 1.75);
}

.toc-list a:hover,
.toc-sidebar .toc-list a:hover {
  border-left-color: rgba(47,73,179,0.6);
  color: var(--accent-color-text);
  background: rgba(47,73,179,0.04);
  text-decoration: none;
}
.toc-list a.active,
.toc-sidebar .toc-list a.active {
  border-left-color: rgba(47,73,179,0.82);
  color: #3A4268;
  font-weight: var(--font-weight-semibold);
  background: rgba(47,73,179,0.09);
  text-decoration: none;
}
.toc-list a.toc-h2,
.toc-sidebar .toc-list a.toc-h2 { color: var(--gray-500); }
.toc-list a.toc-h3,
.toc-sidebar .toc-list a.toc-h3 {
  padding-left: 22px;
  font-size: var(--text-caption-size);
  color: var(--gray-300);
}
.toc-list a.toc-h3:hover,
.toc-sidebar .toc-list a.toc-h3:hover {
  border-left-color: rgba(47,73,179,0.6);
  color: var(--accent-color-text);
}

.toc-sidebar::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 0;
  left: 1px;
  height: var(--space-3xl);
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.9) 58%, rgba(255,255,255,0.98));
  border-radius: 0 0 var(--radius) var(--radius);
  pointer-events: none;
}

.toc-promo {
  background: #fff;
  border: 1.5px solid var(--accent-color-border);
  border-top: 3px solid var(--accent-orange-border);
  border-radius: var(--radius-xl);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.toc-promo-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-badge-size);
  font-weight: var(--font-weight-bold);
  color: var(--accent-orange-text);
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.toc-promo-price {
  font-size: var(--text-promo-price-size);
  font-weight: var(--font-weight-extrabold);
  color: var(--gray-800);
  line-height: var(--line-height-heading);
  margin-bottom: 6px;
  letter-spacing: var(--letter-spacing-none);
}

.toc-promo-sub {
  font-size: var(--text-caption-size);
  color: var(--gray-500);
  line-height: var(--line-height-caption);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.toc-promo-tag {
  display: inline-flex;
  align-items: center;
  background: var(--accent-color-soft);
  color: var(--accent-color-text);
  font-size: var(--text-badge-size);
  font-weight: var(--font-weight-bold);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.toc-promo-cta {
  display: block;
  text-align: center;
  background: var(--accent-color-soft);
  color: var(--accent-color-text);
  font-family: 'Poppins', sans-serif;
  font-weight: var(--font-weight-bold);
  font-size: var(--text-button-size);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  text-decoration: none;
  border: var(--border-blue-muted);
  transition: var(--transition-bg-border);
}

.toc-promo-cta:hover {
  background: #d0d9f7;
  border-color: var(--accent-color-border);
}

@media (max-width: 1024px) {
  .toc-sidebar,
  .toc-col {
    display: none;
  }
}
