/* Eduqas GCSE Maths Foundation Practice 2.1.0 – front-end styles. All rules are scoped to .efm-app. */
.efm-app {
	--efm-primary: #1d4ed8;
	--efm-accent: #16a34a;
	--efm-bad: #b91c1c;
	--efm-ink: #111827;
	--efm-muted: #4b5563;
	--efm-line: #d1d5db;
	--efm-soft: #f3f4f6;
	--efm-card: #ffffff;
	box-sizing: border-box;
	margin: 1.5em auto;
	padding: 20px;
	max-width: var(--efm-max, 900px);
	color: var(--efm-ink);
	background: var(--efm-card);
	border: 1px solid var(--efm-line);
	border-radius: 12px;
	font-size: 16px;
	line-height: 1.5;
}
.efm-app *, .efm-app *::before, .efm-app *::after { box-sizing: border-box; }
.efm-app .efm-head { margin-bottom: 12px; }
.efm-app .efm-title { margin: 0 0 4px; font-size: 1.4em; line-height: 1.25; color: var(--efm-ink); }
.efm-app .efm-title:empty { display: none; }
.efm-app .efm-disclaimer { margin: 0; font-size: .82em; color: var(--efm-muted); }
.efm-app .efm-loading { color: var(--efm-muted); }

.efm-app .efm-controls { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; padding: 12px; background: var(--efm-soft); border-radius: 10px; margin-bottom: 14px; }
.efm-app .efm-field { display: flex; flex-direction: column; gap: 4px; min-width: 130px; flex: 1 1 180px; }
.efm-app .efm-field-btn { flex: 0 0 auto; min-width: 0; }
.efm-app .efm-field label { font-size: .8em; font-weight: 600; color: var(--efm-muted); text-transform: uppercase; letter-spacing: .03em; }
.efm-app .efm-select, .efm-app .efm-input { font: inherit; padding: 8px 10px; border: 1px solid #9ca3af; border-radius: 8px; background: #fff; color: var(--efm-ink); min-height: 42px; max-width: 100%; }
.efm-app .efm-select:focus, .efm-app .efm-input:focus, .efm-app .efm-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--efm-primary) 45%, transparent); outline-offset: 1px; }

