/*
 * Chiggle Academy — TutorLMS single-course + single-lesson restyle.
 *
 * Phase 5b-3 scope:
 *   - Course archive single (`/courses/chiggle-academy/`): hide Astra
 *     page title, brand the progress sidebar, recolour buttons, gold
 *     tab underlines.
 *   - Lesson single (`/courses/.../lessons/...`): brand the top bar,
 *     left sidebar module list, lesson content, Mark-as-Complete CTA.
 *
 * Loaded globally — scoped via `.tutor-*` selectors so it only takes
 * effect on TutorLMS pages.
 *
 * Specificity discipline: !important on backgrounds + colours of the
 * load-bearing visuals. Geometry left at natural specificity.
 */

/* ═════════════════════════════════════════════════════════
 * SUPPRESS ASTRA WRAPPER ON COURSE / LESSON PAGES
 * ═════════════════════════════════════════════════════════ */

.single-courses .entry-header,
.single-courses .ast-archive-description,
.single-lesson .entry-header,
.tutor-single-course-wrapper .entry-header,
body.single-courses .ast-container > article > header,
body.single-lesson .ast-container > article > header {
	display: none !important;
}

.single-courses .ast-container,
.single-lesson .ast-container {
	max-width: none !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.single-courses .entry-content,
.single-lesson .entry-content {
	max-width: none;
	margin: 0;
}

body.single-courses,
body.single-lesson {
	background: var(--offwhite) !important;
}

/* ═════════════════════════════════════════════════════════
 * COURSE SINGLE PAGE
 * ═════════════════════════════════════════════════════════ */

.tutor-single-course,
.tutor-single-course-wrapper {
	padding: 40px 24px 80px !important;
	background: var(--offwhite) !important;
}
.tutor-single-course .tutor-container,
.tutor-single-course-wrapper .tutor-container {
	max-width: 1200px !important;
	margin: 0 auto !important;
}

/* Course title (the one TutorLMS renders inside its own template) */
.tutor-single-course .tutor-course-name,
.tutor-single-course-header h1,
.tutor-single-course-segment h1.tutor-fs-3,
.tutor-single-course-segment h1.tutor-fs-2 {
	font-family: var(--font-display) !important;
	font-weight: 800 !important;
	color: var(--navy) !important;
	letter-spacing: -0.025em;
	margin-bottom: 16px !important;
}

/* Category / breadcrumb */
.tutor-single-course .tutor-course-categories a,
.tutor-single-course-segment .tutor-color-secondary {
	color: var(--gray-500) !important;
}

/* Featured image / video container */
.tutor-single-course .tutor-course-thumbnail,
.tutor-single-course-wrapper .tutor-course-thumbnail {
	border-radius: var(--radius-lg) !important;
	overflow: hidden;
	background: var(--gray-100) !important;
	border: 1px solid var(--gray-200) !important;
}

/* Right-side Course Progress / enrolment card */
.tutor-course-sidebar-card,
.tutor-single-course-wrapper .tutor-card,
.tutor-single-course .tutor-card {
	border-radius: var(--radius-lg) !important;
	border: 1px solid var(--gray-200) !important;
	background: white !important;
	box-shadow: var(--shadow-sm) !important;
	overflow: hidden;
}

.tutor-course-sidebar-card .tutor-card-title,
.tutor-single-course h3,
.tutor-single-course h4 {
	font-family: var(--font-display) !important;
	color: var(--navy) !important;
	font-weight: 700 !important;
}

/* Course progress bar in the sidebar */
.tutor-single-course .tutor-progress-bar {
	background: var(--gray-200) !important;
	height: 8px !important;
	border-radius: 999px !important;
	overflow: hidden;
}
.tutor-single-course .tutor-progress-value,
.tutor-single-course .tutor-progress-bar > .tutor-progress-value {
	background: linear-gradient(90deg, var(--gold), var(--gold-light)) !important;
	height: 100% !important;
	border-radius: 999px !important;
}

/* "Continue Learning" / "Complete Course" / "Start Learning" buttons */
.tutor-single-course .tutor-btn-primary,
.tutor-single-course .tutor-btn.tutor-btn-primary,
.tutor-single-course-wrapper .tutor-btn-primary,
.tutor-course-enroll-section .tutor-btn-primary {
	background: var(--gold) !important;
	color: var(--navy) !important;
	border-color: var(--gold) !important;
	font-weight: 700 !important;
	border-radius: var(--radius-sm) !important;
	padding: 12px 24px !important;
	text-decoration: none !important;
	transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.tutor-single-course .tutor-btn-primary:hover,
.tutor-course-enroll-section .tutor-btn-primary:hover {
	background: var(--gold-hover) !important;
	transform: translateY(-1px);
	box-shadow: var(--shadow-md) !important;
}

.tutor-single-course .tutor-btn-outline-primary,
.tutor-single-course .tutor-btn.tutor-btn-outline-primary {
	background: transparent !important;
	color: var(--navy) !important;
	border: 1.5px solid var(--gray-300) !important;
	border-radius: var(--radius-sm) !important;
	padding: 12px 24px !important;
	font-weight: 600 !important;
	text-decoration: none !important;
}
.tutor-single-course .tutor-btn-outline-primary:hover {
	border-color: var(--navy) !important;
	background: var(--gray-100) !important;
}

/* Wishlist / Share links */
.tutor-single-course .tutor-icon-bookmark-line,
.tutor-single-course .tutor-icon-share,
.tutor-single-course-actions a {
	color: var(--navy) !important;
	font-weight: 500;
}
.tutor-single-course-actions a:hover {
	color: var(--gold) !important;
}

/* Tabs (Course Info / Announcements / Curriculum) */
.tutor-tabs-list,
.tutor-tabs {
	border-bottom: 1px solid var(--gray-200) !important;
	margin-bottom: 24px !important;
}
.tutor-tabs-list .tutor-tab-list-item,
.tutor-tabs .tutor-nav-link,
.tutor-tabs-list a {
	font-family: var(--font-body) !important;
	font-weight: 600 !important;
	font-size: 0.9rem !important;
	color: var(--gray-500) !important;
	padding: 14px 20px !important;
	border-bottom: 3px solid transparent !important;
	transition: color 0.2s, border-color 0.2s;
	text-decoration: none !important;
}
.tutor-tabs-list .tutor-tab-list-item:hover,
.tutor-tabs .tutor-nav-link:hover {
	color: var(--navy) !important;
}
.tutor-tabs-list .tutor-tab-list-item.is-active,
.tutor-tabs-list .tutor-tab-list-item.active,
.tutor-tabs .tutor-nav-link.is-active,
.tutor-tabs .tutor-nav-link.active {
	color: var(--navy) !important;
	border-bottom-color: var(--gold) !important;
}

/* "About Course" / section headings inside tab panels */
.tutor-single-course-segment h2,
.tutor-tabs-tab h2 {
	font-family: var(--font-display) !important;
	font-weight: 700 !important;
	color: var(--navy) !important;
	font-size: 1.4rem !important;
	letter-spacing: -0.02em;
}

/* "You enrolled..." badge */
.tutor-single-course .tutor-color-success {
	color: var(--green) !important;
}

/* ═════════════════════════════════════════════════════════
 * LESSON SINGLE PAGE
 * ═════════════════════════════════════════════════════════ */

/* Page background */
.tutor-single-lesson,
.tutor-lesson-wrapper,
.tutor-lesson-page-wrapper {
	background: var(--offwhite) !important;
}

/* Top lesson header bar (the strip with "Chiggle Academy" + Mark as Complete) */
.tutor-lesson-header,
.tutor-lesson-content-header,
.tutor-course-spotlight-header {
	background: var(--navy) !important;
	border-bottom: 0 !important;
	padding: 16px 24px !important;
	color: white !important;
	box-shadow: var(--shadow-sm);
}
.tutor-lesson-header .tutor-course-name,
.tutor-lesson-header h2,
.tutor-lesson-header h3,
.tutor-course-spotlight-header .tutor-course-name {
	color: white !important;
	font-family: var(--font-display);
	font-weight: 700 !important;
	font-size: 1.05rem !important;
	letter-spacing: -0.01em;
}
.tutor-lesson-header a,
.tutor-lesson-header .tutor-iconic-btn,
.tutor-course-spotlight-header a {
	color: white !important;
}
.tutor-lesson-header .tutor-iconic-btn:hover {
	background: rgba(255, 255, 255, 0.08) !important;
}

/* "Mark as Complete" button in lesson header */
.tutor-lesson-header .tutor-btn-primary,
.tutor-course-spotlight-header .tutor-btn-primary,
.tutor-mark-as-complete-btn,
.tutor-btn.tutor-btn-primary[type="submit"][name="mark_as_complete"] {
	background: var(--gold) !important;
	color: var(--navy) !important;
	border: 0 !important;
	border-radius: var(--radius-sm) !important;
	padding: 10px 20px !important;
	font-weight: 700 !important;
}
.tutor-lesson-header .tutor-btn-outline-primary,
.tutor-course-spotlight-header .tutor-btn-outline-primary {
	background: transparent !important;
	color: white !important;
	border: 1.5px solid rgba(255, 255, 255, 0.3) !important;
	border-radius: var(--radius-sm) !important;
}

/* Left sidebar: Course Content + module list */
.tutor-course-topics-wrap,
.tutor-course-spotlight-sidebar,
.tutor-lesson-sidebar {
	background: white !important;
	border-right: 1px solid var(--gray-200) !important;
	padding: 0 !important;
}
.tutor-course-topics-wrap .tutor-course-topic-header,
.tutor-course-topic-header,
.tutor-course-topics-list-title {
	background: var(--offwhite) !important;
	border-bottom: 1px solid var(--gray-200) !important;
	padding: 16px 20px !important;
	font-family: var(--font-display) !important;
	font-weight: 700 !important;
	font-size: 0.95rem !important;
	color: var(--navy) !important;
}

/* Module rows */
.tutor-course-topics-wrap .tutor-course-topic-summary,
.tutor-course-topics-list-item,
.tutor-course-content-list-item {
	border-bottom: 1px solid var(--gray-100) !important;
	padding: 14px 20px !important;
	transition: background-color 0.2s;
}
.tutor-course-topics-wrap .tutor-course-topic-summary:hover,
.tutor-course-content-list-item:hover {
	background: var(--offwhite) !important;
}
.tutor-course-topics-wrap .tutor-course-topic-summary > a,
.tutor-course-content-list-item a {
	color: var(--charcoal) !important;
	font-weight: 500 !important;
	text-decoration: none !important;
}
.tutor-course-topics-wrap .tutor-course-topic-summary.tutor-active,
.tutor-course-content-list-item.tutor-active,
.tutor-course-content-list-item.active {
	background: rgba(255, 155, 3, 0.08) !important;
	border-left: 3px solid var(--gold) !important;
	padding-left: 17px !important;
}
.tutor-course-content-list-item.tutor-active a,
.tutor-course-content-list-item.active a {
	color: var(--navy) !important;
	font-weight: 700 !important;
}

/* Module completion count (1/1) */
.tutor-course-topics-wrap .tutor-course-topic-count,
.tutor-course-content-list-item .tutor-fs-7 {
	color: var(--gray-500) !important;
	font-size: 0.75rem !important;
	font-weight: 600 !important;
}

/* Lesson item icons (file, video, quiz) */
.tutor-course-content-list-item .tutor-icon-document,
.tutor-course-content-list-item .tutor-icon-video,
.tutor-course-content-list-item .tutor-icon-quiz {
	color: var(--gold) !important;
}

/* Main lesson content — adopt dashboard container sizing for
 * visual consistency. Previously capped at 880px reading width;
 * now follows the responsive --container-max system so lesson
 * pages match the dashboard / homepage. The reading-width
 * tradeoff is accepted; long lesson text can still wrap to a
 * comfortable line via inner block widths if needed. */
.tutor-lesson-content,
.tutor-course-spotlight-content {
	background: var(--offwhite) !important;
	padding: 48px var(--container-padding) !important;
	max-width: var(--container-max) !important;
	margin: 0 auto !important;
	width: 100%;
}
.tutor-lesson-content h1,
.tutor-lesson-content h2,
.tutor-lesson-content h3 {
	font-family: var(--font-display) !important;
	color: var(--navy) !important;
	font-weight: 700 !important;
	letter-spacing: -0.02em;
}
/* Brand §04: lesson H1/H2 = Nunito (headings/course names); H3
 * stays Poppins (card/sub-section title) from the rule above. */
.tutor-lesson-content h1,
.tutor-lesson-content h2 {
	font-family: var(--font-heading) !important;
}
.tutor-lesson-content p,
.tutor-course-spotlight-content p {
	font-size: 1rem;
	line-height: 1.7;
	color: var(--charcoal);
}

/* Empty/placeholder lesson body */
.tutor-lesson-content > .tutor-fs-6,
.tutor-course-spotlight-content > p:only-child {
	background: white;
	border: 1px solid var(--gray-200);
	border-radius: var(--radius-md);
	padding: 24px 28px;
}

/* "Previous Lesson" / "Next Lesson" / "Mark Complete & Continue" footer */
.tutor-lesson-completion-footer,
.tutor-lesson-action-bar {
	background: white !important;
	border-top: 1px solid var(--gray-200) !important;
	padding: 18px 24px !important;
	box-shadow: 0 -2px 12px rgba(18, 43, 105, 0.04);
}

/* ═════════════════════════════════════════════════════════
 * COURSE LISTING PAGE (/courses/) — defensive baseline
 * ═════════════════════════════════════════════════════════ */

.tutor-course-card,
.tutor-courses .tutor-card,
.archive .tutor-card {
	border-radius: var(--radius-lg) !important;
	border: 1px solid var(--gray-200) !important;
	background: white !important;
	box-shadow: none !important;
	transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
	overflow: hidden;
}
.tutor-course-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-md) !important;
	border-color: var(--gold) !important;
}

