/**
 * Table of Contents block styles.
 *
 * The title element is a `<p>`, NOT an `<h2>`, on purpose — keeps the
 * document outline clean (a "Table of contents" h2 would otherwise
 * pollute the article hierarchy and create a self-referential entry
 * when this block scans h2s to build itself). To compensate, we apply
 * h2-equivalent visual styles here.
 *
 * The declarations use CSS variables for typography and color so the
 * active theme's `--primary` / `--text-xl` / etc. override at runtime.
 * Fallback values cover non-Bricks themes (WP block themes, classic
 * themes, anything without those variables defined).
 *
 * Specificity is single-class; themes that want to fully override only
 * need to ship rules with equal or higher specificity, which is the
 * normal way themes customise block plugin styles.
 */

.wp-block-konanspade-toc {
	/* Conservative container styles — leaves layout to the theme. */
	margin: 1.5em 0;
}

.wp-block-konanspade-toc__title {
	/* Pick up the theme's h2 visuals when available.
	   var(--primary)   — Bricks-style theme primary text color.
	   var(--text-xl)   — theme's "x-large" type size token.
	   fallbacks below cover themes without those tokens.
	   The TOC title sits at 85% of h2 size — visually a heading
	   in its own right but sized down so it reads as a section
	   label, not a peer of the article's real section headings. */
	margin: 0 0 0.6em;
	color: var(--primary, currentColor);
	font-family: var(--heading-font, "PT Serif", Georgia, "Times New Roman", serif);
	font-size: calc(var(--text-xl, clamp(1.5rem, 1.2rem + 1vw, 2rem)) * 0.85);
	font-weight: 700;
	line-height: 1.25;
}

.wp-block-konanspade-toc ul,
.wp-block-konanspade-toc ol {
	margin: 0;
	padding-left: 1.5em;
}

.wp-block-konanspade-toc li {
	margin: 0.25em 0;
}

.wp-block-konanspade-toc a {
	text-decoration: none;
}

.wp-block-konanspade-toc a:hover,
.wp-block-konanspade-toc a:focus {
	text-decoration: underline;
}
