/**
 * CliniEd — LearnDash integration
 * ---------------------------------------------------------------------------
 * Restyles LearnDash 3.x / 4.x ("ld30") output to match the CliniEd design
 * system. Everything here targets LearnDash's own class names, so it applies
 * automatically to courses, lessons, topics, quizzes and the profile.
 *
 * LearnDash ships its own stylesheet; this file is enqueued AFTER it, so these
 * rules win on equal specificity. Where LearnDash uses inline styles or very
 * high specificity we match it deliberately rather than reaching for !important.
 */

/* ===========================================================================
 * 1. Global LearnDash typography reset
 * ======================================================================== */
.learndash-wrapper {
	font-family: var(--ce-font-body);
	color: var(--ce-text);
	--ld-color--primary: var(--ce-primary);
	--ld-color--secondary: var(--ce-accent);
	--ld-background--course-progress: var(--ce-accent);
}

.learndash-wrapper :is(h1, h2, h3, h4, h5, h6) {
	font-family: var(--ce-font-heading);
	color: var(--ce-heading);
	letter-spacing: var(--ce-tracking-tight);
}

.learndash-wrapper a { color: var(--ce-primary); }
.learndash-wrapper a:hover { color: var(--ce-primary-hover); }

/* ===========================================================================
 * 2. LearnDash buttons
 * ======================================================================== */
.learndash-wrapper .ld-button,
.learndash-wrapper input[type="submit"].ld-button,
.learndash-wrapper .ld-button:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--ce-space-2);
	padding: 0.8em 1.5em;
	border: 1px solid transparent;
	border-radius: var(--ce-radius-md);
	background: var(--ce-primary);
	color: var(--ce-primary-contrast);
	font-family: var(--ce-font-heading);
	font-size: var(--ce-fs-base);
	font-weight: var(--ce-fw-heading);
	line-height: 1.2;
	text-decoration: none;
	text-transform: none;
	letter-spacing: var(--ce-tracking-tight);
	box-shadow: var(--ce-shadow-sm);
	transition:
		background-color var(--ce-dur-fast) var(--ce-ease),
		transform var(--ce-dur-fast) var(--ce-ease),
		box-shadow var(--ce-dur-fast) var(--ce-ease);
}

.learndash-wrapper .ld-button:hover {
	background: var(--ce-primary-hover);
	color: var(--ce-primary-contrast);
	box-shadow: var(--ce-shadow-sm);
}

.learndash-wrapper .ld-button.ld-button-transparent,
.learndash-wrapper .ld-button.ld-button-alternate {
	background: transparent;
	border-color: var(--ce-border-strong);
	color: var(--ce-text);
	box-shadow: none;
}
.learndash-wrapper .ld-button.ld-button-transparent:hover,
.learndash-wrapper .ld-button.ld-button-alternate:hover {
	background: var(--ce-primary-soft);
	border-color: var(--ce-primary);
	color: var(--ce-primary-hover);
}

/* Mark-complete button gets the accent colour */
.learndash-wrapper #learndash_mark_complete_button,
.learndash-wrapper .learndash_mark_complete_button {
	background: var(--ce-accent);
}
.learndash-wrapper #learndash_mark_complete_button:hover,
.learndash-wrapper .learndash_mark_complete_button:hover {
	background: var(--ce-accent-hover);
}

/* ===========================================================================
 * 3. Course grid / archive cards
 * ======================================================================== */
.ce-ld-course-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
	gap: var(--ce-space-6);
}

.ce-ld-course-card {
	position: relative;
	display: flex;
	flex-direction: column;
	border: 1px solid var(--ce-border);
	border-radius: var(--ce-radius-lg);
	background: var(--ce-bg);
	overflow: hidden;
	box-shadow: var(--ce-shadow-xs);
	transition: transform var(--ce-dur) var(--ce-ease-out), box-shadow var(--ce-dur) var(--ce-ease-out);
}
.ce-ld-course-card:hover { transform: translateY(-6px); box-shadow: var(--ce-shadow-lg); }

