/**
Theme Name: xtraLesson Learn
Theme URI: https://xtralesson.com/
Author: xtraLesson
Description: Mature, presentation-only Astra child theme for the unified xtraLesson learning platform. Business, entitlement, organisation, programme, commerce and reporting logic remains in xtralesson-core.
Version: 1.2.1
Requires at least: 6.8
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: xtralesson-learn
Template: astra
*/

/*
 * xtraLesson Learn 1.2.1
 * --------------------------------------------------------------------------
 * Visual direction:
 * - Deep institutional navy from the xtraLesson wordmark
 * - Vivid xtraLesson blue for actions and progress
 * - Generous white space and light-blue application surfaces
 * - Restrained radius/shadow system for a mature B2B/B2G learning product
 * - Logical properties and RTL-safe layout for EN / FR / AR
 *
 * Presentation only. Do not place access, entitlement or commerce rules here.
 */

:root {
	--xl-brand-blue: #006bfc;
	--xl-brand-blue-strong: #005bd6;
	--xl-brand-blue-deep: #084b9f;
	--xl-brand-navy: #071a34;
	--xl-brand-navy-2: #0b2e59;
	--xl-brand-ink: #102846;
	--xl-brand-sky: #eaf3ff;
	--xl-brand-sky-2: #f3f7fd;

	--xl-ui-heading: #0b2345;
	--xl-ui-text: #354760;
	--xl-ui-muted: #6d7c91;
	--xl-ui-surface: #ffffff;
	--xl-ui-soft: #f5f8fc;
	--xl-ui-soft-blue: #eef5ff;
	--xl-ui-border: #dce6f2;
	--xl-ui-border-strong: #c9d7e8;

	--xl-ui-success: #087a59;
	--xl-ui-success-soft: #e8f8f2;
	--xl-ui-warning: #9a6200;
	--xl-ui-warning-soft: #fff6dc;
	--xl-ui-purple: #6247c9;
	--xl-ui-purple-soft: #f2efff;
	--xl-ui-danger: #b42318;
	--xl-ui-danger-soft: #fff0ee;

	--xl-ui-radius-sm: 9px;
	--xl-ui-radius: 14px;
	--xl-ui-radius-lg: 20px;
	--xl-ui-radius-xl: 26px;

	--xl-ui-shadow-sm: 0 1px 2px rgba(6, 26, 58, .04), 0 5px 14px rgba(6, 26, 58, .04);
	--xl-ui-shadow: 0 10px 32px rgba(6, 26, 58, .08);
	--xl-ui-shadow-lg: 0 22px 55px rgba(6, 26, 58, .13);

	--xl-ui-transition: 180ms cubic-bezier(.2, .7, .2, 1);
	--xl-ui-content: 1240px;
}

/* --------------------------------------------------------------------------
   GLOBAL PLATFORM CHROME
   -------------------------------------------------------------------------- */

