/* ==========================================================================
   Oscar, the Fluentora AI Teacher
   Design values from the Design Brief; shadows, bezels and hairlines copied
   from the English Level Test (level-test.html) so the apps read as one product.
   Light mode only for version 1. Everything is scoped under .aiteacher so the
   theme cannot leak in and these styles cannot leak out.
   ========================================================================== */

.aiteacher {
	--brand-orange: #FF4D04;
	--brand-orange-deep: #E03F00;
	--orange-ink: #C43C02;
	--orange-wash: rgba(255, 77, 4, 0.08);
	--orange-tint: #FFE6DA;
	--charcoal: #212932;
	--ink: #212932;
	--ink-soft: #5A6470;
	--ink-faint: #8C949E;
	--ground: #F4F3F1;
	--surface: #FFFFFF;
	--surface-sunk: #F7F6F4;
	--line: #E0DEDA;
	--line-strong: #C9C6C1;
	--correct: #17794D;
	--incorrect: #A32318;
	--pl-blue: #2F5D9E;
	--pl-wash: rgba(47, 93, 158, 0.09);

	--hairline: rgba(33, 41, 50, 0.07);
	--hairline-out: rgba(33, 41, 50, 0.045);
	--bezel: rgba(33, 41, 50, 0.035);
	--highlight: rgba(255, 255, 255, 0.9);
	--shadow-sm: 0 1px 2px rgba(33, 41, 50, 0.03), 0 4px 10px -3px rgba(33, 41, 50, 0.06);
	--shadow: 0 2px 4px -2px rgba(33, 41, 50, 0.04), 0 14px 32px -10px rgba(33, 41, 50, 0.10), 0 32px 64px -24px rgba(33, 41, 50, 0.07);
	--glass: rgba(255, 255, 255, 0.72);

	--bezel-gap: 0.4rem;
	--r-xl: 1.6rem;
	--r-lg: 1.2rem;
	--r-md: 0.8rem;
	--r-sm: 0.55rem;
	--r-pill: 999px;

	--ease: cubic-bezier(0.32, 0.72, 0, 1);
	--dur: 0.45s;
	--dur-fast: 0.28s;

	--font: 'Poppins', 'Segoe UI', system-ui, sans-serif;

	box-sizing: border-box;
	width: 100%;
	max-width: 760px;
	margin: 0 auto;
	padding: 0.9rem 0 3rem;
	padding-left: max(1rem, env(safe-area-inset-left));
	padding-right: max(1rem, env(safe-area-inset-right));
	padding-bottom: max(3rem, env(safe-area-inset-bottom));
	color: var(--ink);
	font-family: var(--font);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.55;
	text-align: left;
	-webkit-font-smoothing: antialiased;
}

.aiteacher *,
.aiteacher *::before,
.aiteacher *::after {
	box-sizing: inherit;
}

/* The page behind Oscar uses the Fluentora ground colour. */
body.aiteacher-page {
	background: #F4F3F1;
}

.aiteacher h1,
.aiteacher h2,
.aiteacher p {
	margin: 0;
	font-family: var(--font);
	color: var(--ink);
}

.aiteacher img {
	display: block;
	max-width: 100%;
	height: auto;
}

/* ---------- top bar: a floating glass island, as in the Level Test ---------- */
.aiteacher .ait-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.55rem 0.55rem 0.55rem 1.1rem;
	background: var(--glass);
	-webkit-backdrop-filter: blur(20px) saturate(1.6);
	backdrop-filter: blur(20px) saturate(1.6);
	border-radius: var(--r-pill);
	box-shadow:
		inset 0 1px 0 var(--highlight),
		0 0 0 1px var(--hairline),
		0 0 0 var(--bezel-gap) var(--bezel),
		0 0 0 calc(var(--bezel-gap) + 1px) var(--hairline-out),
		var(--shadow);
	position: sticky;
	top: max(0.9rem, env(safe-area-inset-top));
	z-index: 20;
}

.aiteacher .ait-brand {
	display: flex;
	align-items: center;
	gap: 0.2rem;
	min-width: 0;
}

.aiteacher .ait-logo {
	width: 150px;
}

@media (max-width: 420px) {
	.aiteacher .ait-topbar { border-radius: var(--r-xl); padding: 0.5rem 0.5rem 0.5rem 0.9rem; }
	.aiteacher .ait-logo { width: 124px; }
}

/* ---------- language switch: small pill, active side white on charcoal ---------- */
.aiteacher .ait-lang {
	display: inline-flex;
	flex: 0 0 auto;
	padding: 0.25rem;
	gap: 0.15rem;
	background: var(--surface-sunk);
	border-radius: var(--r-pill);
	box-shadow: inset 0 1px 2px var(--bezel), 0 0 0 1px var(--hairline);
}