/* ═════════════════════════════════════════════════════════
 * RESPONSIVE
 * ═════════════════════════════════════════════════════════ */

@media (max-width: 992px) {
	.tutor-single-course,
	.tutor-single-course-wrapper {
		padding: 24px 16px 80px !important;
	}
	.tutor-lesson-content,
	.tutor-course-spotlight-content {
		padding: 32px 24px !important;
	}
	.tutor-lesson-header {
		padding: 12px 16px !important;
	}
}

/* ═════════════════════════════════════════════════════════
 * DISPLAY NAME ROW
 *
 * v0.9.32 switched to a template override at
 * `tutor/dashboard/settings/profile.php` that renders display_name
 * as a free-text <input> instead of a 6-option select. No CSS hide
 * needed — the select element is never emitted.
 *
 * History: v0.9.30 tried a JS swap (timing race), v0.9.31 tried CSS
 * :has() hides (overmatched and hid the entire settings form).
 * Template override is the right answer; v0.9.32 ships it.
 *
 * If a future TutorLMS update changes the upstream template, the
 * override needs a diff-and-merge per the build plan's "TEMPLATE
 * OVERRIDE UPDATE PROTOCOL" (Section 5.2).
 * ═════════════════════════════════════════════════════════ */

/* ═════════════════════════════════════════════════════════
 * LESSON BODY (.ca-lesson-*) — seeded sample content
 *
 * The seeder writes lesson post_content as a `.ca-lesson-body`
 * wrapper with .ca-lesson-summary, .ca-lesson-h2, .ca-lesson-list,
 * and .ca-lesson-callout blocks. Real production lessons (Phase 8)
 * will reuse the same class system so this CSS is forward-compatible.
 * ═════════════════════════════════════════════════════════ */

.ca-lesson-body {
	max-width: 720px;
	margin: 0 auto;
	padding: 8px 0 24px;
	font-family: var(--font-body);
	color: var(--charcoal);
	font-size: 17px;
	line-height: 1.75;
}

.ca-lesson-body .ca-lesson-summary {
	font-size: 19px;
	line-height: 1.6;
	color: var(--navy);
	font-weight: 500;
	padding: 18px 24px;
	background: var(--gold-pale);
	border-left: 4px solid var(--gold);
	border-radius: 0 var(--radius-md) var(--radius-md) 0;
	margin: 0 0 32px;
	font-family: var(--font-display);
	letter-spacing: -0.005em;
}