body {
	color: var(--xl-ui-text);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body:not(.wp-admin) {
	background: var(--xl-ui-soft);
}

/* Astra header: bright, calm and institutional. */
.site-header .ast-primary-header-bar,
.ast-primary-header-bar {
	background: rgba(255, 255, 255, .97);
	border-bottom: 1px solid var(--xl-ui-border);
	box-shadow: 0 6px 24px rgba(6, 26, 58, .035);
}

.site-header .ast-builder-grid-row {
	min-height: 72px;
}

.site-header .site-logo-img img,
.site-header .custom-logo-link img {
	max-height: 52px;
	width: auto;
}

.site-title,
.site-title a,
.ast-site-title-wrap .site-title a {
	color: var(--xl-brand-navy);
	font-weight: 750;
	letter-spacing: -.02em;
}

.ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link,
.main-header-menu > .menu-item > .menu-link {
	color: #243a58;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: -.01em;
	padding-inline: 12px;
	transition: color var(--xl-ui-transition);
}

.ast-builder-menu-1 .main-header-menu > .menu-item:hover > .menu-link,
.ast-builder-menu-1 .main-header-menu > .current-menu-item > .menu-link,
.main-header-menu > .menu-item:hover > .menu-link,
.main-header-menu > .current-menu-item > .menu-link {
	color: var(--xl-brand-blue);
}

.ast-mobile-header-wrap .ast-button-wrap .menu-toggle.main-header-menu-toggle {
	color: var(--xl-brand-navy);
}

/* Header call-to-action and language controls. Business destinations remain
 * configured in WordPress/Astra/WPML; the child theme only styles them. */
.ast-header-button-1 .ast-custom-button,
.site-header .ast-custom-button {
	min-height: 42px;
	padding: 10px 16px;
	border: 1px solid var(--xl-brand-blue);
	border-radius: 10px;
	background: var(--xl-brand-blue);
	color: #fff;
	font-size: 14px;
	font-weight: 750;
	box-shadow: 0 6px 16px rgba(0, 107, 252, .14);
	transition: transform var(--xl-ui-transition), background var(--xl-ui-transition), border-color var(--xl-ui-transition), box-shadow var(--xl-ui-transition);
}

.ast-header-button-1 .ast-custom-button:hover,
.ast-header-button-1 .ast-custom-button:focus-visible,
.site-header .ast-custom-button:hover,
.site-header .ast-custom-button:focus-visible {
	transform: translateY(-1px);
	border-color: var(--xl-brand-blue-strong);
	background: var(--xl-brand-blue-strong);
	box-shadow: 0 8px 20px rgba(0, 107, 252, .20);
	color: #fff;
}

.site-header .wpml-ls,
.site-header .wpml-ls ul {
	margin: 0;
}

.site-header .wpml-ls a {
	border-radius: 8px;
	color: #314762;
	font-size: 14px;
	font-weight: 650;
}

.site-header .wpml-ls a:hover,
.site-header .wpml-ls a:focus-visible,
.site-header .wpml-ls-current-language > a {
	background: var(--xl-brand-sky);
	color: var(--xl-brand-blue-deep);
}

.ast-mobile-popup-drawer .ast-mobile-popup-inner {
	background: #fff;
	color: var(--xl-ui-text);
}

.ast-mobile-popup-drawer .main-header-menu > .menu-item > .menu-link {
	min-height: 48px;
	border-bottom: 1px solid #edf2f8;
	color: var(--xl-brand-navy);
	font-weight: 650;
}

/* Mature footer treatment for learning-platform pages that use Astra footer. */
.site-footer .site-primary-footer-wrap,
.site-footer .site-below-footer-wrap {
	background: var(--xl-brand-navy);
	border-color: rgba(255, 255, 255, .10);
	color: rgba(255, 255, 255, .78);
}

.site-footer :where(h1, h2, h3, h4, h5, h6),
.site-footer .site-title,
.site-footer strong {
	color: #fff;
}

.site-footer a {
	color: rgba(255, 255, 255, .86);
}

.site-footer a:hover,
.site-footer a:focus-visible {
	color: #fff;
}

/* --------------------------------------------------------------------------
   XTRALESSON APPLICATION SHELL
   -------------------------------------------------------------------------- */

body.xl-astra-shell,
body.xl-astra-shell #page,
body.xl-astra-shell .site,
body.xl-astra-shell .site-content,
body.xl-astra-shell #content,
body.xl-astra-shell #primary,
body.xl-astra-shell .site-main,
body.xl-astra-shell .site-main > article,
body.xl-astra-shell .entry-content,
body.xl-astra-shell.ast-separate-container .ast-article-single,
body.xl-astra-shell.ast-separate-container .ast-article-post,
body.xl-astra-shell.ast-plain-container .site-content,
body.xl-astra-shell.ast-page-builder-template .site-content {
	background-color: var(--xl-ui-soft) !important;
	color: var(--xl-ui-text) !important;
}

body.xl-astra-shell #content > .ast-container {
	width: 100%;
	max-width: var(--xl-ui-content);
	padding: clamp(26px, 4.5vw, 64px) clamp(18px, 3vw, 38px) clamp(52px, 7vw, 88px);
}

body.xl-astra-shell #primary,
body.xl-astra-shell .entry-content {
	width: 100%;
	min-width: 0;
	margin: 0;
}

body.xl-astra-shell .site-main > article,
body.xl-astra-shell .entry-content {
	box-shadow: none;
}

