/* TestPrepExam — exam interface styles (MCATPractices test-day look; bar colors follow the exam theme) */
:root{
  --bar:#1f3f68; --bar2:#16304f; --barText:#fff; --accent:#2f6db3;
  --bg:#ffffff; --ink:#111; --muted:#5b6573; --line:#c9d1db;
  --hl:#ffef5c; --sel:#dbe8f7; --ok:#1e7d3a; --bad:#b3261e; --flag:#e3a008;
  --font: Arial, Helvetica, sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--bg);color:var(--ink);font-family:var(--font);font-size:15px}
button{font-family:inherit}
.hidden{display:none!important}

/* ---------- exam shell ---------- */
#app{display:flex;flex-direction:column;height:100vh}
.topbar{background:var(--bar);color:var(--barText);display:flex;align-items:center;justify-content:space-between;padding:6px 14px;min-height:40px;font-size:14px}
.topbar .title{font-weight:bold}
.topbar .meta{display:flex;gap:22px;align-items:center}
.topbar .timer{font-variant-numeric:tabular-nums;cursor:pointer;user-select:none}
.toolbar{background:var(--bar2);color:#fff;display:flex;gap:4px;padding:4px 10px;align-items:center;min-height:36px}
.tbtn{background:transparent;border:1px solid transparent;color:#fff;padding:5px 10px;border-radius:3px;cursor:pointer;font-size:13.5px;display:inline-block;white-space:nowrap}
.tbtn .flagicon{margin-right:6px;vertical-align:-2px}
.tbtn:hover{border-color:#ffffff66;background:#ffffff14}
.tbtn u{text-decoration:underline}
.tbtn.on{background:#ffffff26}
.toolbar .spacer{flex:1}
.flagicon{width:14px;height:14px;display:inline-block;background:var(--flag);clip-path:polygon(0 0,100% 25%,0 50%,0 100%,0 0)}
.tbtn.flagged .flagicon{background:#ffcf33}
.tbtn:not(.flagged) .flagicon{background:transparent;border-left:2px solid #fff;clip-path:none;width:10px;position:relative}
.tbtn:not(.flagged) .flagicon::after{content:"";position:absolute;left:0;top:0;width:10px;height:7px;border:1px solid #fff;border-left:none;clip-path:polygon(0 0,100% 50%,0 100%)}

.main{flex:1;display:flex;overflow:hidden;border-top:1px solid #000}
.pane{overflow:auto;padding:18px 22px;line-height:1.55}
.pane.passage{flex:1 1 50%;border-right:4px solid var(--line)}
.pane.question{flex:1 1 50%}
.main.full .pane.passage{display:none}
.passage h3{margin:0 0 10px;font-size:15px}
.passage p{margin:0 0 12px}
.passage figure{margin:10px 0;text-align:center}
.passage table{border-collapse:collapse;margin:10px auto;font-size:13.5px}
.passage td,.passage th{border:1px solid #888;padding:4px 8px;text-align:center}
.passage .cap{font-size:13px;color:#333}
.discrete-note{font-style:italic;margin-bottom:14px;color:#222}
.qnum{font-weight:bold;margin-bottom:8px}
.stem{margin-bottom:14px}
.choices{list-style:none;margin:0;padding:0}
.choices li{display:flex;gap:10px;align-items:flex-start;padding:7px 8px;border-radius:4px;cursor:pointer;border:1px solid transparent}
.choices li:hover{background:#f1f5fa}
.choices li.selected{background:var(--sel);border-color:#9bb9de}
.choices .radio{width:16px;height:16px;border-radius:50%;border:2px solid #555;flex:0 0 16px;margin-top:2px;position:relative}
.choices li.selected .radio::after{content:"";position:absolute;inset:2px;border-radius:50%;background:#1f3f68}
.choices .letter{font-weight:bold;min-width:20px}
.choices .ctext{flex:1}
.choices li.struck .ctext{text-decoration:line-through;color:#888}
mark.hl{background:var(--hl);color:inherit;padding:0}
s.strk{color:#888}
.bottombar{background:var(--bar);display:flex;justify-content:space-between;align-items:center;padding:6px 12px;min-height:46px}
.bottombar .grp{display:flex;gap:6px}
.nbtn{background:#fff;color:#1f3f68;border:1px solid #fff;padding:6px 14px;border-radius:3px;font-weight:bold;cursor:pointer;font-size:13.5px}
.nbtn:hover{background:#e8eef6}
.nbtn u{text-decoration:underline}
.nbtn.ghost{background:transparent;color:#fff;border-color:#ffffff80}

/* ---------- full-page screens (welcome, directions, breaks, review) ---------- */
.screen{flex:1;overflow:auto;padding:28px 40px;line-height:1.6;max-width:1000px}
.screen h1{font-size:22px;margin:0 0 14px;color:#1f3f68}
.screen h2{font-size:18px;color:#1f3f68}
.screen .box{border:1px solid var(--line);border-radius:4px;padding:14px 18px;background:#f8fafc;margin:14px 0}
.screen table.info{border-collapse:collapse;margin:10px 0}
.screen table.info td,.screen table.info th{border:1px solid var(--line);padding:6px 12px;text-align:left}
.bigtimer{font-size:44px;font-weight:bold;color:#1f3f68;font-variant-numeric:tabular-nums;margin:18px 0}

/* review screen */
.review-grid{border-collapse:collapse;width:100%;max-width:760px;font-size:14px}
.review-grid th{background:#e6edf5;text-align:left;padding:6px 10px;border:1px solid var(--line)}
.review-grid td{padding:5px 10px;border:1px solid var(--line);cursor:pointer}
.review-grid tr:hover td{background:#f1f5fa}
.st-incomplete{color:var(--bad);font-weight:bold}
.st-unseen{color:#888}
.flagcell{color:var(--flag);font-weight:bold}

/* modal */
.modal-back{position:fixed;inset:0;background:#0006;display:flex;align-items:center;justify-content:center;z-index:50}
.modal{background:#fff;border-radius:4px;min-width:340px;max-width:92vw;max-height:88vh;overflow:auto;box-shadow:0 10px 40px #0005}
.modal .mhead{background:var(--bar);color:#fff;padding:8px 14px;font-weight:bold;display:flex;justify-content:space-between;align-items:center}
.modal .mhead button{background:none;border:none;color:#fff;font-size:18px;cursor:pointer}
.modal .mbody{padding:16px 18px;line-height:1.5}
.modal .mfoot{padding:10px 18px;display:flex;justify-content:flex-end;gap:8px;border-top:1px solid var(--line)}
.modal .mfoot .nbtn{background:#1f3f68;color:#fff;border-color:#1f3f68}
.modal .mfoot .nbtn.ghost{background:#fff;color:#1f3f68}

/* periodic table */
.ptable{display:grid;grid-template-columns:repeat(18,46px);gap:2px;font-size:10px}
.ptable .el{border:1px solid #8aa;background:#f3f8f8;height:46px;padding:2px;text-align:center;line-height:1.15}
.ptable .el b{display:block;font-size:14px}
.ptable .blank{height:46px}
.ptable .lanact{background:#fbf3e6}

/* ---------- results / review mode ---------- */
.results{padding:28px 40px;max-width:1100px;margin:0 auto}
.scorecards{display:flex;gap:14px;flex-wrap:wrap;margin:16px 0}
.scard{border:1px solid var(--line);border-radius:6px;padding:14px 18px;min-width:180px;background:#f8fafc}
.scard .big{font-size:34px;font-weight:bold;color:#1f3f68}
.scard.total{background:#1f3f68;color:#fff}
.scard.total .big{color:#fff}
.rtable{border-collapse:collapse;width:100%;font-size:13.5px;margin:10px 0 24px}
.rtable th{background:#e6edf5;text-align:left;padding:6px 8px;border:1px solid var(--line)}
.rtable td{padding:5px 8px;border:1px solid var(--line)}
.rtable tr.clk{cursor:pointer}
.rtable tr.clk:hover td{background:#f1f5fa}
.ok{color:var(--ok);font-weight:bold}
.bad{color:var(--bad);font-weight:bold}
.choices li.correct{background:#e3f4e8;border-color:#7cc49a}
.choices li.wrongpick{background:#fbe4e2;border-color:#e6a19b}
.explain{margin-top:18px;border-top:2px solid var(--line);padding-top:12px}
.explain h4{margin:12px 0 6px;color:#1f3f68}
.explain .why{margin:6px 0;padding-left:10px;border-left:3px solid var(--line)}
.explain .why.right{border-left-color:var(--ok)}
.explain .tip{background:#fff8db;border:1px solid #f0d97a;border-radius:4px;padding:8px 12px;margin-top:10px}
.tag{display:inline-block;background:#e6edf5;color:#1f3f68;border-radius:10px;padding:1px 8px;font-size:12px;margin-right:6px}
.bars{max-width:600px}
.bar-row{display:flex;align-items:center;gap:10px;margin:4px 0;font-size:13px}
.bar-row .lbl{width:340px;font-size:12.5px}
.bar-row .track{flex:1;height:12px;background:#e6edf5;border-radius:6px;overflow:hidden}
.bar-row .fill{height:100%;background:#2f6db3}
.bar-row>span:last-child{width:48px;text-align:right}
@media (max-width:820px){
  .main{flex-direction:column}
  .pane.passage{border-right:none;border-bottom:4px solid var(--line);max-height:45vh}
  .screen,.results{padding:18px 16px}
  .toolbar{flex-wrap:wrap}
  .ptable{grid-template-columns:repeat(18,30px);font-size:8px}
  .ptable .el,.ptable .blank{height:34px}
  .ptable .el b{font-size:11px}
}

/* v2: Times New Roman 12pt everywhere */
body{font-family:"Times New Roman",Times,serif;font-size:12pt}
button,input,select,textarea{font-family:inherit}

/* ================= TestPrepExam: theme + extra item types ================= */
.choices li.selected .radio::after{background:var(--bar)}
.nbtn{color:var(--bar)}
.modal .mfoot .nbtn{background:var(--bar);border-color:var(--bar)}
.modal .mfoot .nbtn.ghost{background:#fff;color:var(--bar)}
.screen h1,.screen h2,.bigtimer,.scard .big,.explain h4{color:var(--bar)}
.scard.total{background:var(--bar)}
.bar-row .fill{background:var(--accent)}
.nbtn.solid,a.nbtn.solid{background:var(--bar);color:#fff;border-color:var(--bar);text-decoration:none;display:inline-block}
.nbtn.small{padding:3px 10px;font-size:12.5px}
.nbtn.tutor{background:linear-gradient(90deg,var(--bar),var(--accent));color:#fff;border:none}
.timer.low{color:#ffcf33;font-weight:bold}
.instr{background:#f4f6fa;border-left:4px solid var(--accent);padding:8px 12px;margin-bottom:12px;font-size:14px}
.ctx{background:#f8fafc;border:1px solid var(--line);border-radius:4px;padding:8px 12px;margin-bottom:10px}
.hint{color:var(--muted);font-size:13.5px}
.stim{margin-bottom:12px}
.psg-intro{font-style:italic;margin-bottom:8px}
.pbody h4{margin:6px 0 8px}
.choices.multi .check{width:16px;height:16px;border:2px solid #555;border-radius:3px;flex:0 0 16px;margin-top:2px;position:relative}
.choices.multi li.selected .check::after{content:"✓";position:absolute;inset:-4px 0 0 1px;font-size:14px;font-weight:bold;color:var(--bar)}
table.qc{border-collapse:collapse;margin:8px 0 16px;width:100%;max-width:560px}
table.qc th,table.qc td{border:1px solid var(--line);padding:10px 14px;text-align:center}
table.qc th{background:#eef2f7}
.numin,.gapin{font:inherit;font-size:16px;padding:6px 10px;border:2px solid var(--accent);border-radius:4px;width:150px}
.gapin{width:170px;padding:3px 8px;margin:0 4px}
.gap-line{display:inline-block;padding:0 4px;border-bottom:2px solid var(--accent);min-width:90px}
.blank-cols{display:flex;gap:18px;flex-wrap:wrap;margin-top:8px}
.bcol{display:flex;flex-direction:column;gap:6px;min-width:170px}
.bhead{font-weight:bold;font-size:13px;color:var(--muted)}
.bopt{font:inherit;text-align:left;padding:7px 12px;border:1px solid var(--line);background:#fff;border-radius:4px;cursor:pointer}
.bopt:hover{background:#f1f5fa}.bopt.on{background:var(--sel);border-color:var(--accent);font-weight:bold}
.ctw-text{line-height:2.2;font-size:16px}
.ctw{white-space:nowrap}
.ctwin{font:inherit;font-size:16px;border:none;border-bottom:2px solid var(--accent);background:#f4f8ff;padding:0 2px;letter-spacing:1px;width:auto}
.order-line{display:flex;flex-wrap:wrap;gap:6px;align-items:center;min-height:46px;padding:10px;border:2px dashed var(--line);border-radius:6px;margin:10px 0}
.order-pool{display:flex;flex-wrap:wrap;gap:8px}
.otok{font:inherit;padding:6px 12px;border:1px solid var(--accent);background:#fff;border-radius:16px;cursor:pointer}
.otok.placed{background:var(--sel)}
.oslot{color:#aaa}
.ofix{font-weight:bold}
textarea.essay{width:100%;min-height:340px;font:inherit;font-size:15px;line-height:1.6;padding:12px;border:1px solid #888;border-radius:4px;resize:vertical}
.essay-prompt{background:#f8fafc;border:1px solid var(--line);border-radius:4px;padding:12px 14px}
.essay-view{white-space:normal;border:1px solid var(--line);border-radius:4px;padding:12px;background:#fcfcfd}
.rubric li{margin:3px 0}
.model{background:#f4fbf6;border:1px solid #bfe3cb;border-radius:4px;padding:10px 12px}
.selfrate{font:inherit;padding:2px 6px}
.cue-card{border:2px solid var(--accent);border-radius:6px;padding:12px 16px;margin:10px 0;background:#fffdf3}
.listen,.speak{display:flex;flex-direction:column}
.listen-card{max-width:560px;margin:40px auto;text-align:center}
.listen-ico,.speak-ico{font-size:48px}
.eq{display:flex;justify-content:center;gap:5px;height:40px;align-items:center;margin:14px 0}
.eq i{width:6px;height:100%;background:var(--accent);border-radius:3px;animation:eqb 1s ease-in-out infinite}
.eq i:nth-child(2n){animation-delay:-.3s}.eq i:nth-child(3n){animation-delay:-.6s}
@keyframes eqb{0%,100%{transform:scaleY(.3)}50%{transform:scaleY(1)}}
.transcript-box{text-align:left;border:1px solid var(--line);border-radius:4px;padding:10px 14px;background:#fafafa;max-height:40vh;overflow:auto}
.audio-panel{border:1px solid var(--line);border-radius:6px;padding:12px 14px;background:#f8fafc;margin-bottom:12px}
.speak-card{display:flex;gap:16px;align-items:center;border:1px solid var(--line);border-radius:8px;padding:16px 18px;margin:14px 0;max-width:620px}
.sstate{font-weight:bold;font-size:17px}
.sbar{height:10px;background:#e6edf5;border-radius:5px;overflow:hidden;margin:8px 0;width:360px;max-width:60vw}
.sbar i{display:block;height:100%;width:0;background:var(--accent);transition:width 1s linear}
.stime{font-variant-numeric:tabular-nums;color:var(--muted)}
.fg{margin:12px 0;text-align:center}.fg-title{font-weight:bold;margin-bottom:6px}
.fg-svg{max-width:100%;height:auto}.fg-grid{stroke:#e3e7ee}.fg-ax{stroke:#333}.fg-t{font:12px Arial,sans-serif;fill:#222}.fg-lab{font-weight:bold}.fg-in{fill:#fff;font-weight:bold}
.fg-legend{display:flex;gap:14px;justify-content:center;font-size:13px}.fg-legend i{display:inline-block;width:12px;height:12px;margin-right:5px;vertical-align:-1px}
.fg-table{border-collapse:collapse;margin:8px auto;font-size:13.5px}.fg-table td,.fg-table th{border:1px solid #888;padding:4px 10px}
.fg-note{font-size:12.5px;color:var(--muted)}
.calc-float{position:fixed;right:24px;top:100px;z-index:45;background:#fff;border:1px solid var(--bar);border-radius:6px;box-shadow:0 10px 30px #0004;padding:0 10px 10px}
.calc-float.wide{width:min(560px,92vw);padding:0}
.calc-float.wide iframe{width:100%;height:420px;border:0;display:block}
.chead{display:flex;justify-content:space-between;align-items:center;background:var(--bar);color:#fff;margin:0 -10px 10px;padding:6px 10px;cursor:move;font-weight:bold;border-radius:5px 5px 0 0}
.calc-float.wide .chead{margin:0}
.chead button{background:none;border:none;color:#fff;font-size:18px;cursor:pointer}
.calc{width:250px;user-select:none}
.calc .disp{background:#eef3e6;border:1px solid #9aa;border-radius:4px;padding:8px 10px;text-align:right;font:20px/1.2 "Courier New",monospace;min-height:42px;margin-bottom:8px;overflow:hidden}
.calc .mem{font-size:11px;color:#556;text-align:left;height:12px}
.calc .keys{display:grid;grid-template-columns:repeat(5,1fr);gap:5px}
.calc .keys button{padding:9px 0;border:1px solid #9fb0c4;background:#f4f7fb;border-radius:4px;font-weight:bold;cursor:pointer;font-size:14px}
.calc .keys button.op{background:#e6edf5}.calc .keys button.eq{background:var(--bar);color:#fff}
.refsheet p{margin:8px 0}
.unlock{padding:18px 20px;border-radius:14px;background:linear-gradient(120deg,#fff7d6,#ffe9f3);border:2px solid #f2b632;margin:18px 0}
.box-note{background:#f4f8ff;border:1px solid #c8d7f0;border-radius:6px;padding:10px 14px}
.rtable td.nc{white-space:nowrap}
.results h1,.results h2{color:var(--bar)}
.selftask{border:1px solid var(--line);border-radius:6px;padding:8px 12px;margin:8px 0}.selftask summary{cursor:pointer}