.ca-lesson-body .ca-lesson-h2 {
	font-family: var(--font-display) !important;
	color: var(--navy) !important;
	font-weight: 700 !important;
	font-size: clamp(20px, 2.2vw, 26px) !important;
	letter-spacing: -0.015em;
	margin: 40px 0 12px !important;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--gray-200);
}

.ca-lesson-body .ca-lesson-h2:first-of-type {
	margin-top: 8px !important;
}

.ca-lesson-body p {
	margin: 0 0 18px;
}

.ca-lesson-body .ca-lesson-list {
	list-style: none;
	padding: 0;
	margin: 0 0 24px;
}

.ca-lesson-body .ca-lesson-list li {
	position: relative;
	padding: 10px 0 10px 32px;
	margin: 0;
	border-bottom: 1px solid var(--gray-100);
	font-size: 16px;
	line-height: 1.6;
}
.ca-lesson-body .ca-lesson-list li:last-child {
	border-bottom: none;
}
.ca-lesson-body .ca-lesson-list li::before {
	content: "";
	position: absolute;
	left: 6px;
	top: 18px;
	width: 8px;
	height: 8px;
	background: var(--gold);
	border-radius: 50%;
	box-shadow: 0 0 0 4px var(--gold-pale);
}

.ca-lesson-body .ca-lesson-list li strong {
	color: var(--navy);
	font-weight: 600;
}

.ca-lesson-body .ca-lesson-callout {
	background: var(--navy);
	color: var(--white);
	padding: 24px 28px;
	border-radius: var(--radius-lg);
	font-size: 17px;
	line-height: 1.6;
	margin: 28px 0;
	box-shadow: var(--shadow-md);
	position: relative;
	overflow: hidden;
}
.ca-lesson-body .ca-lesson-callout::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 4px;
	background: var(--gold);
}
.ca-lesson-body .ca-lesson-callout strong {
	color: var(--gold);
	display: block;
	font-family: var(--font-display);
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 6px;
}

@media (max-width: 768px) {
	.ca-lesson-body {
		font-size: 16px;
		padding: 8px 0 16px;
	}
	.ca-lesson-body .ca-lesson-summary {
		font-size: 17px;
		padding: 16px 20px;
	}
	.ca-lesson-body .ca-lesson-callout {
		padding: 20px 22px;
		font-size: 16px;
	}
}

/* ═════════════════════════════════════════════════════════
 * INLINE READING NOTES (.ca-lesson-notes)
 *
 * v0.9.44 — the production reading-notes HTML is now baked into
 * each lesson's post_content below the .ca-lesson-summary intro
 * callout, replacing the previous "Reading Notes — print-friendly
 * PDF" download link. Learners scroll from the video into the
 * notes without leaving the page.
 *
 * The notes HTML uses its own class system (.scene, .scene-illus,
 * .recap, .cta, .pill, .subtitle, .read-time) which we re-style
 * here so it harmonises with the rest of the lesson body.
 *
 * Wrapper class `.ca-lesson-notes` scopes every rule.
 * ═════════════════════════════════════════════════════════ */

.ca-lesson-notes {
	max-width: 720px;
	margin: 0 auto;
	font-family: var(--font-body);
	color: var(--charcoal);
	font-size: 17px;
	line-height: 1.75;
}

/* Outcomes intro card — "What this lesson covers" callout at the very top
 * of the notes. Mirrors the gold-pale + gold left-border treatment that
 * the legacy .ca-lesson-summary paragraph used, with the source's h3 +
 * outcomes-body / ul.covers structure rendered cleanly. */
.ca-lesson-notes .outcomes {
	margin: 0 0 32px;
	padding: 22px 26px;
	background: var(--gold-pale);
	border-left: 4px solid var(--gold);
	border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.ca-lesson-notes .outcomes h3 {
	margin: 0 0 10px;
	font-family: var(--font-display);
	color: var(--navy);
	font-weight: 800;
	font-size: 14px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border: none;
	padding: 0;
}
.ca-lesson-notes .outcomes p,
.ca-lesson-notes .outcomes .outcomes-body {
	margin: 0;
	color: var(--navy);
	font-family: var(--font-display);
	font-size: 18px;
	line-height: 1.6;
	font-weight: 500;
	letter-spacing: -0.005em;
}
.ca-lesson-notes .outcomes ul.covers {
	margin: 8px 0 0;
	padding: 0 0 0 22px;
	list-style: none;
}
.ca-lesson-notes .outcomes ul.covers li {
	position: relative;
	padding: 4px 0 4px 4px;
	color: var(--navy);
	font-size: 16px;
	line-height: 1.55;
	font-weight: 500;
}
.ca-lesson-notes .outcomes ul.covers li::before {
	content: "";
	position: absolute;
	left: -16px;
	top: 13px;
	width: 7px;
	height: 7px;
	background: var(--gold);
	border-radius: 50%;
}

/* Headings inside the notes — flow style, matches .ca-lesson-h2 above */
.ca-lesson-notes h2 {
	font-family: var(--font-display);
	color: var(--navy);
	font-weight: 700;
	font-size: clamp(20px, 2.2vw, 26px);
	letter-spacing: -0.015em;
	margin: 40px 0 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--gray-200);
}
.ca-lesson-notes h2:first-child {
	margin-top: 16px;
}
.ca-lesson-notes h3 {
	font-family: var(--font-display);
	color: var(--navy);
	font-weight: 700;
	font-size: 18px;
	margin: 28px 0 10px;
	letter-spacing: -0.01em;
}
.ca-lesson-notes p {
	margin: 0 0 18px;
}
.ca-lesson-notes strong {
	color: var(--navy);
	font-weight: 600;
}

/* Scene illustration — full-bleed image inside its h2 section */
.ca-lesson-notes .scene {
	margin: 16px 0 22px;
	text-align: center;
}
.ca-lesson-notes .scene-illus {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-md);
}

/* Recap card — bullet list summary at end of notes */
.ca-lesson-notes .recap {
	margin: 36px 0 20px;
	padding: 24px 28px;
	background: var(--gold-pale);
	border-left: 4px solid var(--gold);
	border-radius: var(--radius-md);
}
.ca-lesson-notes .recap h3 {
	margin-top: 0;
	margin-bottom: 14px;
	font-size: 17px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	font-weight: 800;
	color: var(--navy);
}
.ca-lesson-notes .recap ul {
	list-style: none;
	padding: 0;
	margin: 0;
}
.ca-lesson-notes .recap li {
	position: relative;
	padding: 8px 0 8px 28px;
	border-bottom: 1px solid rgba(18, 43, 105, 0.08);
	font-size: 15px;
	line-height: 1.55;
}
.ca-lesson-notes .recap li:last-child {
	border-bottom: none;
}
.ca-lesson-notes .recap li::before {
	content: "";
	position: absolute;
	left: 4px;
	top: 16px;
	width: 8px;
	height: 8px;
	background: var(--gold);
	border-radius: 50%;
}
.ca-lesson-notes .recap li strong {
	color: var(--navy);
	font-weight: 700;
	margin-right: 4px;
}

/* AI prompt block — deliberately distinct from .outcomes / .recap so
 * learners can spot the "here's a prompt to paste into ChatGPT/Claude/
 * Gemini" tool at a glance. Treatment: navy tool tray with a gold
 * "USE WITH AI" eyebrow, white verbatim card inside (monospace,
 * scrollable on overflow), and a gold pill copy button anchored to
 * the verbatim's top-right corner.
 *
 * Source markup (from render_pdf.py):
 *   <div class="prompts">
 *     <h3>Use AI to sharpen your work</h3>
 *     <p class="prompt-intro">…</p>
 *     <div class="verbatim">ROLE\nYou are…</div>
 *   </div>
 *
 * The inline extractor (`chiggle_lesson_notes_inline`) adds a copy
 * toolbar + unique id="ca-prompt-…" to each .verbatim. Click handler
 * lives in `inc/lesson-notes.php` (wp_footer, single-lesson only). */