.ce-ld-course-card__thumb {
	position: relative;
	aspect-ratio: 16 / 9;
	background: linear-gradient(135deg, var(--ce-surface), var(--ce-accent-tint));
	overflow: hidden;
}
.ce-ld-course-card__thumb img { width: 100%; height: 100%; object-fit: cover; }

.ce-ld-course-card__badges {
	position: absolute;
	top: var(--ce-space-3);
	left: var(--ce-space-3);
	display: flex;
	flex-wrap: wrap;
	gap: var(--ce-space-2);
}

.ce-ld-course-card__body {
	display: flex;
	flex-direction: column;
	gap: var(--ce-space-3);
	flex: 1;
	padding: var(--ce-space-6);
}

.ce-ld-course-card__title {
	margin: 0;
	font-size: var(--ce-fs-lg);
	line-height: var(--ce-lh-snug);
}
.ce-ld-course-card__title a { color: var(--ce-heading); text-decoration: none; }
.ce-ld-course-card__title a:hover { color: var(--ce-primary); }

.ce-ld-course-card__excerpt {
	margin: 0;
	font-size: var(--ce-fs-sm);
	color: var(--ce-text-muted);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ce-ld-course-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ce-space-2) var(--ce-space-4);
	margin-top: auto;
	padding-top: var(--ce-space-4);
	border-top: 1px solid var(--ce-border);
	font-size: var(--ce-fs-sm);
	color: var(--ce-text-muted);
}
.ce-ld-course-card__meta span { display: inline-flex; align-items: center; gap: var(--ce-space-2); }
.ce-ld-course-card__meta svg { width: 15px; height: 15px; color: var(--ce-primary); flex: none; }

.ce-ld-course-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ce-space-3);
	padding: var(--ce-space-4) var(--ce-space-6);
	border-top: 1px solid var(--ce-border);
	background: var(--ce-surface-alt);
}
.ce-ld-course-card__price {
	font-family: var(--ce-font-heading);
	font-size: var(--ce-fs-lg);
	font-weight: var(--ce-fw-bold);
	color: var(--ce-heading);
}
.ce-ld-course-card__price small { font-size: var(--ce-fs-xs); font-weight: var(--ce-fw-medium); color: var(--ce-text-muted); }

/* ===========================================================================
 * 4. LearnDash native course list (ld_course_list shortcode)
 * ======================================================================== */
.learndash-wrapper .ld-course-list-items {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
	gap: var(--ce-space-6);
}

.learndash-wrapper .ld-course-list-items .ld_course_grid .thumbnail.course {
	border: 1px solid var(--ce-border);
	border-radius: var(--ce-radius-lg);
	box-shadow: var(--ce-shadow-xs);
	overflow: hidden;
	transition: transform var(--ce-dur) var(--ce-ease-out), box-shadow var(--ce-dur) var(--ce-ease-out);
}
.learndash-wrapper .ld-course-list-items .ld_course_grid .thumbnail.course:hover {
	transform: translateY(-6px);
	box-shadow: var(--ce-shadow-lg);
}

/* ===========================================================================
 * 5. Course / lesson progress
 * ======================================================================== */
.learndash-wrapper .ld-progress {
	padding: var(--ce-space-4);
	border: 1px solid var(--ce-border);
	border-radius: var(--ce-radius-md);
	background: var(--ce-surface-alt);
}

.learndash-wrapper .ld-progress-bar {
	height: 10px;
	border: 0;
	border-radius: var(--ce-radius-pill);
	background: var(--ce-surface-sunken);
	overflow: hidden;
}

.learndash-wrapper .ld-progress-bar .ld-progress-bar-percentage {
	height: 100%;
	border-radius: var(--ce-radius-pill);
	background: var(--ce-accent-solid);
	transition: width var(--ce-dur-slow) var(--ce-ease-out);
}

.learndash-wrapper .ld-progress-heading,
.learndash-wrapper .ld-progress-stats {
	font-family: var(--ce-font-heading);
	font-size: var(--ce-fs-sm);
	color: var(--ce-text-muted);
}
.learndash-wrapper .ld-progress-percentage { color: var(--ce-accent); font-weight: var(--ce-fw-bold); }

