/* ============================================================================
   grader-pane-qset.css — the question-set pane. Step 5, pane 1 of 7.
   Tokens only; tools/grader-tokens-only.js guards this file.

   THIS PANE USES THE READING SURFACE, NOT THE STAGE.
   The image pane's stage is a VIEWING surface — true neutral, sized so a
   photograph is judged honestly. A question set is text, so the centre column
   becomes the READING surface the design specifies in §5b of
   "Unified Grader v5 panes.dc.html": #131416, measure capped, column centred
   rather than stretched. Neither surface borrows the other's treatment.

   ⚠ #131416 and #17181b are DESIGN-STATED but NOT IN TOKENS.css — they are
   labelled in the design's own §5b swatch ("#131416 · 68CH") and declared in
   that file's :root as --read / --read-col. They are recorded in the harness's
   SPEC_LITERALS, not invented here. If TOKENS.css ever names them, switch.
   ========================================================================= */

/* ── ReadingSurface ───────────────────────────────────────────────────────── */
/* Fills the stage column. The Stage primitive has no intrinsic size and neither
   does this — without an explicit fill the reading surface collapsed to its
   content and floated in the middle of a 958px column. */
.gr-stagecol-body > .gr-qset { width: 100%; height: 100%; }
.gr-qset {
  position: relative; flex: 1; min-height: 0; overflow-y: auto;
  border-radius: var(--r-2xl); background: #131416;
  box-shadow: inset 0 0 0 1px #1f2226;
  padding: var(--sp-10) 0;
}
/* The measure. Centred, never stretched — the design caps it rather than
   letting an answer run the full 1500px and stop being readable. */
.gr-qset-col {
  width: 648px; max-width: calc(100% - 48px); margin: 0 auto;
  display: flex; flex-direction: column; gap: var(--sp-8);
}

/* ── PromptBlock — the anchor, shown once and large (by item) ─────────────── */
.gr-qset-anchor {
  display: flex; flex-direction: column; gap: var(--sp-5);
  padding-bottom: var(--sp-8); box-shadow: inset 0 -1px 0 #1e1f22;
}
.gr-qset-anchor-head { display: flex; align-items: baseline; gap: var(--sp-5); }
.gr-qset-qnum  { font-family: var(--f-n); font-size: var(--t-mono-md); letter-spacing: var(--t-mono-md-ls); color: var(--k3200); }
.gr-qset-qpts  { font-family: var(--f-n); font-size: var(--t-mono-sm); letter-spacing: var(--t-mono-sm-ls); color: var(--faint); }
.gr-qset-spacer { flex: 1; }
.gr-qset-shown { font-family: var(--f-n); font-size: var(--t-mono-sm); letter-spacing: var(--t-mono-sm-ls); color: var(--faint); }
.gr-qset-prompt {
  font-family: var(--f-u); font-weight: 600; font-size: var(--t-display-xl);
  letter-spacing: var(--t-display-xl-ls); line-height: 1.42; color: var(--text);
}

/* AnswerKeyBox — the key the teacher marks against. Painted in the PASS set
   because it is the correct answer, not a warning. */
.gr-qset-key {
  display: flex; align-items: flex-start; gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6); border-radius: var(--r-xl);
  background: var(--pass-fill); box-shadow: inset 0 0 0 1px var(--pass-line);
}
.gr-qset-key-lab { flex: none; padding-top: var(--sp-1); font-family: var(--f-n); font-size: var(--t-mono-xs); letter-spacing: var(--t-mono-xs-ls); color: var(--pass); }
.gr-qset-key-txt { font-family: var(--f-u); font-size: var(--t-ui-sm); line-height: 1.5; color: var(--text3); }

