/* Mock exams: the library (/exams/), one paper (intro, exam, report) and the
   review. Tokens only: both themes come from base.css. */

#clh-exams,
.clh-exams {
	--clh-exam-pad: 16px;
	box-sizing: border-box;
	width: 100%;
	max-width: 1040px;
	margin-left: auto;
	margin-right: auto;
	padding: 16px var(--clh-exam-pad) 48px;
	color: var(--clh-text);
	font-family: var(--clh-font);
	font-size: 17px;
	line-height: 1.6;
	background: var(--clh-bg);
}

#clh-exams *,
#clh-exams *::before,
#clh-exams *::after,
.clh-exams *,
.clh-exams *::before,
.clh-exams *::after {
	box-sizing: border-box;
}

/* A paper is a reading measure, not a full-width library. */
#clh-exams.is-paper,
.clh-exams.is-paper {
	max-width: 780px;
}

@media (max-width: 380px) {
	#clh-exams,
	.clh-exams {
		--clh-exam-pad: 12px;
		padding-top: 12px;
		padding-bottom: 40px;
		font-size: 16px;
	}
}

#clh-exams button:focus-visible,
#clh-exams a:focus-visible,
#clh-exams input:focus-visible,
.clh-exams button:focus-visible,
.clh-exams a:focus-visible,
.clh-exams input:focus-visible {
	outline: 3px solid var(--clh-focus);
	outline-offset: 2px;
}

/* ---- The library ------------------------------------------------------ */

.clh-exams-head {
	margin: 8px 0 22px;
}

.clh-exams-title {
	margin: 4px 0 6px;
	font-size: 1.9rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.15;
}

.clh-exams-sub {
	margin: 0;
	color: var(--clh-text-muted);
}

.clh-exams-empty {
	margin: 24px 0;
	color: var(--clh-text-muted);
}

.clh-exams-level {
	margin-bottom: 28px;
}

.clh-exams-level-title {
	margin: 0 0 12px;
	font-size: 1.25rem;
	font-weight: 800;
	letter-spacing: 0.02em;
}

.clh-exams-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 14px;
}

@media (min-width: 640px) {
	.clh-exams-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1000px) {
	.clh-exams-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.clh-exam-card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 16px;
	color: var(--clh-text);
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.clh-exam-card:hover {
	color: var(--clh-text);
	text-decoration: none;
	transform: translateY(-2px);
}

.clh-exam-card-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
}

.clh-exam-card-title {
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1.3;
}

.clh-exam-card-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.clh-exam-card-summary {
	margin: 0;
	font-size: 0.92rem;
	color: var(--clh-text-muted);
}

.clh-exam-card-meta {
	font-size: 0.82rem;
	color: var(--clh-text-muted);
}

/* A chip always has its words; colour is the second cue, never the only one. */
.clh-exam-chip {
	padding: 2px 9px;
	border-radius: 999px;
	background: var(--clh-sunken);
	color: var(--clh-text-muted);
	font-size: 0.72rem;
	font-weight: 800;
	line-height: 1.6;
	white-space: nowrap;
}

.clh-exam-chip.is-provisional {
	background: var(--clh-gold-soft);
	color: var(--clh-warm);
}

.clh-exam-chip.is-hidden {
	background: var(--clh-accent-soft);
	color: var(--clh-accent-text);
}

.clh-exam-best {
	margin-top: 2px;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--clh-text-muted);
}

.clh-exam-best.is-passed {
	color: var(--clh-green);
}

.clh-exam-best.is-new {
	font-weight: 600;
}

/* ---- One paper: the intro --------------------------------------------- */

.clh-exam-intro {
	max-width: 720px;
	margin: 0 auto;
}

.clh-exam-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	padding: 0 6px;
	color: var(--clh-text);
	font-weight: 700;
	text-decoration: none;
}

.clh-exam-back:hover {
	color: var(--clh-accent-text);
	text-decoration: none;
}

.clh-exam-back-icon {
	transform: rotate(180deg);
}

.clh-exam-intro .clh-kicker {
	color: var(--clh-accent-text);
}

.clh-exam-title {
	margin: 4px 0 6px;
	font-size: 2rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.15;
}

.clh-exam-summary {
	margin: 0;
	color: var(--clh-text-muted);
}

