/* WordPress Easy TOC 风格：文章目录 */
.demo-toc,
#demo-toc-container {
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  background: #f8f9fa;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.demo-toc-title-row,
.ez-toc-title-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
}

.demo-toc-title,
.ez-toc-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
  color: #1a1a1a;
}

.demo-toc-toggle,
.ez-toc-toggle {
  flex-shrink: 0;
  padding: 0.25rem 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  background: #fff;
  color: #333;
  font-size: 0.8125rem;
  cursor: pointer;
  line-height: 1.5;
}

.demo-toc-toggle:hover,
.ez-toc-toggle:hover {
  background: #eef1f4;
}

.demo-toc-list,
.ez-toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.demo-toc-list .demo-toc-list,
.ez-toc-list .ez-toc-list {
  margin: 0.35rem 0 0.35rem 1rem;
  padding: 0;
}

.demo-toc-item,
.ez-toc-page-1 {
  margin: 0.35rem 0;
  line-height: 1.5;
}

.demo-toc-link,
.ez-toc-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  color: #2563eb;
  text-decoration: none;
  font-size: 0.9375rem;
}

.demo-toc-link:hover,
.ez-toc-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.demo-toc-counter,
.ez-toc-counter {
  display: inline-block;
  min-width: 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
}

.entry-content .article-content h2[id],
.entry-content .article-content h3[id],
.entry-content .article-content h4[id] {
  scroll-margin-top: 80px;
}

.blog-details-full .entry-content > .demo-toc:first-child {
  margin-top: 0;
}

.blog-details-full .post-auth + .demo-toc,
.blog-details-full .post-auth + #demo-toc-container {
  margin: 0 0 1.5rem;
}
