/**
 * Blog article TOC — matches 2captcha.com/blog sidebar.
 */

.sc2-post {
	overflow-x: clip;
}

.sc2-post__wrap {
	max-width: 800px;
	margin-left: auto;
	margin-right: auto;
}

.sc2-post__layout {
	display: flex;
	flex-direction: column;
	gap: 28px;
	align-items: stretch;
}

.sc2-post__prose h2,
.sc2-post__prose h3 {
	scroll-margin-top: 24px;
}

.sc2-post__main {
	min-width: 0;
	flex: 1 1 auto;
	max-width: 100%;
}

.sc2-post__main .sc2-post__prose {
	min-width: 0;
}

.sc2-post__main .sc2-post__prose article,
.sc2-post__main .sc2-post__prose [class*="md-editor"] {
	max-width: 100%;
	box-sizing: border-box;
}

.sc2-post__toc {
	display: none;
}

.sc2-post__toc.is-ready {
	display: block;
}

.sc2-post__toc-nav {
	background: #f5f6f8;
	border-radius: 8px;
	padding: 18px 0 14px;
	box-shadow: none;
	border: 0;
}

.sc2-post__toc-title {
	margin: 0 0 12px;
	padding: 0 16px;
	font-size: 15px;
	font-weight: 700;
	color: #1a1a1a;
	line-height: 1.3;
}

.sc2-post__toc-scroll {
	max-height: min(70vh, 520px);
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	padding: 0;
	scrollbar-width: thin;
	scrollbar-color: #c5c9cf transparent;
}

.sc2-post__toc-scroll::-webkit-scrollbar {
	width: 4px;
}

.sc2-post__toc-scroll::-webkit-scrollbar-thumb {
	background: #c5c9cf;
	border-radius: 2px;
}

.sc2-post__toc-list,
.sc2-post__toc-sub {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sc2-post__toc-item {
	position: relative;
}

.sc2-post__toc-item.is-active {
	background: #e9ecef;
}

.sc2-post__toc-item.is-active::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 4px;
	background: #00a19a;
	border-radius: 0 2px 2px 0;
}

.sc2-post__toc-row {
	display: flex;
	align-items: stretch;
	gap: 0;
	cursor: pointer;
	user-select: none;
}

.sc2-post__toc-label {
	display: block;
	flex: 1;
	min-width: 0;
	box-sizing: border-box;
	padding: 9px 12px 9px 16px;
	font-size: 13px;
	line-height: 1.4;
	color: #52525b;
	font-weight: 400;
}

.sc2-post__toc-item--parent > .sc2-post__toc-row:hover {
	background: rgba(0, 0, 0, 0.04);
}

.sc2-post__toc-link {
	display: block;
	flex: 1;
	min-width: 0;
	box-sizing: border-box;
	padding: 9px 12px 9px 16px;
	border-radius: 0;
	background: transparent;
	color: #52525b !important;
	font-size: 13px;
	line-height: 1.4;
	text-decoration: none !important;
	font-weight: 400;
}

.sc2-post__toc-link:hover {
	background: rgba(0, 0, 0, 0.04);
	color: #1a1a1a !important;
	text-decoration: none !important;
}

.sc2-post__toc-item.is-active > .sc2-post__toc-link,
.sc2-post__toc-item.is-active > .sc2-post__toc-row .sc2-post__toc-link {
	color: #1a1a1a !important;
	font-weight: 600;
	background: transparent;
}

.sc2-post__toc-expand {
	flex-shrink: 0;
	align-self: stretch;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	cursor: pointer;
}

.sc2-post__toc-expand:hover {
	background: rgba(0, 0, 0, 0.04);
}

.sc2-post__toc-chevron {
	display: block;
	width: 8px;
	height: 8px;
	border: 0;
	border-right: 1.5px solid #9ca3af;
	border-bottom: 1.5px solid #9ca3af;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
	margin-top: -2px;
}

.sc2-post__toc-item--parent.is-open > .sc2-post__toc-row .sc2-post__toc-chevron {
	transform: rotate(-135deg);
	margin-top: 2px;
}

.sc2-post__toc-sub {
	margin: 0;
	padding: 0 0 4px 0;
	border-left: 0;
}

.sc2-post__toc-item--parent:not(.is-open) > .sc2-post__toc-sub {
	display: none;
}

.sc2-post__toc-sub .sc2-post__toc-link {
	padding: 7px 12px 7px 24px;
	font-size: 12px;
	color: #6b7280 !important;
}

.sc2-post__toc-sub .sc2-post__toc-item.is-active::before {
	width: 3px;
}

.sc2-post__toc-sub .sc2-post__toc-link:hover,
.sc2-post__toc-sub .sc2-post__toc-item.is-active > .sc2-post__toc-link {
	color: #1a1a1a !important;
}

@media (min-width: 1080px) {
	.sc2-post__wrap {
		max-width: 1140px;
		padding-left: 20px;
		padding-right: 20px;
	}

	.sc2-post__layout {
		flex-direction: row;
		align-items: flex-start;
		gap: 24px;
	}

	.sc2-post__main {
		flex: 1 1 0;
		min-width: 0;
		max-width: 740px;
	}

	.sc2-post__toc.is-ready {
		flex: 0 0 300px;
		width: 300px;
		max-width: 300px;
		position: sticky;
		top: 20px;
		align-self: flex-start;
	}

	.sc2-post__toc-scroll {
		max-height: calc(100vh - 40px);
	}
}
