/* ============================================
   OA-TEST — "Quant Arena" timed-assessment game card
   Tradermath-grade: compact card, big centered prompt,
   MCQ options as a responsive grid of equal TILES,
   prominent mono timer, lively immediate feedback.
   Light-theme-first, dark-safe via var() tokens.
   ============================================ */

/* ---- page wrapper ---- */
.oat-wrap {
  max-width: 760px;
  margin: 72px auto 64px;
  padding: 0 20px;
}

/* ---- the game card / panel ---- */
.oat-card {
  position: relative;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 20px;
  padding: 1.9rem 2rem 1.8rem;
  box-shadow: 0 10px 34px rgba(17, 24, 39, 0.08), 0 2px 8px rgba(17, 24, 39, 0.05);
  margin-bottom: 1rem;
  overflow: hidden;
}
/* energetic top edge — accent → gold game stripe */
.oat-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent, #4c8bf5), var(--accent-gold, #fbbf24));
  opacity: .9;
  z-index: 2;
}
/* faint QuantVault Q brand watermark, clipped into the top-right corner */
.oat-card::after {
  content: "";
  position: absolute;
  top: -72px;
  right: -58px;
  width: 236px;
  height: 236px;
  background: url("../img/logo.svg") no-repeat center / contain;
  opacity: .06;
  pointer-events: none;
  z-index: 0;
}
/* keep all card content above the watermark */
.oat-card > * { position: relative; z-index: 1; }

/* =========================================================
   INTRO SCREEN
   ========================================================= */
