.as-toc {
	--as-toc-accent: #5aa9ff;
	position: relative;
	font-family: 'Yekan', 'Vazirmatn', Tahoma, sans-serif;
	background: #fff;
	border: 1px solid #edf0f3;
	border-radius: 14px;
	box-shadow: 0 2px 6px rgba(20,20,43,.04), 0 14px 32px -22px rgba(20,20,43,.18);
	overflow: hidden;
	max-width: 460px;
}

.as-toc-progress {
	position: absolute;
	inset-inline-start: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: #f0f2f5;
}

.as-toc-progress-bar {
	display: block;
	width: 100%;
	height: 0%;
	background: linear-gradient(180deg, var(--as-toc-accent), #4ee08a);
	transition: height .15s linear;
}

.as-toc-head {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 10px;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 16px 18px 16px 16px;
	font-family: inherit;
	text-align: start;
}

.as-toc[data-collapsible="0"] .as-toc-head { cursor: default; }

.as-toc-head-icon { font-size: 15px; }

.as-toc-head-title {
	flex: 1;
	font-size: 15px;
	font-weight: 700;
	color: #1a1d24;
}

.as-toc-head-chevron {
	color: #9aa3af;
	font-size: 16px;
	transition: transform .2s ease;
}

.as-toc.is-open .as-toc-head-chevron { transform: rotate(180deg); }

.as-toc-body {
	max-height: 0;
	overflow: hidden;
	transition: max-height .25s ease;
}

.as-toc.is-open .as-toc-body {
	max-height: 1400px;
}

.as-toc-list,
.as-toc-list ol {
	list-style: none;
	margin: 0;
	padding: 0 18px 16px;
}

.as-toc-list ol {
	padding-inline-start: 18px;
	padding-bottom: 0;
}

.as-toc-list li {
	margin: 2px 0;
}

.as-toc-list a {
	display: block;
	padding: 7px 10px;
	border-radius: 8px;
	color: #4b5563;
	text-decoration: none;
	font-size: 13.5px;
	line-height: 1.6;
	transition: background .15s ease, color .15s ease;
	border-inline-start: 2px solid transparent;
}

.as-toc-list a:hover {
	background: #f6f8fa;
	color: #1a1d24;
}

.as-toc-list a.is-active {
	background: color-mix(in srgb, var(--as-toc-accent) 10%, transparent);
	color: var(--as-toc-accent);
	border-inline-start-color: var(--as-toc-accent);
	font-weight: 700;
}

.as-toc-num {
	display: inline-block;
	min-width: 20px;
	color: var(--as-toc-accent);
	font-weight: 700;
	margin-inline-end: 4px;
}

.as-toc.as-toc-empty { display: none; }
