/* iClass Learning: skin for Sensei Learning Mode. Brand tokens are taken from the owner's Slide Player.
 *
 * How the lesson page changes with the space it has. The rules, in one place:
 *
 *   The lesson's controls (previous lesson, next lesson, Full screen, and Sensei's own lesson buttons) are in the
 *   top bar, between the course title and Exit Course. The script puts them there (assets/skin.js).
 *
 *   When the bar runs short of room, things give way in this order, and nothing wraps onto a second row:
 *     1. the course title shortens with an ellipsis (always; it takes whatever the buttons leave);
 *     2. under 1024px wide, the words on the outline button, Full screen and Exit Course drop to their icons
 *        (measured: at 1024 the widest state, "Completed" with "Next Lesson", still leaves the title about 9rem);
 *     3. Sensei's lesson buttons keep their words. Where there are two, the lesser one gives way first: under
 *        720px a finished lesson's "Completed" mark keeps only its tick beside "Next Lesson", and "Complete
 *        Lesson" keeps only its tick beside "Take Quiz" (a lesson with a quiz that need not be passed);
 *     4. under 600px wide (under 560px when the window is wider than it is tall: a small phone on its side has
 *        no height to spare for a strip), or wherever the bar still cannot hold them on one row or would cut
 *        the course title to less than 48px (longer words than these were measured with), the controls
 *        leave the bar and become a strip at the bottom of the window: html.icx-strip, set by the script
 *        (measured: at 600 the widest state fits the bar with its icons and leaves the course title about 90px;
 *        at 568 by 320 about 65px).
 *        The strip is one row too, with the same order: under 520px Full screen and the lesser of two Sensei
 *        buttons show their icons only; the main one keeps its words (on two lines if it must, never broken
 *        inside a word).
 *
 *   Nothing that can be pressed touches a line or an edge of the screen: 8px or more over and under the buttons
 *   in the top bar and the strip, 12px or more at the sides, 8px or more between neighbours.
 *
 *   The outline, two questions:
 *     Where it goes when it is open: beside the lesson wherever the window holds both, over the page (Sensei's
 *     drawer) below that. One boundary, a width, so a few pixels of height never move it: (min-width: 1036px).
 *     The script asks the same question and sets html.icx-beside. (Measured: from 1036 the lesson beside the open
 *     outline is at least 720 by 405, the size it has as the whole page on an upright 768px tablet; one pixel
 *     narrower it would be 704 by 396.)
 *     Whether it is open: beside the lesson, as the learner last left it (remembered on the device, and
 *     html.icx-wide while it is hidden). A learner with nothing remembered gets a first state once: open when the
 *     lesson keeps at least 86% of its width beside it (always so when the height sets the lesson's size),
 *     hidden when the lesson would be clearly smaller. As a drawer it always starts closed.
 *
 *   The lesson frame is sized from the width and the height that remain, as a whole-pixel box (the script).
 *   Everything else is fluid: sizes are clamped and rows shrink. */
body.sensei-course-theme,
body.single-course,
body.icx-page {
	--icx-navy: #1b2c5d;
	--icx-navy-2: #24427a;
	--icx-navy-3: #33579f;
	--icx-ico-exit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9'/%3E%3C/svg%3E");
	--icx-ico-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
	--icx-tint: #e9edf6;
	--icx-canvas: #f4f5f6;
	--icx-line: #d6dcde;
	--icx-ink: #252526;
	--icx-ink-2: #4d4d4f;
	--icx-stage: #303437;
	--icx-gold: #d8a23a;
	--icx-done: #1c7c54;
	--sensei-primary-color: var(--icx-navy);
	--sensei-lm-header-height: 64px;
	--sensei-lm-sidebar-width: clamp(264px, 22vw, 320px);
	font-family: "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
	color: var(--icx-ink);
	background: #fff;
}

/* Sensei animates every property of every element (for its focus mode, which this page does not use): a resized
   frame would slide to its new size and a drawer that has just opened would not take focus. Only the transitions
   named in this file run. */
body.sensei-course-theme--focus-mode--animated * { transition: none; }

/* ---------- The first moment of a lesson (review of B18b, I2) ----------
   The script puts the controls in the bar, the outline in its place and the lesson at its size. Until it has marked
   the page (html.icx-js) the bar's contents and the lesson column are held out of sight, so a learner never sees
   one arrangement jump to the other. The script ends the hold as its first step. If it never runs, the hold ends by
   itself four seconds after the page is first drawn: that learner then gets the page as Sensei lays it out, with
   every control (and a script that arrives later than that rearranges the page once, in view). It is not motion, so it is kept
   for a learner who asked for less motion (the rule at the end of this file would otherwise switch it off). */
@keyframes icx-hold {
	from { visibility: hidden; }
	to { visibility: visible; }
}
html:not(.icx-js) body.sensei-course-theme .sensei-course-theme__header .sensei-course-theme-header-content,
html:not(.icx-js) body.sensei-course-theme .sensei-course-theme__columns .sensei-course-theme__main-content {
	animation: icx-hold 0s linear 4s both !important;
}

/* A site logo, where the site has one, is not part of the lesson's bar (outline, course, controls, exit). */
body.sensei-course-theme .sensei-course-theme__header .wp-block-site-logo { display: none; }

/* ---------- Under the WordPress admin bar (people who have one) ----------
   The top bar starts where the admin bar ends. The script measures it (--icx-adminbar), Sensei does too
   (--sensei-wpadminbar-offset), and the numbers below are WordPress's own heights for the moment before either has run.
   On a narrow window the admin bar's items wrap onto a second line; here the bar grows to hold them instead of
   letting them hang over the page, and the lesson column moves down by the same amount (--icx-adminbar-extra).
   Only where the script runs (html.icx-js), because only the script can measure that amount. */
body.sensei-course-theme.admin-bar { --top-offset: var(--icx-adminbar, var(--sensei-wpadminbar-offset, 32px)); }
html.icx-js body.sensei-course-theme.admin-bar #wpadminbar {
	display: flow-root;
	height: auto;
	min-height: 32px;
}
@media screen and (max-width: 782px) {
	body.sensei-course-theme.admin-bar { --top-offset: var(--icx-adminbar, var(--sensei-wpadminbar-offset, 46px)); }
	html.icx-js body.sensei-course-theme.admin-bar #wpadminbar { min-height: 46px; }
}
body.sensei-course-theme .sensei-course-theme__header + *:not(style) {
	margin-top: calc(var(--sensei-lm-header-height) + var(--icx-adminbar-extra, 0px)) !important;
}

/* ---------- Top bar: one navy bar, progress as its bottom edge ----------
   64px at every size: 44px buttons with 8px above them and 8px between them and the gold line. */
