/* questionnaires.css: the questionnaire pages' own rules (task PA-03), what house.css and portal.css lack. The band
   above the layout, the row of facts (.house-facts) and the foot (.house-foot) are house.css's; the questions, the
   choices, the scale and the submit bar are portal.css's (the .q- rules). Every colour, type family, radius and shadow
   is a custom property of ../styles.css or house.css.

   For PL-07: the row of two facts and the sentence on who reads the answers are what PA-01's and PA-02's activity
   pages draw the same way; each task keeps its own copy until PL-07 decides whether house.css takes them. */

/* Two facts (the parts, and when it is due) side by side on a wide page, one under the other on a phone. */
.house-facts.q-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 52rem; }
@media (max-width: 640px) { .house-facts.q-facts { grid-template-columns: minmax(0, 1fr); } }

/* The sentence above each part's button that says who reads the answers (admin §7.1). */
.q-readers { max-width: 44rem; margin: 18px 0 0; }

/* The part's button is the house's primary action. */
.q-submit-bar .house-action { min-height: 44px; }

/* Each part's action stands at the foot of the part, left-aligned, as the activity page's primary action does
   (look §7.1), not in portal.css's bar that stuck to the bottom of the window: the button, then how many are
   answered, then the note on the draft. */
.q-part .q-submit-bar { position: static; justify-content: flex-start; margin-top: 20px; padding: 0; border-top: 0;
  background: none; }
.q-part .q-submit-bar .house-action { order: 1; }
.q-part .q-submit-bar .q-progress { order: 2; }
.q-part .q-submit-bar .field-note { order: 3; margin-right: 0; }

/* "Your questionnaires": the list stands apart from the paragraphs above it; the notice on a staff member's view of a
   form stands apart from the facts. */
.house-list.q-list-rows { margin-top: 28px; }
.house-facts.q-facts ~ .notice { margin-top: 22px; }

/* A submitted part's result cards fit the column at every width (the Fable review of the learner's pages, W5; M49,
   F70.5). The list of questions is a grid whose one column took the width of its longest unbreakable string (a model
   identifier in code, such as Week 1's and Week 2's "eu.anthropic.claude-haiku-…"), so every card was wider than a
   phone's column. The column may now shrink to the list's width, and a long string in a result's stem, choices or
   explanation breaks where it must. */
.q-questions:has(> .q-result-question) { grid-template-columns: minmax(0, 1fr); }
.q-result-question { min-width: 0; }
.q-result-options li { grid-template-columns: auto minmax(0, 1fr); }
.q-result-question :is(.q-stem, .q-result-options li, .q-rationale, .q-reread), .q-result-question code {
  overflow-wrap: anywhere; }
/* The same for the staff's preview of a part's questions (PL-07's walk; FX-05): at 390 px Week 1's and Week 2's
   previews were 15 and 20 px wider than the window, held open by "bedrock:InvokeModelWithResponseStream" in code. */
.q-questions.q-preview { grid-template-columns: minmax(0, 1fr); }
.q-preview > .q-question { min-width: 0; overflow-wrap: anywhere; }
/* And for the learner's own form of a part (the walk of the Week 6 cohort; FX-05): 80 and 84 px too wide at 390 px. */
.q-questions { grid-template-columns: minmax(0, 1fr); }
.q-questions > .q-question { min-width: 0; overflow-wrap: anywhere; }
