/* Deployment timestamp: 2026-07-11 12:00:00 */
/* IB Exam Platform – app styles, "Soft Brights" design system.
   Design tokens (--bg, --card, --coral, …) come from the companion
   theme (light + html.dark); the fallbacks keep the apps usable in
   any theme. */

.ibep-app {
	--ibep-bg: var(--bg, #fdf6ef);
	--ibep-surface: var(--card, #ffffff);
	--ibep-border: var(--border, #ece4da);
	--ibep-chip: var(--chip, #f2e8dc);
	--ibep-text: var(--ink, #232a4d);
	--ibep-text-soft: var(--ink-soft, #6c6759);
	--ibep-muted: var(--muted, #8b8577);
	--ibep-navy: var(--navy, #232a4d);
	--ibep-navy-muted: var(--navy-muted, #aeb3cf);
	--ibep-primary: var(--coral, #ff5a3c);
	--ibep-primary-dark: var(--coral-dark, #d63f24);
	--ibep-primary-ink: var(--coral-ink, #fff6ef);
	--ibep-accent: var(--yellow, #ffd66e);
	--ibep-success: #3aa76d;
	--ibep-danger: var(--coral, #ff5a3c);
	--ibep-font-display: var(--font-display, 'Gabarito', sans-serif);
	/* Shared component scale (theme tokens, with standalone fallbacks) */
	--ibep-r-pill: var(--r-pill, 999px);
	--ibep-r-card: var(--r-card, 24px);
	--ibep-r-panel: var(--r-panel, 18px);
	--ibep-r-control: var(--r-control, 12px);
	--ibep-r-micro: var(--r-micro, 8px);
	--ibep-press: var(--press, 0 5px 0 var(--ibep-primary-dark));
	--ibep-press-down: var(--press-down, 0 2px 0 var(--ibep-primary-dark));
	--ibep-press-ink: var(--press-ink, 0 5px 0 #0b0e20);
	--ibep-press-ink-down: var(--press-ink-down, 0 2px 0 #0b0e20);
	--ibep-navy-face: var(--navy-face, linear-gradient(180deg, color-mix(in srgb, var(--ibep-navy) 82%, #fff) 0%, var(--ibep-navy) 55%));
	--ibep-shadow-card: var(--shadow-card, 0 10px 24px rgba(35, 42, 77, 0.06));
	--ibep-shadow-float: var(--shadow-float, 0 14px 30px -18px rgba(35, 42, 77, 0.5));
	max-width: 520px;
	margin: 0 auto;
	color: var(--ibep-text);
	font-size: 1rem;
	line-height: 1.5;
}

.ibep-app h2, .ibep-app h3 {
	font-family: var(--ibep-font-display);
	font-weight: 800;
	letter-spacing: -0.01em;
}

.ibep-stage { display: flex; flex-direction: column; gap: 1rem; }

.ibep-card {
	background: var(--ibep-surface);
	border: 1px solid var(--ibep-border);
	border-radius: var(--ibep-r-card, 24px);
	box-shadow: var(--ibep-shadow-card);
	padding: 1.6rem 1.5rem;
	transition: border-color 0.2s ease;
}

.ibep-swipe-card { touch-action: pan-y; user-select: none; cursor: grab; }
.ibep-swipe-card:active { cursor: grabbing; }

.ibep-prompt {
	font-family: var(--ibep-font-display);
	font-size: 1.3rem;
	font-weight: 700;
	line-height: 1.4;
	margin-bottom: 0.75rem;
}
.ibep-body { margin-bottom: 0.75rem; }
.ibep-muted { color: var(--ibep-muted); font-size: 0.9rem; }

.ibep-actions { display: flex; flex-direction: column; gap: 0.6rem; }
.ibep-tf-row { display: flex; gap: 0.75rem; }
.ibep-tf-row .ibep-option { flex: 1; }

.ibep-option {
	display: block;
	/* Buttons get border-box from the UA stylesheet, <a> does not — and this
	   class is used on both. Without it every link-button overflows its card
	   by padding + border on each side. */
	box-sizing: border-box;
	width: 100%;
	padding: 0.9rem 1.1rem;
	border: 2px solid var(--ibep-border);
	border-radius: var(--ibep-r-panel, 18px);
	background: var(--ibep-surface);
	color: var(--ibep-text);
	font: inherit;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s, transform 0.1s, box-shadow 0.1s;
}
.ibep-option:hover { border-color: var(--ibep-primary); }

/* "True" answer = chunky coral button with 3D press (prototype btn-true). */
.ibep-option.ibep-true {
	background: var(--ibep-primary);
	border-color: var(--ibep-primary);
	color: var(--ibep-primary-ink);
	font-weight: 700;
	box-shadow: var(--ibep-press);
}
.ibep-option.ibep-true:hover { filter: brightness(1.05); }
.ibep-option.ibep-true:active { transform: translateY(3px); box-shadow: var(--ibep-press-down); }
.ibep-option.ibep-false:hover { border-color: var(--ibep-navy); }

.ibep-option.ibep-submit,
.ibep-option.ibep-buy,
.ibep-option.ibep-primary-action {
	background: var(--ibep-primary);
	border-color: var(--ibep-primary);
	color: var(--ibep-primary-ink);
	font-weight: 700;
	border-radius: var(--ibep-r-pill, 999px);
	box-shadow: var(--ibep-press);
}
.ibep-option.ibep-submit:hover,
.ibep-option.ibep-buy:hover,
.ibep-option.ibep-primary-action:hover { filter: brightness(1.05); border-color: var(--ibep-primary); }
.ibep-option.ibep-submit:active,
.ibep-option.ibep-buy:active,
.ibep-option.ibep-primary-action:active { transform: translateY(3px); box-shadow: var(--ibep-press-down); }
.ibep-option.ibep-locked { opacity: 0.85; }
.ibep-option:disabled { opacity: 0.6; cursor: wait; }

.ibep-radio { display: flex; align-items: center; gap: 0.5rem; text-align: left; }
.ibep-radio.is-selected { border-color: var(--ibep-primary); background: rgba(255, 90, 60, 0.06); }

.ibep-input {
	width: 100%;
	padding: 0.8rem 1rem;
	border: 1px solid var(--ibep-border);
	border-radius: var(--ibep-r-control, 12px);
	background: var(--ibep-bg);
	color: var(--ibep-text);
	font: inherit;
}
.ibep-input:focus { border-color: var(--ibep-primary); outline: none; }
.ibep-textarea { resize: vertical; }
select.ibep-input { border-radius: var(--ibep-r-pill, 999px); }

.ibep-option.is-selected {
	border-color: var(--ibep-primary);
	background: rgba(255, 90, 60, 0.06);
}
.ibep-option.ibep-muted-action {
	background: transparent;
	border-style: dashed;
	color: var(--ibep-muted);
	font-weight: 500;
}

/* Explanation / flashcard-back chip box (prototype .explanation) */
.ibep-explain, .ibep-flashcard-answer {
	margin: 0 0 0.85rem;
	padding: 0.9rem 1.1rem;
	border-radius: var(--ibep-r-panel, 18px);
	background: var(--ibep-chip);
	color: var(--ibep-text-soft);
	font-size: 0.9rem;
	line-height: 1.5;
}
.ibep-explain p { margin: 0 0 0.5rem; }
.ibep-explain p:last-child { margin-bottom: 0; }
.ibep-explain .ibep-option { margin-top: 0.75rem; }
.ibep-explain-answer { font-weight: 700; color: var(--ibep-text); }

/* ---------- Session chrome (prototype learn.html) ---------- */
.ibep-session-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem;
}
.ibep-back {
	border: none;
	background: none;
	padding: 0;
	font: inherit;
	font-size: 0.9rem;
	color: var(--ibep-muted);
	cursor: pointer;
}
.ibep-back:hover { color: var(--ibep-primary); }
.ibep-count-badge {
	background: var(--ibep-accent);
	color: var(--on-yellow, #232a4d);
	font-size: 0.8rem;
	font-weight: 700;
	padding: 0.3rem 0.75rem;
	border-radius: var(--ibep-r-pill, 999px);
}
.ibep-kicker {
	font-size: 0.72rem;
	font-weight: 800;
	color: var(--ibep-primary);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 0.75rem;
}
.ibep-swipe-card.is-correct { border: 2px solid var(--ibep-success); }
.ibep-swipe-card.is-wrong { border: 2px solid var(--ibep-primary); animation: ibep-shake 0.3s; }
@keyframes ibep-shake {
	25% { transform: translateX(-6px); }
	50% { transform: translateX(6px); }
	75% { transform: translateX(-3px); }
}
.ibep-hint {
	text-align: center;
	font-size: 0.85rem;
	color: var(--ibep-muted);
	min-height: 1.25rem;
}
.ibep-hint.is-gain { color: var(--ibep-success); font-weight: 700; }
.ibep-hint.is-loss { color: var(--ibep-primary); font-weight: 700; }

/* ---------- Subject picker (prototype subjects.html) ---------- */
.ibep-picker h2 { margin-bottom: 0.75rem; }
.ibep-subject-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.75rem; }
.ibep-subject-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	padding: 0.85rem 1rem;
	border: 1px solid var(--ibep-border);
	border-radius: var(--ibep-r-panel, 18px);
	background: var(--ibep-surface);
	color: var(--ibep-text);
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.15s;
}
.ibep-subject-item:hover { border-color: var(--ibep-primary); }
.ibep-sub-icon {
	width: 34px;
	height: 34px;
	border-radius: var(--ibep-r-control, 12px);
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--ibep-font-display);
	font-weight: 800;
	font-size: 0.85rem;
}
.ibep-sub-icon.is-yellow { background: var(--ibep-accent); color: var(--on-yellow, #232a4d); }
.ibep-sub-icon.is-coral { background: var(--ibep-primary); color: var(--ibep-primary-ink); }
.ibep-sub-icon.is-navy { background: var(--ibep-navy); color: var(--ibep-primary-ink); }
.ibep-sub-name { flex: 1; font-weight: 600; font-size: 0.95rem; }
.ibep-sub-arrow { color: var(--ibep-muted); font-weight: 700; }

/* Subject row = quick-start button + advanced-filter gear */
.ibep-subject-row { display: flex; align-items: stretch; gap: 0.4rem; }
.ibep-subject-row .ibep-subject-item { flex: 1; }
.ibep-subject-filter {
	flex-shrink: 0;
	width: 46px;
	border: 1px solid var(--ibep-border);
	border-radius: var(--ibep-r-panel, 18px);
	background: var(--ibep-surface);
	color: var(--ibep-muted);
	font-size: 1.15rem;
	line-height: 1;
	cursor: pointer;
	transition: border-color 0.15s, color 0.15s;
}
.ibep-subject-filter:hover { border-color: var(--ibep-primary); color: var(--ibep-primary); }

/* Advanced filter: syllabus tree with card counts */
.ibep-filter h2 { margin-top: 0.5rem; }
.ibep-tax-tree { display: flex; flex-direction: column; gap: 0.3rem; margin-top: 0.75rem; }
.ibep-tax-unit { border: 1px solid var(--ibep-border); border-radius: var(--ibep-r-control, 12px); overflow: hidden; }
.ibep-tax-row { display: flex; align-items: center; gap: 0.4rem; background: var(--ibep-surface); }
.ibep-tax-toggle {
	flex-shrink: 0;
	width: 34px;
	align-self: stretch;
	border: none;
	background: transparent;
	color: var(--ibep-muted);
	font-size: 0.8rem;
	cursor: pointer;
}
.ibep-tax-label {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.7rem 0.9rem 0.7rem 0;
	border: none;
	background: transparent;
	color: var(--ibep-text);
	font: inherit;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
}
.ibep-tax-topics { border-top: 1px solid var(--ibep-border); background: var(--ibep-bg, transparent); }
.ibep-tax-topic {
	width: 100%;
	padding: 0.6rem 0.9rem 0.6rem 1.9rem;
	border: none;
	border-top: 1px solid var(--ibep-border);
	background: transparent;
	color: var(--ibep-text);
	font: inherit;
	font-size: 0.9rem;
	text-align: left;
	cursor: pointer;
	justify-content: space-between;
}
.ibep-tax-topic:first-child { border-top: none; }
.ibep-tax-label:hover:not(:disabled) .ibep-tax-name,
.ibep-tax-topic:hover:not(:disabled) .ibep-tax-name { color: var(--ibep-primary); }
.ibep-tax-name { display: inline-flex; align-items: center; gap: 0.4rem; }
.ibep-tax-count { color: var(--ibep-muted); font-weight: 600; font-size: 0.85rem; flex-shrink: 0; }
.ibep-tax-level {
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	padding: 0.05rem 0.35rem;
	border-radius: var(--ibep-r-pill, 999px);
	background: var(--ibep-border);
	color: var(--ibep-muted);
}
.ibep-tax-row.is-empty { opacity: 0.45; }
.ibep-tax-row.is-empty .ibep-tax-label,
.ibep-tax-topic.is-empty { cursor: default; }
.ibep-tax-topic:disabled { opacity: 0.45; cursor: default; }

.ibep-chip-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.ibep-chip {
	border: 1px solid var(--ibep-border);
	background: var(--ibep-surface);
	color: var(--ibep-text);
	border-radius: var(--ibep-r-pill, 999px);
	padding: 0.55rem 0.9rem;
	font: inherit;
	font-size: 0.85rem;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
}
.ibep-chip:hover { border-color: var(--ibep-primary); }
.ibep-chip.is-active {
	background: var(--ibep-navy);
	border-color: var(--ibep-navy);
	color: var(--ibep-primary-ink);
	font-weight: 700;
}

/* ---------- Dashboard greeting + goal ring (prototype practice.html) ---------- */
.ibep-greeting h1 {
	font-family: var(--ibep-font-display);
	font-size: 1.7rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	margin: 0;
}
.ibep-goal-card {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1.1rem 1.2rem;
}
.ibep-ring {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.ibep-ring > div {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--ibep-surface);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--ibep-font-display);
	font-weight: 800;
	font-size: 1rem;
}
.ibep-goal-title { font-weight: 600; font-size: 0.95rem; }
.ibep-goal-card .ibep-muted { font-size: 0.85rem; margin-top: 2px; }
.ibep-stat-num.ibep-coral { color: var(--ibep-primary); }
.ibep-passes h3 { margin-top: 0; }

/* ---------- Progress page (prediction, weak topics) ---------- */
.ibep-predict h3, .ibep-weak h3 { margin-top: 0; }
.ibep-predict-points { margin: 0.25rem 0 0.35rem; }
.ibep-predict-num {
	font-family: var(--ibep-font-display);
	font-size: 2.4rem;
	font-weight: 800;
	color: var(--ibep-primary);
}
.ibep-predict-max { font-family: var(--ibep-font-display); font-weight: 800; color: var(--ibep-muted); }
.ibep-predict .ibep-muted { font-size: 0.8rem; }
.ibep-weak-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 0.5rem 0;
	border-top: 1px solid var(--ibep-border);
}
.ibep-weak-row:first-of-type { border-top: none; padding-top: 0; }
.ibep-weak-name { display: block; font-weight: 600; }
.ibep-weak-row .ibep-muted { font-size: 0.8rem; }
.ibep-weak-go {
	flex: none;
	background: var(--ibep-navy);
	color: var(--ibep-primary-ink);
	font-weight: 700;
	font-size: 0.85rem;
	padding: 0.45rem 1rem;
	border-radius: var(--ibep-r-pill, 999px);
	text-decoration: none;
}
.ibep-weak-go:hover { color: var(--ibep-primary-ink); filter: brightness(1.15); }

.ibep-progressbar { height: 8px; border-radius: 4px; background: var(--ibep-chip); overflow: hidden; }
.ibep-progressbar-fill { height: 100%; border-radius: 4px; background: var(--ibep-primary); transition: width 0.3s ease; }

.ibep-feedback {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	max-width: 520px;
	margin: 0 auto;
	background: var(--ibep-surface);
	border: 1px solid var(--ibep-border);
	border-bottom: none;
	border-top-left-radius: var(--ibep-r-card, 24px);
	border-top-right-radius: var(--ibep-r-card, 24px);
	box-shadow: 0 -10px 32px rgba(35, 42, 77, 0.14);
	padding: 1.25rem 1.5rem;
	border-top: 4px solid var(--ibep-success);
	z-index: 40;
}
.ibep-feedback.is-wrong { border-top-color: var(--ibep-primary); }
.ibep-feedback strong { font-family: var(--ibep-font-display); font-size: 1.1rem; }

.ibep-exam-bar {
	position: sticky;
	top: 0;
	z-index: 30;
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: var(--ibep-navy);
	color: var(--ibep-navy-muted);
	border: none;
	border-radius: var(--ibep-r-panel, 18px);
	padding: 0.7rem 1rem;
}
.ibep-timer {
	background: var(--ibep-primary);
	color: var(--ibep-primary-ink);
	font-family: var(--ibep-font-display);
	font-variant-numeric: tabular-nums;
	font-weight: 800;
	font-size: 1.1rem;
	padding: 0.4rem 0.85rem;
	border-radius: var(--ibep-r-control, 12px);
}
.ibep-timer.is-low { background: var(--ibep-primary-dark); animation: ibep-pulse 1s infinite; }
@keyframes ibep-pulse { 50% { opacity: 0.7; } }

/* Exam prompts are long-form text – keep them in the body font. */
.ibep-exam-mode .ibep-prompt {
	font-family: inherit;
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.55;
}
/* Exam workspace: wide enough for structured papers, narrow enough that essay
   lines stay a comfortable writing measure (~65 chars). */
.ibep-app:has(.ibep-exam-mode) { max-width: 640px; }

.ibep-section-title { margin: 1rem 0 0.25rem; }
.ibep-q-head { display: flex; justify-content: space-between; gap: 1rem; }
.ibep-points {
	background: var(--ibep-accent);
	color: var(--on-yellow, #232a4d);
	font-size: 0.8rem;
	font-weight: 700;
	padding: 0.25rem 0.7rem;
	border-radius: var(--ibep-r-pill, 999px);
	white-space: nowrap;
	align-self: flex-start;
}
.ibep-exam-item { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.ibep-exam-item .ibep-option { width: auto; border-radius: var(--ibep-r-pill, 999px); padding: 0.55rem 1.2rem; font-size: 0.9rem; }
.ibep-exam-item h3 { font-size: 1.05rem; }

.ibep-grade {
	width: 64px; height: 64px;
	display: flex; align-items: center; justify-content: center;
	border-radius: 50%;
	background: var(--ibep-primary);
	color: var(--ibep-primary-ink);
	font-family: var(--ibep-font-display);
	font-size: 1.75rem; font-weight: 800;
	margin: 0.5rem 0;
}

/* Resume button on the exam list – there is a running attempt. */
.ibep-exam-item .ibep-continue {
	background: var(--ibep-accent);
	border-color: var(--ibep-accent);
	color: var(--on-yellow, #232a4d);
}

/* Small inline grade badge next to an exam title ("your last grade"). */
.ibep-grade-mini {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem; height: 1.5rem;
	margin-inline-start: 0.45rem;
	border-radius: 50%;
	background: var(--ibep-navy);
	color: var(--ibep-primary-ink);
	font-family: var(--ibep-font-display);
	font-size: 0.8rem; font-weight: 800;
	vertical-align: text-bottom;
}

/* ---------- Attempt history ("My exams" / recent results) ---------- */
.ibep-history { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.5rem; }
.ibep-history-title { margin: 0.5rem 0 0; }
.ibep-history-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.ibep-history-all { font-size: 0.85rem; font-weight: 700; color: var(--ibep-primary); text-decoration: none; white-space: nowrap; }
.ibep-history-all:hover { text-decoration: underline; }

/* Practice benchmark (progress page): stacked bar per subject. */
.ibep-bench h3 { margin-top: 0; }
.ibep-bench-row { padding: 0.7rem 0 0.5rem; border-top: 1px solid var(--ibep-border); }
.ibep-bench-row:first-of-type { border-top: none; padding-top: 0.25rem; }
.ibep-bench-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.ibep-bench-status { font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.ibep-bench-status.is-strong { color: var(--ibep-success); }
.ibep-bench-status.is-on-track { color: var(--ibep-text-soft); }
.ibep-bench-status.is-needs-work { color: var(--ibep-primary); }
.ibep-bench-status.is-coverage-gap { color: var(--on-yellow, #232a4d); background: var(--ibep-accent); padding: 0.15rem 0.6rem; border-radius: var(--ibep-r-pill, 999px); }
.ibep-bench-status.is-not-started { color: var(--ibep-muted); }
.ibep-bench-stats { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-size: 0.82rem; margin-top: 0.4rem; }
.ibep-bench-stat b { font-family: var(--ibep-font-display); font-weight: 800; }
.ibep-bench-stat b.ibep-coral { color: var(--ibep-primary); }
.ibep-bench-stat .ibep-muted { font-size: 0.78rem; }

/* ---------- Rankings (leaderboard + invite loop) ---------- */
.ibep-rank-period { margin-top: -0.35rem; }
.ibep-rank-board { padding: 0.6rem 1rem; }
.ibep-rank-row {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	padding: 0.55rem 0.25rem;
	border-top: 1px solid var(--ibep-border);
}
.ibep-rank-row:first-child { border-top: none; }
.ibep-rank-row.is-me {
	background: var(--ibep-chip);
	border-radius: var(--ibep-r-control, 12px);
	border-top: none;
	padding-inline: 0.6rem;
}
.ibep-rank-pos {
	flex: none;
	width: 2rem;
	text-align: center;
	font-family: var(--ibep-font-display);
	font-weight: 800;
}
.ibep-rank-avatar {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px; height: 34px;
	border-radius: 50%;
	background: var(--ibep-navy);
	color: var(--ibep-primary-ink);
	font-family: var(--ibep-font-display);
	font-weight: 800;
	font-size: 0.95rem;
}
.ibep-rank-row.is-me .ibep-rank-avatar { background: var(--ibep-primary); }
.ibep-rank-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ibep-rank-friend { color: var(--ibep-primary); }
.ibep-rank-city { color: var(--ibep-muted); font-weight: 400; font-size: 0.85em; }
.ibep-rank-profile h3 { margin-top: 0; }

/* City autocomplete (GeoNames registry) + Cloudflare one-tap suggestion. */
.ibep-city-suggest { margin-bottom: 0.6rem; text-align: start; }
.ibep-city-search { position: relative; margin-top: 0.4rem; }
.ibep-city-search .ibep-input { box-sizing: border-box; width: 100%; }
.ibep-city-search .ibep-invite-ok { display: inline-block; margin-top: 0.35rem; }
.ibep-city-results {
	margin-top: 0.4rem;
	border: 1px solid var(--ibep-border);
	border-radius: var(--ibep-r-control, 12px);
	overflow: hidden;
	background: var(--ibep-surface);
}
.ibep-city-results .ibep-muted { padding: 0.6rem 0.9rem; margin: 0; font-size: 0.85rem; }
.ibep-city-hit {
	display: block;
	width: 100%;
	text-align: start;
	padding: 0.55rem 0.9rem;
	background: none;
	border: none;
	border-top: 1px solid var(--ibep-border);
	font: inherit;
	color: inherit;
	cursor: pointer;
}
.ibep-city-hit:first-child { border-top: none; }
.ibep-city-hit:hover { background: var(--ibep-chip); }
.ibep-city-clear {
	margin-top: 0.5rem;
	background: none;
	border: none;
	color: var(--ibep-muted);
	font-size: 0.8rem;
	text-decoration: underline;
	cursor: pointer;
	padding: 0;
}
.ibep-rank-streak { font-size: 0.8rem; font-weight: 400; }
.ibep-rank-xp { flex: none; font-size: 0.82rem; color: var(--ibep-text-soft); font-variant-numeric: tabular-nums; }
.ibep-rank-gap { text-align: center; color: var(--ibep-muted); padding: 0.15rem 0; }
.ibep-rank-note { font-size: 0.8rem; }

.ibep-invite h3 { margin-top: 0; }
.ibep-invite-link, .ibep-invite-add { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.ibep-invite-link .ibep-input, .ibep-invite-add .ibep-input { flex: 1; min-width: 0; box-sizing: border-box; }
.ibep-invite-link .ibep-option, .ibep-invite-add .ibep-option { width: auto; white-space: nowrap; border-radius: var(--ibep-r-pill, 999px); padding: 0.55rem 1.1rem; font-size: 0.9rem; }
.ibep-invite-copy { background: var(--ibep-navy); border-color: var(--ibep-navy); color: var(--ibep-primary-ink); }
.ibep-invite-code { font-size: 0.8rem; margin: 0.4rem 0 0.8rem; }
.ibep-invite-ok { color: var(--ibep-success); font-weight: 600; font-size: 0.9rem; }

/* Reliability label ("how much can I trust this number?") + ⓘ tooltip. */
.ibep-reliability {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	font-size: 0.78rem;
	cursor: help;
	border-bottom: 1px dotted currentColor;
}
.ibep-reliability.is-high { color: var(--ibep-success); }
.ibep-reliability.is-medium { color: var(--ibep-text-soft); }
.ibep-reliability.is-low { color: var(--ibep-muted); }
.ibep-reliability-info { font-size: 0.85em; opacity: 0.8; }
.ibep-bar {
	display: flex;
	height: 12px;
	margin-top: 0.45rem;
	border-radius: var(--ibep-r-pill, 999px);
	overflow: hidden;
	background: var(--ibep-chip); /* shows through as "unseen" */
}
.ibep-bar-seg { display: block; height: 100%; min-width: 2px; }
.ibep-bar-seg.is-strong { background: var(--ibep-success); }
.ibep-bar-seg.is-building { background: var(--ibep-accent); }
.ibep-bar-seg.is-shaky { background: var(--ibep-primary); }
.ibep-bar-seg.is-unseen { background: var(--ibep-chip); min-width: 0; }
.ibep-bench-row .ibep-history-all { display: inline-block; margin-top: 0.3rem; }
.ibep-bench-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 1rem;
	font-size: 0.75rem;
	margin-top: 0.85rem;
}
.ibep-bench-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.ibep-legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.ibep-legend-dot.is-strong { background: var(--ibep-success); }
.ibep-legend-dot.is-building { background: var(--ibep-accent); }
.ibep-legend-dot.is-shaky { background: var(--ibep-primary); }
.ibep-legend-dot.is-unseen { background: var(--ibep-chip); border: 1px solid var(--ibep-border); }

/* Per-subject grade trend (progress page): chronological grade chips. */
.ibep-subject-trends h3 { margin-top: 0; }
.ibep-subject-trend { padding: 0.6rem 0; border-top: 1px solid var(--ibep-border); }
.ibep-subject-trend:first-of-type { border-top: none; padding-top: 0; }
.ibep-subject-trend-head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.ibep-subject-trend-head .ibep-muted { font-size: 0.8rem; white-space: nowrap; }
.ibep-trend-chips { display: inline-flex; gap: 0.3rem; margin-top: 0.4rem; }
.ibep-trend-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.6rem; height: 1.6rem;
	border-radius: 50%;
	background: var(--ibep-chip);
	color: var(--ibep-text-soft);
	font-family: var(--ibep-font-display);
	font-size: 0.85rem; font-weight: 700;
}
.ibep-trend-chip.is-latest { background: var(--ibep-primary); color: var(--ibep-primary-ink); }
.ibep-history-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	width: 100%;
	text-align: start;
	font: inherit;
	color: inherit;
	text-decoration: none; /* also used as an <a> on /progress/ */
	cursor: pointer;
}
.ibep-history-item:hover { border-color: var(--ibep-navy); }
.ibep-history-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ibep-history-main .ibep-muted { font-size: 0.82rem; }
.ibep-grade-badge {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px; height: 40px;
	border-radius: 50%;
	background: var(--ibep-primary);
	color: var(--ibep-primary-ink);
	font-family: var(--ibep-font-display);
	font-size: 1.15rem; font-weight: 800;
}
.ibep-grade-badge.is-empty { background: var(--ibep-chip); color: var(--ibep-muted); }

/* Push opt-in inside the "AI feedback pending" card. */
.ibep-push-btn { margin-bottom: 0.5rem; }
.ibep-push-state { margin: 0.25rem 0 0.5rem; }

.ibep-review.is-correct { border-inline-start: 4px solid var(--ibep-success); }
.ibep-review.is-wrong { border-inline-start: 4px solid var(--ibep-primary); }
.ibep-markscheme { white-space: pre-wrap; font-size: 0.85rem; background: var(--ibep-chip); color: var(--ibep-text-soft); padding: 0.85rem 1rem; border-radius: var(--ibep-r-control, 12px); }
.ibep-ai-feedback { margin-top: 0.75rem; padding: 0.85rem 1rem; border-radius: var(--ibep-r-control, 12px); background: var(--ibep-chip); color: var(--ibep-text-soft); }

/* ---------- Pricing (pass cards) ---------- */
.ibep-plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; align-items: stretch; }
.ibep-plan { display: flex; flex-direction: column; gap: 0.5rem; position: relative; padding: 1.6rem 1.5rem; }
.ibep-plan h3 { font-size: 1.05rem; }
.ibep-plan.is-featured {
	background: var(--ibep-navy);
	border: none;
	color: var(--ibep-primary-ink);
	box-shadow: var(--ibep-shadow-float);
}
.ibep-plan.is-featured .ibep-muted { color: var(--ibep-navy-muted); }
.ibep-plan.is-featured h3, .ibep-plan.is-featured .ibep-price { color: var(--ibep-primary-ink); }
.ibep-plan .ibep-buy { margin-top: auto; }
.ibep-plan:not(.is-featured) .ibep-buy {
	background: var(--ibep-navy-face);
	border-color: transparent; /* the face gradient paints under the border */
	box-shadow: var(--ibep-press-ink);
}
.ibep-plan:not(.is-featured) .ibep-buy:hover { filter: brightness(1.15); border-color: transparent; }
.ibep-plan:not(.is-featured) .ibep-buy:active { transform: translateY(3px); box-shadow: var(--ibep-press-ink-down); }
.ibep-badge {
	position: absolute;
	top: -0.8rem;
	left: 50%;
	transform: translateX(-50%);
	background: var(--ibep-accent);
	color: var(--on-yellow, #232a4d);
	padding: 0.3rem 0.9rem;
	border-radius: var(--ibep-r-pill, 999px);
	font-size: 0.75rem;
	font-weight: 700;
	white-space: nowrap;
}
.ibep-price { font-family: var(--ibep-font-display); font-size: 2.4rem; font-weight: 800; }
.ibep-plan.is-featured .ibep-price { font-size: 2.75rem; }
.ibep-disclaimer { margin-top: 1rem; }

/* Pricing spans wider than the app column. */
.ibep-app:has(.ibep-plan-grid) { max-width: 1100px; }

/* ---------- Dashboard stats ---------- */
.ibep-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.ibep-stat { text-align: center; padding: 0.9rem 1rem; border-radius: var(--ibep-r-panel, 18px); }
.ibep-stat-num { font-family: var(--ibep-font-display); font-size: 1.4rem; font-weight: 800; }
.ibep-stat .ibep-muted { font-size: 0.75rem; }

/* ---------- Word count (exam essays) ---------- */
.ibep-word-count {
	display: block;
	text-align: right;
	font-size: 0.75rem;
	color: var(--ibep-muted);
	margin-top: 0.35rem;
}
.ibep-word-count.is-ok { color: var(--ibep-success); font-weight: 700; }

/* Sketch canvas – uniform "+ Add sketch" on every free-text exam answer */
.ibep-sketch-toggle {
	display: inline-block;
	margin-top: 0.5rem;
	padding: 0.4rem 0.8rem;
	border: 1px dashed var(--ibep-border);
	border-radius: var(--ibep-r-control, 12px);
	background: transparent;
	color: var(--ibep-muted);
	font: inherit;
	font-size: 0.85rem;
	cursor: pointer;
	transition: color 0.15s, border-color 0.15s;
}
.ibep-sketch-toggle:hover { color: var(--ibep-primary); border-color: var(--ibep-primary); }
.ibep-sketch { margin-top: 0.6rem; }
.ibep-sketch-tools { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.ibep-sketch-tool {
	padding: 0.35rem 0.6rem;
	border: 1px solid var(--ibep-border);
	border-radius: var(--ibep-r-micro, 8px);
	background: var(--ibep-surface);
	color: var(--ibep-text);
	font: inherit;
	font-size: 0.8rem;
	cursor: pointer;
}
.ibep-sketch-tool.is-active { border-color: var(--ibep-primary); color: var(--ibep-primary); font-weight: 700; }
.ibep-sketch-tool:disabled { opacity: 0.4; cursor: default; }
.ibep-sketch-colors { display: inline-flex; gap: 0.3rem; margin: 0 0.25rem; }
.ibep-sketch-color {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 2px solid transparent;
	cursor: pointer;
	padding: 0;
}
.ibep-sketch-color.is-active { border-color: var(--ibep-accent); box-shadow: 0 0 0 2px var(--ibep-surface) inset; }
.ibep-sketch-wrap { position: relative; }
.ibep-sketch-canvas {
	width: 100%;
	aspect-ratio: 760 / 460;
	border: 1px solid var(--ibep-border);
	border-radius: var(--ibep-r-control, 12px);
	background: #fff;
	touch-action: none;
	display: block;
	cursor: crosshair;
}
.ibep-sketch-textinput {
	position: absolute;
	transform: translateY(-100%);
	max-width: 45%;
	padding: 0.2rem 0.4rem;
	border: 1px solid var(--ibep-primary);
	border-radius: var(--ibep-r-micro, 8px);
	font: inherit;
	font-size: 0.85rem;
	background: #fff;
	color: #232a4d;
}
.ibep-review-sketch {
	max-width: 100%;
	border: 1px solid var(--ibep-border);
	border-radius: var(--ibep-r-control, 12px);
	margin: 0.4rem 0;
	background: #fff;
}
.ibep-task.is-dimmed .ibep-sketch,
.ibep-task.is-dimmed .ibep-sketch-toggle { display: none; }

/* ---------- Question navigator pills ---------- */
.ibep-qnav {
	position: sticky;
	top: 3.4rem;
	z-index: 25;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	padding: 0.4rem 0;
	background: var(--ibep-bg);
}
.ibep-qnav-pill {
	min-width: 2rem;
	height: 2rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--ibep-border);
	border-radius: var(--ibep-r-pill, 999px);
	background: var(--ibep-surface);
	color: var(--ibep-text);
	font-size: 0.8rem;
	font-weight: 700;
	text-decoration: none;
}
.ibep-qnav-pill.is-answered { border-color: var(--ibep-navy); background: var(--ibep-navy); color: var(--ibep-primary-ink); }
.ibep-qnav-pill.is-correct { border-color: var(--ibep-success); color: var(--ibep-success); }
.ibep-qnav-pill.is-wrong { border-color: var(--ibep-primary); color: var(--ibep-primary); }

/* ---------- "Choose ONE task" sections ---------- */
.ibep-choose-hint { font-size: 0.9rem; color: var(--ibep-text-soft); margin: 0.25rem 0 0.75rem; }
.ibep-task { transition: opacity 0.15s ease; scroll-margin-top: 6rem; }
.ibep-task.is-selected > .ibep-card { border: 2px solid var(--ibep-primary); }
.ibep-task.is-dimmed { opacity: 0.55; cursor: pointer; }
.ibep-task.is-dimmed .ibep-actions,
.ibep-task.is-dimmed .ibep-dictate,
.ibep-task.is-dimmed .ibep-word-count { display: none; }
.ibep-task.is-dimmed:hover { opacity: 0.8; }

/* ---------- AI feedback pending ---------- */
.ibep-ai-pending { border-inline-start: 4px solid var(--ibep-accent); }
.ibep-ai-pending .ibep-option { margin-top: 0.5rem; }

/* ---------- Dashboard resume card (prototype continue-card) ---------- */
.ibep-resume-card {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	background: var(--ibep-navy);
	color: var(--ibep-primary-ink);
	border-radius: var(--ibep-r-card, 24px);
	padding: 1.1rem 1.2rem;
	text-decoration: none;
}
.ibep-resume-card:hover { color: var(--ibep-primary-ink); filter: brightness(1.1); }
.ibep-resume-title { font-family: var(--ibep-font-display); font-weight: 800; font-size: 1.05rem; }
.ibep-resume-meta { font-size: 0.85rem; color: var(--ibep-navy-muted); margin-top: 2px; }
.ibep-resume-go {
	background: var(--ibep-primary);
	color: var(--ibep-primary-ink);
	font-weight: 700;
	font-size: 0.85rem;
	padding: 0.5rem 1.1rem;
	border-radius: var(--ibep-r-pill, 999px);
	box-shadow: var(--ibep-press);
	flex-shrink: 0;
}

/* ---------- Subject picker badges ---------- */
.ibep-sub-text { flex: 1; display: flex; flex-direction: column; text-align: left; }
.ibep-sub-meta { font-size: 0.75rem; color: var(--ibep-muted); margin-top: 1px; }
.ibep-due-badge {
	background: var(--ibep-primary);
	color: var(--ibep-primary-ink);
	font-size: 0.75rem;
	font-weight: 700;
	padding: 0.3rem 0.75rem;
	border-radius: var(--ibep-r-pill, 999px);
	flex-shrink: 0;
}

/* ---------- Accessibility ---------- */
.ibep-app :focus-visible {
	outline: 3px solid var(--ibep-primary);
	outline-offset: 2px;
	border-radius: 4px;
}
.ibep-swipe-card:focus { outline: none; }
@media (prefers-reduced-motion: reduce) {
	.ibep-swipe-card, .ibep-progressbar-fill, .ibep-option, .ibep-task { transition: none !important; }
	.ibep-swipe-card.is-wrong { animation: none !important; }
	.ibep-timer.is-low { animation: none !important; }
}

.ibep-version-banner {
	position: fixed;
	top: 0;
	inset-inline: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	padding: 0.7rem 1rem;
	background: var(--navy, #232a4d);
	color: var(--coral-ink, #fff6ef);
	font-size: 0.9rem;
}
.ibep-version-banner button {
	border: none;
	border-radius: var(--ibep-r-pill, 999px);
	padding: 0.4rem 1rem;
	background: var(--coral, #ff5a3c);
	color: var(--coral-ink, #fff6ef);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.ibep-error { border-inline-start: 4px solid var(--ibep-primary); }
.ibep-done { text-align: center; display: flex; flex-direction: column; gap: 0.75rem; }
.ibep-done h2 { font-size: 1.8rem; margin: 0; }
.ibep-done p { margin: 0; }

@media (max-width: 600px) {
	.ibep-stat-grid { grid-template-columns: repeat(3, 1fr); }
	.ibep-exam-item { flex-direction: column; align-items: stretch; }
	.ibep-exam-item .ibep-option { width: 100%; }
}

/* Read-aloud (browser text-to-speech) button */
.ibep-prompt-row { display: flex; align-items: flex-start; gap: 0.5rem; }
.ibep-prompt-row .ibep-prompt { flex: 1; }
.ibep-speak {
	flex: none;
	border: 1px solid var(--ibep-border);
	background: var(--ibep-surface);
	color: var(--ibep-text);
	border-radius: var(--ibep-r-pill, 999px);
	width: 2.75rem; /* 44px touch target */
	height: 2.75rem;
	line-height: 1;
	font-size: 1rem;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	touch-action: manipulation;
}
.ibep-speak:hover { border-color: var(--ibep-primary); color: var(--ibep-primary); }
.ibep-q-head .ibep-speak { margin-inline: 0.25rem; }

/* Listening player (TTS) + speech dictation / self-recording (Phase 2) */
.ibep-listen {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin: 0.5rem 0 0.75rem;
	padding: 0.6rem 0.85rem;
	border: 1px dashed var(--ibep-border);
	border-radius: var(--ibep-r-control, 12px);
}
.ibep-listen-label { font-weight: 600; }
.ibep-listen-play[disabled] { opacity: 0.5; cursor: not-allowed; }
.ibep-dictate { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.ibep-dictate-btn.is-active, .ibep-record-btn.is-active { outline: 2px solid var(--ibep-primary); }
.ibep-interim { color: var(--ibep-muted); font-style: italic; flex-basis: 100%; }
.ibep-audio { flex-basis: 100%; margin-top: 0.25rem; width: 100%; }

/* Speaking practice cards */
.ibep-speak-hint { color: var(--ibep-muted); font-size: 0.85rem; font-style: italic; margin: 0.4rem 0; }

/* Math symbol bar (gap answers) */
.ibep-symbols { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.4rem 0; }
.ibep-symbol {
	min-width: 34px;
	padding: 0.3rem 0.45rem;
	border: 1px solid var(--ibep-border);
	border-radius: var(--ibep-r-micro, 8px);
	background: var(--ibep-surface);
	color: var(--ibep-text);
	font: inherit;
	font-size: 0.95rem;
	cursor: pointer;
}
.ibep-symbol:hover { border-color: var(--ibep-primary); color: var(--ibep-primary); }

/* Match-the-pairs cards */
.ibep-match { display: flex; flex-direction: column; gap: 0.5rem; }
.ibep-match-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem;
	width: 100%;
	padding: 0.65rem 0.9rem;
	border: 1px solid var(--ibep-border);
	border-radius: var(--ibep-r-control, 12px);
	background: var(--ibep-surface);
	color: var(--ibep-text);
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.ibep-match-row.is-target { border-style: dashed; border-color: var(--ibep-primary); }
.ibep-match-row.is-filled { border-color: var(--ibep-success); }
.ibep-match-left { font-weight: 600; }
.ibep-match-slot { color: var(--ibep-muted); font-size: 0.9rem; text-align: right; }
.ibep-match-row.is-filled .ibep-match-slot { color: var(--ibep-text); font-weight: 600; }
.ibep-match-pool { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.25rem 0; }
.ibep-match-chip.is-active { border-color: var(--ibep-primary); background: rgba(255, 90, 60, 0.08); color: var(--ibep-primary); }

/* ---- Logged-out onboarding welcome (Variant B: bold) ---- */
.ibep-welcome {
	display: flex;
	flex-direction: column;
	gap: 1.15rem;
}
.ibep-w-eyebrow {
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ibep-primary);
}
.ibep-w-hero {
	margin: 0;
	font-family: var(--ibep-font-display);
	font-size: 2.15rem;
	line-height: 1.08;
	letter-spacing: -0.03em;
	text-wrap: balance;
	color: var(--ibep-text);
}
.ibep-mark {
	background: linear-gradient(180deg, transparent 58%, var(--ibep-accent) 58%);
	padding: 0 0.1em;
}
.ibep-w-sub {
	margin: 0;
	color: var(--ibep-text-soft);
	font-size: 0.98rem;
	line-height: 1.45;
}
.ibep-w-stats {
	display: flex;
	gap: 0.5rem;
}
.ibep-w-stat {
	flex: 1;
	text-align: center;
	background: var(--ibep-surface);
	border: 1px solid var(--ibep-border);
	border-radius: var(--ibep-r-panel, 18px);
	padding: 0.75rem 0.4rem;
}
.ibep-w-stat .n {
	display: block;
	font-family: var(--ibep-font-display);
	font-weight: 800;
	font-size: 1.5rem;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	color: var(--ibep-primary);
}
.ibep-w-stat:nth-child(2) .n { color: var(--ibep-text); }
.ibep-w-stat .l {
	display: block;
	font-size: 0.7rem;
	color: var(--ibep-muted);
	margin-top: 0.3rem;
}
.ibep-w-demo {
	position: relative;
	background: var(--ibep-surface);
	border: 1px solid var(--ibep-border);
	border-radius: var(--ibep-r-card, 24px);
	padding: 1rem;
	box-shadow: var(--ibep-shadow-float);
}
.ibep-w-accent {
	display: block;
	width: 52px;
	height: 6px;
	border-radius: var(--ibep-r-micro, 8px);
	background: linear-gradient(90deg, var(--ibep-primary), var(--ibep-accent));
	margin-bottom: 0.75rem;
}
.ibep-w-qtag {
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ibep-muted);
}
.ibep-w-q {
	font-weight: 700;
	font-size: 1.02rem;
	line-height: 1.3;
	margin: 0.5rem 0 0.9rem;
	color: var(--ibep-text);
}
.ibep-w-choices {
	display: flex;
	gap: 0.6rem;
}
.ibep-w-choices.is-mc { flex-direction: column; gap: 0.5rem; }
.ibep-w-choices.is-tf .ibep-w-choice { flex: 1; }
.ibep-w-choices.is-mc .ibep-w-choice { text-align: left; padding-left: 1rem; }
.ibep-w-choice {
	border: 2px solid var(--ibep-border);
	background: var(--ibep-surface);
	color: var(--ibep-text);
	font-family: var(--ibep-font-display);
	font-weight: 800;
	font-size: 1rem;
	padding: 0.8rem 0;
	border-radius: var(--ibep-r-panel, 18px);
	cursor: pointer;
	transition: transform 0.08s, box-shadow 0.12s, border-color 0.12s, background 0.12s;
}
.ibep-w-choice:hover { border-color: var(--ibep-primary); }
.ibep-w-choice:focus-visible { outline: 3px solid var(--ibep-primary); outline-offset: 2px; }
.ibep-w-choice.is-right { background: var(--ibep-success); border-color: var(--ibep-success); color: #fff; box-shadow: 0 5px 0 #2c7f53; }
.ibep-w-choice.is-wrong { background: var(--ibep-primary); border-color: var(--ibep-primary); color: #fff; box-shadow: var(--ibep-press); }
.ibep-w-choice:disabled { cursor: default; }
.ibep-w-reveal {
	display: none;
	margin: 0.75rem 0 0;
	font-size: 0.86rem;
	line-height: 1.45;
	color: var(--ibep-text-soft);
}
.ibep-w-reveal.is-shown { display: block; animation: ibep-w-fade 0.25s ease; }
.ibep-w-reveal b { color: var(--ibep-text); }
@keyframes ibep-w-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Post-answer row: try another card in this subject, or sign up. */
.ibep-w-after {
	display: none;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-top: 0.85rem;
	padding-top: 0.8rem;
	border-top: 1px solid var(--ibep-border);
}
.ibep-w-after.is-shown { display: flex; animation: ibep-w-fade 0.25s ease; }
.ibep-w-next {
	background: var(--ibep-chip);
	border: none;
	color: var(--ibep-text);
	border-radius: var(--ibep-r-pill, 999px);
	padding: 0.5rem 0.95rem;
	font-family: var(--ibep-font-display);
	font-weight: 700;
	font-size: 0.85rem;
	cursor: pointer;
	transition: filter 0.12s;
}
.ibep-w-next:hover { filter: brightness(0.96); }
.ibep-w-next:focus-visible { outline: 3px solid var(--ibep-primary); outline-offset: 2px; }
.ibep-w-signup-link {
	color: var(--ibep-primary);
	font-weight: 800;
	font-size: 0.85rem;
	text-decoration: none;
	white-space: nowrap;
}
.ibep-w-signup-link:hover { text-decoration: underline; }
/* Decorative subject preview — a soft-scrolling strip, not a control.
   No visible scrollbar; a right-edge fade hints there's more. */
.ibep-w-chips {
	display: flex;
	gap: 0.5rem;
	overflow-x: auto;
	padding-bottom: 0.15rem;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
	-webkit-mask-image: linear-gradient(to right, #000 86%, transparent);
	mask-image: linear-gradient(to right, #000 86%, transparent);
}
.ibep-w-chips::-webkit-scrollbar { display: none; }
.ibep-wchip {
	flex: 0 0 auto;
	background: var(--ibep-surface);
	border: 1px solid var(--ibep-border);
	color: var(--ibep-text-soft);
	border-radius: var(--ibep-r-pill, 999px);
	padding: 0.45rem 0.8rem;
	font-family: var(--ibep-font-display);
	font-size: 0.8rem;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
	transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.ibep-wchip:hover { border-color: var(--ibep-primary); }
.ibep-wchip:focus-visible { outline: 3px solid var(--ibep-primary); outline-offset: 2px; }
.ibep-wchip.is-active,
.ibep-wchip.is-hot { background: var(--ibep-accent); border-color: var(--ibep-accent); color: var(--ibep-text); font-weight: 700; }
.ibep-w-cta {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	margin-top: 0.25rem;
}
.ibep-w-primary {
	display: block;
	text-align: center;
	text-decoration: none;
	background: linear-gradient(180deg, #ff6a4e, var(--ibep-primary));
	color: var(--ibep-primary-ink);
	border-radius: var(--ibep-r-pill, 999px);
	padding: 0.95rem;
	font-family: var(--ibep-font-display);
	font-weight: 800;
	font-size: 1.05rem;
	box-shadow: var(--ibep-press);
	transition: transform 0.08s, box-shadow 0.12s, filter 0.12s;
}
/* Lock the ink colour across states — the theme's global a:hover would
   otherwise repaint this link coral-on-coral. */
.ibep-w-primary:hover,
.ibep-w-primary:focus,
.ibep-w-primary:active,
.ibep-w-primary:visited { color: var(--ibep-primary-ink); }
.ibep-w-primary:hover { filter: brightness(1.04); }
.ibep-w-primary:active { transform: translateY(3px); box-shadow: var(--ibep-press-down); }
.ibep-w-primary:focus-visible { outline: 3px solid var(--ibep-text); outline-offset: 3px; }
.ibep-w-ghost {
	text-align: center;
	text-decoration: none;
	color: var(--ibep-text-soft);
	font-weight: 700;
	font-size: 0.95rem;
	padding: 0.25rem;
}
.ibep-w-ghost b { color: var(--ibep-primary); }
.ibep-w-trust {
	text-align: center;
	font-size: 0.76rem;
	color: var(--ibep-muted);
	margin: 0.1rem 0 0;
}
@media (prefers-reduced-motion: reduce) {
	.ibep-w-reveal.is-shown { animation: none; }
	.ibep-w-primary, .ibep-w-choice { transition: none; }
}

/* ---- Registration form ---- */
.ibep-register .ibep-w-hero { font-size: 1.7rem; }
.ibep-reg-form { display: flex; flex-direction: column; gap: 0.35rem; }
.ibep-reg-label {
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--ibep-text-soft);
	margin-top: 0.6rem;
}
.ibep-reg-form .ibep-input { width: 100%; }
.ibep-reg-hint { margin: 0.2rem 0 0; font-size: 0.74rem; color: var(--ibep-muted); }
.ibep-reg-form .ibep-w-cta { margin-top: 1.1rem; }
.ibep-reg-form .ibep-w-primary { border: none; width: 100%; cursor: pointer; }
.ibep-reg-error {
	background: rgba(255, 90, 60, 0.1);
	border: 1px solid var(--ibep-primary);
	color: var(--ibep-primary-dark);
	border-radius: var(--ibep-r-control, 12px);
	padding: 0.6rem 0.8rem;
	font-size: 0.86rem;
	font-weight: 600;
}
/* honeypot: hidden from real users, visible to naive bots */
.ibep-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---- Login extras ---- */
.ibep-login-remember {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 0.7rem;
	font-size: 0.85rem;
	color: var(--ibep-text-soft);
	font-weight: 600;
	cursor: pointer;
}
.ibep-login-remember input { width: 1.05rem; height: 1.05rem; accent-color: var(--ibep-primary); }
.ibep-login-forgot {
	text-align: center;
	text-decoration: none;
	font-size: 0.82rem;
	color: var(--ibep-muted);
	padding: 0.1rem;
}
.ibep-login-forgot:hover { color: var(--ibep-primary); }

/* Onboarding inputs/buttons must include padding+border in their width,
   otherwise width:100% inputs overflow the .ibep-app container. */
.ibep-onboarding, .ibep-onboarding * { box-sizing: border-box; }

/* ---- Onboarding: Exams door-opener (locked paper preview + features) ---- */
.ibep-w-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.ibep-w-features li { display: flex; gap: 0.55rem; align-items: flex-start; font-size: 0.9rem; color: var(--ibep-text-soft); line-height: 1.4; }
.ibep-w-features li::before { content: "✓"; color: var(--ibep-success); font-weight: 800; flex: 0 0 auto; }
.ibep-exam-preview {
	background: var(--ibep-surface);
	border: 1px solid var(--ibep-border);
	border-radius: var(--ibep-r-card, 24px);
	overflow: hidden;
	box-shadow: var(--ibep-shadow-float);
}
.ibep-exam-preview .ep-head {
	display: flex; justify-content: space-between; align-items: center;
	background: var(--ibep-navy); color: #fff;
	padding: 0.6rem 1rem; font-weight: 700; font-size: 0.85rem;
}
.ibep-exam-preview .ep-timer { background: rgba(255, 255, 255, 0.15); border-radius: var(--ibep-r-pill, 999px); padding: 0.15rem 0.6rem; font-variant-numeric: tabular-nums; }
.ibep-exam-preview ol { list-style: none; margin: 0; padding: 0.85rem 1rem; display: flex; flex-direction: column; gap: 0.75rem; counter-reset: q; }
.ibep-exam-preview li { display: flex; gap: 0.6rem; font-size: 0.92rem; line-height: 1.4; color: var(--ibep-text); }
.ibep-exam-preview li::before { counter-increment: q; content: counter(q) "."; font-weight: 800; color: var(--ibep-muted); flex: 0 0 auto; }
.ibep-exam-preview li .marks { margin-left: auto; color: var(--ibep-muted); font-weight: 700; font-size: 0.8rem; white-space: nowrap; }
.ibep-exam-preview li.locked { filter: blur(3.5px); user-select: none; }
.ibep-exam-preview .ep-lock { display: flex; align-items: center; justify-content: center; gap: 0.5rem; border-top: 1px solid var(--ibep-border); padding: 0.7rem; font-size: 0.82rem; font-weight: 700; color: var(--ibep-text-soft); background: var(--ibep-chip); }

/* ---- Dashboard upgrade teaser (free-tier upsell) ---- */
.ibep-upgrade {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	border: none;
	color: #fff6ef;
	background: linear-gradient(135deg, #ff6a4e, var(--ibep-primary));
	box-shadow: 0 14px 30px -18px rgba(255, 90, 60, 0.7);
}
.ibep-upgrade.is-locked {
	background: linear-gradient(135deg, var(--ibep-primary), var(--ibep-primary-dark));
}
.ibep-upgrade-text { flex: 1 1 240px; min-width: 0; }
.ibep-upgrade-eyebrow {
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.85;
}
.ibep-upgrade-title {
	font-family: var(--ibep-font-display);
	font-weight: 800;
	font-size: 1.15rem;
	line-height: 1.2;
	margin: 0.15rem 0 0.35rem;
	color: #fff;
}
.ibep-upgrade-sub { margin: 0; font-size: 0.88rem; line-height: 1.45; opacity: 0.95; }
.ibep-upgrade-btn {
	flex: 0 0 auto;
	background: #fff;
	color: var(--ibep-primary-dark);
	border-radius: var(--ibep-r-pill, 999px);
	padding: 0.75rem 1.15rem;
	font-family: var(--ibep-font-display);
	font-weight: 800;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 0 5px 0 rgba(35, 42, 77, 0.18);
	transition: transform 0.08s, box-shadow 0.12s, filter 0.12s;
}
.ibep-upgrade-btn:hover { filter: brightness(0.97); color: var(--ibep-primary-dark); }
.ibep-upgrade-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(35, 42, 77, 0.18); }
@media (max-width: 430px) {
	.ibep-upgrade-btn { flex-basis: 100%; text-align: center; }
}

/* ---- Out-of-swipes offer: day + week impulse buttons ---- */
.ibep-upgrade.is-locked { flex-direction: column; align-items: stretch; }
.ibep-upgrade-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.ibep-upgrade-actions .ibep-upgrade-btn { flex: 1 1 46%; text-align: center; box-sizing: border-box; }
.ibep-upgrade-btn.is-ghost {
	background: transparent;
	color: #fff;
	border: 2px solid rgba(255, 255, 255, 0.75);
	box-shadow: none;
	padding: calc(0.75rem - 2px) 1.15rem;
}
.ibep-upgrade-btn.is-ghost:hover { background: rgba(255, 255, 255, 0.14); color: #fff; filter: none; }
.ibep-upgrade-more {
	flex-basis: 100%;
	text-align: center;
	color: #fff;
	opacity: 0.92;
	font-size: 0.8rem;
	font-weight: 700;
	text-decoration: underline;
}
.ibep-upgrade-more:hover { color: #fff; opacity: 1; }
/* swipe-app limit nudge tertiary link */
.ibep-limit-more { display: block; text-align: center; color: var(--ibep-muted); font-size: 0.85rem; text-decoration: underline; }
.ibep-limit-more:hover { color: var(--ibep-primary); }

/* Gap answers are short (a word or number) — don't stretch the input full width,
   but keep room for longer words. The form spaces the input from the Check button. */
.ibep-gap-form { display: flex; flex-direction: column; gap: 0.75rem; align-items: stretch; }
.ibep-gap-input { max-width: 24rem; box-sizing: border-box; }

/* ---- Ask a parent to pay ------------------------------------------------- */
/* Toggle sits with the teaser actions; it's a <button>, so reset chrome. */
.ibep-askparent-toggle { background: none; border: none; cursor: pointer; font-family: inherit; }
.ibep-askparent {
	flex-basis: 100%;
	background: rgba(255, 255, 255, 0.12);
	border-radius: var(--ibep-r-control, 12px);
	padding: 0.9rem;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}
.ibep-askparent-title { margin: 0; color: #fff; font-weight: 700; font-size: 0.9rem; }
.ibep-askparent-plans, .ibep-askparent-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ibep-askparent-share { display: flex; flex-direction: column; gap: 0.5rem; }
.ibep-askparent-share .ibep-input { box-sizing: border-box; width: 100%; font-size: 0.8rem; }
.ibep-askparent-actions .ibep-upgrade-btn { flex: 1 1 auto; text-align: center; }
.ibep-askparent-note { margin: 0; color: #fff; opacity: 0.85; font-size: 0.78rem; }

/* Pricing plan cards: tertiary link under the buy button. */
.ibep-askparent-link {
	background: none;
	border: none;
	cursor: pointer;
	font-family: inherit;
	color: var(--ibep-muted);
	font-size: 0.85rem;
	text-decoration: underline;
	margin-top: 0.4rem;
}
.ibep-askparent-link:hover { color: var(--ibep-primary); }

/* ---- Parent payment page (/pay/) ----------------------------------------- */
.ibep-parent-pay .ibep-paycard {
	background: var(--ibep-surface, #fff);
	border: 2px solid var(--ibep-ink, #232a4d);
	border-radius: var(--ibep-r-card, 24px);
	box-shadow: 0 6px 0 rgba(35, 42, 77, 0.14);
	padding: 1.5rem;
	margin-top: 1.5rem;
	max-width: 26rem;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	align-items: flex-start;
}
.ibep-paycard-plan { font-weight: 800; font-size: 1.05rem; color: var(--ibep-ink, #232a4d); }
.ibep-paycard-price { font-size: 2.2rem; font-weight: 800; color: var(--ibep-primary, #ff5a3c); line-height: 1; }
.ibep-paycard-benefit { margin: 0; color: var(--ibep-muted, #6b7086); }
.ibep-paycard-btn { border: none; cursor: pointer; width: 100%; text-align: center; }
.ibep-paycard-btn:disabled { opacity: 0.7; cursor: wait; }
.ibep-paycard-error { margin: 0; color: #c0392b; font-weight: 600; font-size: 0.9rem; }
.ibep-paycard-trust { margin: 0.25rem 0 0; font-size: 0.78rem; color: var(--ibep-muted, #6b7086); }

/* ---- Family & sharing (Progress page) ------------------------------------ */
.ibep-family-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.5rem 0; }
.ibep-family-row .ibep-input { flex: 1 1 12rem; box-sizing: border-box; min-width: 0; }
.ibep-family-share-intro { margin-top: 1.1rem; }
.ibep-family-status { margin: 0.25rem 0 0; }
.ibep-family-reset {
	background: none;
	border: none;
	cursor: pointer;
	font-family: inherit;
	color: var(--ibep-muted);
	font-size: 0.8rem;
	text-decoration: underline;
	padding: 0;
	margin-top: 0.35rem;
}
.ibep-family-reset:hover { color: var(--ibep-primary); }

/* ---- Public progress card (/share/) --------------------------------------- */
.ibep-share-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
	gap: 0.75rem;
	margin: 1.5rem 0;
	width: 100%;
}
.ibep-share-tile {
	background: var(--ibep-surface, #fff);
	border: 2px solid var(--ibep-ink, #232a4d);
	border-radius: var(--ibep-r-panel, 18px);
	box-shadow: 0 4px 0 rgba(35, 42, 77, 0.12);
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	align-items: flex-start;
}
.ibep-share-icon { font-size: 1.2rem; }
.ibep-share-value { font-size: 1.7rem; font-weight: 800; color: var(--ibep-ink, #232a4d); line-height: 1.1; }
.ibep-share-label { font-size: 0.78rem; color: var(--ibep-muted, #6b7086); }
.ibep-share-h2 { font-size: 1.05rem; margin: 0.5rem 0 0.6rem; color: var(--ibep-ink, #232a4d); }
.ibep-share-grades { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.ibep-share-grade {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: var(--ibep-surface, #fff);
	border: 2px solid var(--ibep-ink, #232a4d);
	border-radius: var(--ibep-r-pill, 999px);
	padding: 0.3rem 0.85rem 0.3rem 0.35rem;
}
.ibep-share-grade-num {
	width: 1.7rem;
	height: 1.7rem;
	border-radius: 50%;
	background: var(--ibep-yellow, #ffd66e);
	color: var(--ibep-ink, #232a4d);
	font-weight: 800;
	display: grid;
	place-items: center;
}
.ibep-share-grade-name { font-size: 0.85rem; font-weight: 600; color: var(--ibep-ink, #232a4d); }
.ibep-share-note { font-size: 0.8rem; color: var(--ibep-muted, #6b7086); }

/* ---- /pay/ additions: remind checkbox + digest opt-in --------------------- */
.ibep-paycard-remind {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-size: 0.85rem;
	color: var(--ibep-muted, #6b7086);
	cursor: pointer;
}
.ibep-paycard-remind input { margin-top: 0.15rem; accent-color: var(--ibep-primary, #ff5a3c); }
.ibep-digest-offer { margin-top: 1rem; }
.ibep-digest-form { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; }
.ibep-digest-form .ibep-input { box-sizing: border-box; width: 100%; }

/* ---- Question illustrations (inline SVG) ---------------------------------- */
/* SVGs use currentColor for axes/structure so they adapt to dark mode;
   accents (coral/yellow) are hard-coded in the artwork. */
.ibep-card-image {
	margin: 0.25rem 0 0.5rem;
	color: var(--ibep-ink, #232a4d);
}
.ibep-card-image svg {
	display: block;
	width: 100%;
	height: auto;
	max-height: 16rem;
}

/* ---- Tap to enlarge (ibep-zoom.js) --------------------------------------- */
/* Model diagrams sit at half width in the compare view; labels and small
   annotations are unreadable there, so artwork is tappable. */
.ibep-card-image[data-ibep-zoom],
.ibep-compare-img[data-ibep-zoom] {
	cursor: zoom-in;
	border-radius: 0.5rem;
}
.ibep-card-image[data-ibep-zoom]:focus-visible,
.ibep-compare-img[data-ibep-zoom]:focus-visible {
	outline: 2px solid var(--ibep-coral, #ff5a3c);
	outline-offset: 3px;
}
.ibep-zoom-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
	background: rgba(20, 24, 45, 0.82);
	cursor: zoom-out;
}
.ibep-zoom-inner {
	max-width: 92vw;
	max-height: 88vh;
	overflow: auto;
	padding: 1rem;
	border-radius: 0.75rem;
	background: var(--ibep-surface, #fff);
	color: var(--ibep-ink, #232a4d);
	cursor: default;
}
.ibep-zoom-inner svg,
.ibep-zoom-inner img {
	display: block;
	width: min(88vw, 60rem);
	max-width: 100%;
	height: auto;
	max-height: 82vh;
}
.ibep-zoom-close {
	position: absolute;
	top: 0.75rem;
	right: 0.9rem;
	width: 2.5rem;
	height: 2.5rem;
	font-size: 1.75rem;
	line-height: 1;
	color: #fff;
	background: rgba(0, 0, 0, 0.35);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}
.ibep-zoom-close:focus-visible {
	outline: 2px solid var(--ibep-yellow, #ffd66e);
	outline-offset: 2px;
}
html.dark .ibep-zoom-inner {
	background: var(--ibep-surface, #1d2138);
}

/* ---- TOK / Extended Essay coach ------------------------------------------ */
.ibep-core-label { display: block; font-weight: 700; margin: 0.75rem 0 0.35rem; color: var(--ibep-ink, #232a4d); }
.ibep-core-textarea { width: 100%; box-sizing: border-box; resize: vertical; min-height: 12rem; line-height: 1.5; font-family: inherit; }
.ibep-core-form .ibep-input { width: 100%; box-sizing: border-box; }
.ibep-core-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 0.75rem; flex-wrap: wrap; }
.ibep-core-feedback { margin-top: 1.25rem; }
.ibep-core-crit { padding: 0.75rem 0; border-bottom: 1px solid rgba(35,42,77,0.1); }
.ibep-core-crit:last-child { border-bottom: none; }
.ibep-core-crit-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.25rem; }
.ibep-core-band { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.15rem 0.6rem; border-radius: var(--ibep-r-pill, 999px); white-space: nowrap; }
.ibep-core-band.is-low { background: #ffe1d9; color: #b13a1f; }
.ibep-core-band.is-medium { background: var(--ibep-yellow, #ffd66e); color: #6a5310; }
.ibep-core-band.is-high { background: #cdeee7; color: #1c6b5d; }
.ibep-core-lists { margin-top: 1rem; }
.ibep-core-lists h4 { margin: 0 0 0.35rem; font-size: 0.95rem; }
.ibep-core-plus, .ibep-core-arrow { margin: 0.2rem 0; }
.ibep-core-next { margin-top: 1rem; font-weight: 600; }
.ibep-core-disclaimer { margin-top: 1rem; font-size: 0.8rem; }
.ibep-coral { color: var(--ibep-primary, #ff5a3c); }
/* Entry card on the Progress page */
.ibep-core-entry { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---- Individual Oral simulation ------------------------------------------ */
.ibep-oral-theme { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ibep-primary, #ff5a3c); margin-bottom: 0.5rem; }
.ibep-oral-task { font-weight: 600; font-size: 1.05rem; margin: 0.5rem 0 1rem; }
.ibep-oral-controls { display: flex; flex-direction: column; gap: 0.75rem; }
.ibep-oral-timer { font-weight: 800; font-size: 1.15rem; text-align: center; padding: 0.5rem; border-radius: var(--ibep-r-control, 12px); }
.ibep-oral-timer.is-prep { background: var(--ibep-yellow, #ffd66e); color: #6a5310; }
.ibep-oral-timer.is-rec { background: #ffe1d9; color: #b13a1f; }
.ibep-oral-live { min-height: 4rem; background: rgba(35,42,77,0.04); border-radius: var(--ibep-r-control, 12px); padding: 0.75rem; line-height: 1.5; }
.ibep-oral-interim { opacity: 0.55; }
.ibep-oral-phrase { margin: 0.2rem 0; }

/* ---- Sketch vs model-diagram compare -------------------------------------- */
.ibep-compare {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
	gap: 0.75rem;
	margin: 0.5rem 0 0.75rem;
}
.ibep-compare-label {
	font-size: 0.72rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--ibep-muted, #6b7086);
	margin-bottom: 0.3rem;
}
.ibep-compare-label.is-model { color: var(--ibep-primary, #ff5a3c); }
.ibep-compare-img {
	width: 100%;
	height: auto;
	display: block;
	background: #fff;
	border: 1.5px dashed rgba(35, 42, 77, 0.3);
	border-radius: var(--ibep-r-control, 12px);
}
.ibep-compare .ibep-card-image {
	margin: 0;
	border: 1.5px solid rgba(35, 42, 77, 0.15);
	border-radius: var(--ibep-r-control, 12px);
	padding: 0.25rem;
}

/* Card-quality feedback bar (👍/👎 + reason chips + optional note).
   Rendered by assets/js/ibep-feedback.js inside the Swipe result panel and
   each Exam review card. Deliberately understated so it never competes with
   the answer/explanation. */
.ibep-fb {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.5rem;
	padding-top: 0.6rem;
	border-top: 1px solid var(--ibep-border);
	font-size: 0.9rem;
}
.ibep-fb.is-open { align-items: flex-start; }
.ibep-fb-q { color: var(--ibep-muted); }
.ibep-fb-thumb {
	border: 1.5px solid var(--ibep-border);
	background: var(--ibep-surface);
	border-radius: var(--ibep-r-pill, 999px);
	width: 2.1rem;
	height: 2.1rem;
	font-size: 1.05rem;
	line-height: 1;
	cursor: pointer;
	transition: border-color 0.15s, transform 0.1s;
}
.ibep-fb-thumb:hover { border-color: var(--ibep-navy); }
.ibep-fb-thumb:active { transform: scale(0.92); }
.ibep-fb-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; flex: 1 1 100%; }
.ibep-fb-chip {
	border: 1.5px solid var(--ibep-border);
	background: var(--ibep-chip);
	color: var(--ibep-text);
	border-radius: var(--ibep-r-pill, 999px);
	padding: 0.3rem 0.7rem;
	font-size: 0.82rem;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}
.ibep-fb-chip:hover { border-color: var(--ibep-primary); background: var(--ibep-surface); }
.ibep-fb-note {
	flex: 1 1 100%;
	box-sizing: border-box;
	width: 100%;
	border: 1.5px solid var(--ibep-border);
	border-radius: var(--ibep-r-control, 12px);
	padding: 0.5rem 0.6rem;
	font: inherit;
	color: var(--ibep-text);
	background: var(--ibep-surface);
	resize: vertical;
}
.ibep-fb-noterow { display: flex; gap: 0.5rem; align-items: center; }
.ibep-fb-send {
	border: none;
	background: var(--ibep-primary);
	color: var(--ibep-primary-ink);
	border-radius: var(--ibep-r-pill, 999px);
	padding: 0.35rem 0.9rem;
	font-weight: 700;
	cursor: pointer;
}
.ibep-fb-send:hover { background: var(--ibep-primary-dark); }
.ibep-fb-link {
	border: none;
	background: none;
	color: var(--ibep-muted);
	text-decoration: underline;
	cursor: pointer;
	font-size: 0.82rem;
	padding: 0.2rem 0.1rem;
}
.ibep-fb-link:hover { color: var(--ibep-text); }
.ibep-fb-thanks { color: var(--ibep-success); font-weight: 700; }

/* --- Teacher quiz tool (/teach/) + student quiz runtime (/q/…) ---------- */
/* The teacher tool is list-heavy: give it the exam writing measure. */
#ibep-teach-root.ibep-app { max-width: 640px; }

.ibep-q-chip {
	border-radius: var(--ibep-r-pill, 999px);
	padding: 0.2rem 0.7rem;
	font-size: 0.78rem;
	font-weight: 700;
	white-space: nowrap;
}
.ibep-q-chip.is-draft { background: var(--ibep-chip); color: var(--ibep-text-soft); }
.ibep-q-chip.is-open { background: var(--ibep-success); color: #fff; }
.ibep-q-chip.is-closed { background: var(--ibep-navy); color: var(--ibep-primary-ink); }

.ibep-teach-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	width: 100%;
	text-align: start;
	cursor: pointer;
	font: inherit;
	color: inherit;
}
.ibep-teach-item:hover { border-color: var(--ibep-navy); }
.ibep-teach-item-main { display: flex; flex-direction: column; gap: 0.15rem; }

.ibep-teach-form .ibep-input { margin-bottom: 0.6rem; }
.ibep-teach-size { max-width: 7rem; }
.ibep-teach-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.25rem; }
.ibep-teach-actions .ibep-option { flex: 0 1 auto; width: auto; }

/* Curatable question rows: the teacher sees prompt AND answer. */
.ibep-teach-q {
	background: var(--ibep-surface);
	border: 1.5px solid var(--ibep-border);
	border-radius: var(--ibep-r-control, 12px);
	padding: 0.75rem 0.9rem;
}
.ibep-teach-q-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.3rem; }
.ibep-teach-q-nr { font-weight: 800; color: var(--ibep-text-soft); }
.ibep-teach-q-type {
	background: var(--ibep-chip);
	border-radius: var(--ibep-r-pill, 999px);
	padding: 0.1rem 0.55rem;
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--ibep-text-soft);
	white-space: nowrap;
}
.ibep-teach-q-topic { font-size: 0.72rem; color: var(--ibep-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ibep-teach-q-x {
	margin-inline-start: auto;
	border: none;
	background: none;
	color: var(--ibep-muted);
	font-size: 1rem;
	cursor: pointer;
	padding: 0.1rem 0.35rem;
	border-radius: var(--ibep-r-micro, 8px);
}
.ibep-teach-q-x:hover { color: var(--ibep-primary); background: rgba(255, 90, 60, 0.08); }
.ibep-teach-q-prompt { font-weight: 600; }
.ibep-teach-q-answer { font-size: 0.85rem; color: var(--ibep-success); margin-top: 0.25rem; }
.ibep-teach-q.is-addable .ibep-teach-add { margin-inline-start: auto; width: auto; padding: 0.25rem 0.75rem; }

.ibep-teach-browse-head { display: flex; align-items: center; justify-content: space-between; }
.ibep-teach-browse-search { display: flex; gap: 0.5rem; margin: 0.5rem 0 0.75rem; }
.ibep-teach-browse-search .ibep-option { width: auto; }
.ibep-teach-browse .ibep-teach-q { margin-bottom: 0.5rem; }

.ibep-teach-link {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin: 0.5rem 0 0.75rem;
}
.ibep-teach-link code {
	background: var(--ibep-chip);
	border-radius: var(--ibep-r-micro, 8px);
	padding: 0.4rem 0.6rem;
	font-size: 0.9rem;
	word-break: break-all;
}
.ibep-teach-link .ibep-option { width: auto; }
.ibep-teach-emails { box-sizing: border-box; width: 100%; resize: vertical; font: inherit; }

/* Report: student rows + per-question class stats. */
.ibep-teach-student { border-bottom: 1px solid var(--ibep-border); }
.ibep-teach-student:last-child { border-bottom: none; }
.ibep-teach-student-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	width: 100%;
	border: none;
	background: none;
	font: inherit;
	color: inherit;
	padding: 0.55rem 0.1rem;
	cursor: pointer;
	text-align: start;
}
.ibep-teach-student-name { font-weight: 600; }
.ibep-teach-student-mail { font-weight: 400; font-size: 0.8rem; color: var(--ibep-muted); }
.ibep-teach-student-score { font-weight: 800; white-space: nowrap; }
.ibep-teach-student-detail { padding: 0 0.1rem 0.6rem; }
.ibep-teach-detail-row { display: flex; gap: 0.45rem; font-size: 0.85rem; padding: 0.15rem 0; align-items: baseline; }
.ibep-teach-detail-q { flex: 1; }
.ibep-teach-detail-given { color: var(--ibep-muted); font-style: italic; white-space: nowrap; }

.ibep-ok { color: var(--ibep-success); font-weight: 800; }
.ibep-bad { color: var(--ibep-primary); font-weight: 800; }

.ibep-teach-qstat { margin-bottom: 0.6rem; }
.ibep-teach-qstat-label { display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.85rem; margin-bottom: 0.2rem; }
.ibep-teach-qstat-bar { height: 8px; background: var(--ibep-chip); border-radius: var(--ibep-r-pill, 999px); overflow: hidden; }
.ibep-teach-qstat-fill { height: 100%; background: var(--ibep-success); border-radius: var(--ibep-r-pill, 999px); }
.ibep-teach-qstat-fill.is-low { background: var(--ibep-primary); }

/* Student quiz runtime. */
.ibep-quiz-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ibep-quiz-options { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.75rem; }
.ibep-quiz-gap { box-sizing: border-box; width: 100%; margin-top: 0.75rem; }
.ibep-quiz-match { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.75rem; }
.ibep-quiz-match-row { display: flex; align-items: center; gap: 0.6rem; }
.ibep-quiz-match-left { flex: 1; font-weight: 600; }
.ibep-quiz-match-row .ibep-input { flex: 1; }
.ibep-quiz-nav { display: flex; gap: 0.5rem; }
.ibep-quiz-nav .ibep-option { flex: 1; }
.ibep-quiz-score { font-size: 1.3rem; font-weight: 800; }
.ibep-quiz-review-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; }
.ibep-quiz-review-nr { font-size: 0.8rem; font-weight: 700; color: var(--ibep-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.ibep-quiz-note { background: var(--ibep-chip); border-radius: var(--ibep-r-control, 12px); padding: 0.5rem 0.7rem; font-size: 0.9rem; }

/* --- Teacher teaser on the logged-out welcome --------------------------- */
/* A quiet navy band below the student funnel: visible, but never competing
   with the primary sign-up CTA. */
.ibep-w-teacher {
	display: flex;
	gap: 0.9rem;
	align-items: flex-start;
	margin-top: 2.2rem;
	background: var(--ibep-navy);
	color: var(--ibep-primary-ink);
	border-radius: var(--ibep-r-card, 24px);
	padding: 1.1rem 1.2rem;
	text-align: start;
}
.ibep-w-teacher-icon { font-size: 1.7rem; line-height: 1.2; }
.ibep-w-teacher-eyebrow {
	display: block;
	font-size: 0.72rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--ibep-accent);
	margin-bottom: 0.15rem;
}
.ibep-w-teacher-title {
	margin: 0 0 0.3rem;
	font-size: 1.15rem;
	line-height: 1.25;
	color: inherit;
}
.ibep-w-teacher-sub {
	margin: 0 0 0.55rem;
	font-size: 0.9rem;
	line-height: 1.45;
	color: var(--ibep-navy-muted);
}
.ibep-w-teacher-link {
	font-weight: 700;
	font-size: 0.92rem;
	color: var(--ibep-accent);
	text-decoration: none;
}
.ibep-w-teacher-link:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ */
/* Student duels (/d/{token}). The one app a logged-out visitor sees,  */
/* so the hero has to carry the challenge before anything else loads.  */
.ibep-duel-hero {
	background: var(--ibep-navy);
	color: #fff;
	border-color: transparent;
	box-shadow: var(--ibep-shadow-float);
}
.ibep-duel-hero .ibep-w-hero {
	margin: 0.2rem 0 0.4rem;
	font-size: 1.5rem;
	line-height: 1.15;
	color: #fff;
}
.ibep-duel-hero .ibep-w-eyebrow { color: var(--ibep-accent); }
.ibep-duel-hero .ibep-w-sub { color: rgba(255, 255, 255, 0.78); margin: 0; }

.ibep-duel-result h2 { font-size: 1.6rem; }

.ibep-duel-board h3 { margin: 0 0 0.6rem; font-size: 1.05rem; }
.ibep-duel-ranks {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}
.ibep-duel-rank {
	display: grid;
	/* medal · name (elastic) · score · time */
	grid-template-columns: 2rem 1fr auto auto;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.6rem;
	border-radius: var(--ibep-r-control, 12px);
	background: var(--ibep-surface);
	border: 1px solid var(--ibep-border);
	font-size: 0.92rem;
}
.ibep-duel-rank.is-me {
	border-color: var(--ibep-primary);
	background: color-mix(in srgb, var(--ibep-primary) 8%, var(--ibep-surface));
}
.ibep-duel-medal { font-size: 1rem; text-align: center; color: var(--ibep-text-soft); }
.ibep-duel-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ibep-duel-score { font-family: var(--ibep-font-display); font-weight: 800; }
.ibep-duel-time { font-size: 0.8rem; color: var(--ibep-text-soft); font-variant-numeric: tabular-nums; }

.ibep-duel-hardest {
	margin: 0.6rem 0 0;
	padding: 0.6rem 0.75rem;
	border-radius: var(--ibep-r-control, 12px);
	background: color-mix(in srgb, var(--ibep-accent) 26%, transparent);
	font-size: 0.9rem;
	font-weight: 600;
}

.ibep-duel-wall { border: 2px dashed var(--ibep-primary); }

.ibep-duel-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.ibep-duel-list-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.6rem;
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--ibep-border);
}
.ibep-duel-list-row:last-child { border-bottom: 0; }
.ibep-duel-list-title { font-weight: 600; color: inherit; text-decoration: none; }
.ibep-duel-list-title:hover { text-decoration: underline; }
.ibep-duel-list-meta { font-size: 0.82rem; color: var(--ibep-text-soft); white-space: nowrap; }

.ibep-duel-review-head { margin: 1.2rem 0 0.4rem; }

/* The session-end hand-off into a duel. */
.ibep-duel-cta { font-size: 0.95rem; }

/* Share sheet. Bottom sheet on phones, centred dialog from tablet up. */
.ibep-duel-sheet-backdrop {
	position: fixed;
	inset: 0;
	z-index: 60;
	background: rgba(35, 42, 77, 0.55);
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 0;
}
.ibep-duel-sheet {
	width: 100%;
	max-width: 520px;
	max-height: 90vh;
	overflow-y: auto;
	background: var(--ibep-surface);
	color: var(--ibep-text);
	border-top-left-radius: var(--ibep-r-card, 24px);
	border-top-right-radius: var(--ibep-r-card, 24px);
	padding: 1.1rem 1rem calc(1rem + env(safe-area-inset-bottom));
	box-shadow: var(--ibep-shadow-float);
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.ibep-duel-sheet h3 { margin: 0; font-size: 1.15rem; }
.ibep-duel-sheet-note { margin: 0 0 0.2rem; font-size: 0.85rem; }
.ibep-duel-channels {
	display: grid;
	/* Fixed 2×2 rather than auto-fit: with exactly four channels, auto-fit
	   lands on 3+1 and the orphan reads as a mistake. */
	grid-template-columns: repeat(2, 1fr);
	gap: 0.5rem;
	margin-bottom: 0.3rem;
}
.ibep-duel-channel {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
	box-sizing: border-box;
	padding: 0.75rem 0.4rem;
	border: 1px solid var(--ibep-border);
	border-radius: var(--ibep-r-panel, 18px);
	background: var(--ibep-bg);
	color: inherit;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.85rem;
	transition: border-color 0.12s, transform 0.12s;
}
.ibep-duel-channel:hover { border-color: var(--ibep-primary); }
.ibep-duel-channel:active { transform: translateY(2px); }
.ibep-duel-channel-badge {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	flex: 0 0 auto;
}
.ibep-duel-channel-badge svg { display: block; }

/* Story apps get their own row: no web intent exists for them, so the
   action is "hand over the image", not "open a link". */
.ibep-duel-story {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	width: 100%;
	box-sizing: border-box;
	padding: 0.7rem 0.85rem;
	border: 2px solid var(--ibep-border);
	border-radius: var(--ibep-r-panel, 18px);
	background: var(--ibep-bg);
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.12s, transform 0.1s;
}
.ibep-duel-story:hover { border-color: var(--ibep-primary); }
.ibep-duel-story:active { transform: translateY(2px); }
.ibep-duel-story-text { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.ibep-duel-story-text strong { font-weight: 700; font-size: 0.92rem; }
.ibep-duel-story-sub { font-size: 0.78rem; color: var(--ibep-text-soft); }

@media (min-width: 700px) {
	.ibep-duel-sheet-backdrop { align-items: center; padding: 1rem; }
	.ibep-duel-sheet { border-radius: var(--ibep-r-card, 24px); }
	.ibep-duel-channels { grid-template-columns: repeat(4, 1fr); }
}