body.xl-astra-shell :where(.xl-dashboard, .xl-form, .xl-academy-catalogue, .xl-academy-detail, .xl-org-portal, .xl-programme-portal) {
	color: var(--xl-ui-text);
	font-size: 16px;
	line-height: 1.62;
}

body.xl-astra-shell :where(.xl-dashboard, .xl-form, .xl-academy-catalogue, .xl-academy-detail, .xl-org-portal, .xl-programme-portal) :where(h1, h2, h3, h4, h5, h6),
body.xl-astra-shell .xl-eyebrow {
	color: var(--xl-ui-heading);
	letter-spacing: -.025em;
}

body.xl-astra-shell :where(.xl-dashboard, .xl-form, .xl-academy-catalogue, .xl-academy-detail, .xl-org-portal, .xl-programme-portal) a:not(.xl-button) {
	color: var(--xl-brand-blue-strong);
}

/* Generic section rhythm. */
.xl-dashboard > section,
.xl-academy-detail > section,
.xl-org-portal > section,
.xl-programme-portal > section {
	margin-block: 34px;
}

.xl-dashboard > section > h3,
.xl-org-portal section > h3,
.xl-programme-portal section > h3,
.xl-academy-detail section > h3 {
	margin: 0 0 16px;
	font-size: clamp(1.25rem, 2vw, 1.55rem);
	font-weight: 720;
}

.xl-eyebrow {
	margin: 0 0 9px;
	color: var(--xl-brand-blue) !important;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .12em !important;
	line-height: 1.2;
	text-transform: uppercase;
}

.xl-muted,
.xl-form :where(small, .description) {
	color: var(--xl-ui-muted) !important;
}

/* --------------------------------------------------------------------------
   DASHBOARD / MY LEARNING
   -------------------------------------------------------------------------- */

.xl-dashboard {
	max-width: 1160px;
	margin-inline: auto;
}

.xl-dashboard-header {
	position: relative;
	overflow: hidden;
	margin-bottom: 36px;
	padding: clamp(28px, 4vw, 42px);
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: var(--xl-ui-radius-xl);
	background:
		radial-gradient(circle at 92% 10%, rgba(74, 153, 255, .38) 0, rgba(74, 153, 255, 0) 28%),
		radial-gradient(circle at 77% 95%, rgba(17, 105, 247, .30) 0, rgba(17, 105, 247, 0) 34%),
		linear-gradient(135deg, #061a3a 0%, #0a2d60 55%, #075bd5 140%);
	box-shadow: var(--xl-ui-shadow-lg);
}

.xl-dashboard-header::after {
	content: "";
	position: absolute;
	inset-inline-end: -50px;
	inset-block-start: -80px;
	width: 220px;
	height: 220px;
	border: 1px solid rgba(255, 255, 255, .16);
	border-radius: 50%;
	box-shadow: 0 0 0 34px rgba(255,255,255,.035), 0 0 0 68px rgba(255,255,255,.02);
	pointer-events: none;
}

.xl-dashboard-header .xl-eyebrow {
	color: #9fc9ff !important;
}

.xl-dashboard-header h2 {
	position: relative;
	z-index: 1;
	margin: 0;
	color: #fff !important;
	font-size: clamp(2rem, 4vw, 3.15rem);
	font-weight: 760;
	line-height: 1.08;
	letter-spacing: -.045em;
}

.xl-learning-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
	gap: 18px;
}

.xl-learning-item {
	position: relative;
	padding: 24px;
	border: 1px solid var(--xl-ui-border);
	border-radius: var(--xl-ui-radius-lg);
	background: var(--xl-ui-surface);
	box-shadow: var(--xl-ui-shadow-sm);
	transition: transform var(--xl-ui-transition), box-shadow var(--xl-ui-transition), border-color var(--xl-ui-transition);
}

.xl-learning-item:hover {
	transform: translateY(-2px);
	border-color: #c7d9ef;
	box-shadow: var(--xl-ui-shadow);
}

.xl-learning-item h4 {
	margin: 0 0 18px;
	font-size: 1.2rem;
	font-weight: 720;
	line-height: 1.35;
}

.xl-learning-item small {
	display: inline-block;
	margin-top: 8px;
	color: var(--xl-ui-muted);
	font-size: 13px;
	font-weight: 700;
}

