/* ============================================================================
   MOCK EXAM — the "Test-Day Twin" (faithful PSI replica).
   Rebuilt 2026-05-30 from deep research on the real PSI / FAA Airman Knowledge
   Test driver (see 01_Research/(C) 2026-05-30-psi-faa-test-interface-deep-research.md).

   The real PSI driver has THREE zones:
     1. STATUS BAR (top)  — Question X of Y · Answered · Unanswered · Marked · Time Left
     2. CONTENT (center)  — one question per screen, no scroll, A/B/C/D radios
     3. FUNCTION BAR (bot)— text buttons: Back · Mark · GoTo · End · Next
   Plus: GoTo modal (Marked/Unanswered/All-grid/specific#), and End → type "YES".

   Deliberately NOT the AOA design system — utilitarian, light-gray, system-font,
   no motion. Scoped under .mock-screen so none of it leaks into the app. The AOA
   brand lives in the brief BEFORE and the debrief AFTER (the "backout to our system").
   ============================================================================ */

.mock-screen {
  --psi-bg:     #d9dde2;   /* desktop behind the exam */
  --psi-chrome: #e8eaed;   /* status + function bars (light testing-SW gray) */
  --psi-chrome2:#dde1e6;
  --psi-edge:   #b3bac2;   /* hairline borders */
  --psi-panel:  #ffffff;   /* the question "paper" */
  --psi-ink:    #1b232c;
  --psi-muted:  #5d6873;
  --psi-blue:   #1f6fb2;   /* selection + primary */
  --psi-blue-d: #1a5f9a;
  --psi-warn:   #b8860b;   /* timer 25% */
  --psi-crit:   #c0392b;   /* timer 10% */
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  background: var(--psi-bg);
  color: var(--psi-ink);
  min-height: 100vh;
  display: flex; flex-direction: column;
  -webkit-font-smoothing: auto;
}
.mock-screen * { box-sizing: border-box; }