.efm-app .efm-btn { font: inherit; font-size: .95em; font-weight: 600; cursor: pointer; padding: 8px 14px; min-height: 42px; border-radius: 8px; border: 1px solid var(--efm-primary); background: #fff; color: var(--efm-primary); line-height: 1.2; text-decoration: none; }
.efm-app .efm-btn:hover { background: color-mix(in srgb, var(--efm-primary) 8%, #fff); }
.efm-app .efm-btn-primary { background: var(--efm-primary); color: #fff; }
.efm-app .efm-btn-primary:hover { background: color-mix(in srgb, var(--efm-primary) 85%, #000); }
.efm-app .efm-btn-ghost { border-color: var(--efm-line); color: var(--efm-muted); }
.efm-app .efm-btn[disabled] { opacity: .5; cursor: default; }

.efm-app .efm-score { margin: 0 0 14px; }
.efm-app .efm-score-text { font-size: .95em; margin-bottom: 6px; }
.efm-app .efm-bar { height: 8px; background: var(--efm-soft); border-radius: 99px; overflow: hidden; }
.efm-app .efm-bar span { display: block; height: 100%; background: var(--efm-accent); transition: width .3s; }

.efm-app .efm-list { list-style: none; margin: 0; padding: 0; }
.efm-app .efm-q { margin: 0 0 12px; padding: 14px 16px; border: 1px solid var(--efm-line); border-left: 5px solid var(--efm-line); border-radius: 10px; background: #fff; }
.efm-app .efm-q.efm-is-ok { border-left-color: var(--efm-accent); }
.efm-app .efm-q.efm-is-bad { border-left-color: var(--efm-bad); }
.efm-app .efm-q-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.efm-app .efm-qnum { font-weight: 700; color: var(--efm-primary); margin-right: 4px; }
.efm-app .efm-badge { font-size: .75em; padding: 2px 8px; border-radius: 99px; background: var(--efm-soft); color: var(--efm-muted); }
.efm-app .efm-badge-nocalc { background: #fef3c7; color: #92400e; }
.efm-app .efm-badge-calc { background: #dbeafe; color: #1e40af; }
.efm-app .efm-q-text { margin: 0 0 10px; font-size: 1.05em; white-space: pre-line; }
.efm-app .efm-answer-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.efm-app .efm-answer-row .efm-input { width: 12em; flex: 0 1 12em; }
.efm-app .efm-pre, .efm-app .efm-unit { font-weight: 600; }
.efm-app .efm-hint { margin: 6px 0 0; font-size: .85em; color: var(--efm-muted); }
.efm-app .efm-feedback { margin-top: 8px; font-weight: 600; min-height: 0; }
.efm-app .efm-feedback:empty { display: none; }
.efm-app .efm-fb-ok { color: var(--efm-accent); }
.efm-app .efm-fb-bad { color: var(--efm-bad); }
.efm-app .efm-fb-info { color: var(--efm-muted); }
.efm-app .efm-steps { margin-top: 10px; padding: 10px 14px; background: var(--efm-soft); border-radius: 8px; }
.efm-app .efm-steps p { margin: 0 0 4px; }
.efm-app .efm-steps-list { margin: 0; padding-left: 1.4em; }
.efm-app .efm-steps-list li { margin: 2px 0; }
.efm-app .efm-empty { padding: 14px; color: var(--efm-muted); }

.efm-app .efm-summary { margin: 6px 0 14px; padding: 16px; border-radius: 10px; background: color-mix(in srgb, var(--efm-accent) 10%, #fff); border: 1px solid color-mix(in srgb, var(--efm-accent) 40%, #fff); }
.efm-app .efm-summary p { margin: 0 0 8px; }
.efm-app .efm-summary-score { font-size: 1.2em; font-weight: 700; }
.efm-app .efm-foot, .efm-app .efm-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.efm-app .efm-tools { margin-bottom: 14px; }

/* Starters */
.efm-app .efm-timer { display: inline-flex; gap: 6px; align-items: center; padding: 0 4px 0 10px; border: 1px solid var(--efm-line); border-radius: 8px; }
.efm-app .efm-timer-out { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 3.2em; }
.efm-app.efm-time-up .efm-timer { border-color: var(--efm-bad); color: var(--efm-bad); }
.efm-app .efm-stage { padding: 6px 0; }
.efm-app .efm-s-list { margin: 0; padding-left: 1.6em; font-size: 1.15em; }
.efm-app .efm-s-list li { margin: 0 0 10px; }
.efm-app .efm-s-cols { columns: 2 260px; column-gap: 40px; }
.efm-app .efm-s-cols li { break-inside: avoid; }
.efm-app .efm-s-q { margin-right: 10px; }
.efm-app .efm-s-ans { display: inline-block; visibility: hidden; color: var(--efm-accent); font-weight: 700; }
.efm-app .efm-show .efm-s-ans { visibility: visible; }
.efm-app .efm-spot-card .efm-s-ans, .efm-app .efm-stage-truefalse .efm-s-ans { display: none; }
.efm-app .efm-show .efm-spot-card .efm-s-ans, .efm-app .efm-show.efm-stage-truefalse .efm-s-ans { display: block; margin-top: 4px; font-weight: 600; }
.efm-app .efm-nod-num { font-size: 4em; font-weight: 800; text-align: center; color: var(--efm-primary); line-height: 1.1; margin: 4px 0 16px; }
.efm-app .efm-s-intro { margin: 0 0 10px; font-weight: 600; }
.efm-app .efm-spot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.efm-app .efm-spot-card { position: relative; padding: 14px 14px 14px 46px; border: 1px solid var(--efm-line); border-radius: 10px; font-size: 1.1em; }
.efm-app .efm-spot-n { position: absolute; left: 12px; top: 12px; width: 24px; height: 24px; border-radius: 50%; background: var(--efm-primary); color: #fff; font-size: .8em; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.efm-app .efm-spot-line { font-family: inherit; }

/* Full screen: .efm-fs is set by the script for both native full screen and the fill-the-window fallback. */
.efm-app .efm-head-row { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.efm-app .efm-head-text { flex: 1 1 auto; min-width: 0; }
.efm-app .efm-btn-fs { flex: 0 0 auto; white-space: nowrap; }
html.efm-fs-open { overflow: hidden; }
.efm-app.efm-fs { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 999999; max-width: none; width: 100%; height: 100%; margin: 0; overflow: auto; border: 0; border-radius: 0; padding: 3vw 4vw; }
.efm-app.efm-starters.efm-fs { font-size: 2.6vmin; }
.efm-app.efm-practice.efm-fs { font-size: clamp(18px, 2.3vmin, 32px); }
.efm-app.efm-fs .efm-s-list { font-size: 1.5em; }
.efm-app.efm-fs .efm-nod-num { font-size: 7em; }
.efm-app.efm-fs .efm-q-text { font-size: 1.2em; }
.efm-app .efm-revise { font-weight: 600; }

@media (max-width: 600px) {
	.efm-app { padding: 14px; border-radius: 10px; }
	.efm-app .efm-field { flex: 1 1 100%; }
	.efm-app .efm-answer-row .efm-input { flex: 1 1 100%; width: 100%; }
	.efm-app .efm-nod-num { font-size: 3em; }
}
@media print {
	.efm-app .efm-controls, .efm-app .efm-tools, .efm-app .efm-foot, .efm-app .efm-btn { display: none !important; }
}
