:root {
	--hestia-toc-accent: #d81c5c;
	--hestia-toc-text: #334155;
	--hestia-toc-muted: #64748b;
	--hestia-toc-border: #e2e8f0;
	--hestia-toc-bg: #ffffff;
	--hestia-toc-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
	--hestia-toc-sticky-top: 80px;
}

html {
	scroll-padding-top: var(--hestia-toc-sticky-top);
}

.entry-content h2[id],
.page-content-wrap h2[id],
#hestia-faq-heading {
	scroll-margin-top: var(--hestia-toc-sticky-top);
}

/* Collapsible block — inserted after second paragraph */
.hestia-page-toc--collapsible {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0 0 24px;
	border: 1px solid var(--hestia-toc-border);
	border-radius: 12px;
	background: var(--hestia-toc-bg);
	box-shadow: var(--hestia-toc-shadow);
	box-sizing: border-box;
	overflow: hidden;
}

.hestia-page-toc__cb {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

.hestia-page-toc__label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px;
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: var(--hestia-toc-text);
	cursor: pointer;
	user-select: none;
	background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.hestia-page-toc__label:hover {
	background: #f8fafc;
}

.hestia-page-toc__cb:checked ~ .hestia-page-toc__label {
	border-bottom-color: var(--hestia-toc-border);
}

.hestia-page-toc__label-text {
	display: block;
}

.hestia-page-toc__chevron {
	display: inline-block;
	flex-shrink: 0;
	color: var(--hestia-toc-accent);
	transition: transform 0.2s ease;
}

.hestia-page-toc__cb:checked ~ .hestia-page-toc__label .hestia-page-toc__chevron {
	transform: rotate(180deg);
}

.hestia-page-toc__list {
	display: none;
	flex-direction: column;
	gap: 0;
	list-style: none;
	margin: 0;
	padding: 4px 10px 8px;
}

.hestia-page-toc__cb:checked ~ .hestia-page-toc__list {
	display: flex;
	padding: 10px 0 !important;
}

.hestia-page-toc__item {
	margin: 0;
	padding: 0;
}

.hestia-page-toc__link {
	display: block;
	position: relative;
	padding: 6px 20px 6px 20px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	color: var(--hestia-toc-text) !important;
	text-decoration: none !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 8px;
	white-space: normal;
	overflow-wrap: anywhere;
	transition: color 0.2s ease, background 0.2s ease;
}

.hestia-page-toc__link::before {
	content: "";
	position: absolute;
	left: 10px;
	top: 50%;
	width: 3px;
	height: 0;
	border-radius: 50px;
	background: var(--hestia-toc-accent);
	transform: translateY(-50%);
	transition: height 0.2s ease;
}

.hestia-page-toc__link:hover {
	background: #f8fafc !important;
	color: #0f172a !important;
	border-radius: 0px;
}

.hestia-page-toc__link:hover::before {
	height: 16px;
	opacity: 0.45;
}