/* ---- 1) STATUS BAR (top) ------------------------------------------------- */
.psi-status {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: stretch;
  min-height: 46px;
  background: linear-gradient(#eef0f3, var(--psi-chrome));
  border-bottom: 1px solid var(--psi-edge);
  font-size: 12px;
}
.psi-status__title {
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px; font-weight: 700; color: var(--psi-ink);
  border-right: 1px solid var(--psi-edge); white-space: nowrap;
}
.psi-status__title span { font-weight: 400; color: var(--psi-muted); }
.psi-status__fields { flex: 1 1 auto; display: flex; align-items: stretch; }
.psi-field {
  display: flex; flex-direction: column; justify-content: center;
  padding: 4px 16px; border-right: 1px solid var(--psi-edge); white-space: nowrap;
}
.psi-field__label { font-size: 10px; letter-spacing: .04em; color: var(--psi-muted); text-transform: uppercase; }
.psi-field__val { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.psi-field--marked .psi-field__val { color: var(--psi-warn); }
.psi-status__timer {
  margin-left: auto; display: flex; flex-direction: column; justify-content: center;
  padding: 4px 18px; background: #dfe3e8; border-left: 1px solid var(--psi-edge);
}
.psi-status__timer .psi-field__label { color: var(--psi-muted); }
.psi-status__timer .psi-field__val { font-size: 18px; }
.psi-status__timer.is-warn { background: #f6efd6; }
.psi-status__timer.is-warn .psi-field__val { color: var(--psi-warn); }
.psi-status__timer.is-crit { background: #f7e1de; }
.psi-status__timer.is-crit .psi-field__val { color: var(--psi-crit); }

/* ---- 2) CONTENT (center) ------------------------------------------------- */
.psi-body { flex: 1 1 auto; overflow: auto; padding: 26px 16px 28px; }
.psi-panel {
  max-width: 860px; margin: 0 auto;
  background: var(--psi-panel); border: 1px solid var(--psi-edge);
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
  padding: clamp(20px, 3vw, 32px);
}
.psi-q__num { font-size: 12px; font-weight: 700; color: var(--psi-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.psi-q__supp {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
  padding: 8px 12px; border: 1px solid var(--psi-blue); border-radius: 2px;
  background: #eef5fb; color: var(--psi-blue-d); font-size: 13px; font-weight: 700; cursor: pointer;
}
.psi-q__supp svg { width: 15px; height: 15px; }
.psi-q__supp span.psi-q__supp__hint { font-weight: 400; color: var(--psi-muted); }
.psi-q__stem { font-size: 16px; line-height: 1.55; color: var(--psi-ink); margin-bottom: 22px; }
.psi-q__stem b { font-weight: 700; }

/* Answers — plain A/B/C/D radio list; selectable + changeable; NO grading color */
.psi-answers { display: flex; flex-direction: column; border-top: 1px solid #e6e9ed; }
.psi-ans {
  display: flex; align-items: flex-start; gap: 12px; width: 100%;
  padding: 14px 10px; border-bottom: 1px solid #e6e9ed;
  background: var(--psi-panel); text-align: left; cursor: pointer; font: inherit; color: var(--psi-ink);
}
.psi-ans:hover { background: #f4f8fb; }
.psi-ans.is-picked { background: #e9f3fb; }
.psi-ans__radio {
  flex: none; width: 18px; height: 18px; margin-top: 1px;
  border: 2px solid #8b97a5; border-radius: 50%; background: #fff; position: relative;
}
.psi-ans.is-picked .psi-ans__radio { border-color: var(--psi-blue); }
.psi-ans.is-picked .psi-ans__radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--psi-blue); }
.psi-ans__letter { flex: none; font-weight: 700; color: var(--psi-muted); min-width: 18px; }
.psi-ans__text { flex: 1; font-size: 15px; line-height: 1.5; }

/* ---- 3) FUNCTION BAR (bottom) -------------------------------------------- */
.psi-funcbar {
  position: sticky; bottom: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(var(--psi-chrome), var(--psi-chrome2));
  border-top: 1px solid var(--psi-edge);
}
.psi-funcbar__spacer { flex: 1 1 auto; }
/* classic raised testing-software buttons, text labels */
.psi-btn {
  min-width: 78px; height: 38px; padding: 0 16px;
  border: 1px solid #9aa3ad; border-radius: 3px;
  background: linear-gradient(#fdfdfe, #eef1f4); color: var(--psi-ink);
  font-size: 13px; font-weight: 700; cursor: pointer;
  box-shadow: inset 0 1px 0 #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.psi-btn:hover { background: linear-gradient(#ffffff, #e7ebef); }
.psi-btn:active { background: #e2e6ea; box-shadow: inset 0 1px 2px rgba(0,0,0,.15); }
.psi-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.psi-btn svg { width: 15px; height: 15px; }
.psi-btn--mark.is-on { border-color: var(--psi-warn); color: var(--psi-warn); background: #fbf3dd; }
.psi-btn--end { border-color: #b9777a; color: #9c2f29; }
.psi-btn--next { min-width: 96px; border-color: var(--psi-blue-d); color: #fff; background: linear-gradient(#2a83cb, var(--psi-blue)); box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.psi-btn--next:hover { background: linear-gradient(#2376bb, var(--psi-blue-d)); }
.psi-btn--next:disabled { background: #cfd6dd; border-color: #b3bac2; color: #fff; }

/* ---- Modals (GoTo, End-YES, Supplement) ---------------------------------- */
.psi-scrim { position: fixed; inset: 0; z-index: 40; background: rgba(20,28,38,.55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.psi-dialog { background: #fff; border: 1px solid var(--psi-edge); border-radius: 4px; max-width: 460px; width: 100%; box-shadow: 0 16px 44px rgba(0,0,0,.32); overflow: hidden; }
.psi-dialog__head { padding: 14px 18px; background: var(--psi-chrome); border-bottom: 1px solid var(--psi-edge); font-size: 15px; font-weight: 700; }
.psi-dialog__body { padding: 18px; font-size: 14px; line-height: 1.55; color: var(--psi-ink); }
.psi-dialog__body p { margin: 0 0 14px; color: var(--psi-muted); }
.psi-dialog__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px; background: #f4f6f8; border-top: 1px solid var(--psi-edge); }

/* GoTo options list */
.psi-goto__opt {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 13px 14px; margin-bottom: 8px; border: 1px solid var(--psi-edge); border-radius: 3px;
  background: #fff; cursor: pointer; font: inherit; font-size: 14px; font-weight: 700; color: var(--psi-ink); text-align: left;
}
.psi-goto__opt:hover { background: #eef5fb; border-color: var(--psi-blue); }
.psi-goto__opt span { font-weight: 700; color: var(--psi-blue-d); }
.psi-goto__jump { display: flex; gap: 8px; margin-top: 4px; }
.psi-goto__jump input { flex: 1; height: 38px; padding: 0 12px; border: 1px solid #9aa3ad; border-radius: 3px; font: inherit; font-size: 14px; }

/* End → type YES */
.psi-yes__input { width: 100%; height: 42px; padding: 0 12px; margin-top: 6px; border: 2px solid #9aa3ad; border-radius: 3px; font: inherit; font-size: 16px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; text-align: center; }
.psi-yes__input:focus { outline: none; border-color: var(--psi-blue); }
.psi-yes__input--err { border-color: var(--psi-crit); background: #fdf1ef; }
.psi-yes__warn { display: flex; align-items: flex-start; gap: 8px; padding: 11px 13px; margin-bottom: 14px; background: #f7e1de; border: 1px solid #e1b3ae; border-radius: 3px; color: #9c2f29; font-size: 13px; font-weight: 600; }
/* "Submit exam" before YES is typed: looks inert but stays clickable (click re-validates) */
.psi-btn--next.is-locked { opacity: .45; }

/* ---- "All Questions" grid (the GoTo → All view / review map) -------------- */
.psi-grid-wrap { max-width: 760px; margin: 0 auto; }
.psi-grid-wrap__h { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.psi-grid-wrap__sub { color: var(--psi-muted); font-size: 13px; margin-bottom: 16px; }
.psi-legend { display: flex; gap: 18px; margin: 14px 0 18px; font-size: 12px; color: var(--psi-muted); flex-wrap: wrap; }
.psi-legend span { display: inline-flex; align-items: center; gap: 6px; }
.psi-sw { width: 14px; height: 14px; border-radius: 2px; border: 1px solid var(--psi-edge); display: inline-block; background: #fff; position: relative; }
.psi-sw--ans { background: #e2edf6; border-color: #a9c6df; }
.psi-sw--cur { border-color: var(--psi-blue); box-shadow: inset 0 0 0 2px var(--psi-blue); }
.psi-sw--flag::after { content: ""; position: absolute; top: 1px; right: 1px; width: 5px; height: 5px; border-radius: 50%; background: var(--psi-warn); }
.psi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 7px; }
.psi-cell {
  aspect-ratio: 1; min-height: 42px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--psi-edge); border-radius: 3px; background: #fff; color: var(--psi-muted);
  font-weight: 700; font-size: 14px; cursor: pointer; position: relative;
}
.psi-cell.is-answered { background: #e2edf6; border-color: #a9c6df; color: var(--psi-ink); }
.psi-cell.is-current { border-color: var(--psi-blue); box-shadow: inset 0 0 0 2px var(--psi-blue); }
.psi-cell.is-flagged::after { content: ""; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--psi-warn); }
.psi-grid-wrap__actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

/* supplement (figure) viewer */
.psi-figwrap { text-align: center; }
.psi-figwrap img { max-width: 100%; max-height: 70vh; border: 1px solid var(--psi-edge); }
.psi-figwrap__cap { margin-top: 10px; font-size: 13px; color: var(--psi-muted); }

/* ---- Figure viewer — zoom + pan (our on-screen Testing Supplement) -------- */
.psi-fig { max-width: 96vw; width: 1120px; max-height: 94vh; display: flex; flex-direction: column; }
.psi-fig__head { display: flex; align-items: center; gap: 12px; padding: 9px 12px; background: var(--psi-chrome); border-bottom: 1px solid var(--psi-edge); }
.psi-fig__title { font-weight: 700; font-size: 14px; flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psi-fig__tools { display: flex; align-items: center; gap: 6px; }
.psi-fig__tool { min-width: 34px; height: 32px; padding: 0; border: 1px solid #9aa3ad; border-radius: 3px; background: linear-gradient(#fff, #eef1f4); cursor: pointer; font-size: 17px; font-weight: 700; color: var(--psi-ink); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.psi-fig__tool:hover { background: #e7ebef; }
.psi-fig__tool--txt { padding: 0 10px; font-size: 12px; }
.psi-fig__pct { min-width: 50px; text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--psi-muted); }
.psi-fig__view { position: relative; overflow: hidden; flex: 1 1 auto; height: 78vh; display: flex; background-color: #eef1f4; background-image: repeating-conic-gradient(#e6e9ed 0% 25%, #f3f5f7 0% 50%); background-size: 22px 22px; cursor: grab; touch-action: none; }
.psi-fig__view.is-pan { cursor: grabbing; }
.psi-fig__img { position: absolute; top: 0; left: 0; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; max-width: none; }
.psi-fig__cap { padding: 8px 13px; font-size: 12px; color: var(--psi-muted); background: #f4f6f8; border-top: 1px solid var(--psi-edge); }

/* ---- On-screen calculator (floating, draggable; PSI provides one since 9/2024) */
.psi-calc { position: fixed; z-index: 50; width: 232px; background: #eef1f4; border: 1px solid #9aa3ad; border-radius: 7px; box-shadow: 0 14px 36px rgba(0,0,0,.34); overflow: hidden; font-family: Arial, sans-serif; }
.psi-calc__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 8px 7px 11px; background: linear-gradient(#3a4d61, #2f3e4e); color: #fff; cursor: move; font-size: 12px; font-weight: 700; user-select: none; touch-action: none; }
.psi-calc__close { background: none; border: 0; color: #cfd8e2; cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 5px; }
.psi-calc__close:hover { color: #fff; }
.psi-calc__disp { background: #1c2630; color: #eaf2f8; font-variant-numeric: tabular-nums; text-align: right; font-size: 25px; font-weight: 700; padding: 13px 12px; min-height: 30px; overflow: hidden; word-break: break-all; }
.psi-calc__keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: #c7ccd2; }
.psi-calc__key { border: 0; background: #fbfcfd; height: 46px; font-size: 17px; font-weight: 600; cursor: pointer; color: var(--psi-ink); }
.psi-calc__key:hover { background: #fff; }
.psi-calc__key:active { background: #e3e8ec; }
.psi-calc__key--op { background: #e7edf3; color: var(--psi-blue-d); font-weight: 700; }
.psi-calc__key--eq { background: var(--psi-blue); color: #fff; }
.psi-calc__key--fn { background: #eef0f2; color: var(--psi-muted); font-size: 15px; }
.psi-calc__key--wide { grid-column: span 2; }

@media (max-width: 620px) {
  .psi-status { flex-wrap: wrap; }
  .psi-field { padding: 4px 11px; }
  .psi-status__title span { display: none; }
  .psi-btn { min-width: 0; padding: 0 11px; }
  .psi-btn__label { display: none; }   /* icon-only on narrow */
  /* keep a visible label on the back-to-exam action too, else it's a bare arrow with no name */
  .psi-btn--next .psi-btn__label, .psi-btn--end .psi-btn__label, .psi-btn[data-act="exam"] .psi-btn__label { display: inline; }
  /* Figure (Testing-Supplement) viewer header: 7 controls + title overflow the dialog at
     ~360px and clip the ✕ close off-screen → student gets stuck. Wrap to a second row and
     give the title its own line; nudge tap targets up. */
  .psi-fig__head  { flex-wrap: wrap; }
  .psi-fig__title { flex-basis: 100%; white-space: normal; }
  .psi-fig__tools { flex-wrap: wrap; justify-content: flex-end; }
  .psi-fig__tool  { height: 40px; min-width: 40px; }
}

/* ===========================================================================
   TEST-DAY BRIEF (.tdb-*) — the light bridge screen into the PSI mock.
   AOA-branded but LIGHT + simplified (warning banner → stats → icon bullets).
   Uses the global AOA tokens (--paper/--ink/--muted/--orange/--surface).
   =========================================================================== */
.tdb-screen { min-height: 100vh; background: #ffffff; display: flex; flex-direction: column; }
.tdb-wrap { width: 100%; max-width: 580px; margin: 0 auto; padding: clamp(16px, 4vw, 30px) clamp(14px, 4vw, 26px) 52px; }
/* No outer card — content sits clean on the background (Chris: minimal). */
.tdb-card { background: none; border: 0; border-radius: 0; box-shadow: none; }
.tdb-warn { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 11px 14px; margin-bottom: 22px; background: #fbe8d6; border: 1px solid #f0cfb2; border-left: 3px solid var(--orange, #f47321); border-radius: 10px; color: #8a3d10; }
.tdb-warn svg { flex: none; color: var(--orange, #f47321); }
.tdb-warn b { font-family: var(--font-display, sans-serif); text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; }
.tdb-warn span { font-size: .8rem; color: #9a5a33; }
.tdb-body { padding: 0; }
/* Lead — the plain-language "what this is" up top (Oswald headline, calm) */
.tdb-lead { margin-bottom: 16px; }
.tdb-lead__h { font-family: var(--font-display, sans-serif); font-weight: 700; font-size: 1.18rem; line-height: 1.2; color: var(--ink, #141312); margin-bottom: 6px; }
.tdb-lead__p { margin: 0; font-size: .9rem; line-height: 1.5; color: var(--muted, #6b645d); }
/* Expander — "Learn how this works in a real testing center" (static <details>) */
.tdb-learn { margin-bottom: 22px; border: 1px solid rgba(20, 19, 18, .10); border-radius: 10px; overflow: hidden; }
.tdb-learn__sum { display: flex; align-items: center; gap: 9px; padding: 11px 13px; cursor: pointer; list-style: none; font-family: var(--font-display, sans-serif); text-transform: uppercase; letter-spacing: .06em; font-size: .74rem; font-weight: 700; color: var(--ink, #141312); }
.tdb-learn__sum::-webkit-details-marker { display: none; }
.tdb-learn__sum > svg { flex: none; color: var(--orange, #f47321); }
.tdb-learn__sum span { flex: 1 1 auto; }
.tdb-learn__chev { flex: none; display: inline-flex; color: var(--muted, #6b645d); transform: rotate(90deg); transition: transform .18s ease; }
.tdb-learn[open] .tdb-learn__chev { transform: rotate(-90deg); }
.tdb-learn__body { padding: 2px 14px 14px; border-top: 1px solid rgba(20, 19, 18, .07); }
.tdb-learn__body p { margin: 12px 0 0; font-size: .86rem; line-height: 1.5; color: var(--muted, #6b645d); }
.tdb-learn__body p b { color: var(--ink, #141312); font-weight: 700; }
.tdb-stats { display: flex; margin-bottom: 22px; }
.tdb-stat { flex: 1 1 0; text-align: center; padding: 2px 4px; }
.tdb-stat + .tdb-stat { border-left: 1px solid rgba(20, 19, 18, .10); }
.tdb-stat b { display: block; font-family: var(--font-display, sans-serif); font-size: 1.35rem; font-weight: 700; color: var(--ink, #141312); line-height: 1; }
.tdb-stat span { display: block; margin-top: 5px; font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted, #6b645d); }
.tdb-eyebrow { font-family: var(--font-display, sans-serif); text-transform: uppercase; letter-spacing: .1em; font-size: .66rem; font-weight: 700; color: var(--muted, #6b645d); margin-bottom: 4px; text-align: center; }
.tdb-list { display: flex; flex-direction: column; margin: 0 0 22px; border-top: 1px solid rgba(20, 19, 18, .07); }
.tdb-item { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid rgba(20, 19, 18, .07); }
.tdb-item__ic { flex: none; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: #fbe8d6; color: var(--orange, #f47321); }
.tdb-item__t { font-size: .9rem; line-height: 1.35; color: var(--ink, #141312); }
.tdb-item__t b { font-family: var(--font-display, sans-serif); font-weight: 700; }
.tdb-go { width: 100%; justify-content: center; }
.tdb-back { display: block; margin: 16px auto 0; background: none; border: 0; color: var(--muted, #6b645d); font-family: var(--font-display, sans-serif); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: .74rem; cursor: pointer; }
.tdb-back:hover { color: var(--ink, #141312); }
/* their Mock-Exam history strip — icon KPIs, right under the 3 cards */
.tdb-kpis-wrap { margin: 0 0 22px; padding-top: 14px; border-top: 1px solid rgba(20, 19, 18, .08); }
.tdb-kpis-wrap .tdb-eyebrow { margin-bottom: 8px; }
.tdb-kpis { display: flex; }
.tdb-kpi { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; padding: 2px 4px; }
.tdb-kpi + .tdb-kpi { border-left: 1px solid rgba(20, 19, 18, .08); }
.tdb-kpi__ic { width: 27px; height: 27px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: #fbe8d6; color: var(--orange, #f47321); }
.tdb-kpi__ic svg { width: 15px; height: 15px; }
.tdb-kpi__n { font-family: var(--font-display, sans-serif); font-weight: 700; font-size: 1.18rem; line-height: 1; color: var(--ink, #141312); }
.tdb-kpi__l { font-size: .58rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted, #6b645d); }
.tdb-kpi--goal .tdb-kpi__n { color: var(--orange-text, #b8500a); } /* goal number is text on white → AA role */
.tdb-kpi--goal .tdb-kpi__ic { background: var(--orange, #f47321); color: var(--ink, #141312); } /* navy icon on orange — AA (audit) */
.tdb-kpis-empty { display: flex; align-items: center; gap: 9px; color: var(--muted, #6b645d); font-size: .84rem; }
.tdb-kpis-empty svg { flex: none; color: var(--orange, #f47321); }