.ca-lesson-notes .prompts {
	position: relative;
	margin: 32px 0;
	padding: 24px 26px 22px;
	background: linear-gradient(135deg, var(--navy) 0%, #1a3a8a 100%);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-md);
	color: var(--white);
	overflow: hidden;
}
.ca-lesson-notes .prompts::before {
	content: "USE WITH AI";
	position: absolute;
	top: 0;
	left: 26px;
	background: var(--gold);
	color: var(--navy);
	font-family: var(--font-display);
	font-weight: 800;
	font-size: 11px;
	letter-spacing: 0.12em;
	padding: 4px 12px 5px;
	border-radius: 0 0 var(--radius-md) var(--radius-md);
	line-height: 1.2;
}
.ca-lesson-notes .prompts h3 {
	margin: 16px 0 10px;
	color: var(--gold);
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 18px;
	letter-spacing: -0.005em;
	padding: 0;
	border: none;
}
.ca-lesson-notes .prompts .prompt-intro {
	margin: 0 0 16px;
	color: rgba(255, 255, 255, 0.88);
	font-size: 15px;
	line-height: 1.6;
}
.ca-lesson-notes .prompts .ca-prompt-copy-wrap {
	display: flex;
	justify-content: flex-end;
	margin-bottom: -14px;
	position: relative;
	z-index: 2;
	padding-right: 6px;
}
.ca-lesson-notes .prompts .ca-prompt-copy-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--gold);
	color: var(--navy);
	border: none;
	border-radius: 999px;
	padding: 6px 14px;
	font-family: var(--font-display);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
	transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.ca-lesson-notes .prompts .ca-prompt-copy-btn:hover,
.ca-lesson-notes .prompts .ca-prompt-copy-btn:focus-visible {
	background: var(--gold-light);
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
	outline: none;
}
.ca-lesson-notes .prompts .ca-prompt-copy-btn:active {
	transform: translateY(0);
}
.ca-lesson-notes .prompts .ca-prompt-copy-btn.ca-prompt-copy-btn-ok {
	background: #16a34a;
	color: var(--white);
}
.ca-lesson-notes .prompts .ca-prompt-copy-icon {
	flex: 0 0 auto;
}
.ca-lesson-notes .prompts .verbatim {
	display: block;
	margin: 0;
	padding: 16px 18px;
	background: var(--white);
	color: var(--charcoal);
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace;
	font-size: 13.5px;
	line-height: 1.6;
	border-radius: var(--radius-md);
	border-left: 4px solid var(--gold);
	white-space: pre-wrap;
	word-wrap: break-word;
	max-height: 480px;
	overflow-y: auto;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
/* Verbatim scrollbar — subtle, gold accent on hover */
.ca-lesson-notes .prompts .verbatim::-webkit-scrollbar {
	width: 10px;
}
.ca-lesson-notes .prompts .verbatim::-webkit-scrollbar-track {
	background: var(--gray-100);
	border-radius: var(--radius-md);
}
.ca-lesson-notes .prompts .verbatim::-webkit-scrollbar-thumb {
	background: var(--gray-300);
	border-radius: var(--radius-md);
}
.ca-lesson-notes .prompts .verbatim::-webkit-scrollbar-thumb:hover {
	background: var(--gold);
}

@media (max-width: 768px) {
	.ca-lesson-notes .prompts {
		padding: 22px 18px 18px;
	}
	.ca-lesson-notes .prompts::before {
		left: 18px;
		font-size: 10px;
		padding: 3px 10px 4px;
	}
	.ca-lesson-notes .prompts h3 {
		font-size: 17px;
	}
	.ca-lesson-notes .prompts .prompt-intro {
		font-size: 14px;
	}
	.ca-lesson-notes .prompts .verbatim {
		font-size: 12.5px;
		padding: 14px 14px;
		max-height: 380px;
	}
	.ca-lesson-notes .prompts .ca-prompt-copy-btn {
		padding: 5px 12px;
		font-size: 11px;
	}
}

/* Carry-this-forward CTA at end of notes */
.ca-lesson-notes .cta {
	margin: 22px 0 12px;
	padding: 22px 26px;
	background: var(--navy);
	color: var(--white);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-md);
	position: relative;
	overflow: hidden;
}
.ca-lesson-notes .cta::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 4px;
	background: var(--gold);
}
.ca-lesson-notes .cta h3 {
	margin: 0 0 8px;
	color: var(--gold);
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.ca-lesson-notes .cta p {
	margin: 0;
	color: var(--white);
	font-size: 17px;
	line-height: 1.6;
}

/* Materials section heading — slightly larger spacing above to
 * separate it from the recap/cta blocks visually. */
.ca-lesson-materials-heading {
	margin-top: 48px !important;
}

@media (max-width: 768px) {
	.ca-lesson-notes {
		font-size: 16px;
	}
	.ca-lesson-notes .outcomes {
		padding: 18px 20px;
		margin-bottom: 24px;
	}
	.ca-lesson-notes .outcomes p,
	.ca-lesson-notes .outcomes .outcomes-body {
		font-size: 16px;
	}
	.ca-lesson-notes .recap,
	.ca-lesson-notes .cta {
		padding: 18px 20px;
	}
	.ca-lesson-notes .cta p {
		font-size: 16px;
	}
}

/* ═════════════════════════════════════════════════════════
 * v2 notes additions (v0.11.90)
 *
 * v2 notes ship richer structure than v1: a one-line subtitle, a
 * meta strip (reading time / lesson length / exercise yes-no), a
 * lead paragraph, numbered H2 sections via .h2-num, and a
 * case-study sidebar. The injection script rewrites the v2
 * `<div class="prompt-block">` to `<div class="prompts">` so the
 * legacy prompt-block CSS still works; the rules below add the
 * five new structural classes.
 * ═════════════════════════════════════════════════════════ */

/* Subtitle — one punchy line below the lesson title (which Tutor
 * already renders), italic-tinted navy for hierarchy. */
.ca-lesson-notes .subtitle {
	margin: -8px 0 24px;
	font-family: var(--font-display);
	color: var(--navy);
	font-size: 19px;
	font-weight: 600;
	font-style: italic;
	line-height: 1.45;
	opacity: 0.85;
}

/* Meta strip — small inline pills showing reading time, length,
 * and whether the lesson has a practical exercise. */
.ca-lesson-notes .meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	margin: 0 0 28px;
	padding: 12px 16px;
	background: var(--offwhite);
	border-radius: var(--radius-sm, 8px);
	font-size: 14px;
	color: var(--charcoal);
}
.ca-lesson-notes .meta span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.ca-lesson-notes .meta strong {
	color: var(--navy);
	font-weight: 600;
}

/* Lead paragraph — the standfirst before the outcomes block. */
.ca-lesson-notes p.lead {
	margin: 0 0 28px;
	font-size: 18px;
	line-height: 1.7;
	color: var(--charcoal);
}

/* Numbered section heading prefix — small gold tabular number
 * sits left of every H2, sequential 01..NN through the notes. */
.ca-lesson-notes h2 .h2-num {
	display: inline-block;
	margin-right: 14px;
	min-width: 2ch;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 0.7em;
	color: var(--gold);
	letter-spacing: 0.05em;
	font-variant-numeric: tabular-nums;
	vertical-align: middle;
	opacity: 0.9;
}

/* Case-study sidebar — boxed real-founder vignette inside the
 * narrative. Sky-tinted left border, off-white background. */
.ca-lesson-notes .case-study {
	margin: 28px 0;
	padding: 22px 26px;
	background: var(--white);
	border-left: 4px solid var(--sky);
	border-radius: 0 var(--radius-md) var(--radius-md) 0;
	box-shadow: 0 1px 3px rgba(18, 43, 105, 0.05);
}
.ca-lesson-notes .case-study .eyebrow {
	display: block;
	margin: 0 0 6px;
	font-family: var(--font-display);
	font-size: 11px;
	color: var(--sky);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}
.ca-lesson-notes .case-study h3 {
	margin: 0 0 12px;
	font-family: var(--font-display);
	color: var(--navy);
	font-weight: 700;
	font-size: 18px;
	line-height: 1.3;
}
.ca-lesson-notes .case-study p {
	margin: 0 0 12px;
	font-size: 16px;
	line-height: 1.7;
}
.ca-lesson-notes .case-study p:last-child {
	margin-bottom: 0;
}

/* "Practice prompt" eyebrow caption inside the rewritten .prompts
 * block (was .prompt-block in v2 source). Sits above the H3. */