/* ===========================================================================
 * 6. Course content list (lessons / topics accordion)
 * ======================================================================== */
.learndash-wrapper .ld-item-list .ld-item-list-item {
	margin-bottom: var(--ce-space-2);
	border: 1px solid var(--ce-border);
	border-radius: var(--ce-radius-md);
	background: var(--ce-bg);
	overflow: hidden;
	transition: border-color var(--ce-dur-fast) var(--ce-ease), box-shadow var(--ce-dur-fast) var(--ce-ease);
}
.learndash-wrapper .ld-item-list .ld-item-list-item:hover {
	border-color: var(--ce-primary-soft);
	box-shadow: var(--ce-shadow-sm);
}

.learndash-wrapper .ld-item-list .ld-item-list-item .ld-item-name {
	font-family: var(--ce-font-heading);
	font-weight: var(--ce-fw-heading);
	color: var(--ce-heading);
}

.learndash-wrapper .ld-item-list .ld-item-list-item.ld-is-complete .ld-item-name { color: var(--ce-text-muted); }

.learndash-wrapper .ld-status-icon {
	border-radius: 50%;
}
.learndash-wrapper .ld-status-icon.ld-status-complete,
.learndash-wrapper .ld-status-complete {
	background-color: var(--ce-accent);
	border-color: var(--ce-accent);
}
.learndash-wrapper .ld-status-icon.ld-status-progress {
	border-color: var(--ce-primary);
	color: var(--ce-primary);
}

.learndash-wrapper .ld-item-list-item-preview { padding: var(--ce-space-4) var(--ce-space-5); }

.learndash-wrapper .ld-expand-button {
	color: var(--ce-primary);
	font-family: var(--ce-font-heading);
	font-weight: var(--ce-fw-heading);
	font-size: var(--ce-fs-sm);
}

/* Section headings within the course content list */
.learndash-wrapper .ld-item-list .ld-section-heading {
	padding-bottom: var(--ce-space-4);
	border-bottom: 1px solid var(--ce-border);
	margin-bottom: var(--ce-space-5);
}
.learndash-wrapper .ld-item-list .ld-section-heading h2 { font-size: var(--ce-fs-xl); margin: 0; }

/* ===========================================================================
 * 7. Course / lesson header
 * ======================================================================== */
.learndash-wrapper .ld-course-status,
.learndash-wrapper .ld-course-status-content { border-radius: var(--ce-radius-md); }

.learndash-wrapper .ld-course-status.ld-course-status-not-enrolled {
	border: 1px solid var(--ce-border);
	background: var(--ce-surface-alt);
}
.learndash-wrapper .ld-course-status.ld-course-status-enrolled {
	border: 1px solid var(--ce-accent-tint);
	background: var(--ce-accent-tint);
}

.learndash-wrapper .ld-course-status-segment .ld-course-status-label {
	font-family: var(--ce-font-heading);
	font-size: var(--ce-fs-xs);
	font-weight: var(--ce-fw-bold);
	letter-spacing: var(--ce-tracking-label);
	text-transform: uppercase;
	color: var(--ce-text-muted);
}

.learndash-wrapper .ld-course-status-price {
	font-family: var(--ce-font-heading);
	font-size: var(--ce-fs-2xl);
	font-weight: var(--ce-fw-bold);
	color: var(--ce-heading);
}

/* Focus mode / breadcrumbs inside LearnDash */
.learndash-wrapper .ld-breadcrumbs {
	border-radius: var(--ce-radius-md);
	background: var(--ce-surface-alt);
	border: 1px solid var(--ce-border);
	font-size: var(--ce-fs-sm);
}
.learndash-wrapper .ld-breadcrumbs a { color: var(--ce-text-muted); text-decoration: none; }
.learndash-wrapper .ld-breadcrumbs a:hover { color: var(--ce-primary); }

/* ===========================================================================
 * 8. Quiz — the highest-traffic surface on an MCQ site
 * ======================================================================== */
