/* ==========================================================================
   RS Ning TOC — Table of Contents block
   Design source: Figma comp (Frame 1410092406)
   ========================================================================== */

/* ---- Container ---- */
.rsning-toc {
	background: #fefcf9;
	border: 1px solid #d4d2d0;
	margin-bottom: 32px;
}

/* ---- Header bar ---- */
.rsning-toc__header {
	background: #722e2b;
	padding: 16px 20px;
	display: flex;
	align-items: center;
}

.rsning-toc__title {
	color: #fff;
	font-size: 18px;
	font-weight: 400;
	line-height: 1.6;
	letter-spacing: 1.8px;
	margin: 0;
	padding: 0;
}

/* ---- Body / link list ---- */
.rsning-toc__body {
	padding: 32px 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* Before JS populates the list, collapse the empty body. */
.rsning-toc__body:empty {
	padding: 0;
}

/* ---- Individual link ---- */
.rsning-toc__link {
	display: block;
	color: #444;
	font-size: 16px;
	font-weight: 400;
	line-height: 32px;
	letter-spacing: 2.56px;
	text-decoration: none;
	transition: color 0.2s ease;
}

.rsning-toc__link:hover,
.rsning-toc__link:focus-visible {
	color: #722e2b;
}

/* H3 indent + bullet — visual hierarchy for sub-headings. */
.rsning-toc__link--h3 {
	padding-left: 1.5em;
	display: flex;
	align-items: center;
	gap: 8px;
}

.rsning-toc__link--h3::before {
	content: '';
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
	flex-shrink: 0;
}

/* ---- Target heading scroll offset ----
   Prevents fixed/sticky site headers from covering the heading after
   an anchor jump.  Adjust the custom property in your theme if your
   header height differs. */
h2[id^="rsning-"],
h3[id^="rsning-"] {
	scroll-margin-top: var(--rsning-toc-scroll-offset, 80px);
}
