/**
 * Sermon Content Styles
 * 
 * Styles for sermon-specific content template
 * Uses ACSS variables and BEM naming convention
 * 
 * @package Revival
 */

/* ==========================================================================
   Canonical URL Notice
   ========================================================================== */
   .sermon-content__canonical {
	margin-block-end: var(--space-l);
}

.sermon-content__canonical-link {
	color: var(--link-color);
	text-decoration: var(--link-decoration);
	text-underline-offset: var(--link-underline-offset);
	transition: var(--transition);
}

.sermon-content__canonical-link:hover {
	color: var(--link-color-hover);
	text-decoration: var(--link-decoration-hover);
}

/* Sermon Excerpt */
.sermon-excerpt p {
    margin-block-end: var(--space-l);
    font-size: calc(var(--text-l) * 1.125);
    color: var(--text-color);
}

/* Mobile: Stack meta items */
@media (max-width: 767px) {
    .sermon-meta {
        gap: var(--space-xs);
    }

	.sermon-meta p.post-meta__item {
		font-size: var(--rv-text-sm);
	}
}

/* ==========================================================================
   Bible Text Section
   ========================================================================== */

.sermon-content__bible-text {
	margin-block-end: var(--space-m);
}

.bible-text {
    margin-inline: calc(var(--space-m) * -1);
    padding: var(--space-m);
    border-radius: var(--radius-l);
    background: var(--neutral-ultra-light);
}

@media (max-width: 768px) {
	.bible-text {
		width: 100vw;
		margin-left: calc(50% - 50vw);
		padding-inline: var(--space-xs);
	}
}

/* Type is .section-heading — see assets/css/typography.css. It was on the
   heading font at weight 100, which is why it read wrong. */
   .bible-text__title {
	margin-block-start: 0;
	margin-block-end: var(--space-s);
	padding-block-end: var(--space-xs);
	border-block-end: var(--border-dark);
}

.bible-text__scripture p {
	font-family: var(--heading-font-family);
	font-size: calc(var(--text-l) * 0.85);
	font-weight: 300;
	line-height: var(--text-line-height);
	text-wrap: var(--text-text-wrap);
	font-optical-sizing: auto;
}

/* Scripture verse numbers */
.bible-text__scripture .scripture-number {
	display: inline-block;
	color: var(--neutral-semi-light);
	font-size: calc(var(--text-s) * 0.8);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	font-family: var(--text-font-family);
	vertical-align: super;
	line-height: 0;
	transform: translateY(0.3em);
	transition: var(--transition);
}

/* ==========================================================================
   Main Content/Transcript Section
   ========================================================================== */

.sermon-content__main {
	margin-block-end: var(--space-xl);
}

/* Type is .section-heading — see assets/css/typography.css. */
.sermon-content__heading {
	margin-block: 0;
	padding-block: var(--space-s);
	border-block-end: var(--border-light);
}

.sermon-content__body {
	/* Content spacing handled by content.css */
}

.sermon-actions {
	margin-block-end: var(--space-l) !important;
}

/* ==========================================================================
   Sermon Notes PDF
   ========================================================================== */

.sermon-content__notes {
	margin-block-end: var(--space-xl);
}

.sermon-content__pdf {
	position: relative;
	width: 100%;
	min-height: 600px;
}

.sermon-content__pdf-iframe {
	width: 100%;
	height: 600px;
	border: var(--border-light);
	border-radius: var(--radius);
}

.sermon-content__pdf-fallback {
	padding: var(--space-m);
	text-align: center;
}

.sermon-content__pdf-link {
	color: var(--link-color);
	text-decoration: var(--link-decoration);
	text-underline-offset: var(--link-underline-offset);
	transition: var(--transition);
}

