/* Table of Contents. "Show as" and "Stick while scrolling" set the custom properties used here. */
.hwd-toc .hwd-toc__rail {
	display: var(--hwd-toc-rail, block);
	max-height: var(--hwd-toc-max, none);
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	margin-inline: -4px;
	padding: 2px 4px;
}
.hwd-toc .hwd-toc__fold {
	display: var(--hwd-toc-fold, none);
	border: 1px solid var(--hwd-toc-track, var(--hwd-line));
	border-radius: 14px;
	padding: 4px 18px;
}

.hwd-toc .hwd-toc__title {
	margin: 0 0 8px;
	color: var(--hwd-toc-title, var(--hwd-ink));
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.65;
}
.hwd-toc .hwd-toc__list { list-style: none; margin: 0; padding: 0; }
.hwd-toc .hwd-toc__list li { margin: 0; padding: 0; }
.hwd-toc .hwd-toc__list a {
	display: block;
	padding: 6px 0;
	color: var(--hwd-toc-link, var(--hwd-muted));
	font-size: 0.94rem;
	line-height: 1.35;
	text-decoration: none;
	transition: color 0.15s ease, border-color 0.15s ease;
}
.hwd-toc .hwd-toc__list a:hover,
.hwd-toc .hwd-toc__list a.is-active { color: var(--hwd-toc-active, var(--hwd-ink)); }
.hwd-toc .hwd-toc__list a.is-active { font-weight: 600; }
.hwd-toc .hwd-toc__list a:focus-visible { outline-offset: 0; }

/* With the highlight on, the list gets a track and a marker for the current section. */
.hwd-toc--spy .hwd-toc__rail .hwd-toc__list { border-inline-start: 2px solid var(--hwd-toc-track, var(--hwd-line)); }
.hwd-toc--spy .hwd-toc__rail .hwd-toc__list a {
	margin-inline-start: -2px;
	padding-inline-start: 14px;
	border-inline-start: 2px solid transparent;
}
.hwd-toc--spy .hwd-toc__rail .hwd-toc__list a.is-active { border-inline-start-color: var(--hwd-toc-marker, var(--hwd-amber)); }

.hwd-toc .hwd-toc__fold summary {
	display: block;
	cursor: pointer;
	padding: 12px 0;
	color: var(--hwd-toc-title, var(--hwd-ink));
	font-weight: 650;
	list-style: none;
}
.hwd-toc .hwd-toc__fold summary::-webkit-details-marker { display: none; }
.hwd-toc .hwd-toc__fold summary::after {
	content: "+";
	float: inline-end;
	font-size: 1.3rem;
	font-weight: 500;
	line-height: 1;
}
.hwd-toc .hwd-toc__fold[open] summary::after { content: "\2212"; }
.hwd-toc .hwd-toc__fold .hwd-toc__list { padding-bottom: 12px; }
