/* Table of Contents — base styles. Sizes are CSS variables or fluid clamps so the
   Elementor controls and small screens both stay in charge. */

.ifd-toc {
	font-family: var(--ifd-font, "Work Sans", sans-serif);
	background: var(--ifd-toc-bg, #f7f9fb);
	border: var(--ifd-toc-bw, 1px) solid var(--ifd-toc-bc, #e2e5e8);
	border-radius: var(--ifd-toc-radius, 16px);
	padding: var(--ifd-toc-pad, 28px 32px);
	margin-bottom: var(--ifd-toc-mb, 56px);
	max-width: 100%;
}

/* Hidden until the script has found headings, so an empty box never flashes. */
.ifd-toc[data-state="empty"] {
	display: none;
}

.ifd-toc--sticky {
	position: sticky;
	top: var(--ifd-toc-sticky-top, 24px);
	max-height: calc(100vh - var(--ifd-toc-sticky-top, 24px) - 24px);
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: var(--ifd-toc-thumb, #cce0ee) transparent;
	overscroll-behavior: contain;
}

.ifd-toc--sticky::-webkit-scrollbar {
	width: 8px;
}

.ifd-toc--sticky::-webkit-scrollbar-thumb {
	background: var(--ifd-toc-thumb, #cce0ee);
	border-radius: 999px;
}

/* ---------- Label ---------- */

.ifd-toc__label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	font-family: inherit;
	font-size: var(--ifd-toc-label-size, 11px);
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ifd-toc-label, #70787d);
	margin-bottom: var(--ifd-toc-label-gap, 16px);
	background: none;
	border: 0;
	padding: 0;
	text-align: left;
}

button.ifd-toc__label {
	cursor: pointer;
}

.ifd-toc__caret {
	flex: 0 0 auto;
	display: none;
	width: 1em;
	height: 1em;
	font-size: var(--ifd-toc-caret, 16px);
	transition: transform .25s ease;
}

.ifd-toc__caret svg {
	width: 100%;
	height: 100%;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ---------- List ---------- */

.ifd-toc__list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: var(--ifd-toc-gap, 10px);
	font-family: inherit;
	font-size: var(--ifd-toc-size, 15px);
	counter-reset: ifdtoc;
	word-break: normal;
}

.ifd-toc__item {
	/* Depth is set per item by the script; level 1 sits flush. */
	padding-left: calc((var(--ifd-toc-depth, 0)) * var(--ifd-toc-indent, 16px));
}

.ifd-toc__link {
	display: inline-flex;
	align-items: baseline;
	overflow-wrap: anywhere;
	gap: var(--ifd-toc-num-gap, 6px);
	text-decoration: var(--ifd-toc-decoration, none);
	color: var(--ifd-toc-link, #191c1e);
	line-height: 1.45;
	transition: color .18s ease;
}

.ifd-toc__link:hover,
.ifd-toc__link:focus-visible {
	color: var(--ifd-toc-link-hover, #0f4d78);
	text-decoration: var(--ifd-toc-decoration-hover, underline);
}

.ifd-toc__link:focus-visible {
	outline: 2px solid var(--ifd-toc-link-hover, #0f4d78);
	outline-offset: 3px;
	border-radius: 2px;
}

.ifd-toc__item.is-active > .ifd-toc__link {
	color: var(--ifd-toc-link-active, #0f4d78);
	font-weight: var(--ifd-toc-weight-active, 600);
}

/* ---------- Markers ---------- */

.ifd-toc--decimal .ifd-toc__item {
	counter-increment: ifdtoc;
}

.ifd-toc--decimal .ifd-toc__link::before {
	content: counter(ifdtoc) ". ";
	color: var(--ifd-toc-marker, inherit);
	flex: 0 0 auto;
}

/* Top level numbers, nested levels stay unnumbered. */
.ifd-toc--decimal-top .ifd-toc__item[data-depth="0"] {
	counter-increment: ifdtoc;
}

.ifd-toc--decimal-top .ifd-toc__item[data-depth="0"] > .ifd-toc__link::before {
	content: counter(ifdtoc) ". ";
	color: var(--ifd-toc-marker, inherit);
	flex: 0 0 auto;
}

.ifd-toc--dot .ifd-toc__link::before {
	content: "";
	flex: 0 0 auto;
	width: var(--ifd-toc-dot, 5px);
	height: var(--ifd-toc-dot, 5px);
	border-radius: 50%;
	background: var(--ifd-toc-marker, #c2c8cc);
	transform: translateY(-0.25em);
}

.ifd-toc--bar .ifd-toc__item {
	border-left: 2px solid var(--ifd-toc-marker, #e2e5e8);
	padding-left: calc(12px + (var(--ifd-toc-depth, 0)) * var(--ifd-toc-indent, 16px));
	transition: border-color .18s ease;
}

.ifd-toc--bar .ifd-toc__item.is-active {
	border-left-color: var(--ifd-toc-link-active, #0f4d78);
}

/* ---------- Collapsed (mobile) ---------- */

.ifd-toc--collapsible .ifd-toc__caret {
	display: inline-flex;
}

.ifd-toc--collapsible .ifd-toc__panel {
	display: grid;
	grid-template-rows: 1fr;
	transition: grid-template-rows .28s ease;
}

.ifd-toc--collapsible.is-collapsed .ifd-toc__panel {
	grid-template-rows: 0fr;
}

.ifd-toc--collapsible.is-collapsed .ifd-toc__caret {
	transform: rotate(-90deg);
}

.ifd-toc--collapsible.is-collapsed .ifd-toc__label {
	margin-bottom: 0;
}

.ifd-toc__panel-inner {
	overflow: hidden;
	min-height: 0;
}

/* Offsets the scroll target so a sticky site header doesn't cover the heading. */
[data-ifd-toc-target] {
	scroll-margin-top: var(--ifd-toc-offset, 24px);
}

@media (prefers-reduced-motion: reduce) {
	.ifd-toc__link,
	.ifd-toc__caret,
	.ifd-toc__panel,
	.ifd-toc--bar .ifd-toc__item {
		transition: none;
	}
}