.sermon-content__pdf-link:hover {
	color: var(--link-color-hover);
	text-decoration: var(--link-decoration-hover);
}
/* Transcript auto-scroll box (POC) — its own scroll region, independent of
   the page, so the text follows the sermon without scrolling the window. */
   .js-transcript-scroll {
	overflow-y: auto;
	scroll-behavior: auto; /* frequent small updates — keep instant, not animated */
	-webkit-overflow-scrolling: touch;
}
/* ==========================================================================
   Introduction
   The Overview tab when a sermon has one. The takeaway list (built from dash
   lines by revival_format_sermon_intro()) is smaller sans with light
   dividers. Scoped under .single-layout__main to outrank its p/li rules.
   ========================================================================== */

/* Several paragraphs, unlike the one-line excerpt: tighter between them. */
.single-layout__main .sermon-intro p {
	margin-block-end: var(--space-s);
	/* A step down from the one-line excerpt's size, since there's more of it. */
	font-size: var(--text-l);
	line-height: var(--text-line-height, calc(10px + 2ex));
}

.single-layout__main .sermon-intro .sermon-intro__lead {
	margin: var(--space-xs) 0 var(--space-xs);
	font-family: var(--text-font-family);
	font-size: var(--rv-text-sm);
	font-weight: var(--rv-weight-semibold);
	line-height: 1.5;
	color: var(--rv-text-muted);
}

.single-layout__main .sermon-intro .sermon-intro__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.single-layout__main .sermon-intro .sermon-intro__list li {
	position: relative;
	margin: 0;
	padding: 0.4375rem 0 0.4375rem 1.5rem;
	border-block-start: 1px solid var(--neutral-ultra-light);
	font-family: var(--text-font-family);
	font-size: var(--text-m);
	font-weight: 400;
	line-height: 1.5;
	color: var(--text-color);
}

.single-layout__main .sermon-intro .sermon-intro__list li:first-child {
	border-block-start: 0;
}

.single-layout__main .sermon-intro .sermon-intro__list li::before {
	content: "";
	position: absolute;
	inset-inline-start: 0.3125rem;
	inset-block-start: 1.0625rem;
	width: 0.375rem;
	height: 0.375rem;
	border-radius: 50%;
	background: var(--neutral-semi-dark);
}

/* ==========================================================================
   Sermon tabs
   Overview, Scripture, Outline, Transcript. Flat text tabs with an
   underline on the active one. The tab buttons reset the theme's button
   styles entirely so nothing from .btn or the global button rules leaks in.
   ========================================================================== */

/* Follows the action row directly, so no extra space above. Capped at the
   reading measure so the tab underline lines up with the text below it. */
.sermon-tabs {
	/* One reading size for the Overview, Scripture and Transcript text, so
	   switching tabs doesn't jump sizes. The outline scales on its own
	   (--outline-scale). */
	/* --rv-reading-scale is the reader's own text size (A− / A+). */
	--sermon-reading-size: calc(var(--text-m) * 1.0625 * var(--rv-reading-scale, 1));
	max-inline-size: 42rem;
	margin-block: 0 var(--space-xl);
}

.single-layout__main .sermon-tabs__panel :is(p, li) {
	max-inline-size: none;
}

/* Scrolls sideways on narrow screens. The baseline is an inset shadow
   rather than a border, and the tabs don't hang below it, so nothing
   overflows vertically — overflow-x: auto would otherwise make the row
   scroll up and down by a pixel or two. */
.sermon-tabs__list {
	display: flex;
	flex: 1;
	min-inline-size: 0;
	gap: 1.5rem;
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: none;
}

/* The tab row with the text-size buttons at its end; the baseline runs
   under both. */
.sermon-tabs__bar {
	display: flex;
	align-items: center;
	gap: var(--space-s);
	box-shadow: inset 0 -1px 0 var(--card-border-color);
}

.sermon-tabs--single .sermon-tabs__bar {
	justify-content: flex-end;
	box-shadow: none;
}

.sermon-tabs__size {
	margin-inline-start: auto;
}

.sermon-tabs__list::-webkit-scrollbar {
	display: none;
}