.oat-intro { text-align: left; }
.oat-kicker {
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent, #4c8bf5);
  font-weight: 800;
}
.oat-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-bright, #111827);
  margin: .35rem 0 .3rem;
  line-height: 1.15;
}
.oat-sub {
  font-size: 15px;
  color: var(--text-secondary, #6b7280);
  margin-bottom: 1.15rem;
  line-height: 1.5;
}
.oat-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 1.15rem; }
.oat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--bg-darker, #f3f4f6);
  color: var(--text-secondary, #6b7280);
  border: 1px solid var(--border-color, #e5e7eb);
}
.oat-chip--timed {
  color: #b45309;
  background: rgba(251, 191, 36, .16);
  border-color: rgba(251, 191, 36, .45);
}
.oat-intro-text {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-primary, #374151);
  margin-bottom: 1rem;
}
.oat-note {
  font-size: 13px;
  color: var(--text-secondary, #6b7280);
  background: var(--bg-darker, #f9fafb);
  border: 1px solid var(--border-color, #e5e7eb);
  border-left: 3px solid var(--accent, #4c8bf5);
  border-radius: 8px;
  padding: 11px 15px;
  margin-bottom: 1.5rem;
  line-height: 1.55;
}
.oat-intro .oat-btn--primary { font-size: 15px; padding: 13px 26px; }
.oat-source { font-size: 11.5px; color: var(--text-muted, #9ca3af); margin-top: 1.1rem; }

/* =========================================================
   BUTTONS
   ========================================================= */
.oat-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.oat-btn--primary {
  background: var(--accent, #4c8bf5);
  color: #fff;
  box-shadow: 0 4px 12px rgba(76, 139, 245, .28);
}
.oat-btn--primary:hover { background: var(--accent-hover, #3b7ae0); transform: translateY(-1px); box-shadow: 0 7px 18px rgba(76, 139, 245, .34); }
.oat-btn--primary:active { transform: translateY(0); }
.oat-btn--ghost {
  background: transparent;
  border-color: var(--border-color, #d1d5db);
  color: var(--text-secondary, #6b7280);
}
.oat-btn--ghost:hover:not([disabled]) { color: var(--text-bright, #111827); border-color: var(--accent, #4c8bf5); transform: translateY(-1px); }
.oat-btn[disabled] { opacity: .4; cursor: default; box-shadow: none; transform: none; }

/* =========================================================
   QUESTION BAR — dots · qnum · TIMER · quit
   ========================================================= */
.oat-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 1.35rem;
}
.oat-dots { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.oat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-color, #e5e7eb);
  transition: width .25s ease, background .2s ease, transform .2s ease;
}
.oat-dot--ans { background: var(--accent, #4c8bf5); opacity: .5; }
.oat-dot--done { background: var(--accent, #4c8bf5); opacity: .55; }
.oat-dot--ok { background: #16a34a; }
.oat-dot--no { background: #dc2626; }
.oat-dot--active {
  width: 22px;
  border-radius: 5px;
  background: var(--accent-gold, #fbbf24);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, .18);
}

.oat-bar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.oat-qnum {
  font-size: 12px;
  color: var(--text-secondary, #6b7280);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* prominent, bold mono countdown */
.oat-timer {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  color: var(--text-bright, #111827);
  background: var(--bg-darker, #f3f4f6);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 10px;
  padding: 6px 13px;
  min-width: 62px;
  text-align: center;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.oat-timer--low {
  color: #fff;
  background: #dc2626;
  border-color: #dc2626;
  animation: oat-pulse 1s ease-in-out infinite;
}
@keyframes oat-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .45); }
  50%      { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
}

.oat-quit {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary, #6b7280);
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 9px;
  padding: 6px 11px;
  transition: color .15s ease, border-color .15s ease;
}
.oat-quit:hover { color: #dc2626; border-color: #dc2626; }

/* =========================================================
   PROMPT — large, centered
   ========================================================= */
.oat-topic {
  text-align: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--accent, #4c8bf5);
  font-weight: 800;
  margin-bottom: .5rem;
}
.oat-prompt {
  text-align: left;
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.62;
  color: var(--text-bright, #111827);
  margin: .2rem 0 1.5rem;
  max-width: 42em;
}
.oat-prompt .katex { font-size: 1.05em; }
.oat-code {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: .88em;
  background: var(--bg-darker, #f3f4f6);
  border: 1px solid var(--border-color, #e5e7eb);
  padding: 1px 6px;
  border-radius: 5px;
}

/* =========================================================
   MCQ OPTIONS — responsive grid of equal TILES
   ========================================================= */
/* default: full-width readable ROWS (for long / sentence answers) */
.oat-options { display: flex; flex-direction: column; gap: 10px; }
/* TILE mode (short answers): equal tiles auto-fit into clean rows */
.oat-options--tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 12px;
}

.oat-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  /* filled surface so tiles read as solid objects on the white card (depth) */
  background: var(--bg-darker, #f4f5f7);
  border: 1.5px solid var(--border-color, #e5e7eb);
  border-radius: 13px;
  padding: 14px 16px;
  cursor: pointer;
  transition: transform .12s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-bright, #111827);
  width: 100%;
}
/* tile-mode tiles: centered, taller, big value */
.oat-options--tiles .oat-option {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  min-height: 96px;
  padding: 18px 14px;
}
.oat-option:hover {
  border-color: var(--accent, #4c8bf5);
  background: var(--bg-card, #fff);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(76, 139, 245, .16);
}
.oat-option--sel {
  border-color: var(--accent, #4c8bf5);
  background: var(--accent-light, rgba(76, 139, 245, .12));
  box-shadow: 0 0 0 3px rgba(76, 139, 245, .22);
}
.oat-option--sel:hover { background: var(--accent-light, rgba(76, 139, 245, .12)); }

/* letter key chip */
.oat-option-key {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12.5px;
  background: var(--bg-card, #fff);
  color: var(--text-secondary, #6b7280);
  border: 1px solid var(--border-color, #e5e7eb);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
/* in tile mode the chip pins to the corner, value is big + centered */
.oat-options--tiles .oat-option-key { position: absolute; top: 10px; left: 10px; }
.oat-options--tiles .oat-option-text { flex: 0 0 auto; width: 100%; text-align: center; font-size: 1.55rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.oat-option:hover .oat-option-key { color: var(--accent, #4c8bf5); border-color: var(--accent, #4c8bf5); }
.oat-option--sel .oat-option-key { background: var(--accent, #4c8bf5); color: #fff; border-color: var(--accent, #4c8bf5); }

.oat-option-text { flex: 1; line-height: 1.4; word-break: break-word; }

/* mark (check / cross) shown after answering */
.oat-option-mark { position: absolute; top: 10px; right: 12px; font-weight: 900; font-size: 17px; }

/* locked / graded states */
.oat-option--locked { cursor: default; }
.oat-option--locked:hover { transform: none; box-shadow: none; background: var(--bg-darker, #f4f5f7); }
.oat-option--correct {
  border-color: #16a34a;
  background: rgba(22, 163, 74, .12);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .16);
}
.oat-option--correct:hover { background: rgba(22, 163, 74, .12); }
.oat-option--correct .oat-option-key { background: #16a34a; color: #fff; border-color: #16a34a; }
.oat-option--correct .oat-option-mark { color: #16a34a; }
.oat-option--wrong {
  border-color: #dc2626;
  background: rgba(220, 38, 38, .10);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .14);
}
.oat-option--wrong:hover { background: rgba(220, 38, 38, .10); }
.oat-option--wrong .oat-option-key { background: #dc2626; color: #fff; border-color: #dc2626; }
.oat-option--wrong .oat-option-mark { color: #dc2626; }
.oat-option--locked:not(.oat-option--correct):not(.oat-option--wrong) { opacity: .5; }

/* =========================================================
   FILL INPUT
   ========================================================= */
.oat-fill {
  display: flex;
  gap: 10px;
  align-items: stretch;
  max-width: 460px;
  margin: 0 auto;
}
.oat-fill-input {
  flex: 1;
  width: 100%;
  box-sizing: border-box;
  font-size: 17px;
  font-weight: 600;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  text-align: center;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid var(--border-color, #d1d5db);
  background: var(--bg-darker, #f9fafb);
  color: var(--text-bright, #111827);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.oat-fill-input::placeholder { font-weight: 500; color: var(--text-muted, #9ca3af); }
.oat-fill-input:focus {
  outline: none;
  border-color: var(--accent, #4c8bf5);
  box-shadow: 0 0 0 4px rgba(76, 139, 245, .18);
}
.oat-fill-input:disabled { opacity: 1; }
.oat-fill--ok { border-color: #16a34a; background: rgba(22, 163, 74, .10); color: #166534; }
.oat-fill--no { border-color: #dc2626; background: rgba(220, 38, 38, .08); color: #991b1b; }
.oat-check { flex-shrink: 0; }

/* =========================================================
   IMMEDIATE FEEDBACK — verdict + explanation (the KEY edge)
   ========================================================= */
.oat-explain {
  border-radius: 14px;
  padding: 15px 17px;
  margin-top: 16px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-left-width: 5px;
  animation: oat-reveal .28s cubic-bezier(0.2, 0.7, 0.3, 1);
}
@keyframes oat-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.oat-explain--ok {
  border-color: rgba(22, 163, 74, .35);
  border-left-color: #16a34a;
  background: rgba(22, 163, 74, .08);
}
.oat-explain--no {
  border-color: rgba(220, 38, 38, .30);
  border-left-color: #dc2626;
  background: rgba(220, 38, 38, .06);
}
.oat-explain-verdict {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .01em;
  margin-bottom: .45rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.oat-explain--ok .oat-explain-verdict { color: #16a34a; }
.oat-explain--no .oat-explain-verdict { color: #dc2626; }
.oat-explain-ans {
  font-size: 14.5px;
  color: var(--text-primary, #374151);
  margin-bottom: .45rem;
}
.oat-explain-ans b { color: var(--text-bright, #111827); }
.oat-explain-text {
  font-size: 13.5px;
  color: var(--text-secondary, #6b7280);
  line-height: 1.6;
}

/* =========================================================
   ACTIONS
   ========================================================= */
.oat-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 1.7rem;
}
.oat-actions--center { justify-content: center; }

/* =========================================================
   RESULTS
   ========================================================= */
.oat-results { text-align: center; }
.oat-score-ring {
  position: relative;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  margin: .4rem auto 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(closest-side, var(--bg-card, #fff) 78%, transparent 79% 100%),
    conic-gradient(var(--ring-color, var(--accent, #4c8bf5)) var(--ring-pct, 100%), var(--border-color, #e5e7eb) 0);
  --ring-pct: 100%;
  animation: oat-ring-in .5s ease;
}
@keyframes oat-ring-in { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.oat-score-ring--good { --ring-color: #16a34a; }
.oat-score-ring--mid  { --ring-color: #f59e0b; }
.oat-score-ring--low  { --ring-color: #dc2626; }
.oat-score-pct {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text-bright, #111827);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.oat-score-ring--good .oat-score-pct { color: #16a34a; }
.oat-score-ring--mid  .oat-score-pct { color: #d97706; }
.oat-score-ring--low  .oat-score-pct { color: #dc2626; }
.oat-score-frac {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary, #6b7280);
  margin-top: 3px;
}

.oat-rev-title {
  max-width: 760px;
  margin: 1.7rem auto .7rem;
  padding: 0 4px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-bright, #111827);
}
.oat-rev {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-left-width: 5px;
  border-radius: 14px;
  padding: 15px 18px;
  margin-bottom: 12px;
}
.oat-rev--ok { border-left-color: #16a34a; }
.oat-rev--no { border-left-color: #dc2626; }
.oat-rev-head { display: flex; align-items: center; gap: 9px; margin-bottom: .55rem; }
.oat-rev-badge {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
  color: #fff;
}
.oat-rev--ok .oat-rev-badge { background: #16a34a; }
.oat-rev--no .oat-rev-badge { background: #dc2626; }
.oat-rev-q {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-secondary, #6b7280);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.oat-rev-prompt {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-bright, #111827);
  margin-bottom: .55rem;
  line-height: 1.5;
}
.oat-rev-line { font-size: 14px; color: var(--text-primary, #374151); margin-bottom: .28rem; }
.oat-rev-line b { color: var(--text-bright, #111827); }
.oat-rev-explain {
  font-size: 13.5px;
  color: var(--text-secondary, #6b7280);
  margin-top: .6rem;
  line-height: 1.6;
  background: var(--bg-darker, #f9fafb);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 9px;
  padding: 11px 13px;
}

/* =========================================================
   LOADING SPINNER
   ========================================================= */
.oat-spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 3px solid var(--border-color, #e5e7eb);
  border-top-color: var(--accent, #4c8bf5);
  animation: oat-spin .8s linear infinite;
}
@keyframes oat-spin { to { transform: rotate(360deg); } }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 620px) {
  .oat-wrap { margin-top: 60px; }
  .oat-card { padding: 1.4rem 1.25rem; border-radius: 16px; }
  .oat-title { font-size: 1.5rem; }
  .oat-prompt { font-size: 1.18rem; }
  /* tiles stack to a single energetic column on phones */
  .oat-options,
  .oat-options:has(> .oat-option:nth-child(3):last-child),
  .oat-options:has(> .oat-option:nth-child(5):last-child) {
    grid-template-columns: 1fr;
  }
  .oat-options:has(> .oat-option:nth-child(5):last-child) > .oat-option,
  .oat-options:has(> .oat-option:nth-child(5):last-child) > .oat-option:nth-child(4),
  .oat-options:has(> .oat-option:nth-child(5):last-child) > .oat-option:nth-child(5) {
    grid-column: auto;
  }
  .oat-option { min-height: 0; flex-direction: row; align-items: center; gap: 12px; }
  .oat-option-text { flex: 1; }
  .oat-option-mark { position: static; margin-left: auto; }
  .oat-fill { flex-direction: column; }
  .oat-actions { flex-direction: column-reverse; }
  .oat-actions .oat-btn { width: 100%; }
  .oat-actions--center { flex-direction: row; }
}

/* Fallback for browsers without :has() — keep a clean 2-col tile grid
   (the per-count refinements above simply don't apply). */
@supports not (selector(:has(*))) {
  .oat-options { grid-template-columns: repeat(2, 1fr); }
}

/* ---- subtle page backdrop so the card doesn't float on flat white ---- */
.oat-wrap::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(70% 55% at 50% 12%, rgba(76, 139, 245, 0.07), transparent 68%),
    radial-gradient(50% 40% at 85% 90%, rgba(251, 191, 36, 0.05), transparent 70%);
}

/* Mobile audit fix: reclaim side padding at phone width. */
@media (max-width: 620px) {
  .oat-wrap { padding: 0 12px; }
}

/* ===== Mobile audit fixes — MEDIUM/LOW (2026-06-08 sweep) ===== */
@media (max-width: 620px) {
  .oat-card { padding: 1.2rem 1rem; }
  .oat-bar { flex-wrap: wrap; gap: 8px; }
  .oat-qnum { white-space: normal; }
  .oat-card::after { display: none; }
}
@media (max-width: 480px) {
  .oat-options--tiles { grid-template-columns: 1fr; }
}

/* free-example banner on the intro card */
.oat-note--sample { background: color-mix(in srgb, var(--accent-primary) 7%, var(--bg-card));
  border-left: 3px solid var(--accent-primary); color: var(--text-primary); }

/* ============================================================
   EXAM FIELD (2026-06-11) — serious timed-assessment layout:
   sticky header w/ big countdown + answered count + submit,
   a question palette (navigator), flag-for-review, no mid-test
   reveal. Replaces the single-card quiz look.
   ============================================================ */
.oat-exam { max-width: 1080px; margin: 0 auto; }
.oat-exam__top {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 12px 18px; margin-bottom: 18px;
  background: color-mix(in srgb, var(--bg-card, #fff) 92%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color, #e5e7eb); border-radius: 14px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, .06);
}
.oat-exam__id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.oat-exam__name { font-size: 14.5px; font-weight: 800; color: var(--text-bright, #111827);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oat-exam__track { font-size: 11.5px; color: var(--text-secondary, #6b7280); }
.oat-exam__clockwrap { display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 4px 18px; border-radius: 12px; background: var(--bg-main, #f7f8fb);
  border: 1px solid var(--border-color, #e5e7eb); }
.oat-exam__clocklbl { font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-secondary, #6b7280); }
.oat-exam__clock { font-family: 'JetBrains Mono', monospace; font-size: 30px; font-weight: 800;
  line-height: 1; color: var(--text-bright, #111827); font-variant-numeric: tabular-nums; }
.oat-exam__clockwrap.is-low { border-color: #ef4444; background: #ef44440f; animation: oatPulse 1s ease-in-out infinite; }
.oat-exam__clockwrap.is-low .oat-exam__clock, .oat-exam__clockwrap.is-low .oat-exam__clocklbl { color: #dc2626; }
@keyframes oatPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } 50% { box-shadow: 0 0 0 4px rgba(239,68,68,.18); } }
.oat-exam__counts { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.oat-exam__answered { font-size: 13px; color: var(--text-secondary, #6b7280); white-space: nowrap; }
.oat-exam__answered b { color: var(--text-bright, #111827); font-weight: 800; }
.oat-btn--submit { background: #0f766e; color: #fff; padding: 9px 18px; border: 0; border-radius: 10px;
  font-weight: 800; font-size: 13.5px; cursor: pointer; }
.oat-btn--submit:hover { background: #115e56; }

.oat-exam__body { display: grid; grid-template-columns: 188px 1fr; gap: 18px; align-items: start; }
.oat-pal { position: sticky; top: 110px; background: var(--bg-card, #fff);
  border: 1px solid var(--border-color, #e5e7eb); border-radius: 14px; padding: 14px; }
.oat-pal__title { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-secondary, #6b7280); margin-bottom: 10px; }
.oat-pal__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.oat-pal__cell { aspect-ratio: 1; display: grid; place-items: center; border-radius: 8px;
  border: 1.5px solid var(--border-color, #e5e7eb); background: var(--bg-main, #f7f8fb);
  font-size: 12.5px; font-weight: 700; color: var(--text-secondary, #6b7280); cursor: pointer;
  font-variant-numeric: tabular-nums; transition: transform .08s ease; }
.oat-pal__cell:hover { transform: translateY(-1px); border-color: var(--accent, #4c8bf5); }
.oat-pal__cell.is-answered { background: color-mix(in srgb, var(--accent, #4c8bf5) 14%, var(--bg-card)); border-color: color-mix(in srgb, var(--accent, #4c8bf5) 45%, var(--border-color)); color: var(--accent, #4c8bf5); }
.oat-pal__cell.is-flagged { box-shadow: inset 0 0 0 2px #f59e0b; }
.oat-pal__cell.is-current { border-color: var(--text-bright, #111827); border-width: 2px; color: var(--text-bright, #111827); }
.oat-pal__legend { display: flex; flex-direction: column; gap: 5px; margin-top: 12px; font-size: 11px; color: var(--text-secondary, #6b7280); }
.oat-pal__legend span { display: flex; align-items: center; gap: 6px; }
.oat-pal__sw { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.oat-pal__sw--ans { background: color-mix(in srgb, var(--accent, #4c8bf5) 30%, transparent); border: 1px solid var(--accent, #4c8bf5); }
.oat-pal__sw--flag { box-shadow: inset 0 0 0 2px #f59e0b; }

.oat-qpane { background: var(--bg-card, #fff); border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 16px; padding: 26px 28px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.oat-qpane__head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.oat-qpane__num { font-size: 13px; font-weight: 800; color: var(--text-bright, #111827); }
.oat-qpane__num span { font-weight: 500; color: var(--text-secondary, #6b7280); }
.oat-qpane__topic { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent, #4c8bf5); background: color-mix(in srgb, var(--accent, #4c8bf5) 9%, transparent);
  padding: 3px 9px; border-radius: 999px; }
.oat-flag { margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: var(--text-secondary, #6b7280);
  background: none; border: 1px solid var(--border-color, #e5e7eb); border-radius: 8px;
  padding: 5px 11px; cursor: pointer; }
.oat-flag:hover { border-color: #f59e0b; color: #b45309; }
.oat-flag.is-on { color: #b45309; border-color: #f59e0b; background: #f59e0b14; }
.oat-fill__hint { font-size: 12px; color: var(--text-secondary, #6b7280); margin: 10px 0 0; }
.oat-quit { background: none; border: 0; color: var(--text-secondary, #9ca3af); font-size: 12px; cursor: pointer; }

@media (max-width: 760px) {
  .oat-exam__top { grid-template-columns: 1fr auto; gap: 10px; padding: 10px 12px; }
  .oat-exam__counts { grid-column: 1 / -1; justify-content: space-between; }
  .oat-exam__clock { font-size: 24px; }
  .oat-exam__body { grid-template-columns: 1fr; }
  .oat-pal { position: static; order: 2; }
  .oat-pal__grid { grid-template-columns: repeat(8, 1fr); }
  .oat-qpane { order: 1; padding: 20px 18px; }
}
