/* ==========================================================================
   Содержание — в макете нет, оформлено как карточка FAQ.
   ========================================================================== */

.toc {
	background: var(--c-card);
	border: 1px solid var(--c-line);
	border-radius: 8px;
}

.toc__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 15px 21px;
	cursor: pointer;
	list-style: none;
}

.toc__head::-webkit-details-marker {
	display: none;
}

.toc__title {
	font-size: var(--fs-h4);
	font-weight: 600;
	line-height: 1.2;
}

.toc[open] .toc__btn .icon-arrow {
	rotate: 180deg;
}

.toc__head:hover .toc__btn {
	border-color: var(--c-red);
}

.toc__list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 4px 21px 18px 46px;
	list-style: none;
	counter-reset: toc;
}

.toc__list--sub {
	gap: 6px;
	padding: 8px 0 0 22px;
}

.toc__item {
	position: relative;
	counter-increment: toc;
}

.toc__item::before {
	content: counters(toc, ".") ".";
	position: absolute;
	inset-inline-end: calc(100% + 8px);
	font-weight: 700;
	color: var(--c-light);
	white-space: nowrap;
}

.toc__link {
	font-size: 16px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--c-light);
	transition: color var(--transition);
}

.toc__list--sub .toc__link {
	font-size: 14px;
	color: var(--c-gray);
}

.toc__link:hover {
	color: var(--c-red);
}

@media (max-width: 767px) {
	.toc__head {
		padding: 13px 15px;
	}

	.toc__list {
		padding: 2px 15px 15px 38px;
	}
}