.sermon-tabs .sermon-tabs__tab {
	all: unset;
	box-sizing: border-box;
	display: inline-flex;
	flex: none;
	align-items: baseline;
	gap: 0.375rem;
	padding-block: 0.625rem;
	border-block-end: 2px solid transparent;
	color: var(--rv-text-muted);
	font-family: var(--text-font-family);
	font-size: var(--rv-text-smm);
	font-weight: var(--rv-weight-meta);
	line-height: 1.4;
	white-space: nowrap;
	cursor: pointer;
	transition: color var(--transition-duration) var(--transition-timing),
		border-color var(--transition-duration) var(--transition-timing);
}

.sermon-tabs .sermon-tabs__tab:hover {
	color: var(--text-color);
}

.sermon-tabs .sermon-tabs__tab[aria-selected="true"] {
	border-block-end-color: currentColor;
	color: var(--text-color);
}

/* Inside the row, so the clipped overflow doesn't cut the ring off. */
.sermon-tabs .sermon-tabs__tab:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: -2px;
	border-radius: 2px;
}

.sermon-tabs__panel {
	padding-block-start: var(--space-m);
}

/* Overview in sans, like the rest of the page's UI copy rather than the
   serif reading text. Covers the introduction and the excerpt fallback. */
.single-layout__main .sermon-tabs__panel--overview :is(p, li) {
	font-family: var(--text-font-family);
	font-weight: 400;
	line-height: var(--text-line-height, calc(10px + 2ex));
}

.single-layout__main .sermon-tabs__panel--overview > div > p {
	margin-block-end: var(--space-s);
	font-size: var(--sermon-reading-size);
}

.sermon-tabs--single .sermon-tabs__panel {
	padding-block-start: 0;
}

.sermon-tabs__panel:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

.sermon-tabs__panel[hidden] {
	display: none;
}

/* Last block in a panel: no trailing gap before the panel ends. */
.single-layout__main .sermon-tabs__panel .sermon-intro > :last-child,
.single-layout__main .sermon-tabs__panel .sermon-excerpt > :last-child,
.single-layout__main .sermon-tabs__panel .sermon-content__body > :last-child,
.sermon-tabs__panel .bible-text__scripture > :last-child {
	margin-block-end: 0;
}

.sermon-tabs .sermon-tabs__passage {
	margin: 0 0 var(--space-xs);
	font-family: var(--text-font-family);
	font-size: var(--rv-text-sm);
	font-weight: var(--rv-weight-semibold);
	letter-spacing: 0.02em;
	color: var(--rv-text-muted);
}

/* "Back to top" lands on the tabs, clear of the sticky site header. */
.sermon-tabs {
	scroll-margin-block-start: calc(var(--header-height, 85px) + var(--space-s, 1rem));
}

.single-layout__main .sermon-tabs .sermon-tabs__top {
	margin: var(--space-l) 0 0;
	padding-block-start: var(--space-s);
	border-block-start: 1px solid var(--neutral-ultra-light);
	font-family: var(--text-font-family);
	font-size: var(--rv-text-sm);
	font-weight: var(--rv-weight-meta);
	line-height: 1.4;
}

.sermon-tabs .sermon-tabs__top a {
	display: inline-flex;
	align-items: center;
	gap: 0.3125rem;
	color: var(--rv-text-muted);
	text-decoration: none;
}

.sermon-tabs .sermon-tabs__top a:hover {
	color: var(--text-color);
}

.sermon-tabs .sermon-tabs__top svg {
	inline-size: 0.875rem;
	block-size: 0.875rem;
	fill: currentColor;
}

.sermon-tabs .sermon-tabs__version {
	font-weight: var(--rv-weight-meta);
}

/* --------------------------------------------------------------------------
   Scripture tab: formatted text (inc/helpers/sermon-scripture.php).
   A large chapter number leads each chapter, like a printed Bible; verse
   numbers are small and quiet. Scoped under .single-layout__main to beat
   the theme's paragraph rule there.
   -------------------------------------------------------------------------- */
.single-layout__main .bible-text__scripture--formatted .bible-text__para {
	margin: 0 0 0.75em;
	font-size: var(--sermon-reading-size);
}