.ca-lesson-notes .prompts .eyebrow {
	display: block;
	margin: 0 0 4px;
	font-family: var(--font-display);
	font-size: 11px;
	color: var(--gold);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

@media (max-width: 768px) {
	.ca-lesson-notes .subtitle {
		font-size: 17px;
	}
	.ca-lesson-notes .meta {
		padding: 10px 14px;
		font-size: 13px;
	}
	.ca-lesson-notes p.lead {
		font-size: 17px;
	}
	.ca-lesson-notes h2 .h2-num {
		margin-right: 10px;
	}
	.ca-lesson-notes .case-study {
		padding: 18px 20px;
	}
	.ca-lesson-notes .case-study p {
		font-size: 15px;
	}
}

/* ═════════════════════════════════════════════════════════
 * TEMPLATES LIBRARY PAGE — v0.9.41 redesign
 *
 * Layout:
 *   1. Hero panel (navy gradient, gold accents) with eyebrow,
 *      headline, lead paragraph, and a 3-stat row.
 *   2. Seven phase sections — each section starts with a card-style
 *      header showing the phase's badge icon (gold circle), phase
 *      label + name + tagline + meta (template count, module range).
 *   3. A grid of slim template cards inside each section — each card
 *      is a clickable link with phase-tinted icon, M·L meta, title,
 *      and a download chevron on the right.
 *
 * Inherited container: page lives inside body.ca-framework so
 * .entry-content > * wraps already provide max-width + padding.
 * ═════════════════════════════════════════════════════════ */

/* HERO
 * IMPORTANT: every text rule below is prefixed with `body.ca-framework`
 * so it beats `body.ca-framework .entry-content p { color: var(--charcoal) }`
 * from global.css. Without that prefix, the hero's <p>/<span> children
 * inherit the framework's dark-on-light reading-page typography, which
 * renders as charcoal text on the navy hero — unreadable. */
body.ca-framework .ca-templates-hero {
	background: linear-gradient(135deg, var(--navy), var(--navy-deep));
	border-radius: var(--radius-lg);
	padding: 48px 40px;
	margin: 0 0 40px;
	color: var(--white);
	text-align: center;
	position: relative;
	overflow: hidden;
	box-shadow: var(--shadow-lg);
}
body.ca-framework .ca-templates-hero::after {
	content: '';
	position: absolute;
	top: -120px;
	right: -120px;
	width: 360px;
	height: 360px;
	background: radial-gradient(circle, rgba(255, 155, 3, 0.18) 0%, transparent 70%);
	pointer-events: none;
}
body.ca-framework .ca-templates-hero-eyebrow {
	display: inline-block;
	font-family: var(--font-accent);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--gold) !important;
	background: rgba(255, 155, 3, 0.12);
	padding: 6px 14px;
	border-radius: 999px;
	margin-bottom: 16px;
	position: relative;
	z-index: 1;
}
body.ca-framework .ca-templates-hero-headline {
	font-family: var(--font-heading) !important; /* Brand §04: hero = Nunito */
	color: var(--white) !important;
	font-weight: 800;
	font-size: clamp(32px, 4vw, 44px) !important;
	letter-spacing: -0.02em;
	margin: 0 0 14px !important;
	position: relative;
	z-index: 1;
	border-bottom: none !important;
}
body.ca-framework .ca-templates-hero p.ca-templates-hero-lead,
body.ca-framework .ca-templates-hero-lead {
	max-width: 760px;
	margin: 0 auto 16px;
	color: rgba(255, 255, 255, 0.88) !important;
	font-size: 16.5px;
	line-height: 1.65;
	position: relative;
	z-index: 1;
}
body.ca-framework .ca-templates-hero p.ca-templates-hero-lead strong,
body.ca-framework .ca-templates-hero-lead strong {
	color: var(--white) !important;
	font-weight: 700;
}
body.ca-framework .ca-templates-hero p.ca-templates-hero-lead em,
body.ca-framework .ca-templates-hero-lead em {
	color: var(--gold) !important;
	font-style: normal;
	font-weight: 600;
}
body.ca-framework .ca-templates-hero p.ca-templates-hero-lead-sub,
body.ca-framework .ca-templates-hero-lead-sub {
	max-width: 760px;
	margin: 0 auto 28px;
	font-size: 15px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.72) !important;
}
body.ca-framework .ca-templates-hero-lead code {
	background: rgba(255, 255, 255, 0.14);
	padding: 1px 8px;
	border-radius: 4px;
	font-size: 0.9em;
	color: var(--gold) !important;
	font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}
body.ca-framework .ca-templates-hero-stats {
	display: inline-flex;
	gap: 40px;
	padding: 18px 32px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 999px;
	position: relative;
	z-index: 1;
}
body.ca-framework .ca-templates-hero-stat {
	text-align: center;
}
body.ca-framework .ca-templates-hero-stat strong {
	display: block;
	font-family: var(--font-heading); /* Brand §04: hero display number = Nunito */
	font-weight: 800;
	font-size: 26px;
	color: var(--gold) !important;
	letter-spacing: -0.02em;
	line-height: 1;
}
body.ca-framework .ca-templates-hero-stat span {
	display: block;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.72) !important;
	margin-top: 4px;
	font-family: var(--font-accent);
	font-weight: 700;
}

/* PHASE SECTION */
.ca-tpl-phase {
	margin: 0 0 56px;
}

.ca-tpl-phase-head {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 20px;
	align-items: center;
	background: var(--white);
	border: 1px solid var(--gray-200);
	border-left: 4px solid var(--gold);
	border-radius: var(--radius-md);
	padding: 22px 26px;
	margin: 0 0 20px;
	box-shadow: var(--shadow-sm);
}
.ca-tpl-phase-icon {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--gold-pale);
	border: 2px solid var(--gold);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--navy);
	flex-shrink: 0;
}
.ca-tpl-phase-text {
	min-width: 0;
}
.ca-tpl-phase-eyebrow {
	display: inline-block;
	font-family: var(--font-accent);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--gold-dark);  /* AA-passing gold for text on white */
	margin-bottom: 2px;
}
.ca-tpl-phase-title {
	font-family: var(--font-display) !important;
	color: var(--navy) !important;
	font-weight: 800;
	font-size: 24px !important;
	letter-spacing: -0.015em;
	margin: 0 0 4px !important;
	line-height: 1.2;
	border-bottom: none !important;
	padding-bottom: 0 !important;
}
.ca-tpl-phase-tagline {
	color: var(--gray-500);
	font-size: 14px;
	line-height: 1.5;
	margin: 0;
}
.ca-tpl-phase-meta {
	text-align: right;
	flex-shrink: 0;
}
.ca-tpl-phase-count {
	display: block;
	font-family: var(--font-display);
	color: var(--navy);
	font-weight: 700;
	font-size: 18px;
}
.ca-tpl-phase-modules {
	display: block;
	font-size: 12px;
	color: var(--gray-500);
	letter-spacing: 0.02em;
	margin-top: 2px;
}

/* TEMPLATE GRID + CARD */
.ca-tpl-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 14px;
}