body.sensei-course-theme .sensei-course-theme__header {
	background: var(--icx-navy);
	color: #fff;
	border: 0;
	box-shadow: none;
}
body.sensei-course-theme.sensei-course-theme--sidebar-open .sensei-course-theme__header {
	/* Sensei's drawer on a phone makes the bar taller; it stays as it is here. */
	height: var(--sensei-lm-header-height);
	z-index: 100;
}
body.sensei-course-theme .sensei-course-theme__header .sensei-course-theme-header-content {
	box-sizing: border-box;
	padding-inline: clamp(12px, 2.4vw, 24px) !important;
	min-height: 0;
	gap: 12px;
	flex-wrap: nowrap;
	align-items: center;
	transition: none;
}
/* Start: the outline button and the course title, which gives way first (an ellipsis). */
body.sensei-course-theme .sensei-course-theme-header-content > .wp-block-group:first-child {
	flex: 1 1 auto;
	min-width: 0;
	gap: 12px;
	flex-wrap: nowrap;
	align-items: center;
}
body.sensei-course-theme .wp-block-sensei-lms-course-title,
body.sensei-course-theme .wp-block-sensei-lms-course-title a {
	color: #fff;
	font: 600 1rem/1.3 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
	letter-spacing: 0;
	margin: 0;
	text-decoration: none;
}
body.sensei-course-theme .sensei-course-theme__header .wp-block-sensei-lms-course-title {
	flex: 0 1 auto;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	opacity: 1;
	transition: none;
}
/* End: the lesson's controls, then Exit Course. None of them shrinks. */
body.sensei-course-theme .sensei-course-theme-header-content > .wp-block-group:last-child,
body.sensei-course-theme .sensei-course-theme__header .sensei-course-theme__header__info {
	flex: none;
	gap: 12px;
	flex-wrap: nowrap;
	align-items: center;
}
/* The progress text is not shown at any size: the outline and the gold line already say it. */
body.sensei-course-theme .sensei-course-theme-course-progress { display: none !important; }
body.sensei-course-theme .sensei-course-theme__header .wp-block-sensei-lms-exit-course {
	order: 0;
	flex: none;
	display: block;
	opacity: 1;
	pointer-events: auto;
	font-size: 0.8125rem;
}
/* A hairline sets Exit Course, which leaves the course, apart from the lesson's controls. */
body.sensei-course-theme .sensei-course-theme__header .icx-actions + .wp-block-sensei-lms-exit-course {
	padding-inline-start: 12px;
	border-inline-start: 1px solid rgba(255, 255, 255, 0.22);
}
body.sensei-course-theme .wp-block-sensei-lms-exit-course a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
	min-width: 44px;
	height: 44px;
	color: #fff;
	font: 600 0.8125rem/1 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
	white-space: nowrap;
	text-decoration: none !important;
	padding: 0 16px;
	border: 1px solid rgba(255, 255, 255, 0.38);
	border-radius: 999px;
	transition: background-color 0.15s ease, color 0.15s ease;
}
body.sensei-course-theme .wp-block-sensei-lms-exit-course a::before,
body.sensei-course-theme .wp-block-sensei-lms-button-complete-lesson .wp-block-button__link::before {
	content: "";
	flex: none;
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: var(--icx-ico-exit) center / contain no-repeat;
	mask: var(--icx-ico-exit) center / contain no-repeat;
}
body.sensei-course-theme .wp-block-sensei-lms-button-complete-lesson .wp-block-button__link::before {
	-webkit-mask-image: var(--icx-ico-check);
	mask-image: var(--icx-ico-check);
}
body.sensei-course-theme .wp-block-sensei-lms-exit-course a:hover,
body.sensei-course-theme .wp-block-sensei-lms-exit-course a:focus-visible {
	background: #fff;
	color: var(--icx-navy);
	text-decoration: none !important;
}
/* Sensei's own menu button: used only where the script has not put the outline button in the bar (html.icx-outline). */
body.sensei-course-theme.single-lesson .sensei-course-theme__sidebar-toggle {
	display: block;
	flex: none;
	width: 44px;
	height: 44px;
	padding: 10px;
	box-sizing: border-box;
	color: #fff;
}
html.icx-outline body.sensei-course-theme .sensei-course-theme__sidebar-toggle { display: none !important; }
body.sensei-course-theme .sensei-course-theme-course-progress-bar {
	background: var(--icx-navy-2);
	height: 4px;
	width: auto;
	margin: 0;
	border-radius: 0;
}
body.sensei-course-theme .sensei-course-theme-course-progress-bar-inner {
	background: var(--icx-gold);
	height: 4px;
	border-radius: 0;
}
/* Sensei's phone drawer makes the line 12px tall, rounded and inset while it is open. It stays the bar's 4px edge. */
body.sensei-course-theme.sensei-course-theme--sidebar-open .sensei-course-theme__header .sensei-course-theme-course-progress-bar {
	width: auto;
	height: 4px;
	margin: 0;
	border-radius: 0;
}
body.sensei-course-theme.sensei-course-theme--sidebar-open .sensei-course-theme__header .sensei-course-theme-course-progress-bar > :first-child {
	height: 4px;
	border-radius: 0;
}

/* The bar's own buttons (the outline button, previous, next, Full screen): outlined in white on the navy. */
.icx-outline-toggle svg { width: 18px; height: 18px; flex: none; }
.icx-outline-toggle { flex: none; justify-content: center; min-width: 44px; padding: 0 14px; font-size: 0.8125rem; }
body.sensei-course-theme .sensei-course-theme__header .icx-btn {
	height: 44px;
	color: #fff !important;
	background: transparent !important;
	border-color: rgba(255, 255, 255, 0.38) !important;
	font-size: 0.8125rem;
}
body.sensei-course-theme .sensei-course-theme__header .icx-btn:hover,
body.sensei-course-theme .sensei-course-theme__header .icx-btn:focus { background: rgba(255, 255, 255, 0.14) !important; color: #fff !important; border-color: #fff !important; }

/* The lesson's controls in the bar: one row, previous and next first, then Full screen, then Sensei's lesson buttons. */
body.sensei-course-theme .sensei-course-theme__header .icx-actions {
	flex: none;
	flex-wrap: nowrap;
	gap: 10px;
	margin: 0;
}
body.sensei-course-theme .sensei-course-theme__header .icx-actions .sensei-lesson-footer .sensei-buttons-container { flex-wrap: nowrap; }
/* Sensei's lesson button is the bar's one filled button: gold, as "Continue" is on the course page. */
body.sensei-course-theme .sensei-course-theme__header .icx-actions .sensei-course-theme__button,
body.sensei-course-theme .sensei-course-theme__header .icx-actions .wp-block-button__link {
	min-height: 44px;
	padding: 0 18px !important;
	background: var(--icx-gold) !important;
	border-color: var(--icx-gold) !important;
	color: var(--icx-navy) !important;
}
body.sensei-course-theme .sensei-course-theme__header .icx-actions .sensei-course-theme__button:hover,
body.sensei-course-theme .sensei-course-theme__header .icx-actions .sensei-course-theme__button:focus-visible,
body.sensei-course-theme .sensei-course-theme__header .icx-actions .wp-block-button__link:hover,
body.sensei-course-theme .sensei-course-theme__header .icx-actions .wp-block-button__link:focus-visible {
	background: #fff !important;
	border-color: #fff !important;
	color: var(--icx-navy) !important;
}
body.sensei-course-theme .sensei-course-theme__header .icx-actions .sensei-course-theme__button:focus-visible,
body.sensei-course-theme .sensei-course-theme__header .icx-actions .wp-block-button__link:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
	box-shadow: 0 0 0 2px var(--icx-navy) !important;
}
/* Sensei also paints its square block wrapper on hover. Only the rounded button should carry the fill. */
body.sensei-course-theme .wp-block-button.wp-block-sensei-lms-button-complete-lesson:is(:hover, :focus-within) {
	background: transparent !important;
}
body.sensei-course-theme .sensei-course-theme__header .icx-actions .wp-block-sensei-lms-button-complete-lesson .wp-block-button__link:is(:hover, :focus-visible) {
	background: #f2c66c !important;
	border-color: #f2c66c !important;
	color: var(--icx-navy) !important;
}
/* A finished lesson: a state in white with a green tick, not a button. */
body.sensei-course-theme .sensei-course-theme__header .icx-actions .wp-block-sensei-lms-button-lesson-completed .wp-block-button__link {
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10' fill='%231c7c54'/%3E%3Cpath d='M5.6 10.4l2.9 2.9 5.9-6.4' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 4px center/20px no-repeat !important;
	color: #fff !important;
	border-color: transparent !important;
	padding-inline: 32px 4px !important;
}
[dir="rtl"] body.sensei-course-theme .sensei-course-theme__header .icx-actions .wp-block-sensei-lms-button-lesson-completed .wp-block-button__link { background-position: right 4px center !important; }