.learndash-wrapper .wpProQuiz_content {
	padding: clamp(1.25rem, 3vw, 2.25rem);
	border: 1px solid var(--ce-border);
	border-radius: var(--ce-radius-lg);
	background: var(--ce-bg);
	box-shadow: var(--ce-shadow-sm);
}

/* Question box */
.learndash-wrapper .wpProQuiz_content .wpProQuiz_listItem {
	padding: 0;
	background: none;
	border: 0;
}

.learndash-wrapper .wpProQuiz_question_text {
	font-size: var(--ce-fs-lg);
	line-height: var(--ce-lh-normal);
	color: var(--ce-heading);
	font-weight: var(--ce-fw-medium);
}

.learndash-wrapper .wpProQuiz_header,
.learndash-wrapper .wpProQuiz_question_page {
	font-family: var(--ce-font-heading);
	font-size: var(--ce-fs-sm);
	font-weight: var(--ce-fw-heading);
	color: var(--ce-text-muted);
}

/* Answer options — turn LearnDash's plain list into selectable cards */
.learndash-wrapper .wpProQuiz_questionList { border: 0; margin: var(--ce-space-6) 0; }

.learndash-wrapper .wpProQuiz_questionListItem {
	margin-bottom: var(--ce-space-3);
	padding: 0;
	border: 0;
	background: none;
	list-style: none;
}

.learndash-wrapper .wpProQuiz_questionListItem label {
	display: flex;
	align-items: flex-start;
	gap: var(--ce-space-3);
	width: 100%;
	padding: var(--ce-space-4) var(--ce-space-5);
	border: 1.5px solid var(--ce-border);
	border-radius: var(--ce-radius-md);
	background: var(--ce-bg);
	color: var(--ce-text);
	font-size: var(--ce-fs-base);
	line-height: var(--ce-lh-normal);
	cursor: pointer;
	transition:
		border-color var(--ce-dur-fast) var(--ce-ease),
		background-color var(--ce-dur-fast) var(--ce-ease),
		box-shadow var(--ce-dur-fast) var(--ce-ease);
}

.learndash-wrapper .wpProQuiz_questionListItem label:hover {
	border-color: var(--ce-primary);
	background: var(--ce-primary-soft);
}

.learndash-wrapper .wpProQuiz_questionListItem input[type="radio"],
.learndash-wrapper .wpProQuiz_questionListItem input[type="checkbox"] {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0.12em 0 0;
	accent-color: var(--ce-primary);
	cursor: pointer;
}

/*
 * Selected state.
 *
 * Scoped to answers that have NOT been graded yet. Once LearnDash marks an
 * item correct or incorrect, that verdict must win — otherwise a learner's
 * wrong pick keeps the accent ground and reads as endorsed, which is the
 * opposite of what happened.
 */
.learndash-wrapper .wpProQuiz_questionListItem:not(.wpProQuiz_answerCorrect):not(.wpProQuiz_answerIncorrect).is-selected label,
.learndash-wrapper .wpProQuiz_questionListItem:not(.wpProQuiz_answerCorrect):not(.wpProQuiz_answerIncorrect) label:has(input:checked) {
	border-color: var(--ce-primary);
	background: var(--ce-primary-soft);
	box-shadow: var(--ce-focus-ring);
}

/* ---------------------------------------------------------------------------
 * Correct / incorrect feedback
 * ---------------------------------------------------------------------------
 * This is the one place where colour alone is not good enough. The design
 * locks a single accent, so "correct" and "incorrect" would otherwise be two
 * near-identical pale washes — unreadable on a question bank, and invisible to
 * anyone with a colour vision deficiency.
 *
 * So the two states are separated on three channels at once: border weight,
 * ground, and an explicit glyph. No new brand hue is introduced.
 * ------------------------------------------------------------------------ */
.learndash-wrapper .wpProQuiz_questionListItem.wpProQuiz_answerCorrect label,
.learndash-wrapper .wpProQuiz_questionListItem.wpProQuiz_answerIncorrect label {
	position: relative;
	padding-right: 3rem;
}

