/**
 * Floating Headings Nav
 */

.fhn-toc[hidden] {
	display: none !important;
}

.fhn-toc {
	--fhn-bg: #fff;
	--fhn-text: rgb(37, 42, 50);
	--fhn-muted: rgb(155, 155, 155);
	--fhn-accent: rgb(0, 118, 255);
	--fhn-border: rgb(203, 189, 189);
	--fhn-shadow: rgba(0, 0, 0, 0.18) 0 4px 18px;

	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	z-index: 999;
	width: min(260px, calc(100vw - 24px));
	max-height: min(70vh, 520px);
	box-sizing: border-box;
}

.fhn-toc--right {
	right: 12px;
}

.fhn-toc--left {
	left: 12px;
}

.fhn-toc__inner {
	display: flex;
	flex-direction: column;
	max-height: inherit;
	background: var(--fhn-bg);
	border: 1px solid var(--fhn-border);
	border-radius: 10px;
	box-shadow: var(--fhn-shadow);
	overflow: hidden;
}

.fhn-toc__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 12px;
	border-bottom: 1px solid var(--fhn-border);
	background: rgb(248, 248, 248);
}

.fhn-toc__title {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	color: var(--fhn-text);
}

.fhn-toc__close {
	display: none;
	border: 0;
	background: transparent;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: var(--fhn-text);
	padding: 0 4px;
}

.fhn-toc__list {
	list-style: none;
	margin: 0;
	padding: 10px 8px 12px;
	overflow-y: auto;
}

.fhn-toc__list li {
	margin: 0;
	padding: 0;
}

.fhn-toc__list a {
	display: block;
	padding: 6px 8px;
	font-size: 13px;
	line-height: 1.35;
	color: var(--fhn-text);
	text-decoration: none;
	border-radius: 6px;
}

.fhn-toc__list a:hover,
.fhn-toc__list a:focus {
	background: rgba(0, 118, 255, 0.08);
	color: var(--fhn-accent);
}

.fhn-toc__list a.is-active {
	font-weight: 700;
	color: var(--fhn-accent);
	background: rgba(0, 118, 255, 0.1);
}

.fhn-toc__list .fhn-level-3 a {
	padding-left: 18px;
	font-size: 12px;
}

.fhn-toc__list .fhn-level-4 a {
	padding-left: 28px;
	font-size: 12px;
}

.fhn-toc__list .fhn-level-5 a,
.fhn-toc__list .fhn-level-6 a {
	padding-left: 36px;
	font-size: 11px;
}

.fhn-toc-toggle[hidden] {
	display: none !important;
}

.fhn-toc-toggle {
	position: fixed;
	bottom: 16px;
	z-index: 998;
	display: none;
	border: 1px solid var(--fhn-border);
	border-radius: 999px;
	padding: 10px 14px;
	font-size: 13px;
	font-weight: 700;
	background: var(--fhn-bg);
	color: var(--fhn-text);
	box-shadow: var(--fhn-shadow);
	cursor: pointer;
}

.fhn-toc-toggle--right {
	right: 12px;
}

.fhn-toc-toggle--left {
	left: 12px;
}

@media (max-width: 1100px) {
	.fhn-toc {
		top: auto;
		bottom: 64px;
		transform: none;
		max-height: 55vh;
	}

	.fhn-toc--right,
	.fhn-toc--left {
		left: 12px;
		right: 12px;
		width: auto;
	}

	.fhn-toc__close {
		display: block;
	}

	.fhn-toc-toggle {
		display: inline-block;
	}

	.fhn-toc:not(.is-open) {
		display: none;
	}
}

@media (min-width: 1101px) {
	.fhn-toc-toggle {
		display: none !important;
	}
}