.single-layout__main .bible-text__scripture--formatted .bible-text__para:last-child {
	margin-block-end: 0;
}

/* Clear the chapter number before the next paragraph or the links. */
.bible-text__scripture--formatted::after {
	content: "";
	display: block;
	clear: both;
}

/* Sized to span exactly two lines: its box (line-height plus top margin,
   about 2.5em of the text) stays under two text lines (about 2.9em), so
   the third line runs full width. */
.bible-text__scripture--formatted .bible-text__chapter {
	float: left;
	margin: 0.12em 0.2em 0 0;
	font-family: var(--heading-font-family);
	font-size: 2.75em;
	font-weight: 400;
	line-height: 0.8;
	color: var(--primary);
	font-variant-numeric: lining-nums;
}

.bible-text__scripture--formatted .bible-text__verse {
	margin-inline-end: 0.2em;
	font-family: var(--text-font-family);
	font-size: 0.6em;
	font-weight: var(--rv-weight-semibold);
	line-height: 0;
	color: var(--neutral-semi-light);
	font-variant-numeric: tabular-nums;
	vertical-align: super;
}

/* Links: Bible Gateway, other sermons. */
.single-layout__main .bible-text__links {
	display: flex;
	flex-wrap: wrap;
	/* Line the two links up on their text, whatever the icon or count
	   beside each one does to its box. */
	align-items: baseline;
	gap: 0.5rem 1.25rem;
	margin: var(--space-m) 0 0;
	font-family: var(--text-font-family);
	font-size: var(--rv-text-sm);
	font-weight: var(--rv-weight-meta);
	line-height: 1.4;
}

.bible-text__links .bible-text__link {
	display: inline-flex;
	align-items: baseline;
	margin: 0;
	line-height: inherit;
	gap: 0.3125rem;
	color: var(--text-color);
	text-decoration: underline;
	text-decoration-color: color-mix(in srgb, currentColor 30%, transparent);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.25em;
}

.bible-text__links .bible-text__link:hover {
	text-decoration-color: currentColor;
}

.bible-text__links .bible-text__link svg {
	flex: none;
	align-self: center;
	inline-size: 0.875rem;
	block-size: 0.875rem;
	fill: var(--neutral-semi-light);
}

.bible-text__links .bible-text__link-count {
	color: var(--neutral-semi-light);
	font: inherit;
}

/* ==========================================================================
   Sermon outline
   Mirrors the printed notes: point headers, then A. / 1. / a) / 1) from CSS
   counters on the design app's depth classes. Quotes swap their number for
   a quote mark; illustrations and cross-references keep their number and
   carry an inline chip. Markup: inc/helpers/sermon-outline.php.

   Selectors are scoped under .sermon-outline so they outrank the main
   column's paragraph rules (.single-layout__main :is(p, li) and
   .single-layout__content p), which set every p to large serif.
   ========================================================================== */


.sermon-outline {
	/* Every outline size is a rem value times this, so the whole outline
	   scales together and nested sizes don't compound. */
	--outline-scale: calc(1.15 * var(--rv-reading-scale, 1));
	--outline-indent: 1.5rem;
	--outline-start: 3.625rem;
	font-family: var(--text-font-family);
	color: var(--text-color);
}

/* Point header */
/* Ruled sections: a strong rule opens the outline, a hairline separates
   main points, and a faint one each lettered point (see --l0 below).
   Horizontal rules only. Main point titles are serif and larger, like
   chapter heads; the numeral is plain text, not a badge. */
.sermon-outline .sermon-outline__point {
	display: flex;
	align-items: baseline;
	gap: 0.625rem;
	margin: 1rem 0 0.25rem;
	padding-block: 0.875rem;
	/* Each main point is a section: a dark rule opens it, a hairline
	   sets its heading off from its lettered points. */
	border-block-start: 1px solid var(--neutral);
	border-block-end: 1px solid var(--card-border-color);
	counter-reset: outline-a;
}

