/**
 * Landing page & shortcode styles — course catalog, enrollment, progress.
 *
 * All classes use .runemark namespace with BEM naming.
 * No global element selectors. No !important on layout properties.
 * Loaded only on pages with LMS content (course single or shortcode pages).
 *
 * @package Runemark
 */

/* ─── Course Catalog ───────────────────────────────────────────────── */

.runemark-catalog__grid {
	display: grid;
	gap: 24px;
}

.runemark-catalog__grid--columns-2 {
	grid-template-columns: repeat(2, 1fr);
}

.runemark-catalog__grid--columns-3 {
	grid-template-columns: repeat(3, 1fr);
}

.runemark-catalog__grid--columns-4 {
	grid-template-columns: repeat(4, 1fr);
}

.runemark-catalog__pagination {
	margin-top: 32px;
	text-align: center;
}

.runemark-catalog__empty {
	text-align: center;
	color: var(--runemark-text-muted, #6c757d);
	padding: 48px 0;
}

/* ─── Course Card ──────────────────────────────────────────────────── */

.runemark-course-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--runemark-border, #dee2e6);
	border-radius: 8px;
	overflow: hidden;
	background-color: var(--runemark-surface, #fff);
	transition: box-shadow 0.2s ease;
}

.runemark-course-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.runemark-course-card__thumbnail {
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.runemark-course-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.runemark-course-card__body {
	flex: 1 1 auto;
	padding: 16px;
}

.runemark-course-card__title {
	margin: 0 0 8px;
	font-size: 18px;
	line-height: 1.3;
}

.runemark-course-card__title a {
	color: inherit;
	text-decoration: none;
}

.runemark-course-card__title a:hover {
	text-decoration: underline;
}

.runemark-course-card__excerpt {
	margin: 0 0 12px;
	font-size: 14px;
	color: var(--runemark-text-muted, #6c757d);
	line-height: 1.5;
}

.runemark-course-card__meta {
	font-size: 12px;
	color: var(--runemark-text-subtle, #adb5bd);
}

.runemark-course-card__action {
	padding: 12px 16px;
	border-top: 1px solid var(--runemark-border-subtle-alt, #f0f0f0);
}

.runemark-course-card__button {
	display: inline-block;
	padding: 8px 16px;
	border-radius: var(--runemark-radius-control, 6px);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.runemark-course-card__button--enroll {
	background-color: var(--runemark-primary, #0073aa);
	color: var(--runemark-primary-on, #fff);
}

.runemark-course-card__button--enroll:hover {
	background-color: var(--runemark-primary-hover, #005177);
	color: var(--runemark-primary-on, #fff);
}

.runemark-course-card__button--continue {
	background-color: var(--runemark-success-fill, #198754);
	color: var(--runemark-ink-inverse, #fff);
}

.runemark-course-card__button--continue:hover {
	background-color: var(--runemark-success-fill-hover, #146c43);
	color: var(--runemark-ink-inverse, #fff);
}

.runemark-course-card__button--completed {
	background-color: var(--runemark-surface-muted, #e9ecef);
	color: var(--runemark-text-secondary, #495057);
	cursor: default;
}

/* ─── Enroll Button ────────────────────────────────────────────────── */

.runemark-enroll-button {
	margin: 16px 0;
}

.runemark-enroll-button__button {
	display: inline-block;
	padding: 12px 24px;
	border: none;
	border-radius: var(--runemark-radius-control, 6px);
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.runemark-enroll-button__button:focus-visible {
	outline: 2px solid var(--runemark-focus-ring, #0073aa);
	outline-offset: 2px;
}

.runemark-enroll-button__button--enroll {
	background-color: var(--runemark-primary, #0073aa);
	color: var(--runemark-primary-on, #fff);
}

.runemark-enroll-button__button--enroll:hover {
	background-color: var(--runemark-primary-hover, #005177);
}

.runemark-enroll-button__button--enroll:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.runemark-enroll-button__button--continue {
	background-color: var(--runemark-success-fill, #198754);
	color: var(--runemark-ink-inverse, #fff);
}

.runemark-enroll-button__button--continue:hover {
	background-color: var(--runemark-success-fill-hover, #146c43);
	color: var(--runemark-ink-inverse, #fff);
}

.runemark-enroll-button__button--completed {
	background-color: var(--runemark-surface-muted, #e9ecef);
	color: var(--runemark-text-secondary, #495057);
}

.runemark-enroll-button__button--login {
	background-color: var(--runemark-neutral-strong-fill, #495057);
	color: var(--runemark-ink-inverse, #fff);
}

.runemark-enroll-button__button--login:hover {
	background-color: var(--runemark-neutral-strong-fill-hover, #343a40);
	color: var(--runemark-ink-inverse, #fff);
}

.runemark-enroll-button__error {
	margin-top: 8px;
	padding: 8px 12px;
	background-color: var(--runemark-danger-soft, #f8d7da);
	color: var(--runemark-danger-soft-ink, #842029);
	border-radius: 4px;
	font-size: 14px;
}

/* ─── Progress Bar ─────────────────────────────────────────────────── */

.runemark-progress-bar {
	margin: 12px 0;
}

.runemark-progress-bar__track {
	width: 100%;
	height: 8px;
	background-color: var(--runemark-surface-muted, #e9ecef);
	border-radius: 4px;
	overflow: hidden;
}

.runemark-progress-bar__fill {
	height: 100%;
	background-color: var(--runemark-primary, #0073aa);
	border-radius: 4px;
	transition: width 0.3s ease;
}

.runemark-progress-bar__label {
	display: block;
	margin-top: 4px;
	font-size: 13px;
	color: var(--runemark-text-muted, #6c757d);
}

/* ─── Curriculum Outline ───────────────────────────────────────────── */

.runemark-curriculum-outline {
	margin: 24px 0;
}

.runemark-curriculum-outline__heading {
	margin: 0 0 16px;
	font-size: 20px;
}

.runemark-curriculum-outline__topic {
	border: 1px solid var(--runemark-border, #dee2e6);
	border-radius: 4px;
	margin-bottom: 8px;
}

.runemark-curriculum-outline__topic-title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 16px;
	cursor: pointer;
	font-weight: 600;
	font-size: 15px;
	list-style: none;
}

.runemark-curriculum-outline__topic-title::-webkit-details-marker {
	display: none;
}

.runemark-curriculum-outline__topic-title::before {
	content: "\25B6";
	margin-right: 8px;
	font-size: 10px;
	transition: transform 0.2s ease;
}

.runemark-curriculum-outline__topic[open] > .runemark-curriculum-outline__topic-title::before {
	transform: rotate(90deg);
}

.runemark-curriculum-outline__topic-count {
	font-size: 12px;
	font-weight: 400;
	color: var(--runemark-text-muted, #6c757d);
}

.runemark-curriculum-outline__items {
	list-style: none;
	margin: 0;
	padding: 0 0 8px;
}

.runemark-curriculum-outline__item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 16px 6px 32px;
	font-size: 14px;
	color: var(--runemark-text-secondary, #495057);
}

.runemark-curriculum-outline__item--completed {
	color: var(--runemark-text-muted, #6c757d);
}

.runemark-curriculum-outline__badge {
	display: inline-block;
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.runemark-curriculum-outline__badge--lesson {
	background-color: var(--runemark-primary-soft, #e6f1f7);
	color: var(--runemark-primary-soft-ink, #0073aa);
}

.runemark-curriculum-outline__badge--quiz {
	background-color: var(--runemark-warning-soft, #fff3cd);
	color: var(--runemark-warning-soft-ink-alt, #856404);
}

.runemark-curriculum-outline__badge--assignment {
	background-color: var(--runemark-assignment-soft, #f0e7ff);
	color: var(--runemark-assignment-ink, #6f42c1);
}

.runemark-curriculum-outline__checkmark {
	color: var(--runemark-success-ink, #198754);
	font-weight: bold;
}

/* ─── My Courses ───────────────────────────────────────────────────── */

.runemark-my-courses__list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.runemark-my-courses__course-row {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px;
	border: 1px solid var(--runemark-border, #dee2e6);
	border-radius: 8px;
	background-color: var(--runemark-surface, #fff);
}

.runemark-my-courses__thumbnail {
	flex: 0 0 80px;
}

.runemark-my-courses__image {
	width: 80px;
	height: 60px;
	object-fit: cover;
	border-radius: 4px;
	display: block;
}

.runemark-my-courses__info {
	flex: 1 1 auto;
	min-width: 0;
}

.runemark-my-courses__title {
	margin: 0 0 4px;
	font-size: 16px;
}

.runemark-my-courses__title a {
	color: inherit;
	text-decoration: none;
}

.runemark-my-courses__title a:hover {
	text-decoration: underline;
}

.runemark-my-courses__status {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 3px;
	font-size: 12px;
	font-weight: 600;
}

.runemark-my-courses__status--enrolled {
	background-color: var(--runemark-primary-soft, #e6f1f7);
	color: var(--runemark-primary-soft-ink, #0073aa);
}

.runemark-my-courses__status--in_progress {
	background-color: var(--runemark-warning-soft, #fff3cd);
	color: var(--runemark-warning-soft-ink-alt, #856404);
}

.runemark-my-courses__status--completed {
	background-color: var(--runemark-success-soft, #d1e7dd);
	color: var(--runemark-success-soft-ink, #0f5132);
}

.runemark-my-courses__status--withdrawn {
	background-color: var(--runemark-danger-soft, #f8d7da);
	color: var(--runemark-danger-soft-ink, #842029);
}

.runemark-my-courses__action {
	flex: 0 0 auto;
}

.runemark-my-courses__button {
	display: inline-block;
	padding: 8px 16px;
	border-radius: var(--runemark-radius-control, 6px);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	background-color: var(--runemark-primary, #0073aa);
	color: var(--runemark-primary-on, #fff);
}

.runemark-my-courses__button:hover {
	background-color: var(--runemark-primary-hover, #005177);
	color: var(--runemark-primary-on, #fff);
}

.runemark-my-courses__button--review {
	background-color: var(--runemark-neutral-fill, #6c757d);
}

.runemark-my-courses__button--review:hover {
	background-color: var(--runemark-neutral-fill-hover-alt, #5a6268);
	color: var(--runemark-ink-inverse, #fff);
}

.runemark-my-courses__empty {
	text-align: center;
	color: var(--runemark-text-muted, #6c757d);
	padding: 48px 0;
}

/* ─── Dashboard ─────────────────────────────────────────────────────
   v0.23.0 — matches dashboard-polish-target.html; the slate ramp still
   mirrors the admin reports polish (src/admin/reports/styles/reports.css)
   so the front-end dashboard reads as one system with the reports screen.

   v0.43.0 — the twenty legacy custom properties that used to be declared
   here are gone, with no alias and no deprecation window. They are now
   emitted on .runemark by Services\Branding::css(), and every call
   site below reads a --runemark-* token carrying the old literal as
   its fallback, so the sheet still renders in its old colours even if the
   block never prints.

   Nothing in this file may DECLARE a --runemark-* property: the
   inline block prints first and .runemark and
   .runemark-dashboard are the same element, so a declaration here
   would silently shadow it. Enforced by
   tests/phpunit/test_branding_css_contract.php. ── */

.runemark-dashboard__header {
	margin-bottom: 20px;
}

.runemark-dashboard__title {
	font-size: 26px;
	font-weight: 800;
	margin: 0 0 4px;
	color: var(--runemark-slate-900, #0f172a);
	letter-spacing: -0.01em;
}

.runemark-dashboard__subtitle {
	color: var(--runemark-slate-500, #64748b);
	margin: 0;
}

.runemark-dashboard__empty-state {
	background-color: var(--runemark-surface, #fff);
	border: 1px solid var(--runemark-slate-200, #e2e8f0);
	border-radius: 12px;
	box-shadow: var(--runemark-shadow, 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.1));
	padding: 20px;
	margin-bottom: 26px;
	color: var(--runemark-slate-600, #475569);
}

.runemark-dashboard__empty-state p {
	margin: 0;
}

.runemark-dashboard__empty-text {
	color: var(--runemark-slate-500, #64748b);
}

/* At-a-glance stats */

.runemark-dashboard__stats {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 12px;
	margin-bottom: 26px;
}

.runemark-dashboard__stat {
	background-color: var(--runemark-surface, #fff);
	border: 1px solid var(--runemark-slate-200, #e2e8f0);
	border-radius: 12px;
	box-shadow: var(--runemark-shadow, 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.1));
	padding: 14px 15px;
}

.runemark-dashboard__stat-label {
	color: var(--runemark-slate-500, #64748b);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.runemark-dashboard__stat-value {
	font-size: 27px;
	font-weight: 800;
	color: var(--runemark-slate-900, #0f172a);
	margin: 6px 0 0;
	line-height: 1;
	letter-spacing: -0.01em;
}

.runemark-dashboard__stat-foot {
	font-size: 11px;
	color: var(--runemark-slate-400, #94a3b8);
	margin-top: 5px;
}

/* Sections */

.runemark-dashboard__section {
	margin-bottom: 30px;
}

.runemark-dashboard__section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin: 0 0 13px;
}

.runemark-dashboard__section-title {
	font-size: 17px;
	font-weight: 800;
	color: var(--runemark-slate-900, #0f172a);
	margin: 0;
}

.runemark-dashboard__section-meta {
	font-size: 12.5px;
	color: var(--runemark-slate-400, #94a3b8);
}

/* Continue-learning hero */

.runemark-dashboard__resume {
	background-color: var(--runemark-surface, #fff);
	border: 1px solid var(--runemark-slate-200, #e2e8f0);
	border-radius: 16px;
	box-shadow: var(--runemark-shadow-lg, 0 4px 14px rgba(15, 23, 42, 0.1));
	padding: 20px;
	display: grid;
	grid-template-columns: 150px 1fr auto;
	gap: 20px;
	align-items: center;
}

.runemark-dashboard__resume-thumb {
	width: 150px;
	height: 96px;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--runemark-primary, #0073aa), var(--runemark-decorative-violet, #4a3aa7));
	display: grid;
	place-items: center;
	color: var(--runemark-ink-inverse, #fff);
	font-size: 24px;
}

.runemark-dashboard__resume-eyebrow {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--runemark-primary-ink, #0073aa);
}

.runemark-dashboard__resume-title {
	margin: 4px 0 3px;
	font-size: 19px;
	color: var(--runemark-slate-900, #0f172a);
	line-height: 1.25;
}

.runemark-dashboard__resume-next {
	color: var(--runemark-slate-600, #475569);
	font-size: 13.5px;
	margin: 0 0 11px;
}

.runemark-dashboard__resume-next strong {
	color: var(--runemark-slate-900, #0f172a);
}

.runemark-dashboard__resume-progress {
	max-width: 420px;
}

.runemark-dashboard__resume-cta {
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: stretch;
	min-width: 172px;
}

/* Buttons */

.runemark-dashboard__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	border: 1px solid transparent;
	border-radius: var(--runemark-radius-control, 6px);
	padding: 9px 15px;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	text-align: center;
	white-space: nowrap;
}

.runemark-dashboard__btn--primary {
	background-color: var(--runemark-primary, #0073aa);
	color: var(--runemark-primary-on, #fff);
}

.runemark-dashboard__btn--primary:hover {
	background-color: var(--runemark-primary-hover, #005177);
	color: var(--runemark-primary-on, #fff);
}

.runemark-dashboard__btn--ghost {
	background-color: var(--runemark-surface, #fff);
	color: var(--runemark-slate-700, #334155);
	border-color: var(--runemark-slate-300, #cbd5e1);
}

.runemark-dashboard__btn--ghost:hover {
	background-color: var(--runemark-slate-50, #f8fafc);
	color: var(--runemark-slate-900, #0f172a);
}

.runemark-dashboard__btn--cert {
	background-color: var(--runemark-status-done-soft, #d9f2e5);
	color: var(--runemark-status-done-ink, #0f5132);
	border-color: var(--runemark-success-soft-border, #bfe6d0);
}

.runemark-dashboard__btn--cert:hover {
	background-color: var(--runemark-success-soft-hover, #cdebda);
	color: var(--runemark-status-done-ink, #0f5132);
}

.runemark-dashboard__btn--sm {
	padding: 7px 12px;
	font-size: 12.5px;
}

.runemark-dashboard__btn:focus-visible {
	outline: 2px solid var(--runemark-focus-ring, #0073aa);
	outline-offset: 2px;
}

/* All my courses */

.runemark-dashboard__courses {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.runemark-dashboard__course-row {
	display: grid;
	grid-template-columns: 64px 1fr 320px;
	gap: 16px;
	align-items: center;
	background-color: var(--runemark-surface, #fff);
	border: 1px solid var(--runemark-slate-200, #e2e8f0);
	border-radius: 12px;
	box-shadow: var(--runemark-shadow, 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.1));
	padding: 14px 16px;
}

.runemark-dashboard__course-row--done {
	background-color: var(--runemark-slate-50, #f8fafc);
}

.runemark-dashboard__course-icon {
	width: 64px;
	height: 48px;
	border-radius: 9px;
	display: grid;
	place-items: center;
	color: var(--runemark-ink-inverse, #fff);
	font-size: 17px;
}

.runemark-dashboard__course-body {
	min-width: 0;
}

.runemark-dashboard__course-row--variant-1 .runemark-dashboard__course-icon {
	background: linear-gradient(135deg, var(--runemark-primary, #0073aa), var(--runemark-decorative-violet, #4a3aa7));
}

.runemark-dashboard__course-row--variant-2 .runemark-dashboard__course-icon {
	background: linear-gradient(135deg, var(--runemark-decorative-green, #1baf7a), var(--runemark-primary, #0073aa));
}

.runemark-dashboard__course-row--variant-3 .runemark-dashboard__course-icon {
	background: linear-gradient(135deg, var(--runemark-decorative-amber, #eda100), var(--runemark-decorative-orange, #d9663a));
}

.runemark-dashboard__course-row--variant-4 .runemark-dashboard__course-icon {
	background: linear-gradient(135deg, var(--runemark-decorative-violet, #4a3aa7), var(--runemark-decorative-violet-light, #8a5cf6));
}

.runemark-dashboard__course-row--variant-5 .runemark-dashboard__course-icon {
	background: linear-gradient(135deg, var(--runemark-decorative-teal, #0f766e), var(--runemark-decorative-green, #1baf7a));
}

.runemark-dashboard__course-title-row {
	font-size: 15px;
	font-weight: 700;
	color: var(--runemark-slate-900, #0f172a);
	margin: 0 0 5px;
	display: flex;
	align-items: center;
	gap: 9px;
	flex-wrap: wrap;
}

.runemark-dashboard__course-title {
	color: inherit;
	text-decoration: none;
}

.runemark-dashboard__course-title:hover {
	text-decoration: underline;
}

.runemark-dashboard__course-actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	align-items: center;
}

/* Status chips — status is also always conveyed by the label text itself,
   never by color alone. */

.runemark-dashboard__chip {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.02em;
}

.runemark-dashboard__chip--prog {
	background-color: var(--runemark-status-progress-soft, #fef6e0);
	color: var(--runemark-status-progress-ink, #8a6100);
}

.runemark-dashboard__chip--done {
	background-color: var(--runemark-status-done-soft, #d9f2e5);
	color: var(--runemark-status-done-ink, #0f5132);
}

.runemark-dashboard__chip--new {
	background-color: var(--runemark-primary-soft, #e6f1f7);
	color: var(--runemark-primary-soft-ink, #0073aa);
}

/* Certificates */

.runemark-dashboard__certs {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.runemark-dashboard__cert {
	display: grid;
	grid-template-columns: 36px 1fr auto;
	gap: 13px;
	align-items: center;
	background-color: var(--runemark-surface, #fff);
	border: 1px solid var(--runemark-slate-200, #e2e8f0);
	border-radius: 12px;
	box-shadow: var(--runemark-shadow, 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.1));
	padding: 13px 16px;
}

.runemark-dashboard__cert-medal {
	width: 36px;
	height: 36px;
	border-radius: 9px;
	background-color: var(--runemark-status-done-soft, #d9f2e5);
	color: var(--runemark-status-done-ink, #0f5132);
	display: grid;
	place-items: center;
	font-size: 18px;
}

.runemark-dashboard__cert-name {
	font-weight: 700;
	color: var(--runemark-slate-900, #0f172a);
	font-size: 14px;
}

.runemark-dashboard__cert-meta {
	color: var(--runemark-slate-500, #64748b);
	font-size: 12px;
	margin-top: 2px;
}

/* Discover more */

.runemark-dashboard__discover {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
}

.runemark-dashboard__discover-card {
	background-color: var(--runemark-surface, #fff);
	border: 1px solid var(--runemark-slate-200, #e2e8f0);
	border-radius: 12px;
	box-shadow: var(--runemark-shadow, 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.1));
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.runemark-dashboard__discover-thumb {
	aspect-ratio: 16 / 9;
	background: var(--runemark-primary-soft, #e6f1f7);
	display: grid;
	place-items: center;
	color: var(--runemark-primary-soft-ink, #0073aa);
	font-size: 26px;
}

.runemark-dashboard__discover-body {
	padding: 13px 15px;
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.runemark-dashboard__discover-title {
	margin: 0;
	font-size: 14.5px;
	color: var(--runemark-slate-900, #0f172a);
}

.runemark-dashboard__discover-excerpt {
	margin: 0;
	font-size: 12.5px;
	color: var(--runemark-slate-500, #64748b);
	flex: 1 1 auto;
}

.runemark-dashboard__discover-meta {
	font-size: 11.5px;
	color: var(--runemark-slate-400, #94a3b8);
}

.runemark-dashboard__discover-action {
	padding: 0 15px 14px;
}

@media (max-width: 860px) {
	.runemark-dashboard__stats {
		grid-template-columns: repeat(2, 1fr);
	}

	.runemark-dashboard__resume {
		grid-template-columns: 1fr;
		text-align: left;
	}

	.runemark-dashboard__resume-thumb {
		width: 100%;
		height: 120px;
	}

	.runemark-dashboard__resume-cta {
		min-width: 0;
	}

	.runemark-dashboard__course-row {
		grid-template-columns: 52px 1fr;
		grid-template-areas: "icon body" "actions actions";
	}

	.runemark-dashboard__course-icon {
		grid-area: icon;
	}

	.runemark-dashboard__course-body {
		grid-area: body;
	}

	.runemark-dashboard__course-actions {
		grid-area: actions;
		justify-content: flex-start;
	}

	.runemark-dashboard__discover {
		grid-template-columns: 1fr;
	}
}

/* ─── Single Course Landing ────────────────────────────────────────── */

/* Containment (0.38.0, Catalog → Course page). The plugin's own template
 * puts the modifier + `--runemark-landing-max-width` on <main>; under a
 * theme-supplied template only the appended landing block carries them. A
 * max-width with auto side margins is the whole mechanism — no width,
 * padding or display is forced, so a theme or builder can still override. */
.runemark-single-course--contained .runemark-single-course__article,
.runemark-single-course__landing--contained {
	max-width: var(--runemark-landing-max-width, 900px);
	margin-left: auto;
	margin-right: auto;
}

.runemark-single-course__thumbnail {
	margin-bottom: 24px;
}

/* Height cap (0.38.0): with the property set, a tall featured image becomes a
 * banner cropped by object-fit; without it (cap 0) the rule is inert and the
 * image renders at its natural aspect ratio exactly as before. */
.runemark-single-course__image {
	width: 100%;
	height: auto;
	max-height: var(--runemark-landing-image-max-height, none);
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

.runemark-single-course__landing {
	margin-top: 32px;
	padding-top: 32px;
	border-top: 1px solid var(--runemark-border, #dee2e6);
}

.runemark-single-course__intro-video {
	max-width: 100%;
	margin-bottom: 24px;
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 8px;
	background-color: var(--runemark-media-backdrop, #000);
}

.runemark-single-course__intro-video iframe,
.runemark-single-course__intro-video video,
.runemark-single-course__intro-video embed,
.runemark-single-course__intro-video object {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ─── Registration Form ───────────────────────────────────────────── */

/* Every field wrapper is a <div> (0.39.0 follow-up), so the form owns its
   spacing instead of borrowing the browser's <p> margin — 16px, the same
   as the wp-login block. */
.runemark-register__field {
	margin: 0 0 16px;
}

.runemark-register__error-summary {
	padding: 16px;
	margin-bottom: 16px;
	background-color: var(--runemark-danger-soft, #f8d7da);
	border: 1px solid var(--runemark-danger-soft-border, #f5c2c7);
	border-radius: 8px;
	color: var(--runemark-danger-soft-ink, #842029);
}

.runemark-register__error-summary h2 {
	margin: 0 0 8px;
	font-size: 16px;
}

.runemark-register__error-summary ul {
	margin: 0;
	padding: 0 0 0 20px;
}

.runemark-register__error-summary a {
	color: var(--runemark-danger-soft-ink, #842029);
	text-decoration: underline;
}

.runemark-register__field-error {
	display: block;
	margin-top: 4px;
	color: var(--runemark-danger-ink-strong, #991b1b);
	font-size: 13px;
}

.runemark-register__consent-label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-weight: 400;
}

.runemark-register__field--consent input[type="checkbox"] {
	margin: 3px 0 0;
	flex-shrink: 0;
}

.runemark-register__consent-text a {
	text-decoration: underline;
}

/* Date field (0.38.0, F-5): a fieldset of three labelled selects. The
 * fieldset chrome is removed so the group reads as one field; the parts
 * sit in a wrapping row so they stack on a narrow screen. */
.runemark-register__date {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
}

.runemark-register__date legend {
	padding: 0;
	margin-bottom: 4px;
}

.runemark-register__date-parts {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.runemark-register__date-part {
	display: flex;
	flex-direction: column;
	flex: 1 1 8em;
	min-width: 6em;
}

.runemark-register__date-label {
	font-size: 13px;
	font-weight: 400;
	margin-bottom: 2px;
}

.runemark-register__date-select {
	width: 100%;
}

/* Submit button (0.38.0, B-24). Themes such as Page Builder Framework reset
 * <button> to unstyled text, so the plugin owns the whole look — the same
 * colours, radius and focus ring as the enroll button. The focus state is a
 * visible outline, not only a colour shift. */
/* Address and name groups (0.39.0, F-1 / F-3): labelled text inputs in a
   wrapping row, each part label above its input — the date-part layout. */
.runemark-register__address,
.runemark-register__name {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
}

.runemark-register__address legend,
.runemark-register__name legend {
	padding: 0;
	margin-bottom: 4px;
}

.runemark-register__address-parts,
.runemark-register__name-parts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.runemark-register__address-part,
.runemark-register__name-part {
	display: flex;
	flex-direction: column;
	flex: 1 1 10em;
	min-width: 8em;
}

.runemark-register__address-part--street,
.runemark-register__address-part--street2 {
	flex-basis: 100%;
}

.runemark-register__address-label,
.runemark-register__name-label,
.runemark-register__other-label {
	display: block;
	font-size: 0.875em;
	font-weight: 400;
	margin: 0 0 2px;
}

.runemark-register__address-input,
.runemark-register__name-input,
.runemark-register__other-input {
	width: 100%;
	box-sizing: border-box;
}

/* The "Other" text box (0.39.0, F-2) sits under its choice list. The
   script toggles the wrapper's hidden attribute; without it the box is
   simply visible. */
.runemark-register__other {
	display: block;
	margin: 4px 0 8px;
}

.runemark-register__submit {
	margin: 24px 0 12px;
}

.runemark-register__btn {
	display: inline-block;
	padding: 12px 24px;
	border: 0;
	border-radius: var(--runemark-radius-control, 6px);
	background-color: var(--runemark-primary, #0073aa);
	color: var(--runemark-primary-on, #fff);
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.runemark-register__btn:hover {
	background-color: var(--runemark-primary-hover, #005177);
	color: var(--runemark-primary-on, #fff);
}

.runemark-register__btn:focus-visible {
	outline: 2px solid var(--runemark-focus-ring, #0073aa);
	outline-offset: 2px;
}

.runemark-register__btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ─── Responsive ───────────────────────────────────────────────────── */

@media (max-width: 768px) {
	.runemark-catalog__grid--columns-3,
	.runemark-catalog__grid--columns-4 {
		grid-template-columns: repeat(2, 1fr);
	}

	.runemark-my-courses__course-row {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 480px) {
	.runemark-catalog__grid--columns-2,
	.runemark-catalog__grid--columns-3,
	.runemark-catalog__grid--columns-4 {
		grid-template-columns: 1fr;
	}
}