/* ── the by-student anchor: who, not which question ──────────────────────── */
.gr-qset-who { display: flex; align-items: center; gap: var(--sp-6); padding-bottom: var(--sp-7); box-shadow: inset 0 -1px 0 #1e1f22; }
.gr-qset-who-name { font-family: var(--f-d); font-weight: 700; font-size: var(--t-display-lg); letter-spacing: var(--t-display-lg-ls); line-height: 1.2; color: var(--text); }
.gr-qset-who-sub  { margin-top: var(--sp-1); font-family: var(--f-u); font-size: var(--t-ui-xs); color: var(--muted); }

/* ── QuietRow — the collapsed auto-scored groups ──────────────────────────
   "Opens mostly finished." These are the answers the teacher does NOT have to
   look at. They are one row each, disclosed on demand — and what is behind a
   disclosure is not counted until it is disclosed. */
.gr-qset-quiet { display: flex; flex-direction: column; gap: var(--sp-3); }
.gr-qset-quietrow {
  display: flex; align-items: center; gap: var(--sp-5); width: 100%;
  padding: var(--sp-5) var(--sp-6); border: 0; border-radius: var(--r-xl);
  background: transparent; box-shadow: inset 0 0 0 1px #232529;
  color: var(--dim); font-family: var(--f-u); font-size: var(--t-ui-sm);
  text-align: left; cursor: pointer; position: relative;
  transition: box-shadow var(--dur-fast) var(--ease-standard);
}
.gr-qset-quietrow:hover { box-shadow: inset 0 0 0 1px #3c3f45; }
.gr-qset-quietrow .gr-qset-act { font-family: var(--f-n); font-size: var(--t-mono-sm); letter-spacing: var(--t-mono-sm-ls); color: #3e4148; }
.gr-qset-qdot { width: 7px; height: 7px; flex: none; border-radius: 50%; opacity: .75; }
.gr-qset-qdot.is-blank { border-radius: 2px; background: var(--fail); opacity: .6; }
.gr-qset-qdot.is-right { background: var(--pass); }
.gr-qset-qdot.is-inert { border-radius: 2px; background: #3e4148; }

/* The disclosed contents of a quiet group. Plain, dim, and NOT interactive —
   disclosing an auto-scored group is reading, not grading. */
.gr-qset-disclosed { display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-3) var(--sp-6) var(--sp-4); }
.gr-qset-disclosed div { font-family: var(--f-u); font-size: var(--t-ui-xs); line-height: 1.55; color: var(--dim); }

/* ── AnswerRow — the repeating unit ───────────────────────────────────────
   The answers ARE the multi-select. Clicking them is what makes a mark bulk,
   which is why this pane needs no select mode and no bulk button. The whole
   list counts as ONE control, exactly like the queue list (COMPONENTS.md §8). */
.gr-qset-open { display: flex; flex-direction: column; gap: var(--sp-3); }
.gr-qset-openlab { margin-bottom: var(--sp-2); font-family: var(--f-n); font-size: var(--t-mono-xs); letter-spacing: var(--t-mono-xs-ls); color: var(--faint); }
.gr-qset-row {
  display: block; width: 100%; text-align: left; border: 0;
  padding: var(--sp-6); border-radius: var(--r-2xl);
  background: #17181b; box-shadow: inset 0 0 0 1px #232529;
  cursor: pointer; position: relative;
  transition: box-shadow var(--dur-fast) var(--ease-standard);
}
.gr-qset-row:hover { box-shadow: inset 0 0 0 1px #3c3f45; }
.gr-qset-row.is-selected { background: var(--k3200-fill); box-shadow: inset 0 0 0 1px var(--k3200-line); }
.gr-qset-row-head { display: flex; align-items: baseline; gap: var(--sp-5); }
.gr-qset-lead     { font-family: var(--f-d); font-weight: 700; font-size: var(--t-display-sm); letter-spacing: var(--t-display-sm-ls); color: var(--text); }
.gr-qset-row.by-student .gr-qset-lead { font-family: var(--f-n); font-weight: 400; font-size: var(--t-mono-md); letter-spacing: var(--t-mono-md-ls); color: var(--k3200); }
.gr-qset-body { margin-top: var(--sp-3); font-family: var(--f-u); font-size: var(--t-ui-lg); line-height: 1.6; color: var(--text2); }
.gr-qset-sub  { margin-top: var(--sp-3); font-family: var(--f-u); font-size: var(--t-ui-xs); line-height: 1.5; color: var(--dim); }

/* Row chips. FLAGGED rides the halogen set (attention), NEEDS YOU the fail set
   (this one is genuinely unscored). Never a fill behind body text. */
.gr-qset-chip { padding: var(--sp-1) var(--sp-3); border-radius: var(--r-xs); font-family: var(--f-n); font-size: var(--t-mono-xxs); letter-spacing: var(--t-mono-xxs-ls); }
.gr-qset-chip.is-flag { color: var(--k4300); background: rgba(245,147,74,.09); }
.gr-qset-chip.is-need { color: var(--fail);  background: var(--fail-fill); }
.gr-qset-chip.is-over { color: var(--k3200); background: var(--k3200-fill); }

/* ── the instrument: correct / partial / incorrect ────────────────────────
   Reuses RubricLevel — same component, same geometry, same states. Only the
   dot colours differ, and they are the design's own triad colours. A question
   set is NOT scored on the four-criterion rubric, and the panel says so. */
.gr-rubric-level[data-level="correct"]   .gr-dot { background: var(--pass); }
.gr-rubric-level[data-level="partial"]   .gr-dot { background: var(--k4300); }
.gr-rubric-level[data-level="incorrect"] .gr-dot { background: var(--fail); }
.gr-rubric-level[data-level="correct"].is-selected   .gr-dot { box-shadow: var(--lum-pass); }
.gr-rubric-level[data-level="partial"].is-selected   .gr-dot { box-shadow: var(--lum-gold); }
.gr-rubric-level[data-level="incorrect"].is-selected .gr-dot { box-shadow: var(--lum-fail); }
/* The per-level points and keycap live on RubricLevel itself (.gr-level-pts /
   .gr-level-key in grader-primitives.css) — they belong to the component, not
   to this pane, because the image pane's four levels carry them too. */

.gr-qset-ask  { margin-top: var(--sp-2); font-family: var(--f-u); font-size: var(--t-ui-xs); line-height: 1.45; color: var(--muted); }
.gr-qset-foot { margin-top: var(--sp-5); font-family: var(--f-u); font-size: var(--t-ui-xxs); line-height: 1.45; color: var(--dim); }
.gr-qset-triad-pts { font-family: var(--f-n); font-size: var(--t-mono-sm); letter-spacing: var(--t-mono-sm-ls); color: var(--faint); }

/* ── edge states ──────────────────────────────────────────────────────────
   Same rule as the image pane: neutral, never red. Forty unanswered questions
   are forty facts, not forty failures. */
.gr-qset-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: var(--sp-4); text-align: center;
}
.gr-qset-empty .gr-l { font-family: var(--f-d); font-weight: 600; font-size: var(--t-display-sm); letter-spacing: var(--t-display-sm-ls); color: var(--text3); }
.gr-qset-empty .gr-d { font-family: var(--f-n); font-size: var(--t-mono-sm); letter-spacing: var(--t-mono-sm-ls); color: var(--faint); }

/* The QUESTION on a by-student row. Set above the answer and quieter than it —
   the teacher is judging the answer, but they cannot judge it without this. */
.gr-qset-ask-line {
  display: block; margin-top: var(--sp-3);
  font-family: var(--f-u); font-size: var(--t-ui-sm); line-height: 1.5; color: var(--text3);
}
.gr-qset-row.by-student .gr-qset-body { color: var(--text); }
