/*
 * The week's lesson, on the church site — built for a visitor.
 *
 * The test it has to pass: someone who has never seen a Sunday school manual
 * opens this on a phone, and within one screen knows what the lesson is, where
 * it comes from, and can start reading — or jump to the part they want.
 *
 * Cream paper, the church green, a serif for the Word and a clear sans around
 * it. Every rule is scoped to .rccg-lesson, so the theme is never touched.
 */

.rccg-lesson {
	--rl-green: #1f4a38;
	--rl-green-deep: #16362a;
	--rl-green-soft: #2f6b52;
	--rl-cream: #fbf8f2;
	--rl-paper: #ffffff;
	--rl-ink: #24221f;
	--rl-muted: #6c665c;
	--rl-line: #e6dfd2;
	--rl-gold: #a9863f;
	--rl-gold-soft: #f3ead8;

	max-width: 44rem;
	margin: 0 auto;
	color: var(--rl-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 1.0625rem;
	line-height: 1.7;
	-webkit-text-size-adjust: 100%;
}

/* --------------------------------------------------------------- the head */

.rccg-lesson .rl-head {
	padding: 1.7rem 1.7rem 1.5rem;
	background: linear-gradient(160deg, var(--rl-green) 0%, var(--rl-green-deep) 100%);
	color: #f7f3ea;
	border-radius: 6px 6px 0 0;
}

.rccg-lesson .rl-eyebrow {
	margin: 0 0 .6rem;
	font-size: .74rem;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: #cfc3a6;
	font-weight: 700;
}

.rccg-lesson .rl-topic {
	margin: 0 0 1.15rem;
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(1.6rem, 5.4vw, 2.3rem);
	line-height: 1.16;
	font-weight: 700;
	letter-spacing: -.015em;
	color: #ffffff;
}

/* the facts, as a small grid a thumb can read */
.rccg-lesson .rl-facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
	gap: .85rem 1.2rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rccg-lesson .rl-facts li {
	display: block;
	min-width: 0;
}

.rccg-lesson .rl-facts span {
	display: block;
	font-size: .68rem;
	letter-spacing: .13em;
	text-transform: uppercase;
	color: #c8bc9f;
	font-weight: 700;
	margin-bottom: .18rem;
}

.rccg-lesson .rl-facts strong {
	display: block;
	font-size: .95rem;
	font-weight: 600;
	line-height: 1.35;
	color: #ffffff;
}

/* ------------------------------------------------------- the memory verse */

.rccg-lesson .rl-memory {
	position: relative;
	margin: 0;
	padding: 1.35rem 1.7rem 1.35rem 2.7rem;
	background: var(--rl-cream);
	border-left: 4px solid var(--rl-gold);
}

.rccg-lesson .rl-memory__label {
	margin: 0 0 .45rem;
	font-size: .68rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--rl-gold);
}

.rccg-lesson .rl-memory__text {
	margin: 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.1rem;
	line-height: 1.62;
	font-style: italic;
	color: #2b2823;
}

/* the quotation mark, drawn rather than typed */
.rccg-lesson .rl-memory::before {
	content: "\201C";
	position: absolute;
	top: 1.9rem;
	left: 1rem;
	font-family: Georgia, serif;
	font-size: 2.6rem;
	line-height: 1;
	color: var(--rl-gold);
	opacity: .45;
}

/* ---------------------------------------------------------- the passage */

.rccg-lesson .rl-passage-toggle {
	padding: 0 1.7rem;
	background: var(--rl-cream);
	border-left: 4px solid var(--rl-gold);
}

.rccg-lesson .rl-passage-toggle details {
	border-top: 1px solid var(--rl-line);
}

.rccg-lesson .rl-passage-toggle summary {
	padding: .9rem 0;
	cursor: pointer;
	font-size: .92rem;
	font-weight: 600;
	color: var(--rl-green);
	list-style: none;
	display: flex;
	align-items: center;
	gap: .5rem;
}

.rccg-lesson .rl-passage-toggle .rl-ref {
	white-space: nowrap;
	font-weight: 700;
	color: var(--rl-green-deep);
}

/* the label and the reference read as one sentence, so they wrap together */
.rccg-lesson .rl-passage-toggle summary {
	flex-wrap: wrap;
	line-height: 1.45;
}

.rccg-lesson .rl-passage-toggle summary::-webkit-details-marker {
	display: none;
}

.rccg-lesson .rl-passage-toggle summary::before {
	content: "+";
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.15rem;
	height: 1.15rem;
	font-size: .95rem;
	line-height: 1;
	border-radius: 50%;
	background: var(--rl-green);
	color: #fff;
	flex: 0 0 auto;
}