/* The first section opens the outline the same way, just without the gap. */
.sermon-outline > .sermon-outline__point:first-child,
.sermon-outline > .sermon-outline__controls + .sermon-outline__point {
	margin-block-start: 0;
}

.sermon-outline .sermon-outline__num {
	flex: none;
	inline-size: 1.625rem;
	font-family: var(--heading-font-family);
	font-size: calc(0.9375rem * var(--outline-scale));
	font-weight: 400;
	line-height: 1;
	color: var(--neutral-semi-light);
}

.sermon-outline .sermon-outline__num::after {
	content: ".";
}

.sermon-outline .sermon-outline__title {
	margin: 0;
	font-family: var(--heading-font-family);
	font-size: calc(1.1875rem * var(--outline-scale));
	font-weight: 400;
	line-height: 1.25;
}

.sermon-outline .sermon-outline__passage {
	margin-inline-start: auto;
}

.sermon-outline .sermon-outline__passage,
.sermon-outline .sermon-outline__ref {
	display: inline-block;
	padding: 0.0625rem 0.375rem;
	border-radius: 0.25rem;
	background: var(--neutral-ultra-light);
	color: var(--rv-text-muted);
	font-size: calc(0.6875rem * var(--outline-scale));
	font-weight: var(--rv-weight-meta);
	line-height: 1.5;
	white-space: nowrap;
}

/* Lines */
.sermon-outline .sermon-outline__line {
	position: relative;
	margin: 0;
	padding-block: 0.125rem;
	font-size: calc(0.8125rem * var(--outline-scale));
	line-height: 1.5;
	font-family: var(--text-font-family);
	font-weight: 400;
	text-wrap: pretty;
}

.sermon-outline .sermon-outline__line::before,
.sermon-outline .sermon-outline__mark {
	position: absolute;
	inset-inline-end: calc(100% + 0.5rem);
	inset-block-start: 0.1875rem;
	color: var(--neutral-semi-light);
	font-size: calc(0.75rem * var(--outline-scale));
	font-weight: 400;
	font-variant-numeric: tabular-nums;
	line-height: 1.5;
	white-space: nowrap;
}

.sermon-outline .sermon-outline__mark {
	display: inline-flex;
	inset-block-start: 0.125rem;
}

.sermon-outline .sermon-outline__line--l0 {
	/* Faint rule above each lettered point, except right under a main
	   point's title. The marker moves down with the padding. */
	--l0-pad: 0.5rem;
	margin-block-start: 0.625rem;
	padding-block-start: var(--l0-pad);
	border-block-start: 1px solid var(--neutral-ultra-light);
	margin-inline-start: var(--outline-start);
	font-size: calc(0.875rem * var(--outline-scale));
	/* Medium, not bold: the main point titles above should lead. */
	font-weight: 500;
	counter-increment: outline-a;
	counter-reset: outline-b;
}

.sermon-outline .sermon-outline__line--l0::before {
	content: counter(outline-a, upper-alpha) ".";
	inset-block-start: calc(var(--l0-pad) + 0.0625rem);
}

.sermon-outline .sermon-outline__line--l0 .sermon-outline__mark {
	inset-block-start: var(--l0-pad);
}

.sermon-outline .sermon-outline__point + .sermon-outline__line--l0 {
	--l0-pad: 0.125rem;
	margin-block-start: 0.5rem;
	border-block-start: 0;
}

.sermon-outline .sermon-outline__line--l1 {
	margin-inline-start: calc(var(--outline-start) + var(--outline-indent));
	counter-increment: outline-b;
	counter-reset: outline-c;
}

.sermon-outline .sermon-outline__line--l1::before {
	content: counter(outline-b) ".";
}

.sermon-outline .sermon-outline__line--l2 {
	margin-inline-start: calc(var(--outline-start) + var(--outline-indent) * 2);
	color: var(--rv-text-muted);
	counter-increment: outline-c;
	counter-reset: outline-d;
}

.sermon-outline .sermon-outline__line--l2::before {
	content: counter(outline-c, lower-alpha) ")";
}

