/* ==========================================================================
   InterExe — Question Bank (assets/js/bank.js).
   The sliders and panels are SAT Practice's (styles.css ?v=1177, "QUESTION BANK" +
   .pill-seg), copied as they are; the practice screen is new and uses bk-*.
   ========================================================================== */

/* ---------- SAT Practice's sliding segmented control ---------- */
.pill-seg { position: relative; display: inline-flex; align-items: center; background: var(--surface-3);
  border: 1px solid var(--border-2); border-radius: var(--r-chip); padding: 4px; max-width: 100%;
  box-shadow: var(--shadow-xs); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.pill-seg::-webkit-scrollbar { display: none; }
.pill-thumb { position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: var(--r-chip);
  background-color: var(--brand-600); box-shadow: var(--shadow-sm); z-index: 0;
  transition: transform var(--t-slow) var(--ease-spring), width var(--t-slow) var(--ease-spring); }
.pill-opt { position: relative; z-index: 1; flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: var(--r-chip); font-weight: 600; font-size: .86rem; color: var(--muted);
  background: transparent; border: none; cursor: pointer; white-space: nowrap; transition: color var(--t); }
.pill-opt svg { width: 15px; height: 15px; }
@media (max-width: 480px) { .pill-opt { padding: 7px 11px; font-size: .8rem; } }
.pill-opt:hover { color: var(--ink); }
.pill-opt.active { color: #fff; }
.pill-opt:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; }
@media (pointer: coarse) { .pill-opt { min-height: 44px; } }

/* The difficulty slider's thumb takes the colour of the level it sits on. */
.qb-diff[data-active="all"]    .pill-thumb { background-color: var(--brand-600); }
.qb-diff[data-active="easy"]   .pill-thumb { background-color: var(--ok); }
.qb-diff[data-active="medium"] .pill-thumb { background-color: var(--warn); }
.qb-diff[data-active="hard"]   .pill-thumb { background-color: var(--bad); }
.qb-diff[data-active="marked"] .pill-thumb { background-color: #7c5cff; }
/* The subject slider stays ink-dark, so the two selections never read as one. */
.bk-subj .pill-thumb { background-color: var(--ink); }
.bk-subj .pill-opt.active { color: var(--surface); }
.qb-topbar-segs .pill-seg { min-width: 0; }

/* ---------- panels ---------- */
.bk-col { min-width: 0; }
.bk-col[data-diff="easy"]   { --lvl: var(--ok);   }
.bk-col[data-diff="medium"] { --lvl: var(--warn); }
.bk-col[data-diff="hard"]   { --lvl: var(--bad);  }
.bk-col[data-diff="marked"] { --lvl: #7c5cff;     }
.bk-col[data-diff="easy"], .bk-col[data-diff="medium"],
.bk-col[data-diff="hard"], .bk-col[data-diff="marked"] {
  --lvl-bd: color-mix(in srgb, var(--lvl) 55%, var(--border));
  --lvl-bg: color-mix(in srgb, var(--lvl) 6%, var(--surface));
}
[data-theme="dark"] .bk-col[data-diff="hard"] {
  --lvl-bg: color-mix(in srgb, var(--lvl) 15%, var(--surface));
  --lvl-bd: color-mix(in srgb, var(--lvl) 68%, var(--border));
}
.qb-headwin { background: var(--lvl-bg, var(--surface)); border: 1px solid var(--lvl-bd, var(--border));
  border-radius: var(--r-lg); box-shadow: var(--shadow-xs); padding: 14px 16px 10px; margin-bottom: 16px;
  transition: background var(--t), border-color var(--t); }
.qb-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 10px; margin-bottom: 2px; }
.qb-title { font-size: 1.44rem; margin: 0; line-height: 1.1; }
.qb-total { color: var(--muted); font-size: .8rem; }
.qb-start { flex-shrink: 0; }
/* One subject at a time, so its topics take the two columns SAT Practice gave to R&W | Math. */
.bk-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.bk-tcol { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
/* Below this the sidebar leaves each column too narrow: names wrap three lines deep. */
@media (max-width: 1180px) {
  .bk-topics { display: flex; flex-direction: column; }
  .bk-tcol { display: contents; }
  .bk-topics .qb-domain { order: var(--ord); }
}
.qb-domain { background: var(--lvl-bg, var(--surface)); border: 1px solid var(--lvl-bd, var(--border));
  border-radius: var(--r-lg); box-shadow: var(--shadow-xs); padding: 6px 12px 10px;
  transition: background var(--t), border-color var(--t); }
.qb-domain-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 6px;
  background: none; border: none; cursor: pointer; font: inherit; color: var(--ink); text-align: left;
  border-radius: 10px; transition: background var(--t); }
.qb-domain-head:hover { background: var(--surface-2); }
.qb-domain-name { font-weight: 700; font-size: 1rem; flex: 1; min-width: 0; }
.qb-skills-in { overflow: hidden; min-height: 0; margin-left: 14px; border-left: 1.5px solid var(--border); }
.qb-skill { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 6px 8px 18px; color: var(--ink-2); font: inherit; font-size: .92rem; border-radius: 8px;
  background: none; border: none; cursor: pointer; transition: background var(--t); }
.qb-skill > * { transition: transform var(--t) var(--ease); }
.qb-skill:hover { background: var(--surface-2); }
.qb-skill:hover > * { transform: translateX(4px); }
.qb-skill .qb-skill-name { flex: 1; min-width: 0; text-align: left; }
.qb-go { display: inline-flex; flex-shrink: 0; color: var(--muted-2); opacity: 0; transform: translateX(-5px); transition: opacity var(--t), transform var(--t); }
.qb-go svg { width: 16px; height: 16px; }
.qb-domain-head:hover .qb-go, .qb-skill:hover .qb-go { opacity: 1; transform: translateX(0); }
@media (pointer: coarse) { .qb-go { opacity: 1; transform: none; } .qb-skill { min-height: 44px; } }
.qb-page [data-run][aria-busy="true"] { cursor: progress; opacity: .6; }
.qb-prog { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.qb-bar { width: 62px; height: 6px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.qb-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--lvl, var(--brand-600)); transition: width .45s var(--ease-spring); }
.qb-frac { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; min-width: 38px; text-align: right; }
.qb-secmeter { display: flex; align-items: center; gap: 10px; padding: 8px 4px 12px; }
.qb-secmeter .qb-prog-lg .qb-bar { width: 150px; height: 9px; }
.qb-secmeter .qb-frac { font-size: .86rem; color: var(--ink-2); min-width: 0; }
.qb-secmeter-label { color: var(--muted-2); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }

/* Nuclide symbol: mass number stacked over atomic number, right-aligned against the letter. */
.mnuc { display: inline-flex; flex-direction: column; align-items: flex-end; vertical-align: middle; margin-right: .06em; font-size: .7em; line-height: 1.05; }

/* ---------- practice set ----------
   The screen is the exam (styles.css .cx-*), untouched. These are the only additions:
   the checked options and the "Check answer" row under them, in the exam's own tokens. */
.cx-opt:disabled { cursor: default; }
.cx-opt.bk-right .cx-opt-text, .cx-opt.bk-right .cx-letter { color: var(--cx-green); font-weight: 600; }
.cx-opt.bk-right .cx-radio { border-color: var(--cx-green); }
.cx-opt.bk-right .cx-radio::after { content: ""; position: absolute; inset: 2.5px; border-radius: 50%; background: var(--cx-green); }
.cx-opt.bk-wrong .cx-opt-text, .cx-opt.bk-wrong .cx-letter { color: #c0392b; }
.cx-opt.bk-wrong .cx-radio { border-color: #c0392b; }
.cx-opt.bk-wrong .cx-radio::after { background: #c0392b; }
[data-theme="dark"] .cx-opt.bk-wrong .cx-opt-text, [data-theme="dark"] .cx-opt.bk-wrong .cx-letter { color: #f07167; }
.cx-opt.bk-right .cx-opt-text, .cx-opt.bk-wrong .cx-opt-text { flex: 0 1 auto; }
.bk-mk { flex: none; display: inline-flex; }
.cx-opt.bk-right .bk-mk { color: var(--cx-green); }
.cx-opt.bk-wrong .bk-mk { color: #c0392b; }
.bk-check { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--cx-line); }
.bk-check-row { display: flex; gap: 12px; flex-wrap: wrap; }
.bk-check-btn { background: var(--cx-green); }
.bk-check-btn:hover { background: var(--cx-green-hover); }
.bk-check-btn:disabled { background: var(--cx-tile-dot); }
.bk-retry { background: none; color: var(--cx-blue); box-shadow: inset 0 0 0 1px var(--cx-blue); }
.bk-retry:hover { background: none; color: var(--cx-blue-hover); }
.bk-verdict { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-weight: 700; font-size: .98rem; }
.bk-verdict.ok { color: var(--cx-green); }
.bk-verdict.bad { color: #c0392b; }
[data-theme="dark"] .bk-verdict.bad { color: #f07167; }
.bk-why { margin-bottom: 14px; padding: 12px 16px; border: 1px solid var(--cx-line); border-radius: 4px; color: var(--cx-ink-2); font-size: calc(15px * var(--cx-fs, 1)); line-height: 1.7; }
.bk-xp { margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: .78rem; background: rgba(37, 134, 63, .12); }

/* A difficulty above the plan (limits.sql): still a pill, dimmed, with a lock — a click goes
   to Pricing instead of filtering (bank.js). */
.qb-diff .pill-opt.is-locked { opacity: .55; }
.qb-diff .pill-opt.is-locked:hover { opacity: .85; }
