/* workspace.css — the shared Full Mock question workspace outside the runner
   (Question Bank, Challenging Questions, tasks, review queues, Question Rush,
   previews and reviews), plus credits and leaderboard links. */
.pq-work{margin-top:1rem;font-family:var(--sans)}
/* Practice and Rush use the whole content column, like the Full Mock runner. */
.q-shell.pq{max-width:none}
body.qw-wide .content{max-width:none}
/* Every inline (non-runner) split workspace: a fixed-height two-pane grid in
   which each pane scrolls on its own to its very last line — passage on the
   left, prompt, every answer choice and the full explanation on the right.
   --qw-h sets the height per surface. */
.bb.bb-inline .bb-work.split{grid-template-rows:minmax(0,1fr);height:var(--qw-h,min(72vh,760px));min-height:340px;max-height:none;
  /* features.css sets align-items:start for these grids; that let each pane
     grow to its content height, so neither pane ever scrolled and long
     passages / explanations spilled out of the box. Panes must fill the row. */
  align-items:stretch;overflow:hidden}
.bb.bb-inline .bb-work.split>.bb-pane{min-height:0;min-width:0;height:auto;max-height:none;overflow-x:auto;overflow-y:auto;overscroll-behavior:contain;padding-bottom:3rem;scrollbar-gutter:stable}
/* The Full Mock runner: one fixed row so each pane scrolls on its own. */
.bb:not(.bb-inline)>.bb-work.split{grid-template-rows:minmax(0,1fr)}
.bb-work.split>.bb-pane{min-width:0;min-height:0}
/* ROOT CAUSE of the desktop bug: .bb-work is `flex:1` (basis 0%) inside the
   inline .bb flex column, whose own height is indefinite. Chrome/Edge then
   size the item from its content and ignore `height`, so the grid grew to the
   full passage height, neither pane overflowed and the page scrolled instead
   (WebKit on iPad resolved the basis differently, which is why tablets
   worked). An inline workspace is sized by its own height, never by flex. */
.bb.bb-inline>.bb-work{flex:0 0 auto}
.pq-work{--qw-h:max(380px,calc(100dvh - 290px))}
.rush-work{--qw-h:max(340px,calc(100dvh - 380px))}
/* Desktop and laptop: Question Bank, Challenging Questions, tasks, reviews and
   Question Rush fit the viewport. The app header keeps its height, the
   question frame fills the rest, the workspace takes whatever is left between
   the toolbar rows and the Previous / Next bar, and only the two panes scroll.
   On a very short window the content column scrolls as a fallback, so nothing
   is ever unreachable. */
@media(min-width:761px) and (min-height:480px){
  body.qw-wide .shell{height:100vh;height:100dvh;min-height:0}
  body.qw-wide .main{height:100vh;height:100dvh;min-height:0;overflow:hidden}
  body.qw-wide .topbar{flex:none}
  body.qw-wide .content{flex:1 1 0;min-height:0;display:flex;flex-direction:column;overflow-y:auto;overscroll-behavior:contain;padding-top:1rem;padding-bottom:1rem}
  body.qw-wide .content>.q-shell.pq{flex:1 1 0;min-height:380px;width:100%;display:flex;flex-direction:column}
  body.qw-wide .q-shell.pq>*{flex:none}
  body.qw-wide .q-shell.pq>.q-topline{margin-bottom:.6rem}
  body.qw-wide .q-shell.pq>.pq-work{flex:1 1 0;min-height:240px;display:flex;flex-direction:column;margin-top:.6rem}
  body.qw-wide .q-shell.pq>.pq-work>.bb-work{flex:1 1 0;min-height:0;height:auto;max-height:none}
  body.qw-wide .q-shell.pq>.pq-work>.bb-work.single{overflow-y:auto;overscroll-behavior:contain}
  body.qw-wide .q-shell.pq>.pq-work>.pq-actions{flex:none}
  body.qw-wide .q-shell.pq>.pq-bar{position:relative;bottom:auto;margin-top:.6rem}
  /* Docked Desmos: the workspace scrolls as one column beside the calculator. */
  body.qw-wide.df-dock-practice .q-shell.pq>.pq-work>.bb-work{overflow-y:auto}
}
/* Previews inside a dialog keep the split and its independent scrolling; the
   dialog's header and footer stay outside the panes. */