.sermon-outline .sermon-outline__line--l3 {
	margin-inline-start: calc(var(--outline-start) + var(--outline-indent) * 3);
	color: var(--rv-text-muted);
	counter-increment: outline-d;
}

.sermon-outline .sermon-outline__line--l3::before {
	content: counter(outline-d) ")";
}

/* Level 4 and deeper: an outlined circle bullet, still stepping in, capped
   at level 6 so the deepest lines keep a readable width. */
.sermon-outline .sermon-outline__line--deep {
	color: var(--rv-text-muted);
	counter-increment: none;
}

.sermon-outline .sermon-outline__line--l4 {
	margin-inline-start: calc(var(--outline-start) + var(--outline-indent) * 4);
}

.sermon-outline .sermon-outline__line--l5 {
	margin-inline-start: calc(var(--outline-start) + var(--outline-indent) * 5);
}

.sermon-outline .sermon-outline__line--l6 {
	margin-inline-start: calc(var(--outline-start) + var(--outline-indent) * 6);
}

.sermon-outline .sermon-outline__line--deep::before {
	content: "";
	inset-block-start: 0.5625rem;
	inset-inline-end: calc(100% + 0.625rem);
	width: 0.3125rem;
	height: 0.3125rem;
	border: 1px solid currentColor;
	border-radius: 50%;
}

/* Lines with no depth class (older outlines): indented, no marker. */
.sermon-outline .sermon-outline__line--plain {
	margin-inline-start: var(--outline-start);
}

/* Quotes take a quote mark instead of a number, and don't count. */
.sermon-outline .sermon-outline__line.is-quote {
	counter-increment: none;
}

.sermon-outline .sermon-outline__line.is-quote::before,
.sermon-outline .sermon-outline__line--deep.is-quote::before {
	content: none;
}

/* Same font as the line, just italic: switching to the serif mid-line
   was distracting. Weight and size follow the line. */
.sermon-outline .sermon-outline__quote,
.sermon-outline .sermon-outline__term {
	font-family: inherit;
	font-style: italic;
	font-size: inherit;
	font-weight: inherit;
}

.sermon-outline .sermon-outline__quote {
	color: var(--text-color);
	line-height: 1.55;
}

.sermon-outline .sermon-outline__author {
	display: block;
	margin-block-start: 0.125rem;
	color: var(--rv-text-muted);
	font-size: calc(0.75rem * var(--outline-scale));
}

.sermon-outline .sermon-outline__line.is-question {
	color: var(--text-color);
	font-weight: 500;
}

/* Icon chips: illustrations outlined, Scripture filled. */
.sermon-outline .sermon-outline__chip {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.0625rem 0.4375rem 0.0625rem 0.3125rem;
	border: 1px solid var(--card-border-color);
	border-radius: 999px;
	color: var(--text-color);
	font-size: calc(0.75rem * var(--outline-scale));
	font-weight: var(--rv-weight-meta);
	line-height: 1.4;
	white-space: nowrap;
	vertical-align: 0.0625rem;
}

.sermon-outline .sermon-outline__chip svg {
	flex: none;
	width: 0.8125rem;
	height: 0.8125rem;
	fill: var(--rv-text-muted);
}

.sermon-outline .sermon-outline__chip--scripture {
	border-color: transparent;
	background: var(--neutral-ultra-light);
}

.sermon-outline .sermon-outline__mark svg {
	width: 0.9375rem;
	height: 0.9375rem;
	fill: currentColor;
}

/* --------------------------------------------------------------------------
   Bible references with a Reftagger popup (Outline and Transcript only;
   see the script in main--sermon.php). Linked chips keep the chip look,
   with a dotted underline as the hover hint; references Reftagger finds
   in running text get the same quiet underline, not full link styling.
   -------------------------------------------------------------------------- */
.sermon-outline a.sermon-outline__ref,
.sermon-outline a.rtBibleRef {
	color: inherit;
	text-decoration: underline dotted;
	text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
	text-underline-offset: 0.2em;
	cursor: help;
}

