/* Practice-test player (/practice-test/…, the embed, [ays_quiz] in posts).

   Colours, type and motion are the site's --t1-* tokens (site/site.css), so
   the player follows the site's light/dark theme. A sitting is meant to be
   calm: one question at a time, big choices, a quiet progress bar, and plain
   green / red for right and wrong once it is over.

   The --pt-* names below are only aliases onto the site tokens; the fallback
   after each is for a page that is not on the design system yet (a blog post
   on the old theme), which stays light. --pt-good / --pt-bad are the only
   colours of the player's own (the site has no green or red). */

:root {
	--pt-accent: var(--t1-rose, #E75480);
	--pt-accent-fill: var(--t1-rose-press, #CF3A68);
	--pt-accent-deep: var(--t1-rose-deep, #B8305A);
	--pt-accent-text: var(--t1-rose-text, #C2335F);
	--pt-accent-soft: var(--t1-rose-wash, #FDEEF3);
	--pt-ink: var(--t1-ink, #151A2D);
	--pt-muted: var(--t1-ink-2, #4A5168);
	--pt-bg: var(--t1-bg-alt, #F4F5FA);
	--pt-surface: var(--t1-surface, #FFFFFF);
	--pt-border: var(--t1-line, #E2E4EE);
	--pt-gold: var(--t1-gold, #F5A106);
	--pt-shadow: var(--t1-shadow, 0 1px 2px rgba(21, 26, 45, .06), 0 8px 28px -12px rgba(21, 26, 45, .18));
	--pt-radius: var(--t1-radius-lg, 22px);
	--pt-font: var(--t1-font-body, "Manrope", system-ui, sans-serif);
	--pt-display: var(--t1-font-head, "Sora", system-ui, sans-serif);
	--pt-ease: var(--t1-ease, cubic-bezier(.2, .7, .2, 1));
	--pt-top: calc(var(--t1-adminbar, 0px) + 72px);   /* below the sticky site header */

	--pt-good: #137A3B;
	--pt-good-fill: #16A34A;
	--pt-good-soft: #E9F8EF;
	--pt-bad: #B42318;
	--pt-bad-fill: #D92D20;
	--pt-bad-soft: #FDEDEC;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--pt-good: #5EDB8C;
		--pt-good-fill: #22A355;
		--pt-good-soft: #10291B;
		--pt-bad: #FF8A80;
		--pt-bad-fill: #E5483C;
		--pt-bad-soft: #33161A;
	}
	/* An old-theme page has no dark tokens: keep its player light. */
	:root:not([data-theme="light"]):not(:has(body.t1)) {
		--pt-good: #137A3B; --pt-good-fill: #16A34A; --pt-good-soft: #E9F8EF;
		--pt-bad: #B42318; --pt-bad-fill: #D92D20; --pt-bad-soft: #FDEDEC;
	}
}
:root[data-theme="dark"] {
	--pt-good: #5EDB8C;
	--pt-good-fill: #22A355;
	--pt-good-soft: #10291B;
	--pt-bad: #FF8A80;
	--pt-bad-fill: #E5483C;
	--pt-bad-soft: #33161A;
}

/* ── Frame ──────────────────────────────────────────────────────────────── */

.pt-wrap [hidden] { display: none !important; }
.pt-wrap { max-width: 860px; margin: 0 auto; color: var(--pt-ink); font-family: var(--pt-font); }
.pt-wrap *, .pt-wrap *::before, .pt-wrap *::after { box-sizing: border-box; }
.pt-wrap :where(p, ul, ol, h2, h3) { margin: 0; padding: 0; }
.pt-wrap :where(ul, ol) { list-style: none; }
.pt-wrap a:not([class]) { color: var(--pt-accent-text); }

body.pt-embed-page { margin: 0; background: var(--pt-bg); }
.pt-wrap--embed { padding: 20px 16px 28px; }
.pt-wrap--embed .pt-title--embed { margin-bottom: 18px; font-family: var(--pt-display); font-size: clamp(1.25rem, 1rem + 1.4vw, 1.75rem); line-height: 1.2; letter-spacing: -.02em; text-wrap: balance; }

.pt-wrap .pt-h2 {
	font-family: var(--pt-display); font-weight: 700;
	font-size: clamp(1.25rem, 1.1rem + .8vw, 1.625rem); line-height: 1.2; letter-spacing: -.02em;
	color: var(--pt-ink); margin-bottom: 12px;
}
.pt-wrap .pt-h2:focus { outline: none; }
.pt-wrap .pt-note { color: var(--pt-muted); line-height: 1.6; }
.pt-wrap .pt-fine { color: var(--pt-muted); font-size: .8125rem; line-height: 1.5; margin-top: 14px; opacity: .85; }
.pt-wrap .pt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Buttons (the site's, so the player also works off the design system) ── */

.pt-wrap .pt-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	min-height: 50px; padding: 12px 26px;
	border-radius: 999px; border: 1.5px solid transparent;
	font-family: var(--pt-display); font-size: 1rem; font-weight: 600; line-height: 1.2;
	text-decoration: none; cursor: pointer; white-space: nowrap;
	transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--pt-ease), box-shadow .2s;
}
.pt-wrap .pt-btn:focus-visible { outline: 2px solid var(--pt-accent); outline-offset: 3px; }
.pt-wrap .pt-btn--primary { background: var(--pt-accent-fill); color: #fff; box-shadow: 0 10px 24px -12px rgba(207, 58, 104, .8); }
.pt-wrap .pt-btn--primary:hover { background: var(--pt-accent-deep); color: #fff; transform: translateY(-1px); }
.pt-wrap .pt-btn--ghost { background: transparent; color: var(--pt-ink); border-color: var(--pt-border); }
.pt-wrap .pt-btn--ghost:hover { border-color: var(--pt-ink); color: var(--pt-ink); }
.pt-wrap .pt-btn--sm { min-height: 40px; padding: 8px 18px; font-size: .875rem; }
.pt-wrap .pt-btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ── Cards: start, lead form, results ────────────────────────────────────── */

.pt-wrap .pt-card {
	position: relative;
	background: var(--pt-surface);
	border: 1px solid var(--pt-border);
	border-radius: var(--pt-radius);
	box-shadow: var(--pt-shadow);
	padding: clamp(22px, 4vw, 40px);
	margin-bottom: 20px;
}

/* Start: three facts as big numbers, and one button. */
.pt-wrap .pt-start { display: grid; gap: 26px; justify-items: start; overflow: hidden; }
.pt-wrap .pt-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; width: 100%; }
.pt-wrap .pt-facts li { display: grid; gap: 4px; align-content: start; color: var(--pt-muted); font-size: .9375rem; line-height: 1.4; }
.pt-wrap .pt-facts li + li { padding-left: 18px; border-left: 1px solid var(--pt-border); }
.pt-wrap .pt-facts strong {
	display: block; color: var(--pt-ink);
	font-family: var(--pt-display); font-weight: 700; font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem); line-height: 1.05; letter-spacing: -.03em;
	font-variant-numeric: tabular-nums;
}
.pt-wrap .pt-facts__icon { width: 40px; height: 40px; margin-bottom: 2px; fill: none; stroke: var(--pt-gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pt-wrap .pt-start .pt-btn { min-height: 56px; padding: 14px 32px; font-size: 1.0625rem; }
.pt-wrap .pt-start .pt-btn span[aria-hidden] { transition: transform .2s var(--pt-ease); }
.pt-wrap .pt-start .pt-btn:hover span[aria-hidden] { transform: translateX(3px); }
@media (max-width: 560px) {
	.pt-wrap .pt-facts { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.pt-wrap .pt-facts li + li { padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--pt-border); }
	.pt-wrap .pt-facts li { grid-template-columns: auto 1fr; align-items: baseline; column-gap: 12px; }
	.pt-wrap .pt-facts__icon { display: none; }
	.pt-wrap .pt-facts strong { font-size: 1.75rem; }
	.pt-wrap .pt-start .pt-btn { width: 100%; }
}

/* ── Player bar: progress and timer, under the site header ──────────────── */

.pt-wrap .pt-bar {
	position: sticky; top: var(--pt-top); z-index: 5;
	display: flex; align-items: center; gap: 16px;
	padding: 10px 12px 10px 20px; margin-bottom: 18px;
	background: color-mix(in srgb, var(--pt-surface) 90%, transparent);
	-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
	border: 1px solid var(--pt-border); border-radius: 999px;
	box-shadow: var(--pt-shadow);
}
.pt-embed-page .pt-bar { top: 8px; }
.pt-wrap .pt-bar__progress { flex: 1; display: flex; align-items: center; gap: 14px; min-width: 0; }
.pt-wrap .pt-bar__progress [data-progress-text] { flex: none; font-family: var(--pt-display); font-weight: 600; font-size: .9375rem; color: var(--pt-ink); font-variant-numeric: tabular-nums; }
.pt-wrap .pt-bar__track { flex: 1; height: 8px; border-radius: 999px; background: var(--pt-border); overflow: hidden; }
.pt-wrap .pt-bar__fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--pt-accent-fill), var(--pt-accent)); transition: width .5s var(--pt-ease); }
.pt-wrap .pt-bar__timer {
	flex: none; display: inline-flex; align-items: center; gap: 8px;
	padding: 8px 14px; border-radius: 999px;
	font-family: var(--pt-display); font-weight: 600; font-size: .9375rem; line-height: 1;
	font-variant-numeric: tabular-nums; color: var(--pt-ink); background: var(--pt-bg);
	transition: background-color .3s, color .3s;
}
.pt-wrap .pt-bar__timer::before {
	content: ""; width: 14px; height: 14px; border-radius: 50%;
	border: 1.5px solid currentColor; opacity: .7;
	background: linear-gradient(currentColor, currentColor) 50% 2px / 1.5px 5px no-repeat;
}
.pt-wrap .pt-bar__timer.is-low { color: #fff; background: var(--pt-bad-fill); }

/* ── Questions ──────────────────────────────────────────────────────────── */

.pt-wrap .pt-list { display: grid; gap: 20px; }
.pt-wrap .pt-q {
	background: var(--pt-surface);
	border: 1px solid var(--pt-border);
	border-radius: var(--pt-radius);
	box-shadow: var(--pt-shadow);
	padding: clamp(20px, 4vw, 40px);
}
.pt-wrap .pt-q__num {
	margin-bottom: 14px;
	font-family: var(--pt-display); font-size: .8125rem; font-weight: 600;
	letter-spacing: .14em; text-transform: uppercase; color: var(--pt-accent-text);
}
.pt-wrap .pt-q__hint { margin-bottom: 12px; font-size: .9375rem; font-weight: 600; color: var(--pt-muted); }
.pt-wrap .pt-text { white-space: pre-line; line-height: 1.7; overflow-wrap: anywhere; }
.pt-wrap .pt-q__stim {
	padding: 18px 20px; margin-bottom: 18px;
	border-left: 3px solid var(--pt-gold); border-radius: 0 14px 14px 0;
	background: var(--pt-bg); color: var(--pt-ink); font-size: 1rem;
}
.pt-wrap .pt-q__stem { font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); font-weight: 600; line-height: 1.6; color: var(--pt-ink); margin-bottom: 20px; }
.pt-wrap .pt-figs { display: grid; gap: 12px; justify-items: center; margin: 0 0 18px; }
.pt-wrap .pt-figs img { max-width: 100%; height: auto; border-radius: 10px; background: #fff; }
.pt-wrap .pt-table { overflow-x: auto; overflow-y: hidden; margin: 10px 0; white-space: normal; }
.pt-wrap .pt-table table { border-collapse: collapse; font-size: .9375rem; min-width: 50%; }
.pt-wrap .pt-table th, .pt-wrap .pt-table td { border: 1px solid var(--pt-border); padding: 7px 12px; text-align: left; }
.pt-wrap .pt-table th { background: var(--pt-bg); font-weight: 700; }

/* Choices: big rows, the letter in a disc; the picked one turns rose. */
.pt-wrap .pt-choices { display: grid; gap: 12px; }
.pt-wrap .pt-choice { position: relative; }
.pt-wrap .pt-choice label {
	display: flex; align-items: center; gap: 16px;
	min-height: 60px; padding: 12px 18px;
	border: 1.5px solid var(--pt-border); border-radius: 16px;
	background: var(--pt-surface); color: var(--pt-ink);
	font-size: 1.0625rem; line-height: 1.5;
	cursor: pointer;
	transition: border-color .2s var(--pt-ease), background-color .2s var(--pt-ease), transform .2s var(--pt-ease), box-shadow .2s var(--pt-ease);
}
.pt-wrap .pt-choice label:hover { border-color: color-mix(in srgb, var(--pt-accent) 55%, var(--pt-border)); transform: translateY(-1px); }
.pt-wrap .pt-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pt-wrap .pt-choice__letter {
	flex: none; display: grid; place-items: center;
	width: 36px; height: 36px; border-radius: 50%;
	border: 1.5px solid var(--pt-border);
	font-family: var(--pt-display); font-weight: 600; font-size: .9375rem; color: var(--pt-muted);
	transition: background-color .2s, border-color .2s, color .2s, transform .3s var(--pt-ease);
}
.pt-wrap .pt-q[data-kind="multi"] .pt-choice__letter { border-radius: 10px; }
.pt-wrap .pt-choice__text { flex: 1; min-width: 0; color: var(--pt-ink); }
.pt-wrap .pt-choice input:focus-visible + .pt-choice__letter { outline: 2px solid var(--pt-accent); outline-offset: 3px; }
.pt-wrap .pt-choice input:checked + .pt-choice__letter { background: var(--pt-accent-fill); border-color: var(--pt-accent-fill); color: #fff; transform: scale(1.06); }
.pt-wrap .pt-choice:has(input:checked) label { border-color: var(--pt-accent); background: var(--pt-accent-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pt-accent) 18%, transparent); }

.pt-wrap .pt-typed input,
.pt-wrap .pt-field input {
	width: 100%; min-height: 54px; padding: 12px 16px;
	font: 1.0625rem/1.4 var(--pt-font); color: var(--pt-ink);
	background: var(--pt-surface);
	border: 1.5px solid var(--pt-border); border-radius: 14px;
	transition: border-color .2s, box-shadow .2s;
}
.pt-wrap .pt-typed input:focus,
.pt-wrap .pt-field input:focus { outline: none; border-color: var(--pt-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pt-accent) 20%, transparent); }

/* Before the test starts (with JavaScript), only the start card shows: the
   questions and answers stay in the page for search engines and for readers
   without JavaScript, as Quiz Maker's did. */
.t1-js .pt-wrap .pt:not(.is-live):not(.is-review) .pt-list { display: none; }
.pt-wrap .pt-start__tools { margin-top: -12px; font-size: .9375rem; }

/* The answer and explanation: shown without JavaScript (and to search
   engines), hidden during a sitting, shown again in the review. */
.pt-wrap .pt-answer { margin-top: 20px; padding: 18px 20px; border-radius: 16px; background: var(--pt-bg); border: 1px solid var(--pt-border); }
.pt-wrap .pt-answer__key { font-weight: 600; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.pt-wrap .pt-answer__verdict { font-family: var(--pt-display); font-weight: 600; }
.pt-wrap .pt-answer__expl { margin-top: 10px; color: var(--pt-muted); font-size: 1rem; }

.pt-wrap .pt.is-live .pt-answer { display: none; }
/* Between the last question and the results: nothing to peek at. */
.pt-wrap .pt.is-gated .pt-list { display: none; }
.pt-wrap .pt.is-live .pt-list__item { display: none; }
.pt-wrap .pt.is-live .pt-list__item.is-current { display: block; animation: pt-in .45s var(--pt-ease); }
.pt-wrap .pt.is-review .pt-list__item { display: none; }
.pt-wrap .pt.is-review .pt-list__item.is-drawn { display: block; animation: none; }
.pt-wrap .pt.is-review .pt-answer { display: block; }

/* Review: right in green, a wrong pick in red, each with its mark. */
.pt-wrap .pt.is-review .pt-choice label { cursor: default; transform: none; }
/* (The :has() doubles outrank the rose "checked" rule, so a right pick turns green.) */
.pt-wrap .pt-choice.is-right label, .pt-wrap .pt-choice.is-right:has(input:checked) label { border-color: var(--pt-good-fill); background: var(--pt-good-soft); box-shadow: none; }
.pt-wrap .pt-choice.is-right .pt-choice__letter, .pt-wrap .pt-choice.is-right input:checked + .pt-choice__letter { background: var(--pt-good-fill); border-color: var(--pt-good-fill); color: #fff; }
.pt-wrap .pt-choice.is-wrong label, .pt-wrap .pt-choice.is-wrong:has(input:checked) label { border-color: var(--pt-bad-fill); background: var(--pt-bad-soft); box-shadow: none; }
.pt-wrap .pt-choice.is-wrong .pt-choice__letter, .pt-wrap .pt-choice.is-wrong input:checked + .pt-choice__letter { background: var(--pt-bad-fill); border-color: var(--pt-bad-fill); color: #fff; }
.pt-wrap .pt-choice.is-right label::after,
.pt-wrap .pt-choice.is-wrong label::after {
	flex: none; width: 22px; height: 12px; margin: -4px 4px 0 0;
	border-left: 2.5px solid var(--pt-good); border-bottom: 2.5px solid var(--pt-good);
	transform: rotate(-45deg) scale(.8); content: "";
}
.pt-wrap .pt-choice.is-wrong label::after {
	width: 18px; height: 18px; margin: 0 4px 0 0; border: 0; transform: none;
	background:
		linear-gradient(45deg, transparent 44%, var(--pt-bad) 44%, var(--pt-bad) 56%, transparent 56%),
		linear-gradient(-45deg, transparent 44%, var(--pt-bad) 44%, var(--pt-bad) 56%, transparent 56%);
}
.pt-wrap .pt.is-review .pt-q { border-left-width: 4px; }
.pt-wrap .pt.is-review .pt-q.is-correct { border-left-color: var(--pt-good-fill); }
.pt-wrap .pt.is-review .pt-q.is-incorrect { border-left-color: var(--pt-bad-fill); }
.pt-wrap .pt.is-review .pt-q.is-correct .pt-answer { border-color: color-mix(in srgb, var(--pt-good-fill) 40%, var(--pt-border)); }
.pt-wrap .pt-q.is-correct [data-verdict] { color: var(--pt-good); }
.pt-wrap .pt-q.is-incorrect [data-verdict] { color: var(--pt-bad); }

.pt-wrap .pt-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.pt-wrap .pt-nav [data-prev][disabled] { visibility: hidden; }
.pt-wrap .pt-nav .pt-btn { min-width: 132px; }

/* ── Lead form + results ──────────────────────────────────────────────────── */

.pt-wrap .pt-lead,
.pt-wrap .pt-results { animation: pt-in .5s var(--pt-ease); }
.pt-wrap .pt-lead { display: grid; gap: 16px; }
.pt-wrap .pt-lead .pt-h2 { margin: 0; }
.pt-wrap .pt-field label { display: block; margin-bottom: 6px; font-weight: 700; font-size: .9375rem; }
.pt-wrap .pt-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pt-wrap .pt-error { color: var(--pt-bad); font-weight: 600; }
.pt-wrap .pt-lead .pt-btn { justify-self: start; }

/* The score in a ring that fills to it (--pt-pct is set by the player). */
.pt-wrap .pt-results { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 32px; align-items: center; }
.pt-wrap .pt-results > * { grid-column: 2; }
.pt-wrap .pt-results .pt-score { grid-column: 1; grid-row: 1 / span 4; }
.pt-wrap .pt-score {
	--pt-ring: 0;
	position: relative; display: grid; place-items: center;
	width: clamp(132px, 18vw, 168px); aspect-ratio: 1; border-radius: 50%;
	background: conic-gradient(var(--pt-accent) calc(var(--pt-ring) * 1%), var(--pt-border) 0);
	font-family: var(--pt-display); font-weight: 700; font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); letter-spacing: -.03em;
	color: var(--pt-ink); font-variant-numeric: tabular-nums;
}
.pt-wrap .pt-score::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--pt-surface); }
.pt-wrap .pt-score span { position: relative; }
.pt-wrap .pt-results.is-shown .pt-score { --pt-ring: var(--pt-pct, 0); }
/* Registered, so the ring sweeps round instead of jumping. */
@property --pt-ring { syntax: "<number>"; inherits: true; initial-value: 0; }
.pt-wrap .pt-score { transition: --pt-ring 1.4s var(--pt-ease) .15s; }
.pt-wrap .pt-results__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 6px; }
@media (max-width: 560px) {
	.pt-wrap .pt-results { grid-template-columns: minmax(0, 1fr); justify-items: start; }
	.pt-wrap .pt-results > *, .pt-wrap .pt-results .pt-score { grid-column: 1; grid-row: auto; }
}

/* ── Motion ──────────────────────────────────────────────────────────────── */

@keyframes pt-in {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.pt-wrap *, .pt-wrap *::before, .pt-wrap *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 560px) {
	.pt-wrap .pt-bar { padding: 8px 8px 8px 16px; gap: 10px; }
	.pt-wrap .pt-nav .pt-btn { flex: 1; min-width: 0; }
	.pt-wrap .pt-results__actions .pt-btn { flex: 1; }
	.pt-wrap .pt-choice label { padding: 12px 14px; gap: 12px; font-size: 1rem; }
	.pt-wrap .pt-choice__letter { width: 32px; height: 32px; }
}

/* Scrolled-to elements stop below the sticky site header. */
.pt-wrap .pt,
.pt-wrap .pt-bar,
.pt-wrap .pt-card,
.pt-wrap .pt-q { scroll-margin-top: calc(var(--pt-top) + 16px); }
.pt-embed-page .pt,
.pt-embed-page .pt-bar,
.pt-embed-page .pt-card,
.pt-embed-page .pt-q { scroll-margin-top: 12px; }
.pt-embed-page .pt-credit { margin: 22px 0 0; text-align: center; font-size: .8125rem; }
.pt-embed-page .pt-credit a { color: var(--pt-muted); }

/* A quiz inside a blog post ([ays_quiz id=N]). */
.pt-wrap--inline { max-width: none; margin: 2em 0; }
.pt-wrap--inline .pt-eyebrow { font-family: var(--pt-display); font-size: .8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--pt-accent-text); margin-bottom: 6px; }
.pt-wrap--inline .pt-title { font-family: var(--pt-display); font-size: clamp(1.25rem, 1.1rem + .8vw, 1.625rem); margin: 0 0 16px; }
.pt-wrap--inline .pt-title a { color: inherit; text-decoration: none; }


/* ── The test room ────────────────────────────────────────────────────────
   During a sitting the quiz fills the screen (practice-tests.js moves it into
   .pt-room on <body>): toolbar on top, the question in the middle (passage
   on the left when there is one), numbered bubbles at the bottom. Modelled
   on the quizzes platform's player. */

html.pt-room-open, html.pt-room-open body { overflow: hidden; }
.pt-room {
	position: fixed; inset: 0; z-index: 100000;
	max-width: none; margin: 0;
	background: var(--pt-bg);
}
.pt-wrap .pt.is-live {
	height: 100%;
	/* One column the width of the screen: the long title must not widen it. */
	display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto;
	--pt-fs: 1;
}
.pt-wrap .pt[data-size="sm"] { --pt-fs: .9; }
.pt-wrap .pt[data-size="lg"] { --pt-fs: 1.15; }
.pt-wrap .pt[data-size="xl"] { --pt-fs: 1.3; }

/* Toolbar */
.pt-wrap .pt.is-live .pt-bar {
	position: static; margin: 0; gap: 10px;
	padding: 8px clamp(10px, 2vw, 20px);
	border: 0; border-bottom: 1px solid var(--pt-border); border-radius: 0;
	background: var(--pt-surface); box-shadow: none;
	-webkit-backdrop-filter: none; backdrop-filter: none;
}
.pt-wrap .pt-bar__title {
	flex: 1 1 auto; min-width: 0;
	font-family: var(--pt-display); font-weight: 600; font-size: .9375rem; color: var(--pt-ink);
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pt-wrap .pt.is-live .pt-bar__progress { flex: none; }
.pt-wrap .pt.is-live .pt-bar__track { display: none; }
.pt-wrap .pt.is-live .pt-bar__progress [data-progress-text] { color: var(--pt-muted); font-size: .875rem; }
.pt-wrap .pt-tb {
	flex: none; display: grid; place-items: center;
	width: 36px; height: 36px; padding: 0;
	border: 0; border-radius: 10px; background: none;
	color: var(--pt-muted); cursor: pointer;
	transition: background-color .15s, color .15s, box-shadow .15s;
}
.pt-wrap .pt-tb svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pt-wrap .pt-tb:hover { color: var(--pt-ink); background: var(--pt-bg); }
.pt-wrap .pt-tb:focus-visible { outline: 2px solid var(--pt-accent); outline-offset: 2px; }
.pt-wrap .pt-tools {
	flex: none; display: flex; gap: 2px; padding: 3px;
	border: 1px solid var(--pt-border); border-radius: 13px; background: var(--pt-bg);
}
.pt-wrap .pt-tools .pt-tb:hover { background: var(--pt-surface); }
.pt-wrap .pt-tb[aria-pressed="true"],
.pt-wrap .pt-tools .pt-tb[aria-pressed="true"] { background: var(--pt-surface); color: var(--pt-ink); box-shadow: inset 0 0 0 1.5px var(--pt-accent); }
.pt-wrap .pt-tb--hl-yellow svg { stroke: #CA8A04; }
.pt-wrap .pt-tb--hl-orange svg { stroke: #EA580C; }
.pt-wrap .pt-tb--hl-pink svg { stroke: #DB2777; }
.pt-wrap .pt-size {
	flex: none; position: relative; display: inline-flex; align-items: center; gap: 4px;
	height: 38px; padding: 0 8px 0 10px;
	border: 1px solid var(--pt-border); border-radius: 11px; color: var(--pt-muted);
}
.pt-wrap .pt-size__aa { font-family: var(--pt-display); font-weight: 700; font-size: .8125rem; }
.pt-wrap .pt-size select {
	appearance: none; -webkit-appearance: none; border: 0; background: none; padding: 0 2px;
	font: 600 .8125rem/1 var(--pt-font); color: var(--pt-ink); cursor: pointer;
}
.pt-wrap .pt-size:focus-within { outline: 2px solid var(--pt-accent); outline-offset: 2px; }
.pt-wrap .pt-size select:focus { outline: none; }
.pt-wrap .pt.is-live .pt-bar__timer { cursor: pointer; }
.pt-wrap .pt.is-time-hidden .pt-bar__timer { font-size: 0; gap: 0; }
.pt-wrap .pt.is-time-hidden .pt-bar__timer::after { content: "Show time"; font-size: .8125rem; margin-left: 8px; }
.pt-wrap .pt-tb--theme svg + svg { display: none; }
:root[data-theme="dark"] .pt-wrap .pt-tb--theme svg { display: none; }
:root[data-theme="dark"] .pt-wrap .pt-tb--theme svg + svg { display: block; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .pt-wrap .pt-tb--theme svg { display: none; }
	:root:not([data-theme="light"]) .pt-wrap .pt-tb--theme svg + svg { display: block; }
}
.pt-wrap .pt-bar__finish { flex: none; }

/* The question: one pane, or passage | question */
.pt-wrap .pt.is-live .pt-list { display: block; min-height: 0; overflow: hidden; }
.pt-wrap .pt.is-live .pt-list__item.is-current { height: 100%; }
.pt-wrap .pt.is-live .pt-q {
	height: 100%; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none;
	display: grid; grid-template-columns: minmax(0, 1fr);
}
.pt-wrap .pt.is-live .pt-q.has-passage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pt-wrap .pt.is-live .pt-q__pane {
	min-height: 0; overflow-y: auto; overscroll-behavior: contain;
	padding: clamp(22px, 3.5vw, 44px) clamp(18px, 3.5vw, 44px);
}
.pt-wrap .pt.is-live .pt-q:not(.has-passage) .pt-q__pane--work { width: 100%; max-width: 820px; justify-self: center; }
.pt-wrap .pt.is-live .pt-q__pane--passage { background: var(--pt-surface); border-right: 1px solid var(--pt-border); }
.pt-wrap .pt.is-live .pt-q__stim {
	max-width: 68ch; margin: 0; padding: 0; border: 0; border-radius: 0; background: none;
	font-size: calc(1.0625rem * var(--pt-fs)); line-height: 1.8;
}
.pt-wrap .pt.is-live .pt-q__stem { font-size: calc(1.125rem * var(--pt-fs)); }
.pt-wrap .pt.is-live .pt-choice label { font-size: calc(1.0625rem * var(--pt-fs)); padding-right: 58px; }
.pt-wrap .pt.is-live .pt-typed input { font-size: calc(1.0625rem * var(--pt-fs)); }
.pt-wrap .pt.is-live .pt-q__num:focus { outline: none; }
@media (max-width: 899px) {
	.pt-wrap .pt.is-live .pt-q,
	.pt-wrap .pt.is-live .pt-q.has-passage { display: block; overflow-y: auto; overscroll-behavior: contain; }
	.pt-wrap .pt.is-live .pt-q__pane { overflow: visible; }
	.pt-wrap .pt.is-live .pt-q__pane--passage { border-right: 0; border-bottom: 1px solid var(--pt-border); }
}

/* Marks */
.pt-wrap mark.pt-mark { color: inherit; background: none; padding: 0; border-radius: 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.pt-wrap mark.pt-mark--yellow { background: #FDE68A; }
.pt-wrap mark.pt-mark--orange { background: #FED7AA; }
.pt-wrap mark.pt-mark--pink { background: #FBCFE8; }
.pt-wrap mark.pt-mark--ul { text-decoration: underline; text-decoration-color: var(--pt-accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
:root[data-theme="dark"] .pt-wrap mark.pt-mark--yellow { background: rgba(250, 204, 21, .32); }
:root[data-theme="dark"] .pt-wrap mark.pt-mark--orange { background: rgba(251, 146, 60, .34); }
:root[data-theme="dark"] .pt-wrap mark.pt-mark--pink { background: rgba(236, 72, 153, .34); }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .pt-wrap mark.pt-mark--yellow { background: rgba(250, 204, 21, .32); }
	:root:not([data-theme="light"]) .pt-wrap mark.pt-mark--orange { background: rgba(251, 146, 60, .34); }
	:root:not([data-theme="light"]) .pt-wrap mark.pt-mark--pink { background: rgba(236, 72, 153, .34); }
}
.pt-wrap .pt[data-tool^="hl"] .pt-annot,
.pt-wrap .pt[data-tool="underline"] .pt-annot { cursor: text; }
.pt-wrap .pt[data-tool="hl-yellow"] .pt-annot ::selection { background: #FDE68A; color: #151A2D; }
.pt-wrap .pt[data-tool="hl-orange"] .pt-annot ::selection { background: #FED7AA; color: #151A2D; }
.pt-wrap .pt[data-tool="hl-pink"] .pt-annot ::selection { background: #FBCFE8; color: #151A2D; }
.pt-wrap .pt[data-tool="erase"] mark.pt-mark { cursor: pointer; }
.pt-wrap .pt[data-tool="erase"] mark.pt-mark:hover { outline: 2px dashed var(--pt-bad-fill); outline-offset: 1px; }

/* Cross out a choice */
.pt-wrap .pt-x { display: none; }
.pt-wrap .pt.is-live .pt-x {
	display: grid; position: absolute; top: 50%; right: 10px; margin-top: -18px;
	border-radius: 50%; opacity: .6;
}
.pt-wrap .pt.is-live .pt-x:hover,
.pt-wrap .pt.is-live .pt-x[aria-pressed="true"] { opacity: 1; color: var(--pt-bad); background: var(--pt-bg); box-shadow: none; }
.pt-wrap .pt-choice.is-out label { opacity: .5; }
.pt-wrap .pt-choice.is-out label:hover { transform: none; }
.pt-wrap .pt-choice.is-out .pt-choice__text { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--pt-bad-fill); }

/* Bottom: back, the bubbles, next */
.pt-wrap .pt.is-live .pt-nav {
	align-items: center; gap: 12px; margin: 0;
	padding: 10px clamp(10px, 2vw, 20px);
	background: var(--pt-surface); border-top: 1px solid var(--pt-border);
}
.pt-wrap .pt.is-live .pt-nav .pt-btn { flex: none; min-width: 0; min-height: 44px; padding: 8px 20px; font-size: .9375rem; }
.pt-wrap .pt.is-live .pt-nav [data-prev][disabled] { visibility: visible; opacity: .35; }
.pt-wrap .pt-qdots { display: none; }
.pt-wrap .pt.is-live .pt-qdots {
	flex: 1; min-width: 0; display: flex; justify-content: safe center; gap: 6px;
	padding: 3px 2px; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth;
}
.pt-wrap .pt-qdots::-webkit-scrollbar { display: none; }
.pt-wrap .pt-qdots li { flex: none; }
.pt-wrap .pt-qdot {
	display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
	border: 1.5px solid var(--pt-border); border-radius: 50%; background: none;
	font-family: var(--pt-display); font-weight: 600; font-size: .8125rem; font-variant-numeric: tabular-nums;
	color: var(--pt-muted); cursor: pointer;
	transition: background-color .15s, border-color .15s, color .15s;
}
.pt-wrap .pt-qdot:hover { border-color: var(--pt-accent); color: var(--pt-ink); }
.pt-wrap .pt-qdot:focus-visible { outline: 2px solid var(--pt-accent); outline-offset: 2px; }
.pt-wrap .pt-qdot.is-done { border-color: color-mix(in srgb, var(--pt-accent) 45%, var(--pt-border)); background: var(--pt-accent-soft); color: var(--pt-accent-text); }
.pt-wrap .pt-qdot.is-current { border-color: var(--pt-accent-fill); background: var(--pt-accent-fill); color: #fff; }

/* Confirm (leave, finish with questions open) */
.pt-wrap .pt-confirm {
	position: fixed; inset: 0; z-index: 2;
	display: grid; place-items: center; padding: 16px;
	background: rgba(10, 12, 24, .5);
}
.pt-wrap .pt-confirm[hidden] { display: none; }
.pt-wrap .pt-confirm__box {
	width: 100%; max-width: 420px; display: grid; gap: 20px; padding: 26px;
	background: var(--pt-surface); border: 1px solid var(--pt-border);
	border-radius: var(--pt-radius); box-shadow: var(--pt-shadow);
	animation: pt-in .25s var(--pt-ease);
}
.pt-wrap .pt-confirm__text { font-family: var(--pt-display); font-weight: 600; font-size: 1.0625rem; line-height: 1.45; color: var(--pt-ink); }
.pt-wrap .pt-confirm__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }

/* Phones: two toolbar rows (leave, progress, time, finish / the tools) */
@media (max-width: 720px) {
	.pt-wrap .pt.is-live .pt-bar { flex-wrap: wrap; row-gap: 8px; padding: 8px 10px; }
	.pt-wrap .pt.is-live .pt-bar::before { content: ""; order: 5; flex-basis: 100%; height: 0; }
	.pt-wrap .pt-bar__title { display: none; }
	.pt-wrap .pt-tb--exit { order: 1; }
	.pt-wrap .pt.is-live .pt-bar__progress { order: 2; flex: 1; }
	.pt-wrap .pt.is-live .pt-bar__timer { order: 3; padding: 7px 10px; }
	.pt-wrap .pt-bar__finish { order: 4; }
	.pt-wrap .pt-tools { order: 6; flex: 1; justify-content: space-between; }
	.pt-wrap .pt-size { order: 7; }
	.pt-wrap .pt-tb--theme { order: 8; }
	.pt-wrap .pt.is-live .pt-nav { gap: 8px; padding: 8px 10px; }
	.pt-wrap .pt.is-live .pt-nav .pt-btn { padding: 8px 14px; min-height: 40px; }
	.pt-wrap .pt.is-live .pt-qdots { justify-content: flex-start; }
	.pt-wrap .pt.is-live .pt-choice label { padding-right: 52px; }
}

/* Formulas in the stem and choices read at the text's size (MathJax draws them small). */
.pt-wrap .pt-q__stem mjx-container,
.pt-wrap .pt-choice__text mjx-container { font-size: 118% !important; }
