.kg24-toc {
	position: relative;
	display: flex;
	margin: 20px 0;
	padding: 20px 20px 8px;
	border: 1px solid rgba(0, 0, 0, 0.03);
	border-radius: 5px;
	box-sizing: border-box;
	background-color: var(--kg24-toc-bg, #e8f3fe);
	color: var(--kg24-toc-text, #1a1a1a);
}

.kg24-toc *,
.kg24-toc *::before,
.kg24-toc *::after {
	box-sizing: border-box;
}

.kg24-toc__icon {
	flex-shrink: 0;
	width: 32px;
	margin-right: 16px;
	line-height: 0;
}

.kg24-toc__svg {
	display: block;
	width: 32px;
	height: 32px;
}

.kg24-toc__body {
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.kg24-toc__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-weight: 700;
	line-height: 1.35;
	text-align: left;
	cursor: pointer;
}

.kg24-toc__toggle:focus,
.kg24-toc__toggle:focus-visible,
.kg24-toc__toggle:active {
	outline: none;
	box-shadow: none;
	border: 0;
}

.kg24-toc__title {
	flex: 1 1 auto;
	min-width: 0;
}

.kg24-toc__chevron {
	flex-shrink: 0;
	display: inline-block;
	width: 0.65em;
	height: 0.65em;
	margin-left: 12px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
}

.kg24-toc.is-collapsed .kg24-toc__chevron {
	transform: rotate(-45deg);
}

.kg24-toc__panel {
	margin-top: 12px;
}

.kg24-toc.is-collapsed .kg24-toc__panel {
	display: none;
}

.kg24-toc ul.kg24-toc__list {
	display: block;
	margin: 0 !important;
	padding: 0 0 0 1.35em !important;
	list-style-position: outside;
	list-style-type: disc;
	line-height: 1.3 !important;
}

.kg24-toc ul.kg24-toc__list ul.kg24-toc__list {
	margin: 0 !important;
	padding: 0 0 0 1.35em !important;
	list-style-type: circle;
}

.kg24-toc ul.kg24-toc__list ul.kg24-toc__list ul.kg24-toc__list {
	list-style-type: square;
}

.kg24-toc ul.kg24-toc__list > li,
.kg24-toc ul.kg24-toc__list ul.kg24-toc__list > li {
	display: list-item;
	margin: 7px 0 !important;
	padding: 0 !important;
	line-height: 1.3 !important;
}

.kg24-toc a.kg24-toc__link,
.kg24-toc a.kg24-toc__link:link,
.kg24-toc a.kg24-toc__link:visited,
.kg24-toc a.kg24-toc__link:hover,
.kg24-toc a.kg24-toc__link:active,
.kg24-toc a.kg24-toc__link:focus {
	color: var(--kg24-toc-text, #1a1a1a) !important;
	text-decoration: none;
	line-height: 1.3 !important;
	background-image: linear-gradient(currentColor, currentColor);
	background-position: 0 100%;
	background-repeat: no-repeat;
	background-size: 0 1px;
	transition: background-size 0.2s ease, opacity 0.2s ease;
}

.kg24-toc a.kg24-toc__link:hover,
.kg24-toc a.kg24-toc__link:focus {
	opacity: 0.72;
	background-size: 100% 1px;
	-webkit-text-stroke: 0.35px currentColor;
	paint-order: stroke fill;
}

@media (prefers-reduced-motion: reduce) {
	.kg24-toc__chevron,
	.kg24-toc a.kg24-toc__link {
		transition: none;
	}
}

/* Sticky header overlap on mobile (native hash / initial load). */
@media (max-width: 767px) {
	h2[id],
	h3[id],
	h4[id],
	h5[id] {
		scroll-margin-top: 60px;
	}
}
