/**
 * English Prep — editorial design system (v0.10.0 / Phase 12).
 *
 * Everything is scoped under .ep-exam-host so it can't leak into the
 * host theme. The host element gets data-accent="terracotta" etc.
 * applied via JS to swap the accent palette.
 */

/* =========================================================================
 * Design tokens (scoped)
 * ========================================================================= */

.ep-exam-host {
	/* Type */
	--ep-font-display: "Newsreader", ui-serif, Georgia, "Times New Roman", serif;
	--ep-font-ui: "Geist", "Söhne", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--ep-font-mono: "JetBrains Mono", "Geist Mono", ui-monospace, "SF Mono", monospace;

	/* "Exam paper" palette */
	--ep-ink: #0e1a30;
	--ep-ink-2: #1f2d4a;
	--ep-ink-3: #3a4663;
	--ep-text: #1a233a;
	--ep-text-2: #4f5a72;
	--ep-text-3: #818a9d;
	--ep-text-4: #aab1c1;

	--ep-surface: #fbf8f1;
	--ep-surface-2: #f4eee0;
	--ep-surface-3: #ece5d2;
	--ep-card: #ffffff;
	--ep-card-edge: #e7e1cd;

	--ep-rule: #e5dec5;
	--ep-rule-soft: #efe8d3;
	--ep-rule-strong: #cabf9f;

	/* Accent — terracotta by default; data-accent on the host swaps it. */
	--ep-accent: #b95a32;
	--ep-accent-2: #9a4524;
	--ep-accent-tint: #f3e3d8;
	--ep-success: #2e7d5b;
	--ep-success-tint: #dfecdf;
	--ep-error: #b3414a;
	--ep-error-tint: #f3dde0;
	--ep-warn: #b88322;
	--ep-warn-tint: #f5e6c2;
	--ep-info: #3a5c8f;
	--ep-info-tint: #dee7f3;

	--ep-r-sm: 4px;
	--ep-r-md: 6px;
	--ep-r-lg: 10px;
	--ep-r-xl: 14px;
	--ep-shadow-1: 0 1px 0 rgba(14,26,48,.04), 0 1px 2px rgba(14,26,48,.05);
	--ep-shadow-2: 0 1px 0 rgba(14,26,48,.04), 0 6px 18px rgba(14,26,48,.06);
	--ep-shadow-3: 0 1px 0 rgba(14,26,48,.04), 0 22px 50px -10px rgba(14,26,48,.18);

	font-family: var(--ep-font-ui);
	font-size: 15px;
	line-height: 1.5;
	color: var(--ep-text);
	background: var(--ep-surface);
	min-height: 60vh;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

.ep-exam-host[data-accent="navy"]     { --ep-accent: #1d3a6b; --ep-accent-2: #13284c; --ep-accent-tint: #dfe5f0; }
.ep-exam-host[data-accent="forest"]   { --ep-accent: #2e7d5b; --ep-accent-2: #1d5b40; --ep-accent-tint: #dfecdf; }
.ep-exam-host[data-accent="ochre"]    { --ep-accent: #b88322; --ep-accent-2: #8b6210; --ep-accent-tint: #f5e6c2; }

.ep-exam-host *,
.ep-exam-host *::before,
.ep-exam-host *::after { box-sizing: border-box; }

.ep-exam-host button { font: inherit; color: inherit; }
.ep-exam-host input,
.ep-exam-host textarea,
.ep-exam-host select { font: inherit; color: inherit; }
.ep-exam-host ::selection { background: var(--ep-accent-tint); color: var(--ep-ink); }

/* Type helpers */
.ep-exam-host .h-serif { font-family: var(--ep-font-display); letter-spacing: -0.01em; font-weight: 500; }
.ep-exam-host .h-eyebrow {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ep-text-3);
}
.ep-exam-host .mono { font-family: var(--ep-font-mono); font-feature-settings: "tnum" 1; }
.ep-exam-host .tnum { font-variant-numeric: tabular-nums; }

/* Buttons */
.ep-exam-host .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 38px;
	padding: 0 16px;
	border-radius: var(--ep-r-md);
	border: 1px solid var(--ep-card-edge);
	background: var(--ep-card);
	color: var(--ep-ink);
	font-weight: 500;
	font-size: 14px;
	cursor: pointer;
	transition: background .12s ease, border-color .12s ease, transform .04s ease, color .12s ease;
	white-space: nowrap;
	text-decoration: none;
}
.ep-exam-host .btn:hover { background: var(--ep-surface-2); border-color: var(--ep-rule-strong); }
.ep-exam-host .btn:active { transform: translateY(1px); }
.ep-exam-host .btn:disabled { opacity: .45; cursor: not-allowed; }
.ep-exam-host .btn.btn-primary {
	background: var(--ep-ink); color: var(--ep-surface); border-color: var(--ep-ink);
}
.ep-exam-host .btn.btn-primary:hover { background: var(--ep-ink-2); border-color: var(--ep-ink-2); }
.ep-exam-host .btn.btn-accent {
	background: var(--ep-accent); color: #fff; border-color: var(--ep-accent);
}
.ep-exam-host .btn.btn-accent:hover { background: var(--ep-accent-2); border-color: var(--ep-accent-2); }
.ep-exam-host .btn.btn-ghost { background: transparent; border-color: transparent; }
.ep-exam-host .btn.btn-ghost:hover { background: var(--ep-surface-2); }
.ep-exam-host .btn.sm { height: 30px; padding: 0 12px; font-size: 13px; }
.ep-exam-host .btn.lg { height: 46px; padding: 0 22px; font-size: 15px; }

.ep-exam-host .ep-link-btn {
	background: transparent; border: 0; padding: 0;
	color: var(--ep-accent); font-weight: 500;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: color-mix(in oklab, var(--ep-accent) 40%, transparent);
}
.ep-exam-host .ep-link-btn:hover { text-decoration-color: var(--ep-accent); }

/* Pills */
.ep-exam-host .pill {
	display: inline-flex; align-items: center; gap: 6px;
	height: 22px; padding: 0 10px;
	border-radius: 999px;
	font-size: 11.5px; font-weight: 600;
	background: var(--ep-surface-2); color: var(--ep-text-2);
	border: 1px solid var(--ep-rule);
}
.ep-exam-host .pill.success { background: var(--ep-success-tint); color: var(--ep-success); border-color: color-mix(in oklab, var(--ep-success) 30%, transparent); }
.ep-exam-host .pill.error   { background: var(--ep-error-tint);   color: var(--ep-error);   border-color: color-mix(in oklab, var(--ep-error) 30%, transparent); }
.ep-exam-host .pill.warn    { background: var(--ep-warn-tint);    color: var(--ep-warn);    border-color: color-mix(in oklab, var(--ep-warn) 35%, transparent); }
.ep-exam-host .pill.info    { background: var(--ep-info-tint);    color: var(--ep-info);    border-color: color-mix(in oklab, var(--ep-info) 30%, transparent); }
.ep-exam-host .pill.accent  { background: var(--ep-accent-tint);  color: var(--ep-accent);  border-color: color-mix(in oklab, var(--ep-accent) 30%, transparent); }

/* Animations */
@keyframes ep-score-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ep-slide-up   { from { opacity: 0; transform: translateY(8px);  } to { opacity: 1; transform: none; } }
@keyframes ep-pulse      { 0%,100% { transform: scale(0.8); opacity: 0.5; } 50% { transform: scale(1.2); opacity: 1; } }
.ep-exam-host .ep-fade-in { animation: ep-slide-up .35s ease both; }

/* =========================================================================
 * Landing (Phase 11 entry point — now editorial)
 * ========================================================================= */

.ep-exam-host .ep-landing {
	max-width: 760px;
	margin: 40px auto;
	padding: 0 20px;
}
.ep-exam-host .ep-landing-card {
	background: var(--ep-card);
	border: 1px solid var(--ep-card-edge);
	border-radius: var(--ep-r-xl);
	padding: 64px 56px;
	box-shadow: var(--ep-shadow-2);
	position: relative;
	overflow: hidden;
	text-align: center;
}
.ep-exam-host .ep-landing-card::before {
	content: "";
	position: absolute; inset: 6px;
	border: 1px solid var(--ep-rule);
	border-radius: 10px;
	pointer-events: none;
}
.ep-exam-host .ep-landing-eyebrow { display: block; margin-bottom: 14px; }
.ep-exam-host .ep-landing-title {
	font-family: var(--ep-font-display);
	font-size: clamp(32px, 4.4vw, 46px);
	font-weight: 500;
	letter-spacing: -0.015em;
	color: var(--ep-ink);
	margin: 0 0 14px;
	line-height: 1.1;
}
.ep-exam-host .ep-landing-sub {
	font-size: 16px;
	color: var(--ep-text-2);
	max-width: 480px;
	margin: 0 auto 36px;
	line-height: 1.6;
}
.ep-exam-host .ep-landing-actions {
	display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
.ep-exam-host .ep-landing-actions .btn { min-width: 200px; }

/* =========================================================================
 * Pre-exam start screen
 * ========================================================================= */

.ep-exam-host .ep-prestart {
	max-width: 760px;
	margin: 40px auto 80px;
	padding: 0 20px;
}
.ep-exam-host .ep-prestart-card {
	background: var(--ep-card);
	border: 1px solid var(--ep-card-edge);
	border-radius: var(--ep-r-xl);
	padding: 56px;
	box-shadow: var(--ep-shadow-2);
	position: relative;
	overflow: hidden;
}
.ep-exam-host .ep-prestart-card::before {
	content: "";
	position: absolute; inset: 6px;
	border: 1px solid var(--ep-rule);
	border-radius: 10px;
	pointer-events: none;
}
.ep-exam-host .ep-prestart-head { text-align: center; margin-bottom: 36px; }
.ep-exam-host .ep-prestart-title {
	font-family: var(--ep-font-display);
	font-size: clamp(28px, 4vw, 42px);
	margin: 12px 0 14px;
	line-height: 1.15;
	letter-spacing: -0.015em;
	color: var(--ep-ink);
	font-weight: 500;
}
.ep-exam-host .ep-prestart-sub {
	font-size: 16px;
	color: var(--ep-text-2);
	max-width: 480px;
	margin: 0 auto;
}

.ep-exam-host .ep-prestart-meta {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0;
	margin: 0 0 8px;
	padding: 24px 0;
	border-top: 1px solid var(--ep-rule);
	border-bottom: 1px solid var(--ep-rule);
}
.ep-exam-host .ep-prestart-meta > div {
	text-align: center;
	padding: 8px 16px;
	border-right: 1px solid var(--ep-rule-soft);
}
.ep-exam-host .ep-prestart-meta > div:nth-child(3n) { border-right: 0; }
.ep-exam-host .ep-prestart-meta dt {
	font-size: 10px; font-weight: 600;
	letter-spacing: 0.16em; text-transform: uppercase;
	color: var(--ep-text-3);
	margin: 0 0 6px;
}
.ep-exam-host .ep-prestart-meta dd {
	font-family: var(--ep-font-display);
	font-size: 24px;
	color: var(--ep-ink);
	margin: 0; font-weight: 500;
}
.ep-exam-host .ep-prestart-meta dd.mono { font-family: var(--ep-font-mono); font-size: 20px; }

.ep-exam-host .ep-prestart-tasks { margin: 24px 0; }
.ep-exam-host .ep-prestart-tasks .h-eyebrow { display: block; margin-bottom: 12px; }
.ep-exam-host .ep-task-outline { list-style: none; padding: 0; margin: 0; }
.ep-exam-host .ep-task-outline li {
	display: grid;
	grid-template-columns: 28px 1fr auto auto;
	gap: 16px;
	align-items: center;
	padding: 12px 0;
	border-top: 1px solid var(--ep-rule-soft);
	font-size: 14px;
}
.ep-exam-host .ep-task-outline li:last-child { border-bottom: 1px solid var(--ep-rule-soft); }
.ep-exam-host .ep-task-outline-num {
	width: 24px; height: 24px;
	display: flex; align-items: center; justify-content: center;
	border-radius: 50%;
	background: var(--ep-surface-2);
	color: var(--ep-ink);
	font-size: 12px;
}
.ep-exam-host .ep-task-outline-title { font-weight: 500; color: var(--ep-ink); }
.ep-exam-host .ep-task-outline-type {
	font-size: 12px; color: var(--ep-text-3);
	text-transform: capitalize;
}
.ep-exam-host .ep-task-outline-q { font-size: 12px; color: var(--ep-text-2); }

.ep-exam-host .ep-prestart-rules { margin: 24px 0; }
.ep-exam-host .ep-prestart-rules .h-eyebrow { display: block; margin-bottom: 12px; }
.ep-exam-host .ep-prestart-rules ul {
	list-style: none; padding: 0; margin: 0;
	display: flex; flex-direction: column; gap: 10px;
}
.ep-exam-host .ep-prestart-rules li {
	display: grid; grid-template-columns: 16px 1fr; gap: 12px;
	font-size: 13.5px; color: var(--ep-text-2); line-height: 1.55;
}
.ep-exam-host .ep-prestart-rules li::before {
	content: "·";
	font-size: 22px; color: var(--ep-accent);
	line-height: 0.8; font-weight: 700;
}

.ep-exam-host .ep-prestart-foot {
	display: flex; align-items: center; justify-content: space-between;
	gap: 24px; padding-top: 24px;
	border-top: 1px solid var(--ep-rule);
}
.ep-exam-host .ep-prestart-quota { display: flex; flex-direction: column; gap: 2px; }
.ep-exam-host .ep-prestart-quota-value {
	font-family: var(--ep-font-display);
	font-size: 22px; color: var(--ep-ink); line-height: 1;
	font-feature-settings: "tnum" 1;
}
.ep-exam-host .ep-prestart-quota-label { font-size: 12px; color: var(--ep-text-3); }
.ep-exam-host .ep-prestart-actions { display: flex; gap: 10px; }

@media (max-width: 720px) {
	.ep-exam-host .ep-prestart-card { padding: 32px 22px; }
	.ep-exam-host .ep-prestart-meta { grid-template-columns: repeat(2, 1fr); }
	.ep-exam-host .ep-prestart-meta > div:nth-child(3n) { border-right: 1px solid var(--ep-rule-soft); }
	.ep-exam-host .ep-prestart-meta > div:nth-child(2n) { border-right: 0; }
	.ep-exam-host .ep-prestart-foot { flex-direction: column; align-items: stretch; }
	.ep-exam-host .ep-prestart-actions { justify-content: space-between; }
	.ep-exam-host .ep-landing-card { padding: 40px 22px; }
}

/* =========================================================================
 * In-progress exam shell
 * ========================================================================= */

.ep-exam-host .ep-shell {
	display: flex; flex-direction: column;
	max-width: 1200px; width: 100%;
	margin: 0 auto;
	padding: 24px 32px 80px;
	gap: 24px;
}

.ep-exam-host .ep-shell-head {
	display: flex; align-items: center; justify-content: space-between;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--ep-rule);
}
.ep-exam-host .ep-shell-head-left { display: flex; flex-direction: column; gap: 2px; }
.ep-exam-host .ep-shell-head-left .h-eyebrow { font-size: 10px; }
.ep-exam-host .ep-shell-head-title { font-size: 14px; font-weight: 500; color: var(--ep-ink); }

.ep-exam-host .ep-shell-head-right { display: flex; align-items: center; gap: 18px; }
.ep-exam-host .ep-shell-timer {
	display: inline-flex; align-items: center; gap: 6px;
	height: 30px; padding: 0 12px;
	background: var(--ep-card);
	border: 1px solid var(--ep-rule);
	border-radius: 999px;
	font-size: 13px; color: var(--ep-ink);
}
.ep-exam-host .ep-shell-progress {
	display: inline-flex; align-items: baseline; gap: 4px;
	font-size: 13px;
}
.ep-exam-host .ep-shell-progress > .mono { font-size: 15px; font-weight: 500; color: var(--ep-ink); }
.ep-exam-host .ep-shell-progress-sep { color: var(--ep-text-3); }
.ep-exam-host .ep-shell-progress-label { color: var(--ep-text-3); margin-left: 4px; font-size: 12px; }

/* Task strip */
.ep-exam-host .ep-taskstrip {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 6px;
	padding: 4px;
	background: var(--ep-surface-2);
	border-radius: var(--ep-r-lg);
}
.ep-exam-host .ep-taskstrip-btn {
	display: flex; flex-direction: column; gap: 6px;
	text-align: left;
	padding: 10px 12px;
	border: 1px solid transparent;
	background: transparent;
	border-radius: var(--ep-r-md);
	cursor: pointer;
	transition: background .12s, border-color .12s;
	min-width: 0;
}
.ep-exam-host .ep-taskstrip-btn:hover { background: var(--ep-card); border-color: var(--ep-rule); }
.ep-exam-host .ep-taskstrip-btn.is-current {
	background: var(--ep-card);
	border-color: var(--ep-accent);
	box-shadow: 0 0 0 3px var(--ep-accent-tint);
}
.ep-exam-host .ep-taskstrip-num { font-size: 11px; color: var(--ep-text-3); font-weight: 600; }
.ep-exam-host .ep-taskstrip-meta {
	display: flex; align-items: baseline; justify-content: space-between;
	gap: 8px; min-width: 0;
}
.ep-exam-host .ep-taskstrip-title {
	font-size: 13px; font-weight: 500; color: var(--ep-ink);
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ep-exam-host .ep-taskstrip-q { font-size: 11px; color: var(--ep-text-3); flex-shrink: 0; }
.ep-exam-host .ep-taskstrip-bar {
	height: 2px;
	background: var(--ep-rule);
	border-radius: 1px;
	overflow: hidden;
}
.ep-exam-host .ep-taskstrip-fill {
	display: block; height: 100%;
	background: var(--ep-accent);
	transition: width .25s;
}
.ep-exam-host .ep-taskstrip-btn.is-complete .ep-taskstrip-fill { background: var(--ep-success); }
.ep-exam-host .ep-taskstrip-btn.is-complete .ep-taskstrip-num::before { content: "✓ "; color: var(--ep-success); }

@media (max-width: 900px) {
	.ep-exam-host .ep-taskstrip { grid-template-columns: repeat(7, 64px); overflow-x: auto; }
}

/* Body */
.ep-exam-host .ep-shell-body {
	background: var(--ep-card);
	border: 1px solid var(--ep-card-edge);
	border-radius: var(--ep-r-lg);
	box-shadow: var(--ep-shadow-1);
}

/* Footer */
.ep-exam-host .ep-shell-foot {
	display: flex; align-items: center; justify-content: space-between;
	gap: 20px;
}
.ep-exam-host .ep-shell-foot-meta { color: var(--ep-text-3); }

@media (max-width: 720px) {
	.ep-exam-host .ep-shell { padding: 16px 14px 40px; gap: 16px; }
	.ep-exam-host .ep-shell-head { flex-direction: column; align-items: stretch; gap: 12px; }
	.ep-exam-host .ep-shell-head-right { justify-content: space-between; }
}

/* =========================================================================
 * Task content
 * ========================================================================= */

.ep-exam-host .ep-task { padding: 36px 44px 40px; }
.ep-exam-host .ep-task-head { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--ep-rule); }
.ep-exam-host .ep-task-eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ep-exam-host .ep-task-dot { color: var(--ep-rule-strong); }
.ep-exam-host .ep-task-type { color: var(--ep-accent) !important; text-transform: lowercase !important; letter-spacing: 0.12em !important; }
.ep-exam-host .ep-task-title {
	font-family: var(--ep-font-display); font-weight: 500;
	font-size: clamp(24px, 3vw, 32px);
	margin: 0 0 12px;
	color: var(--ep-ink);
	letter-spacing: -0.01em;
}
.ep-exam-host .ep-task-instructions {
	font-size: 15px; color: var(--ep-text-2);
	margin: 0; max-width: 64ch; line-height: 1.6;
}

@media (max-width: 720px) { .ep-exam-host .ep-task { padding: 24px 18px 28px; } }

/* MCQ */
.ep-exam-host .ep-mcq {
	list-style: none; padding: 0; margin: 14px 0 0;
	display: flex; flex-direction: column; gap: 8px;
}
.ep-exam-host .ep-mcq-row {
	display: grid;
	grid-template-columns: 28px 1fr;
	gap: 16px;
	align-items: start;
	padding: 12px 14px 12px 12px;
	border: 1px solid var(--ep-rule);
	border-radius: var(--ep-r-md);
	background: var(--ep-card);
	cursor: pointer;
	transition: border-color .12s, background .12s, box-shadow .12s;
}
.ep-exam-host .ep-mcq-row:hover { border-color: var(--ep-rule-strong); background: var(--ep-surface); }
.ep-exam-host .ep-mcq-row.is-selected {
	border-color: var(--ep-accent);
	background: var(--ep-accent-tint);
	box-shadow: 0 0 0 1px var(--ep-accent) inset;
}
.ep-exam-host .ep-mcq-row input[type="radio"] {
	position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none;
}
.ep-exam-host .ep-mcq-letter {
	width: 28px; height: 28px;
	display: flex; align-items: center; justify-content: center;
	border-radius: 50%;
	background: var(--ep-surface-2);
	border: 1px solid var(--ep-rule);
	font-family: var(--ep-font-mono);
	font-size: 12px; font-weight: 600;
	color: var(--ep-ink); flex-shrink: 0;
}
.ep-exam-host .ep-mcq-row.is-selected .ep-mcq-letter {
	background: var(--ep-accent); color: #fff; border-color: var(--ep-accent);
}
.ep-exam-host .ep-mcq-text { font-size: 14.5px; color: var(--ep-text); line-height: 1.5; }

/* Question */
.ep-exam-host .ep-q { padding: 22px 0; border-bottom: 1px solid var(--ep-rule-soft); }
.ep-exam-host .ep-q:last-child { border-bottom: 0; }
.ep-exam-host .ep-q-head {
	display: grid;
	grid-template-columns: 28px 1fr;
	gap: 16px;
	align-items: start;
}
.ep-exam-host .ep-q-num {
	width: 28px; height: 28px;
	display: flex; align-items: center; justify-content: center;
	border-radius: 4px;
	background: var(--ep-ink); color: var(--ep-surface);
	font-family: var(--ep-font-mono);
	font-size: 12px; font-weight: 600;
}
.ep-exam-host .ep-q-prompt {
	font-size: 15.5px; color: var(--ep-ink);
	line-height: 1.55; margin-top: 3px;
	white-space: pre-line;
}
.ep-exam-host .ep-q .ep-mcq { margin-left: 44px; }

.ep-exam-host .ep-q-inline { padding: 14px 0; }
.ep-exam-host .ep-q-inline .ep-q-head {
	grid-template-columns: 28px minmax(0, 1fr) auto;
	align-items: start;
	gap: 12px 16px;
}
.ep-exam-host .ep-q-inline .ep-q-prompt {
	font-size: 13.5px;
	color: var(--ep-text-2);
	min-width: 0;
}
.ep-exam-host .ep-q-inline .ep-letterpick {
	margin-left: 0;
	justify-self: end;
	flex-wrap: nowrap;
}
/* When picker has many letters or prompt is long, allow wrap below */
.ep-exam-host .ep-q-inline.ep-q-block .ep-q-head {
	grid-template-columns: 28px 1fr;
}
.ep-exam-host .ep-q-inline.ep-q-block .ep-letterpick {
	grid-column: 2 / -1;
	justify-self: start;
	margin-top: 6px;
	flex-wrap: wrap;
}
@media (max-width: 720px) {
	.ep-exam-host .ep-q-inline .ep-q-head { grid-template-columns: 28px 1fr; }
	.ep-exam-host .ep-q-inline .ep-letterpick {
		grid-column: 2 / -1;
		justify-self: start;
		margin-top: 6px;
		flex-wrap: wrap;
	}
}

.ep-exam-host .ep-questions { display: flex; flex-direction: column; }

/* Listening audio shell */
.ep-exam-host .ep-audio-shell {
	background: linear-gradient(180deg, var(--ep-surface-2), var(--ep-surface-3));
	border: 1px solid var(--ep-rule);
	border-radius: var(--ep-r-lg);
	padding: 18px 22px;
	margin-bottom: 24px;
}
.ep-exam-host .ep-audio-meta {
	display: flex; align-items: baseline; justify-content: space-between;
	margin-bottom: 14px;
}
.ep-exam-host .ep-audio-player { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ep-exam-host .ep-audio-startbtn {
	display: inline-flex; align-items: center; justify-content: center;
	gap: 8px;
	min-height: 44px; padding: 0 22px;
	border-radius: 999px;
	background: var(--ep-ink); color: var(--ep-surface);
	border: 0; cursor: pointer;
	font-family: var(--ep-font-ui, inherit);
	font-size: 15px; font-weight: 600; letter-spacing: .01em;
	white-space: nowrap;
	transition: background .12s, transform .08s, opacity .12s;
}
.ep-exam-host .ep-audio-startbtn:hover:not([disabled]) { background: var(--ep-ink-2); }
.ep-exam-host .ep-audio-startbtn:active:not([disabled]) { transform: scale(0.98); }
.ep-exam-host .ep-audio-startbtn.is-locked {
	cursor: default; opacity: 1;
	background: var(--ep-accent-tint); color: var(--ep-accent);
}
.ep-exam-host .ep-audio-startbtn.is-playing {
	background: var(--ep-accent); color: #fff;
}
.ep-exam-host .ep-audio-startbtn[disabled] { cursor: default; }
.ep-exam-host .ep-audio-track {
	flex: 1;
	height: 4px;
	background: var(--ep-rule-strong);
	border-radius: 2px;
	overflow: hidden;
	cursor: pointer;
}
.ep-exam-host .ep-audio-fill {
	display: block; height: 100%;
	background: var(--ep-accent); border-radius: 2px;
	transition: width .15s linear;
}
.ep-exam-host .ep-audio-time {
	font-size: 12.5px; color: var(--ep-text-2);
	min-width: 90px; text-align: right;
}
.ep-exam-host .ep-audio-help {
	margin-top: 12px;
	font-size: 12.5px; color: var(--ep-text-3);
	font-style: italic;
}
.ep-exam-host .ep-audio-fallback { margin-top: 4px; }
.ep-exam-host .ep-audio-fallback audio { width: 100%; }
.ep-exam-host .ep-audio-missing {
	background: var(--ep-warn-tint);
	border: 1px solid color-mix(in oklab, var(--ep-warn) 35%, transparent);
	color: var(--ep-warn);
	padding: 12px 16px;
	border-radius: var(--ep-r-md);
	font-size: 13.5px;
	margin-bottom: 18px;
}

/* Reading passage / cloze passage */
.ep-exam-host .ep-passage {
	font-family: var(--ep-font-display);
	font-size: 17px;
	line-height: 1.75;
	color: var(--ep-text);
	background: var(--ep-surface-2);
	padding: 28px 36px;
	border-radius: var(--ep-r-lg);
	border: 1px solid var(--ep-rule);
	margin-bottom: 24px;
	white-space: pre-wrap;
}
.ep-exam-host .ep-reading-passage {
	font-family: var(--ep-font-display);
	font-size: 17px; line-height: 1.75;
	color: var(--ep-text);
	margin-bottom: 28px;
	white-space: pre-wrap;
}
.ep-exam-host .ep-reading-passage p { margin: 0 0 16px; }

/* Gap markers (read-only — paragraph-match) */
.ep-exam-host .ep-gap {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 36px; height: 26px;
	padding: 0 8px;
	margin: 0 2px;
	background: var(--ep-card);
	border: 1px dashed var(--ep-rule-strong);
	border-radius: 4px;
	font-family: var(--ep-font-mono);
	font-size: 12.5px; color: var(--ep-text-2);
	vertical-align: middle;
}
.ep-exam-host .ep-gap.is-filled {
	background: var(--ep-accent-tint);
	border: 1px solid var(--ep-accent);
	color: var(--ep-accent);
	font-weight: 600;
}
.ep-exam-host .ep-gap-num { color: var(--ep-text-3); }
.ep-exam-host .ep-gap-letter { font-weight: 700; }

/* Gap selects (interactive — cloze) */
.ep-exam-host .ep-gap-select {
	display: inline-block;
	min-width: 80px; height: 26px;
	padding: 0 6px;
	margin: 0 2px;
	border: 1px dashed var(--ep-rule-strong);
	border-radius: 4px;
	background: var(--ep-card);
	font-family: var(--ep-font-mono);
	font-size: 12.5px; color: var(--ep-text-2);
	vertical-align: middle;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='6' viewBox='0 0 8 6'><path d='M1 1l3 4 3-4' stroke='%238B8F9E' stroke-width='1.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
	background-repeat: no-repeat;
	background-position: right 6px center;
	padding-right: 18px;
}
.ep-exam-host .ep-gap-select.is-filled {
	background-color: var(--ep-accent-tint);
	border: 1px solid var(--ep-accent);
	color: var(--ep-accent);
	font-weight: 600;
}
/* Keep gap <select>s inline — the theme's global `select { width:100% }`
   otherwise stretches them to full width. */
.ep-exam-host .ep-gap-select { width: auto; max-width: 240px; }

/* Interactive word-bank cloze: flowing text with inline pick-a-word gaps */
.ep-exam-host .ep-passage--gaps { white-space: normal; }
.ep-exam-host .ep-gap-inline { position: relative; display: inline-block; vertical-align: baseline; margin: 0 3px; }
.ep-exam-host .ep-gap-pick {
	display: inline-flex; align-items: center; gap: 6px;
	min-height: 26px; padding: 1px 10px 1px 4px;
	border: 1px dashed var(--ep-rule-strong); border-radius: 999px;
	background: var(--ep-card); color: var(--ep-text-2);
	font-family: inherit; font-size: 14px; line-height: 1.35;
	cursor: pointer; vertical-align: baseline;
	transition: border-color .12s ease, background .12s ease;
}
.ep-exam-host .ep-gap-pick:hover { border-color: var(--ep-accent); }
.ep-exam-host .ep-gap-pick.is-filled {
	border-style: solid; border-color: var(--ep-accent);
	background: var(--ep-accent-tint); color: var(--ep-accent);
	padding-right: 12px;
}
.ep-exam-host .ep-gap-pick-n {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 19px; height: 19px; padding: 0 5px;
	border-radius: 999px; background: var(--ep-accent); color: #fff;
	font-family: var(--ep-font-mono); font-size: 11px; font-weight: 700;
}
.ep-exam-host .ep-gap-pick-word { font-weight: 600; }
.ep-exam-host .ep-gap-pop {
	position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
	min-width: 210px; max-width: 290px;
	background: var(--ep-card); border: 1px solid var(--ep-rule-strong);
	border-radius: var(--ep-r-lg, 12px); box-shadow: 0 10px 30px rgba(0,0,0,.16);
	padding: 8px;
}
.ep-exam-host .ep-gap-pop-head {
	display: block; padding: 2px 6px 6px;
	font-family: var(--ep-font-mono); font-size: 11px; letter-spacing: .04em;
	text-transform: uppercase; color: var(--ep-text-3);
}
.ep-exam-host .ep-gap-pop-opts { display: block; max-height: 230px; overflow-y: auto; }
.ep-exam-host .ep-gap-opt {
	display: flex; align-items: center; gap: 9px; width: 100%;
	padding: 7px 8px; border: 0; background: none; cursor: pointer;
	text-align: left; border-radius: 7px;
	font-family: inherit; font-size: 14px; color: var(--ep-text);
}
.ep-exam-host .ep-gap-opt:hover { background: var(--ep-surface-2); }
.ep-exam-host .ep-gap-opt.is-active { background: var(--ep-accent-tint); color: var(--ep-accent); }
.ep-exam-host .ep-gap-opt-l {
	display: inline-flex; align-items: center; justify-content: center;
	width: 21px; height: 21px; flex-shrink: 0; border-radius: 5px;
	background: var(--ep-surface-2); color: var(--ep-text-2);
	font-family: var(--ep-font-mono); font-size: 11px; font-weight: 700;
}
.ep-exam-host .ep-gap-opt-clear {
	justify-content: center; margin-top: 4px; padding-top: 9px;
	border-top: 1px solid var(--ep-rule-soft); border-radius: 0;
	color: var(--ep-text-3); font-size: 12.5px;
}

/* Bank */
.ep-exam-host .ep-bank { margin: 24px 0; }
.ep-exam-host .ep-bank .h-eyebrow { display: block; margin-bottom: 12px; }
.ep-exam-host .ep-bank-list {
	list-style: none; padding: 16px 20px; margin: 0;
	background: var(--ep-card);
	border: 1px solid var(--ep-rule);
	border-radius: var(--ep-r-md);
	display: flex; flex-direction: column; gap: 8px;
}
.ep-exam-host .ep-bank-list li {
	display: grid; grid-template-columns: 28px 1fr; gap: 12px;
	align-items: start;
	font-size: 14px; line-height: 1.5; color: var(--ep-text);
}
.ep-exam-host .ep-bank-letter {
	width: 24px; height: 24px;
	display: flex; align-items: center; justify-content: center;
	background: var(--ep-surface-2);
	border-radius: 4px;
	font-family: var(--ep-font-mono);
	font-size: 11.5px; font-weight: 700;
	color: var(--ep-ink); flex-shrink: 0;
}
.ep-exam-host .ep-bank-inline {
	background: var(--ep-card);
	border: 1px solid var(--ep-rule);
	border-radius: var(--ep-r-md);
	padding: 16px 18px;
	margin-bottom: 18px;
}
.ep-exam-host .ep-bank-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ep-exam-host .ep-bank-chip {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 4px 10px 4px 4px;
	background: var(--ep-surface-2);
	border-radius: 999px;
	font-size: 13px;
}
.ep-exam-host .ep-bank-chip .ep-bank-letter { width: 22px; height: 22px; font-size: 10.5px; }

/* Letter picker (paragraph_match / dialogue_match) */
.ep-exam-host .ep-letterpick {
	display: inline-flex; gap: 4px; margin-left: 18px; flex-wrap: wrap;
	vertical-align: middle;
}
.ep-exam-host .ep-letterpick-btn {
	width: 32px; height: 32px;
	display: inline-flex; align-items: center; justify-content: center;
	box-sizing: border-box; padding: 0; line-height: 1;
	border-radius: var(--ep-r-md);
	border: 1px solid var(--ep-rule);
	background: var(--ep-card);
	font-family: var(--ep-font-mono);
	font-size: 13px; font-weight: 600;
	color: var(--ep-text);
	cursor: pointer;
	transition: all .12s;
}
.ep-exam-host .ep-letterpick-btn:hover { border-color: var(--ep-rule-strong); }
.ep-exam-host .ep-letterpick-btn.is-selected {
	background: var(--ep-accent);
	border-color: var(--ep-accent);
	color: #fff;
}
/* Stroke-based icons (arrows, check, clock, ticks) inherit currentColor.
   Defend against theme svg resets that force fill/stroke. */
.ep-exam-host .btn svg path,
.ep-exam-host .ep-shell-foot svg path,
.ep-exam-host .ep-head svg path,
.ep-exam-host .ep-head svg circle {
	stroke: currentColor; fill: none;
}
.ep-exam-host .ep-letterpick-clear {
	height: 32px; padding: 0 10px;
	border: 0; background: transparent;
	font-size: 12px; color: var(--ep-text-3);
	cursor: pointer;
}
.ep-exam-host .ep-letterpick-clear[disabled] { opacity: .4; cursor: not-allowed; }

/* Dialogue */
.ep-exam-host .ep-dialogue {
	padding: 28px 36px;
	background: var(--ep-surface-2);
	border-radius: var(--ep-r-lg);
	border: 1px solid var(--ep-rule);
	display: flex; flex-direction: column; gap: 16px;
	margin-bottom: 24px;
}
.ep-exam-host .ep-dialogue-line {
	display: grid; grid-template-columns: 80px 1fr; gap: 16px;
	align-items: baseline;
	font-family: var(--ep-font-display);
	font-size: 16px; line-height: 1.55;
}
.ep-exam-host .ep-dialogue-speaker {
	font-family: var(--ep-font-ui);
	font-size: 11px; font-weight: 600;
	letter-spacing: 0.14em; text-transform: uppercase;
	color: var(--ep-accent);
}
.ep-exam-host .ep-dialogue-text { color: var(--ep-text); }

/* Essay */
.ep-exam-host .ep-essay-prompt {
	margin-bottom: 20px;
	padding: 20px 24px;
	background: var(--ep-surface-2);
	border-left: 3px solid var(--ep-accent);
	border-radius: var(--ep-r-md);
}
.ep-exam-host .ep-essay-prompt .h-eyebrow { display: block; margin-bottom: 8px; }
.ep-exam-host .ep-essay-topic {
	font-family: var(--ep-font-display);
	font-size: 17px; line-height: 1.55;
	color: var(--ep-ink);
	margin: 0 0 12px;
	font-style: italic;
}
.ep-exam-host .ep-essay-rules {
	display: flex; gap: 6px; flex-wrap: wrap;
	font-size: 12px; color: var(--ep-text-3);
}
.ep-exam-host .ep-essay-rules > span:not([aria-hidden]) { color: var(--ep-text-2); }

.ep-exam-host .ep-essay-wrap { display: flex; flex-direction: column; }
.ep-exam-host .ep-essay-input {
	font-family: var(--ep-font-display);
	font-size: 16px; line-height: 1.75;
	color: var(--ep-text);
	background: var(--ep-card);
	border: 1px solid var(--ep-card-edge);
	border-radius: var(--ep-r-md);
	padding: 18px 22px;
	resize: vertical;
	min-height: 280px;
	width: 100%;
}
.ep-exam-host .ep-essay-input:focus {
	border-color: var(--ep-accent);
	box-shadow: 0 0 0 3px var(--ep-accent-tint);
	outline: none;
}
.ep-exam-host .ep-essay-footer {
	margin-top: 10px;
	display: flex; justify-content: space-between; align-items: baseline;
	font-size: 13px;
}
.ep-exam-host .ep-essay-wc .mono {
	font-size: 18px;
	color: var(--ep-ink);
	font-family: var(--ep-font-display);
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}
.ep-exam-host .ep-essay-wc-label { color: var(--ep-text-3); margin-left: 4px; }
.ep-exam-host .ep-essay-wc-status { color: var(--ep-text-3); }
.ep-exam-host .wc-under .ep-essay-wc .mono { color: var(--ep-warn); }
.ep-exam-host .wc-under .ep-essay-wc-status { color: var(--ep-warn); }
.ep-exam-host .wc-over  .ep-essay-wc .mono { color: var(--ep-error); }
.ep-exam-host .wc-over  .ep-essay-wc-status { color: var(--ep-error); }
.ep-exam-host .wc-ok    .ep-essay-wc .mono { color: var(--ep-success); }
.ep-exam-host .wc-ok    .ep-essay-wc-status { color: var(--ep-success); }

@media (max-width: 720px) {
	.ep-exam-host .ep-passage,
	.ep-exam-host .ep-reading-passage,
	.ep-exam-host .ep-dialogue,
	.ep-exam-host .ep-essay-prompt { padding: 18px; font-size: 15px; }
	.ep-exam-host .ep-dialogue-line { grid-template-columns: 1fr; gap: 4px; }
}

/* =========================================================================
 * Submitting transition
 * ========================================================================= */

.ep-exam-host .ep-submitting {
	display: flex; align-items: center; justify-content: center;
	padding: 80px 20px;
}
.ep-exam-host .ep-submitting-card {
	background: var(--ep-card);
	border: 1px solid var(--ep-card-edge);
	border-radius: var(--ep-r-xl);
	padding: 56px 64px;
	box-shadow: var(--ep-shadow-2);
	text-align: center;
	max-width: 480px;
}
.ep-exam-host .ep-submitting-spinner { display: flex; justify-content: center; margin-bottom: 20px; }
.ep-exam-host .ep-submitting-card h2 {
	font-family: var(--ep-font-display); font-weight: 500;
	font-size: 26px; margin: 0 0 4px; color: var(--ep-ink);
}
.ep-exam-host .ep-submitting-sub { color: var(--ep-text-3); margin: 0 0 28px; }

.ep-exam-host .ep-submitting-steps {
	list-style: none; padding: 0; margin: 0;
	text-align: left;
	display: flex; flex-direction: column; gap: 12px;
}
.ep-exam-host .ep-submitting-steps li {
	display: grid; grid-template-columns: 18px 1fr; gap: 12px;
	align-items: center;
	font-size: 14px; color: var(--ep-text-3);
	transition: color .25s;
}
.ep-exam-host .ep-submitting-steps li.is-active { color: var(--ep-ink); font-weight: 500; }
.ep-exam-host .ep-submitting-steps li.is-done { color: var(--ep-text-2); }
.ep-exam-host .ep-submitting-tick {
	width: 18px; height: 18px;
	border-radius: 50%;
	background: var(--ep-surface-2);
	display: flex; align-items: center; justify-content: center;
	color: var(--ep-success);
}
.ep-exam-host .ep-submitting-steps li.is-active .ep-submitting-tick { background: var(--ep-accent-tint); }
.ep-exam-host .ep-submitting-pulse {
	width: 8px; height: 8px;
	background: var(--ep-accent);
	border-radius: 50%;
	animation: ep-pulse 1.1s ease-in-out infinite;
}

/* =========================================================================
 * Results
 * ========================================================================= */

.ep-exam-host .ep-results {
	max-width: 1100px; margin: 0 auto;
	padding: 32px 32px 80px;
	display: flex; flex-direction: column; gap: 32px;
}

.ep-exam-host .ep-results-hero {
	display: grid; grid-template-columns: 1fr auto;
	gap: 40px; align-items: center;
	padding: 40px 44px;
	background: var(--ep-card);
	border: 1px solid var(--ep-card-edge);
	border-radius: var(--ep-r-xl);
	box-shadow: var(--ep-shadow-2);
	position: relative; overflow: hidden;
}
.ep-exam-host .ep-results-hero::after {
	content: "";
	position: absolute;
	right: -120px; bottom: -120px;
	width: 360px; height: 360px;
	background: radial-gradient(circle, var(--ep-accent-tint) 0%, transparent 70%);
	opacity: 0.4;
	pointer-events: none;
}
.ep-exam-host .ep-results-hero-left { position: relative; z-index: 1; }
.ep-exam-host .ep-results-title {
	font-family: var(--ep-font-display); font-weight: 500;
	font-size: clamp(28px, 3.6vw, 38px);
	margin: 8px 0 8px;
	color: var(--ep-ink);
	letter-spacing: -0.015em;
}
.ep-exam-host .ep-results-sub {
	font-size: 15px; color: var(--ep-text-2);
	margin: 0 0 22px; max-width: 55ch;
}
.ep-exam-host .ep-results-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ep-exam-host .ep-results-hero-right { position: relative; z-index: 1; }
.ep-exam-host .ep-score-card {
	display: flex; flex-direction: column; align-items: flex-end;
	gap: 4px;
	padding: 20px 28px;
	border-left: 1px solid var(--ep-rule);
	min-width: 240px;
}
.ep-exam-host .ep-score-card .h-eyebrow { font-size: 10px; }
.ep-exam-host .ep-score-big {
	font-family: var(--ep-font-display); font-weight: 500;
	font-size: clamp(72px, 10vw, 110px);
	line-height: 0.95;
	color: var(--ep-ink);
	letter-spacing: -0.04em;
	animation: ep-score-rise .6s ease both;
}
.ep-exam-host .ep-score-max { font-size: 0.4em; color: var(--ep-text-3); font-weight: 400; }
.ep-exam-host .ep-score-meta { display: flex; gap: 6px; margin-top: 6px; }

@media (max-width: 720px) {
	.ep-exam-host .ep-results { padding: 16px 14px 40px; gap: 20px; }
	.ep-exam-host .ep-results-hero { grid-template-columns: 1fr; padding: 28px; }
	.ep-exam-host .ep-score-card { border-left: 0; border-top: 1px solid var(--ep-rule); padding: 20px 0 0; align-items: flex-start; min-width: 0; }
}

.ep-exam-host .ep-results-section { display: flex; flex-direction: column; gap: 18px; }
.ep-exam-host .ep-results-section-head {
	display: flex; align-items: flex-start; justify-content: space-between;
	gap: 24px;
}
.ep-exam-host .ep-results-section-head h2 {
	font-family: var(--ep-font-display); font-weight: 500;
	font-size: 22px; margin: 0 0 4px;
	color: var(--ep-ink); letter-spacing: -0.01em;
}
.ep-exam-host .ep-results-section-head p {
	margin: 0; font-size: 14px;
	color: var(--ep-text-3); max-width: 60ch;
}

/* Per-task bars */
.ep-exam-host .ep-pertask {
	background: var(--ep-card);
	border: 1px solid var(--ep-card-edge);
	border-radius: var(--ep-r-lg);
	padding: 12px 24px;
	display: flex; flex-direction: column;
}
.ep-exam-host .ep-pertask-row {
	display: grid;
	grid-template-columns: 32px 1fr 90px;
	gap: 24px;
	align-items: center;
	padding: 18px 0;
	border-top: 1px solid var(--ep-rule-soft);
}
.ep-exam-host .ep-pertask-row:first-child { border-top: 0; }
.ep-exam-host .ep-pertask-num {
	width: 30px; height: 30px;
	display: flex; align-items: center; justify-content: center;
	border-radius: 50%;
	background: var(--ep-surface-2);
	font-size: 13px; color: var(--ep-ink);
}
.ep-exam-host .ep-pertask-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ep-exam-host .ep-pertask-title {
	display: flex; align-items: baseline; gap: 10px;
	font-size: 15px; font-weight: 500; color: var(--ep-ink);
}
.ep-exam-host .ep-pertask-type { font-size: 12px; color: var(--ep-text-3); text-transform: capitalize; }
.ep-exam-host .ep-pertask-bar {
	height: 6px;
	background: var(--ep-surface-2);
	border-radius: 3px;
	overflow: hidden;
}
.ep-exam-host .ep-pertask-fill {
	display: block; height: 100%;
	background: var(--ep-accent);
	border-radius: 3px;
	transition: width 1s cubic-bezier(.2,.6,.2,1);
}
.ep-exam-host .tone-good .ep-pertask-fill { background: var(--ep-success); }
.ep-exam-host .tone-ok   .ep-pertask-fill { background: var(--ep-warn); }
.ep-exam-host .tone-low  .ep-pertask-fill { background: var(--ep-error); }
.ep-exam-host .ep-pertask-score {
	text-align: right;
	font-family: var(--ep-font-display);
	font-size: 22px; color: var(--ep-ink);
	font-variant-numeric: tabular-nums;
}
.ep-exam-host .ep-pertask-max { font-size: 14px; color: var(--ep-text-3); }

/* Essay feedback */
.ep-exam-host .ep-essay-feedback {
	background: var(--ep-card);
	border: 1px solid var(--ep-card-edge);
	border-radius: var(--ep-r-lg);
	padding: 32px;
}
.ep-exam-host .ep-essay-feedback .ep-results-section-head { margin-bottom: 24px; }
.ep-exam-host .ep-essay-autofail {
	display: flex; align-items: center; gap: 10px;
	padding: 12px 16px;
	background: var(--ep-warn-tint);
	border: 1px solid color-mix(in oklab, var(--ep-warn) 35%, transparent);
	color: var(--ep-warn);
	border-radius: var(--ep-r-md);
	font-size: 13.5px;
	margin-bottom: 20px;
}
.ep-exam-host .ep-essay-grid {
	display: grid; grid-template-columns: 280px 1fr;
	gap: 36px;
	margin-bottom: 12px;
}
@media (max-width: 760px) { .ep-exam-host .ep-essay-grid { grid-template-columns: 1fr; } }
.ep-exam-host .ep-essay-scores {
	display: flex; flex-direction: column; gap: 0;
	border: 1px solid var(--ep-rule);
	border-radius: var(--ep-r-md);
	overflow: hidden;
}
.ep-exam-host .ep-essay-score {
	display: flex; flex-direction: column; gap: 4px;
	padding: 16px 20px;
	border-top: 1px solid var(--ep-rule-soft);
}
.ep-exam-host .ep-essay-score:first-child {
	border-top: 0;
	background: var(--ep-surface-2);
}
.ep-exam-host .ep-essay-score-total .ep-essay-score-num { font-size: 36px; }
.ep-exam-host .ep-essay-score-num {
	font-family: var(--ep-font-display); font-weight: 500;
	font-size: 26px; line-height: 1;
	color: var(--ep-ink);
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.02em;
}
.ep-exam-host .ep-essay-score-max { font-size: 0.6em; color: var(--ep-text-3); }
.ep-exam-host .ep-essay-score-cefr { font-size: 11.5px; color: var(--ep-text-3); }

.ep-exam-host .ep-essay-notes { display: flex; flex-direction: column; gap: 22px; }
.ep-exam-host .ep-essay-note .h-eyebrow { display: block; margin-bottom: 8px; }
.ep-exam-host .ep-essay-note p {
	margin: 0; font-size: 14.5px; line-height: 1.65;
	color: var(--ep-text);
}
.ep-exam-host .ep-essay-suggestions {
	list-style: none; padding: 0; margin: 0;
	display: flex; flex-direction: column; gap: 10px;
}
.ep-exam-host .ep-essay-suggestions li {
	display: grid; grid-template-columns: 24px 1fr; gap: 12px;
	font-size: 14px; line-height: 1.55; color: var(--ep-text);
}
.ep-exam-host .ep-essay-suggestion-num {
	width: 22px; height: 22px;
	border-radius: 50%;
	background: var(--ep-accent-tint);
	color: var(--ep-accent);
	display: flex; align-items: center; justify-content: center;
	font-size: 11.5px; font-weight: 600;
}

/* Review list */
.ep-exam-host .ep-review { display: flex; flex-direction: column; gap: 16px; }
.ep-exam-host .ep-review-filters {
	display: inline-flex;
	background: var(--ep-surface-2);
	border-radius: 999px;
	padding: 3px;
	align-self: flex-start;
	border: 1px solid var(--ep-rule);
}
.ep-exam-host .ep-review-filter {
	display: inline-flex; align-items: center; gap: 6px;
	height: 30px; padding: 0 14px;
	border: 0; background: transparent;
	border-radius: 999px;
	font-size: 13px; font-weight: 500; color: var(--ep-text-2);
	cursor: pointer;
}
.ep-exam-host .ep-review-filter .mono { font-size: 11.5px; color: var(--ep-text-3); }
.ep-exam-host .ep-review-filter.is-active {
	background: var(--ep-card); color: var(--ep-ink); box-shadow: var(--ep-shadow-1);
}
.ep-exam-host .ep-review-filter.is-active .mono { color: var(--ep-ink); }

.ep-exam-host .ep-review-list {
	list-style: none; padding: 0; margin: 0;
	background: var(--ep-card);
	border: 1px solid var(--ep-card-edge);
	border-radius: var(--ep-r-lg);
}
.ep-exam-host .ep-review-row {
	padding: 14px 20px;
	border-top: 1px solid var(--ep-rule-soft);
}
.ep-exam-host .ep-review-row:first-child { border-top: 0; }
.ep-exam-host .ep-review-row-head {
	display: grid;
	grid-template-columns: 80px 1fr 120px 130px;
	gap: 16px;
	align-items: center;
}
.ep-exam-host .ep-review-tnum {
	font-size: 11.5px; color: var(--ep-text-3);
	letter-spacing: 0.06em;
}
.ep-exam-host .ep-review-prompt {
	font-size: 14px; color: var(--ep-text); line-height: 1.45;
}
.ep-exam-host .ep-review-status { display: flex; justify-content: flex-start; }
.ep-exam-host .ep-review-explain { justify-self: end; }

.ep-exam-host .ep-tutor-panel {
	margin: 14px 0 4px 80px;
	padding: 18px 22px;
	background: linear-gradient(180deg, var(--ep-accent-tint), var(--ep-surface-2));
	border: 1px solid color-mix(in oklab, var(--ep-accent) 25%, transparent);
	border-radius: var(--ep-r-md);
}
.ep-exam-host .ep-tutor-head {
	display: flex; align-items: center; gap: 8px;
	color: var(--ep-accent);
	margin-bottom: 8px;
}
.ep-exam-host .ep-tutor-head .h-eyebrow { color: var(--ep-accent); font-size: 11px; }
.ep-exam-host .ep-tutor-panel p {
	margin: 0; font-size: 14.5px;
	line-height: 1.65; color: var(--ep-text);
	white-space: pre-line;
}
.ep-exam-host .ep-tutor-loading {
	display: flex; gap: 6px; align-items: center; height: 24px;
}
.ep-exam-host .ep-tutor-loading-dot {
	width: 6px; height: 6px; border-radius: 50%;
	background: var(--ep-accent);
	animation: ep-pulse 1s infinite ease-in-out;
}
.ep-exam-host .ep-tutor-loading-dot:nth-child(2) { animation-delay: 0.15s; }
.ep-exam-host .ep-tutor-loading-dot:nth-child(3) { animation-delay: 0.3s; }
.ep-exam-host .ep-tutor-error { color: var(--ep-error); font-size: 14px; }

@media (max-width: 760px) {
	.ep-exam-host .ep-review-row-head {
		grid-template-columns: 80px 1fr;
		grid-template-rows: auto auto;
		gap: 6px 12px;
	}
	.ep-exam-host .ep-review-prompt { grid-column: 1 / -1; }
	.ep-exam-host .ep-review-status { grid-column: 1 / 2; }
	.ep-exam-host .ep-review-explain { grid-column: 2 / 3; justify-self: end; }
	.ep-exam-host .ep-tutor-panel { margin-left: 0; }
}

/* =========================================================================
 * Progress view (Phase 11) — restyled
 * ========================================================================= */

.ep-exam-host .ep-progress-shell {
	max-width: 1100px; margin: 0 auto;
	padding: 32px 32px 80px;
	display: flex; flex-direction: column; gap: 28px;
}
.ep-exam-host .ep-progress-header {
	display: flex; align-items: flex-start; justify-content: space-between;
	gap: 24px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--ep-rule);
}
.ep-exam-host .ep-progress-header-left { flex: 1; }
.ep-exam-host .ep-progress-title {
	font-family: var(--ep-font-display); font-weight: 500;
	font-size: clamp(28px, 3.4vw, 38px);
	margin: 6px 0 4px;
	letter-spacing: -0.015em; color: var(--ep-ink);
}
.ep-exam-host .ep-progress-sub { margin: 0; font-size: 14px; color: var(--ep-text-2); }

.ep-exam-host .ep-progress-empty {
	background: var(--ep-card);
	border: 1px solid var(--ep-card-edge);
	border-radius: var(--ep-r-xl);
	padding: 56px 40px;
	text-align: center;
	box-shadow: var(--ep-shadow-1);
}
.ep-exam-host .ep-progress-empty p { color: var(--ep-text-2); margin: 0 0 24px; }

.ep-exam-host .ep-metric-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 14px;
}
.ep-exam-host .ep-metric-card {
	background: var(--ep-card);
	border: 1px solid var(--ep-card-edge);
	border-radius: var(--ep-r-lg);
	padding: 18px 20px;
	display: flex; flex-direction: column; gap: 6px;
	box-shadow: var(--ep-shadow-1);
}
.ep-exam-host .ep-metric-card .h-eyebrow { font-size: 10.5px; }
.ep-exam-host .ep-metric-value {
	font-family: var(--ep-font-display); font-weight: 500;
	font-size: 32px; line-height: 1;
	color: var(--ep-ink); letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
}
.ep-exam-host .ep-metric-sub { font-size: 12px; color: var(--ep-text-3); }
.ep-exam-host .ep-metric-up   { color: var(--ep-success); }
.ep-exam-host .ep-metric-down { color: var(--ep-error); }

.ep-exam-host .ep-chart-card {
	background: var(--ep-card);
	border: 1px solid var(--ep-card-edge);
	border-radius: var(--ep-r-lg);
	padding: 20px 24px;
	box-shadow: var(--ep-shadow-1);
}
.ep-exam-host .ep-line-chart {
	display: block; width: 100%; height: auto; max-height: 280px;
}

/* =========================================================================
 * Quota / error / empty states
 * ========================================================================= */

.ep-exam-host .ep-loading,
.ep-exam-host .ep-empty,
.ep-exam-host .ep-error,
.ep-exam-host .ep-quota-exceeded {
	max-width: 600px; margin: 60px auto;
	background: var(--ep-card);
	border: 1px solid var(--ep-card-edge);
	border-radius: var(--ep-r-lg);
	padding: 36px 40px;
	text-align: center;
	box-shadow: var(--ep-shadow-1);
}
.ep-exam-host .ep-loading { color: var(--ep-text-2); }
.ep-exam-host .ep-error { border-color: color-mix(in oklab, var(--ep-error) 25%, var(--ep-card-edge)); color: var(--ep-error); }
.ep-exam-host .ep-quota-exceeded h2 {
	font-family: var(--ep-font-display); font-weight: 500;
	margin: 0 0 10px; color: var(--ep-ink);
}
.ep-exam-host .ep-quota-message { color: var(--ep-text-2); margin: 0 0 8px; }
.ep-exam-host .ep-quota-meta { color: var(--ep-text-3); font-size: 13px; margin: 0 0 20px; }

/* ── Practice drills (v0.16.3) ─────────────────────────────────────── */
.ep-exam-host .ep-results-scorebig { font-family: var(--ep-font-display); font-weight: 800; font-size: 46px; line-height: 1; color: var(--ep-ink); }
.ep-exam-host .ep-drill-results .ep-results-review { display: flex; flex-direction: column; margin-top: 18px; }
.ep-exam-host .ep-drill-results .ep-review-row { display: block; padding: 12px 0; border-top: 1px solid var(--ep-rule); }
.ep-exam-host .ep-drill-results .ep-review-row:first-child { border-top: 0; }
.ep-exam-host .ep-drill-results .ep-review-q { display: flex; align-items: baseline; gap: 8px; font-weight: 600; }
.ep-exam-host .ep-drill-results .ep-review-mark { font-weight: 700; }
.ep-exam-host .ep-drill-results .ep-review-row.is-correct .ep-review-mark { color: var(--ep-success); }
.ep-exam-host .ep-drill-results .ep-review-row.is-wrong .ep-review-mark { color: var(--ep-error); }
.ep-exam-host .ep-drill-results .ep-review-num { color: var(--ep-text-3); }
.ep-exam-host .ep-drill-results .ep-review-prompt { font-weight: 600; }
.ep-exam-host .ep-drill-results .ep-review-ans { margin-top: 5px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.ep-exam-host .ep-drill-results .ep-review-label { color: var(--ep-text-3); }