.aiteacher .ait-lang-btn {
	min-width: 48px;
	min-height: 40px;
	margin: 0;
	padding: 0 0.85rem;
	border: 0;
	border-radius: var(--r-pill);
	background: transparent;
	color: var(--ink-soft);
	font-family: var(--font);
	font-size: 0.82rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	line-height: 1;
	text-transform: none;
	box-shadow: none;
	cursor: pointer;
	transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.aiteacher .ait-lang-btn:hover {
	background: var(--orange-wash);
	color: var(--orange-ink);
}

.aiteacher .ait-lang-btn[aria-pressed="true"],
.aiteacher .ait-lang-btn[aria-pressed="true"]:hover {
	background: var(--charcoal);
	color: #FFFFFF;
}

.aiteacher button:focus-visible {
	outline: 2px solid var(--brand-orange);
	outline-offset: 3px;
	box-shadow: 0 0 0 3px var(--orange-wash);
}

/* ---------- cards: double bezel without extra markup, as in the Level Test ---------- */
.aiteacher .ait-main {
	margin-top: 1.75rem;
}

.aiteacher .ait-card {
	background: var(--surface);
	border-radius: var(--r-xl);
	padding: 1.75rem 1.5rem;
	box-shadow:
		inset 0 1px 0 var(--highlight),
		0 0 0 1px var(--hairline),
		0 0 0 var(--bezel-gap) var(--bezel),
		0 0 0 calc(var(--bezel-gap) + 1px) var(--hairline-out),
		var(--shadow);
}

.aiteacher .ait-hero {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 0.9rem;
}

.aiteacher .ait-oscar {
	width: min(240px, 62vw);
}

.aiteacher .ait-name {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.5rem;
	max-width: 100%;
	font-size: 1.05rem;
	font-weight: 800;
}

/* Poppins is wider than Montserrat (task 5.1k): the badge keeps its words together and moves under the name when the
   card is narrow, instead of breaking in two or running past the edge. */
.aiteacher .ait-badge {
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
	padding: 0.28rem 0.7rem;
	border-radius: var(--r-pill);
	background: var(--orange-wash);
	color: var(--orange-ink);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.aiteacher .ait-title {
	font-size: 1.6rem;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

.aiteacher .ait-lead {
	color: var(--ink-soft);
	max-width: 32rem;
}

@media (min-width: 768px) {
	.aiteacher .ait-card { padding: 2.5rem 2.25rem; }
	.aiteacher .ait-title { font-size: 2.1rem; }
	.aiteacher .ait-logo { width: 160px; }
}

/* ---------- screens and forms ---------- */
.aiteacher [hidden] {
	display: none !important;
}

.aiteacher .ait-center {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 0.9rem;
}

.aiteacher .ait-form {
	display: flex;
	flex-direction: column;
	gap: 1.1rem;
	max-width: 26rem;
	margin: 0 auto;
}

.aiteacher .ait-head {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 0.6rem;
	margin-bottom: 0.4rem;
}

.aiteacher .ait-oscar-sm {
	width: 120px;
}

.aiteacher .ait-field {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.aiteacher .ait-label {
	font-size: 0.78rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--ink-soft);
}

.aiteacher .ait-input {
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 0.72rem 0.95rem;
	border: 0;
	border-radius: var(--r-md);
	background: var(--surface-sunk);
	color: var(--ink);
	font-family: var(--font);
	font-size: 16px;
	font-weight: 600;
	outline: none;
	box-shadow: inset 0 1px 2px var(--bezel), 0 0 0 1px var(--hairline);
	transition: box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.aiteacher .ait-code {
	font-size: 1.15rem;
	letter-spacing: 0.12em;
	text-align: center;
	text-transform: uppercase;
}

.aiteacher .ait-input:focus,
.aiteacher .ait-pin-box:focus {
	background: var(--surface);
	box-shadow: 0 0 0 1px var(--brand-orange), 0 0 0 4px var(--orange-wash);
}

/* PIN: four separate square boxes with large digits. */
.aiteacher .ait-pin {
	display: flex;
	gap: 0.7rem;
	justify-content: center;
}

.aiteacher .ait-pin-box {
	width: 3.6rem;
	height: 3.9rem;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: var(--r-md);
	background: var(--surface-sunk);
	color: var(--ink);
	font-family: var(--font);
	font-size: 1.7rem;
	font-weight: 800;
	text-align: center;
	outline: none;
	box-shadow: inset 0 1px 2px var(--bezel), 0 0 0 1px var(--hairline);
	transition: box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.aiteacher .ait-hint {
	margin-top: -0.5rem;
	font-size: 0.86rem;
	color: var(--ink-soft);
	text-align: center;
}

.aiteacher .ait-check {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	min-height: 48px;
	font-size: 0.95rem;
	color: var(--ink);
	cursor: pointer;
}

.aiteacher .ait-check input {
	width: 1.3rem;
	height: 1.3rem;
	margin: 0;
	accent-color: var(--brand-orange);
}

/* Gentle message: never red for something the student typed. */
.aiteacher .ait-ts:empty { display: none; }
.aiteacher .ait-ts { min-height: 65px; max-width: 100%; overflow: hidden; }
.aiteacher .ait-error {
	padding: 0.75rem 0.95rem;
	border-radius: var(--r-md);
	background: var(--orange-wash);
	color: var(--orange-ink);
	font-weight: 600;
	font-size: 0.95rem;
	text-align: center;
}

.aiteacher .ait-forgot {
	text-align: center;
	font-size: 0.92rem;
	color: var(--ink-soft);
}

.aiteacher .ait-forgot summary {
	display: inline-block;
	padding: 0.6rem;
	color: var(--orange-ink);
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}

.aiteacher .ait-forgot summary::-webkit-details-marker {
	display: none;
}

/* ---------- buttons, as in the Level Test ---------- */
.aiteacher .ait-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 52px;
	margin: 0;
	padding: 0.7rem 1.5rem;
	border: 0;
	border-radius: var(--r-pill);
	background: var(--surface);
	color: var(--ink);
	font-family: var(--font);
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-transform: none;
	text-decoration: none;
	cursor: pointer;
	box-shadow: inset 0 1px 0 var(--highlight), 0 0 0 1px var(--hairline), var(--shadow-sm);
	transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
		box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

.aiteacher .ait-btn:active {
	transform: scale(0.972);
}

.aiteacher .ait-btn:disabled {
	opacity: 0.55;
	cursor: wait;
	transform: none;
}

.aiteacher .ait-btn-primary {
	background: var(--brand-orange);
	color: #FFFFFF;
	font-size: 18px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 0 0 1px var(--brand-orange-deep),
		0 2px 6px -1px rgba(255, 77, 4, 0.35), 0 10px 24px -8px rgba(255, 77, 4, 0.45);
}

.aiteacher .ait-btn-primary:hover,
.aiteacher .ait-btn-primary:active {
	background: var(--brand-orange-deep);
	color: #FFFFFF;
}

.aiteacher .ait-btn-secondary:hover {
	color: var(--orange-ink);
	box-shadow: inset 0 1px 0 var(--highlight), 0 0 0 1px var(--brand-orange), var(--shadow-sm);
}

.aiteacher .ait-btn-quiet {
	background: transparent;
	color: var(--ink-soft);
	box-shadow: none;
}

.aiteacher .ait-btn-quiet:hover {
	background: var(--orange-wash);
	color: var(--orange-ink);
}

.aiteacher .ait-btn-block {
	width: 100%;
}

/* ---------- chips ---------- */
.aiteacher .ait-chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
}

.aiteacher .ait-chip {
	display: inline-flex;
	align-items: center;
	padding: 0.38rem 0.85rem;
	border-radius: var(--r-pill);
	background: var(--surface-sunk);
	color: var(--ink);
	font-size: 0.86rem;
	font-weight: 700;
	box-shadow: 0 0 0 1px var(--hairline);
}

.aiteacher .ait-chip-level {
	background: var(--charcoal);
	color: #FFFFFF;
	box-shadow: none;
}

/* ---------- landing page (S1) ---------- */
.aiteacher .ait-points {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	margin: 0.2rem 0;
	padding: 0;
	list-style: none;
	text-align: left;
}

.aiteacher .ait-points li {
	position: relative;
	margin: 0;
	padding-left: 2rem;
	font-weight: 600;
}

.aiteacher .ait-points li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	top: 0.05rem;
	width: 1.4rem;
	height: 1.4rem;
	display: grid;
	place-items: center;
	border-radius: var(--r-pill);
	background: var(--orange-wash);
	color: var(--orange-ink);
	font-size: 0.8rem;
	font-weight: 800;
}

.aiteacher .ait-actions {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	width: 100%;
	max-width: 22rem;
}

/* ---------- first-time setup (S3), steps 2 and 3 ---------- */
.aiteacher .ait-actions-row {
	flex-direction: row;
	gap: 0.7rem;
}

.aiteacher .ait-actions-row .ait-btn {
	flex: 1;
}

.aiteacher .ait-tips {
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	width: 100%;
	max-width: 26rem;
	padding: 1rem 1.1rem;
	border-radius: var(--r-md);
	background: var(--surface-sunk);
	box-shadow: 0 0 0 1px var(--hairline);
}

.aiteacher .ait-tips-title {
	font-weight: 700;
	text-align: left;
}

.aiteacher .ait-offer {
	font-weight: 700;
	color: var(--ink);
}

.aiteacher .ait-notice {
	font-size: 0.82rem;
	color: var(--ink-soft);
}

/* ---------- trial request form (S1b) ---------- */
.aiteacher .ait-choice {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.aiteacher .ait-choice legend {
	margin-bottom: 0.4rem;
	padding: 0;
}

.aiteacher .ait-option {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	min-height: 48px;
	padding: 0 0.9rem;
	border-radius: var(--r-md);
	background: var(--surface-sunk);
	box-shadow: 0 0 0 1px var(--hairline);
	font-weight: 600;
	cursor: pointer;
}

.aiteacher .ait-option + .ait-option {
	margin-top: 0.45rem;
}

.aiteacher .ait-option:has(input:checked) {
	background: var(--orange-wash);
	box-shadow: 0 0 0 1px var(--brand-orange);
}

.aiteacher .ait-option input {
	width: 1.2rem;
	height: 1.2rem;
	margin: 0;
	accent-color: var(--brand-orange);
}

.aiteacher select.ait-input {
	appearance: auto;
	cursor: pointer;
}

.aiteacher .ait-hint-left {
	margin-top: 0;
	text-align: left;
}

.aiteacher .ait-link {
	color: var(--orange-ink);
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* The robot trap: off screen, never shown to people or screen readers. */
.aiteacher .ait-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------- home (S4) ---------- */
.aiteacher [data-screen="home"].ait-screen {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.aiteacher .ait-home-head {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.aiteacher .ait-oscar-home {
	flex: 0 0 auto;
	width: 104px;
}

.aiteacher .ait-home-hello {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	min-width: 0;
}

.aiteacher .ait-home-hello .ait-title {
	font-size: 1.5rem;
}

/* Small phones with Poppins (task 5.1k): a smaller Oscar on the home card leaves room for the pills on one line. */
.aiteacher .ait-home-hello .ait-chip {
	white-space: nowrap;
}

@media (max-width: 380px) {
	.aiteacher .ait-home-head {
		gap: 0.75rem;
	}

	.aiteacher .ait-oscar-home {
		width: 76px;
	}
}

.aiteacher .ait-chips-left {
	justify-content: flex-start;
}

.aiteacher .ait-chip-streak {
	background: var(--orange-wash);
	color: var(--orange-ink);
	box-shadow: none;
}

.aiteacher .ait-today {
	padding: 1.1rem 1.25rem;
}

.aiteacher .ait-today-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.75rem;
	margin-bottom: 0.55rem;
}

.aiteacher .ait-today-left {
	font-weight: 700;
	text-align: right;
}

.aiteacher .ait-bar {
	height: 10px;
	border-radius: var(--r-pill);
	background: var(--surface-sunk);
	box-shadow: inset 0 1px 2px var(--bezel), 0 0 0 1px var(--hairline);
	overflow: hidden;
}

.aiteacher .ait-bar span {
	display: block;
	height: 100%;
	border-radius: var(--r-pill);
	background: var(--brand-orange);
	transition: width var(--dur) var(--ease);
}

.aiteacher .ait-today-trial {
	margin: 0;
	color: var(--ink-soft);
	font-weight: 600;
}

.aiteacher .ait-renew {
	padding: 0.85rem 1rem;
	border-radius: var(--r-lg);
	background: var(--orange-wash);
	color: var(--ink);
	font-weight: 600;
}

.aiteacher .ait-choices {
	display: grid;
	gap: 1rem;
}

/* Today's time, or the 30 days' time, is used (task 4.5): shown instead of the choices. */
.aiteacher .ait-limit {
	display: grid;
	gap: 0.9rem;
	justify-items: center;
	padding: 1.4rem 1.25rem;
}

.aiteacher .ait-limit .ait-lead {
	margin: 0;
	color: var(--ink);
	font-weight: 600;
}

.aiteacher .ait-choice-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.3rem;
	width: 100%;
	margin: 0;
	padding: 1.3rem 3.4rem 1.3rem 1.4rem;
	border: 0;
	color: var(--ink);
	font-family: var(--font);
	text-align: left;
	text-transform: none;
	cursor: pointer;
	transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.aiteacher .ait-choice-card::after {
	content: "\2192";
	position: absolute;
	right: 1.2rem;
	top: 50%;
	transform: translateY(-50%);
	width: 2rem;
	height: 2rem;
	display: grid;
	place-items: center;
	border-radius: var(--r-pill);
	background: var(--orange-wash);
	color: var(--orange-ink);
	font-weight: 800;
}

.aiteacher .ait-choice-card:hover,
.aiteacher .ait-choice-card:focus-visible {
	background: var(--surface);
	color: var(--ink);
}

.aiteacher .ait-choice-card:active {
	transform: scale(0.985);
}

.aiteacher .ait-choice-title {
	font-size: 1.2rem;
	font-weight: 800;
}

.aiteacher .ait-choice-hint {
	color: var(--ink-soft);
	font-size: 0.92rem;
	font-weight: 500;
}

.aiteacher .ait-center-text {
	text-align: center;
}

/* ---------- topics and lessons (S5) ---------- */
.aiteacher .ait-back {
	width: 44px;
	height: 44px;
	margin: -0.5rem 0 0.5rem -0.5rem;
	padding: 0;
	border: 0;
	border-radius: var(--r-pill);
	background: transparent;
	color: var(--ink);
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
}

.aiteacher .ait-back:hover {
	background: var(--orange-wash);
	color: var(--orange-ink);
}

[data-screen="topics"] .ait-lead,
[data-screen="lessons"] .ait-lead {
	margin: 0.4rem 0 1.2rem;
}

/* Lesson cards: title, level, about how long, and a green tick when done. */
.aiteacher .ait-lessons {
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
}

.aiteacher .ait-lesson-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.4rem;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 1rem 3.4rem 1rem 1.1rem;
	border: 0;
	border-radius: var(--r-md);
	background: var(--surface-sunk);
	color: var(--ink);
	font-family: var(--font);
	text-align: left;
	text-transform: none;
	cursor: pointer;
	box-shadow: 0 0 0 1px var(--hairline);
	transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.aiteacher .ait-lesson-card::after {
	content: "\2192";
	position: absolute;
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
	width: 2rem;
	height: 2rem;
	display: grid;
	place-items: center;
	border-radius: var(--r-pill);
	background: var(--orange-wash);
	color: var(--orange-ink);
	font-weight: 800;
}

.aiteacher .ait-lesson-card:hover,
.aiteacher .ait-lesson-card:focus-visible {
	background: var(--surface);
	color: var(--ink);
	box-shadow: 0 0 0 1px var(--brand-orange);
}

.aiteacher .ait-lesson-card:active {
	transform: scale(0.985);
}

.aiteacher .ait-lesson-title {
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1.3;
}

.aiteacher .ait-lesson-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	color: var(--ink-soft);
	font-size: 0.86rem;
	font-weight: 600;
}

.aiteacher .ait-lesson-meta .ait-chip {
	padding: 0.2rem 0.6rem;
	font-size: 0.78rem;
}

.aiteacher .ait-lesson-done {
	color: var(--correct);
	font-weight: 700;
}

.aiteacher .ait-lesson-done::before {
	content: "\2713\00a0";
}

.aiteacher .ait-topics {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.aiteacher .ait-topic {
	min-height: 48px;
	margin: 0;
	padding: 0.6rem 1.1rem;
	border: 0;
	border-radius: var(--r-pill);
	background: var(--surface-sunk);
	color: var(--ink);
	font-family: var(--font);
	font-size: 1rem;
	font-weight: 700;
	text-transform: none;
	box-shadow: 0 0 0 1px var(--hairline);
	cursor: pointer;
	transition: background var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.aiteacher .ait-topic:hover {
	background: var(--orange-wash);
	color: var(--orange-ink);
	box-shadow: 0 0 0 1px var(--brand-orange);
}

.aiteacher .ait-topic-surprise {
	background: var(--charcoal);
	color: #FFFFFF;
	box-shadow: none;
}

/* ---------- conversation (S6) ---------- */
.aiteacher [data-screen="talk"].ait-screen {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.aiteacher .ait-talk-bar {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.7rem 0.8rem;
	border-radius: var(--r-lg);
}

.aiteacher .ait-talk-oscar {
	flex: 0 0 auto;
	width: 52px;
	height: 52px;
	object-fit: contain;
}

.aiteacher .ait-talk-title {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1 1 auto;
	line-height: 1.3;
}

.aiteacher .ait-talk-title strong {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 800;
}

.aiteacher .ait-talk-time {
	color: var(--ink-soft);
	font-size: 0.86rem;
	font-weight: 600;
}

/* Two minutes or less left in the session (task 4.5). */
.aiteacher .ait-talk-time.ait-talk-time-low {
	color: var(--orange-ink);
	font-weight: 800;
}

/* Start Lesson: a thin progress line and 'Section 3 of 9 · Reading' under the lesson title. */
.aiteacher .ait-lesson-where {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 0.25rem;
	min-width: 0;
}

.aiteacher .ait-bar.ait-bar-thin {
	flex: 0 0 3.5rem;
	height: 0.35rem;
}

.aiteacher .ait-lesson-where-text {
	overflow: hidden;
	color: var(--ink-soft);
	font-size: 0.8rem;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.aiteacher .ait-pdf {
	flex: 0 0 auto;
	text-decoration: none;
}

/* The current task from the lesson, just above the controls. Long texts scroll inside the card. */
.aiteacher .ait-task {
	margin: 0.6rem 0;
	padding: 0.85rem 1rem;
	border-left: 4px solid var(--brand-orange);
}

.aiteacher .ait-task p {
	margin: 0;
}

.aiteacher .ait-task-where {
	color: var(--orange-ink);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.aiteacher .ait-task-instruction {
	margin-top: 0.25rem !important;
	color: var(--ink-soft);
	font-size: 0.92rem;
}

.aiteacher .ait-task-box,
.aiteacher .ait-task-text-body {
	max-height: 30vh;
	margin-top: 0.5rem;
	padding: 0.6rem 0.75rem;
	overflow-y: auto;
	border-radius: var(--r-sm);
	background: var(--surface-sunk);
	font-size: 0.95rem;
	white-space: pre-wrap;
}

.aiteacher .ait-task-text-body {
	max-height: 45vh;
	font-size: 1rem;
	line-height: 1.55;
}

.aiteacher .ait-task-text summary {
	margin-top: 0.5rem;
	font-weight: 700;
	cursor: pointer;
}

.aiteacher .ait-task-item {
	margin-top: 0.5rem !important;
	font-size: 1.05rem;
	font-weight: 600;
}

.aiteacher .ait-task-options {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0.5rem 0 0;
	padding: 0;
	list-style: none;
}

.aiteacher .ait-task-options li {
	padding: 0.3rem 0.7rem;
	border: 1px solid var(--line);
	border-radius: var(--r-pill);
	background: var(--surface);
	font-size: 0.92rem;
}

.aiteacher .ait-task-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.aiteacher .ait-task-actions:has( > :not([hidden]) ) {
	margin-top: 0.6rem;
}

.aiteacher .ait-task-page {
	text-decoration: none;
}

.aiteacher .ait-continue {
	border-color: var(--brand-orange);
	box-shadow: 0 0 0 2px var(--orange-wash);
}

.aiteacher .ait-sum-saved {
	color: var(--correct);
	font-weight: 600;
}

.aiteacher .ait-lesson-going {
	color: var(--orange-ink);
	font-weight: 600;
}

.aiteacher .ait-btn-small {
	min-height: 44px;
	padding: 0.45rem 1rem;
	font-size: 0.92rem;
}

.aiteacher .ait-confirm {
	padding: 1.1rem 1.2rem;
	text-align: center;
}

.aiteacher .ait-confirm p {
	margin-bottom: 0.8rem;
	font-weight: 700;
}

.aiteacher .ait-confirm-buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.6rem;
}

.aiteacher .ait-thread {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	min-height: 40vh;
	padding: 0.25rem 0.1rem;
}

.aiteacher .ait-bubble {
	max-width: 86%;
	padding: 0.7rem 0.95rem;
	border-radius: var(--r-lg);
	font-size: 17px;
	line-height: 1.5;
	overflow-wrap: anywhere;
	animation: ait-in var(--dur) var(--ease) both;
}

/* Oscar's English: white, left. */
.aiteacher .ait-bubble-oscar {
	align-self: flex-start;
	background: var(--surface);
	color: var(--ink);
	border-bottom-left-radius: var(--r-sm);
	box-shadow: inset 0 1px 0 var(--highlight), 0 0 0 1px var(--hairline), var(--shadow-sm);
}

/* Oscar's Polish: Polish-blue wash with a PL tag, so the language shows by label and colour. */
.aiteacher .ait-bubble-pl {
	background: var(--pl-wash);
	box-shadow: 0 0 0 1px rgba(47, 93, 158, 0.18);
}

.aiteacher .ait-pl-tag {
	display: inline-block;
	margin-right: 0.45rem;
	padding: 0.05rem 0.4rem;
	border-radius: var(--r-sm);
	background: var(--pl-blue);
	color: #FFFFFF;
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	vertical-align: 0.12em;
}

/* The student: orange tint, right. */
.aiteacher .ait-bubble-you {
	align-self: flex-end;
	background: var(--orange-tint);
	color: var(--ink);
	border-bottom-right-radius: var(--r-sm);
}

.aiteacher .ait-bubble-thinking {
	color: var(--ink-soft);
	font-style: italic;
	animation: ait-pulse 1.4s ease-in-out infinite;
}

/* Correction: a helpful tip, never red. The original in soft ink without strikethrough, then 'Better:'. */
.aiteacher .ait-correction {
	align-self: stretch;
	padding: 0.85rem 1rem;
	border-radius: var(--r-md);
	background: var(--surface);
	border-left: 4px solid var(--brand-orange);
	box-shadow: 0 0 0 1px var(--hairline), var(--shadow-sm);
	animation: ait-in var(--dur) var(--ease) both;
}

.aiteacher .ait-correction p {
	margin: 0;
}

.aiteacher .ait-correction-original {
	color: var(--ink-soft);
	font-size: 0.95rem;
}

.aiteacher .ait-correction-better {
	margin-top: 0.25rem !important;
	font-size: 17px;
}

.aiteacher .ait-correction-better span {
	color: var(--orange-ink);
	font-weight: 800;
}

.aiteacher .ait-correction-explain {
	margin-top: 0.5rem !important;
	padding: 0.45rem 0.6rem;
	border-radius: var(--r-sm);
	background: var(--pl-wash);
	font-size: 0.95rem;
}

.aiteacher .ait-correction-explain:not(:lang(pl)) {
	background: var(--surface-sunk);
}

.aiteacher .ait-try-it {
	align-self: flex-start;
	min-height: 40px;
	margin: 0;
	padding: 0.4rem 0.95rem;
	border: 0;
	border-radius: var(--r-pill);
	background: var(--orange-wash);
	color: var(--orange-ink);
	font-family: var(--font);
	font-size: 0.92rem;
	font-weight: 700;
	text-transform: none;
	cursor: pointer;
}

.aiteacher .ait-talk-problem {
	padding: 0.85rem 1rem;
	border-radius: var(--r-md);
	background: var(--orange-wash);
	color: var(--ink);
	font-weight: 600;
	text-align: center;
}

.aiteacher .ait-talk-problem p {
	margin-bottom: 0.6rem;
}

/* The worrying-message card: calm and clear, with no alarm colours. */
.aiteacher .ait-crisis {
	gap: 1rem;
	padding: 1.6rem 1.4rem;
	border-top: 4px solid var(--pl-blue);
}

.aiteacher .ait-crisis-text {
	font-size: 1.08rem;
	font-weight: 600;
	line-height: 1.6;
	text-align: left;
}

.aiteacher .ait-talk-done {
	padding: 1.5rem;
}

/* Typing area: stays at the bottom of the screen, above the keyboard and clear of the home bar. */
.aiteacher .ait-composer {
	position: sticky;
	bottom: 0;
	z-index: 10;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin: 0 -0.25rem;
	padding: 0.7rem 0.25rem max(0.6rem, env(safe-area-inset-bottom));
	background: linear-gradient(to bottom, rgba(244, 243, 241, 0), var(--ground) 1.2rem);
}

.aiteacher .ait-composer-row {
	display: flex;
	align-items: flex-end;
	gap: 0.5rem;
}

.aiteacher .ait-say {
	flex: 1 1 auto;
	min-height: 52px;
	max-height: 160px;
	resize: none;
	line-height: 1.4;
	background: var(--surface);
}

.aiteacher .ait-send {
	flex: 0 0 auto;
	min-width: 5.5rem;
}

/* Voice / Text switch, like the language switch. */
.aiteacher .ait-mode {
	display: inline-flex;
	align-self: center;
	gap: 0.15rem;
	padding: 0.25rem;
	border-radius: var(--r-pill);
	background: var(--surface);
	box-shadow: inset 0 1px 2px var(--bezel), 0 0 0 1px var(--hairline);
}

.aiteacher .ait-mode-btn {
	min-width: 5rem;
	min-height: 40px;
	margin: 0;
	padding: 0 1rem;
	border: 0;
	border-radius: var(--r-pill);
	background: transparent;
	color: var(--ink-soft);
	font-family: var(--font);
	font-size: 0.9rem;
	font-weight: 700;
	text-transform: none;
	cursor: pointer;
}

.aiteacher .ait-mode-btn[aria-pressed="true"] {
	background: var(--charcoal);
	color: #FFFFFF;
}

.aiteacher .ait-mode-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.aiteacher .ait-mode-note {
	margin: 0;
	color: var(--ink-soft);
	font-size: 0.88rem;
	text-align: center;
}

/* Microphone: a large orange circle with a soft ring; held, the ring pulses and the circle turns deep orange. Never red. */
.aiteacher .ait-voice {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	padding-top: 0.4rem;
}

.aiteacher .ait-mic {
	position: relative;
	width: 88px;
	height: 88px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--brand-orange);
	color: #FFFFFF;
	display: grid;
	place-items: center;
	cursor: pointer;
	touch-action: none;
	user-select: none;
	-webkit-user-select: none;
	-webkit-touch-callout: none;
	-webkit-tap-highlight-color: transparent;
	box-shadow: 0 0 0 8px var(--orange-wash), 0 10px 24px -8px rgba(255, 77, 4, 0.55);
	transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

.aiteacher .ait-mic svg {
	pointer-events: none;
}

.aiteacher .ait-mic:disabled {
	opacity: 0.5;
	cursor: wait;
}

.aiteacher .ait-mic.ait-mic-on {
	background: var(--brand-orange-deep);
	transform: scale(1.06);
}

.aiteacher .ait-mic.ait-mic-on::after {
	content: "";
	position: absolute;
	inset: -8px;
	border-radius: 50%;
	border: 3px solid var(--brand-orange);
	animation: ait-ring 1.4s ease-out infinite;
	pointer-events: none;
}

/* Slid away: shows that letting go will cancel. */
.aiteacher .ait-mic.ait-mic-cancel {
	background: var(--ink-soft);
	transform: scale(0.94);
}

.aiteacher .ait-mic.ait-mic-cancel::after {
	animation: none;
	border-color: var(--line-strong);
}

.aiteacher.ait-kids .ait-mic {
	width: 96px;
	height: 96px;
}

.aiteacher .ait-mic-status {
	min-height: 2.8em;
	margin: 0;
	color: var(--ink-soft);
	font-size: 0.92rem;
	font-weight: 600;
	text-align: center;
}

/* The student's bubble while Oscar listens: three soft dots. */
.aiteacher .ait-bubble-listening {
	display: inline-flex;
	gap: 5px;
	align-items: center;
	min-height: 2.6rem;
}

.aiteacher .ait-bubble-listening .ait-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--ink-soft);
	animation: ait-pulse 1.2s ease-in-out infinite;
}

.aiteacher .ait-bubble-listening .ait-dot:nth-child(2) {
	animation-delay: 0.2s;
}

.aiteacher .ait-bubble-listening .ait-dot:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes ait-ring {
	from { transform: scale(1); opacity: 0.9; }
	to { transform: scale(1.35); opacity: 0; }
}

.aiteacher .ait-help {
	align-self: center;
	min-height: 44px;
	color: var(--pl-blue);
	font-size: 0.95rem;
}

.aiteacher .ait-help:hover {
	background: var(--pl-wash);
	color: var(--pl-blue);
}

.aiteacher .ait-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

@keyframes ait-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: none; }
}

@keyframes ait-pulse {
	0%, 100% { opacity: 0.55; }
	50% { opacity: 1; }
}

/* ---------- session summary (S7) ---------- */
.aiteacher [data-screen="summary"].ait-screen {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.aiteacher .ait-summary {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 0.6rem;
}

.aiteacher .ait-sum-numbers {
	color: var(--ink-soft);
	font-weight: 600;
}

.aiteacher .ait-sum-block {
	align-self: stretch;
	margin-top: 0.6rem;
	text-align: left;
}

.aiteacher .ait-sum-block h2 {
	margin: 0 0 0.45rem;
}

.aiteacher .ait-sum-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.aiteacher .ait-sum-list li {
	margin: 0 0 0.4rem;
	padding: 0.55rem 0.8rem;
	border-radius: var(--r-md);
	background: var(--surface-sunk);
	box-shadow: 0 0 0 1px var(--hairline);
}

.aiteacher .ait-sum-list li > span:first-child {
	font-weight: 700;
}

.aiteacher .ait-sum-meaning {
	color: var(--ink-soft);
	font-weight: 500;
}

.aiteacher .ait-sum-fix {
	border-left: 4px solid var(--brand-orange);
}

.aiteacher .ait-sum-list .ait-sum-before {
	color: var(--ink-soft);
	font-weight: 500 !important;
}

.aiteacher .ait-sum-next p {
	margin: 0;
	padding: 0.7rem 0.9rem;
	border-radius: var(--r-md);
	background: var(--orange-wash);
	font-weight: 600;
}

.aiteacher .ait-rate {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.7rem;
	text-align: center;
}

.aiteacher .ait-rate-title {
	font-weight: 800;
}

.aiteacher .ait-stars {
	display: flex;
	gap: 0.25rem;
}

/* Five stars; filled ones are orange (Design Brief). */
.aiteacher .ait-star {
	width: 48px;
	height: 48px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--line-strong);
	font-size: 2.1rem;
	line-height: 1;
	cursor: pointer;
	transition: color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

.aiteacher .ait-star:hover {
	transform: scale(1.08);
}

.aiteacher .ait-star-on {
	color: var(--brand-orange);
}

.aiteacher .ait-rate textarea {
	min-height: 52px;
	resize: vertical;
}

.aiteacher .ait-rate-thanks {
	color: var(--correct);
	font-weight: 700;
}

.aiteacher .ait-sum-actions {
	align-self: center;
}

/* Kids: a short burst of confetti at the end of a session. */
.aiteacher .ait-confetti {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.aiteacher .ait-confetti span {
	position: absolute;
	top: -12px;
	width: 8px;
	height: 12px;
	border-radius: 2px;
	animation: ait-fall 2.2s cubic-bezier(0.25, 0.6, 0.4, 1) forwards;
}

@keyframes ait-fall {
	to { top: 105%; opacity: 0; }
}

/* ---------- Kids mode: larger text and buttons ---------- */
.aiteacher.ait-kids {
	font-size: 18px;
}

.aiteacher.ait-kids .ait-btn {
	font-size: 20px;
}

/* Language changes fade gently instead of jumping. */
.aiteacher [data-i18n] {
	transition: opacity var(--dur-fast) var(--ease);
}

.aiteacher.ait-switching [data-i18n] {
	opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
	.aiteacher *,
	.aiteacher *::before,
	.aiteacher *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

/* ---------- focus mode: during a session the website header and footer are hidden ---------- */
body.aiteacher-focus #masthead,
body.aiteacher-focus #colophon,
body.aiteacher-focus .site-header,
body.aiteacher-focus .site-footer,
body.aiteacher-focus [data-elementor-type="header"],
body.aiteacher-focus [data-elementor-type="footer"],
body.aiteacher-focus .entry-header,
body.aiteacher-focus #wpadminbar {
	display: none !important;
}

html.aiteacher-focus-html {
	margin-top: 0 !important;
}

/* Oscar's voice (task 3.3): the part being spoken gets an orange edge; a small Play again icon on each part. */
.aiteacher .ait-bubble-oscar,
.aiteacher .ait-correction-explain {
	position: relative;
	padding-right: 2.6rem;
}

.aiteacher .ait-speaking {
	box-shadow: 0 0 0 2px var(--brand-orange);
}

.aiteacher .ait-correction-explain.ait-speaking {
	border-radius: var(--r-sm);
}

.aiteacher .ait-replay {
	position: absolute;
	top: 50%;
	right: 0.35rem;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--ink-soft);
	cursor: pointer;
}

.aiteacher .ait-replay:hover,
.aiteacher .ait-replay:focus-visible {
	background: var(--orange-tint);
	color: var(--ink);
}

.aiteacher .ait-skip {
	display: block;
	margin: 0.25rem auto 0;
}

.aiteacher .ait-skip[hidden] {
	display: none;
}

/* ---------- Umer's test controls (task 4.3a), served only to a WordPress administrator ---------- */
.aiteacher .ait-test {
	margin: 0.75rem 0;
	padding: 0.7rem 0.85rem;
	border: 1.5px dashed var(--line-strong);
	border-radius: var(--r-md);
	background: var(--surface-sunk);
	font-size: 0.85rem;
	text-align: left;
}

.aiteacher .ait-test[hidden] {
	display: none;
}

.aiteacher .ait-test-tag {
	display: block;
	margin-bottom: 0.45rem;
	color: var(--ink-soft);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.aiteacher .ait-test-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
}

.aiteacher .ait-test-row + .ait-test-row {
	margin-top: 0.45rem;
}

.aiteacher .ait-test-label {
	font-weight: 600;
}

.aiteacher .ait-test select.ait-input {
	flex: 1 1 12rem;
	min-width: 0;
	max-width: 100%;
	font-size: 0.85rem;
}

.aiteacher .ait-test-note {
	color: var(--correct);
}

/* 'Go to': sections open into their parts, parts into their questions (Umer, 6 November 2026). */
.aiteacher .ait-test-open {
	flex: 1 1 12rem;
	min-width: 0;
	max-width: 100%;
	font-size: 0.85rem;
	text-align: left;
	cursor: pointer;
}

.aiteacher .ait-test-open::after {
	content: " \25BE";
	float: right;
}

.aiteacher .ait-test-open[aria-expanded="true"]::after {
	content: " \25B4";
}

.aiteacher .ait-test-menu {
	margin-top: 0.45rem;
	max-height: 60vh;
	overflow-y: auto;
	border: 1px solid var(--line-strong);
	border-radius: var(--r-sm, 8px);
	background: var(--surface, #fff);
	padding: 0.3rem;
}

.aiteacher .ait-test-menu[hidden] {
	display: none;
}

.aiteacher .ait-test-menu details > summary {
	cursor: pointer;
	padding: 0.4rem 0.5rem;
	border-radius: 6px;
	font-weight: 600;
	list-style-position: inside;
}

.aiteacher .ait-test-menu details details {
	margin-left: 1rem;
}

.aiteacher .ait-test-menu details details > summary {
	font-weight: 500;
}

.aiteacher .ait-test-menu details > summary:hover,
.aiteacher .ait-test-menu .ait-test-item:hover,
.aiteacher .ait-test-menu .ait-test-item:focus-visible {
	background: var(--surface-sunk);
}

.aiteacher .ait-test-menu .ait-test-items {
	margin: 0 0 0.3rem 2rem;
	padding: 0;
	list-style: none;
}

.aiteacher .ait-test-menu .ait-test-item {
	display: block;
	width: 100%;
	padding: 0.35rem 0.5rem;
	border: 0;
	border-radius: 6px;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.aiteacher .ait-test-menu .ait-test-item-end {
	font-weight: 600;
}

/* Watch, listen or read again: the buttons in the chat under Oscar's reply (2 November 2026). */
.aiteacher .ait-again {
	max-width: 85%;
}

/* ---------- settings (S9, task 4.7) ---------- */
.aiteacher .ait-top-right {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

/* The settings button sits in the top bar, on home only. */
.aiteacher .ait-gear {
	display: none;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: var(--r-pill);
	background: transparent;
	color: var(--ink-soft);
	cursor: pointer;
}

.aiteacher[data-screen="home"] .ait-gear {
	display: inline-flex;
}

.aiteacher .ait-gear:hover {
	background: var(--orange-wash);
	color: var(--orange-ink);
}

[data-screen="settings"] .ait-hint-left {
	margin: 0.3rem 0 0.6rem;
}

.aiteacher .ait-set-row {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	padding: 1rem 0;
	border-bottom: 1px solid var(--line);
}

.aiteacher .ait-set-row .ait-mode {
	align-self: flex-start;
}

.aiteacher .ait-set-hint {
	margin: 0;
	font-size: 0.86rem;
	color: var(--ink-soft);
}

.aiteacher .ait-set-saved {
	min-height: 1.4rem;
	margin: 0.5rem 0 0;
	font-size: 0.86rem;
	font-weight: 600;
	color: var(--correct);
}

.aiteacher .ait-set-done {
	margin: 0;
	padding: 0.75rem 0.95rem;
	border-radius: var(--r-md);
	background: rgba(23, 121, 77, 0.08);
	color: var(--correct);
	font-size: 0.92rem;
	font-weight: 600;
}

.aiteacher .ait-set-pin {
	margin: 0.4rem 0 1.2rem;
	padding: 0.2rem 0;
	border-bottom: 1px solid var(--line);
}

.aiteacher .ait-set-pin > summary {
	min-height: 48px;
	display: flex;
	align-items: center;
	font-weight: 700;
	color: var(--ink);
	cursor: pointer;
}

.aiteacher .ait-set-pin .ait-form {
	padding: 0.4rem 0 1.2rem;
}

/* What sits inside <details> inherits through the browser's own hidden slot, which misses the sizing rule above. */
.aiteacher .ait-set-pin *,
.aiteacher .ait-set-pin *::before,
.aiteacher .ait-set-pin *::after {
	box-sizing: border-box;
}

/* ===== Umer's design decisions and the six small fixes (8 November 2026) ===== */

/* Oscar's face beside his newest reply. His replies are groups; the one face moves to the newest group and stays in
   view while it scrolls; older groups keep the same indent, so all his messages line up. */
.aiteacher .ait-oscar-group {
	display: flex;
	align-items: flex-end;
	gap: 0.6rem;
}

.aiteacher .ait-oscar-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 0.55rem;
	min-width: 0;
}

.aiteacher .ait-oscar-body > .ait-bubble {
	max-width: 92%;
}

.aiteacher .ait-avatar {
	position: sticky;
	bottom: 0.75rem;
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	overflow: hidden;
}

.aiteacher .ait-avatar:not(:empty) {
	background: var(--orange-tint);
	box-shadow: 0 0 0 2px var(--surface), var(--shadow-sm);
}

.aiteacher .ait-avatar .ait-talk-oscar {
	display: block;
	width: 64px;
	max-width: none;
	height: 64px;
	margin: -2px 0 0 -10px;
	object-fit: cover;
}

.aiteacher .ait-avatar:has(.is-speaking) {
	animation: ait-speak-ring 1.4s ease-out infinite;
}

@keyframes ait-speak-ring {
	0% { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px rgba(255, 77, 4, 0.85); }
	70% { box-shadow: 0 0 0 2px var(--surface), 0 0 0 11px rgba(255, 77, 4, 0); }
	100% { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px rgba(255, 77, 4, 0); }
}

@media (prefers-reduced-motion: reduce) {
	.aiteacher .ait-avatar:has(.is-speaking) {
		animation: none;
		box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand-orange);
	}
}

/* The lesson library: level categories (locked ones visible with a padlock) and the website's four topics. */
.aiteacher .ait-lib {
	display: grid;
	gap: 0.35rem;
	margin: 0.6rem 0 1rem;
}

.aiteacher .ait-lib-label {
	margin: 0.35rem 0 0;
	color: var(--ink-soft);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.aiteacher .ait-lib-row {
	display: flex;
	gap: 0.45rem;
	padding: 0.15rem 0.1rem 0.35rem;
	overflow-x: auto;
	scrollbar-width: none;
}

.aiteacher .ait-lib-row::-webkit-scrollbar {
	display: none;
}

.aiteacher .ait-lib-btn {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: 0.4rem;
	min-height: 44px;
	padding: 0.5rem 0.95rem;
	border: 0;
	border-radius: var(--r-pill);
	background: var(--surface);
	color: var(--ink);
	box-shadow: inset 0 0 0 1px var(--line);
	font: 600 0.9rem/1.2 var(--font);
	cursor: pointer;
}

.aiteacher .ait-lib-btn.is-on {
	background: var(--ink);
	color: #FFFFFF;
	box-shadow: none;
}

.aiteacher .ait-lib-btn.is-locked {
	background: var(--surface-sunk);
	color: var(--ink-soft);
}

.aiteacher .ait-lib-btn.is-locked.is-on {
	background: var(--ink-soft);
	color: #FFFFFF;
}

.aiteacher .ait-lib-btn:focus-visible,
.aiteacher .ait-lib-clear:focus-visible {
	outline: 3px solid var(--brand-orange);
	outline-offset: 2px;
}

.aiteacher .ait-lib-own {
	padding: 0.1rem 0.45rem;
	border-radius: var(--r-pill);
	background: var(--orange-tint);
	color: var(--orange-ink);
	font-size: 0.68rem;
	font-weight: 700;
}

.aiteacher .ait-lib-btn.is-on .ait-lib-own {
	background: rgba(255, 255, 255, 0.18);
	color: #FFFFFF;
}

.aiteacher .ait-lib-count {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	min-height: 44px;
	margin: 0;
	color: var(--ink-soft);
	font-size: 0.86rem;
	font-weight: 600;
}

.aiteacher .ait-lib-clear {
	padding: 0.5rem 0.25rem;
	border: 0;
	background: none;
	color: var(--orange-ink);
	font: 700 0.86rem var(--font);
	cursor: pointer;
}

.aiteacher .ait-lib-lock {
	display: grid;
	justify-items: start;
	gap: 0.75rem;
	margin: 0 0 1rem;
	padding: 1rem 1.1rem;
	border-radius: var(--r-lg);
	background: var(--surface-sunk);
	box-shadow: inset 0 0 0 1px var(--line);
}

.aiteacher .ait-lib-lock-text {
	margin: 0;
	color: var(--ink);
	font-weight: 600;
}

.aiteacher .ait-lib-none {
	color: var(--ink-soft);
}

.aiteacher .ait-lesson-locked {
	background: var(--surface-sunk);
}

.aiteacher .ait-lesson-locked .ait-lesson-title {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	color: var(--ink-soft);
}

.aiteacher .ait-chip-topic {
	background: var(--surface);
	color: var(--ink-soft);
	box-shadow: inset 0 0 0 1px var(--line);
}

/* Fix: a matching or word box as tags and one line per meaning. */
.aiteacher .ait-box-label {
	margin: 0.2rem 0 0.35rem;
	color: var(--ink-soft);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.08em;
}

.aiteacher .ait-box-words {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 0 0 0.5rem;
	padding: 0;
	list-style: none;
}

.aiteacher .ait-box-words li {
	padding: 0.2rem 0.65rem;
	border-radius: var(--r-pill);
	background: var(--surface);
	box-shadow: inset 0 0 0 1px var(--line);
	font-size: 0.9rem;
	font-weight: 600;
}

.aiteacher .ait-box-meanings {
	display: grid;
	gap: 0.3rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.aiteacher .ait-box-meanings li,
.aiteacher .ait-box-note {
	font-size: 0.92rem;
	line-height: 1.4;
}

.aiteacher .ait-box-note {
	margin: 0.3rem 0 0;
}

/* Fix: 'Skip Oscar's voice' with a stop sign. */
.aiteacher .ait-skip::before {
	content: '';
	display: inline-block;
	width: 0.6em;
	height: 0.6em;
	margin-right: 0.45em;
	border-radius: 2px;
	background: currentColor;
}

/* Fix: Change PIN shows that it opens; Sign out is a clear button. */
.aiteacher .ait-set-pin > summary {
	justify-content: space-between;
	list-style: none;
}

.aiteacher .ait-set-pin > summary::-webkit-details-marker {
	display: none;
}

.aiteacher .ait-set-pin > summary::after {
	content: '';
	width: 0.55rem;
	height: 0.55rem;
	margin-right: 0.35rem;
	border-right: 2.5px solid var(--ink-soft);
	border-bottom: 2.5px solid var(--ink-soft);
	transform: rotate(45deg);
	transition: transform var(--dur-fast) var(--ease);
}

.aiteacher .ait-set-pin[open] > summary::after {
	transform: rotate(-135deg);
}

.aiteacher [data-screen="settings"] .ait-sign-out {
	margin-top: 1.25rem;
	background: var(--surface);
	color: var(--ink);
	box-shadow: inset 0 0 0 1px var(--line-strong);
}

/* Fix: the time left easy to read, and a 48-pixel tap area round each 32-pixel speaker button (the Design Brief's
   minimum touch target; the approved fix asked for at least 44). */
.aiteacher .ait-talk-time {
	color: var(--ink);
	font-weight: 700;
}

.aiteacher .ait-replay::after {
	content: '';
	position: absolute;
	inset: -8px;
}

/* The summary's language under Oscar, always shown (Umer, 9 November 2026): PL keeps the Polish blue of Oscar's
   Polish bubbles; EN is ink. */
.aiteacher .ait-sum-lang {
	margin: 0 0 0.35rem;
}

.aiteacher .ait-sum-lang[lang="en"] {
	background: var(--ink);
}

.aiteacher .ait-sum-lang[hidden] {
	display: none;
}

/* ===== The conversation screen (Umer, 9 November 2026): the Dynamic Island on phones, the Side Rail on computers,
   the compact dock and the approved improvements. ===== */

/* During a session the island (phones) or the rail (computers) holds the logo and PL / EN. */
.aiteacher[data-screen="talk"] .ait-topbar,
.aiteacher .ait-face-home {
	display: none;
}

.aiteacher .ait-chat {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	min-width: 0;
}

/* The time ring: the minutes left in a ring that empties; orange with a soft pulse in the last two minutes. */
.aiteacher .ait-ring {
	position: relative;
	flex: 0 0 auto;
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
}

.aiteacher .ait-ring svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.aiteacher .ait-ring circle {
	fill: none;
	stroke-width: 3.2;
}

.aiteacher .ait-ring-track {
	stroke: rgba(33, 41, 50, 0.1);
}

.aiteacher .ait-ring-fill {
	stroke: var(--ink);
	stroke-linecap: round;
	transition: stroke-dasharray 0.9s var(--ease), stroke var(--dur) var(--ease);
}

.aiteacher .ait-ring b {
	position: relative;
	margin-top: -5px;
	color: var(--ink);
	font-size: 12.5px;
	font-weight: 800;
	line-height: 1;
}

.aiteacher .ait-ring i {
	position: absolute;
	right: 0;
	bottom: 7px;
	left: 0;
	color: var(--ink-soft);
	font-size: 7px;
	font-style: normal;
	font-weight: 800;
	letter-spacing: 0.08em;
	line-height: 1;
	text-align: center;
	text-transform: uppercase;
}

.aiteacher.ait-time-low .ait-ring-fill {
	stroke: var(--brand-orange);
}

.aiteacher.ait-time-low .ait-ring b {
	color: var(--orange-ink);
}

.aiteacher.ait-time-low .ait-ring::after {
	content: "";
	position: absolute;
	inset: 2px;
	border-radius: 50%;
	box-shadow: 0 0 0 2px var(--brand-orange);
	opacity: 0;
	animation: ait-breathe 2.4s var(--ease) infinite;
	pointer-events: none;
}

@keyframes ait-breathe {
	0% { transform: scale(0.9); opacity: 0.55; }
	100% { transform: scale(1.35); opacity: 0; }
}

/* ---------- the Dynamic Island (phones and tablets) ---------- */
.aiteacher .ait-island {
	position: sticky;
	top: max(0.6rem, env(safe-area-inset-top));
	z-index: 30;
	display: flex;
	justify-content: center;
	height: 48px;
}

.aiteacher .ait-island-pill,
.aiteacher .ait-island-panel {
	background: var(--glass);
	-webkit-backdrop-filter: blur(20px) saturate(1.6);
	backdrop-filter: blur(20px) saturate(1.6);
	box-shadow:
		inset 0 1px 0 var(--highlight),
		0 0 0 1px var(--hairline),
		0 0 0 5px var(--bezel),
		0 0 0 6px var(--hairline-out),
		var(--shadow);
}

.aiteacher .ait-island-pill {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	max-width: 100%;
	height: 48px;
	margin: 0;
	padding: 0 6px 0 14px;
	border: 0;
	border-radius: var(--r-pill);
	color: var(--ink);
	font-family: var(--font);
	cursor: pointer;
	transition: transform 0.5s cubic-bezier(0.34, 1.32, 0.5, 1), opacity var(--dur-fast) var(--ease);
}

.aiteacher .ait-island-pill .ait-ring {
	width: 36px;
	height: 36px;
}

.aiteacher .ait-island-pill .ait-ring b {
	margin-top: -4px;
	font-size: 11px;
}

.aiteacher .ait-island-pill .ait-ring i {
	bottom: 6px;
	font-size: 6.5px;
}

.aiteacher .ait-island-title {
	min-width: 0;
	max-width: 58vw;
	overflow: hidden;
	font-size: 0.9rem;
	font-weight: 800;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.aiteacher .ait-island-dot {
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--brand-orange);
}

.aiteacher .ait-island-dot.is-speaking {
	animation: ait-dot-talk 1.6s var(--ease) infinite;
}

@keyframes ait-dot-talk {
	0% { box-shadow: 0 0 0 0 rgba(255, 77, 4, 0.45); }
	100% { box-shadow: 0 0 0 8px rgba(255, 77, 4, 0); }
}

/* The circular arrow: the same control in both states, pointing down to open and up to close (Umer, 9 November
   2026). It sits centred on the island's bottom edge; its tap area is 48 pixels. */
.aiteacher .ait-island-arrow {
	position: absolute;
	left: 50%;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--surface);
	color: var(--ink);
	box-shadow: 0 0 0 1px var(--hairline), 0 2px 6px -2px rgba(33, 41, 50, 0.08), 0 12px 26px -12px rgba(33, 41, 50, 0.22);
	transform: translateX(-50%);
	cursor: pointer;
	transition: opacity var(--dur-fast) var(--ease);
}

.aiteacher .ait-island-arrow::after {
	content: "";
	position: absolute;
	inset: -9px;
	border-radius: 50%;
}

.aiteacher .ait-island-arrow .ait-chev {
	width: 14px;
	height: 14px;
}

.aiteacher .ait-island > .ait-island-arrow {
	top: 33px;
}

.aiteacher .ait-island-close {
	bottom: -15px;
}

.aiteacher .ait-island-close .ait-chev {
	transform: rotate(180deg);
}

.aiteacher .ait-island-panel {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	padding: 14px 14px 24px;
	border-radius: 26px;
	opacity: 0;
	transform: scale(0.55, 0.3);
	transform-origin: 50% 0;
	pointer-events: none;
	transition: transform 0.55s cubic-bezier(0.34, 1.32, 0.5, 1), opacity 0.25s var(--ease);
}

.aiteacher .ait-island.is-open .ait-island-panel {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

.aiteacher .ait-island.is-open .ait-island-pill {
	opacity: 0;
	transform: scale(0.9);
	pointer-events: none;
}

.aiteacher .ait-island.is-open > .ait-island-arrow {
	opacity: 0;
	pointer-events: none;
}

.aiteacher .ait-island-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

.aiteacher .ait-island-logo {
	width: 108px;
	height: auto;
}

.aiteacher .ait-island-mid {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0.85rem 0 0.8rem;
}

.aiteacher .ait-island-mid .ait-ring {
	width: 44px;
	height: 44px;
}

.aiteacher .ait-island-info {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
}

.aiteacher .ait-island-name {
	overflow: hidden;
	font-size: 0.98rem;
	font-weight: 800;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.aiteacher .ait-island-where {
	overflow: hidden;
	color: var(--ink-soft);
	font-size: 0.8rem;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.aiteacher .ait-island-info .ait-bar,
.aiteacher .ait-rail .ait-bar {
	flex: none;
	width: 100%;
	height: 4px;
	margin-top: 0.35rem;
}

.aiteacher .ait-island-actions,
.aiteacher .ait-rail-actions {
	display: flex;
	gap: 0.5rem;
}

.aiteacher .ait-island-actions > .ait-btn,
.aiteacher .ait-rail-actions > .ait-btn {
	flex: 1 1 0;
	min-height: 48px;
}

.aiteacher .ait-end {
	box-shadow: inset 0 0 0 1.5px var(--ink);
}

.aiteacher .ait-doc-icon {
	flex: 0 0 auto;
}

/* ---------- the Side Rail (computers, 1024 pixels and wider) ---------- */
.aiteacher .ait-rail {
	display: none;
}

/* Task 5.1c (Umer, 9 November 2026: on computers, then "Yes, phones too"): the dock is at the very bottom of the
   window from the start of the session and never moves. The conversation column is as tall as the window, the dock
   sits at its foot, and a long conversation scrolls above it (the dock stays pinned there as before). On phones and
   tablets the column starts under the app's top padding (0.9rem), the main area's margin (1.75rem), the island (3rem)
   and the gap after it (1rem); computers set their own height below. */
.aiteacher[data-screen="talk"] {
	padding-bottom: 0;
}

.aiteacher [data-screen="talk"] .ait-chat {
	min-height: calc(100vh - 6.65rem);
	min-height: calc(100dvh - 6.65rem);
}

.aiteacher [data-screen="talk"] .ait-chat > .ait-composer {
	margin-top: auto;
}

/* In a lesson on a phone the compact task card stays just above the dock. */
.aiteacher [data-screen="talk"] .ait-chat > .ait-task:not([hidden]) {
	margin-top: auto;
}

.aiteacher [data-screen="talk"] .ait-chat > .ait-task:not([hidden]) + .ait-composer {
	margin-top: 0;
}

@media (min-width: 1024px) {
	.aiteacher[data-screen="talk"] {
		max-width: 1180px;
	}

	.aiteacher [data-screen="talk"].ait-screen {
		display: grid;
		grid-template-columns: 300px minmax(0, 1fr);
		align-items: start;
		column-gap: 2rem;
	}

	.aiteacher .ait-island {
		display: none;
	}

	/* Task 5.1c: the rail stays where it starts (below the app's top padding and the main area's margin) and ends 1rem
	   above the window's bottom, so it neither moves when the conversation scrolls nor makes a short one scroll. */
	.aiteacher .ait-rail {
		position: sticky;
		top: 2.65rem;
		display: flex;
		flex-direction: column;
		gap: 0.75rem;
		height: calc(100vh - 3.65rem);
		height: calc(100dvh - 3.65rem);
	}

	.aiteacher .ait-chat {
		padding-top: 0.25rem;
	}

	/* Task 5.1c on computers: the column starts under the app's top padding (0.9rem) and the main area's top margin
	   (1.75rem); there is no island above it. */
	.aiteacher [data-screen="talk"] .ait-chat {
		min-height: calc(100vh - 2.65rem);
		min-height: calc(100dvh - 2.65rem);
	}
}

.aiteacher .ait-rail-brand {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem;
	padding: 0.5rem 0.5rem 0.5rem 1rem;
	border-radius: var(--r-pill);
	background: var(--glass);
	box-shadow:
		inset 0 1px 0 var(--highlight),
		0 0 0 1px var(--hairline),
		0 0 0 var(--bezel-gap) var(--bezel),
		0 0 0 calc(var(--bezel-gap) + 1px) var(--hairline-out),
		var(--shadow-sm);
}

.aiteacher .ait-rail-brand .ait-logo {
	width: 124px;
}

.aiteacher .ait-rail-main {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 0.9rem;
	min-height: 0;
	margin-top: 0.4rem;
	padding: 1.1rem;
	overflow: hidden;
}

.aiteacher .ait-rail-oscar {
	display: flex;
	align-items: center;
	gap: 0.8rem;
}

.aiteacher .ait-rail-face {
	flex: 0 0 auto;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--orange-tint);
	box-shadow: 0 0 0 3px rgba(255, 77, 4, 0.18);
	object-fit: cover;
}

.aiteacher .ait-rail-who {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.aiteacher .ait-rail-state {
	min-height: 1.2em;
	color: var(--orange-ink);
	font-size: 0.68rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.aiteacher .ait-rail-name {
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1.25;
}

.aiteacher .ait-rail-lesson {
	display: flex;
	flex-direction: column;
}

.aiteacher .ait-rail-where {
	color: var(--ink-soft);
	font-size: 0.82rem;
	font-weight: 600;
}

.aiteacher .ait-rail-sections {
	display: flex;
	gap: 4px;
	margin-top: 0.45rem;
}

.aiteacher .ait-rail-sections i {
	flex: 1 1 0;
	height: 5px;
	border-radius: 3px;
	background: rgba(33, 41, 50, 0.1);
}

.aiteacher .ait-rail-sections i.is-done {
	background: var(--brand-orange);
}

.aiteacher .ait-rail-sections i.is-now {
	background: linear-gradient(90deg, var(--brand-orange) 45%, rgba(33, 41, 50, 0.1) 45%);
}

.aiteacher .ait-rail-time {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	padding: 0.75rem 0.9rem;
	border-radius: var(--r-lg);
	background: var(--surface-sunk);
}

.aiteacher .ait-ring.ait-ring-big {
	width: 64px;
	height: 64px;
}

.aiteacher .ait-ring-big b {
	margin-top: -7px;
	font-size: 19px;
}

.aiteacher .ait-ring-big i {
	bottom: 13px;
	font-size: 8px;
}

.aiteacher .ait-rail-time-text {
	display: flex;
	flex-direction: column;
	color: var(--ink-soft);
	font-size: 0.82rem;
	font-weight: 600;
}

.aiteacher .ait-rail-time-text strong {
	color: var(--ink);
	font-size: 1.05rem;
	font-weight: 800;
}

/* Only the task scrolls inside the rail, so Lesson PDF and End stay in sight on a short screen. */
.aiteacher .ait-rail-task {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
}

.aiteacher .ait-rail-task:empty {
	visibility: hidden;
}

.aiteacher .ait-rail-task .ait-task {
	margin: 0;
	background: var(--surface-sunk);
	box-shadow: none;
}

.aiteacher .ait-rail-actions {
	flex: none;
	margin-top: auto;
}

/* ---------- the compact task card (phones) ---------- */
.aiteacher .ait-task-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	width: 100%;
	min-height: 28px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	text-transform: none;
	cursor: pointer;
}

.aiteacher .ait-task-head .ait-task-where {
	min-width: 0;
}

.aiteacher .ait-task-chev {
	flex: 0 0 auto;
	color: var(--ink-soft);
	transition: transform var(--dur) var(--ease);
}

.aiteacher .ait-task:not(.is-compact) .ait-task-chev {
	transform: rotate(180deg);
}

@media (max-width: 1023px) {
	.aiteacher .ait-task.is-compact {
		padding-top: 0.7rem;
		padding-bottom: 0.7rem;
	}

	.aiteacher .ait-task.is-compact .ait-task-instruction,
	.aiteacher .ait-task.is-compact .ait-task-text,
	.aiteacher .ait-task.is-compact .ait-task-box,
	.aiteacher .ait-task.is-compact .ait-task-options,
	.aiteacher .ait-task.is-compact .ait-task-page {
		display: none !important;
	}

	/* The buttons row stays only when it holds more than the page chip (Watch, I have finished). */
	.aiteacher .ait-task.is-compact .ait-task-actions:not(:has( > :not([hidden]):not(.ait-task-page) )) {
		display: none;
	}

	.aiteacher .ait-task.is-compact .ait-task-item:not([hidden]) {
		display: -webkit-box;
		margin-top: 0.2rem;
		overflow: hidden;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
	}
}

@media (min-width: 1024px) {
	.aiteacher .ait-task-head {
		cursor: default;
	}

	.aiteacher .ait-task-chev {
		display: none;
	}
}

/* ---------- the compact dock ---------- */
.aiteacher .ait-composer {
	gap: 0.4rem;
	padding-top: 0.9rem;
	background: linear-gradient(to bottom, rgba(244, 243, 241, 0), var(--ground) 1.4rem);
}

.aiteacher .ait-dock {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	grid-template-areas: "mode voice help";
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.5rem 1.45rem;
	border-radius: 1.6rem;
	background: var(--glass);
	-webkit-backdrop-filter: blur(20px) saturate(1.6);
	backdrop-filter: blur(20px) saturate(1.6);
	box-shadow:
		inset 0 1px 0 var(--highlight),
		0 0 0 1px var(--hairline),
		0 0 0 5px var(--bezel),
		0 0 0 6px var(--hairline-out),
		var(--shadow);
}

.aiteacher .ait-composer.is-text .ait-dock {
	grid-template-areas: "mode . help" "text text text";
	padding-bottom: 0.5rem;
}

.aiteacher .ait-dock .ait-mode {
	grid-area: mode;
	justify-self: start;
	gap: 0.1rem;
	padding: 0.2rem;
}

.aiteacher .ait-dock .ait-mode-btn {
	min-width: 0;
	min-height: 40px;
	padding: 0 0.75rem;
	font-size: 0.82rem;
}

.aiteacher .ait-dock .ait-voice {
	position: relative;
	grid-area: voice;
	padding: 0;
}

.aiteacher .ait-dock .ait-mic {
	width: 64px;
	height: 64px;
	box-shadow: 0 0 0 6px var(--orange-wash), 0 10px 22px -8px rgba(255, 77, 4, 0.55);
}

.aiteacher.ait-kids .ait-dock .ait-mic {
	width: 72px;
	height: 72px;
}

.aiteacher .ait-dock .ait-mic svg {
	width: 28px;
	height: 28px;
}

/* Hold to speak, and the recording seconds: small, just under the microphone. */
.aiteacher .ait-dock .ait-mic-status {
	position: absolute;
	top: calc(100% + 0.3rem);
	left: 50%;
	width: max-content;
	max-width: 70vw;
	min-height: 0;
	overflow: hidden;
	font-size: 0.74rem;
	line-height: 1.2;
	text-overflow: ellipsis;
	white-space: nowrap;
	transform: translateX(-50%);
}

.aiteacher .ait-dock .ait-help {
	grid-area: help;
	justify-self: end;
	min-height: 40px;
	padding: 0.35rem 0.85rem;
	border-radius: var(--r-pill);
	background: var(--pl-wash);
	color: var(--pl-blue);
	font-size: 0.8rem;
	font-weight: 800;
	line-height: 1.15;
	text-align: center;
	white-space: normal;
}

.aiteacher .ait-dock .ait-composer-row {
	grid-area: text;
}

/* The smallest phones (under 360 pixels): Voice / Text and Pomoc po polsku on one row, the microphone centred below. */
@media (max-width: 359px) {
	.aiteacher .ait-composer:not(.is-text) .ait-dock {
		grid-template-columns: auto minmax(0, 1fr);
		grid-template-areas: "mode help" "voice voice";
	}

	.aiteacher .ait-composer:not(.is-text) .ait-dock .ait-voice {
		justify-self: center;
	}
}

/* In the dock the text box keeps its placeholder on one line on a phone. */
.aiteacher .ait-dock .ait-say {
	padding-right: 0.85rem;
	padding-left: 0.85rem;
	font-size: 16px;
}

.aiteacher .ait-dock .ait-say::placeholder {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.aiteacher .ait-dock .ait-send {
	min-width: 0;
	padding-right: 1.15rem;
	padding-left: 1.15rem;
}

/* 'Skip Oscar's voice' just above the microphone, centred on the dock, the same place on every screen (Umer, 9 November
   2026). It is part of the dock area, so the conversation makes room for it; over the conversation's fade it has a
   light pill of its own to stay readable; the words and the stop sign are unchanged. */
.aiteacher .ait-composer > .ait-skip {
	align-self: center;
	margin: 0 0 0.15rem;
	white-space: nowrap;
	background: var(--glass);
	-webkit-backdrop-filter: blur(16px) saturate(1.5);
	backdrop-filter: blur(16px) saturate(1.5);
	box-shadow: 0 0 0 1px var(--hairline), var(--shadow-sm);
}

.aiteacher .ait-new-msg {
	position: absolute;
	bottom: calc(100% + 0.25rem);
	left: 50%;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	min-height: 40px;
	margin: 0;
	padding: 0 1rem;
	border: 0;
	border-radius: var(--r-pill);
	background: var(--charcoal);
	color: #FFFFFF;
	font-family: var(--font);
	font-size: 0.82rem;
	font-weight: 800;
	box-shadow: var(--shadow);
	transform: translateX(-50%);
	cursor: pointer;
}

/* Oscar's face beside a long message stays in view just above the dock. */
.aiteacher .ait-avatar {
	bottom: calc(var(--ait-dock-h, 0px) + 0.5rem);
}

/* ---------- a correction card without the repeat: the changed words highlighted ---------- */
.aiteacher .ait-correction-better {
	margin-top: 0 !important;
}

.aiteacher .ait-correction-better mark {
	padding: 0 0.15em;
	border-radius: 4px;
	background: var(--orange-wash);
	color: var(--orange-ink);
}

/* ---------- one turn of Oscar reads as one block ---------- */
.aiteacher .ait-oscar-body > .ait-bubble + .ait-bubble {
	margin-top: calc(4px - 0.55rem);
	border-top-left-radius: var(--r-sm);
}

/* ---------- End the session? as a sheet from the bottom ---------- */
.aiteacher .ait-sheet-backdrop {
	position: fixed;
	inset: 0;
	z-index: 60;
	background: rgba(33, 41, 50, 0.35);
	animation: ait-fade var(--dur-fast) var(--ease) both;
}

.aiteacher .ait-sheet {
	position: fixed;
	bottom: 0;
	left: 50%;
	z-index: 61;
	width: min(560px, 100%);
	margin: 0;
	padding: 1.5rem 1.25rem max(1.25rem, env(safe-area-inset-bottom));
	border-radius: 1.6rem 1.6rem 0 0;
	background: var(--surface);
	box-shadow: 0 -20px 60px -20px rgba(33, 41, 50, 0.35);
	text-align: center;
	transform: translateX(-50%);
	animation: ait-sheet-up 0.45s var(--ease) both;
}

.aiteacher .ait-sheet::before {
	content: "";
	display: block;
	width: 40px;
	height: 4px;
	margin: -0.6rem auto 1rem;
	border-radius: 2px;
	background: var(--line-strong);
}

.aiteacher .ait-sheet p {
	margin: 0 0 1rem;
	font-size: 1.15rem;
	font-weight: 800;
}

.aiteacher .ait-sheet .ait-confirm-buttons {
	flex-direction: column;
	gap: 0.4rem;
}

.aiteacher .ait-sheet .ait-confirm-buttons .ait-btn {
	width: 100%;
}

@keyframes ait-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes ait-sheet-up {
	from { transform: translate(-50%, 100%); }
	to { transform: translate(-50%, 0); }
}

/* Less motion: the time ring keeps a still orange halo in the last two minutes; the island dot does not pulse. */
@media (prefers-reduced-motion: reduce) {
	.aiteacher.ait-time-low .ait-ring::after {
		animation: none !important;
		opacity: 0.6;
		transform: none;
	}

	.aiteacher .ait-island-dot.is-speaking,
	.aiteacher .ait-sheet,
	.aiteacher .ait-sheet-backdrop {
		animation: none !important;
	}
}

/* Cloudflare Turnstile on the trial form (task 5.1j): takes no room unless Cloudflare shows its box. */
.aiteacher .ait-ts:empty { display: none; }
.aiteacher .ait-ts { max-width: 100%; overflow: hidden; }

/* The start screen's link to the Oscar page (task 5.1l): no sign-up in the app. */
.aiteacher .ait-access-note {
	margin: 0.25rem 0 0;
	font-size: 0.92rem;
	line-height: 1.5;
	color: var(--ink-soft, #5E5A58);
	text-align: center;
}

.aiteacher .ait-access-note .ait-link {
	font-weight: 700;
	white-space: nowrap;
}
