/**
 * In-article table of contents (`.haam-art-list` / legacy `#art-list`).
 */

:is(.haam-art-list, #art-list) {
	--hal-ink: #1a1532;
	--hal-muted: #4b5563;
	--hal-line: #d1d5db;
	--hal-accent: #ebd11a;
	--hal-accent-hover: #c4b016;

	background-color: transparent;
	border: 1px solid var(--hal-ink);
	border-radius: 8px;
	padding: 24px;
	width: 100%;
	max-width: 100%;
	direction: rtl;
	box-shadow: 0 4px 10px rgba(26, 21, 50, 0.03);
	font-family: inherit;
	margin: 1.5em 0;
	box-sizing: border-box;
}

:is(.haam-art-list, #art-list) > p {
	margin: 0 0 20px;
	padding-bottom: 16px;
	border-bottom: 1px dashed var(--hal-line);
	font-size: 1.2rem;
	color: var(--hal-ink);
	display: flex;
	align-items: center;
	gap: 12px;
	line-height: 1.5;
}

:is(.haam-art-list, #art-list) > p::before {
	content: "";
	display: inline-block;
	flex: 0 0 auto;
	width: 12px;
	height: 12px;
	background-color: var(--hal-accent);
	border-radius: 3px;
}

:is(.haam-art-list, #art-list) h2 {
	margin: 14px 0 !important;
	padding: 0 !important;
	border-bottom: 0 !important;
	font-size: 1rem !important;
	font-weight: 400 !important;
	line-height: 1.6 !important;
	color: inherit;
	text-align: right;
}

:is(.haam-art-list, #art-list) h2 a {
	color: var(--hal-muted) !important;
	font-weight: 600 !important;
	text-decoration: none !important;
	display: inline-flex;
	align-items: center;
	transition: color 0.25s ease, transform 0.25s ease;
}

:is(.haam-art-list, #art-list) h2 a::before {
	content: "▪";
	color: var(--hal-ink);
	font-size: 0.8rem;
	margin-inline-start: 8px;
	transition: color 0.25s ease;
}

:is(.haam-art-list, #art-list) h2 a:hover {
	color: var(--hal-accent-hover) !important;
	transform: translateX(-5px);
}

:is(.haam-art-list, #art-list) h2 a:hover::before {
	color: var(--hal-accent);
}

@media (prefers-reduced-motion: reduce) {
	:is(.haam-art-list, #art-list) h2 a:hover {
		transform: none;
	}
}