.clh-exam-table {
	width: 100%;
	margin: 18px 0 8px;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.clh-exam-table th,
.clh-exam-table td {
	padding: 10px 8px;
	border-bottom: 1px solid var(--clh-border);
	text-align: left;
	vertical-align: baseline;
}

.clh-exam-table thead th {
	color: var(--clh-text-muted);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.clh-exam-table tbody th {
	font-weight: 700;
}

.clh-exam-table thead th:not(:first-child),
.clh-exam-table td {
	text-align: right;
	white-space: nowrap;
}

.clh-exam-table-zh {
	color: var(--clh-text-muted);
	font-size: 0.95em;
}

.clh-exam-totals {
	margin: 10px 0 22px;
	color: var(--clh-text-muted);
	font-size: 0.9rem;
	font-variant-numeric: tabular-nums;
}

.clh-exam-how {
	padding: 18px 20px;
	border-radius: var(--clh-radius);
	background: var(--clh-card-bg);
	box-shadow: var(--clh-card-shadow);
}

.clh-exam-how-title {
	margin: 0 0 8px;
	font-size: 1.1rem;
	font-weight: 800;
}

.clh-exam-how-list {
	display: grid;
	gap: 6px;
	margin: 0;
	padding-left: 20px;
	color: var(--clh-text);
}

.clh-exam-note {
	margin: 16px 0 0;
	padding: 12px 14px;
	border-radius: var(--clh-radius-sm);
	background: var(--clh-gold-soft);
	color: var(--clh-text);
	font-size: 0.92rem;
}

.clh-exam-note strong {
	color: var(--clh-warm);
}

.clh-exam-best-intro {
	margin: 14px 0 0;
	font-weight: 700;
}

/* A single loud next step, the other actions quiet. */
.clh-exam-actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin-top: 22px;
}

.clh-exam-actions .clh-btn {
	width: 100%;
	max-width: 420px;
}

.clh-exam-actions .clh-btn + .clh-btn {
	margin-top: 0;
}

/* ---- The running exam: the bar ---------------------------------------- */

.clh-exam-bar {
	position: sticky;
	top: var(--clh-sticky-top, 0px);
	z-index: 10;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 12px;
	margin: 0 calc(-1 * var(--clh-exam-pad));
	padding: 8px var(--clh-exam-pad);
	border-bottom: 1px solid var(--clh-border);
	background: var(--clh-bg);
}

.clh-exam-bar-main {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 12px;
	min-width: 0;
}

.clh-exam-bar-section {
	font-weight: 800;
	line-height: 1.3;
}

.clh-exam-bar-zh {
	font-size: 0.95em;
	font-weight: 700;
}

.clh-exam-progress {
	color: var(--clh-text-muted);
	font-size: 0.85rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.clh-exam-bar-side {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.clh-exam-timer {
	min-width: 66px;
	padding: 3px 10px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: var(--clh-sunken);
	color: var(--clh-text);
	font-size: 0.95rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	text-align: center;
}

/* The last minute: gold, and the words beside it say why (not colour alone). */
.clh-exam-timer.is-low {
	border-color: var(--clh-gold);
	background: var(--clh-gold-soft);
	color: var(--clh-warm);
}

.clh-exam-timer-note {
	color: var(--clh-warm);
	font-size: 0.76rem;
	font-weight: 800;
	white-space: nowrap;
}

.clh-exam-timer-note[hidden] {
	display: none;
}

/* ---- The question ----------------------------------------------------- */

.clh-exam-main {
	max-width: 720px;
	margin: 0 auto;
	padding-top: 18px;
}

.clh-exam-instructions {
	margin: 0 0 12px;
	color: var(--clh-text-muted);
	font-size: 0.95rem;
}

.clh-exam-instructions[hidden] {
	display: none;
}

.clh-exam-question {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 22px;
	border-radius: var(--clh-radius);
	background: var(--clh-card-bg);
	box-shadow: var(--clh-card-shadow);
}

.clh-exam-zh-wrap {
	min-width: 0;
}

.clh-exam-zh {
	font-family: var(--clh-font-cn);
	font-size: calc(1.55rem * var(--clh-zh-scale, 1));
	font-weight: 500;
	line-height: 1.7;
}

/* The ★ question of a reading item, under its sentence. */
.clh-exam-question-zh {
	display: grid;
	gap: 2px;
}

.clh-exam-question-line {
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.clh-exam-star {
	flex: none;
	color: var(--clh-accent-text);
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1;
}

.clh-exam-question-text {
	font-family: var(--clh-font-cn);
	font-size: calc(1.15rem * var(--clh-zh-scale, 1));
	font-weight: 600;
	line-height: 1.6;
}

.clh-exam-question-zh .clh-py {
	font-size: 0.95rem;
}

.clh-exam-prompt {
	margin: 0;
	font-size: 1.02rem;
}

.clh-exam-img {
	display: block;
	max-width: 100%;
	max-height: 220px;
	margin: 0 auto;
	border-radius: var(--clh-radius-sm);
	object-fit: contain;
}

.clh-exam-passage {
	padding: 14px 16px;
	border-radius: var(--clh-radius-sm);
	background: var(--clh-sunken);
}

.clh-exam-passage-zh {
	margin: 0;
	font-family: var(--clh-font-cn);
	font-size: calc(1.2rem * var(--clh-zh-scale, 1));
	line-height: 1.8;
}

.clh-exam-passage .clh-py {
	margin-top: 4px;
}

/* Listening: play, and how many plays are left. */
.clh-exam-listen {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
}

.clh-exam-play {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	padding: 4px 18px;
	border: none;
	border-radius: 999px;
	background: var(--clh-select-soft);
	color: var(--clh-select);
	font-family: inherit;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.1s ease;
}

.clh-exam-play:hover {
	transform: scale(1.03);
}

.clh-exam-play:disabled {
	background: var(--clh-disabled-bg);
	color: var(--clh-disabled-text);
	cursor: default;
	transform: none;
}

.clh-exam-play.is-playing {
	background: var(--clh-select);
	color: #fff;
	animation: clh-exam-ring 1.4s ease-out infinite;
}

.clh-exam-play-icon {
	font-size: 1.15em;
}

@keyframes clh-exam-ring {
	0% {
		box-shadow: 0 0 0 0 color-mix(in srgb, var(--clh-select) 45%, transparent);
	}
	70% {
		box-shadow: 0 0 0 10px color-mix(in srgb, var(--clh-select) 0%, transparent);
	}
	100% {
		box-shadow: 0 0 0 0 color-mix(in srgb, var(--clh-select) 0%, transparent);
	}
}

.clh-exam-plays {
	color: var(--clh-text-muted);
	font-size: 0.9rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

/* The bank of sentences a bank question replies with. */
.clh-exam-bank {
	display: grid;
	gap: 8px;
	padding: 12px 14px;
	border-radius: var(--clh-radius-sm);
	background: var(--clh-sunken);
}

.clh-exam-bank-row {
	display: flex;
	align-items: baseline;
	gap: 10px;
}

.clh-exam-bank-zh {
	font-family: var(--clh-font-cn);
	font-size: calc(1.1rem * var(--clh-zh-scale, 1));
	line-height: 1.5;
}

.clh-exam-bank-text {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
}

.clh-exam-bank-text .clh-py {
	font-size: 0.85em;
	line-height: 1.4;
}

/* ---- Answer options --------------------------------------------------- */

.clh-exam-options {
	display: grid;
	gap: 10px;
	margin-top: 2px;
}

.clh-exam-options-img {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.clh-exam-option {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-height: 56px;
	padding: 10px 14px;
	border: 2px solid var(--clh-control-border);
	border-radius: 14px;
	background: var(--clh-raised);
	color: var(--clh-text);
	font-family: inherit;
	font-size: 1.02rem;
	font-weight: 600;
	line-height: 1.4;
	text-align: left;
	cursor: pointer;
	box-shadow: 0 3px 0 var(--clh-control-border);
	transition: transform 0.06s ease, box-shadow 0.06s ease;
}

.clh-exam-option:hover {
	filter: brightness(0.99);
}

.clh-exam-option:active {
	transform: translateY(3px);
	box-shadow: none;
}

/* Selection is blue, never red: red only ever means "wrong". */
.clh-exam-option.is-selected {
	border-color: var(--clh-select);
	background: var(--clh-select-soft);
	box-shadow: 0 3px 0 var(--clh-select);
}

.clh-exam-option-key {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 32px;
	height: 32px;
	border-radius: 10px;
	background: var(--clh-sunken);
	color: var(--clh-text-muted);
	font-size: 0.95rem;
	font-weight: 800;
	line-height: 1;
}

.clh-exam-option.is-selected .clh-exam-option-key {
	background: var(--clh-select);
	color: #fff;
}

.clh-exam-option-judge {
	justify-content: center;
	font-size: 1.05rem;
	font-weight: 800;
}

.clh-exam-options-judge {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.clh-exam-option-zh {
	font-family: var(--clh-font-cn);
	font-size: calc(1.15rem * var(--clh-zh-scale, 1));
	line-height: 1.5;
}

.clh-exam-option-text {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
}

.clh-exam-option-text .clh-py {
	font-size: 0.82em;
	line-height: 1.4;
}

.clh-exam-option-en {
	min-width: 0;
}

.clh-exam-options-img .clh-exam-option {
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 8px;
	padding: 12px;
	text-align: center;
}

.clh-exam-option-img {
	max-width: 100%;
	max-height: 110px;
	object-fit: contain;
}

/* A bank of pictures: two across on a phone (A B / C D / E F, as on the paper), three from 560 px. */
.clh-exam-options-pictures {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 560px) {
	.clh-exam-options-pictures {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.clh-exam-options-pictures .clh-exam-option {
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
	gap: 4px;
	min-height: 0;
	padding: 6px 6px 8px;
	text-align: center;
}

.clh-exam-options-pictures .clh-exam-option-key {
	align-self: flex-start;
}

.clh-exam-options-pictures .clh-exam-option-img {
	width: 100%;
	height: auto;
	max-height: 180px;
	margin: auto;
	object-fit: contain;
}

.clh-exam-options-bank {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.clh-exam-letter {
	width: auto;
	min-width: 56px;
	justify-content: center;
}

/* ---- Putting a sentence in order -------------------------------------- */

.clh-exam-order {
	display: grid;
	gap: 12px;
}

.clh-exam-order-answer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	min-height: 64px;
	padding: 10px 12px;
	border: 2px dashed var(--clh-control-border);
	border-radius: 14px;
	background: var(--clh-sunken);
}

.clh-exam-order-answer.is-empty {
	color: var(--clh-text-muted);
}

.clh-exam-order-hint {
	color: var(--clh-text-muted);
	font-size: 0.92rem;
}

.clh-exam-order-pool {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* In the review the words are shown, not tapped. */
.clh-exam-order-source .clh-exam-token {
	padding: 6px 12px;
	background: var(--clh-sunken);
	box-shadow: none;
	cursor: default;
}

.clh-exam-token {
	min-height: 44px;
	padding: 8px 14px;
	border: 2px solid var(--clh-control-border);
	border-radius: 12px;
	background: var(--clh-raised);
	color: var(--clh-text);
	font-family: inherit;
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 0 var(--clh-control-border);
}

.clh-exam-token:active {
	transform: translateY(2px);
	box-shadow: none;
}

.clh-exam-token.is-placed {
	border-color: var(--clh-select);
	background: var(--clh-select-soft);
	box-shadow: none;
}

.clh-exam-order-foot {
	display: flex;
	justify-content: flex-start;
}

.clh-exam-order-clear {
	min-height: 44px;
	padding: 6px 18px;
}

/* ---- Writing the missing character ------------------------------------ */

.clh-exam-write-line {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 2px;
	font-size: calc(1.5rem * var(--clh-zh-scale, 1));
	line-height: 1.7;
}

.clh-exam-gap {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	margin: 0 4px;
}

.clh-exam-gap-py {
	color: var(--clh-text-muted);
	font-size: 0.78rem;
	font-style: normal;
	line-height: 1.2;
}

.clh-exam-write {
	width: 5ch;
	min-width: 68px;
	height: 52px;
	padding: 0 8px;
	border: 2px solid var(--clh-control-border);
	border-radius: 12px;
	background: var(--clh-raised);
	color: var(--clh-text);
	font-family: var(--clh-font-cn);
	font-size: 1.4rem;
	line-height: 1;
	text-align: center;
}

.clh-exam-gap-blank {
	display: inline-block;
	min-width: 3ch;
	height: 1.2em;
	border-bottom: 2px solid var(--clh-control-border);
}

/* ---- Moving through a section ----------------------------------------- */

.clh-exam-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 18px 0 16px;
}

.clh-exam-nav .clh-btn {
	min-height: 48px;
}

.clh-exam-nav .clh-btn + .clh-btn {
	margin-top: 0;
}

.clh-exam-nav .clh-exam-next,
.clh-exam-nav .clh-exam-finish {
	margin-left: auto;
}

.clh-exam-palette {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding-top: 16px;
	border-top: 1px solid var(--clh-border);
}

.clh-exam-jump {
	min-width: 44px;
	min-height: 44px;
	padding: 0 8px;
	border: 2px solid var(--clh-control-border);
	border-radius: 11px;
	background: var(--clh-raised);
	color: var(--clh-text);
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	cursor: pointer;
}

.clh-exam-jump.is-answered {
	border-color: var(--clh-green);
	background: var(--clh-green-soft);
	color: var(--clh-green);
}

.clh-exam-jump.is-current {
	border-color: var(--clh-select);
	box-shadow: 0 0 0 2px var(--clh-select);
}

/* ---- "Finish it anyway?" ---------------------------------------------- */

.clh-exam-dialog {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, 0.5);
}

.clh-exam-dialog-box {
	width: 100%;
	max-width: 440px;
	padding: 22px;
	border-radius: var(--clh-radius);
	background: var(--clh-card-bg);
	color: var(--clh-text);
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
}

.clh-exam-dialog-text {
	margin: 0 0 18px;
	font-size: 1.05rem;
	font-weight: 600;
}

.clh-exam-dialog-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 10px;
}

.clh-exam-dialog-actions .clh-btn + .clh-btn {
	margin-top: 0;
}

/* ---- Between sections -------------------------------------------------- */

.clh-exam-between {
	max-width: 620px;
	margin: 40px auto;
	padding: 28px;
	border-radius: var(--clh-radius);
	background: var(--clh-card-bg);
	box-shadow: var(--clh-card-shadow);
	text-align: center;
}

.clh-exam-between-done {
	margin: 0 0 8px;
	font-size: 1.5rem;
	font-weight: 800;
	line-height: 1.25;
}

.clh-exam-next-line {
	margin: 0 0 20px;
	color: var(--clh-text-muted);
}

/* ---- Marking, failing, the report ------------------------------------- */

.clh-exam-marking,
.clh-exam-failed {
	max-width: 560px;
	margin: 40px auto;
	text-align: center;
}

.clh-exam-marking-text {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 700;
}

.clh-exam-failed-title {
	margin: 0 0 10px;
	font-size: 1.4rem;
}

.clh-exam-failed-text {
	margin: 0 0 20px;
	color: var(--clh-text-muted);
}

.clh-exam-report {
	max-width: 720px;
	margin: 0 auto;
}

.clh-exam-report-head {
	padding: 18px 0 24px;
	text-align: center;
}

.clh-exam-score {
	font-size: 3rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.03em;
	line-height: 1.1;
}

.clh-exam-verdict {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
	padding: 6px 16px;
	border-radius: 999px;
	font-weight: 800;
}

.clh-exam-verdict .clh-icon {
	font-size: 1.15em;
}

.clh-exam-verdict.is-passed {
	background: var(--clh-green-soft);
	color: var(--clh-green);
}

/* "Not passed yet" is not an error: gold, like every "not yet". */
.clh-exam-verdict.is-failed {
	background: var(--clh-gold-soft);
	color: var(--clh-warm);
}

.clh-exam-passmark {
	margin: 10px 0 0;
	color: var(--clh-text-muted);
	font-size: 0.9rem;
}

.clh-exam-section-results {
	display: grid;
	gap: 14px;
}

.clh-exam-section-result {
	padding: 16px 18px;
	border-radius: var(--clh-radius);
	background: var(--clh-card-bg);
	box-shadow: var(--clh-card-shadow);
}

.clh-exam-section-result-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.clh-exam-section-result-name {
	font-weight: 800;
}

.clh-exam-section-result-score {
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.clh-exam-bar-track {
	position: relative;
	height: 12px;
	margin: 10px 0 8px;
	border-radius: 999px;
	background: var(--clh-sunken);
	overflow: hidden;
}

.clh-exam-bar-fill {
	height: 100%;
	border-radius: 999px;
	background: var(--clh-progress);
	transition: width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.clh-exam-section-result-meta {
	color: var(--clh-text-muted);
	font-size: 0.86rem;
	font-variant-numeric: tabular-nums;
}

.clh-exam-xp {
	display: inline-block;
	margin: 18px 0 0;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--clh-gold-soft);
	color: var(--clh-warm);
	font-weight: 800;
}

.clh-exam-report .clh-milestone-banner {
	margin-top: 16px;
}

/* ---- The review -------------------------------------------------------- */

.clh-exam-review {
	max-width: 760px;
	margin: 0 auto;
}

.clh-exam-review-close {
	margin-bottom: 16px;
}

.clh-exam-review-title {
	margin: 0 0 6px;
	font-size: 1.7rem;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.clh-exam-review-sub {
	margin: 0 0 24px;
	color: var(--clh-text-muted);
}

.clh-exam-review-section {
	margin-bottom: 30px;
}

.clh-exam-review-section-title {
	margin: 0 0 12px;
	font-size: 1.3rem;
	font-weight: 800;
}

.clh-exam-review-section-zh {
	color: var(--clh-text-muted);
}

.clh-exam-review-part {
	margin-bottom: 18px;
}

.clh-exam-review-instructions {
	margin: 0 0 10px;
	color: var(--clh-text-muted);
	font-size: 0.92rem;
}

.clh-exam-review-item {
	margin-bottom: 14px;
	padding: 18px;
	border-inline-start: 5px solid var(--clh-border);
	border-radius: var(--clh-radius);
	background: var(--clh-card-bg);
	box-shadow: var(--clh-card-shadow);
}

.clh-exam-review-item.is-right {
	border-inline-start-color: var(--clh-green);
}

.clh-exam-review-item.is-wrong {
	border-inline-start-color: var(--clh-wrong);
}

/* The verdict: icon, words, then the number (never colour alone). */
.clh-exam-review-verdict {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 800;
}

.clh-exam-review-item.is-right .clh-exam-review-verdict {
	color: var(--clh-green);
}

.clh-exam-review-item.is-wrong .clh-exam-review-verdict {
	color: var(--clh-wrong);
}

.clh-exam-review-number {
	margin-left: auto;
	color: var(--clh-text-muted);
	font-size: 0.8rem;
	font-weight: 700;
	white-space: nowrap;
}

/* The question keeps its shape but is not a card inside a card. */
.clh-exam-review-question .clh-exam-question {
	padding: 14px 0 0;
	background: transparent;
	box-shadow: none;
}

.clh-exam-review-answers {
	display: grid;
	gap: 8px;
	margin: 14px 0 0;
}

.clh-exam-review-answer-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 12px;
}

.clh-exam-review-answer-row dt {
	min-width: 96px;
	color: var(--clh-text-muted);
	font-size: 0.76rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.clh-exam-review-answer-row dd {
	margin: 0;
	font-weight: 600;
}

.clh-exam-review-answer-row.is-correct dd {
	color: var(--clh-green);
}

.clh-exam-review-none {
	color: var(--clh-text-muted);
	font-style: italic;
}

.clh-exam-review-explain {
	margin: 12px 0 0;
	padding-top: 12px;
	border-top: 1px solid var(--clh-border);
	color: var(--clh-text-muted);
}

/* An answer, in the shape of the options. */
.clh-exam-answer {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.clh-exam-answer-key {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 8px;
	background: var(--clh-sunken);
	color: var(--clh-text-muted);
	font-size: 0.85rem;
	font-weight: 800;
	line-height: 1;
}

.clh-exam-answer .clh-zh {
	font-size: 1.1rem;
}

.clh-exam-answer-text {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
}

.clh-exam-answer-text .clh-py {
	font-size: 0.85rem;
	line-height: 1.4;
}

.clh-exam-answer-img {
	max-height: 80px;
	max-width: 160px;
	border-radius: 8px;
	object-fit: contain;
}

/* The listening transcript: each line with its speaker and a play button. */
.clh-exam-transcript {
	display: grid;
	gap: 8px;
	margin-top: 14px;
	padding: 12px 14px;
	border-radius: var(--clh-radius-sm);
	background: var(--clh-sunken);
}

.clh-exam-transcript-line {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
}

.clh-exam-speaker {
	min-width: 56px;
	color: var(--clh-text-muted);
	font-size: 0.76rem;
	font-weight: 800;
	letter-spacing: 0.04em;
}

.clh-exam-transcript-zh {
	font-family: var(--clh-font-cn);
	font-size: calc(1.05rem * var(--clh-zh-scale, 1));
	line-height: 1.5;
}

/* The transcript's play buttons do not depend on player.css. */
.clh-exam-transcript .clh-play {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	margin-left: auto;
	border: none;
	border-radius: 999px;
	background: var(--clh-select-soft);
	color: var(--clh-select);
	cursor: pointer;
	flex: none;
}

.clh-exam-transcript .clh-play.is-playing {
	background: var(--clh-select);
	color: #fff;
	animation: clh-exam-ring 1.4s ease-out infinite;
}

.clh-exam-error-link {
	font-weight: 700;
}

/* ---- Motion ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.clh-exam-card,
	.clh-exam-option,
	.clh-exam-token,
	.clh-exam-play,
	.clh-exam-bar-fill {
		transition: none;
	}

	.clh-exam-card:hover {
		transform: none;
	}

	.clh-exam-option:active,
	.clh-exam-token:active {
		transform: none;
	}

	.clh-exam-play.is-playing,
	.clh-exam-transcript .clh-play.is-playing {
		animation: none;
	}
}