.xl-progress {
	overflow: hidden;
	height: 9px;
	border-radius: 999px;
	background: #e6edf7;
	box-shadow: inset 0 1px 2px rgba(6, 26, 58, .05);
}

.xl-progress > span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, var(--xl-brand-blue), #43a2ff);
	box-shadow: 0 0 14px rgba(0, 107, 252, .22);
}

.xl-empty-state {
	padding: 28px;
	border: 1px dashed #b9cce3;
	border-radius: var(--xl-ui-radius-lg);
	background: linear-gradient(135deg, #fff, #f7fbff);
	color: var(--xl-ui-text);
}

.xl-empty-state p:first-child {
	margin-top: 0;
}

/* --------------------------------------------------------------------------
   CARDS / ACADEMIES / COURSES
   -------------------------------------------------------------------------- */

.xl-card-grid,
.xl-course-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
	gap: 20px;
}

.xl-card,
.xl-org-metrics article,
.xl-programme-metrics article {
	position: relative;
	overflow: hidden;
	padding: 24px;
	border: 1px solid var(--xl-ui-border);
	border-radius: var(--xl-ui-radius-lg);
	background: var(--xl-ui-surface);
	color: var(--xl-ui-text);
	box-shadow: var(--xl-ui-shadow-sm);
	transition: transform var(--xl-ui-transition), box-shadow var(--xl-ui-transition), border-color var(--xl-ui-transition);
}

.xl-card:hover {
	transform: translateY(-3px);
	border-color: #c8d8eb;
	box-shadow: var(--xl-ui-shadow);
}

.xl-card::before {
	content: "";
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0;
	width: 4px;
	background: var(--xl-brand-blue);
}

.xl-card h3,
.xl-card h4 {
	margin: 14px 0 12px;
	font-weight: 730;
	line-height: 1.3;
}

.xl-academy-card.xl-state-open_access::before,
.xl-academy-card.xl-state-open::before {
	background: var(--xl-ui-success);
}

.xl-academy-card.xl-state-premium::before,
.xl-academy-card.xl-state-purchase::before {
	background: var(--xl-brand-blue);
}

.xl-academy-card.xl-state-organisation::before,
.xl-academy-card.xl-state-institutional::before {
	background: var(--xl-ui-purple);
}

.xl-academy-card.xl-state-sponsored::before,
.xl-academy-card.xl-state-programme::before {
	background: #bc7b09;
}

.xl-access-badge {
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	padding: 5px 10px;
	border: 1px solid #d5e6fa;
	border-radius: 999px;
	background: var(--xl-brand-sky);
	color: #0751ad;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .015em;
	line-height: 1.2;
}

.xl-state-open_access .xl-access-badge,
.xl-state-open .xl-access-badge {
	border-color: #c8ecdf;
	background: var(--xl-ui-success-soft);
	color: #076849;
}

.xl-state-institutional .xl-access-badge,
.xl-state-organisation .xl-access-badge {
	border-color: #ddd6fb;
	background: var(--xl-ui-purple-soft);
	color: #5638b6;
}

.xl-state-sponsored .xl-access-badge,
.xl-state-programme .xl-access-badge {
	border-color: #f2ddb1;
	background: var(--xl-ui-warning-soft);
	color: #8a5a08;
}

.xl-price-list,
.xl-simple-list {
	margin: 15px 0 20px;
	padding: 0;
	list-style: none;
}

.xl-simple-list li,
.xl-price-list li {
	padding-block: 9px;
	border-bottom: 1px solid #edf2f8;
}

.xl-simple-list li:last-child,
.xl-price-list li:last-child {
	border-bottom: 0;
}

/* Academy detail gets a compact branded masthead. */
.xl-academy-detail {
	max-width: 1160px;
	margin-inline: auto;
}

.xl-back-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
}

