/* Inline page TOC — styled panel, flat link list inside */

.page-toc {
	--toc-accent: #5a7a62;
	--toc-surface: #fafafa;
	--toc-border: #ececec;
	--toc-text: #6b7280;
	--toc-text-hover: #4b5563;
	--toc-text-active: #3f5244;

	width: 100%;
	margin: 0;
	font-family: inherit;
}

.page-toc .sb-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.7rem 0.9rem;
	background: var(--toc-surface);
	color: var(--toc-text-active);
	font-weight: 500;
	font-size: 0.8125rem;
	letter-spacing: 0.02em;
	border: 1px solid var(--toc-border);
	border-radius: 0;
}

.page-toc .sb-header__label {
	opacity: 0.9;
}

.page-toc .sb-content {
	position: relative;
	background: #fff;
	border: 1px solid var(--toc-border);
	border-top: 0;
	border-radius: 0;
	padding: 0.35rem 0.5rem 0.25rem;
	max-height: 420px;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #d8d8d8 transparent;
}

.page-toc .sb-content-fade {
	display: none;
	position: absolute;
	left: 0;
	right: 0;
	bottom: 2.85rem;
	height: 3rem;
	pointer-events: none;
	z-index: 2;
	background: linear-gradient(
		180deg,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, 0.72) 42%,
		#fff 100%
	);
}

.page-toc .sb-content::-webkit-scrollbar {
	width: 5px;
}

.page-toc .sb-content::-webkit-scrollbar-thumb {
	background: #ddd;
	border-radius: 0;
}

.page-toc .sb-row {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
}

.page-toc .sb-row a,
.page-toc .sb-row button {
	display: block;
	width: 100%;
    margin: .5em;
    padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--toc-text);
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.45;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: color 0.2s ease;
}

.page-toc .sb-row a:hover,
.page-toc .sb-row button:hover,
.page-toc .sb-row button:focus-visible {
	background: transparent;
	color: var(--toc-text-hover);
	outline: none;
}

/* “Meer tonen” — footer link, not another TOC row */
.page-toc .sb-more {
	position: relative;
	z-index: 3;
	display: block;
	width: 100%;
	margin: 0.15rem 0 0;
	padding: 0.55rem 0.5rem 0.45rem;
	border: 0;
	border-top: 1px solid var(--toc-border);
	border-radius: 0;
	background: #fff;
	color: var(--toc-text);
	font-size: 0.8125rem;
	font-weight: 400;
	line-height: 1.3;
	text-align: center;
	text-decoration: underline;
	text-underline-offset: 0.2em;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: color 0.2s ease;
}

.page-toc .sb-more:hover,
.page-toc .sb-more:focus-visible {
	color: var(--toc-accent);
	outline: none;
}

/* Mobile: subtle active state */
.page-toc .sb-row.is-active a,
.page-toc .sb-row.is-active button {
	color: var(--toc-text-active);
	font-weight: inherit;
}

html.bet-toc-scrolling {
	scroll-behavior: auto !important;
}

@media (max-width: 991px) {
	.page-toc {
		border-radius: 0;
		box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
	}

	.page-toc .sb-content {
		display: block;
		max-height: none;
		overflow: hidden;
	}

	.page-toc.has-toc-fade .sb-content-fade {
		display: block;
	}

	.page-toc.is-expanded .sb-content {
		overflow: visible;
		max-height: min(70vh, 420px);
		overflow-y: auto;
	}
}

@media (min-width: 992px) {
	.page-toc {
		border-radius: 0;
		box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
	}

	.page-toc .sb-more {
		display: none !important;
	}

	.page-toc .sb-row.is-toc-extra {
		display: block !important;
	}

	.page-toc .sb-content {
		display: block !important;
		max-height: calc(100vh - 8rem);
		overflow-y: auto;
	}

	.page-toc .sb-row.is-active a,
	.page-toc .sb-row.is-active button {
		color: var(--toc-text-active);
		font-weight: 500;
		border-left: 3px solid var(--toc-accent);
        padding-left: 0.7rem;
        margin-left: -.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.page-toc .sb-row a,
	.page-toc .sb-row button,
	.page-toc .sb-more {
		transition: none;
	}
}
