/* iClass Learning: course page and My Courses, on the Astra theme. The approved demo rules, plus the result-message rules marked "Addition" below.
 * The pages are fluid: rows wrap and sizes are clamped; one width (782px, WordPress's own) is where the course page's
 * two columns and a course row's four cells are stacked. */
body.icx-page { background: #fff; }
body.icx-page .site-content > .ast-container { max-width: none !important; padding: 0 !important; display: block; }
body.icx-page #primary { margin: 0; padding: 0; width: 100%; }
body.icx-page .ast-separate-container,
body.icx-page.ast-separate-container .ast-article-single { background: #fff; padding: 0; }

/* Site header in the brand's navy, so the learner area reads as one place. */
body.icx-page .site-header,
body.icx-page .ast-primary-header-bar,
body.icx-page .main-header-bar { background: var(--icx-navy); border: 0; }
body.icx-page .site-title a,
body.icx-page .main-header-menu > .menu-item > .menu-link,
body.icx-page .ast-header-break-point .main-header-menu .menu-link {
	color: #fff;
	font-family: "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
	font-weight: 600;
}
body.icx-page .site-title a { font-size: 1.125rem; letter-spacing: -0.01em; }
body.icx-page .main-header-menu > .menu-item > .menu-link { font-size: 0.875rem; }
body.icx-page .main-header-menu > .menu-item > .menu-link:hover,
body.icx-page .main-header-menu > .current-menu-item > .menu-link { color: var(--icx-gold); }
body.icx-page .ast-mobile-menu-trigger-minimal,
body.icx-page .ast-button-wrap .menu-toggle .ast-mobile-svg { color: #fff; fill: #fff; }
body.icx-page .site-footer { border-top: 1px solid var(--icx-line); }
/* The site name, the menu links and the menu button are at least 44 pixels to press. */
body.icx-page .site-title a,
body.icx-page .main-header-menu > .menu-item > .menu-link { display: inline-flex; align-items: center; min-height: 44px; }
body.icx-page .ast-button-wrap .menu-toggle { min-width: 44px; min-height: 44px; }
body.icx-page .site-header a:focus-visible,
body.icx-page .site-header button:focus-visible { outline: 3px solid var(--icx-gold); outline-offset: 2px; }

.icx-wrap {
	width: min(100% - 2 * clamp(16px, 4vw, 20px), 1120px);
	margin-inline: auto;
}

/* ---------- Course hero ---------- */
.icx-hero {
	background: var(--icx-navy);
	color: #fff;
	padding: clamp(28px, 5vw, 64px) 0 clamp(28px, 4vw, 52px);
	border-top: 1px solid var(--icx-navy-2);
}
.icx-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
	gap: clamp(24px, 5vw, 72px);
	align-items: end;
}
.icx-hero h1 {
	color: #fff;
	font: 700 clamp(1.875rem, 1.2rem + 2.6vw, 3.25rem)/1.08 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
	letter-spacing: -0.02em;
	margin: 0 0 14px;
	text-wrap: balance;
	overflow-wrap: anywhere;
}
.icx-hero__summary {
	color: rgba(255, 255, 255, 0.82);
	font: 400 1.0625rem/1.55 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
	max-width: 56ch;
	margin: 0 0 26px;
}
.icx-hero__done { color: #fff; font: 600 1rem/1.5 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif; margin: 0; }

/* The one loud thing on the page: where to go next. */
.icx-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 46px;
	text-align: center;
	background: var(--icx-gold);
	color: var(--icx-navy) !important;
	text-decoration: none !important;
	border: 1px solid var(--icx-gold);
	border-radius: 999px;
	padding: 15px 30px;
	font: 600 0.9375rem/1 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}
.icx-cta:hover,
.icx-cta:focus-visible { background: #fff; border-color: #fff; }
.icx-cta:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.icx-cta--navy {
	background: var(--icx-navy);
	border-color: var(--icx-navy);
	color: #fff !important;
	padding: 14px 26px;
}
.icx-cta--navy:hover,
.icx-cta--navy:focus-visible { background: var(--icx-navy-3); border-color: var(--icx-navy-3); }
.icx-cta--navy:focus-visible { outline-color: var(--icx-gold); }
/* The learning system's own join button on an open course, in the same shape. */
.icx-hero__join :is(button, a, input[type="submit"]) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 46px;
	background: var(--icx-gold);
	color: var(--icx-navy);
	border: 1px solid var(--icx-gold);
	border-radius: 999px;
	padding: 15px 30px;
	font: 600 0.9375rem/1 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
	text-decoration: none;
	cursor: pointer;
}
.icx-hero__join :is(button, a, input[type="submit"]):hover,
.icx-hero__join :is(button, a, input[type="submit"]):focus-visible { background: #fff; border-color: #fff; }
.icx-hero__join :is(button, a, input[type="submit"]):focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.icx-hero__join form { margin: 0; }

.icx-facts { margin: 0; display: grid; gap: 18px; }
.icx-facts > div { border-top: 1px solid rgba(255, 255, 255, 0.22); padding-top: 14px; }
.icx-facts dt {
	color: rgba(255, 255, 255, 0.7);
	font: 600 0.8125rem/1 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
	margin: 0 0 8px;
}
.icx-facts dd { margin: 0; display: grid; gap: 8px; color: rgba(255, 255, 255, 0.82); font: 500 0.875rem/1.3 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif; }
.icx-facts strong { color: #fff; font: 700 1.625rem/1 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif; letter-spacing: -0.01em; }
.icx-meter__bar { display: block; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.icx-meter__bar > span { display: block; height: 100%; min-width: 6px; border-radius: 999px; background: var(--icx-gold); }

/* ---------- Outline ---------- */
.icx-outline { padding: clamp(24px, 4vw, 48px) 0 72px; display: grid; gap: 28px; }
.icx-module > header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding: 0 4px 10px;
	border-bottom: 2px solid var(--icx-navy);
}
.icx-module h2 { color: var(--icx-navy); font: 700 1.125rem/1.2 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.icx-module > header p { flex: none; }
.icx-module > header p { color: var(--icx-ink-2); font: 600 0.8125rem/1 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif; margin: 0; }
.icx-module ol { list-style: none; margin: 0; padding: 0; }
.icx-module li { border-bottom: 1px solid var(--icx-line); margin: 0; }
.icx-module li > a,
.icx-module li > .icx-locked {
	display: grid;
	grid-template-columns: 22px minmax(0, 1fr) auto;
	align-items: center;
	gap: 14px;
	min-height: 44px;
	box-sizing: border-box;
	padding: 16px 4px;
	color: var(--icx-ink);
	text-decoration: none;
	overflow-wrap: anywhere;
	font: 500 1rem/1.35 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
}
.icx-module li > a:hover { background: var(--icx-canvas); color: var(--icx-navy); }
.icx-module li > a:focus-visible { outline: 3px solid var(--icx-gold); outline-offset: -3px; box-shadow: inset 0 0 0 5px var(--icx-navy); }
.icx-locked { color: var(--icx-ink-2); }
.icx-dot {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 2px solid var(--icx-line);
	box-sizing: border-box;
	background: #fff;
}
.icx-module li.is-done .icx-dot {
	border-color: var(--icx-done);
	background: var(--icx-done) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 10.4l3 3 6-6.6'/%3E%3C/svg%3E") center/16px no-repeat;
}
.icx-module li.is-done .icx-lesson__title { color: var(--icx-ink-2); }
.icx-module li.is-next .icx-dot { border-color: var(--icx-navy); box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 10px var(--icx-navy); }
.icx-module li.is-next .icx-lesson__title { color: var(--icx-navy); font-weight: 700; }
.icx-lesson__state { color: var(--icx-ink-2); font: 600 0.8125rem/1 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif; white-space: nowrap; }
.icx-module li.is-next .icx-lesson__state {
	color: var(--icx-navy);
	background: var(--icx-tint);
	border-radius: 999px;
	padding: 7px 12px;
}

/* ---------- My Courses ---------- */
body.icx-page { overflow-x: clip; }
body.icx-page .entry-header { display: none; }
body.icx-page.page .entry-content { margin: 0; }
body.icx-page.page #primary { margin: 0 !important; padding: 0 0 80px !important; }
body.icx-page.page .ast-article-single,
body.icx-page.page article { width: 100%; max-width: none; margin: 0; padding: 0; }
body.icx-page .entry-content > .icx-home {
	display: grid;
	gap: clamp(28px, 4vw, 52px);
	max-width: none !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
}
.icx-home .icx-wrap { width: min(100% - 40px, 1120px); margin-inline: auto; }

/* The welcome band: a greeting over cover art. Nothing about any one course lives here. */
.icx-resume {
	position: relative;
	color: #fff;
	background-color: var(--icx-navy);
	background-image:
		linear-gradient(90deg, var(--icx-navy) 0%, rgba(27, 44, 93, 0.94) 38%, rgba(27, 44, 93, 0.25) 72%, rgba(27, 44, 93, 0) 100%),
		var(--icx-art, none);
	background-size: cover;
	background-position: right center;
	padding: clamp(36px, 5.5vw, 72px) 0 !important;
	margin: 0 !important;
	border-top: 1px solid var(--icx-navy-2);
	border-bottom: 3px solid var(--icx-gold);
}
.icx-resume h1 {
	color: #fff;
	font: 500 clamp(1.5rem, 1.1rem + 1.5vw, 2.125rem)/1.2 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
	letter-spacing: -0.005em;
	margin: 0;
	max-width: 24ch;
	text-wrap: balance;
	overflow-wrap: anywhere;
}

/* The list: cover beside the name, one line of facts, one action. */
.icx-shelf > header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding: 0 2px 14px;
	border-bottom: 2px solid var(--icx-navy);
}
.icx-shelf h2 { color: var(--icx-navy); font: 700 1.375rem/1.2 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif; letter-spacing: -0.01em; margin: 0; min-width: 0; }
.icx-shelf > header p { flex: none; color: var(--icx-ink-2); font: 600 0.8125rem/1 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif; margin: 0; }
body.icx-page .icx-courses { list-style: none; margin: 0 !important; padding: 0 !important; }
.icx-course {
	display: grid;
	grid-template-columns: clamp(136px, 21vw, 208px) minmax(0, 1fr) minmax(88px, 112px) 132px;
	align-items: center;
	gap: clamp(16px, 3vw, 36px);
	padding: 20px 2px;
	border-bottom: 1px solid var(--icx-line);
	margin: 0;
}
.icx-course__cover {
	display: block;
	aspect-ratio: 16 / 10;
	border-radius: 12px;
	overflow: hidden;
	background: linear-gradient(135deg, var(--icx-navy), var(--icx-navy-3));
	box-shadow: 0 10px 24px -14px rgba(27, 44, 93, 0.55);
}
.icx-course__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 82% center;
	display: block;
	transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.icx-course:hover .icx-course__cover img { transform: scale(1.06); }
.icx-course h3 { margin: 0 0 2px; font: 700 1.25rem/1.2 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif; letter-spacing: -0.01em; overflow-wrap: anywhere; }
/* The name is a link 44 pixels tall: the space above and below it is part of the link. */
body.icx-page .icx-course h3 a { display: inline-block; box-sizing: border-box; min-width: 44px; min-height: 44px; padding-block: 12px; margin-top: -12px; color: var(--icx-navy); text-decoration: none; }
body.icx-page .icx-course h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.icx-course h3 a:focus-visible { outline: 3px solid var(--icx-gold); outline-offset: 2px; border-radius: 4px; box-shadow: 0 0 0 2px var(--icx-navy); }
.icx-course .icx-meter { display: flex; align-items: center; gap: 14px; max-width: 440px; }
.icx-course .icx-meter__bar { flex: 1; height: 6px; background: var(--icx-tint); }
.icx-course .icx-meter__bar > span { background: var(--icx-navy); min-width: 0; }
.icx-meter__text { color: var(--icx-ink-2); font: 600 0.8125rem/1 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif; white-space: nowrap; }
.icx-course.is-done .icx-meter__bar > span { background: var(--icx-done); }
.icx-course.is-done .icx-meter__text { color: var(--icx-done); }
.icx-course__days { margin: 0; color: var(--icx-ink-2); font: 500 0.8125rem/1.2 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif; }
.icx-course__days strong { display: block; color: var(--icx-navy); font: 700 1.75rem/1 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif; letter-spacing: -0.02em; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.icx-course.is-ending .icx-course__days,
.icx-course.is-ending .icx-course__days strong { color: #a15c07; }
.icx-course .icx-cta { justify-self: end; min-width: 132px; }
/* A course with no end date has no days cell: its button still stands in the last column, level with the others. */
.icx-course > .icx-course__body + .icx-cta { grid-column: 4; }
.icx-cta--quiet {
	background: #fff;
	border-color: var(--icx-line);
	color: var(--icx-navy) !important;
	padding: 14px 26px;
}
.icx-cta--quiet:hover,
.icx-cta--quiet:focus-visible { background: var(--icx-tint); border-color: var(--icx-navy); }
.icx-cta--quiet:focus-visible,
.icx-shelf .icx-cta--navy:focus-visible,
.icx-code .icx-cta--navy:focus-visible { outline-color: var(--icx-gold); box-shadow: 0 0 0 3px var(--icx-navy); }

/* Add a course by code. The words and the form sit side by side while each has room, and the form goes under the
   words when it does not; the same for the field and its button. No fixed sizes: both rows wrap by themselves. */
.icx-code {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px clamp(24px, 5vw, 64px);
	background: var(--icx-canvas);
	border-radius: clamp(14px, 2vw, 16px);
	padding: clamp(22px, 3.2vw, 36px) clamp(20px, 3.2vw, 40px) !important;
	box-sizing: border-box;
}
.icx-code__text { flex: 1 1 16rem; min-width: 0; }
body.icx-page .icx-code h2 { color: var(--icx-navy); font: 700 1.25rem/1.2 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif; margin: 0 0 6px !important; }
.icx-code__text p { color: var(--icx-ink-2); font: 400 0.9375rem/1.5 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif; margin: 0; }
.icx-code__form { flex: 1.1 1 19rem; min-width: 0; display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.icx-code__form input[type="text"] {
	flex: 999 1 13rem;
	min-width: 0;
	height: 50px;
	padding: 0 20px;
	border: 1px solid #868e96;
	border-radius: 999px;
	background: #fff;
	color: var(--icx-ink);
	font: 600 1rem/1 "Montserrat", ui-monospace, monospace;
	letter-spacing: 0.08em;
	width: auto;
	box-sizing: border-box;
}
.icx-code__form input::placeholder { color: #6e757c; opacity: 1; font-weight: 500; }
.icx-code__form input:focus { outline: 3px solid var(--icx-gold); outline-offset: 2px; border-color: var(--icx-navy); box-shadow: 0 0 0 1px var(--icx-navy); }
.icx-code__form button { flex: 1 0 auto; min-height: 50px; cursor: pointer; }
.icx-code__form noscript { flex: 1 0 auto; }
.icx-code__form noscript .icx-cta { width: 100%; }
.icx-code__form button:disabled,
.icx-code__form button:disabled:hover {
	background: #c5cad6 !important;
	border-color: #c5cad6 !important;
	color: #fff !important;
	cursor: not-allowed;
}
.icx-code__note:empty { display: none; }
.icx-code__note { flex: 0 0 100%; margin: 0; padding-inline-start: 20px; box-sizing: border-box; font-weight: 600 !important; color: var(--icx-ink-2); font: 500 0.8125rem/1.4 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif; overflow-wrap: anywhere; }
/* Addition to the reference: the result message after a code is sent. A word-like mark comes with the colour, so the two states differ without colour. */
.icx-code__note--ok { color: var(--icx-done); }
.icx-code__note--error { color: #a1260f; }
.icx-code__note--ok::before { content: "\2713\00a0"; }
.icx-code__note--error::before { content: "!\00a0"; font-weight: 700; }
.icx-empty { color: var(--icx-ink-2); font: 500 1rem/1.5 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif; padding: 24px 2px; margin-block: 0; }
/* Signed out: one sentence and the way in, as a button. */
.icx-home > .icx-empty { padding-block: clamp(32px, 8vw, 72px); display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.icx-home > .icx-empty a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 46px;
	padding: 14px 26px;
	border-radius: 999px;
	background: var(--icx-navy);
	border: 1px solid var(--icx-navy);
	color: #fff;
	font: 600 0.9375rem/1 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
	text-decoration: none;
}
.icx-home > .icx-empty a:hover,
.icx-home > .icx-empty a:focus-visible { background: var(--icx-navy-3); border-color: var(--icx-navy-3); }
.icx-home > .icx-empty a:focus-visible { outline: 3px solid var(--icx-gold); outline-offset: 3px; box-shadow: 0 0 0 3px var(--icx-navy); }

/* One moment of motion: the bars fill when the page arrives. */
.icx-home .icx-meter__bar > span { transform-origin: left center; animation: icx-fill 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both; }
@keyframes icx-fill { from { transform: scaleX(0); } }

/* ---------- Narrower windows ----------
   The course page's two columns become one, and a course row becomes a small block: cover and name, then days left
   beside the button. Everything else on these pages wraps or scales by itself. */
@media (max-width: 782px) {
	.icx-hero__grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
	.icx-hero .icx-cta { display: flex; width: min(100%, 22rem); }
	.icx-facts { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 16px; }
	.icx-facts strong { font-size: 1.375rem; }
	.icx-module li > a,
	.icx-module li > .icx-locked { grid-template-columns: 22px minmax(0, 1fr); padding: 15px 4px; }
	.icx-lesson__state { grid-column: 2; justify-self: start; }
	.icx-lesson__state:empty { display: none; }
	.icx-resume {
		background-image:
			linear-gradient(90deg, var(--icx-navy) 0%, rgba(27, 44, 93, 0.9) 45%, rgba(27, 44, 93, 0.35) 100%),
			var(--icx-art, none);
		background-position: 80% center;
	}
	.icx-course {
		grid-template-columns: clamp(96px, 28vw, 168px) minmax(0, 1fr);
		grid-template-areas: "cover body" "days action";
		gap: 14px 16px;
		padding: 18px 0;
	}
	.icx-course__cover { grid-area: cover; border-radius: 10px; }
	.icx-course__body { grid-area: body; }
	.icx-course h3 { font-size: 1.0625rem; margin-bottom: -2px; }
	.icx-course .icx-meter { flex-direction: column; align-items: stretch; gap: 8px; }
	.icx-course .icx-meter__bar { flex: none; width: 100%; }
	.icx-course__days { grid-area: days; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
	.icx-course__days strong { display: inline; font-size: 1.25rem; margin: 0; }
	/* The button fills the row on a phone and stops at a button's width on anything wider. */
	.icx-course .icx-cta { grid-area: action; justify-self: end; width: min(100%, 17rem); min-width: 0; }
	/* A course with no end date has no days cell: the button takes the whole row. */
	.icx-course > .icx-course__body + .icx-cta { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
	.icx-cta,
	.icx-course__cover img { transition: none; }
	.icx-course:hover .icx-course__cover img { transform: none; }
	.icx-home .icx-meter__bar > span { animation: none; }
}

/* ---------- Right to left ----------
   The welcome band keeps its words on the start side and its picture on the end side; the bars fill from the start side. */
body.icx-page.rtl .icx-resume {
	background-image:
		linear-gradient(270deg, var(--icx-navy) 0%, rgba(27, 44, 93, 0.94) 38%, rgba(27, 44, 93, 0.25) 72%, rgba(27, 44, 93, 0) 100%),
		var(--icx-art, none);
	background-position: left center;
}
body.icx-page.rtl .icx-course__cover img { object-position: 18% center; }
body.icx-page.rtl .icx-home .icx-meter__bar > span { transform-origin: right center; }
@media (max-width: 782px) {
	body.icx-page.rtl .icx-resume {
		background-image:
			linear-gradient(270deg, var(--icx-navy) 0%, rgba(27, 44, 93, 0.9) 45%, rgba(27, 44, 93, 0.35) 100%),
			var(--icx-art, none);
		background-position: 20% center;
	}
}