.sermon-outline a.sermon-outline__ref:hover,
.sermon-outline a.rtBibleRef:hover {
	color: var(--text-color);
	text-decoration-color: currentColor;
}

.single-layout__main .sermon-tabs__panel--transcript a.rtBibleRef {
	color: inherit;
	font-weight: inherit;
	text-decoration: underline dotted;
	text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
	text-underline-offset: 0.2em;
}

/* --------------------------------------------------------------------------
   Collapsing: lettered points are toggles; their detail opens beneath.
   Markup from revival_format_sermon_outline(). The letter stays in the
   left margin (::before); the chevron sits just outside it.
   -------------------------------------------------------------------------- */
.single-layout__main .sermon-outline .sermon-outline__controls {
	display: flex;
	justify-content: flex-end;
	margin: 0 0 0.5rem;
	font-family: var(--text-font-family);
	font-size: calc(0.75rem * var(--outline-scale));
	font-weight: 400;
	line-height: 1.4;
}

.sermon-outline .sermon-outline__all {
	all: unset;
	cursor: pointer;
	color: var(--rv-text-muted);
	text-decoration: underline;
	text-decoration-color: color-mix(in srgb, currentColor 30%, transparent);
	text-underline-offset: 0.25em;
}

.sermon-outline .sermon-outline__all:hover {
	color: var(--text-color);
}

.sermon-outline .sermon-outline__toggle {
	all: unset;
	box-sizing: border-box;
	cursor: pointer;
	display: inline;
	font: inherit;
	color: inherit;
}

.sermon-outline .sermon-outline__toggle:focus-visible,
.sermon-outline .sermon-outline__all:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
	border-radius: 2px;
}

.sermon-outline .sermon-outline__toggle:hover .sermon-outline__label {
	text-decoration: underline;
	text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
	text-underline-offset: 0.2em;
}

/* Chevron in the margin, left of the letter. */
.sermon-outline .sermon-outline__chev {
	position: absolute;
	inset-inline-end: calc(100% + 1.625rem);
	inset-block-start: calc(var(--l0-pad, 0.125rem) + 0.1875rem);
	display: inline-flex;
	color: var(--neutral-semi-light);
	transition: transform var(--transition-duration, 0.2s) var(--transition-timing, ease);
}

.sermon-outline .sermon-outline__chev svg {
	inline-size: calc(0.875rem * var(--outline-scale));
	block-size: calc(0.875rem * var(--outline-scale));
	fill: currentColor;
}

.sermon-outline .sermon-outline__toggle[aria-expanded="true"] .sermon-outline__chev {
	transform: rotate(90deg);
}

.sermon-outline .sermon-outline__detail {
	padding-block-end: 0.25rem;
}

/* Narrow screens: no room in the margin, so the chevron sits at the right
   edge of the row, level with the first line; the text keeps clear of it. */
@media (max-width: 520px) {
	.sermon-outline .sermon-outline__line--l0.is-collapsible {
		padding-inline-end: 1.5rem;
	}

	.sermon-outline .sermon-outline__chev {
		inset-inline-start: auto;
		inset-inline-end: 0;
	}
}
}

@media (max-width: 520px) {
	.sermon-outline {
		--outline-start: 1.375rem;
		--outline-indent: 1.25rem;
	}
}

/* Transcript: the shared reading size (see .sermon-tabs). Scoped to
   outrank .single-layout__main :is(p, li). */
.single-layout__main .sermon-tabs__panel--transcript .sermon-content__body :is(p, li) {
	font-size: var(--sermon-reading-size);
	line-height: var(--text-line-height, calc(10px + 2ex));
}

/* ==========================================================================
   Study guide (Study Guide tab). Markup: revival_format_study_guide().
   Same language as the outline: a rule above each section heading, numbers
   and letters in the margin, the passage as a chip. Scoped under
   .single-layout__main to beat the theme's paragraph rule there.
   ========================================================================== */
.study-guide {
	--sg-indent: 2rem;

	font-family: var(--text-font-family);
	color: var(--text-color);
}