.xl-academy-detail-header {
	position: relative;
	overflow: hidden;
	margin-bottom: 26px;
	padding: clamp(26px, 4vw, 40px);
	border-radius: var(--xl-ui-radius-xl);
	background: linear-gradient(135deg, #061a3a 0%, #0b2f63 75%, #0868f7 150%);
	box-shadow: var(--xl-ui-shadow-lg);
}

.xl-academy-detail-header .xl-eyebrow {
	color: #9fc9ff !important;
}

.xl-academy-detail-header h2 {
	margin: 0;
	color: #fff !important;
	font-size: clamp(1.9rem, 4vw, 2.8rem);
	font-weight: 760;
	letter-spacing: -.04em;
}

.xl-course-card {
	min-height: 210px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.xl-course-card .xl-button,
.xl-course-card .xl-access-badge:last-child {
	margin-top: auto;
}

/* --------------------------------------------------------------------------
   BUTTONS / INTERACTION
   -------------------------------------------------------------------------- */

.xl-button,
body.xl-astra-shell .xl-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px 17px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: linear-gradient(180deg, #0b70ff 0%, var(--xl-brand-blue) 100%);
	color: #fff !important;
	font: inherit;
	font-size: 14px;
	font-weight: 750;
	line-height: 1.15;
	text-decoration: none !important;
	box-shadow: 0 7px 16px rgba(0, 107, 252, .17);
	cursor: pointer;
	transition: transform var(--xl-ui-transition), box-shadow var(--xl-ui-transition), background var(--xl-ui-transition), border-color var(--xl-ui-transition);
}

.xl-button:hover,
.xl-button:focus-visible {
	transform: translateY(-1px);
	background: linear-gradient(180deg, var(--xl-brand-blue) 0%, var(--xl-brand-blue-strong) 100%);
	box-shadow: 0 9px 20px rgba(0, 107, 252, .23);
	color: #fff !important;
}

.xl-button:active {
	transform: translateY(0);
}

.xl-button:disabled,
.xl-button[aria-disabled="true"] {
	transform: none;
	background: #a9b8ca;
	border-color: #a9b8ca;
	box-shadow: none;
	cursor: not-allowed;
	opacity: .76;
}

.xl-button-secondary,
body.xl-astra-shell .xl-button-secondary {
	border-color: #cfe0f4;
	background: #f4f8fd;
	color: #0a3e79 !important;
	box-shadow: none;
}

.xl-button-secondary:hover,
.xl-button-secondary:focus-visible {
	border-color: #acc9eb;
	background: #eaf3ff;
	color: var(--xl-brand-blue-deep) !important;
	box-shadow: none;
}

.xl-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

/* --------------------------------------------------------------------------
   FORMS / REGISTRATION / ONBOARDING
   -------------------------------------------------------------------------- */

.xl-form,
.xl-org-form,
.xl-programme-portal form {
	border: 1px solid var(--xl-ui-border);
	border-radius: var(--xl-ui-radius-lg);
	background: var(--xl-ui-surface);
	box-shadow: var(--xl-ui-shadow-sm);
}

.xl-registration-form,
.xl-onboarding-form {
	max-width: 880px;
	margin-inline: auto;
	padding: clamp(24px, 4vw, 38px);
	border-top: 4px solid var(--xl-brand-blue);
	box-shadow: var(--xl-ui-shadow);
}

.xl-preferences-form,
.xl-org-form,
.xl-programme-portal form {
	padding: 22px;
}

.xl-form label,
.xl-org-form label,
.xl-programme-portal form label {
	display: block;
	margin-bottom: 15px;
	color: var(--xl-ui-heading);
	font-size: 14px;
	font-weight: 700;
}

.xl-grid {
	display: grid;
	gap: 16px;
}

.xl-grid-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.xl-form :where(input:not([type="checkbox"]), select, textarea),
.xl-org-form :where(input:not([type="checkbox"]), select, textarea),
.xl-programme-portal form :where(input:not([type="checkbox"]), select, textarea) {
	width: 100%;
	min-height: 46px;
	margin-top: 7px;
	padding: 10px 12px;
	border: 1px solid var(--xl-ui-border-strong);
	border-radius: var(--xl-ui-radius-sm);
	background: #fff;
	color: var(--xl-ui-heading);
	font: inherit;
	font-weight: 500;
	box-shadow: inset 0 1px 2px rgba(6, 26, 58, .025);
	transition: border-color var(--xl-ui-transition), box-shadow var(--xl-ui-transition);
}

.xl-form :where(input, select, textarea):focus,
.xl-org-form :where(input, select, textarea):focus,
.xl-programme-portal form :where(input, select, textarea):focus {
	border-color: #7fb2f5;
	outline: none;
	box-shadow: 0 0 0 4px rgba(0, 107, 252, .11);
}

.xl-form :where(input, textarea)::placeholder,
.xl-org-form :where(input, textarea)::placeholder,
.xl-programme-portal form :where(input, textarea)::placeholder {
	color: #8b98aa;
	opacity: 1;
}

.xl-check {
	display: flex !important;
	gap: 10px;
	align-items: flex-start;
	font-weight: 500 !important;
}

.xl-check input[type="checkbox"] {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin-top: 3px;
	accent-color: var(--xl-brand-blue);
}

.xl-form-message {
	margin-block: 12px;
	font-size: 14px;
	font-weight: 650;
}

.xl-bulk-preview:not(:empty) {
	margin-block: 14px;
	padding: 14px 16px;
	border: 1px solid var(--xl-ui-border);
	border-radius: var(--xl-ui-radius-sm);
	background: #f7faff;
	color: var(--xl-ui-text);
	font-size: 14px;
}

/* --------------------------------------------------------------------------
   NOTICES
   -------------------------------------------------------------------------- */

.xl-notice {
	max-width: 880px;
	margin: 16px auto;
	padding: 18px 20px;
	border: 1px solid #cfe0f4;
	border-inline-start: 4px solid var(--xl-brand-blue);
	border-radius: var(--xl-ui-radius);
	background: #f3f8ff;
	color: var(--xl-ui-text);
	box-shadow: var(--xl-ui-shadow-sm);
}

.xl-notice-error {
	border-color: #f2c7c2;
	border-inline-start-color: var(--xl-ui-danger);
	background: var(--xl-ui-danger-soft);
	color: #7a271f;
}

.xl-signed-out .xl-actions {
	margin-top: 14px;
}

/* --------------------------------------------------------------------------
   ORGANISATION / PROGRAMME PORTALS
   -------------------------------------------------------------------------- */

.xl-org-portal,
.xl-programme-portal {
	max-width: 1180px;
	margin-inline: auto;
}

.xl-org-header,
.xl-programme-header {
	display: flex;
	gap: 24px;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 26px;
	padding: 28px 30px;
	border-radius: var(--xl-ui-radius-xl);
	background: linear-gradient(135deg, var(--xl-brand-navy), #0b315f);
	box-shadow: var(--xl-ui-shadow-lg);
}

.xl-org-header .xl-eyebrow,
.xl-programme-header .xl-eyebrow {
	color: #9fc9ff !important;
}

.xl-org-header :where(h1, h2, h3),
.xl-programme-header :where(h1, h2, h3),
.xl-org-header label,
.xl-programme-header label {
	color: #fff !important;
}

.xl-org-header h2,
.xl-programme-header h2 {
	margin: 0;
	font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.xl-org-metrics,
.xl-programme-metrics {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
	margin-bottom: 28px;
}

.xl-org-metrics article,
.xl-programme-metrics article {
	min-height: 120px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.xl-org-metrics article::before,
.xl-programme-metrics article::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	inset-block: 0;
	width: 4px;
	background: var(--xl-brand-blue);
}

.xl-org-metrics strong,
.xl-programme-metrics strong {
	display: block;
	color: var(--xl-brand-navy);
	font-size: clamp(1.65rem, 3vw, 2.15rem);
	font-weight: 780;
	line-height: 1;
}

.xl-org-metrics span,
.xl-programme-metrics span {
	display: block;
	margin-top: 8px;
	color: var(--xl-ui-muted);
	font-size: 13px;
	font-weight: 700;
}

.xl-org-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 24px 0;
	padding: 8px;
	border: 1px solid var(--xl-ui-border);
	border-radius: 12px;
	background: #fff;
	box-shadow: var(--xl-ui-shadow-sm);
}

.xl-org-tabs a {
	padding: 9px 13px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
}

.xl-org-tabs a:hover,
.xl-org-tabs a:focus-visible {
	background: var(--xl-brand-sky);
}

.xl-section-heading {
	display: flex;
	gap: 16px;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.xl-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--xl-ui-border);
	border-radius: var(--xl-ui-radius);
	background: #fff;
	box-shadow: var(--xl-ui-shadow-sm);
}

.xl-org-table,
.xl-table {
	width: 100%;
	border: 0;
	border-collapse: collapse;
	background: #fff;
	font-size: 14px;
}

.xl-org-table th,
.xl-table th {
	padding: 13px 15px;
	border: 0;
	border-bottom: 1px solid var(--xl-ui-border);
	background: #f4f7fb;
	color: #34506f;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .04em;
	text-align: start;
	text-transform: uppercase;
}

.xl-org-table td,
.xl-table td {
	padding: 13px 15px;
	border: 0;
	border-bottom: 1px solid #edf2f8;
	color: var(--xl-ui-text);
	text-align: start;
}

.xl-org-table tbody tr:last-child td,
.xl-table tbody tr:last-child td {
	border-bottom: 0;
}

/* --------------------------------------------------------------------------
   TUTOR LMS VISUAL BRIDGE
   Tutor owns templates and learning logic. This layer only harmonises visual UI.
   -------------------------------------------------------------------------- */

body.xl-astra-tutor,
body.xl-astra-tutor #page,
body.xl-astra-tutor .site-content,
body.xl-astra-tutor #content {
	background: var(--xl-ui-soft);
}

.xl-astra-tutor #content > .ast-container {
	width: 100%;
	max-width: 1340px;
	padding-inline: clamp(12px, 2.4vw, 32px);
}