/* Correct — accent border at full weight, accent ground, check glyph. */
.learndash-wrapper .wpProQuiz_questionListItem.wpProQuiz_answerCorrect label,
.learndash-wrapper .wpProQuiz_answerCorrect label {
	border-color: var(--ce-accent-solid);
	border-width: 2px;
	background: var(--ce-accent-tint);
	color: var(--ce-ink);
	font-weight: var(--ce-fw-medium);
	box-shadow: none;
}

.learndash-wrapper .wpProQuiz_questionListItem.wpProQuiz_answerCorrect label::after,
.learndash-wrapper .wpProQuiz_answerCorrect label::after {
	content: "";
	position: absolute;
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
	width: 20px;
	height: 20px;
	background-color: var(--ce-accent-solid);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 13 4 4L19 7'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 13 4 4L19 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

/*
 * Incorrect — deliberately recessive: neutral ground, dashed grey border and a
 * cross. It reads as "not this" rather than competing with the correct answer.
 */
.learndash-wrapper .wpProQuiz_questionListItem.wpProQuiz_answerIncorrect label,
.learndash-wrapper .wpProQuiz_answerIncorrect label {
	border-color: var(--ce-grey-400);
	border-width: 2px;
	border-style: dashed;
	background: var(--ce-bg);
	color: var(--ce-muted);
	text-decoration: line-through;
	text-decoration-color: var(--ce-grey-400);
	text-decoration-thickness: 1px;
	box-shadow: none;
}

.learndash-wrapper .wpProQuiz_questionListItem.wpProQuiz_answerIncorrect label::after,
.learndash-wrapper .wpProQuiz_answerIncorrect label::after {
	content: "";
	position: absolute;
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	background-color: var(--ce-grey-400);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* LearnDash's own correct/incorrect callout blocks */
.learndash-wrapper .wpProQuiz_response .wpProQuiz_correct,
.learndash-wrapper .wpProQuiz_correct {
	border-left: 4px solid var(--ce-positive);
	border-radius: var(--ce-radius-sm);
	background: var(--ce-positive-soft);
	padding: var(--ce-space-4) var(--ce-space-5);
}
.learndash-wrapper .wpProQuiz_response .wpProQuiz_incorrect,
.learndash-wrapper .wpProQuiz_incorrect {
	border: 1px dashed var(--ce-grey-400);
	border-left-width: 4px;
	border-left-style: solid;
	border-radius: var(--ce-radius-sm);
	background: var(--ce-bg);
	color: var(--ce-muted);
	padding: var(--ce-space-4) var(--ce-space-5);
}

/* Explanation / "solution" panel — critical for MCQ revision */
.learndash-wrapper .wpProQuiz_response {
	margin-top: var(--ce-space-5);
	font-size: var(--ce-fs-base);
	line-height: var(--ce-lh-relaxed);
}

.learndash-wrapper .wpProQuiz_AnswerMessage {
	border-radius: var(--ce-radius-sm);
	background: var(--ce-surface-alt);
	padding: var(--ce-space-4) var(--ce-space-5);
}

/* Quiz buttons */
.learndash-wrapper .wpProQuiz_button,
.learndash-wrapper input.wpProQuiz_button,
.learndash-wrapper .wpProQuiz_button2 {
	padding: 0.8em 1.5em;
	border: 1px solid transparent;
	border-radius: var(--ce-radius-md);
	background: var(--ce-primary);
	color: var(--ce-white);
	font-family: var(--ce-font-heading);
	font-size: var(--ce-fs-base);
	font-weight: var(--ce-fw-heading);
	text-transform: none;
	box-shadow: var(--ce-shadow-sm);
	transition: background-color var(--ce-dur-fast) var(--ce-ease), transform var(--ce-dur-fast) var(--ce-ease);
}
.learndash-wrapper .wpProQuiz_button:hover,
.learndash-wrapper input.wpProQuiz_button:hover { background: var(--ce-primary-hover); }

.learndash-wrapper .wpProQuiz_button.wpProQuiz_QuestionButton { background: var(--ce-accent); }
.learndash-wrapper .wpProQuiz_button.wpProQuiz_QuestionButton:hover { background: var(--ce-accent-hover); }

/* Quiz progress bar */
.learndash-wrapper .wpProQuiz_progress {
	height: 8px;
	border-radius: var(--ce-radius-pill);
	background: var(--ce-surface-sunken);
	overflow: hidden;
}
.learndash-wrapper .wpProQuiz_progress .wpProQuiz_progress_bar {
	background: var(--ce-accent-solid);
	border-radius: var(--ce-radius-pill);
}

/* Question list / review grid ("question index" navigator) */
.learndash-wrapper .wpProQuiz_reviewQuestion ol { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; }
.learndash-wrapper .wpProQuiz_reviewQuestion li {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: var(--ce-radius-sm);
	background: var(--ce-surface-sunken);
	color: var(--ce-text-muted);
	font-family: var(--ce-font-heading);
	font-size: var(--ce-fs-sm);
	font-weight: var(--ce-fw-heading);
	cursor: pointer;
	transition: background-color var(--ce-dur-fast) var(--ce-ease), color var(--ce-dur-fast) var(--ce-ease);
}
.learndash-wrapper .wpProQuiz_reviewQuestion li:hover { background: var(--ce-primary-soft); color: var(--ce-primary); }
.learndash-wrapper .wpProQuiz_reviewQuestion li.wpProQuiz_reviewQuestionSolved { background: var(--ce-positive-soft); color: var(--ce-accent-solid); }
.learndash-wrapper .wpProQuiz_reviewQuestion li.wpProQuiz_reviewQuestionReview  { background: var(--ce-accent-tint); color: var(--ce-accent-solid); }
.learndash-wrapper .wpProQuiz_reviewQuestion li.wpProQuiz_reviewQuestionTarget  { outline: 2px solid var(--ce-primary); outline-offset: 1px; }

/* Results screen */
.learndash-wrapper .wpProQuiz_results {
	padding: clamp(1.5rem, 3vw, 2.5rem);
	border-radius: var(--ce-radius-lg);
	background: var(--ce-surface-alt);
	border: 1px solid var(--ce-border);
}
.learndash-wrapper .wpProQuiz_results h4 { font-size: var(--ce-fs-xl); }
.learndash-wrapper .wpProQuiz_quiz_time,
.learndash-wrapper .wpProQuiz_points {
	font-family: var(--ce-font-heading);
	color: var(--ce-heading);
}

/* Timer */
.learndash-wrapper .wpProQuiz_time_limit .time_limit_message,
.learndash-wrapper .wpProQuiz_time {
	font-family: var(--ce-font-mono);
	font-weight: var(--ce-fw-heading);
	color: var(--ce-primary);
}

/* ===========================================================================
 * 9. Profile / dashboard
 * ======================================================================== */
.learndash-wrapper .ld-profile-header {
	border-radius: var(--ce-radius-lg);
	background: var(--ce-indigo);
	color: rgba(255, 255, 255, 0.82);
	padding: clamp(1.5rem, 3vw, 2.5rem);
}
.learndash-wrapper .ld-profile-header :is(h1, h2, h3, .ld-profile-heading) { color: var(--ce-white); }
.learndash-wrapper .ld-profile-avatar img { border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.25); }

.learndash-wrapper .ld-profile-summary .ld-profile-stat {
	border-radius: var(--ce-radius-md);
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.14);
}

