/* ================================================================
   Online SATs test (exam-player.js)
   ================================================================ */
#screenTest.is-exam .test-view-tabs,
#screenTest.is-exam .test-body { display: none !important; }
#screenTest:not(.is-exam) #examBody { display: none; }

.exam {
  --ex-ink: #1f1b3d;
  --ex-accent: var(--violet);
  --ex-card: #fff;
  --ex-bg: #f4f3fa;
  max-width: 1400px; margin: 0 auto; padding: 12px 16px 16px;
  height: calc(100vh - 96px); height: calc(100dvh - 96px);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px;
}
.exam.has-text { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.exam.is-start, .exam.is-results { display: block; overflow: auto; }

/* ---------- start card */
.ex-start { display: flex; justify-content: center; padding: 20px 0 40px; }
.ex-start-card { background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-md); padding: 32px 36px; max-width: 640px; width: 100%; text-align: center; animation: exRise .45s cubic-bezier(.2,.9,.3,1.2); }
.ex-start-icon { font-size: 3rem; line-height: 1; }
.ex-start-kicker { font-weight: 900; letter-spacing: .06em; text-transform: uppercase; font-size: .78rem; color: var(--violet); margin-top: 10px; }
.ex-start-card h2 { font-family: var(--font-display); font-size: 1.7rem; color: var(--ex-ink); margin: 6px 0 18px; }
.ex-facts { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.ex-facts div { background: var(--violet-soft); border-radius: 16px; padding: 10px 16px; min-width: 88px; }
.ex-facts strong { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--violet-deep); line-height: 1.1; }
.ex-facts span { font-size: .78rem; font-weight: 800; color: var(--ink-soft); }
.ex-rules { text-align: left; list-style: none; display: grid; gap: 8px; margin: 0 auto 22px; max-width: 520px; }
.ex-rules li { position: relative; padding-left: 26px; font-weight: 700; color: var(--ink-soft); line-height: 1.45; }
.ex-rules li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--go); font-weight: 900; }
.ex-start-btns { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.ex-last { margin-top: 14px; }

/* ---------- main column */
.ex-main { display: flex; flex-direction: column; min-height: 0; gap: 10px; }
.ex-nav { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; flex-shrink: 0; }
.ex-pill { flex: 0 0 auto; min-width: 38px; height: 38px; padding: 0 8px; border-radius: 12px; border: none; cursor: pointer; font: inherit; font-weight: 900; font-size: .85rem;
  background: #fff; color: var(--ink-soft); box-shadow: inset 0 0 0 2px var(--line); position: relative; transition: transform .15s, background .15s; }
.ex-pill:hover { transform: translateY(-2px); }
.ex-pill.is-done { background: var(--violet-soft); color: var(--violet-deep); box-shadow: inset 0 0 0 2px #c4b5fd; }
.ex-pill.is-current { background: var(--violet); color: #fff; box-shadow: 0 4px 0 var(--violet-deep); }
.ex-pill.is-flag::after { content: ''; position: absolute; top: -3px; right: -3px; width: 11px; height: 11px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 2px #fff; }

.ex-stage { flex: 1; min-height: 0; overflow: auto; border-radius: var(--r-lg); }
.ex-card { background: var(--ex-card); border-radius: var(--r-lg); box-shadow: var(--shadow-md); padding: 16px 26px 26px; transition: opacity .25s, transform .25s; color: var(--ex-ink); }
.ex-card.is-enter { opacity: 0; transform: translateX(18px); }
.ex-qhead { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 2px solid var(--line); }
.ex-qnum { min-width: 44px; height: 44px; padding: 0 8px; border-radius: 14px; background: var(--violet); color: #fff; font-family: var(--font-display); font-size: 1.25rem; display: flex; align-items: center; justify-content: center; }
.ex-qmeta { font-weight: 800; color: var(--muted); font-size: .85rem; flex: 1; }
.ex-marks { font-weight: 900; font-size: .8rem; background: var(--sun-soft); color: #92400e; padding: 4px 10px; border-radius: 99px; }
.ex-icon { border: none; background: var(--violet-soft); width: 40px; height: 40px; border-radius: 12px; cursor: pointer; font-size: 1.05rem; transition: transform .15s; filter: grayscale(.4); }
.ex-icon:hover { transform: scale(1.08); filter: none; }
.ex-icon.is-on { background: var(--sun-soft); filter: none; box-shadow: inset 0 0 0 2px var(--sun); }

.ex-stem { font-size: 1.08rem; line-height: 1.55; color: var(--ink-soft); background: #faf9fe; border-left: 4px solid #c4b5fd; padding: 10px 14px; border-radius: 0 12px 12px 0; margin-bottom: 12px; }
.ex-prompt { font-size: 1.2rem; line-height: 1.6; font-weight: 700; }
.ex-prompt.is-sum { font-family: var(--font-display); font-size: 2rem; font-weight: 600; letter-spacing: .01em; padding: 14px 0 6px; }
.ex-prompt .frac { font-size: .95em; vertical-align: middle; }
.ex-sub { margin-top: 6px; font-weight: 800; color: var(--violet-deep); }
.ex-fig { margin: 16px 0 6px; text-align: center; }
.ex-fig img { max-width: 100%; max-height: 52vh; height: auto; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); background: #fff; }
/* wide screens: the picture (or the drawing answer) beside the question, so all of it fits in the window */
.ex-card.has-side { display: flow-root; }
.ex-card.has-side .ex-side { float: right; max-width: 50%; margin: 0 0 12px 24px; }
.ex-card.has-side .ex-answer.ex-side { max-width: 58%; }
.ex-card.has-side .ex-side img { max-height: none; }
.ex-card.has-side .ex-stem, .ex-card.has-side .ex-prompt, .ex-card.has-side .ex-sub, .ex-card.has-side .ex-answer { display: flow-root; }

/* column / bus-stop calculations */
.ex-calc { font-family: var(--font-display); font-size: 2rem; margin: 10px 0 4px 6px; font-variant-numeric: tabular-nums; }
.ex-calc.is-col { display: inline-grid; justify-items: end; letter-spacing: .25em; }
.ex-calc.is-col .op { margin-right: .5em; letter-spacing: 0; }
.ex-calc.is-col .rule { width: 100%; border-top: 3px solid var(--ex-ink); height: 1.2em; margin-top: 4px; border-bottom: 3px solid var(--ex-ink); }
.ex-calc.is-div { display: inline-flex; align-items: flex-end; letter-spacing: .25em; margin-top: 24px; }
.ex-calc.is-div .dv { padding-right: .3em; letter-spacing: 0; }
.ex-calc.is-div .dd { border-left: 3px solid var(--ex-ink); border-top: 3px solid var(--ex-ink); padding: 2px 0 0 .35em; border-top-left-radius: 0 0; }

/* ---------- answer controls */
.ex-answer { margin-top: 18px; }
.ex-box { display: inline-flex; align-items: center; gap: 8px; background: #fff; border-radius: 14px; padding: 6px 10px; box-shadow: inset 0 0 0 3px #a5b4fc; transition: box-shadow .15s; }
.ex-box:focus-within { box-shadow: inset 0 0 0 3px var(--violet), 0 0 0 5px var(--violet-soft); }
.ex-unit { font-weight: 900; color: var(--ink-soft); font-size: 1.15rem; }
.ex-input { border: none; outline: none; font: inherit; font-size: 1.35rem; font-weight: 800; color: var(--ex-ink); width: 11ch; min-width: 0; padding: 6px 4px; background: transparent; }
.ex-input::placeholder { color: #c7c4dc; font-weight: 700; }
.ex-fields { display: flex; flex-wrap: wrap; gap: 12px; }
.ex-flabel { font-weight: 900; color: var(--violet-deep); }
.ex-hint { margin-top: 8px; font-size: .85rem; font-weight: 800; color: var(--muted); }

.ex-options { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.ex-opt { display: flex; align-items: center; gap: 12px; text-align: left; border: none; cursor: pointer; font: inherit; font-weight: 700; font-size: 1.05rem; color: var(--ex-ink);
  background: #fff; padding: 12px 14px; border-radius: 14px; box-shadow: inset 0 0 0 2px var(--line); transition: box-shadow .15s, background .15s, transform .1s; }
.ex-opt:hover { box-shadow: inset 0 0 0 2px #c4b5fd; }
.ex-opt:active { transform: scale(.98); }
.ex-tick { flex: 0 0 26px; height: 26px; border-radius: 8px; box-shadow: inset 0 0 0 2px #a5a1c8; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; }
.ex-opt.is-on { background: var(--violet-soft); box-shadow: inset 0 0 0 2px var(--violet); }
.ex-opt.is-on .ex-tick { background: var(--violet); box-shadow: none; }
.ex-opt.is-on .ex-tick::after { content: '✓'; }

.ex-table-wrap { overflow-x: auto; }
.ex-table { border-collapse: separate; border-spacing: 0; min-width: 100%; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 2px var(--line); }
.ex-table th, .ex-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: center; }
.ex-table thead th { background: var(--violet-soft); color: var(--violet-deep); font-weight: 900; font-size: .9rem; }
.ex-table tbody th { text-align: left; font-weight: 700; }
.ex-table tbody tr:last-child > * { border-bottom: none; }
.ex-cell { width: 34px; height: 34px; border-radius: 9px; border: none; cursor: pointer; background: #fff; box-shadow: inset 0 0 0 2px #a5a1c8; color: #fff; font-weight: 900; font-size: 1.1rem; }
.ex-cell.is-on { background: var(--violet); box-shadow: none; }
.ex-cell.is-on::after { content: '✓'; }

.ex-match { display: grid; gap: 10px; }
.ex-mrow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; background: #faf9fe; padding: 8px 10px; border-radius: 14px; }
.ex-mleft { font-weight: 800; }
.ex-marrow { color: var(--violet); font-weight: 900; }
.ex-select { font: inherit; font-weight: 800; padding: 9px 10px; border-radius: 12px; border: none; box-shadow: inset 0 0 0 2px #a5b4fc; background: #fff; color: var(--ex-ink); max-width: 100%; }

.ex-order { list-style: none; display: grid; gap: 8px; max-width: 520px; }
.ex-order li { display: flex; align-items: center; gap: 10px; background: #fff; padding: 8px 10px; border-radius: 14px; box-shadow: inset 0 0 0 2px var(--line); animation: exRise .25s; }
.ex-ordn { width: 28px; height: 28px; border-radius: 50%; background: var(--violet-soft); color: var(--violet-deep); font-weight: 900; display: flex; align-items: center; justify-content: center; font-size: .85rem; }
.ex-ordt { flex: 1; font-weight: 800; font-size: 1.1rem; }
.ex-mv { border: none; background: var(--violet-soft); color: var(--violet-deep); width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-weight: 900; }
.ex-mv:disabled { opacity: .3; cursor: default; }

.ex-sentence { font-size: 1.2rem; line-height: 2.3; font-weight: 600; }
.ex-word { border: none; background: none; font: inherit; color: inherit; cursor: pointer; padding: 1px 5px; border-radius: 99px; transition: background .15s, box-shadow .15s; }
.ex-word:hover { background: var(--violet-soft); }
.ex-word.is-on { box-shadow: 0 0 0 2.5px var(--violet); background: #f5f3ff; }
.ex-spot { display: inline-block; vertical-align: middle; width: 26px; height: 26px; margin: 0 3px; border: none; border-radius: 7px; cursor: pointer; background: #fff; box-shadow: inset 0 0 0 2px #a5a1c8; color: #fff; font-weight: 900; }
.ex-spot.is-on { background: var(--violet); box-shadow: none; }
.ex-spot.is-on::after { content: '✓'; }
.ex-gaps .ex-gap { width: 9ch; border-bottom: 3px solid #a5b4fc; border-radius: 6px 6px 0 0; background: #f5f3ff; font-size: 1.1rem; text-align: center; margin: 0 4px; }
.ex-gaps .ex-select { margin: 0 4px; }
.ex-long { width: 100%; font: inherit; font-size: 1.1rem; line-height: 1.7; padding: 12px 14px; border-radius: 14px; border: none; box-shadow: inset 0 0 0 3px #a5b4fc; resize: vertical; color: var(--ex-ink);
  background: repeating-linear-gradient(#fff 0 calc(1.7em - 1px), #e8e6f5 calc(1.7em - 1px) 1.7em); background-attachment: local; background-position: 0 12px; }
.ex-long:focus { outline: none; box-shadow: inset 0 0 0 3px var(--violet), 0 0 0 5px var(--violet-soft); }

/* drawing on a diagram */
.ex-drawwrap { display: grid; gap: 8px; }
.ex-drawstage { position: relative; display: inline-block; max-width: 100%; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 2px #a5b4fc; background: #fff; justify-self: start; }
.ex-drawstage img { display: block; max-width: 100%; max-height: 60vh; }
.ex-drawstage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.ex-drawblank { width: min(560px, 80vw); height: 320px; }

/* working space */
.ex-work { margin-top: 22px; clear: both; border-radius: 16px; background: #fbfbff; box-shadow: inset 0 0 0 2px var(--line); overflow: hidden; }
.ex-work-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px 8px 14px; border-bottom: 2px solid var(--line); background: #fff; }
.ex-work-head strong { color: var(--violet-deep); }
.ex-work-head > span { font-size: .82rem; font-weight: 700; color: var(--muted); flex: 1; }
.ex-work-pad { display: block; width: 100%; height: max(720px, 85vh); touch-action: none; cursor: crosshair;
  background-color: #fff; background-image: linear-gradient(#e3e9f7 1px, transparent 1px), linear-gradient(90deg, #e3e9f7 1px, transparent 1px); background-size: 22px 22px; }
.sk-tools { display: flex; gap: 4px; }
.sk-btn { border: none; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 800; color: var(--ink-soft); background: transparent; padding: 6px 9px; border-radius: 10px; display: inline-flex; gap: 4px; align-items: center; }
.sk-btn:hover { background: var(--violet-soft); }
.sk-btn.is-on { background: var(--violet); color: #fff; }

/* footer */
.ex-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-shrink: 0; }
.ex-count { font-weight: 800; color: var(--muted); font-size: .85rem; text-align: center; }
.ex-foot .btn:disabled { opacity: .4; pointer-events: none; }

/* ---------- reading text panel */
.ex-text { display: flex; flex-direction: column; min-height: 0; background: #fffdf7; border-radius: var(--r-lg); box-shadow: var(--shadow-md); overflow: hidden; }
.ex-text-tabs { display: flex; gap: 6px; padding: 10px; background: #fff7e6; border-bottom: 2px solid #fde9c3; overflow-x: auto; flex-shrink: 0; }
.ex-text-tabs button { flex: 0 0 auto; border: none; cursor: pointer; font: inherit; font-weight: 800; font-size: .85rem; padding: 8px 12px; border-radius: 99px; background: #fff; color: #92400e; box-shadow: inset 0 0 0 2px #fde2a8; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-text-tabs button.is-active { background: #f59e0b; color: #fff; box-shadow: none; }
.ex-article { overflow: auto; padding: 22px 30px 40px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.12rem; line-height: 1.75; color: #2b2540; }
.ex-art-kind { font-family: var(--font-body, inherit); font-size: .75rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: #b45309; }
.ex-article h2 { font-family: var(--font-display); font-size: 1.7rem; color: #3b2f13; margin: 4px 0 2px; line-height: 1.25; }
.ex-art-by { font-style: italic; color: #7c6f55; margin-bottom: 14px; }
.ex-article h3 { font-family: var(--font-display); font-size: 1.2rem; margin: 20px 0 6px; color: #3b2f13; }
.ex-article p { margin: 0 0 14px; }
.ex-article figure { margin: 16px 0; text-align: center; }
.ex-article figure img { max-width: 100%; border-radius: 12px; }
.ex-mobile-tabs { display: none; }

/* ---------- results */
.rv { max-width: 960px; margin: 0 auto; padding-bottom: 40px; animation: exRise .4s; }
.rv-banner { display: flex; gap: 24px; align-items: center; background: linear-gradient(135deg, #f5f3ff, #fef3c7); border-radius: var(--r-lg); padding: 22px 24px; box-shadow: var(--shadow-md); }
.rv-ring { --p: 0; flex: 0 0 140px; height: 140px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--violet) calc(var(--p) * 1%), #e9e5fb 0); animation: badgeIn .8s cubic-bezier(.3,1.6,.5,1); }
.rv-ring > div { width: 112px; height: 112px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rv-ring strong { font-family: var(--font-display); font-size: 2.6rem; color: var(--violet-deep); line-height: 1; }
.rv-ring span { font-size: .78rem; font-weight: 900; color: var(--ink-soft); }
.rv-sum h2 { font-family: var(--font-display); color: var(--ex-ink); font-size: 1.6rem; }
.rv-meta { font-weight: 800; color: var(--ink-soft); margin: 4px 0 10px; }
.rv-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rv-chips span { font-weight: 900; font-size: .82rem; padding: 5px 11px; border-radius: 99px; background: #fff; }
.chip-r { color: var(--go-deep); } .chip-w { color: #b91c1c; } .chip-c { color: #92400e; }
.rv-help { margin-top: 10px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.rv-filter { display: flex; gap: 8px; margin: 18px 0 12px; flex-wrap: wrap; }
.rv-filter button { border: none; cursor: pointer; font: inherit; font-weight: 900; padding: 8px 16px; border-radius: 99px; background: #fff; color: var(--ink-soft); box-shadow: inset 0 0 0 2px var(--line); }
.rv-filter button.is-active { background: var(--violet); color: #fff; box-shadow: none; }
.rv-list { list-style: none; display: grid; gap: 10px; }
.rv-row { background: #fff; border-radius: 18px; box-shadow: var(--shadow-sm, 0 2px 8px rgba(40,30,90,.08)); padding: 14px 16px; border-left: 6px solid var(--coral); }
.rv-row.is-right { border-left-color: var(--go); }
.rv-row.is-part { border-left-color: var(--sun); }
.rv-row.is-check { box-shadow: 0 0 0 2px var(--sun-soft), 0 2px 8px rgba(40,30,90,.08); }
.rv-top { display: flex; gap: 12px; align-items: flex-start; }
.rv-n { flex: 0 0 auto; min-width: 36px; height: 36px; padding: 0 6px; border-radius: 11px; background: var(--violet-soft); color: var(--violet-deep); font-weight: 900; display: flex; align-items: center; justify-content: center; }
.rv-q { flex: 1; font-weight: 700; line-height: 1.5; color: var(--ex-ink); }
.rv-score { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; font-weight: 800; color: var(--ink-soft); }
.rv-score strong { font-family: var(--font-display); font-size: 1.3rem; color: var(--ex-ink); }
.rv-adj { width: 28px; height: 28px; border-radius: 8px; border: none; cursor: pointer; background: var(--violet-soft); color: var(--violet-deep); font-weight: 900; }
.rv-body { margin: 8px 0 0 48px; display: grid; gap: 6px; }
.rv-line { display: grid; grid-template-columns: 130px 1fr; gap: 10px; font-size: .95rem; }
.rv-lab { font-weight: 900; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
.rv-val { font-weight: 800; color: var(--ex-ink); white-space: pre-wrap; }
.rv-val.is-empty { color: var(--muted); font-style: italic; }
.rv-val.is-key { color: var(--go-deep); }
.rv-val.is-ms { font-weight: 600; color: var(--ink-soft); }
.rv-check { font-weight: 800; font-size: .88rem; color: #92400e; background: var(--sun-soft); padding: 6px 10px; border-radius: 10px; }
.rv-workbox summary { cursor: pointer; font-weight: 900; color: var(--violet-deep); font-size: .9rem; }
.rv-work { width: 100%; max-height: 70vh; background: #fff; background-image: linear-gradient(#eef1f9 1px, transparent 1px), linear-gradient(90deg, #eef1f9 1px, transparent 1px); background-size: 16px 16px; border-radius: 10px; margin-top: 6px; box-shadow: inset 0 0 0 1px var(--line); }
.rv-drawn { position: relative; display: inline-block; max-width: 100%; margin-top: 6px; }
.rv-drawn img { display: block; max-width: 100%; max-height: 320px; }
.rv-drawn .rv-work { position: absolute; inset: 0; height: 100%; max-height: none; background: none; box-shadow: none; margin: 0; }
.rv-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

@keyframes exRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- small screens */
@media (max-width: 860px) {
  .exam { padding: 8px 10px 10px; height: calc(100dvh - 120px); }
  .exam.has-text { grid-template-columns: 1fr; }
  .exam.has-text .ex-mobile-tabs { display: flex; gap: 6px; }
  .ex-mobile-tabs button { flex: 1; border: none; font: inherit; font-weight: 900; padding: 9px; border-radius: 99px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); cursor: pointer; }
  .ex-mobile-tabs button.is-active { background: var(--violet); color: #fff; box-shadow: none; }
  .exam.has-text .ex-text { display: none; }
  .exam.has-text[data-pane="text"] .ex-text { display: flex; grid-row: 1; }
  .exam.has-text[data-pane="text"] .ex-main { grid-row: 2; flex: 0; }
  .exam.has-text[data-pane="text"] .ex-nav, .exam.has-text[data-pane="text"] .ex-stage, .exam.has-text[data-pane="text"] .ex-foot { display: none; }
  .exam.has-text[data-pane="text"] { grid-template-rows: minmax(0, 1fr) auto; }
  .ex-card { padding: 16px; }
  .ex-prompt.is-sum, .ex-calc { font-size: 1.6rem; }
  .ex-article { padding: 16px 18px 30px; }
  .rv-banner { flex-direction: column; text-align: center; }
  .rv-chips { justify-content: center; }
  .rv-body { margin-left: 0; }
  .rv-line { grid-template-columns: 1fr; gap: 0; }
  .ex-work-pad { height: max(560px, 75vh); }
  .sk-btn span { display: none; }
}

/* ---------- reading: link from each question to the text, and the in-window reader */
.ex-textlink { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff7e6; border: 2px solid #fde2a8; border-radius: 14px; padding: 8px 10px 8px 12px; margin-bottom: 14px; }
.ex-tl-icon { font-size: 1.3rem; }
.ex-tl-text { flex: 1; min-width: 180px; font-weight: 700; color: #7c4a03; line-height: 1.35; }
.ex-tl-text em { display: block; font-style: normal; font-size: .8rem; font-weight: 800; color: #b45309; }
.ex-tl-btn { background: #f59e0b; color: #fff; box-shadow: 0 3px 0 #b45309; white-space: nowrap; }
.ex-tl-btn:hover { background: #d97706; }
.ex-text-pop { margin-left: auto; flex: 0 0 auto !important; width: 36px; padding: 0 !important; font-size: 1.05rem !important; }

.ex-article .is-ref { background: #fff3c4; box-shadow: -8px 0 0 #fff3c4, 8px 0 0 #fff3c4; border-left: 4px solid #f59e0b; padding-left: 10px; margin-left: -14px; border-radius: 0 6px 6px 0; }
.ex-article .is-ref-start { position: relative; }
.ex-article .is-ref-start::before { content: '📍 This question is about here'; display: block; font-family: var(--font-body, system-ui); font-size: .72rem; font-weight: 900; letter-spacing: .03em; color: #b45309; margin-bottom: 4px; }
.ex-article mark { background: #fde047; color: inherit; padding: 0 2px; border-radius: 3px; }

.ex-reader { position: fixed; inset: 0; z-index: 60; background: rgba(30, 24, 60, .45); backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: stretch; padding: 18px; opacity: 0; transition: opacity .25s; }
.ex-reader.open { opacity: 1; }
.exr-card { --rs: 1; width: min(860px, 100%); background: #fffdf7; border-radius: var(--r-lg); box-shadow: 0 30px 80px rgba(20, 10, 60, .35); display: flex; flex-direction: column; overflow: hidden; transform: translateY(16px) scale(.98); transition: transform .3s cubic-bezier(.2,.9,.3,1.2); }
.ex-reader.open .exr-card { transform: none; }
.exr-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 20px; background: #fff; border-bottom: 2px solid #fde9c3; flex-wrap: wrap; }
.exr-title { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.exr-title strong { font-family: var(--font-display); font-size: 1.2rem; color: #3b2f13; }
.exr-title span { font-size: .84rem; font-weight: 700; color: #92400e; }
.exr-size { display: flex; gap: 4px; }
.exr-size button { border: none; cursor: pointer; font: inherit; font-weight: 900; width: 40px; height: 36px; border-radius: 10px; background: #fff7e6; color: #92400e; box-shadow: inset 0 0 0 2px #fde2a8; }
.exr-tabs { display: flex; gap: 6px; padding: 10px 14px; background: #fff7e6; overflow-x: auto; flex-shrink: 0; }
.exr-tabs button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; border: none; cursor: pointer; font: inherit; font-weight: 800; font-size: .88rem; padding: 7px 14px 7px 7px; border-radius: 99px; background: #fff; color: #92400e; box-shadow: inset 0 0 0 2px #fde2a8; }
.exr-tabs button span { width: 24px; height: 24px; border-radius: 50%; background: #fde9c3; display: grid; place-items: center; font-size: .78rem; }
.exr-tabs button.is-active { background: #f59e0b; color: #fff; box-shadow: none; }
.exr-tabs button.is-active span { background: rgba(255,255,255,.3); }
.exr-article { flex: 1; font-size: calc(1.15rem * var(--rs)); padding: 26px 44px 30px; scroll-behavior: smooth; }
.exr-end { display: flex; justify-content: center; padding: 26px 0 6px; border-top: 2px dashed #fde9c3; margin-top: 20px; font-family: var(--font-body, system-ui); }
@media (max-width: 860px) {
  .ex-reader { padding: 0; }
  .exr-card { border-radius: 0; }
  .exr-article { padding: 18px 20px 24px; }
  .exr-head .exr-close { width: 100%; order: 3; }
  .ex-article .is-ref { margin-left: -10px; padding-left: 8px; }
}

/* data tables written in question text ("a | b | c" lines) */
.ex-data { border-collapse: collapse; margin: 10px 0 12px; font-size: .95em; font-weight: 500; min-width: 50%; max-width: 100%; display: block; overflow-x: auto; }
.ex-data th, .ex-data td { border: 1px solid var(--line); padding: 6px 12px; text-align: center; white-space: nowrap; }
.ex-data th { background: var(--violet-soft); color: var(--violet-deep); font-weight: 650; }
.ex-data tbody tr:nth-child(even) td { background: #f8fafc; }

/* reading texts that keep the paper's printed lines: line numbers in the margin, as on the insert */
.ex-article .ex-lined { padding-left: 2.6em; }
.ex-article .ex-lined.is-ref { padding-left: calc(2.6em + 10px); }
.ex-article .ex-ln { display: block; position: relative; }
.ex-article .ex-ln[data-n]::before { content: attr(data-n); position: absolute; left: -2.6em; width: 2em; text-align: right; font-family: var(--font-body, system-ui); font-size: .72rem; line-height: inherit; color: #8a8399; }
.ex-article .ex-ln.is-on { background: #fde68a80; border-radius: 3px; }

/* sections added by feature modules on the results page (hooks.js) */
.rv-hooks .ex-hook { display: block; }
.rv-hooks:empty { display: none; }

/* review batch 1 (23 Oct 2026): single answers look like radio buttons, control borders reach 3:1 contrast,
   clear right / wrong marks on results, compact test header on phones */
.ex-tick, .ex-cell { box-shadow: inset 0 0 0 2px #8a94a6; }
.ex-opt { min-height: 48px; }
.ex-options.choice .ex-tick, .ex-cell { border-radius: 50%; }
.ex-options.choice .ex-opt.is-on .ex-tick::after, .ex-cell.is-on::after { content: ''; display: block; width: 10px; height: 10px; border-radius: 50%; background: #fff; margin: auto; }
.rv-mark-ic { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; margin-right: 6px; color: #fff; font-size: .8rem; font-weight: 800; line-height: 1; vertical-align: middle; }
.rv-row.is-right .rv-mark-ic { background: #22643f; }
.rv-row.is-right .rv-mark-ic::after { content: '✓'; }
.rv-row.is-part .rv-mark-ic { background: #9a5b13; }
.rv-row.is-part .rv-mark-ic::after { content: '½'; }
.rv-row.is-wrong .rv-mark-ic { background: #b42318; }
.rv-row.is-wrong .rv-mark-ic::after { content: '✕'; }
.rv-row.is-wrong { background: #fffafa; }
.rv-next { margin: 6px 0 10px; color: var(--ink); font-weight: 600; }
.rv-care { margin-top: 10px; color: var(--ink-soft); font-size: .92rem; }
.rv-banner.is-plain { display: block; }
.rv-star path { stroke: #a07d14; stroke-width: 1.2; }
@media (max-width: 600px) {
  .test-topbar #btnTestExit { font-size: 0; padding: 8px 12px; }
  .test-topbar #btnTestExit::before { content: '←'; font-size: 1.15rem; }
  .test-topbar .lesson-kicker { display: none; }
}

/* ---------- feedback motion (24 Oct 2026): the mark draws itself, the chosen answer pulses once, the score counts up.
   Overrides studio.css's text marks (✓ ✗) with a drawn line; .exam raises specificity because studio.css loads later. */
.ex-qhead { flex-wrap: wrap; row-gap: 8px; }
.exam .ex-fb .ex-fb-ic.has-svg::after { content: none; }
.exam .ex-fb .ex-fb-ic.has-svg svg { width: 16px; height: 16px; display: block; }
.exam .ex-fb.is-fresh .ex-fb-ic { animation: exIcPop .3s cubic-bezier(.3, 1.5, .5, 1); }
.exam .ex-fb.is-fresh .ex-fb-ic path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: exDraw .3s ease-out .06s forwards; }
.exam .ex-fb.is-fresh .ex-fb-pts { animation: exPtsIn .35s ease-out; }
.ex-fb-num { font-weight: 800; font-variant-numeric: tabular-nums; }
.ex-points { font-variant-numeric: tabular-nums; }
@keyframes exDraw { to { stroke-dashoffset: 0; } }
@keyframes exIcPop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
@keyframes exPtsIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* the chosen answer once marked: one gentle pulse, then coloured by the result */
.exam .ex-answer .is-pop { animation: exOptPulse .36s ease-out; }
@keyframes exOptPulse { 0% { transform: scale(1); } 45% { transform: scale(1.035); } 100% { transform: scale(1); } }
.exam .ex-answer.is-res-right .ex-opt.is-on, .exam .ex-answer.is-res-right .ex-box { background: var(--go-soft); box-shadow: inset 0 0 0 2px var(--go); }
.exam .ex-answer.is-res-right .ex-opt.is-on .ex-tick, .exam .ex-answer.is-res-right .ex-cell.is-on, .exam .ex-answer.is-res-right .ex-spot.is-on { background: var(--go); }
.exam .ex-answer.is-res-part .ex-opt.is-on, .exam .ex-answer.is-res-part .ex-box { background: var(--sun-soft); box-shadow: inset 0 0 0 2px var(--sun); }
.exam .ex-answer.is-res-wrong .ex-opt.is-on, .exam .ex-answer.is-res-wrong .ex-box { background: var(--coral-soft); box-shadow: inset 0 0 0 2px var(--coral); }
.exam .ex-answer.is-res-wrong .ex-opt.is-on .ex-tick, .exam .ex-answer.is-res-wrong .ex-cell.is-on, .exam .ex-answer.is-res-wrong .ex-spot.is-on { background: var(--coral); }

/* results: the ring and its number count up together (exam-player.js), the chips follow */
.rv-ring strong { font-variant-numeric: tabular-nums; }
.rv-chips { transition: opacity .35s ease, transform .35s ease; }
.rv-chips.is-wait { opacity: 0; transform: translateY(6px); }

/* Practice mode (GCSE papers): "Stuck? Show the steps", Try again, and the steps revealed one at a time */
.ex-learn-btn { border-style: dashed; }
.ex-stuck { margin-top: 12px; text-align: right; }
.ex-feedback.is-first { margin: 0 0 14px; }
.ex-feedback.is-first .ex-stuck { margin-top: 0; text-align: left; }
.ex-steps { margin-top: 10px; }
.ex-steps-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; }
.ex-steps-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 4px; padding-top: 10px; border-top: 1px solid rgba(20, 40, 72, .12); }
.ex-steps-head strong { font-size: .95rem; color: var(--ink); }
.ex-steps-head span { font-size: .82rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.ex-steps-key { margin: 4px 0 0; font-size: .8rem; color: var(--muted); }
.ex-steps-list { margin: 8px 0 0; padding: 0; list-style: none; counter-reset: exstep; display: grid; gap: 6px; }
.ex-steps-list li { counter-increment: exstep; position: relative; padding: 8px 12px 8px 40px; background: #fff; border: 1px solid var(--line); border-radius: 10px; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.ex-steps-list li::before { content: counter(exstep); position: absolute; left: 10px; top: 8px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--violet-soft); color: var(--violet); font-size: .78rem; font-weight: 800; }
.ex-steps-list li.is-answer { border-color: var(--go); background: var(--go-soft); }
.ex-steps-list li.is-answer::before { content: '✓'; background: var(--go); color: #fff; }
.ex-steps-list li.is-new { animation: exPtsIn .3s ease-out; }
.ex-steps-lab { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--go-deep, #22643f); }
.ex-steps-note { margin: 8px 0 0; font-size: .88rem; color: var(--ink-soft); }
.ex-steps-ms { margin-top: 8px; }
.ex-steps-ms summary { cursor: pointer; font-weight: 700; font-size: .88rem; color: var(--violet); }

.ex-steps-fig { margin: 8px 0 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.ex-steps-fig img { display: block; width: 100%; height: auto; }
.ex-steps-fig img + img { margin-top: 4px; }
.ex-steps-fig figcaption { margin-top: 4px; font-size: .75rem; font-weight: 700; color: var(--muted); }

/* maths keyboard: opens under the answer box while a box has the cursor */
.ex-keys { margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--violet-soft); display: grid; gap: 8px; }
.ex-keys[hidden] { display: none; }
.ex-keys-group, .ex-keys-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ex-keys-title { flex: 0 0 100%; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.ex-key { min-width: 44px; min-height: 40px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 1.05rem; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.ex-key:hover { border-color: var(--violet); }
.ex-key:active { background: var(--violet); color: #fff; }
.ex-key:focus-visible { outline: 2px solid var(--violet); outline-offset: 1px; }
.ex-key.is-wide { min-width: 120px; font-size: .9rem; }
.ex-key.is-hide { margin-left: auto; font-size: .85rem; font-weight: 700; color: var(--ink-soft); }
.ex-keys-open { margin-top: 6px; font-size: .88rem; }
.ex-keys-open[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .ex-steps-list li.is-new { animation: none; }
  .exam .ex-fb.is-fresh .ex-fb-ic, .exam .ex-fb.is-fresh .ex-fb-pts, .exam .ex-answer .is-pop,
  .exam .ex-card.pulse-right, .exam .ex-card.pulse-wrong, .exam .rv-ring { animation: none !important; }
  .exam .ex-fb.is-fresh .ex-fb-ic path { animation: none !important; stroke-dashoffset: 0; }
  .rv-chips, .rv-chips.is-wait { transition: none; opacity: 1; transform: none; }
}

/* saving and carrying on later (studio.js showSaveState): the top bar of a test, the lesson banner, homework mode */
.save-state { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.save-state[hidden] { display: none; }
.save-state:empty { display: none; }
.save-state::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--go); flex: none; }
.save-state[data-state="saving"]::before { background: var(--sun); }
.save-state[data-state="offline"], .save-state[data-state="signedout"] { color: #9a5b13; }
.save-state[data-state="offline"]::before, .save-state[data-state="signedout"]::before { background: #c2410c; }
.test-topbar .save-state { margin-left: auto; margin-right: 10px; }
.lv-meta .save-state { color: rgba(255, 255, 255, .9); }
.lv-meta .save-state::before { background: #bfe0cc; }
.lv-resume { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-bottom: 16px; padding: 10px 14px; border-radius: 12px; background: var(--violet-soft); color: var(--ink); }
.lv-resume span { display: inline-flex; align-items: center; gap: 8px; }
.lv-resume .st-ic { width: 16px; height: 16px; color: var(--violet); }
.ex-set-note { margin: 0 auto 14px; max-width: 520px; padding: 10px 14px; border-radius: 10px; background: var(--violet-soft); color: var(--ink); font-weight: 600; }
@media (max-width: 600px) { .test-topbar .save-state { font-size: 0; margin-right: 6px; } .test-topbar .save-state::before { width: 10px; height: 10px; } }

/* measuring tools: on-screen ruler and protractor over a diagram */
.mm-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; padding: 8px 12px; border-radius: 10px; background: #fff8dc; border: 1px solid #e6d58a; font-size: .9rem; }
.mm-bar button { border: 1px solid #b59b2c; background: #fff; border-radius: 8px; padding: 4px 12px; cursor: pointer; font: inherit; }
.mm-bar small { flex-basis: 100%; color: #6b5a00; }
.mm-layer { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.mm-tool { position: absolute; left: 0; top: 0; transform-origin: center center; pointer-events: none; }
.mm-body { cursor: grab; touch-action: none; pointer-events: auto; display: block; line-height: 0; filter: drop-shadow(0 2px 4px rgba(0,0,0,.25)); }
.mm-body:active { cursor: grabbing; }
.mm-turn { position: absolute; right: -14px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%; border: 2px solid #fff; background: #2f80c8; cursor: grab; pointer-events: auto; touch-action: none; padding: 0; }
.mm-prot .mm-turn { right: auto; left: 50%; top: -14px; margin: 0 0 0 -13px; }
.ex-fig { overflow: visible; }

/* "Show steps": a green hint button */
.ex-hint-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; font: inherit; font-weight: 800; color: #fff; padding: 5px 13px; font-size: .86rem; border-radius: 999px; background: linear-gradient(180deg, #3fc46a, #23a24d); box-shadow: 0 3px 0 #17803a, 0 6px 14px rgba(35, 162, 77, .3); transition: transform .12s, box-shadow .12s; }
.ex-hint-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 #17803a, 0 8px 18px rgba(35, 162, 77, .38); }
.ex-hint-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #17803a; }
.ex-hint-btn:focus-visible { outline: 3px solid #bff0cd; outline-offset: 2px; }
.ex-hint-btn.is-sm { padding: 4px 11px; font-size: .8rem; }
.ex-hint-ic { display: inline-block; font-size: 1.15em; animation: ex-hint-glow 2.4s ease-in-out infinite; }
@keyframes ex-hint-glow { 0%, 100% { transform: scale(1); filter: none; } 50% { transform: scale(1.18) rotate(-6deg); filter: drop-shadow(0 0 5px #fff4a8); } }
@media (prefers-reduced-motion: reduce) { .ex-hint-ic { animation: none; } }

.ex-hide-btn { border: 1px solid #23a24d; color: #17803a; background: #fff; font: inherit; font-size: .8rem; font-weight: 700; padding: 3px 11px; border-radius: 999px; cursor: pointer; }
.ex-hide-btn:hover { background: #eafaf0; }


/* ---- GCSE Past Paper Answer Walkthrough Player ---- */
.ex-walkthrough-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border: none;
  border-radius: 99px;
  padding: 5px 14px 5px 10px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  white-space: nowrap;
  vertical-align: middle;
}
.ex-walkthrough-btn:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.45);
  filter: brightness(1.08);
}
.ex-walkthrough-btn:active {
  transform: translateY(0) scale(0.98);
}
.ex-walkthrough-btn-start {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 800;
}
.ex-walkthrough-btn-start:hover {
  filter: brightness(1.08);
}
.ex-wt-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  font-size: 0.65rem;
  line-height: 1;
  padding-left: 2px;
}

/* Modal Overlay */
.ex-wt-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(9, 16, 32, 0.85);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: exWtFadeIn 0.2s ease both;
}
@keyframes exWtFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ex-wt-box {
  width: min(1080px, 96vw);
  max-height: 94vh;
  background: #0f172a;
  color: #fff;
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: exWtSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes exWtSlideUp {
  from { transform: translateY(20px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.ex-wt-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #1e293b;
}
.ex-wt-head-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ex-wt-head-info strong {
  font-family: var(--font-display, inherit);
  font-size: 1.05rem;
  color: #fff;
}
.ex-wt-badge {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #000;
  font-weight: 900;
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 99px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.ex-wt-qbadge {
  background: #3b82f6;
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 99px;
}
.ex-wt-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.ex-wt-close:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.08);
}

.ex-wt-jump-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: #111827;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.ex-wt-jump-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: #94a3b8;
  white-space: nowrap;
}
.ex-wt-jump-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}
.ex-wt-jump-scroll::-webkit-scrollbar {
  height: 4px;
}
.ex-wt-jump-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}
.ex-wt-pill {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.ex-wt-pill:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}
.ex-wt-pill.is-active {
  background: #4f46e5;
  color: #fff;
  border-color: #818cf8;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
}

.ex-wt-video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  max-height: 64vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ex-wt-video-wrap video {
  width: 100%;
  height: 100%;
  max-height: 64vh;
  background: #000;
}

.ex-wt-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: #1e293b;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  gap: 12px;
  flex-wrap: wrap;
}
.ex-wt-foot-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- review 18 Nov 2026 (exam-player.js): one clear score and one reward line on results; a question right on
   the 2nd try is amber, not wrong; the save state stays quiet unless a save is slow or fails; a compact phone header
   ("Finish & mark" small and secondary beside the progress bar, so the question's main button stays on screen) */
.rv-banner.is-one { display: block; text-align: center; }
.rv-banner.is-one .rv-sum h2 { margin: 0 0 2px; }
.rv-scoreline { margin: 2px 0 2px; font-family: var(--font-display); color: var(--violet-deep); line-height: 1.15; }
.rv-scoreline strong { font-size: 2.3rem; font-variant-numeric: tabular-nums; }
.rv-sc-pct { font-size: 1.6rem; font-weight: 700; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.rv-banner.is-one .rv-stars { justify-content: center; margin: 2px 0 6px; }
.rv-banner.is-one .rv-star { width: 26px; height: 26px; }
.rv-banner.is-one .rv-meta { margin: 0 0 8px; font-weight: 700; }
.rv-reward { display: inline-block; margin: 0 0 8px; padding: 5px 14px; border-radius: 99px; background: #fff; color: var(--ink); font-weight: 800; font-size: .92rem; box-shadow: inset 0 0 0 1px var(--line); }
.rv-banner.is-one .rv-next { margin: 4px auto 0; max-width: 560px; }
.rv-row.is-second { border-left-color: var(--sun); background: #fffbeb; }
body.st-student .rv-row.is-second { border-left-color: var(--sun); background: #fffbeb; }
.rv-second-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; background: #fef3c7; color: #7c4310; font-size: .82rem; font-weight: 800; white-space: nowrap; }
.rv-second-tag::before { content: '\21BB'; font-size: .95rem; }
.test-topbar .save-state.is-quiet { visibility: hidden; }
@media (max-width: 600px) {
  #screenTest.is-exam .test-topbar { row-gap: 6px; padding-top: 6px; padding-bottom: 6px; }
  #screenTest.is-exam .test-topbar .test-timer { font-size: .85rem; padding: 4px 10px; }
  #screenTest.is-exam .test-topbar .lesson-progress { order: 9; flex: 1 1 calc(100% - 150px); min-width: 0; }
  #screenTest.is-exam .test-topbar #btnTestSubmit { order: 10; flex: none; min-height: 34px; padding: 5px 12px; border-radius: 99px; font-size: .8rem; background: #fff; color: var(--ink-soft); box-shadow: inset 0 0 0 1.5px var(--line) !important; transform: none; }
  #screenTest.is-exam .ex-foot .dl-kbd { display: none; }
  .rv-scoreline strong { font-size: 1.6rem; }
  .rv-sc-pct { font-size: 1.3rem; }
  .rv-row.is-second .rv-top { flex-wrap: wrap; row-gap: 6px; }
  .rv-row.is-second .rv-score { order: 3; flex-basis: 100%; padding-left: 48px; }
}
