/*
 * TheCheck reading components — 2026-11-17.
 * Load on singular posts only. No ad selectors, content hiding, image cropping,
 * or TOC toggle state overrides. Original article URLs and text are untouched.
 */
.single-post .entry-content {
	--tc-reading-ink: #172b4d;
	--tc-reading-blue: #164f9b;
	--tc-reading-border: #cbd8e8;
	min-width: 0;
	line-height: 1.85;
}

.single-post .entry-content p {
	margin-block: 1.1em;
	overflow-wrap: anywhere;
}

.single-post .entry-content li {
	line-height: 1.8;
	overflow-wrap: anywhere;
}

.single-post .entry-content :is(h2, h3, h4) {
	text-wrap: pretty;
	overflow-wrap: anywhere;
	scroll-margin-block-start: 6rem;
}

/* A legacy article's broad `nav` styling must not pad an empty TOC nav.
 * Keep the plugin's own display/height state and list nesting intact.
 */
.single-post .entry-content #ez-toc-container nav {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.single-post .entry-content #ez-toc-container nav > ul {
	margin-block-end: 0;
}

.single-post .entry-content #ez-toc-container {
	max-width: 100%;
	box-sizing: border-box;
}

/* Manual article navigation uses an explicit class, never a bare nav rule. */
.single-post .entry-content .tc-inline-toc {
	margin-block: 1.5rem;
	padding: 1.1rem 1.25rem;
	border: 1px solid #dbe4ef;
	border-radius: 12px;
	background: #f3f6fb;
}

.single-post .entry-content .tc-inline-toc ul {
	margin-block: 0;
}

/* Table semantics stay on the table; the wrapper owns horizontal scrolling.
 * Integration supplies a descriptive accessible name and tabindex=0 only when
 * overflowing. It must not overwrite captions, th scope, or existing labels.
 */
.single-post .entry-content .tc-table-scroll {
	max-width: 100%;
	min-width: 0;
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	-webkit-overflow-scrolling: touch;
	margin-block: 1.5rem;
	border: 1px solid var(--tc-reading-border);
	border-radius: 8px;
}

.single-post .entry-content .tc-table-scroll > table {
	display: table;
	width: 100%;
	max-width: none;
	margin: 0;
	overflow: visible;
	border-collapse: collapse;
	line-height: 1.65;
}

.single-post .entry-content .tc-table-scroll > table caption {
	padding: .75rem;
	text-align: start;
	font-weight: 700;
	color: var(--tc-reading-ink);
}

.single-post .entry-content .tc-table-scroll :is(th, td) {
	padding: .75rem;
	vertical-align: top;
	overflow-wrap: anywhere;
}

/* Opt-in only: wide numeric/comparison tables may scroll rather than squeeze. */
.single-post .entry-content .tc-table-scroll--wide > table {
	min-width: 38rem;
}

.single-post .entry-content .tc-table-scroll:focus-visible,
.single-post .entry-content .tc-inline-toc a:focus-visible,
.single-post .entry-content #ez-toc-container :is(a, button):focus-visible,
.single-post .entry-content .tc-key-summary > summary:focus-visible {
	outline: 3px solid #145ac7;
	outline-offset: 4px;
}

/* Do not turn portrait source files into landscape by CSS. Replace assets
 * after editorial review; related cards and icons keep their own layout.
 */
.single-post .entry-content .tc-body-diagram {
	margin: 2rem auto;
	max-width: 100%;
}

.single-post .entry-content .tc-body-diagram img,
.single-post .entry-content .wp-block-image img {
	max-width: 100%;
	height: auto;
}

.single-post .entry-content .tc-body-diagram figcaption {
	margin-block-start: .65rem;
	color: #4b6179;
	font-size: .9rem;
	line-height: 1.65;
	text-align: start;
}

.single-post .entry-content .tc-answer-summary {
	margin-block: 1.5rem;
	padding: 1.25rem;
	border: 1px solid #badbd3;
	border-inline-start: 4px solid #1f766d;
	border-radius: 10px;
	background: #eff8f5;
	color: var(--tc-reading-ink);
}

.single-post .entry-content .tc-answer-summary > :first-child {
	margin-block-start: 0;
}

.single-post .entry-content .tc-answer-summary > :last-child {
	margin-block-end: 0;
}

@media (max-width: 600px) {
	.single-post .entry-content .tc-table-scroll :is(th, td) {
		padding: .65rem;
		font-size: 1rem;
	}

	.single-post .entry-content :is(.tc-inline-toc, .tc-answer-summary) {
		padding: 1rem;
	}
}