.xl-astra-tutor .tutor-wrap,
.xl-astra-tutor .tutor-container {
	font-family: inherit;
}

.xl-astra-tutor :where(.tutor-card, .tutor-course-card, .tutor-single-course-sidebar, .tutor-dashboard-content, .tutor-course-details-widget) {
	border-color: var(--xl-ui-border);
	border-radius: var(--xl-ui-radius-lg);
	box-shadow: var(--xl-ui-shadow-sm);
}

.xl-astra-tutor :where(.tutor-btn-primary, .tutor-btn.tutor-btn-primary) {
	border-color: var(--xl-brand-blue) !important;
	background: var(--xl-brand-blue) !important;
	color: #fff !important;
	box-shadow: 0 7px 16px rgba(0, 107, 252, .16);
}

.xl-astra-tutor :where(.tutor-btn-primary, .tutor-btn.tutor-btn-primary):hover,
.xl-astra-tutor :where(.tutor-btn-primary, .tutor-btn.tutor-btn-primary):focus-visible {
	border-color: var(--xl-brand-blue-strong) !important;
	background: var(--xl-brand-blue-strong) !important;
}

.xl-astra-tutor :where(.tutor-color-primary, .tutor-nav-link.is-active, .tutor-nav-link:hover) {
	color: var(--xl-brand-blue) !important;
}