.ft-modal-body .bb.bb-inline .bb-work.split{--qw-h:max(320px,calc(100dvh - 17rem));min-height:320px}
.ft-modal-body .bb.bb-inline .bb-work.split .bb-pane{max-height:none;overflow:auto}
/* Docked Desmos beside a practice question: the content column already moves
   right, so the workspace itself takes no extra offset. */
body.df-dock-practice .pq-work .bb-work{margin-left:0}
body.df-dock-practice .bb.bb-inline .bb-work.split{display:block;overflow:auto}
body.df-dock-practice .bb.bb-inline .bb-work.split>.bb-pane{overflow:visible}
body.df-dock-practice .bb.bb-inline .bb-work.single{max-height:var(--qw-h);overflow:auto}
.pq-work .bb-work.single{max-height:none;overflow:visible}
.pq-work .bb-center{margin:0 auto}
.pq-actions{padding:.7rem 1rem;border-top:2px dashed var(--bb-line);background:var(--panel2);margin:0;flex-wrap:wrap}
.qw-tool{flex-direction:row;font-size:.8rem;padding:.25rem .5rem}
.bb-divider:focus-visible{outline:3px solid var(--bb-blue);outline-offset:-3px}
.bb-divider:hover span,.bb-divider:focus-visible span{background:var(--bb-blue)}
.bb-opt.wrong .bb-opt-main{border-color:var(--red);box-shadow:0 0 0 2px var(--red) inset}
.bb-opt.wrong .bb-ltr{background:var(--red);border-color:var(--red);color:#fff}
.bb-opt.given:not(.wrong):not(.key) .bb-opt-main{border-color:var(--bb-blue)}
.bb-opt [aria-disabled=true]{cursor:default}
.bb-opt [aria-disabled=true]:hover{border-color:inherit}
.qw-locked{pointer-events:none;opacity:.7}
.qw-tag{margin-left:auto;flex-shrink:0;font-size:.72rem;font-weight:700;padding:.15rem .5rem;border-radius:100px;background:var(--panel2);color:var(--ink2)}
.qw-tag.ok{background:color-mix(in srgb,var(--mint) 22%,transparent);color:var(--ink)}
.qw-tag.no{background:color-mix(in srgb,var(--red) 22%,transparent);color:var(--ink)}
.bb-spr.ok .bb-spr-input{border-color:var(--mint)}
.bb-spr.no .bb-spr-input{border-color:var(--red)}
.qw-key{font-size:.92rem}
.qw-feedback:empty{display:none}
.qw-feedback .explain{margin-top:1.1rem}
.qw-verdict{display:flex;gap:.8rem;flex-wrap:wrap;align-items:center;margin-bottom:.6rem}
.qw-review-wrap{margin-top:.8rem}
.qw-review .bb-work.single{max-height:none;overflow:visible}
.feedback-tag.pend{color:var(--gold)}
/* Phones: one readable stacked flow, no nested scroll boxes. */
@media(max-width:760px){
  .bb.bb-inline .bb-work.split,.ft-modal-body .bb.bb-inline .bb-work.split{height:auto;min-height:0;max-height:none;display:flex;flex-direction:column;overflow:visible}
  .bb.bb-inline .bb-work.split>.bb-pane,.ft-modal-body .bb.bb-inline .bb-work.split .bb-pane{overflow:visible;padding-bottom:1.2rem}
  .bb.bb-inline .bb-work.split .bb-divider{display:none}
  .pq-work .bb-work.split{min-height:0}
  .pq-work .bb-left{border-bottom:2px dashed var(--bb-line)}
}
/* Credits */
.cr-dash{display:flex;gap:1.6rem;flex-wrap:wrap;align-items:flex-end}
.cr-dash>div{display:flex;flex-direction:column}
.cr-big{font-family:var(--disp);font-size:2rem;font-weight:800;color:var(--accent)}
.cr-rule{flex-basis:100%;margin:0}
.cr-cost{font-size:.86rem;color:var(--ink2);display:flex;gap:.4rem;align-items:flex-start;margin:.6rem 0}
.cr-note{font-weight:600}
.cr-admin-head{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap;margin:.6rem 0}
.cr-switch{display:inline-flex;gap:.45rem;align-items:center;font-size:.92rem}
.cr-neg{color:var(--red)} .cr-pos{color:var(--mint)}
.cr-preview{margin-top:.8rem;padding:.8rem;border:1px solid var(--border2);border-radius:var(--r)}
.lb-user{font-weight:700}
.qbf-count.bad{color:var(--red)}
.qbf .cr-cost{padding:0 1rem}