.learndash-wrapper .ld-tabs .ld-tabs-navigation .ld-tab {
	border-radius: var(--ce-radius-pill);
	font-family: var(--ce-font-heading);
	font-weight: var(--ce-fw-heading);
	font-size: var(--ce-fs-sm);
	color: var(--ce-text-muted);
	border: 0;
}
.learndash-wrapper .ld-tabs .ld-tabs-navigation .ld-tab.ld-active {
	background: var(--ce-primary);
	color: var(--ce-white);
}

/* Course cards inside the profile */
.learndash-wrapper .ld-item-list.ld-course-list .ld-item-list-item {
	border-radius: var(--ce-radius-md);
}

/* ===========================================================================
 * 10. Focus mode
 * ======================================================================== */
.learndash-wrapper .ld-focus {
	--ldx-color-primary: var(--ce-primary);
	font-family: var(--ce-font-body);
}

.learndash-wrapper .ld-focus .ld-focus-sidebar {
	background: var(--ce-surface-alt);
	border-right: 1px solid var(--ce-border);
}

.learndash-wrapper .ld-focus .ld-focus-header {
	background: var(--ce-bg);
	border-bottom: 1px solid var(--ce-border);
	box-shadow: var(--ce-shadow-xs);
}

.learndash-wrapper .ld-focus .ld-focus-sidebar .ld-course-navigation .ld-lesson-item.ld-is-current-lesson > .ld-lesson-item-preview {
	background: var(--ce-primary-soft);
	border-radius: var(--ce-radius-sm);
}

