/* codejs-toc.css — TOC styles, loaded by codejs-toc.php (v1.7.0+). */
/* TOC defaults — minimal/transparent. The post-body grid layout in
   codejs-postbody.php overrides padding for the sidebar variant; on
   pages without that layout, the TOC inherits these defaults. */
.codejs-toc {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  color: #fff;
  box-shadow: none;
}
.codejs-toc-title {
  font-size: 0.82em;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
.codejs-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: block;
}
.codejs-toc-item {
  font-size: 15px;
  line-height: 1.45;
  margin: 0 0 10px;
}
.codejs-toc-item a {
  display: block;
  padding: 14px 18px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  border-radius: 10px;
  transition: color 0.15s, background 0.15s;
}
.codejs-toc-item a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
/* Active heading — full purple block, bold white text, matches reference */
.codejs-toc-item.is-active > a {
  color: #fff !important;
  background: rgba(168, 85, 247, 0.45) !important;
  font-weight: 700 !important;
}
.codejs-toc-sub a { padding-left: 30px !important; font-size: 14px; color: rgba(255, 255, 255, 0.52); }
@media (max-width: 720px) {
  .codejs-toc-item { font-size: 15px; }
  .codejs-toc-item a { padding: 14px 16px; }
}

/* Anchor offset so the header doesn't cover the heading when jumping */
body.single-post h2[id],
body.single-post h3[id] {
  scroll-margin-top: 84px;
}
/* Smooth scrolling for any in-page anchor click (TOC, heading anchors, etc.) */
html { scroll-behavior: smooth; }