.ca-tpl-card {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 16px;
	align-items: center;
	background: var(--white);
	border: 1px solid var(--gray-200);
	border-radius: var(--radius-md);
	padding: 16px 18px;
	box-shadow: var(--shadow-sm);
	text-decoration: none !important;
	color: inherit;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.ca-tpl-card:hover,
.ca-tpl-card:focus-visible {
	transform: translateY(-2px);
	box-shadow: var(--shadow-md);
	border-color: var(--gold);
	color: inherit;
	text-decoration: none !important;
}
.ca-tpl-card-icon {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--gold-pale);
	color: var(--navy);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background 0.15s ease;
}
.ca-tpl-card:hover .ca-tpl-card-icon {
	background: var(--gold);
}
.ca-tpl-card-body {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.ca-tpl-card-meta {
	font-family: var(--font-accent);
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--navy);  /* was --sky (3.34:1 on white, AA-fail); navy = 13:1 */
}
.ca-tpl-card-title {
	/* <h4> (v0.9.73) — reset browser defaults */
	margin: 0;
	font-family: var(--font-display);
	color: var(--navy);
	font-weight: 700;
	font-size: 15px;
	line-height: 1.3;
	letter-spacing: -0.005em;
	/* clamp to 2 lines if super-long title */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ca-tpl-card-action {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: transparent;
	color: var(--gray-400);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background 0.15s ease, color 0.15s ease;
}
.ca-tpl-card:hover .ca-tpl-card-action {
	background: var(--navy);
	color: var(--white);
}

/* LOCKED card state — module is ahead of learner's progress */
.ca-tpl-card-locked {
	background: var(--gray-100);
	border-color: var(--gray-200);
	cursor: not-allowed;
	box-shadow: none;
}
/* Anonymous visitors: locked card is a real link to /#pricing. Hover-lifts
 * (gold accent border) to signal "click here to enroll" — different from
 * the unclickable logged-in/not-yet-unlocked variant above. */
a.ca-tpl-card-locked-anon {
	cursor: pointer;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
a.ca-tpl-card-locked-anon:hover,
a.ca-tpl-card-locked-anon:focus-visible {
	transform: translateY(-2px);
	border-color: var(--gold);
	box-shadow: 0 8px 20px rgba(255, 155, 3, 0.18);
	background: var(--white);
	outline: none;
}
a.ca-tpl-card-locked-anon:hover .ca-tpl-card-locked-note,
a.ca-tpl-card-locked-anon:focus-visible .ca-tpl-card-locked-note {
	color: var(--gold-dark); /* v0.11.28: gold fails AA as text on the hover tint too */
}
.ca-tpl-card-locked:hover {
	transform: none;
	box-shadow: none;
	border-color: var(--gray-200);
}
.ca-tpl-card-locked .ca-tpl-card-icon {
	background: var(--gray-200);
	color: var(--gray-400);
	filter: grayscale(1);
}
.ca-tpl-card-locked:hover .ca-tpl-card-icon {
	background: var(--gray-200);
}
.ca-tpl-card-locked .ca-tpl-card-meta {
	color: var(--gray-400);
}
.ca-tpl-card-locked .ca-tpl-card-title {
	color: var(--gray-500);
}
.ca-tpl-card-locked-note {
	display: block;
	font-family: var(--font-accent);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	/* v0.11.28: was var(--gold) #FF9B03 = 1.9:1 on the gray-100 locked
	   card (axe serious ×145 on /templates/ + /llm-prompts/ for
	   logged-in learners). --gold-dark #8A5700 is the canonical
	   on-light gold token (~5.5:1 AA — see variables.css). */
	color: var(--gold-dark);
	margin-top: 4px;
}
.ca-tpl-card-locked .ca-tpl-card-action {
	color: var(--gray-400);
	background: transparent !important;
}

/* ═════════════════════════════════════════════════════════
 * LLM PROMPTS LIBRARY (/llm-prompts/)
 *
 * Mirrors the Templates Library visual system but each card is a
 * <details> accordion: summary row stays compact, click to expand
 * and reveal the full prompt text + a Copy button.
 * ═════════════════════════════════════════════════════════ */

.ca-prompts-hero {
	/* Reuses .ca-templates-hero styles — this class is only here as a
	 * scoping hook in case we want a future variant. */
}

.ca-prompts-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ca-prompt-card {
	background: var(--white);
	border: 1px solid var(--gray-200);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-sm);
	overflow: hidden;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ca-prompt-card:hover {
	border-color: var(--gold);
}
.ca-prompt-card[open] {
	border-color: var(--gold);
	box-shadow: var(--shadow-md);
}
.ca-prompt-card-summary {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 16px;
	align-items: center;
	padding: 14px 18px;
	cursor: pointer;
	list-style: none;
	user-select: none;
}
.ca-prompt-card-summary::-webkit-details-marker {
	display: none;
}
.ca-prompt-card-icon {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: var(--gold-pale);
	color: var(--navy);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background 0.15s ease;
}
.ca-prompt-card[open] .ca-prompt-card-icon,
.ca-prompt-card:hover .ca-prompt-card-icon {
	background: var(--gold);
}
.ca-prompt-card-body {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.ca-prompt-card-meta {
	font-family: var(--font-accent);
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--navy);  /* was --sky (3.34:1 on white, AA-fail); navy = 13:1 */
}
.ca-prompt-card-title {
	/* <h4> (v0.9.73) — reset browser defaults */
	margin: 0;
	font-family: var(--font-display);
	color: var(--navy);
	font-weight: 700;
	font-size: 15px;
	line-height: 1.3;
	letter-spacing: -0.005em;
}
.ca-prompt-card-toggle {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: transparent;
	color: var(--gray-400);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: transform 0.2s ease, background 0.15s ease, color 0.15s ease;
}
.ca-prompt-card[open] .ca-prompt-card-toggle {
	transform: rotate(180deg);
	color: var(--navy);
}

.ca-prompt-card-content {
	border-top: 1px solid var(--gray-200);
	background: var(--gray-100);
}
.ca-prompt-card-toolbar {
	display: flex;
	justify-content: flex-end;
	padding: 12px 16px 0;
}
.ca-prompt-copy-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	background: var(--navy);
	color: var(--white);
	border: none;
	border-radius: 999px;
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.ca-prompt-copy-btn:hover {
	background: var(--gold);
	color: var(--navy);
	transform: translateY(-1px);
}
.ca-prompt-copy-btn-ok {
	background: var(--green) !important;
	color: var(--white) !important;
}
.ca-prompt-card-text {
	margin: 12px 16px 16px;
	padding: 16px 18px;
	background: var(--white);
	border: 1px solid var(--gray-200);
	border-radius: var(--radius-sm);
	font-family: ui-monospace, 'SF Mono', Menlo, monospace;
	font-size: 13px;
	line-height: 1.65;
	color: var(--charcoal);
	white-space: pre-wrap;
	word-wrap: break-word;
	max-height: 60vh;
	overflow-y: auto;
}

/* Locked prompt card */
.ca-prompt-card-locked {
	background: var(--gray-100);
	border-color: var(--gray-200);
	cursor: not-allowed;
	box-shadow: none;
}
.ca-prompt-card-locked:hover {
	border-color: var(--gray-200);
	box-shadow: none;
}
/* Anonymous visitors: locked prompt is a link to /#pricing. */
a.ca-prompt-card-locked-anon {
	cursor: pointer;
	text-decoration: none;
	display: block;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
a.ca-prompt-card-locked-anon:hover,
a.ca-prompt-card-locked-anon:focus-visible {
	transform: translateY(-2px);
	border-color: var(--gold);
	box-shadow: 0 8px 20px rgba(255, 155, 3, 0.18);
	background: var(--white);
	outline: none;
}
a.ca-prompt-card-locked-anon:hover .ca-tpl-card-locked-note,
a.ca-prompt-card-locked-anon:focus-visible .ca-tpl-card-locked-note {
	color: var(--gold);
}
.ca-prompt-card-locked .ca-prompt-card-icon {
	background: var(--gray-200);
	color: var(--gray-400);
	filter: grayscale(1);
}
.ca-prompt-card-locked:hover .ca-prompt-card-icon {
	background: var(--gray-200);
}
.ca-prompt-card-locked .ca-prompt-card-meta {
	color: var(--gray-400);
}
.ca-prompt-card-locked .ca-prompt-card-title {
	color: var(--gray-500);
}
.ca-prompt-card-locked .ca-prompt-card-toggle {
	color: var(--gray-400);
}
.ca-prompt-card-locked .ca-prompt-card-summary {
	cursor: not-allowed;
}

@media (max-width: 480px) {
	.ca-prompt-card-summary {
		gap: 12px;
		padding: 12px 14px;
	}
	.ca-prompt-card-text {
		margin: 10px 12px 12px;
		padding: 12px 14px;
		font-size: 12.5px;
	}
}

/* Denied banner — shown when ?denied={filename} is in the URL after
 * the protected-download handler bounces a forbidden request back. */
.ca-tpl-denied {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	background: var(--gold-pale);
	border: 1px solid var(--gold);
	border-left-width: 4px;
	border-radius: var(--radius-md);
	padding: 16px 20px;
	margin: 0 0 32px;
	color: var(--charcoal);
	font-size: 15px;
	line-height: 1.55;
}
.ca-tpl-denied svg {
	color: var(--gold);
	flex-shrink: 0;
	margin-top: 2px;
}
.ca-tpl-denied strong {
	color: var(--navy);
	font-weight: 700;
}

/* FOOTER NOTE */
.ca-tpl-footer {
	margin: 48px auto 0;
	padding: 24px 28px;
	background: var(--gold-pale);
	border-radius: var(--radius-md);
	border-left: 4px solid var(--gold);
	color: var(--charcoal);
	font-size: 15px;
	line-height: 1.6;
	max-width: 800px;
}
/* v0.11.28: inline prose links must be distinguishable without colour
   (WCAG 1.4.1 — axe link-in-text-block on the /preview/ "enroll"
   link). Navy on gold-pale is high-contrast; underline is the
   non-colour cue. */
.ca-tpl-footer a {
	color: var(--navy);
	text-decoration: underline;
	text-underline-offset: 2px;
}
.ca-tpl-footer a:hover,
.ca-tpl-footer a:focus-visible {
	color: var(--gold-dark);
}
.ca-tpl-footer code {
	background: rgba(18, 43, 105, 0.08);
	padding: 1px 6px;
	border-radius: 3px;
	font-size: 0.9em;
	color: var(--navy);
	font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

@media (max-width: 768px) {
	.ca-templates-hero {
		padding: 36px 24px;
	}
	.ca-templates-hero-stats {
		gap: 24px;
		padding: 14px 18px;
	}
	.ca-tpl-phase-head {
		grid-template-columns: auto 1fr;
		row-gap: 12px;
	}
	.ca-tpl-phase-meta {
		grid-column: 1 / -1;
		text-align: left;
		padding-top: 6px;
		border-top: 1px solid var(--gray-200);
		display: flex;
		gap: 14px;
		align-items: baseline;
	}
	.ca-tpl-phase-count {
		font-size: 15px;
	}
}
@media (max-width: 480px) {
	/* v0.13.51: keep the hero stats pill on ONE LINE on phones (operator
	 * request — the stacked column read as a tall awkward capsule). All
	 * four hero pages (/templates/, /llm-prompts/, /preview/, builder)
	 * use short labels, so a compact row fits a 360px viewport. */
	.ca-templates-hero-stats {
		gap: 18px;
		padding: 12px 20px;
	}
	.ca-templates-hero-stat strong {
		font-size: 20px;
	}
	.ca-templates-hero-stat span {
		font-size: 10.5px;
		letter-spacing: 0.08em;
	}
	.ca-tpl-card {
		padding: 14px 16px;
		grid-template-columns: auto 1fr;
		gap: 14px;
	}
	.ca-tpl-card-action {
		grid-column: 1 / -1;
		justify-self: end;
		width: auto;
		height: auto;
		padding: 4px 0;
	}
}

/* ═════════════════════════════════════════════════════════
 * TUTORLMS BUTTON / FORM BRAND OVERRIDES (v0.9.31)
 *
 * TutorLMS ships its default UI with a purple-blue accent
 * (~rgb(62, 100, 222)) that fights the Chiggle navy/gold palette.
 * Surfaces visible to learners on the front end:
 *
 *   - `.tutor-btn-primary` — main CTA buttons (Sign In, Continue
 *     Browsing on empty cart, Update Profile, Save, Submit Quiz)
 *   - `.tutor-form-control` — text inputs across settings + login
 *   - `.tutor-cart-empty-state` — empty cart card (TutorLMS uses
 *     its own cart, not WC's `.cart-empty`)
 *
 * Strategy: re-skin primary buttons with the Chiggle gold pill
 * treatment used everywhere else, give inputs the same border /
 * radius / padding as our checkout form, and turn the empty-cart
 * block into a friendly white card.
 * ═════════════════════════════════════════════════════════ */

.tutor-btn-primary,
.tutor-frontend-dashboard .tutor-btn-primary,
.tutor-cart-empty-state .tutor-btn,
.tutor-cart-empty-state .tutor-btn-primary,
.tutor-cart-empty-state a.tutor-btn-lg {
	background-color: var(--gold) !important;
	background-image: none !important;
	color: var(--navy) !important;
	border: none !important;
	border-radius: 999px !important;
	font-family: var(--font-body) !important;
	font-weight: 700 !important;
	letter-spacing: -0.005em;
	min-height: 48px;
	padding: 12px 28px !important;
	box-shadow: var(--shadow-md);
	text-decoration: none !important;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.tutor-btn-primary:hover,
.tutor-frontend-dashboard .tutor-btn-primary:hover,
.tutor-cart-empty-state .tutor-btn:hover,
.tutor-cart-empty-state a.tutor-btn-lg:hover {
	background-color: var(--gold-hover) !important;
	color: var(--navy) !important;
	transform: translateY(-1px);
	text-decoration: none !important;
}

/* Form inputs — match the visual weight of our checkout form so
 * Settings → Profile and the dashboard login form feel like the
 * same product. Geometry only; preserve TutorLMS's form logic. */
.tutor-form-control,
.tutor-frontend-dashboard .tutor-form-control,
input.tutor-form-control[type="text"],
input.tutor-form-control[type="email"],
input.tutor-form-control[type="password"] {
	border: 1.5px solid var(--gray-200) !important;
	border-radius: 12px !important;
	min-height: 48px;
	padding: 12px 16px !important;
	font-family: var(--font-body) !important;
	font-size: 15px !important;
	color: var(--charcoal) !important;
	background-color: var(--white) !important;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tutor-form-control:focus,
.tutor-form-control:focus-visible,
input.tutor-form-control:focus {
	border-color: var(--gold) !important;
	box-shadow: 0 0 0 3px rgba(255, 155, 3, 0.18) !important;
	outline: none !important;
}

/* ═════════════════════════════════════════════════════════
 * QUIZ — hide "Skip Quiz" button + its confirm modal.
 *
 * Quizzes are mandatory at Chiggle Academy (pass required to
 * proceed). TutorLMS's quiz template at single/quiz/top.php
 * still renders a Skip Quiz button regardless of pass_is_required
 * — gated only by attempts_remaining. Easiest neutralisation is
 * CSS (rather than a template override of the whole quiz top).
 *
 * If TutorLMS adds a real "skip disabled" setting in a future
 * version, this rule becomes a no-op and can be removed.
 * ═════════════════════════════════════════════════════════ */
.tutor-quiz-btn-group .skip-quiz-btn,
button.skip-quiz-btn,
#tutor-quiz-skip-to-next {
	display: none !important;
}

/* Empty cart card — TutorLMS markup, but make it match the
 * empty-state friendly-card pattern used elsewhere on the site. */
.tutor-cart-empty-state {
	background: var(--white);
	border: 1px solid var(--gray-200);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	padding: 56px 32px !important;
	text-align: center !important;
	max-width: 560px;
	margin: 32px auto !important;
}

.tutor-cart-empty-state img {
	display: block;
	margin: 0 auto 24px;
	max-width: 200px;
	height: auto;
	opacity: 0.85;
}

.tutor-cart-empty-state p {
	font-family: var(--font-display);
	color: var(--navy);
	font-size: 20px;
	font-weight: 600;
	margin: 0 0 24px !important;
	letter-spacing: -0.01em;
}

.tutor-cart-empty-state .tutor-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	text-decoration: none !important;
}

/* Dashboard login form (rendered when anonymous visits /dashboard/).
 * The form wraps in `.tutor-form-wrap` — give it a friendly card
 * surface centred in the framework container.
 *
 * MUST scope to `body:not(.logged-in)`: Tutor reuses `.tutor-form-wrap`
 * as a per-field wrapper inside the LOGGED-IN dashboard reset-password
 * form (`dashboard/settings/reset-password.php:70`, the "Re-type New
 * Password" field). The old `.tutor-frontend-dashboard:not(.logged-in)`
 * scope was inert — `logged-in` is a <body> class, never on that div,
 * so `:not(.logged-in)` was always true and the card leaked onto that
 * one field (inconsistent with the other password inputs). */
body:not(.logged-in) .tutor-form-wrap,
.tutor-login-form-wrapper {
	background: var(--white);
	border: 1px solid var(--gray-200);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-md);
	padding: 40px 32px;
	max-width: 480px;
	margin: 48px auto;
}

/* TutorLMS login heading: "Hi, Welcome back!" */
body:not(.logged-in) .tutor-form-wrap h2,
body:not(.logged-in) .tutor-form-wrap .tutor-form-heading,
.tutor-login-form-wrapper h2,
.tutor-login-form-wrapper .tutor-form-heading {
	font-family: var(--font-display) !important;
	color: var(--navy) !important;
	font-weight: 700;
	font-size: clamp(22px, 3vw, 28px);
	letter-spacing: -0.01em;
	margin: 0 0 24px !important;
	text-align: left;
}

@media (max-width: 480px) {
	.tutor-cart-empty-state {
		padding: 40px 24px !important;
		margin: 16px auto !important;
	}
	body:not(.logged-in) .tutor-form-wrap,
	.tutor-login-form-wrapper {
		padding: 28px 22px;
		margin: 24px 16px;
	}
}

/* Dead in v0.9.75: .ca-templates-footer, .ca-templates-grid, .ca-template-card
 * were the original (pre-rename) selectors. Current code uses .ca-tpl-* (the
 * template-card listing on /templates/) with its own responsive rules above. */

/* ═════════════════════════════════════════════════════════
 * LESSON PAGE — INDEPENDENTLY SCROLLABLE PANES (v0.11.35)
 *
 * Default Tutor: `.tutor-course-single-content-wrapper{display:flex}`
 * with NO height/overflow, so the whole document scrolls (one window
 * scrollbar — the reported behaviour). We want an app-shell layout:
 * site header + lesson top-bar pinned, and the left "Course Content"
 * sidebar and the right lesson/video pane each scrolling on their own.
 *
 * Spotlight mode is OFF, so Astra renders normally. The Tutor top-bar
 * is rendered by `single/lesson/content.php` (`single.common.header`)
 * INSIDE the right pane — it is NOT a sibling above the wrapper:
 *   header.site-header (sticky, 68px — header.css)
 *   .tutor-course-single-content-wrapper            (flex row)
 *     ├ .tutor-course-single-sidebar-wrapper        (Tutor: flex 0 0 400px)
 *     └ #tutor-single-entry-content                 (Tutor: flex 1)
 *         ├ .tutor-course-topic-single-header       ← BLUE BAR (in pane)
 *         └ .tutor-course-topic-single-body         (video + tabs)
 *
 * So the wrapper only needs to clear the site header — the bar lives
 * inside the scrolling right pane and is pinned to the TOP OF THAT
 * PANE (sticky top:0), not offset by the site header. (v0.11.35 wrongly
 * subtracted a 60px bar height AND pinned the bar at top:68px as if it
 * were a wrapper sibling → 60px white at the bottom + a white band above
 * the bar inside the right pane. v0.11.36 corrects both.)
 *
 *   --ca-lesson-top : chrome above the wrapper = site header (68px)
 *                     + WP admin-bar (32px, admins only — the real
 *                     audience are learners with no admin bar)
 *
 * Desktop only (≥1200px = Tutor's `xl` breakpoint, where the 400px
 * sidebar is in-flow). Below that Tutor switches the sidebar to an
 * absolute/off-canvas drawer + a mobile progress bar, so we leave the
 * normal document scroll untouched there (correct mobile behaviour).
 * ═════════════════════════════════════════════════════════ */
@media (min-width: 1200px) {
	body.single-lesson {
		--ca-lesson-top: 68px;
	}
	body.single-lesson.admin-bar {
		--ca-lesson-top: 100px; /* 68 site header + 32 WP admin bar */
	}

	/* Pin the lesson top-bar to the top of its own scroll container
	 * (the right pane), so it stays put as the video/tabs scroll
	 * under it — NOT offset by the site header (it's inside the pane,
	 * the pane already starts below the header). */
	body.single-lesson #tutor-single-entry-content .tutor-course-topic-single-header,
	body.single-lesson #tutor-single-entry-content .tutor-single-page-top-bar {
		position: sticky;
		top: 0;
		z-index: 5;
	}

	/* The two-pane region: a fixed-height flex row that itself never
	 * scrolls — exactly viewport minus the site-header chrome, so no
	 * white gap above or below. */
	body.single-lesson .tutor-course-single-content-wrapper {
		height: calc(100dvh - var(--ca-lesson-top));
		overflow: hidden;
	}

	/* Each pane owns its own scroll; overscroll-contain stops scroll
	 * chaining to the document at the ends. min-height:0 lets the flex
	 * children actually shrink+scroll instead of growing the row. */
	body.single-lesson .tutor-course-single-sidebar-wrapper,
	body.single-lesson #tutor-single-entry-content {
		height: 100%;
		min-height: 0;
		overflow-y: auto;
		overscroll-behavior: contain;
	}
}

/* ═════════════════════════════════════════════════════════
 * A11y contrast overrides — stock Tutor uses --tutor-color-muted
 * (#757c8e) for secondary text on its #eff1f6 / #fff surfaces. That
 * computes to ~3.7:1 / ~4.4:1 — both below WCAG AA 4.5:1 for normal
 * text. Surfaced by tests/e2e/11-a11y-authenticated.spec.ts on the
 * lesson page (durations like "09:09", lesson-count summaries like
 * "0/9"). v0.11.77.
 *
 * Also overrides Tutor's <code> styling, which renders near-white
 * (#fcfcfd) on near-white (#eceff3) inside lesson content (1.12:1).
 * ═════════════════════════════════════════════════════════ */

body.single-lesson .tutor-color-muted,
body.tutor-dashboard-page .tutor-color-muted {
	color: var(--gray-500) !important;  /* #595959 — 7.04:1 on white (AAA), 5.49:1 on Tutor's #eff1f6 (AA pass) */
}
body.single-lesson .tutor-course-topic-summary,
body.tutor-dashboard-page .tutor-course-topic-summary {
	color: var(--gray-500) !important;
}
body.single-lesson .tutor-course-topic-item-duration {
	color: var(--gray-500) !important;
}
body.single-lesson #tutor-single-entry-content code,
body.single-lesson .tutor-lesson-content code {
	background: var(--gray-100) !important;   /* warm cream */
	color: var(--navy) !important;            /* navy on gray-100 = ~14:1, AAA */
	padding: 1px 6px;
	border-radius: 4px;
	font-size: 0.92em;
}

/* Top-of-notes Previous/Next clone (injected by inc/hooks-tutor.php).
 * Inherits Tutor's footer styling via cloneNode(); add a bottom border
 * for visual separation from the notes content that follows. v0.11.80. */
body.single-lesson .ca-lesson-nav-top {
	border-bottom: 1px solid var(--gray-200);
	margin-bottom: 24px;
}

/* Lesson completion UX (v0.13.45) — phones/tablets: Tutor's mobile completion
 * block (.tutor-spotlight-mobile-progress-complete — the "% Complete" + progress
 * bar + Mark-as-Complete button, its own tutor-d-xl-none bar) is moved just below
 * the video by inc/hooks-tutor.php so learners who skip the notes reach it without
 * scrolling to the page foot. Stack its two columns (progress over button) and
 * make the button full-width. The block self-pads (tutor-px-20 tutor-py-16). */
.ca-lesson-below-video .tutor-spotlight-mobile-progress-complete {
	margin-top: 0; /* sat after content before; below the video it needs no top gap */
}
.ca-lesson-below-video .tutor-row {
	flex-direction: column;
	gap: 12px;
}
.ca-lesson-below-video .tutor-spotlight-mobile-progress-left,
.ca-lesson-below-video .tutor-spotlight-mobile-progress-right {
	flex: 0 0 100%;
	max-width: 100%;
	width: 100%;
}
.ca-lesson-below-video form {
	margin: 0 !important;
}
.ca-lesson-below-video .tutor-topbar-mark-btn,
.ca-lesson-below-video form button[type="submit"] {
	width: 100%;
	justify-content: center;
}
/* Brief "Lesson complete" confirmation toast shown on auto-complete. */
.ca-lesson-complete-toast {
	position: fixed;
	left: 50%;
	bottom: 96px;
	transform: translateX(-50%);
	background: var(--navy, #122B69);
	color: #fff;
	font-weight: 700;
	font-size: 15px;
	padding: 12px 22px;
	border-radius: 999px;
	box-shadow: 0 10px 34px rgba(0, 0, 0, .32);
	z-index: 99999;
	animation: caLessonToastIn .25s ease;
}
@keyframes caLessonToastIn {
	from { opacity: 0; transform: translate(-50%, 12px); }
	to   { opacity: 1; transform: translate(-50%, 0); }
}