.rccg-lesson .rl-passage-toggle details[open] summary::before {
	content: "\2212";
}

.rccg-lesson .rl-passage-toggle p {
	margin: 0 0 .8rem;
	padding-left: 1.65rem;
	font-family: Georgia, "Times New Roman", serif;
	font-size: .97rem;
	line-height: 1.7;
	color: #33302a;
}

.rccg-lesson .rl-passage-toggle p:last-child {
	padding-bottom: .9rem;
}

/* --------------------------------------------------------- what's inside */

.rccg-lesson .rl-contents {
	margin: 0;
	padding: 1.4rem 1.7rem 1.2rem;
	background: var(--rl-paper);
	border: 1px solid var(--rl-line);
	border-top: 0;
}

.rccg-lesson .rl-contents__title {
	margin: 0 0 .8rem;
	font-size: .7rem;
	letter-spacing: .15em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--rl-muted);
}

.rccg-lesson .rl-contents ol {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
}

.rccg-lesson .rl-contents li {
	margin: 0;
}

.rccg-lesson .rl-contents a {
	display: flex;
	align-items: baseline;
	gap: .75rem;
	padding: .55rem 0;
	border-bottom: 1px solid #f1ece2;
	color: var(--rl-ink);
	text-decoration: none;
	font-size: .97rem;
	line-height: 1.4;
}

.rccg-lesson .rl-contents li:last-child a {
	border-bottom: 0;
}

.rccg-lesson .rl-contents a:hover .rl-contents__t,
.rccg-lesson .rl-contents a:focus .rl-contents__t {
	color: var(--rl-green-soft);
	text-decoration: underline;
	text-underline-offset: .2em;
}

.rccg-lesson .rl-contents__n {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 50%;
	background: var(--rl-gold-soft);
	color: var(--rl-gold);
	font-size: .78rem;
	font-weight: 700;
	line-height: 1;
}

.rccg-lesson .rl-contents__t {
	min-width: 0;
}

/* ---------------------------------------------------------- the lesson */

.rccg-lesson .rl-body {
	padding: 0 1.7rem 1.2rem;
	background: var(--rl-paper);
	border: 1px solid var(--rl-line);
	border-top: 0;
	border-radius: 0 0 6px 6px;
}

.rccg-lesson .rl-part {
	padding: 1.6rem 0 0;
	margin: 0;
	scroll-margin-top: 5rem;
}

.rccg-lesson .rl-part + .rl-part {
	border-top: 1px solid #f1ece2;
	margin-top: 1.6rem;
}

.rccg-lesson .rl-part__head {
	display: flex;
	align-items: baseline;
	gap: .7rem;
	margin: 0 0 .9rem;
}

.rccg-lesson .rl-part__n {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.6rem;
	height: 1.6rem;
	border-radius: 50%;
	background: var(--rl-green);
	color: #fff;
	font-size: .78rem;
	font-weight: 700;
	line-height: 1;
	transform: translateY(-.1em);
}

.rccg-lesson .rl-part__head h3 {
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.3;
	font-weight: 700;
	letter-spacing: -.005em;
	color: var(--rl-green);
}

.rccg-lesson .rl-part__text p {
	margin: 0 0 .9rem;
}

.rccg-lesson .rl-part__text p:last-child {
	margin-bottom: 0;
}

/* A. B. C. points, set apart so the outline is scanned, not waded through */
.rccg-lesson .rl-point {
	padding-left: .9rem;
	border-left: 2px solid #eadfc9;
}

.rccg-lesson .rl-part__text ol {
	margin: .2rem 0 1rem;
	padding: 0;
	list-style: none;
}

.rccg-lesson .rl-part__text ol li {
	position: relative;
	margin: 0 0 .55rem;
	padding-left: 1.15rem;
}

.rccg-lesson .rl-part__text ol li::before {
	content: "";
	position: absolute;
	left: .15rem;
	top: .68em;
	width: .36rem;
	height: .36rem;
	border-radius: 50%;
	background: var(--rl-green-soft);
}

/* the introduction reads a little larger, like the opening of a letter */
.rccg-lesson .rl-part--intro .rl-part__text p {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.1rem;
	line-height: 1.75;
	color: #2c2a25;
}

/* a discussion point is a task, so it looks like one */
.rccg-lesson .rl-part--activity {
	margin-top: 1.4rem;
	padding: 1.15rem 1.25rem;
	background: #f3f7f3;
	border: 1px solid #d5e2d8;
	border-radius: 5px;
}

.rccg-lesson .rl-part--activity .rl-part__head {
	margin-bottom: .5rem;
}

.rccg-lesson .rl-part--activity .rl-part__n {
	background: var(--rl-green-soft);
}