.xl-astra-tutor .tutor-progress-value,
.xl-astra-tutor .tutor-progress-bar-fill {
	background-color: var(--xl-brand-blue) !important;
}

/* Learning area: mature navy top bar, light content/sidebar. */
.xl-astra-tutor .tutor-course-single-content-wrapper {
	background: var(--xl-ui-soft);
}

.xl-astra-tutor .tutor-course-topic-single-header {
	border-bottom: 0;
	background: var(--xl-brand-navy);
	box-shadow: 0 8px 25px rgba(6, 26, 58, .13);
}

.xl-astra-tutor .tutor-course-topic-single-header-title,
.xl-astra-tutor .tutor-course-topic-single-header-title a,
.xl-astra-tutor .tutor-course-topic-single-header .tutor-progress-content,
.xl-astra-tutor .tutor-course-topic-single-header :where(.tutor-iconic-btn, .tutor-iconic-btn i) {
	color: #fff !important;
}

.xl-astra-tutor .tutor-course-single-sidebar-wrapper {
	border-inline-end: 1px solid var(--xl-ui-border);
	background: #fff;
}

.xl-astra-tutor .tutor-course-single-sidebar-title {
	border-bottom-color: var(--xl-ui-border);
	background: #fff;
}

.xl-astra-tutor .tutor-course-topic .tutor-accordion-item-header {
	background: #f6f9fd;
	color: var(--xl-brand-navy);
}

