/*
 * Readora Toolkit front-end styles.
 * Uses Readora's color tokens when available (so dark mode works), with
 * plain fallbacks for other themes.
 */

/* Table of contents */
.rtk-toc {
	margin: 1.75rem 0;
	padding: 1rem 1.25rem;
	border: 1px solid var(--readora-border, #e4e7eb);
	border-radius: var(--readora-radius, 10px);
	background: var(--readora-surface, #f5f7fa);
	font-size: 0.95rem;
}

.rtk-toc__title {
	cursor: pointer;
	font-weight: 700;
	list-style-position: inside;
}

.rtk-toc__list,
.rtk-toc__list ol {
	margin: 0.5rem 0 0;
	padding-inline-start: 1.25rem;
}

.rtk-toc__list li {
	margin: 0.25rem 0;
}

.rtk-toc a {
	text-decoration: none;
}

.rtk-toc a:hover {
	text-decoration: underline;
}

/* Jumping to a heading should not hide it under a sticky header. */
.entry-content :is(h2, h3)[id] {
	scroll-margin-top: 5rem;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

/* In-content ads (Readora styles .readora-ad itself; these are for other themes). */
.rtk-ad {
	clear: both;
	margin: 1.75rem 0;
	text-align: center;
}

.rtk-ad__label {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 0.7rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.7;
}

/* Reserve space so the page does not jump when the ad loads. */
.rtk-ad__unit {
	min-height: 250px;
}