.rccg-lesson .rl-part--activity .rl-part__head h3 {
	font-size: 1rem;
}

/* the conclusion and the assignment are to be carried home */
.rccg-lesson .rl-part--close .rl-part__n {
	background: var(--rl-gold);
}

.rccg-lesson .rl-part--close .rl-part__head h3 {
	color: var(--rl-gold);
}

/* ------------------------------------------------- the class's own word */

.rccg-lesson .rl-note {
	margin: 1.4rem 0 0;
	padding: 1.25rem 1.5rem;
	background: var(--rl-cream);
	border: 1px solid var(--rl-line);
	border-radius: 6px;
}

.rccg-lesson .rl-note h3 {
	margin: 0 0 .6rem;
	font-size: .72rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--rl-green);
}

.rccg-lesson .rl-note p {
	margin: 0 0 .6rem;
}

/* ------------------------------------------------------------- next week */

.rccg-lesson .rl-next {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .2rem .7rem;
	margin: 1.4rem 0 0;
	padding: 1.1rem 1.5rem;
	background: var(--rl-cream);
	border: 1px solid var(--rl-line);
	border-left: 4px solid var(--rl-green-soft);
	border-radius: 6px;
}

.rccg-lesson .rl-next span {
	width: 100%;
	font-size: .68rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--rl-muted);
	font-weight: 700;
}

.rccg-lesson .rl-next strong {
	font-family: Georgia, serif;
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--rl-ink);
}

.rccg-lesson .rl-next em {
	font-style: normal;
	font-size: .92rem;
	color: var(--rl-muted);
}

/* ------------------------------------------------------------------ foot */

.rccg-lesson .rl-foot {
	margin: 1.1rem 0 0;
	font-size: .82rem;
	line-height: 1.65;
	color: var(--rl-muted);
}

/* the week the manual has not published yet */
.rccg-lesson--waiting {
	padding: 1.7rem;
	background: var(--rl-cream);
	border: 1px solid var(--rl-line);
	border-radius: 6px;
}

.rccg-lesson--waiting .rl-eyebrow {
	color: var(--rl-muted);
}

.rccg-lesson--waiting .rl-topic {
	margin-bottom: .9rem;
	font-size: 1.5rem;
	color: var(--rl-green);
}

.rccg-lesson--waiting p:last-child {
	margin-bottom: 0;
}

/* ------------------------------------------------------------------ phone */

@media (max-width: 600px) {
	.rccg-lesson {
		font-size: 1.03rem;
		line-height: 1.68;
		/*
		 * A little air at the sides. Some themes let a page run edge to edge on
		 * a phone; without this the lesson would too, and text set hard against
		 * the glass is hard to read.
		 */
		padding: 0 14px;
	}

	.rccg-lesson .rl-head {
		padding: 1.3rem 1.15rem 1.2rem;
		border-radius: 4px 4px 0 0;
	}

	.rccg-lesson .rl-facts {
		grid-template-columns: 1fr 1fr;
		gap: .8rem 1rem;
	}

	.rccg-lesson .rl-memory {
		padding: 1.15rem 1.15rem 1.15rem 2.15rem;
	}

	.rccg-lesson .rl-memory::before {
		left: .55rem;
		top: 1.7rem;
		font-size: 2.1rem;
	}

	.rccg-lesson .rl-memory__text {
		font-size: 1.04rem;
	}

	.rccg-lesson .rl-passage-toggle,
	.rccg-lesson .rl-contents,
	.rccg-lesson .rl-body {
		padding-left: 1.15rem;
		padding-right: 1.15rem;
	}

	.rccg-lesson .rl-passage-toggle p {
		padding-left: 0;
	}

	.rccg-lesson .rl-part + .rl-part {
		margin-top: 1.4rem;
		padding-top: 1.4rem;
	}

	.rccg-lesson .rl-part--activity {
		padding: 1rem 1rem;
	}

	.rccg-lesson .rl-note,
	.rccg-lesson .rl-next {
		padding: 1.1rem 1.15rem;
	}
}

/* printing: it is a lesson sheet, after all */
@media print {
	.rccg-lesson .rl-head {
		background: #fff !important;
		color: #000 !important;
		border: 1px solid #ccc;
	}

	.rccg-lesson .rl-topic,
	.rccg-lesson .rl-facts strong {
		color: #000 !important;
	}

	.rccg-lesson .rl-contents,
	.rccg-lesson .rl-passage-toggle summary::before {
		display: none !important;
	}

	.rccg-lesson .rl-body,
	.rccg-lesson .rl-note,
	.rccg-lesson .rl-next {
		border-color: #ccc;
	}
}