.learndash-wrapper .ld-focus-comments { border-radius: var(--ce-radius-lg); }

/* ===========================================================================
 * 11. Certificates & alerts
 * ======================================================================== */
.learndash-wrapper .ld-alert {
	border-radius: var(--ce-radius-md);
	border-width: 1px;
	border-left-width: 4px;
	font-size: var(--ce-fs-base);
}
.learndash-wrapper .ld-alert-success { border-color: var(--ce-positive); background: var(--ce-positive-soft); }
.learndash-wrapper .ld-alert-warning { border-color: var(--ce-accent); background: var(--ce-accent-tint); }
.learndash-wrapper .ld-alert-certificate { border-color: var(--ce-primary); background: var(--ce-primary-soft); }

.learndash-wrapper .ld-alert-certificate .ld-alert-content { align-items: center; }

/* ===========================================================================
 * 12. Responsive tightening
 * ======================================================================== */
@media (max-width: 640px) {
	.learndash-wrapper .wpProQuiz_questionListItem label {
		padding: var(--ce-space-3) var(--ce-space-4);
		font-size: var(--ce-fs-base);
	}
	.learndash-wrapper .ld-button { width: 100%; }
	.learndash-wrapper .wpProQuiz_reviewQuestion li { width: 30px; height: 30px; font-size: var(--ce-fs-xs); }
}

/* ===========================================================================
 * Focus mode
 * ---------------------------------------------------------------------------
 * LearnDash Focus Mode renders its own full-page chrome: a fixed course
 * sidebar, its own header bar and its own footer. If the theme's sticky
 * header, footer and back-to-top button also render, the learner gets two
 * competing headers and a footer they cannot reach past the fixed sidebar.
 *
 * inc/learndash.php adds the `ce-focus-mode` body class whenever
 * learndash_is_focus_mode_enabled() is true, so the theme chrome steps aside
 * and lets LearnDash own the screen. Harmless when focus mode is off, because
 * the class is simply absent.
 * ======================================================================== */
body.ce-focus-mode .ce-header,
body.ce-focus-mode .ce-announce,
body.ce-focus-mode .ce-footer,
body.ce-focus-mode .ce-to-top,
body.ce-focus-mode .ce-drawer {
	display: none !important;
}

/* The theme's main wrapper adds no padding of its own in focus mode. */
body.ce-focus-mode .ce-main {
	padding: 0;
	margin: 0;
}

/* ===========================================================================
 * Theme-supplied LearnDash singular screens
 * ---------------------------------------------------------------------------
 * Lessons, topics, quizzes, assignments and groups render through
 * template-parts/learndash-singular.php. The theme supplies only the title
 * and the width; everything below it is the plugin's own markup, restyled by
 * the rules above rather than replaced.
 * ======================================================================== */
.ce-ld-single__title {
	margin: var(--ce-space-4) 0 var(--ce-space-8);
	font-size: var(--ce-fs-3xl);
	font-weight: var(--ce-fw-heading);
	line-height: var(--ce-lh-tight);
	letter-spacing: var(--ce-tracking-tight);
	color: var(--ce-ink);
}

/*
 * Focus Mode draws its own header. Ours would be a second title above it, so
 * it stands down along with the rest of the site chrome.
 */
body.ce-focus-mode .ce-ld-single__title,
body.ce-focus-mode .ce-breadcrumbs { display: none !important; }
body.ce-focus-mode .ce-ld-single .ce-section { padding-block: 0; }