.single-layout__main .study-guide p {
	margin: 0;
	font-family: var(--text-font-family);
	font-size: calc(1rem * var(--rv-reading-scale, 1));
	font-weight: 400;
	line-height: 1.5;
}

/* Main point: the warm band from the Related Sermons panel. */
.study-guide .study-guide__main {
	margin-block-end: 0.5rem;
	padding: 0.875rem 1rem;
	border-radius: var(--radius, 8px);
	background: #f4f2ef;
}

.color-scheme--alt .study-guide .study-guide__main {
	background: #1f1d1b;
}

.single-layout__main .study-guide .study-guide__main-label {
	margin-block-end: 0.25rem;
	color: var(--primary);
	font-size: calc(0.6875rem * var(--rv-reading-scale, 1));
	font-weight: var(--rv-weight-semibold);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.single-layout__main .study-guide .study-guide__main-text {
	font-family: var(--heading-font-family);
	font-size: calc(1.25rem * var(--rv-reading-scale, 1));
	line-height: 1.35;
}

/* Section: Introduction, Understanding, Application. */
.study-guide .study-guide__section {
	margin-block-start: 1.25rem;
	padding-block: 0.875rem;
	border-block-start: 1px solid var(--neutral);
	border-block-end: 1px solid var(--card-border-color);
}

.single-layout__main .study-guide .study-guide__section-title {
	font-family: var(--heading-font-family);
	font-size: calc(1.375rem * var(--rv-reading-scale, 1));
	line-height: 1.25;
}

/* Numbered study point with its passage. */
.study-guide .study-guide__point {
	display: flex;
	align-items: baseline;
	gap: 0.625rem;
	margin-block: 1.125rem 0.375rem;
}

.study-guide .study-guide__num {
	flex: none;
	inline-size: 1.375rem;
	font-family: var(--heading-font-family);
	color: var(--neutral-semi-light);
}

.single-layout__main .study-guide .study-guide__point-title {
	font-weight: 500;
	font-size: calc(1.0625rem * var(--rv-reading-scale, 1));
}

.study-guide .study-guide__passage {
	flex: none;
	margin-inline-start: auto;
	padding: 0.0625rem 0.375rem;
	border-radius: 0.25rem;
	background: var(--neutral-ultra-light);
	color: var(--rv-text-muted);
	font-size: calc(0.75rem * var(--rv-reading-scale, 1));
	white-space: nowrap;
}

/* Questions: letter in the margin; sub-items (i., ii.) one step in. */
.study-guide .study-guide__q,
.study-guide .study-guide__bullet {
	display: flex;
	gap: 0.625rem;
	margin-block: 0.5rem;
}

.study-guide .study-guide__q {
	margin-inline-start: var(--sg-indent);
}

.study-guide .study-guide__q--sub {
	margin-inline-start: calc(var(--sg-indent) * 2);
}

.study-guide .study-guide__mark {
	flex: none;
	inline-size: 1.25rem;
	color: var(--neutral-semi-light);
	text-align: end;
	font-variant-numeric: tabular-nums;
	line-height: 1.5;
}

.study-guide .study-guide__bullet .study-guide__mark {
	color: var(--primary);
	text-align: center;
}

.single-layout__main .study-guide .study-guide__text {
	margin-block: 0.5rem;
}

.single-layout__main .study-guide .study-guide__note {
	margin-block-start: 1.5rem;
	color: var(--neutral-semi-light);
	font-size: calc(0.75rem * var(--rv-reading-scale, 1));
}

@media (max-width: 520px) {
	.study-guide {
		--sg-indent: 0.75rem;
	}

	.study-guide .study-guide__point {
		flex-wrap: wrap;
	}

	.study-guide .study-guide__passage {
		margin-inline-start: 0;
	}
}

/* Commentary keeps its own sizes; the reader's text size scales them as a whole. */
.single-layout__main .sermon-tabs__panel--commentary {
	font-size: calc(100% * var(--rv-reading-scale, 1));
}
