/* RankList — блок «Содержание». */

.rlist-toc {
	--rl-toc-accent: #f59e0b;
	--rl-toc-bg: rgba(245,158,11,.10);
	--rl-toc-top: 24px;
	margin: 1.4em 0;
	font-size: 15px;
	line-height: 1.5;
}

/* Плавающая панель справа (toptechnika-style) — строится из inline-оглавления */
.rlist-toc-float {
	--rl-toc-accent: #f59e0b;
	--rl-toc-bg: rgba(245,158,11,.10);
	position: fixed;
	top: var(--rl-toc-top, 24px);
	right: 16px;
	width: min(340px, 90vw);
	max-height: 72vh;
	overflow: auto;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	box-shadow: 0 12px 34px rgba(0,0,0,.14);
	z-index: 9990;
	font-size: 14px;
	opacity: 0;
	transform: translateX(14px);
	pointer-events: none;
	transition: opacity .2s ease, transform .2s ease;
}
.rlist-toc-float.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.rlist-toc-float__head {
	position: sticky;
	top: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 11px 14px;
	background: #fff;
	border-bottom: 1px solid #eee;
}
.rlist-toc-float__title { font-weight: 700; font-size: 14px; }
.rlist-toc-float__close {
	border: 0;
	background: none;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	color: #9ca3af;
	padding: 0 2px;
}
.rlist-toc-float__close:hover { color: #374151; }
.rlist-toc-float__body { padding: 12px 14px; }
@media (max-width: 782px) { .rlist-toc-float { display: none; } }

/* Виджет в сайдбаре */
.rlist-toc-widget { font-size: 14px; }
.rlist-toc-widget--sticky { position: sticky; top: var(--rl-toc-top, 90px); }
.rlist-toc-widget .rlist-toc__box { max-height: calc(100vh - var(--rl-toc-top, 90px) - 20px); overflow: auto; }

/* Скролл-спай: активный пункт */
.rlist-toc__item.is-active > a { color: var(--rl-toc-accent); font-weight: 600; }

.rlist-toc *,
.rlist-toc *::before,
.rlist-toc *::after { box-sizing: border-box; }

.rlist-toc__title {
	font-weight: 700;
	font-size: 16px;
	margin: 0 0 8px;
	cursor: pointer;
	list-style: none;
}
.rlist-toc__title::-webkit-details-marker { display: none; }
details.rlist-toc__box > summary.rlist-toc__title::after {
	content: "▾";
	font-size: 12px;
	margin-left: 6px;
	color: #9ca3af;
}
details.rlist-toc__box:not([open]) > summary.rlist-toc__title::after { content: "▸"; }

/* ── Списки и вложенность ── */
.rlist-toc__list {
	margin: 0;
	padding: 0;
	list-style: none;
}
.rlist-toc__list .rlist-toc__list { padding-left: 1.4em; } /* отступ вложенных уровней */
.rlist-toc__item { margin: 4px 0; }
.rlist-toc__item a { text-decoration: none; color: inherit; }
.rlist-toc__item a:hover { text-decoration: underline; }

/* Нумерованный: иерархические номера 1, 1.1, 1.2.1 через счётчики */
.rlist-toc--num .rlist-toc__list { counter-reset: rltoc; }
.rlist-toc--num .rlist-toc__item { counter-increment: rltoc; }
.rlist-toc--num .rlist-toc__item > a::before {
	content: counters(rltoc, ".") ". ";
	color: #9ca3af;
	margin-right: 6px;
	white-space: nowrap;
}

/* Маркированный */
.rlist-toc--bul .rlist-toc__list { list-style: disc; padding-left: 1.4em; }
.rlist-toc--bul .rlist-toc__list .rlist-toc__list { list-style: circle; }

/* Без маркеров — только отступы (по умолчанию из .rlist-toc__list) */

/* ── Тема: в рамке ── */
.rlist-toc--box .rlist-toc__box {
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 14px 18px;
	background: #fafafa;
}

/* ── Тема: без рамки ── */
.rlist-toc--plain .rlist-toc__box { padding: 0; }

/* ── Тема: полоса при наведении (vyborok) ── */
.rlist-toc--hover-bar .rlist-toc__box {
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #fff;
	padding: 14px 0;
}
.rlist-toc--hover-bar .rlist-toc__title { padding: 0 18px; }
.rlist-toc--hover-bar .rlist-toc__list { margin-top: 8px; }
.rlist-toc--hover-bar .rlist-toc__item { margin: 0; }
.rlist-toc--hover-bar .rlist-toc__item > a {
	display: block;
	padding: 8px 18px;
	border-left: 3px solid transparent;
	transition: background .15s ease, border-color .15s ease;
}
.rlist-toc--hover-bar .rlist-toc__item > a:hover {
	background: var(--rl-toc-bg);
	border-left-color: var(--rl-toc-accent);
	text-decoration: none;
}
.rlist-toc--hover-bar .rlist-toc__item.is-active > a {
	background: var(--rl-toc-bg);
	border-left-color: var(--rl-toc-accent);
}
.rlist-toc--hover-bar .rlist-toc__list .rlist-toc__list { padding-left: 0; }
.rlist-toc--hover-bar.rlist-toc--bul .rlist-toc__list { list-style: none; }
.rlist-toc--hover-bar .rlist-toc__list .rlist-toc__list .rlist-toc__item > a { padding-left: 40px; }

/* ── Тема: номера-кружки ── */
.rlist-toc--pills .rlist-toc__box {
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 14px 18px;
	background: #fff;
}
.rlist-toc--pills .rlist-toc__list { counter-reset: rltocp; }
.rlist-toc--pills .rlist-toc__item {
	counter-increment: rltocp;
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin: 7px 0;
}
.rlist-toc--pills.rlist-toc--num .rlist-toc__item > a::before { content: none; } /* кружок вместо префикса */
.rlist-toc--pills .rlist-toc__item::before {
	content: counter(rltocp);
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--rl-toc-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	transform: translateY(2px);
}