/* Under 600px (a small phone on its side) the bar's gaps close up a little, so the course title keeps some room. */
@media (max-width: 599.98px) {
	body.sensei-course-theme .sensei-course-theme__header .sensei-course-theme-header-content,
	body.sensei-course-theme .sensei-course-theme-header-content > .wp-block-group:first-child,
	body.sensei-course-theme .sensei-course-theme-header-content > .wp-block-group:last-child,
	body.sensei-course-theme .sensei-course-theme__header .sensei-course-theme__header__info,
	body.sensei-course-theme .sensei-course-theme__header .icx-actions { gap: 8px; }
	body.sensei-course-theme .sensei-course-theme__header .icx-actions + .wp-block-sensei-lms-exit-course { padding-inline-start: 8px; }
}

/* Under 720px a finished lesson's "Completed" mark keeps its tick and drops its word (measured: with the word, the
   course title is left 23px at 600; without it, about 110px). The word stays for screen readers. */
@media (max-width: 719.98px) {
	/* A lesson with a quiz that need not be passed has two buttons, "Complete Lesson" and "Take Quiz". Under this
	   width the first keeps its tick and drops its words, as the "Completed" mark does; "Take Quiz" keeps its words. */
	body.sensei-course-theme .sensei-course-theme__header .icx-actions .sensei-buttons-container:has(.wp-block-sensei-lms-button-view-quiz) .wp-block-sensei-lms-button-complete-lesson .wp-block-button__link {
		justify-content: flex-start;
		gap: 32px;
		width: 44px;
		min-width: 44px;
		padding: 0 !important;
		padding-inline-start: 14px !important;
		overflow: hidden;
		font-size: 0 !important;
	}
	body.sensei-course-theme .sensei-course-theme__header .icx-actions .wp-block-sensei-lms-button-lesson-completed .wp-block-button__link {
		justify-content: flex-start;
		width: 44px;
		min-width: 44px;
		padding: 0 !important;
		padding-inline-start: 44px !important;
		overflow: hidden;
		font-size: 0 !important;
		background-position: center !important;
	}
}

/* Rule 2: under 1024px the outline button, Full screen and Exit Course keep their size and drop their words
   (the words stay for screen readers, and show as tooltips). */
