/* CertifyEdu quiz pages — "flashcard deck" design (2026-10-12).
   Shared by every file in PMP_Quiz/ and CMQ_Quiz/. Behaviour lives in quiz-deck.js. */

:root {
  --ce-teal: #0f3b3a; --ce-teal2: #16504e; --ce-cream: #f3ead8; --ce-paper: #faf5ea; --ce-card: #fffdf7;
  --ce-gold: #f2b84b; --ce-gold-ink: #a5740d; --ce-mist: #b9cfc8; --ce-ink: #1f2a29; --ce-muted: #5d6b68;
  --ce-line: #e4d8bf; --ce-ok: #2f7a55; --ce-okbg: #e5f1e8; --ce-bad: #b0463b; --ce-badbg: #f7e4df;
  --ce-picked: #e8f0ee;
}
* { box-sizing: border-box; }
html { overflow-x: clip; }
body.ce-quiz {
  margin: 0; min-height: 100vh; background: var(--ce-cream); color: var(--ce-ink);
  font-family: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 15px; line-height: 1.5;
  overflow-x: clip;
}
body.ce-quiz button { font-family: inherit; }
body.ce-quiz a { color: inherit; }
[hidden] { display: none !important; }

/* ── shared bits ─────────────────────────────────────────── */
.ce-top {
  background: var(--ce-teal); color: var(--ce-paper); display: flex; align-items: center; gap: 18px;
  padding: 12px clamp(16px, 3vw, 28px); position: sticky; top: 0; z-index: 50; flex-wrap: wrap;
}
.ce-brand { font: 600 20px 'Newsreader', Georgia, serif; display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ce-paper) !important; }
.ce-brand i { width: 22px; height: 16px; background: var(--ce-gold); border-radius: 3px; transform: rotate(-8deg); display: inline-block; box-shadow: 4px 3px 0 var(--ce-mist); }
.ce-top-title { font-size: 12px; color: var(--ce-mist); border-left: 1px solid #2f5f5c; padding-left: 18px; min-width: 0; }
.ce-top-title h1 { margin: 0; font: 600 16px 'Newsreader', Georgia, serif; color: var(--ce-paper); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-top-title p { display: none; }
.ce-top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ce-pill-btn {
  font-size: 12.5px; font-weight: 500; color: var(--ce-paper); background: transparent; border: 1px solid #3b6b68;
  border-radius: 999px; padding: 7px 14px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.ce-pill-btn:hover { border-color: var(--ce-mist); }
.ce-user { font-size: 12px; color: var(--ce-mist); max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 14px 'Sora', sans-serif;
  padding: 12px 20px; border-radius: 8px; border: 1.5px solid var(--ce-teal); color: var(--ce-teal); background: transparent;
  cursor: pointer; text-decoration: none; transition: background .15s, color .15s, transform .15s;
}
.ce-btn:hover { background: var(--ce-teal); color: var(--ce-paper); }
.ce-btn.solid { background: var(--ce-teal); color: var(--ce-paper); }
.ce-btn.solid:hover { background: var(--ce-teal2); }
.ce-btn.gold { background: var(--ce-gold); border-color: var(--ce-gold); color: var(--ce-teal); }
.ce-btn:disabled, .ce-btn.is-off { opacity: .35; pointer-events: none; }
.ce-sticky { background: var(--ce-gold); color: #3d2c08; font: 600 22px/1.15 'Caveat', cursive; padding: 10px 16px; box-shadow: 0 8px 16px rgba(0,0,0,.14); }

/* ── auth check + expired ───────────────────────────────── */
#authCheckOverlay { min-height: 100vh; background: var(--ce-cream); align-items: center; justify-content: center; }
.auth-check-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(15,59,58,.15); border-top-color: var(--ce-teal); animation: ce-spin .8s linear infinite; }
@keyframes ce-spin { to { transform: rotate(360deg); } }
#expiredScreen { min-height: 100vh; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2rem; background: var(--ce-cream); }
#expiredScreen .icon { display: none; }
#expiredScreen h2 { font: 400 40px 'Newsreader', Georgia, serif; color: var(--ce-teal); margin: 0 0 12px; }
#expiredScreen p { color: var(--ce-muted); max-width: 420px; }

/* ── members-only gate / free start ─────────────────────── */
#loginScreen { flex-direction: column; min-height: 100vh; background: var(--ce-cream); }
.ce-gate { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,.95fr); gap: clamp(32px, 6vw, 70px); align-items: center; padding: clamp(36px, 7vw, 72px) clamp(16px, 4vw, 48px); }
.ce-eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ce-teal2); font-weight: 600; margin: 0 0 14px; }
.ce-gate h2 { font: 400 clamp(34px, 5vw, 50px)/1.08 'Newsreader', Georgia, serif; margin: 0 0 16px; color: var(--ce-teal); }
.ce-gate h2 em { font-style: italic; color: var(--ce-gold-ink); }
.ce-lead { font-size: 15.5px; line-height: 1.65; color: #44514e; margin: 0 0 26px; max-width: 480px; }
.ce-gate-acts { display: flex; align-items: center; gap: 14px 22px; flex-wrap: wrap; margin-bottom: 16px; }
.ce-link { font-size: 14px; color: var(--ce-teal) !important; font-weight: 600; text-decoration: none; border-bottom: 1.5px solid var(--ce-gold); padding-bottom: 1px; }
.ce-fine { font-size: 13px; color: var(--ce-muted); margin: 0; }
.ce-fine a { color: var(--ce-teal) !important; font-weight: 600; }
.ce-ticks { list-style: none; padding: 0; margin: 30px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; font-size: 13.5px; color: #33403e; }
.ce-ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ce-ticks li::before { content: ""; flex: none; width: 13px; height: 7px; border-left: 2px solid var(--ce-ok); border-bottom: 2px solid var(--ce-ok); transform: rotate(-45deg); margin-top: 5px; }
.ce-gdeck { position: relative; height: 340px; }
.ce-gdeck .c { position: absolute; inset: 20px 12px 12px 20px; background: var(--ce-card); border: 1px solid var(--ce-line); border-radius: 10px; box-shadow: 0 10px 30px rgba(15,59,58,.12); }
.ce-gdeck .c1 { transform: rotate(5deg); background: #f2e9d4; }
.ce-gdeck .c2 { transform: rotate(-3deg); background: #f7f0e0; }
.ce-gdeck .c3 { padding: 26px; }
.ce-gdeck .c3::before { content: ""; position: absolute; left: 0; right: 0; top: 58px; border-top: 1px solid #e9b9a8; }
.ce-gdeck .row { display: flex; justify-content: space-between; font-size: 12px; color: var(--ce-muted); margin-bottom: 30px; }
.ce-gdeck .row b { color: var(--ce-teal); }
.ce-gdeck .ln { height: 9px; background: #ece3cf; border-radius: 5px; margin-bottom: 9px; }
.ce-gdeck .och { display: flex; gap: 10px; align-items: center; border: 1.5px solid var(--ce-line); border-radius: 7px; padding: 8px 10px; margin-top: 9px; }
.ce-gdeck .och b { width: 20px; height: 20px; border-radius: 5px; background: var(--ce-cream); color: var(--ce-teal); font-size: 11px; display: grid; place-items: center; }
.ce-gdeck .och i { flex: 1; height: 7px; background: #efe7d5; border-radius: 4px; }
.ce-gdeck .och.on { border-color: var(--ce-teal); }
.ce-gdeck .och.on b { background: var(--ce-teal); color: #fff; }
.ce-gdeck .ce-sticky { position: absolute; right: -8px; bottom: -6px; transform: rotate(4deg); z-index: 5; }
.ce-gate-foot { font-size: 11.5px; color: var(--ce-muted); text-align: center; padding: 18px 16px; border-top: 1px solid var(--ce-line); }

/* ── instructions ───────────────────────────────────────── */
#instructionScreen { min-height: 100vh; background: var(--ce-cream); flex-direction: column; align-items: stretch !important; justify-content: flex-start !important; }
.ce-instr { width: 100%; max-width: 880px; margin: 0 auto; padding: clamp(24px, 5vw, 46px) clamp(16px, 3vw, 30px) 50px; }
.ce-icard { background: var(--ce-card); border: 1px solid var(--ce-line); border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(15,59,58,.08); }
.ce-ihead { background: var(--ce-teal); color: var(--ce-paper); padding: 30px 36px 26px; position: relative; }
.ce-ihead small { color: var(--ce-mist); font-size: 12px; letter-spacing: .07em; text-transform: uppercase; }
.ce-ihead h2 { font: 400 clamp(24px, 3.4vw, 32px)/1.15 'Newsreader', Georgia, serif; margin: 6px 0 4px; padding-right: 190px; }
.ce-ihead p { margin: 0; color: var(--ce-mist); font-size: 14px; }
.ce-ihead .ce-sticky { position: absolute; right: 30px; top: 26px; transform: rotate(3deg); max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-ifacts { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--ce-line); }
.ce-ifacts div { padding: 16px 20px; border-right: 1px solid var(--ce-line); font-size: 11.5px; color: var(--ce-muted); }
.ce-ifacts div:last-child { border-right: 0; }
.ce-ifacts strong { display: block; font: 600 22px 'Newsreader', Georgia, serif; color: var(--ce-teal); }
.ce-ibody { display: grid; grid-template-columns: 1fr 1fr; }
.ce-ibody section { padding: 24px 30px; }
.ce-ibody section + section { border-left: 1px solid var(--ce-line); }
.ce-ibody h4 { font: 600 17px 'Newsreader', Georgia, serif; color: var(--ce-teal); margin: 0 0 12px; }
.ce-modes div { padding: 10px 12px; border: 1px solid var(--ce-line); border-radius: 8px; margin-bottom: 8px; font-size: 13px; line-height: 1.45; background: #fff; }
.ce-modes b { color: var(--ce-teal); display: block; font-size: 13.5px; }
.ce-ghost { font-size: 13px; color: var(--ce-muted); }
#instrRulesList { margin: 0; padding: 0; list-style: none; counter-reset: r; }
#instrRulesList li { counter-increment: r; display: flex; gap: 12px; font-size: 13.5px; line-height: 1.5; padding: 7px 0; border-bottom: 1px dashed var(--ce-line); }
#instrRulesList li:last-child { border-bottom: 0; }
#instrRulesList li::before { content: counter(r); flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ce-cream); color: var(--ce-teal); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
#instrRulesList .rule-dot { display: none; }
#instrBodyText { display: none; }
#instrExpiryBanner { margin: 0 30px 16px !important; padding: 10px 14px !important; border-radius: 8px !important; background: #fff6dc !important; border: 1px solid #f0d58f !important; color: #6b4a0c !important; font-size: 13px !important; font-weight: 500 !important; text-align: left !important; }
.ce-ifoot { padding: 18px 30px; background: var(--ce-paper); border-top: 1px solid var(--ce-line); display: flex; align-items: center; gap: 14px 20px; flex-wrap: wrap; }
.instr-confirm-row { display: flex; gap: 10px; align-items: center; font-size: 13.5px; flex: 1; min-width: 240px; cursor: pointer; }
.instr-confirm-cb { flex: none; width: 20px; height: 20px; border: 2px solid var(--ce-teal); border-radius: 5px; display: grid; place-items: center; background: #fff; }
.instr-confirm-cb.checked { background: var(--ce-teal); }
.instr-confirm-cb.checked::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px,-1px); }
.instr-back-btn { background: none; border: 0; color: var(--ce-muted); font-size: 13px; cursor: pointer; padding: 8px; }
#instrStartBtn { opacity: .4; cursor: not-allowed; }
#instrStartBtn.ready { opacity: 1; cursor: pointer; }

/* ── quiz screen ────────────────────────────────────────── */
#quizScreen { min-height: 100vh; background: var(--ce-cream); }
.ce-seg { display: flex; background: #0a2c2b; border-radius: 999px; padding: 3px; }
.ce-seg button { font-size: 12.5px; padding: 6px 13px; border-radius: 999px; color: var(--ce-mist); background: transparent; border: 0; cursor: pointer; }
.ce-seg button.on { background: var(--ce-paper); color: var(--ce-teal); font-weight: 600; }
.ce-seg button:disabled { opacity: .35; cursor: not-allowed; }
.timer-card { display: inline-flex; align-items: center; gap: 8px; background: var(--ce-gold); color: var(--ce-teal); border: 0; border-radius: 8px; padding: 7px 12px; cursor: pointer; font-variant-numeric: tabular-nums; }
.timer-card .timer-value { font: 600 15px 'Sora', sans-serif; }
.timer-card .timer-label { font-size: 11px; font-weight: 500; }
.timer-card .timer-label:empty { display: none; }
.timer-card.warning-card { background: #f6cf86; }
.timer-card.danger-card { background: var(--ce-bad); color: #fff; }
#timerPauseBtn { display: none; }

.ce-stage { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 30px; max-width: 1180px; margin: 0 auto; padding: 32px clamp(16px, 3vw, 26px) 48px; align-items: start; }
.ce-review-bar { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; background: var(--ce-paper); border: 1px solid var(--ce-line); border-left: 3px solid var(--ce-gold); border-radius: 8px; padding: 10px 14px; margin-bottom: 18px; font-size: 13px; }
.ce-review-bar b { color: var(--ce-teal); }
.ce-review-bar input { accent-color: var(--ce-teal); width: 16px; height: 16px; }
.ce-review-bar label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.ce-review-bar button { margin-left: auto; background: none; border: 0; color: var(--ce-teal); font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-color: var(--ce-gold); text-underline-offset: 3px; }
.ce-deck { position: relative; }
.ce-deck::before, .ce-deck::after { content: ""; position: absolute; inset: 0; border: 1px solid var(--ce-line); border-radius: 10px; }
.ce-deck::before { transform: rotate(1.6deg) translate(7px, 7px); background: #f2e9d4; }
.ce-deck::after { transform: rotate(-1deg) translate(-4px, 5px); background: #f7f0e0; }
.ce-deck.is-empty::before, .ce-deck.is-empty::after { display: none; }
#questionsContainer { position: relative; z-index: 2; }
.ce-empty { position: relative; z-index: 2; background: var(--ce-card); border: 1px dashed var(--ce-line); border-radius: 10px; padding: 46px 30px; text-align: center; color: var(--ce-muted); }
.ce-empty h3 { font: 400 24px 'Newsreader', Georgia, serif; color: var(--ce-teal); margin: 0 0 6px; }

.question-card { position: relative; background: var(--ce-card); border: 1px solid var(--ce-line); border-radius: 10px; padding: 78px clamp(18px, 3.4vw, 38px) 28px; box-shadow: 0 2px 0 var(--ce-line); }
.question-card::before { content: ""; position: absolute; left: 0; right: 0; top: 58px; border-top: 1px solid #e9b9a8; }
.question-card .q-header { display: block; }
.question-card .q-num { position: absolute; left: clamp(18px, 3.4vw, 38px); top: 22px; font: 600 13px 'Sora', sans-serif; color: var(--ce-teal); letter-spacing: .03em; }
.question-card .module-badge { position: absolute; top: 20px; left: calc(clamp(18px, 3.4vw, 38px) + 150px); font-size: 11px !important; padding: 3px 10px !important; border-radius: 999px !important; background: #e5eeea !important; color: var(--ce-teal2) !important; border: 0 !important; font-weight: 600; max-width: calc(100% - 380px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.question-card .q-text { display: block; font: 400 clamp(18px, 2.1vw, 20.5px)/1.5 'Newsreader', Georgia, serif; color: var(--ce-ink); margin: 0 0 20px; }
.question-card .q-image-wrap { margin: 0 0 18px; text-align: center; }
.question-card .q-image-wrap img { max-width: 100%; max-height: 320px; border-radius: 8px; border: 1px solid var(--ce-line); cursor: zoom-in; }
.question-card .q-image-caption { font-size: 12px; color: var(--ce-muted); margin-top: 6px; }
.bookmark-btn, .flag-btn { position: absolute; top: 18px; background: none; border: 0; font-size: 0 !important; cursor: pointer; padding: 4px 2px; color: var(--ce-muted); }
.bookmark-btn { right: calc(clamp(18px, 3.4vw, 38px) + 62px); }
.flag-btn { right: clamp(18px, 3.4vw, 38px); }
.bookmark-btn::before { content: "Bookmark"; font-size: 12.5px; }
.bookmark-btn.bookmarked::before { content: "Bookmarked"; color: var(--ce-gold-ink); font-weight: 600; }
.flag-btn::before { content: "Flag"; font-size: 12.5px; }
.flag-btn.flagged::before { content: "Flagged"; color: var(--ce-gold-ink); font-weight: 600; }
.bookmark-btn:hover, .flag-btn:hover { color: var(--ce-teal); }
.options-grid { display: flex; flex-direction: column; gap: 9px; }
.option-btn {
  display: flex; gap: 14px; align-items: flex-start; width: 100%; text-align: left; padding: 12px 14px;
  border: 1.5px solid var(--ce-line); border-radius: 8px; background: #fff; color: var(--ce-ink);
  font: 400 14.5px/1.45 'Sora', sans-serif; cursor: pointer; transition: border-color .12s, background .12s;
}
.option-btn:hover:not(:disabled) { border-color: var(--ce-teal2); }
.option-btn .opt-label { flex: none; width: 26px; height: 26px; border-radius: 6px; background: var(--ce-cream); color: var(--ce-teal); display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.option-btn:disabled { cursor: default; opacity: .62; }
.option-btn.practice-selected { border-color: var(--ce-teal); background: var(--ce-picked); }
.option-btn.practice-selected .opt-label { background: var(--ce-teal); color: #fff; }
.option-btn.correct, .option-btn.show-correct { border-color: var(--ce-ok); background: var(--ce-okbg); opacity: 1 !important; }
.option-btn.correct .opt-label, .option-btn.show-correct .opt-label { background: var(--ce-ok); color: #fff; }
.option-btn.wrong { border-color: var(--ce-bad); background: var(--ce-badbg); opacity: 1 !important; }
.option-btn.wrong .opt-label { background: var(--ce-bad); color: #fff; }
.answer-badge { display: block; font-size: 13.5px; font-weight: 600; margin: 14px 0 12px; color: var(--ce-bad); }
.answer-badge.correct-badge { color: var(--ce-ok); }
.test-selected-badge { font-size: 12.5px; color: var(--ce-muted); margin: 12px 0 2px; }
.test-selected-badge strong { color: var(--ce-teal); }
.check-answer-btn, .change-answer-btn { margin: 14px 10px 4px 0; font: 600 13px 'Sora', sans-serif; padding: 10px 16px; border-radius: 8px; cursor: pointer; }
.check-answer-btn { border: 0; background: var(--ce-gold); color: var(--ce-teal); }
.change-answer-btn { border: 1.5px solid var(--ce-line); background: #fff; color: var(--ce-teal); }
.q-time-badge { display: inline-block; font-size: 11.5px; color: var(--ce-muted); margin-top: 10px; }
.q-time-badge.slow { color: var(--ce-gold-ink); }
.explanation-box { background: var(--ce-paper); border-left: 3px solid var(--ce-gold); padding: 14px 18px; border-radius: 0 8px 8px 0; margin-top: 4px; }
.explanation-box .exp-header { margin-bottom: 6px; }
.explanation-box .exp-icon { display: none; }
.explanation-box .exp-label { font: 600 16px 'Newsreader', Georgia, serif; color: var(--ce-teal); }
.explanation-box .exp-text { font-size: 13.8px; line-height: 1.65; color: #33403e; white-space: pre-line; }

.ce-navrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; position: relative; z-index: 3; }
.ce-dots { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: center; }
.ce-dots i { width: 7px; height: 7px; border-radius: 50%; background: #d7cbb1; }
.ce-dots i.c { background: var(--ce-ok); } .ce-dots i.w { background: var(--ce-bad); } .ce-dots i.a { background: var(--ce-mist); }
.ce-dots i.cur { background: var(--ce-teal); width: 18px; border-radius: 9px; }
.ce-hint { font-size: 12.5px; color: var(--ce-muted); margin: 14px 2px 0; }

.ce-rail { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }
.ce-panel { background: var(--ce-paper); border: 1px solid var(--ce-line); border-radius: 10px; padding: 16px; }
.ce-panel h4 { margin: 0 0 10px; font: 600 15px 'Newsreader', Georgia, serif; color: var(--ce-teal); }
.ce-score { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.ce-score div { background: #fff; border: 1px solid var(--ce-line); border-radius: 8px; padding: 8px 4px; }
.ce-score strong { display: block; font: 600 22px 'Newsreader', Georgia, serif; color: var(--ce-teal) !important; }
.ce-score span { font-size: 10.5px; color: var(--ce-muted); }
.ce-bar { height: 6px; background: #e7dcc4; border-radius: 9px; margin: 12px 0 6px; overflow: hidden; }
.ce-bar i { display: block; height: 100%; width: 0; background: var(--ce-teal); transition: width .3s; }
.ce-small { font-size: 11.5px; color: var(--ce-muted); display: flex; justify-content: space-between; gap: 10px; }
.ce-small button { background: none; border: 0; padding: 0; font: inherit; color: var(--ce-teal); cursor: pointer; font-weight: 600; }
.ce-small button:disabled { color: var(--ce-muted); cursor: default; font-weight: 400; }
#testSubmitBar { display: none; flex-direction: column; gap: 10px; background: var(--ce-teal); color: var(--ce-paper); border-radius: 10px; padding: 16px; }
#testSubmitBar .tsb-info { font-size: 13px; color: var(--ce-mist); }
#testSubmitBar .ce-btn { width: 100%; }
.ce-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; max-height: 330px; overflow-y: auto; padding: 2px; scrollbar-width: thin; }
.ce-grid button { aspect-ratio: 1; display: grid; place-items: center; border-radius: 6px; background: #fff; border: 1px solid var(--ce-line); color: var(--ce-muted); font: 600 12px 'Sora', sans-serif; cursor: pointer; padding: 0; }
.ce-grid button:hover { border-color: var(--ce-teal2); }
.ce-grid button.c { background: var(--ce-okbg); border-color: #a9cdb6; color: var(--ce-ok); }
.ce-grid button.w { background: var(--ce-badbg); border-color: #e0b0a8; color: var(--ce-bad); }
.ce-grid button.a { background: var(--ce-picked); border-color: var(--ce-mist); color: var(--ce-teal); }
.ce-grid button.cur { background: var(--ce-teal); border-color: var(--ce-teal); color: #fff; }
.ce-grid button.f { box-shadow: inset 0 -3px 0 var(--ce-gold); }
.ce-grid button.out { opacity: .25; }
.ce-doms button { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; font-size: 12.5px; padding: 7px 9px; border-radius: 6px; color: var(--ce-ink); background: none; border: 0; cursor: pointer; }
.ce-doms button:hover { background: #f0e7d4; }
.ce-doms button.on { background: var(--ce-teal); color: var(--ce-paper); }
.ce-doms em { font-style: normal; color: var(--ce-muted); font-size: 11.5px; }
.ce-doms button.on em { color: var(--ce-mist); }
.ce-doms hr { border: 0; border-top: 1px dashed var(--ce-line); margin: 6px 0; }
.ce-rail-foot { font-size: 11.5px; color: var(--ce-muted); text-align: center; }
.ce-rail-foot button { background: none; border: 0; color: var(--ce-muted); text-decoration: underline; cursor: pointer; font: inherit; }

/* hidden legacy hooks kept for the quiz engine */
#filterBar, #milestonePips, #miniScoreBars, #resetBlockedBadge, #headerLogoImg, .ce-legacy { display: none !important; }

/* ── modals ─────────────────────────────────────────────── */
.modal-overlay { display: none; position: fixed; inset: 0; z-index: 9500; background: rgba(15,59,58,.45); backdrop-filter: blur(3px); align-items: center; justify-content: center; padding: 16px; }
.modal-overlay.active { display: flex; }
.modal { background: var(--ce-card); border: 1px solid var(--ce-line); border-radius: 12px; padding: 26px 28px; max-width: 420px; width: 100%; box-shadow: 0 24px 60px rgba(0,0,0,.25); text-align: left; }
.modal > div:first-child[style*="font-size:2rem"] { display: none; }
.modal h3 { font: 400 24px 'Newsreader', Georgia, serif; color: var(--ce-teal); margin: 0 0 8px !important; }
.modal p { font-size: 14px; color: #44514e; margin: 0 0 20px; line-height: 1.6; }
.modal p span[style] { color: var(--ce-teal) !important; }
.modal-btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.modal-btn { font: 600 13.5px 'Sora', sans-serif; padding: 10px 18px; border-radius: 8px; cursor: pointer; border: 1.5px solid var(--ce-teal); }
.modal-btn.cancel { background: transparent; color: var(--ce-teal); }
.modal-btn.confirm { background: var(--ce-teal); color: var(--ce-paper); }
.ce-timeup { z-index: 9600; }
.ce-timeup .modal { position: relative; padding-top: 30px; }
.ce-timeup .ce-eyebrow { margin-bottom: 8px; font-size: 11.5px; }
.ce-timeup h3 { font-size: 30px !important; line-height: 1.1; }
.ce-timeup h3 em { color: var(--ce-gold-ink); }
.ce-timeup-clock { position: absolute; top: -16px; right: 22px; padding: 6px 14px; transform: rotate(4deg); }
.ce-timeup-facts { display: flex; border: 1px solid var(--ce-line); border-radius: 8px; background: #fff; margin: 0 0 20px; }
.ce-timeup-facts div { flex: 1; padding: 10px 12px; font-size: 11px; color: var(--ce-muted); }
.ce-timeup-facts div + div { border-left: 1px solid var(--ce-line); }
.ce-timeup-facts strong { display: block; font: 600 20px 'Newsreader', Georgia, serif; color: var(--ce-teal); }
.q-img-lightbox { display: none; position: fixed; inset: 0; z-index: 9800; background: rgba(15,30,29,.88); align-items: center; justify-content: center; padding: 24px; }
.q-img-lightbox.active { display: flex; }
.q-img-lightbox img { max-width: 100%; max-height: 90vh; border-radius: 8px; background: #fff; }
.q-img-lightbox-close { position: absolute; top: 16px; right: 22px; color: #fff; font-size: 26px; cursor: pointer; }

/* ── results ────────────────────────────────────────────── */
.results-overlay { display: none; position: fixed; inset: 0; z-index: 9000; background: var(--ce-cream); overflow-y: auto; }
.results-overlay.visible { display: block; }
.results-panel { max-width: 1000px; margin: 0 auto; padding: 36px clamp(16px, 3vw, 30px) 56px; }
.ce-rhead { display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 24px; align-items: stretch; }
.ce-scorecard { background: var(--ce-teal); color: var(--ce-paper); border-radius: 12px; padding: 26px 28px; }
.ce-scorecard small { color: var(--ce-mist); font-size: 12px; text-transform: uppercase; letter-spacing: .07em; }
.results-score-pct { font: 400 84px/1 'Newsreader', Georgia, serif; margin: 10px 0 6px; color: var(--ce-paper); }
.results-score-tagline { color: var(--ce-mist); font-size: 13.5px; }
.ce-rright { display: flex; flex-direction: column; gap: 12px; }
.results-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; flex: 1; }
.results-stat { background: var(--ce-card); border: 1px solid var(--ce-line); border-radius: 10px; padding: 18px; display: flex; flex-direction: column; justify-content: flex-end; }
.results-stat-value { font: 600 34px 'Newsreader', Georgia, serif; }
.results-stat-label { font-size: 12px; color: var(--ce-muted); }
.time-stats-block { background: var(--ce-paper); border: 1px solid var(--ce-line); border-radius: 10px; padding: 14px 18px; }
.time-stats-title { display: none; }
.time-stats-pills { display: flex; gap: 10px 30px; flex-wrap: wrap; font-size: 12.5px; color: var(--ce-muted); }
.time-pill-val { color: var(--ce-teal); font-weight: 600; font-size: 15px; margin-right: 6px; }
.radar-wrap { display: none !important; }
.ce-domcard { margin-top: 24px; background: var(--ce-card); border: 1px solid var(--ce-line); border-radius: 12px; padding: 24px 28px; }
.ce-domcard h3 { font: 600 20px 'Newsreader', Georgia, serif; color: var(--ce-teal); margin: 0 0 4px; }
.ce-domcard .sub { font-size: 13px; color: var(--ce-muted); margin: 0 0 14px; }
.mod-result-row { display: grid; grid-template-columns: minmax(140px, 240px) minmax(0,1fr) 110px; gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--ce-line); font-size: 13.5px; }
.mod-result-row:last-child { border-bottom: 0; }
.mod-result-track { height: 12px; background: #efe6d2; border-radius: 6px; overflow: hidden; }
.mod-result-fill { height: 100%; border-radius: 6px; background: var(--ce-teal); }
.mod-result-stat { text-align: right; color: var(--ce-muted); font-size: 12.5px; }
.ce-weak { margin-top: 22px; transform: rotate(-.6deg); max-width: 560px; font-size: 23px; }
.ce-racts { display: flex; gap: 12px; justify-content: flex-end; margin-top: 26px; flex-wrap: wrap; }

/* ── small screens ──────────────────────────────────────── */
@media (max-width: 960px) {
  .ce-stage { grid-template-columns: minmax(0,1fr); }
  .ce-rail { position: static; }
  .ce-grid { grid-template-columns: repeat(10, 1fr); }
}
@media (max-width: 780px) {
  .ce-gate { grid-template-columns: minmax(0,1fr); }
  .ce-gdeck { height: 300px; max-width: 420px; }
  .ce-ibody { grid-template-columns: minmax(0,1fr); }
  .ce-ibody section + section { border-left: 0; border-top: 1px solid var(--ce-line); }
  .ce-ifacts { grid-template-columns: repeat(2, 1fr); }
  .ce-ifacts div:nth-child(2) { border-right: 0; }
  .ce-ifacts div:nth-child(-n+2) { border-bottom: 1px solid var(--ce-line); }
  .ce-ihead h2 { padding-right: 0; }
  .ce-ihead .ce-sticky { position: static; display: inline-block; margin-top: 14px; }
  .ce-rhead { grid-template-columns: minmax(0,1fr); }
  .results-grid { grid-template-columns: repeat(2, 1fr); }
  .mod-result-row { grid-template-columns: minmax(0,1fr) 90px; }
  .mod-result-track { grid-column: 1 / -1; grid-row: 2; }
  .ce-top-title { display: none; }
  .ce-user { display: none; }
}
@media (max-width: 560px) {
  .ce-top { gap: 10px; }
  .ce-top-right { margin-left: 0; width: 100%; justify-content: space-between; }
  .ce-ticks { grid-template-columns: minmax(0,1fr); }
  .question-card { padding-top: 96px; }
  .question-card::before { top: 80px; }
  .question-card .module-badge { left: clamp(18px, 3.4vw, 38px); top: 46px; max-width: calc(100% - 40px); }
  .ce-navrow .ce-btn { padding: 11px 14px; }
  .ce-dots { display: none; }
  .ce-grid { grid-template-columns: repeat(8, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { body > * { display: none !important; } }