.xl-astra-tutor .tutor-course-topic .tutor-accordion-item-header.is-active {
	background: var(--xl-brand-sky);
	color: var(--xl-brand-blue-deep);
}

.xl-astra-tutor .tutor-course-topic-item {
	border-color: #edf2f8;
	transition: background var(--xl-ui-transition), color var(--xl-ui-transition);
}

.xl-astra-tutor .tutor-course-topic-item:hover {
	background: #f7faff;
}

.xl-astra-tutor .tutor-course-topic-item.is-active {
	background: #eef5ff;
	box-shadow: inset 3px 0 0 var(--xl-brand-blue);
}

[dir="rtl"] .xl-astra-tutor .tutor-course-topic-item.is-active {
	box-shadow: inset -3px 0 0 var(--xl-brand-blue);
}

.xl-astra-tutor .tutor-course-topic-single-body {
	background: #fff;
}

.xl-astra-tutor .tutor-course-topic-single-footer {
	border-top: 1px solid var(--xl-ui-border);
	background: #fff;
}

/* Tutor dashboard/course cards. */
.xl-astra-tutor .tutor-progress-card {
	border: 1px solid var(--xl-ui-border);
	border-radius: var(--xl-ui-radius-lg);
	background: #fff;
	box-shadow: var(--xl-ui-shadow-sm);
}

.xl-astra-tutor .tutor-progress-card-title {
	color: var(--xl-brand-navy);
	font-weight: 720;
}

/* --------------------------------------------------------------------------
   ACCESSIBILITY / RTL / RESPONSIVE
   -------------------------------------------------------------------------- */

.xl-astra :where(a, button, input, select, textarea):focus-visible,
.xl-astra-tutor :where(a, button, input, select, textarea):focus-visible {
	outline: 3px solid rgba(0, 107, 252, .42);
	outline-offset: 2px;
}

[dir="rtl"] .xl-astra :where(.xl-org-table th, .xl-org-table td, .xl-table th, .xl-table td) {
	text-align: start;
}

[dir="rtl"] .xl-card::before,
[dir="rtl"] .xl-org-metrics article::before,
[dir="rtl"] .xl-programme-metrics article::before {
	inset-inline-start: 0;
}

@media (max-width: 1024px) {
	.xl-org-metrics,
	.xl-programme-metrics {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.site-header .ast-builder-grid-row {
		min-height: 64px;
	}
}

@media (max-width: 768px) {
	body.xl-astra-shell #content > .ast-container,
	.xl-astra-tutor #content > .ast-container {
		padding-inline: 16px;
	}

	.xl-grid-2,
	.xl-org-metrics,
	.xl-programme-metrics {
		grid-template-columns: 1fr;
	}

	.xl-dashboard-header,
	.xl-academy-detail-header,
	.xl-org-header,
	.xl-programme-header {
		border-radius: 18px;
	}

	.xl-org-header,
	.xl-programme-header,
	.xl-section-heading {
		align-items: flex-start;
		flex-direction: column;
	}

	.xl-card,
	.xl-learning-item,
	.xl-registration-form,
	.xl-onboarding-form {
		padding: 20px;
	}

	.xl-button {
		min-height: 46px;
	}

	/* Programme tables are emitted without a dedicated wrapper in core 0.7.12.
	 * Keep them usable on narrow screens without changing core markup. */
	.xl-programme-portal .xl-table {
		display: block;
		overflow-x: auto;
		max-width: 100%;
		-webkit-overflow-scrolling: touch;
	}

	.site-header .wpml-ls {
		max-width: 100%;
	}
}

@media (max-width: 480px) {
	body.xl-astra-shell #content > .ast-container {
		padding-block-start: 22px;
	}

	.xl-dashboard-header h2 {
		font-size: 2rem;
	}

	.xl-dashboard > section,
	.xl-academy-detail > section,
	.xl-org-portal > section,
	.xl-programme-portal > section {
		margin-block: 26px;
	}
}

@media (forced-colors: active) {
	.xl-button,
	.xl-access-badge,
	.xl-card,
	.xl-learning-item,
	.xl-form,
	.xl-org-form,
	.xl-programme-portal form {
		forced-color-adjust: auto;
	}

	.xl-progress > span {
		background: Highlight;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
	}
}