@media (max-width: 1023.98px) {
	.icx-outline-toggle,
	body.sensei-course-theme .sensei-course-theme__header .icx-open-btn { justify-content: center; width: 44px; padding: 0; }
	.icx-outline-toggle span,
	body.sensei-course-theme .sensei-course-theme__header .icx-open-btn span {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
	body.sensei-course-theme .sensei-course-theme__header .icx-open-btn svg { width: 18px; height: 18px; }
	/* Exit Course has no element around its words to clip, so the words are pushed out of the button and cut off:
	   the icon starts 12px in, the words start a full button's width later, and nothing shows past the edge. That
	   holds when a browser's "minimum font size" setting overrules the zero font size. */
	body.sensei-course-theme .wp-block-sensei-lms-exit-course a {
		justify-content: flex-start;
		width: 44px;
		padding: 0;
		padding-inline-start: 12px;
		gap: 32px;
		overflow: hidden;
		font-size: 0;
	}
	body.sensei-course-theme .wp-block-sensei-lms-exit-course a::before { width: 18px; height: 18px; }
}

/* ---------- Outline ---------- */
body.sensei-course-theme .sensei-course-theme__sidebar {
	background: var(--icx-canvas);
	border-inline-end: 1px solid var(--icx-line);
	padding: 20px 14px 32px;
}
body.sensei-course-theme .sensei-lms-course-navigation-module { border: 0; margin: 0 0 6px; }
body.sensei-course-theme .sensei-lms-course-navigation-module__button { padding: 10px; border-radius: 8px; min-width: 44px; min-height: 44px; }
body.sensei-course-theme .sensei-lms-course-navigation-module__title {
	color: var(--icx-navy);
	font: 700 0.8125rem/1.3 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
}
body.sensei-course-theme .sensei-lms-course-navigation-module__summary {
	color: var(--icx-ink-2);
	font: 500 0.75rem/1.3 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
	padding-inline: 10px;
}
body.sensei-course-theme .sensei-lms-course-navigation-lesson { margin: 2px 0; border-radius: 8px; }
body.sensei-course-theme .sensei-lms-course-navigation-lesson__link {
	color: var(--icx-ink);
	font: 500 0.875rem/1.35 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
	padding: 12px 10px;
	min-height: 44px;
	box-sizing: border-box;
	border-radius: 8px;
	text-decoration: none;
	overflow-wrap: anywhere;
}
body.sensei-course-theme .sensei-lms-course-navigation-lesson__link:hover { background: #fff; }
body.sensei-course-theme .sensei-lms-course-navigation-lesson.current-lesson {
	background: #fff;
	box-shadow: inset 3px 0 0 var(--icx-navy), 0 0 0 1px var(--icx-line);
}
body.sensei-course-theme[dir="rtl"] .sensei-lms-course-navigation-lesson.current-lesson,
[dir="rtl"] body.sensei-course-theme .sensei-lms-course-navigation-lesson.current-lesson {
	box-shadow: inset -3px 0 0 var(--icx-navy), 0 0 0 1px var(--icx-line);
}
body.sensei-course-theme .sensei-lms-course-navigation-lesson.current-lesson .sensei-lms-course-navigation-lesson__link {
	color: var(--icx-navy);
	font-weight: 700;
}
body.sensei-course-theme .sensei-lms-course-navigation-lesson__status { color: var(--icx-navy); }
body.sensei-course-theme .sensei-lms-course-navigation-lesson.status-completed .sensei-lms-course-navigation-lesson__status { color: var(--icx-done); }


/* Beside the lesson (html.icx-beside): the panel starts under the bar and the lesson column begins where it ends.
   The outline button hides the panel (html.icx-wide) and shows it again; the learner's choice is remembered. */
html.icx-beside body.sensei-course-theme .sensei-course-theme__columns .sensei-course-theme__sidebar ~ .sensei-course-theme__main-content {
	margin-inline: var(--sensei-lm-sidebar-width) 0 !important;
}
html.icx-beside.icx-wide body.sensei-course-theme { --sensei-lm-sidebar-width: 0px; }
html.icx-beside.icx-wide body.sensei-course-theme .sensei-course-theme__sidebar { display: none !important; }

/* Below that width the outline is Sensei's drawer (its own element and its own "open" class). It opens over the
   lesson from the start side; the dimmed lesson shows beside it. Closed, it is not in the page for the eye, the
   pointer or the keyboard. */
html:not(.icx-beside) body.sensei-course-theme .sensei-course-theme__header ~ .sensei-course-theme__columns .sensei-course-theme__sidebar {
	position: fixed;
	z-index: 99;
	top: calc(var(--top-offset, 0px) + var(--sensei-lm-header-height)) !important;
	bottom: 0;
	left: 0 !important;
	right: 0 !important;
	width: auto;
	display: block;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	overflow: hidden;
	scrollbar-gutter: auto;
	background: rgba(18, 28, 60, 0.5);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.18s ease, visibility 0s linear 0.18s;
}
html:not(.icx-beside) body.sensei-course-theme.sensei-course-theme--sidebar-open .sensei-course-theme__header ~ .sensei-course-theme__columns .sensei-course-theme__sidebar {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition-delay: 0s;
}
html:not(.icx-beside) body.sensei-course-theme .sensei-course-theme__sidebar > * {
	box-sizing: border-box;
	width: min(22.5rem, calc(100% - 3.5rem));
	height: 100%;
	margin: 0;
	padding: 16px 14px calc(32px + env(safe-area-inset-bottom, 0px));
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--icx-canvas);
	border-inline-end: 1px solid var(--icx-line);
}
html:not(.icx-beside) body.sensei-course-theme .sensei-course-theme__columns .sensei-course-theme__sidebar ~ .sensei-course-theme__main-content {
	margin-inline: 0 !important;
}
html:not(.icx-beside) body.sensei-course-theme.sensei-course-theme--sidebar-open { overflow: hidden; }

/* The chapter index uses Sensei's own links, controls, state classes and SVGs.
   The native nav scrolls, keeping the course progress header above it and the open chapter in view. */
body.sensei-course-theme .sensei-course-theme__sidebar:has(> .icx-outline-panel) {
	box-sizing: border-box;
	padding: 0;
	border-radius: 0;
	overflow: hidden;
	scrollbar-gutter: auto;
	background: #fff;
}
html.icx-beside body.sensei-course-theme .sensei-course-theme__sidebar:has(> .icx-outline-panel) {
	width: clamp(264px, 22vw, 320px);
}
body.sensei-course-theme .sensei-course-theme__sidebar .icx-outline-panel {
	--icx-index-ink: #2c3a5e;
	--icx-index-muted: #5c6885;
	--icx-index-rule: #e4e8f0;
	--icx-index-green: #23744f;
	--icx-index-hover: #f4f5fa;
	--icx-index-row-pad: 8px;
	position: relative;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	height: 100%;
	min-height: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: #fff;
	color: var(--icx-index-ink);
	font: 500 .8125rem/1.385 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
}
html:not(.icx-beside) body.sensei-course-theme .sensei-course-theme__sidebar > .icx-outline-panel {
	/* The sidebar itself is the backdrop; the panel inherits the drawer width rule above. */
	padding: 0;
	background: #fff;
	overflow: hidden;
}
body.sensei-course-theme .icx-outline-panel::after {
	content: "";
	position: absolute;
	z-index: 2;
	inset: auto 0 0;
	height: 22px;
	background: linear-gradient(transparent, #fff);
	pointer-events: none;
}
body.sensei-course-theme .icx-outline-heading {
	flex: none;
	padding: 20px 22px 16px;
	border-bottom: 1px solid var(--icx-index-rule);
	background: #fff;
}
body.sensei-course-theme .icx-outline-heading h2 {
	margin: 0;
	color: var(--icx-navy);
	font: 600 1.1875rem/1.265 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
	letter-spacing: -.02em;
}
body.sensei-course-theme .icx-outline-summary {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin: 12px 0 0;
	color: var(--icx-index-muted);
	font: 500 .75rem/1.33 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
	font-variant-numeric: tabular-nums;
}
body.sensei-course-theme .icx-outline-count strong,
body.sensei-course-theme .icx-outline-percent { color: var(--icx-navy); }
body.sensei-course-theme .icx-outline-percent { font-weight: 600; }
body.sensei-course-theme .icx-outline-meter {
	display: block;
	appearance: none;
	width: 100%;
	height: 2px;
	margin: 8px 0 0;
	padding: 0;
	border: none;
	border-radius: 0;
	background: #e1e5ee;
	color: var(--icx-navy);
}
body.sensei-course-theme .icx-outline-meter::-webkit-progress-bar { background: #e1e5ee; }
body.sensei-course-theme .icx-outline-meter::-webkit-progress-value { background: var(--icx-navy); }
body.sensei-course-theme .icx-outline-meter::-moz-progress-bar { background: var(--icx-navy); }
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation {
	flex: 1 1 0;
	min-width: 0;
	min-height: 0;
	max-width: none;
	margin: 0;
	padding: 0 14px calc(24px + env(safe-area-inset-bottom, 0px));
	overflow: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: #c9d0de transparent;
	scroll-padding-block: 64px 20px;
}
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation__modules {
	display: block;
	margin: 0;
	padding: 0;
}
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-module {
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
}
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-module + .sensei-lms-course-navigation-module,
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation__modules + .sensei-lms-course-navigation__lessons {
	margin-top: 0;
	border-top: 1px solid var(--icx-index-rule);
}
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-module__header {
	position: sticky;
	z-index: 2;
	top: 0;
	padding: 0;
	background: #fff;
}
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-module__button {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 14px;
	align-items: center;
	gap: 14px;
	width: 100%;
	min-height: 48px;
	box-sizing: border-box;
	margin: 0;
	padding: 11px 8px;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
}
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-module__button:hover {
	background: var(--icx-index-hover) !important; /* Sensei declares the button background important. */
}
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-module__button[aria-expanded="true"] {
	box-shadow: inset 0 -1px var(--icx-index-rule);
}
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-module__title,
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-lesson__title {
	min-width: 0;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	overflow-wrap: anywhere;
	text-overflow: ellipsis;
	text-align: start;
}
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-module__title {
	margin: 0;
	padding: 0;
	color: var(--icx-index-ink);
	font: 600 .8125rem/1.385 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
	text-transform: none;
	letter-spacing: normal;
}
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-module__button:hover h3 {
	text-decoration: none;
}
body.sensei-course-theme .icx-outline-panel [aria-expanded="true"] .sensei-lms-course-navigation-module__title {
	color: var(--icx-navy);
	font-weight: 700;
}
body.sensei-course-theme .icx-outline-panel .sensei-collapsible__toggle .sensei-lms-course-navigation-module__collapsible-icon {
	width: 16px;
	height: 16px;
	justify-self: center;
	color: var(--icx-index-muted);
}
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-module__summary { display: none; }
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-module__lessons:not(.sensei-collapsed),
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation__lessons {
	/* Sensei measures the list on page load, including when the drawer is closed. */
	max-height: none !important;
	margin: 0;
	padding: 6px 0 12px;
}
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-module__lessons.sensei-collapsed {
	display: none;
}
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-lesson {
	--icx-row-bg: #fff;
	--icx-rail: #dde2ec;
	position: relative;
	align-items: flex-start;
	gap: 4px;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: var(--icx-row-bg);
	list-style: none;
}
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-lesson:hover {
	--icx-row-bg: var(--icx-index-hover);
}
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-lesson:is(.status-completed, .status-complete) {
	--icx-rail: #9fc7b3;
}
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-lesson::before {
	content: "";
	position: absolute;
	inset-block: 0;
	inset-inline-start: 15px;
	width: 1px;
	background: var(--icx-rail);
	pointer-events: none;
}
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-lesson:first-child::before {
	inset-block-start: calc(var(--icx-index-row-pad) + 9px);
}
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-lesson:last-child::before {
	inset-block-end: calc(100% - var(--icx-index-row-pad) - 9px);
}
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-lesson:only-child::before { display: none; }
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-lesson__link {
	position: relative;
	display: grid;
	grid-template-columns: 15px minmax(0, 1fr);
	gap: 10px;
	align-items: start;
	min-width: 0;
	min-height: 0;
	padding: var(--icx-index-row-pad) 8px;
	box-sizing: border-box;
	border-radius: 0;
	background: transparent;
	color: var(--icx-index-ink);
	font: 500 .8125rem/1.385 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
	text-decoration: none;
}
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-lesson__title {
	padding: 0;
	font: inherit;
}
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-lesson__extra {
	flex: none;
	align-self: center;
	margin: 0;
	padding: 6px 4px;
	color: var(--icx-navy);
	font-size: .75rem;
}
body.sensei-course-theme .icx-outline-panel :is(.status-completed, .status-complete, .status-locked) .sensei-lms-course-navigation-lesson__link {
	color: var(--icx-index-muted);
}
/* The muted text and native lock already distinguish locked lessons. Keep their labels readable. */
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-lesson.status-locked {
	opacity: 1;
}
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-lesson__status {
	grid-area: 1 / 1;
	justify-self: center;
	display: block;
	width: 15px;
	height: 15px;
	margin: 1.5px 0 0;
	border-radius: 50%;
	color: var(--icx-navy);
	background: var(--icx-row-bg);
	box-shadow: 0 0 0 3px var(--icx-row-bg);
}
body.sensei-course-theme .icx-outline-panel .status-not-started .sensei-lms-course-navigation-lesson__status {
	width: 11px;
	height: 11px;
	margin-top: 3.5px;
	color: #8791aa;
	opacity: 1;
}
body.sensei-course-theme .icx-outline-panel :is(.status-completed, .status-complete) .sensei-lms-course-navigation-lesson__status {
	color: var(--icx-index-green);
	background: #fff; /* The check in Sensei's circle is cut out of the SVG. */
}
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-lesson.current-lesson {
	--icx-row-bg: #eee9fb;
	box-shadow: inset 2px 0 var(--icx-navy);
}
body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-lesson.current-lesson:dir(rtl) {
	box-shadow: inset -2px 0 var(--icx-navy);
}
body.sensei-course-theme .icx-outline-panel .current-lesson .sensei-lms-course-navigation-lesson__link {
	color: var(--icx-navy);
	font-weight: 700;
}
body.sensei-course-theme .icx-outline-panel .current-lesson .sensei-lms-course-navigation-lesson__status {
	display: none;
}
body.sensei-course-theme .icx-outline-panel .current-lesson .sensei-lms-course-navigation-lesson__link::before {
	content: "";
	grid-area: 1 / 1;
	justify-self: center;
	width: 11px;
	height: 13px;
	margin-block-start: 2.5px;
	background: var(--icx-navy);
	clip-path: polygon(0 0, 100% 50%, 0 100%);
}
body.sensei-course-theme .icx-outline-panel :is(button, a):focus-visible {
	outline: 2px solid #5b3fd1;
	outline-offset: -2px;
}
@media (pointer: coarse) {
	body.sensei-course-theme .sensei-course-theme__sidebar .icx-outline-panel { --icx-index-row-pad: 13px; }
	body.sensei-course-theme .icx-outline-panel .sensei-lms-course-navigation-lesson__extra { min-height: 44px; }
}
body.sensei-course-theme .icx-outline-tooltip {
	position: fixed;
	z-index: 110;
	width: max-content;
	max-width: min(270px, calc(100vw - 12px));
	box-sizing: border-box;
	padding: 7px 11px;
	border-radius: 2px;
	background: #14214a;
	box-shadow: 0 6px 18px -4px #1b2c5d59;
	color: #fff;
	font: 500 .75rem/1.45 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
	overflow-wrap: anywhere;
	pointer-events: auto;
}
body.sensei-course-theme .icx-outline-tooltip[hidden] { display: none; }

/* ---------- Lesson column ----------
   --icx-col is the frame's width. The script sets it from the real window so the frame ends above the fold; the
   calc is the fallback until it has run (and where it does not run, with Sensei's own buttons under the lesson).
   --icx-row is the width of lesson text, headings and messages: a reading column that does NOT follow the frame's
   width. What stands above the frame must keep its height whatever size the frame is given, or the frame's size
   and its own top would chase each other (review finding C1). Text starts level with the frame's start edge when
   the frame is the wider of the two. */
body.sensei-course-theme .sensei-course-theme__main-content {
	--icx-col: min(100%, max(16rem, calc((100vh - 200px) * 16 / 9)));
	--icx-row: min(100%, 56rem);
	--icx-row-start: max(0px, calc((100% - max(var(--icx-col), var(--icx-row))) / 2));
	padding: 16px clamp(16px, 2.5vw, 36px) 16px;
	margin-top: 0;
}
/* Sensei sets a top margin and a bottom padding on the column for small screens with a rule of the same weight; the
   doubled class makes these two hold whichever stylesheet comes last. */
body.sensei-course-theme .sensei-course-theme__main-content.sensei-course-theme__main-content { margin-top: 0; padding-bottom: 16px; }
/* Sensei's page links on a lesson split into pages: at the end of the lesson's content, each a full-size target. */
body.sensei-course-theme .sensei-course-theme__main-content > .sensei-course-theme__post-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	width: var(--icx-row);
	max-width: 100%;
	margin: 16px auto 0;
	color: var(--icx-ink-2);
	font: 600 0.875rem/1.3 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
}
body.sensei-course-theme .sensei-course-theme__main-content > .sensei-course-theme__post-pagination .post-page-numbers {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 44px;
	min-height: 44px;
	margin: 0 !important;
	padding: 0 12px;
	border: 1px solid var(--icx-line);
	border-radius: 999px;
	color: var(--icx-navy);
	text-decoration: none;
}
body.sensei-course-theme .sensei-course-theme__main-content > .sensei-course-theme__post-pagination .post-page-numbers.current {
	background: var(--icx-navy);
	border-color: var(--icx-navy);
	color: #fff;
}
/* Sensei gives the column a least height that forgets the admin bar, which makes a page with one frame scroll by a few pixels. */
body.sensei-course-theme .sensei-course-theme__columns .sensei-course-theme__main-content { min-height: 0; }
body.sensei-course-theme .sensei-course-theme__main-content.icx-plain { --icx-col: min(100%, 56rem); }
body.sensei-course-theme.sensei-course-theme .sensei-course-theme__main-content.sensei-course-theme__main-content > *,
body.sensei-course-theme.sensei-course-theme .sensei-course-theme__main-content.sensei-course-theme__main-content .entry-content > * {
	max-width: var(--icx-row) !important;
	width: 100%;
	margin-inline: var(--icx-row-start) auto !important;
	box-sizing: border-box;
}
body.sensei-course-theme.sensei-course-theme .sensei-course-theme__main-content.sensei-course-theme__main-content > .entry-content,
body.sensei-course-theme.sensei-course-theme .sensei-course-theme__main-content.sensei-course-theme__main-content > .wp-block-post-content {
	max-width: none !important;
	margin-inline: 0 !important;
}
body.sensei-course-theme.sensei-course-theme .sensei-course-theme__main-content.sensei-course-theme__main-content .entry-content > .icx-package {
	max-width: var(--icx-col) !important;
	margin-inline: auto !important;
}

/* The lesson's own heading and the section line above it. On a lesson of text they head the page. */
body.sensei-course-theme .sensei-course-theme__main-content > .wp-block-sensei-lms-course-theme-lesson-module {
	color: var(--icx-ink-2);
	font: 600 0.8125rem/1.2 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
	border: 0;
	padding: 0;
	margin-top: 0 !important;
	margin-bottom: 4px !important;
}
body.sensei-course-theme .sensei-course-theme__main-content > h1.wp-block-post-title {
	color: var(--icx-navy);
	font: 700 clamp(1.25rem, 1rem + 0.9vw, 1.75rem)/1.2 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
	letter-spacing: -0.01em;
	margin-top: 0 !important;
	margin-bottom: 12px !important;
	overflow-wrap: anywhere;
	text-wrap: balance;
}
/* On a lesson that holds a lesson package they are out of view: the outline, the browser tab and the player
   already name the lesson. They stay in the page for screen readers. The class comes from the script; the
   :has() rule says the same before the script has run, in browsers that know it. */
body.sensei-course-theme.sensei-course-theme .sensei-course-theme__main-content.sensei-course-theme__main-content.icx-framed > h1.wp-block-post-title,
body.sensei-course-theme.sensei-course-theme .sensei-course-theme__main-content.sensei-course-theme__main-content.icx-framed > .wp-block-sensei-lms-course-theme-lesson-module {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}
body.sensei-course-theme.sensei-course-theme .sensei-course-theme__main-content.sensei-course-theme__main-content:has(.icx-package) > h1.wp-block-post-title,
body.sensei-course-theme.sensei-course-theme .sensei-course-theme__main-content.sensei-course-theme__main-content:has(.icx-package) > .wp-block-sensei-lms-course-theme-lesson-module {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* The lesson's controls as a group (in the bar, or as the strip at the bottom of a narrow window). */
.icx-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}
body.sensei-course-theme .icx-actions > *,
body.sensei-course-theme .icx-actions .sensei-lesson-footer,
body.sensei-course-theme .icx-actions .sensei-lesson-footer * {
	margin: 0 !important;
	max-width: none !important;
	width: auto;
}
body.sensei-course-theme .icx-actions .sensei-lesson-footer,
body.sensei-course-theme .icx-actions .sensei-lesson-footer div,
body.sensei-course-theme .icx-actions .sensei-lesson-footer form { padding: 0 !important; }
body.sensei-course-theme .icx-actions .sensei-lesson-footer .sensei-buttons-container {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
}
/* The lesson's content has no space of its own above or below it: the panel's padding is the only space round the frame. */
body.sensei-course-theme .sensei-course-theme__main-content > .entry-content,
body.sensei-course-theme .sensei-course-theme__main-content > .wp-block-post-content { margin-block: 0 !important; padding-block: 0 !important; }
body.sensei-course-theme .sensei-course-theme__main-content > .wp-block-sensei-lms-course-theme-notices:empty,
body.sensei-course-theme .sensei-course-theme__main-content > :empty { display: none; }
body.sensei-course-theme .sensei-course-theme__main-content .entry-content > p { line-height: 1.6; }
/* Sensei's copies of the lesson buttons for screen readers, which the script takes out once the bar has its own. */
body.sensei-course-theme .sensei-course-theme__main-content [hidden],
body.sensei-course-theme .sensei-course-theme__header [hidden] { display: none !important; }

/* A message for an administrator about a lesson package (learners never see it). */
body.sensei-course-theme .icx-package-notice {
	background: var(--icx-canvas);
	border-inline-start: 3px solid var(--icx-gold);
	border-radius: 6px;
	color: var(--icx-ink);
	font: 500 0.875rem/1.5 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
	padding: 12px 16px !important;
	margin-bottom: 12px !important;
}

/* What a learner is told on a lesson they cannot open (Sensei's box and notices), in the page's own voice. */
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice,
body.sensei-course-theme .sensei-course-theme__main-content .sensei-lms-notice {
	background: var(--icx-canvas);
	color: var(--icx-ink);
	border: 1px solid var(--icx-line);
	border-radius: 12px;
	padding: clamp(18px, 3vw, 28px);
	margin-inline: auto;
	margin-bottom: 16px;
	font-family: "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
}
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice__header { padding-bottom: 10px; color: var(--icx-ink-2); }
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice__title {
	font: 600 0.8125rem/1.2 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
	text-transform: none;
	letter-spacing: 0;
}
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice > .sensei-course-theme-locked-lesson-notice__text {
	color: var(--icx-navy);
	font: 700 clamp(1.0625rem, 0.95rem + 0.6vw, 1.375rem)/1.35 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
	margin-bottom: 0;
	overflow-wrap: anywhere;
}
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice > .sensei-course-theme-locked-lesson-notice__text a,
body.sensei-course-theme .sensei-course-theme__main-content .sensei-lms-notice a:not(.wp-block-button__link):not(.sensei-course-theme__button) {
	color: var(--icx-navy);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice__actions {
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: flex-start;
	gap: 10px;
	margin-top: 18px;
	font-size: 0.875rem;
}
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice__actions:empty { display: none; }

/* ---------- The package frame ---------- */
.icx-package {
	position: relative;
	aspect-ratio: var(--icx-ratio, 16 / 9);
	background: var(--icx-canvas);
	border: 0;
	border-radius: 10px;
	overflow: hidden;
	margin-inline: auto !important;
	box-shadow: 0 0 0 1px var(--icx-line), 0 12px 32px -18px rgba(27, 44, 93, 0.35);
}
/* A package that lays itself out to any shape fills the height that is left (the script gives the exact number). */
.icx-package[data-fit="fluid"] {
	aspect-ratio: auto;
	height: clamp(15rem, calc(100vh - 220px), 60rem);
	height: clamp(15rem, calc(100dvh - 220px), 60rem);
}
.icx-package > iframe {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	border: 0;
	border-radius: 0 !important;
	display: block;
}

/* ---------- Buttons ---------- */
.icx-btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	box-sizing: border-box;
	min-height: 44px;
	font: 600 0.875rem/1 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
	color: var(--icx-navy);
	background: #fff;
	border: 1px solid var(--icx-line);
	border-radius: 999px;
	padding: 0 16px;
	cursor: pointer;
	white-space: nowrap;
}
.icx-btn:hover,
.icx-btn:focus,
.icx-btn:active {
	background: var(--icx-tint) !important;
	color: var(--icx-navy) !important;
	border-color: var(--icx-navy) !important;
}
.icx-btn[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }
.icx-btn--icon { justify-content: center; width: 44px; padding: 0; }
.icx-btn--icon svg { width: 18px; height: 18px; }
.icx-nav { display: inline-flex; flex: none; gap: 8px; }
a.icx-btn { text-decoration: none !important; }
.icx-btn svg { width: 16px; height: 16px; flex: none; }
[dir="rtl"] .icx-nav svg { transform: scaleX(-1); }
/* Focus: a gold ring with a navy line inside it, so it shows on white, on the grey canvas and on the navy bar. */
.icx-btn:focus-visible,
body.sensei-course-theme a:focus-visible,
body.sensei-course-theme button:focus-visible,
body.sensei-course-theme summary:focus-visible {
	outline: 3px solid var(--icx-gold);
	outline-offset: 2px;
	box-shadow: 0 0 0 2px var(--icx-navy) !important;
}
body.sensei-course-theme .sensei-course-theme__button,
body.sensei-course-theme .wp-block-sensei-lms-lesson-actions .wp-block-button__link,
body.sensei-course-theme .wp-block-sensei-lms-button-complete-lesson .wp-block-button__link {
	background: var(--icx-navy) !important;
	color: #fff !important;
	border: 1px solid var(--icx-navy) !important;
	border-radius: 999px !important;
	font: 600 0.875rem/1 "Montserrat", "Noto Sans Arabic", system-ui, sans-serif !important;
	box-sizing: border-box;
	min-height: 46px;
	height: auto;
	padding: 0 20px !important;
	box-shadow: none;
	white-space: nowrap;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}
/* A finished lesson shows a state, not a second call to action. */
body.sensei-course-theme .icx-actions .wp-block-sensei-lms-button-lesson-completed .wp-block-button__link {
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%231c7c54' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 10.4l3.4 3.4 7.6-8'/%3E%3C/svg%3E") 14px center/16px no-repeat !important;
	color: var(--icx-done) !important;
	border-color: transparent !important;
	padding-inline: 38px 8px !important;
	cursor: default;
	pointer-events: none;
}
[dir="rtl"] body.sensei-course-theme .icx-actions .wp-block-sensei-lms-button-lesson-completed .wp-block-button__link { background-position: right 14px center !important; }
body.sensei-course-theme .sensei-course-theme__button:hover,
body.sensei-course-theme .sensei-course-theme__button:focus-visible,
body.sensei-course-theme .wp-block-sensei-lms-lesson-actions .wp-block-button__link:hover,
body.sensei-course-theme .wp-block-sensei-lms-lesson-actions .wp-block-button__link:focus-visible,
body.sensei-course-theme .wp-block-sensei-lms-button-complete-lesson .wp-block-button__link:hover,
body.sensei-course-theme .wp-block-sensei-lms-button-complete-lesson .wp-block-button__link:focus-visible {
	background: var(--icx-navy-3) !important;
	border-color: var(--icx-navy-3) !important;
	color: #fff !important;
}

/* ---------- Full screen ----------
   Real full screen where the browser allows it; the .is-open overlay is the fallback (iPhone). */
.icx-close {
	display: none;
	position: absolute;
	z-index: 3;
	top: max(8px, env(safe-area-inset-top));
	left: 50%;
	transform: translateX(-50%);
	padding: 0 16px;
	font-size: 0.8125rem;
	background: rgba(255, 255, 255, 0.94);
	opacity: 0.72;
}
.icx-close:hover,
.icx-close:focus-visible { opacity: 1; }
.icx-package:fullscreen {
	width: 100vw !important;
	height: 100vh !important;
	background: var(--icx-stage);
	aspect-ratio: auto;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}
.icx-package:fullscreen .icx-close,
.icx-package.is-open .icx-close { display: inline-flex; }
/* The column rule above caps children at the column width; a full-screen package must escape it. */
body.sensei-course-theme.sensei-course-theme .sensei-course-theme__main-content.sensei-course-theme__main-content .entry-content > .icx-package.is-open,
body.sensei-course-theme.sensei-course-theme .sensei-course-theme__main-content.sensei-course-theme__main-content .entry-content > .icx-package:fullscreen {
	max-width: none !important;
	margin: 0 !important;
}
.icx-package:fullscreen .icx-close:hover,
.icx-package.is-open .icx-close:hover { background: #fff !important; }
html.icx-open,
html.icx-open body { overflow: hidden; }
.icx-package.is-open {
	position: fixed;
	inset: 0;
	width: auto !important;
	height: auto !important;
	background: var(--icx-stage);
	z-index: 100000;
	aspect-ratio: auto;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}
@media (orientation: portrait) and (max-width: 782px) {
	.icx-package.is-open > iframe,
	.icx-package:fullscreen > iframe {
		inset: auto !important;
		top: 50% !important;
		left: 50% !important;
		width: 100vh !important;
		height: 100vw !important;
		/* Where the browser knows them: the sizes of the window as it is now, not with its bars away (an iPhone). */
		width: 100dvh !important;
		height: 100dvw !important;
		transform: translate(-50%, -50%) rotate(90deg);
		transform-origin: center;
	}
	.icx-package.is-open .icx-close,
	.icx-package:fullscreen .icx-close {
		top: auto;
		left: auto;
		right: max(8px, env(safe-area-inset-right));
		bottom: max(8px, env(safe-area-inset-bottom));
		transform: none;
		opacity: 0.9;
	}
}

/* ---------- Rule 4: a narrow window (html.icx-strip) ----------
   The lesson from edge to edge, then the lesson's controls as a strip. The strip is the last thing in the column
   and sits at the bottom of the window (the column is at least as tall as the window, and the strip is pushed to
   its end; on a longer page it sticks there), where a thumb reaches it. The frame is sized to end above it, so it
   never covers the lesson. A gap of 14px is kept above it. */
html.icx-strip body.sensei-course-theme .sensei-course-theme__main-content {
	--icx-col: 100%;
	--icx-row: 100%;
	display: flex;
	flex-direction: column;
	min-height: calc(100vh - var(--top-offset, 0px) - var(--sensei-lm-header-height));
	min-height: calc(100dvh - var(--top-offset, 0px) - var(--sensei-lm-header-height));
	box-sizing: border-box;
	padding: 16px 0 0;
}
html.icx-strip body.sensei-course-theme .sensei-course-theme__main-content > * { flex: none; }
/* A link reached with the keyboard is not left under the strip or the top bar. */
html.icx-strip { scroll-padding-bottom: 8.5rem; }
html.icx-js { scroll-padding-top: 5rem; }
/* The theme's floating "back to top" button would lie on the strip; a lesson with its controls always in reach does not need it. */
html.icx-strip body.sensei-course-theme #ast-scroll-top { display: none !important; }
/* Everything in the column except the lesson itself and the strip keeps 16 pixels from the screen's edges. */
html.icx-strip body.sensei-course-theme .sensei-course-theme__main-content > :not(.entry-content):not(.wp-block-post-content):not(.icx-actions) { padding-inline: 16px; }
html.icx-strip body.sensei-course-theme .sensei-course-theme__main-content .entry-content > :not(.icx-package) {
	padding-inline: 16px;
	box-sizing: border-box;
}
html.icx-strip .icx-package { border-radius: 0; box-shadow: none; }
html.icx-strip body.sensei-course-theme.sensei-course-theme .sensei-course-theme__main-content.sensei-course-theme__main-content > .icx-actions {
	position: sticky;
	bottom: 0;
	z-index: 5;
	/* One row. Sensei's buttons go to a row of their own only where one row cannot hold them with their words
	   whole (labels much longer than "Complete Lesson"), which is better than a button lying over its neighbour. */
	flex-wrap: wrap;
	gap: 8px;
	max-width: none !important;
	margin: auto 0 0 !important;
	/* Room all round, as in the top bar: 12px over and under the buttons, 16px at the sides, and the device's own
	   safe areas (the home bar under it; a notch beside it when the phone is on its side). */
	/* !important: Sensei clears the padding of whatever follows the lesson's content with a rule that carries it. */
	padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)) !important;
	background: #fff;
	border-top: 1px solid var(--icx-line);
}
/* In the flow, not sticking: when the learner has to scroll to the frame anyway (.is-flow, from the script), and on
   a lesson of text, where the buttons belong at the end of the reading and would otherwise sit over it all the way. */
html.icx-strip body.sensei-course-theme.sensei-course-theme .sensei-course-theme__main-content.sensei-course-theme__main-content > .icx-actions.is-flow,
html.icx-strip body.sensei-course-theme.sensei-course-theme .sensei-course-theme__main-content.sensei-course-theme__main-content.icx-plain > .icx-actions { position: static; }
/* And then it follows the frame directly, so one scroll shows the frame and its buttons together. */
html.icx-strip body.sensei-course-theme.sensei-course-theme .sensei-course-theme__main-content.sensei-course-theme__main-content > .icx-actions.is-flow { margin-top: 16px !important; }
/* The strip is one row at every width. Previous, next and Full screen keep their size; Sensei's lesson buttons take
   the room that is left, by need, and keep their words (on two lines when they must, never broken inside a word).
   What gives way, in the top bar's order: under 520px Full screen drops its words, and so does the lesser of two
   Sensei buttons (a finished lesson's "Completed" mark beside "Next Lesson"; "Complete Lesson" beside "Take Quiz"). */
html.icx-strip .icx-actions > .icx-nav,
html.icx-strip .icx-actions > .icx-open-btn { flex: none; }
html.icx-strip body.sensei-course-theme .icx-actions > :last-child:not(.icx-nav):not(.icx-open-btn) { flex: 1 1 0; min-width: min-content; }
html.icx-strip body.sensei-course-theme .icx-actions .sensei-lesson-footer,
html.icx-strip body.sensei-course-theme .icx-actions .sensei-lesson-footer .sensei-block-wrapper,
html.icx-strip body.sensei-course-theme .icx-actions .sensei-lesson-footer .wp-block-sensei-lms-lesson-actions,
html.icx-strip body.sensei-course-theme .icx-actions .sensei-lesson-footer form,
html.icx-strip body.sensei-course-theme .icx-actions .sensei-lesson-footer .wp-block-button,
html.icx-strip body.sensei-course-theme .icx-actions .sensei-lesson-footer .wp-block-button__link { width: 100% !important; min-width: 0; }
html.icx-strip body.sensei-course-theme .icx-actions .sensei-lesson-footer .sensei-buttons-container { flex-wrap: nowrap; gap: 8px; }
html.icx-strip body.sensei-course-theme .icx-actions .sensei-lesson-footer .sensei-buttons-container > * { flex: 1 1 auto; min-width: min-content; }
html.icx-strip body.sensei-course-theme .icx-actions .sensei-lesson-footer .wp-block-button__link,
html.icx-strip body.sensei-course-theme .icx-actions .sensei-lesson-footer .sensei-course-theme__button {
	padding: 4px 12px !important;
	white-space: normal;
	overflow-wrap: normal;
	word-break: normal;
	hyphens: manual;
	text-align: center;
	line-height: 1.15 !important;
}
/* On the narrowest windows the button's side padding gives 8px each way (measured: 118px were needed where 117
   were left, with 6px one pixel was still missing), so "Complete Lesson", and "Next Lesson"
   beside the "Completed" tick, keep to one row of the strip with their words whole, also where a classic scrollbar
   takes 15px of a 320px window (the label is centred, so nothing else moves). */
@media (max-width: 359.98px) {
	html.icx-strip body.sensei-course-theme .icx-actions .sensei-lesson-footer .wp-block-button__link,
	html.icx-strip body.sensei-course-theme .icx-actions .sensei-lesson-footer .sensei-course-theme__button { padding-inline: 4px !important; }
}
/* A finished lesson's mark takes only the room it needs; "Next Lesson" takes the rest. */
html.icx-strip body.sensei-course-theme .icx-actions .sensei-lesson-footer .sensei-buttons-container > .wp-block-sensei-lms-button-lesson-completed { flex: none; }
html.icx-strip body.sensei-course-theme .icx-actions .wp-block-sensei-lms-button-lesson-completed .wp-block-button__link { width: auto !important; white-space: nowrap; padding-inline: 38px 8px !important; }
@media (max-width: 519.98px) {
	html.icx-strip body.sensei-course-theme .icx-actions .sensei-lesson-footer .sensei-buttons-container:has(.wp-block-sensei-lms-button-view-quiz) > :has(.wp-block-sensei-lms-button-complete-lesson):not(:has(.wp-block-sensei-lms-button-view-quiz)) { flex: none; width: 44px !important; }
	html.icx-strip body.sensei-course-theme .icx-actions .sensei-buttons-container:has(.wp-block-sensei-lms-button-view-quiz) .wp-block-sensei-lms-button-complete-lesson .wp-block-button__link {
		justify-content: flex-start;
		gap: 32px;
		width: 44px !important;
		min-width: 44px;
		padding: 0 !important;
		padding-inline-start: 14px !important;
		overflow: hidden;
		font-size: 0 !important;
	}
	html.icx-strip .icx-actions > .icx-open-btn { justify-content: center; width: 44px; padding: 0; }
	html.icx-strip .icx-actions > .icx-open-btn svg { width: 18px; height: 18px; }
	html.icx-strip .icx-actions > .icx-open-btn span {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
	html.icx-strip body.sensei-course-theme .icx-actions .wp-block-sensei-lms-button-lesson-completed .wp-block-button__link {
		justify-content: flex-start;
		width: 44px !important;
		min-width: 44px;
		padding: 0 !important;
		padding-inline-start: 44px !important;
		overflow: hidden;
		font-size: 0 !important;
		background-position: center !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.sensei-course-theme *,
	body.sensei-course-theme *::before,
	body.sensei-course-theme *::after { transition: none !important; animation: none !important; }
}
