/* ─── Table of Contents Widget ────────────────────────────────────────────── */

.hbc-toc-wrap {
	background-color: #ffffff;
	padding: 24px 28px;
}

/* ── Header ── */

.hbc-toc-header {
	border-bottom: 2px solid #e0e0e0;
	padding-bottom: 12px;
	margin-bottom: 18px;
}

.hbc-toc-heading {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	color: #1a1a1a;
	line-height: 1.3;
}

/* ── List ── */

.hbc-toc-list {
	display: flex;
	flex-direction: column;
}

/* ── Item ── */

.hbc-toc-item {
	margin-bottom: 10px;
}

.hbc-toc-item a {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.hbc-toc-item a:hover {
	opacity: 0.7;
}

/* ── Number ── */

.hbc-toc-num {
	font-weight: 500;
	color: #2c3e5a;
	flex-shrink: 0;
}

.hbc-toc-text {
	color: inherit;
}

/* ── Level 1 ── */

.hbc-toc-item--l1 a {
	font-size: 15px;
	font-weight: 500;
	color: #2c3e5a;
}

/* ── Level 2 ── */

.hbc-toc-item--l2 {
	padding-left: 24px;
}

.hbc-toc-item--l2 a {
	font-size: 14px;
	font-weight: 400;
	color: #2c3e5a;
}

/* ── Level 3 ── */

.hbc-toc-item--l3 {
	padding-left: 48px;
}

.hbc-toc-item--l3 a {
	font-size: 13px;
	font-weight: 400;
	color: #2c3e5a;
}

/* ── Responsive ── */

@media (max-width: 767px) {
	.hbc-toc-wrap {
		padding: 18px 20px;
	}

	.hbc-toc-item--l2 {
		padding-left: 18px;
	}

	.hbc-toc-item--l3 {
		padding-left: 36px;
	}
}

/* ─── 页面平滑滚动 + 顶部偏移（避免 fixed 页眉遮住标题）─────────────────── */
html {
	scroll-behavior: smooth;
}

h2[id], h3[id], h4[id], h5[id], h6[id] {
	scroll-margin-top: 100px;
}
