/* Shared conventional assessment presentation. The existing sticky navigation is never hidden or restyled. */
.oa-app [hidden] { display: none !important; }
/* Keep the inherited site footer in normal page flow below the full-height OA. */
body.oa-exam-active #eqx-quantdrop-popup,
body.oa-exam-active #eq-preparation-session-bar { display: none !important; }
body.oa-exam-active .content { min-height: 0; }
.oa-app.oa-exam-active { position: relative; background: #fafbff; }
.oa-app.oa-exam-active .oa-first-screen {
    min-height: calc(100dvh - var(--oa-header-height, 78px));
}
.oa-app.oa-exam-active .oa-lobby { display: block; padding: 0; }
.oa-app.oa-exam-active .oa-lobby-content,
.oa-app.oa-exam-active .oa-guide,
.oa-app.oa-exam-active .oa-skip-link { display: none; }
.oa-exam {
    min-height: calc(100dvh - var(--oa-header-height, 78px));
    width: 100%; display: grid; grid-template-rows: auto 1fr auto;
    padding: 28px 24px max(24px, env(safe-area-inset-bottom));
    gap: 24px;
}
.oa-exam-header { text-align: center; }
.oa-app.oa-standard .oa-exam h1 {
    font-size: clamp(24px, 2.2vw, 30px); line-height: 1.2;
    margin: 0 0 10px; font-weight: 600; letter-spacing: -.04em;
}
.oa-exam-count { margin: 0 0 12px; color: #566580; font-size: 13px; font-weight: 500; }
.oa-exam-progress { height: 7px; width: min(310px, 100%); margin: 0 auto; border-radius: 10px; background: #dfe5fb; overflow: hidden; }
.oa-exam-progress span { display: block; height: 100%; width: 100%; background: var(--oa-accent); border-radius: inherit; transform: scaleX(0); transform-origin: left; transition: transform 150ms ease; }
.oa-exam-timer { margin: 12px 0 0; color: #334569; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; min-height: 23px; }
.oa-exam-timer[data-low] { color: #a24c2b; }
.oa-exam-centre { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; min-width: 0; padding: 20px 0 28px; }
.oa-exam-status { margin: 0; color: var(--oa-muted); font-size: 15px; text-align: center; }
.oa-exam-form { width: min(100%, 900px); text-align: center; }
.oa-exam-question { margin: 0 0 30px; font-size: clamp(32px, 4vw, 54px); font-weight: 600; letter-spacing: -.025em; line-height: 1.3; overflow-wrap: anywhere; }
.oa-exam-answers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; width: min(100%, 780px); margin: auto; }
.oa-exam-answer, .oa-numeric-input { width: 100%; min-width: 0; min-height: 60px; padding: 13px 14px; border: 1.5px solid #bbc8ff; border-radius: 12px; background: white; color: var(--oa-ink); box-shadow: 0 3px 9px #4263ff0a; }
.oa-exam-answer { font-size: clamp(17px, 1.9vw, 23px) !important; font-weight: 500 !important; cursor: pointer; transition: border-color 120ms, background-color 120ms; overflow-wrap: anywhere; }
.oa-exam-answer:hover:not(:disabled) { border-color: var(--oa-accent); background: #f0f3ff; }
.oa-exam-answer:focus-visible { outline: 3px solid var(--oa-accent); outline-offset: 3px; border-color: var(--oa-accent); background: #f0f3ff; }
.oa-exam-answer[data-selected] { background: #f0f3ff; border-color: var(--oa-accent); color: var(--oa-ink); }
.oa-exam button:disabled { cursor: default; }
.oa-exam-keyboard { color: #61708a; font-size: 12px; margin: 18px 0 0; line-height: 1.6; }
.oa-exam-numeric { max-width: 340px; margin: auto; }
.oa-exam-numeric label { display: block; font-size: 13px; margin-bottom: 10px; color: var(--oa-muted); }
.oa-app .oa-numeric-input { font-size: 23px; text-align: center; }
.oa-exam-numeric p { font-size: 11px; color: var(--oa-muted); margin: 12px 0; }
.oa-exam-action, .oa-exam-secondary { min-height: 44px; padding: 12px 20px; border-radius: 10px; cursor: pointer; font-size: 13px !important; }
.oa-exam-action { background: var(--oa-accent); border: 1px solid #3b59ed; color: white; font-weight: 600 !important; box-shadow: 0 4px 12px #4263ff1c; }
.oa-exam-action:hover:not(:disabled) { background: var(--oa-accent-dark); }
.oa-exam-action:disabled { opacity: .65; }
.oa-exam-secondary { background: transparent; border: 1px solid #c8d2f1; color: var(--oa-ink); }
.oa-exam-bottom { display: grid; justify-items: center; gap: 8px; padding-top: 8px; }
.oa-exam-finish { min-height: 48px; padding-inline: 26px; }
.oa-exam-back { padding: 8px 14px; border: 0; border-radius: 6px; background: transparent; color: #61708a; cursor: pointer; font-size: 12px !important; }
.oa-exam-back:hover { color: var(--oa-accent); text-decoration: underline; text-underline-offset: 3px; }
.oa-exam-error { text-align: center; width: min(100%, 480px); color: #86442f; font-size: 13px; }
.oa-exam-error p { margin: 0 0 14px; line-height: 1.65; }
.oa-exam-error button { margin: 4px; }
.oa-exam-form {
    transform: translateY(-30px);
}
@media (max-width: 620px) {
    .oa-exam { padding: 24px 20px max(20px, env(safe-area-inset-bottom)); gap: 20px; }
    .oa-exam-centre { padding: 16px 0; }
    .oa-exam-question { margin-bottom: 24px; }
    .oa-exam-answers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 440px; }
    .oa-exam-answer { min-height: 56px; font-size: 20px !important; }
}
@media (max-height: 650px) {
    .oa-exam { padding-top: 18px; gap: 16px; }
    .oa-exam-centre { padding-block: 12px; }
    .oa-exam-question { margin-bottom: 22px; }
}
@media (prefers-reduced-motion: reduce) {
    .oa-exam *, .oa-app.oa-exam-active * { transition: none !important; animation: none !important; }
}

/* Error notifications never move the assessment or cover the global navbar. */
.oa-app.oa-standard > .oa-exam-error {
    position: fixed; left: 50%; transform: translateX(-50%); z-index: 1000;
    width: min(460px, calc(100vw - 32px)); padding: 12px 16px;
    border: 1px solid #efb4b4; border-left: 4px solid #c43c3c;
    border-radius: 10px; background: #fff5f5; color: #9a2929;
    box-shadow: 0 5px 20px #61202018; font-size: 13px;
    animation: oa-error-enter 120ms ease-out;
}
.oa-app.oa-standard > .oa-exam-error p { margin: 0 0 6px; }
.oa-app.oa-standard > .oa-exam-error button {
    min-height: 32px; padding: 5px 10px; margin: 2px 4px;
    border: 1px solid #e3aaaa; background: white; color: #9a2929;
    border-radius: 6px; cursor: pointer; font: inherit;
}
@keyframes oa-error-enter { from { opacity: 0; margin-top: -4px; } to { opacity: 1; margin-top: 0; } }
@media (prefers-reduced-motion: reduce) {
    .oa-app.oa-standard > .oa-exam-error { animation: none; }
}

/* The scaled title must not create a temporary horizontal scrollbar on entry.
   clip preserves the page scroll container and the title's vertical travel. */
.oa-app.oa-standard.oa-exam-active { overflow-x: clip; overflow-anchor: none; }

/* Outgoing selection feedback never locks or styles the next question. */
.oa-app .oa-answer-echo {
    position: fixed; z-index: 20; pointer-events: none; margin: 0;
    display: flex; align-items: center; justify-content: center;
    background: #f0f3ff; border-color: var(--oa-accent); color: var(--oa-ink);
    transition: none; animation: oa-answer-echo 100ms ease-out both;
}
@keyframes oa-answer-echo { 0%, 65% { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    .oa-app .oa-answer-echo { animation: none; }
}

/* Immediate completion feedback while the existing answer queue settles. */
.oa-results-preparing .oa-exam-centre,
.oa-results-preparing .oa-exam-bottom,
.oa-results-preparing .oa-exam-header > :not([data-exam-title-slot]) {
    opacity: 0; pointer-events: none; transition: opacity 160ms ease-out;
}
.oa-results-preparation {
    position: absolute; left: 0; right: 0;
    top: calc((100dvh - var(--oa-header-height, 78px)) * .44);
    transform: translateY(-50%); display: flex; flex-direction: column;
    align-items: center; gap: 12px; padding: 0 24px;
    background: transparent; text-align: center; pointer-events: none;
    animation: oa-preparation-enter 160ms ease-out both;
}
.oa-app.oa-standard .oa-results-preparation h2 {
    margin: 0; font: inherit; font-size: clamp(28px, 4vw, 44px);
    font-weight: 700; letter-spacing: -.04em; line-height: 1.2; color: #202d3d;
}
.oa-app.oa-standard .oa-results-preparation h2:focus { outline: none; }
.oa-results-preparation-message { position: relative; width: min(100%, 420px); min-height: 3.2em; margin: 0; font: inherit; font-size: 14px; line-height: 1.6; color: #61708a; }
.oa-results-preparation-message span { position: absolute; inset: 0; }
.oa-results-preparation-message [data-exam-preparation-previous] { opacity: 0; }
.oa-results-preparation-indicator { width: 160px; height: 5px; border-radius: 4px; overflow: hidden; background: #e0e7ff; }
.oa-results-preparation-indicator::before {
    content: ""; display: block; width: 56px; height: 100%; border-radius: inherit;
    background: #4263ff; animation: oa-preparation-loading 1.1s ease-in-out infinite alternate;
}
@keyframes oa-preparation-enter { from { opacity: 0; translate: 0 4px; } to { opacity: 1; translate: 0 0; } }
@keyframes oa-preparation-loading { from { transform: translateX(0); opacity: .55; } to { transform: translateX(104px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .oa-results-preparing .oa-exam-centre,
    .oa-results-preparing .oa-exam-bottom,
    .oa-results-preparing .oa-exam-header > :not([data-exam-title-slot]) { transition: none; }
    .oa-results-preparation, .oa-results-preparation-indicator::before { animation: none; }
}

/* Intentional prose composition: content expands vertically without covering
   navigation or completion controls. Short screens retain document scrolling. */
.oa-app[data-oa-layout="prose"] .oa-exam { grid-template-rows:auto auto 1fr; gap:16px; padding-top:20px; }
.oa-app[data-oa-layout="prose"] .oa-exam-centre { align-items:flex-start; padding:12px 0 8px; }
.oa-app[data-oa-layout="prose"] .oa-exam-bottom { align-self:end; }
.oa-app .oa-prose-workspace { width:100%; transform:none; }
.oa-app .oa-prose-workspace .oa-exam-question { max-width:860px; margin:0 auto 30px; font-size:clamp(20px,2vw,25px); font-weight:500; letter-spacing:-.018em; line-height:1.6; white-space:pre-line; }
.oa-prose-workspace[data-prose="true"] .oa-exam-question { text-align:left; }
.oa-exam-answer[aria-pressed="true"] { border-color:var(--oa-accent); background:#f0f3ff; box-shadow:inset 0 0 0 1px var(--oa-accent); }
.oa-navigation-area { display:flex; flex-direction:column; align-items:center; gap:2px; width:min(100%,1000px); margin:6px auto 0; }
.oa-map-disclosure { width:100%; max-width:100%; }
.oa-map-disclosure > summary { display:flex; align-items:center; justify-content:center; min-height:30px; gap:8px; color:var(--oa-accent-dark); font-size:14px; font-weight:500; list-style:none; border-radius:6px; width:fit-content; margin:auto; }
.oa-map-disclosure > summary::-webkit-details-marker { display:none; }
.oa-map-disclosure > summary::after { content:"⌄"; }
.oa-map-disclosure[open] > summary::after { content:"⌃"; }
.oa-map-panel { padding:4px 0 0; margin:0; }
.oa-map-disclosure:not([open]) .oa-map-panel { display:none; }
.oa-map { display:flex; flex-wrap:wrap; justify-content:center; gap:6px; }
.oa-map button { position:relative; flex:0 0 40px; min-height:40px; padding:6px; border:1px solid #ccd5ee; border-radius:8px; background:white; color:#65718a; font-size:14px; font-weight:500; cursor:pointer; }
.oa-map button[data-answered="true"] { background:#e9eeff; color:var(--oa-accent-dark); border-color:#b2c1ff; }
.oa-map button[aria-current] { outline:2px solid var(--oa-accent); outline-offset:2px; color:var(--oa-ink); }
.oa-map button[data-pending="true"]::after { content:""; position:absolute; right:3px; top:3px; width:6px; height:6px; border-radius:50%; background:#a06422; }
.oa-map button[data-review="true"]::before { content:"★"; position:absolute; left:2px; top:-7px; font-size:13px; color:#996215; }
.oa-review-control { display:flex; align-items:center; gap:8px; min-height:32px; font-size:14px; color:#566580; }
.oa-review-control input { accent-color:var(--oa-accent); width:18px; height:18px; margin:0; }
.oa-results-preparing .oa-navigation-area { opacity:0; pointer-events:none; transition:opacity 160ms ease-out; }
.oa-starting { position:absolute; top:calc((100dvh - var(--oa-header-height,78px)) * .44); left:0; right:0; transform:translateY(-50%); display:flex; flex-direction:column; gap:14px; align-items:center; text-align:center; padding:24px; color:var(--oa-muted); }
.oa-starting p { font-size:20px; margin:0; }
@media(min-width:621px) and (max-height:800px) {
 .oa-app[data-oa-layout="prose"] .oa-exam { padding-top:16px; gap:12px; }
 .oa-app[data-oa-layout="prose"] .oa-prose-workspace .oa-exam-question { font-size:23px; line-height:1.5; margin-bottom:26px; }
}
@media(min-width:621px) and (max-height:740px) {
 .oa-app[data-oa-layout="prose"] .oa-exam { padding-top:12px; gap:8px; }
 .oa-app[data-oa-layout="prose"] .oa-exam-centre { padding-block:4px; }
 .oa-app[data-oa-layout="prose"] .oa-prose-workspace .oa-exam-question { font-size:22px; line-height:1.45; margin-bottom:24px; }
}
@media(max-width:620px) {
 .oa-app[data-oa-layout="prose"] .oa-exam { gap:12px; padding-top:18px; }
 .oa-app .oa-prose-workspace .oa-exam-question { margin-bottom:26px; }
 .oa-map button { flex-basis:44px; min-height:44px; }
}
