/* Kinematics Driller - styles.css
   Clean, warm, high-readability. A.1 is conceptually heavy and embarrassment-
   prone (standing principle 2), so the surface is calm and unfussy. */

:root {
  --ink: #1c2430;
  --ink-soft: #55606e;
  --line: #e2e6ec;
  --bg: #f7f8fa;
  --card: #ffffff;
  --accent: #2b5cab;
  --accent-soft: #eaf0fb;
  --correct: #2e8b57;
  --correct-bg: #eaf6ef;
  --wrong: #c0392b;
  --wrong-bg: #fbecea;
  --half: #b8860b;
  --half-bg: #fbf3e0;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(20,30,50,.08), 0 4px 16px rgba(20,30,50,.05);
}

/* Practice navigation: neutral containers, colour reserved for point evidence. */
.practice-menu { display: grid; gap: 6px; margin-bottom: 18px; }
.practice-selection { position: sticky; top: -14px; z-index: 2; background: var(--card); padding: 10px 0; margin: -6px 0 10px; border-bottom: 1px solid var(--line); }
.selection-count { color: var(--ink-soft); font-size: 12px; }
.selection-count strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.selection-lesson { font-size: 12px; margin-top: 5px; }
.practice-selection .active-filters { margin-top: 6px; }
.practice-selection .active-filter { white-space: normal; text-align: left; font-size: 11px; }
.practice-choice { width: 100%; text-align: left; color: var(--ink); background: #fff; border: 1px solid transparent; border-radius: 8px; padding: 11px 10px; cursor: pointer; font: inherit; }
.practice-choice > span { display: block; font-weight: 600; line-height: 1.35; }
.practice-choice small { display: block; color: var(--ink-soft); margin-top: 4px; font-size: 11px; }
.practice-choice:hover, .practice-skill:hover { background: #f3f6fa; }
.practice-choice.is-active { background: var(--accent-soft); border-color: #c8d8ef; color: #234d84; }
.practice-skills { display: grid; gap: 2px; margin: 0 0 5px 10px; border-left: 2px solid #dbe6f3; padding-left: 8px; }
.practice-skill { display: flex; justify-content: space-between; gap: 8px; text-align: left; background: transparent; border: 0; border-radius: 5px; padding: 7px 6px; color: var(--ink-soft); font: inherit; font-size: 12px; cursor: pointer; }
.practice-skill span { font-variant-numeric: tabular-nums; color: #7a8796; }
.practice-skill.is-active { color: var(--accent); background: var(--accent-soft); font-weight: 650; }
.practice-refine > summary, .syllabus-reference > summary { color: var(--ink-soft); cursor: pointer; font-size: 12px; padding: 9px 0; }
.practice-refine { border-top: 1px solid var(--line); }
.legacy-topics { display: none; }
.learning-note { font-size: 11px; line-height: 1.5; color: var(--ink-soft); margin: 0 0 14px; }
.learning-group { margin: 0 0 10px; }
.learning-group > summary { font-size: 12px; font-weight: 650; line-height: 1.4; color: #3f5164; padding: 6px 0; cursor: pointer; }
.learning-group[open] > summary { margin-bottom: 5px; }
.learning-group h3 { font-size: 12px; line-height: 1.4; margin: 0 0 8px; font-weight: 650; color: #3f5164; }
.learning-tiles { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.learning-tile { display: flex; flex-direction: column; align-items: flex-start; text-align: left; color: var(--ink); border: 1px solid #e2e7ec; background: #fafbfc; border-radius: 8px; padding: 10px; cursor: pointer; min-width: 0; font: inherit; }
.learning-tile-wide { grid-column: 1 / -1; }
.learning-tile:hover { border-color: #b4c5da; background: #f4f7fb; }
.learning-tile.is-active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.learning-label { font-size: 11px; font-weight: 550; line-height: 1.4; }
.learning-dots { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 9px 0; min-height: 9px; }
.learning-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 1px rgba(20,40,65,.08); }
.learning-dot.is-optional { outline: 1px dashed #8291a1; outline-offset: 1px; }
.learning-meta { display: block; font-size: 10px; color: #657688; line-height: 1.4; margin-top: auto; }
.learning-results { display: flex; gap: 5px; font-size: 12px; margin: 0 0 6px; }
.learning-results .result-correct { color: #287b60; }
.learning-results .result-half { color: #9b7017; }
.learning-results .result-wrong { color: #b04743; }
.syllabus-reference { border-top: 1px solid var(--line); }
.practice-choice:focus-visible, .practice-skill:focus-visible, .learning-tile:focus-visible { outline: 3px solid #739ace; outline-offset: 2px; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
.builder-note { padding:12px 14px; background:#fff5da; border:1px solid #d7b862; border-radius:8px; font-weight:750; font-size:17px; }
.practice-purpose { margin:4px 10px 10px; color:var(--ink-soft); font-size:12px; }
.idea-check-notice { font-size:13px; border-left:3px solid var(--accent); padding:6px 10px; }
.idea-assessed .idea-ball { animation:idea-check-pulse 1.3s ease-out 2; outline:2px solid var(--accent); outline-offset:1px; }
@keyframes idea-check-pulse { 0%,100% { transform:scale(1); } 45% { transform:scale(1.6); box-shadow:0 0 0 5px #d4e3fa; } }
@media (prefers-reduced-motion:reduce) { .idea-assessed .idea-ball { animation:none; } }
body {
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink); background: var(--bg);
}

.app-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; padding: 16px 24px; background: var(--card);
  border-bottom: 1px solid var(--line);
}
.brand-eyebrow { font-size: 12px; letter-spacing: .02em; color: var(--ink-soft); text-transform: uppercase; }
.brand-title { margin: 2px 0 0; font-size: 22px; font-weight: 650; }
.brand-sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }

.identity-pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 6px 12px; cursor: pointer; font-size: 13px;
}
.identity-pill .pill-switch { color: var(--accent); font-size: 11px; }
#identity-pill-cohort { color: var(--ink-soft); }

.ticks-row { padding: 8px 24px; font-size: 13px; color: var(--ink-soft); background: var(--card); border-bottom: 1px solid var(--line); }

.app-shell.three-col {
  display: grid; grid-template-columns: 230px minmax(0, 1fr) 300px;
  gap: 20px; max-width: 1720px; margin: 0 auto; padding: 20px 24px 60px;
}
@media (max-width: 920px) {
  .app-shell.three-col { grid-template-columns: 1fr; }
  .left-filters, .coverage-panel { order: 2; }
}
/* v0.3.17 (d057; Thermal's fault 1 of 15 November): a grid item may not grow to its widest content,
   which made the whole phone page scroll sideways under a wide picture; the content scrolls instead. */
.app-shell > main.app { min-width: 0; }

.left-filters, .coverage-panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; font-size: 14px; align-self: start;
}
.panel-title { font-weight: 650; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); margin-bottom: 10px; }

/* --- Question card --- */
.qcard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px; min-height: 0;
}
.qmeta { font-size: 12px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .02em; margin-bottom: 7px; }
.qprompt { font-size: 18px; line-height: 1.45; margin-bottom: 11px; }
.choice-instruction { font-size: 13px; font-weight: 600; color: var(--ink-soft); margin: 8px 0; }
.app-load-status, .preload-status { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); padding: 8px 0; font-size: 13px; }
.app-load-status[hidden], .preload-status[hidden] { display: none; }
.preload-status { min-height: 30px; }
.loading-spinner { display: inline-block; width: 16px; height: 16px; flex: 0 0 16px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: loading-spin .8s linear infinite; }
@keyframes loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading-spinner { animation: none; border-style: dotted; } }
.asset-loading-status { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 90px; padding: 12px; color: var(--ink-soft); font-size: 13px; }
.asset-loading-status[hidden] { display: none; }
#question-load-error { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 10px 0; font-size: 14px; }
#question-load-error button, .app-load-status button { margin-left: 8px; font: inherit; color: var(--accent); background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; cursor: pointer; }
.qstimulus { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 11px; }
.qstimulus-section { font-size: 13px; font-weight: 650; color: var(--accent); margin: -8px 0 16px; }

.qinput-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.numeric-input {
  font-size: 18px; padding: 10px 12px; border: 1.5px solid var(--line);
  border-radius: 8px; width: 200px; max-width: 100%;
}
.numeric-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.numeric-unit { font-size: 16px; color: var(--ink-soft); }

.go-btn {
  font-size: 15px; font-weight: 550; padding: 10px 18px; border: none;
  background: var(--accent); color: #fff; border-radius: 8px; cursor: pointer;
}
.go-btn:hover { background: #234d92; }
.go-btn:disabled { background: #b9c3d4; cursor: default; }

/* --- Options --- */
.qoptions { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.qopt {
  display: flex; align-items: flex-start; gap: 12px; text-align: left;
  border: 1.5px solid var(--line); background: #fff; border-radius: 10px;
  padding: 9px 13px; cursor: pointer; font-size: 16px; line-height: 1.4; color: var(--ink);
}
.qopt:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.qopt:disabled { cursor: default; }
.qopt.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.qopt-key {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 6px; background: var(--bg);
  color: var(--ink-soft); font-size: 13px; font-weight: 600; display: grid; place-items: center;
}
.qopt.opt-correct { border-color: var(--correct); background: var(--correct-bg); }
.qopt.opt-correct .qopt-key { background: var(--correct); color: #fff; }
.qopt.opt-wrong { border-color: var(--wrong); background: var(--wrong-bg); }
.qopt.opt-wrong .qopt-key { background: var(--wrong); color: #fff; }
.qopt.opt-contextual { border-color: var(--half); background: var(--half-bg); }
.qopt.opt-contextual .qopt-key { background: var(--half); color: #fff; }
#multi-commit { margin-top: 14px; }

.qoptions-graph {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.qopt-graph {
  flex-direction: column;
  align-items: stretch;
  padding: 10px;
}
.qopt-graph .qopt-key { margin-bottom: 6px; }
.qopt-diagram { display: block; }
/* Smith 2026-09-17, "doesn't fit well": four graph options on a fixed 200px
   thumbnail need 540px of column before the prompt is counted, so options 3
   and 4 sat below the fold on an ordinary laptop window. The cap now follows
   the window: 200px where there is room, shrinking on a short one so a
   four-way pick is always visible at once. Verified in the browser against
   the live v0.15.0 page: the last option moved from 31px below the fold to
   58px above it in an 819px viewport. */
.qopt-thumb {
  width: 100%; height: clamp(120px, 19vh, 200px); object-fit: contain; display: block;
  background: #fff; border-radius: 6px; border: 1px solid var(--line);
}
.concept-list { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; }
.concept-row { display: flex; align-items: flex-start; gap: 9px; width: 100%; padding: 9px; text-align: left; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); cursor: pointer; }
.concept-row .learning-dot { flex-shrink: 0; margin-top: 4px; }
.concept-row.is-active { border-color: var(--accent); background: var(--accent-soft, #edf2fc); }
.concept-action { display: block; margin-top: 5px; color: var(--accent); font-size: 11px; font-weight: 600; }
.practice-coaching { padding: 11px 15px; margin-bottom: 12px; background: #eef6f7; border: 1px solid #d6e6e8; border-radius: 10px; color: var(--ink); font-size: 13px; line-height: 1.5; }
.practice-coaching[hidden] { display: none; }
.practice-coaching p { margin: 0 0 9px; }
.practice-coaching summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.practice-coaching details[open] summary { margin-bottom: 9px; }
.coaching-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.coaching-actions button { border: 1px solid var(--line); border-radius: 7px; background: var(--card); color: var(--accent); padding: 7px 10px; font: inherit; cursor: pointer; }
.concept-label { display: block; font-size: 13px; line-height: 1.4; }
.concept-evidence { display: block; color: var(--ink-soft); font-size: 11px; margin-top: 3px; }
/* --- Idea map (right panel). Laid out like the Pre-IB coverage map: one small
   square per idea, a neutral tile per cluster, a compact header per strand.
   Names live in hover, focus and the inspector, not on the tile face. --- */
.idea-map-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.idea-map-heading h2 { font-size: 16px; margin: 0; }
.idea-view { display: flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.idea-view button { border: 0; background: white; color: var(--ink-soft); font: inherit; font-size: 12px; padding: 6px 9px; cursor: pointer; }
.idea-view button[aria-pressed="true"] { background: var(--accent); color: white; }
.idea-map-count { margin: 10px 0 4px; font-size: 13px; color: var(--ink-soft); }
.idea-map-count strong { color: var(--ink); }
.idea-map-note { font-size: 12px; line-height: 1.45; color: var(--ink-soft); margin: 5px 0 10px; }
.idea-inspector { border: 1px solid #cfdbed; background: #f5f8fd; border-radius: 9px; padding: 12px; margin: 13px 0; min-height: 145px; box-sizing: border-box; }
.idea-inspector strong { font-size: 14px; }
.idea-inspector p { font-size: 12px; line-height: 1.45; margin: 6px 0; }
.idea-inspector small { display: block; font-size: 11px; color: var(--ink-soft); }
.idea-inspector button, .idea-repair button { font: inherit; font-size: 12px; font-weight: 600; padding: 7px 10px; border: 1px solid #c3d2e9; border-radius: 6px; color: var(--accent); background: white; margin-top: 9px; cursor: pointer; }
.idea-section-title { margin: 14px 0 2px; font-size: 10px; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-soft); }
.idea-section + .idea-section { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 2px; }
.idea-group { margin: 6px 0 9px; }
.idea-group-hd { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 3px; padding-bottom: 2px; border-bottom: 1px dotted #cbd4de; }
.idea-group-name { margin: 0; font-size: 10px; line-height: 1.35; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-soft); }
.idea-group-name button { appearance: none; border: 0; background: transparent; padding: 0 3px; margin: 0 -3px; border-radius: 3px; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; text-align: left; cursor: pointer; }
.idea-group-name button:hover { color: var(--accent); }
.idea-group.has-current .idea-group-name { color: var(--ink); }
.idea-group.is-teaching .idea-group-name { color: var(--accent); }
.idea-group.is-practising .idea-group-name button { color: var(--ink); background: #e4ebf5; }
.idea-group-count { font-size: 10px; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.idea-tiles { display: flex; flex-wrap: wrap; gap: 3px; align-items: stretch; }
/* A tile is as wide as its cells need, up to four across (--cols), and grows with its idea count. */
.idea-cluster { --cell: 13px; --gap: 2px; flex: 1 1 calc(var(--cols, 2) * (var(--cell) + var(--gap)) + 4px); min-width: calc(var(--cols, 2) * (var(--cell) + var(--gap)) + 4px); padding: 3px; border: 1px solid #d3dbe4; border-radius: 4px; background: #fff; box-sizing: border-box; }
.idea-cluster[data-idea-set] { cursor: pointer; transition: border-color .1s ease; }
.idea-cluster[data-idea-set]:hover { border-color: var(--ink); }
.idea-cluster.has-current { border-color: #315f95; background: #f3f7fd; }
.idea-cluster.has-practising { outline: 2px solid var(--ink); outline-offset: 1px; }
.idea-buttons { display: flex; flex-wrap: wrap; gap: var(--gap, 2px); align-content: flex-start; }
.idea-button { appearance: none; position: relative; display: block; flex: 0 0 auto; border: 0; border-radius: 2px; padding: 0; margin: 0; background: transparent; color: var(--ink); cursor: pointer; font: inherit; line-height: 0; text-align: left; }
.idea-ball { display: block; flex-shrink: 0; width: var(--cell, 13px); height: var(--cell, 13px); border: 1px solid rgba(0,0,0,.09); border-radius: 2px; transition: transform .08s ease; }
.idea-button:hover, .idea-button[aria-pressed="true"] { z-index: 2; }
.idea-button:hover .idea-ball, .idea-button[aria-pressed="true"] .idea-ball { transform: scale(1.3); border-color: var(--ink); }
.idea-button.is-current .idea-ball { outline: 2px solid #315f95; outline-offset: 1px; }
.idea-button.is-practising .idea-ball { outline: 2px solid var(--ink); outline-offset: 1px; }
.idea-button:focus-visible, .idea-view button:focus-visible, .idea-inspector button:focus-visible, .idea-repair button:focus-visible, .idea-group-name button:focus-visible, .idea-cluster-name button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.idea-tiles-named { display: block; }
.idea-tiles-named .idea-cluster { border: 0; padding: 2px 0 6px; background: transparent; }
.idea-cluster-name { margin: 4px 0 2px; font-size: 11px; font-weight: 600; color: var(--ink-soft); }
.idea-cluster-name button { appearance: none; border: 0; background: transparent; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.idea-cluster-name button:hover { color: var(--accent); text-decoration: underline; }
.idea-tiles-named .idea-cluster[data-idea-set] { cursor: default; }
.idea-buttons-named { flex-direction: column; align-items: stretch; gap: 0; }
.idea-buttons-named .idea-button { display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 1.4; padding: 4px 5px; border-radius: 5px; }
.idea-buttons-named .idea-button[aria-pressed="true"] { background: #edf2f8; }
.idea-buttons-named .idea-ball { width: 11px; height: 11px; }
.idea-buttons-named .idea-button:hover .idea-ball, .idea-buttons-named .idea-button[aria-pressed="true"] .idea-ball { transform: none; }
.idea-legend-block { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.idea-legend-block .idea-map-note { font-size: 11px; font-style: italic; margin: 0 0 6px; }
.idea-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--ink-soft); }
.idea-legend span { display: inline-flex; align-items: center; gap: 4px; }
.idea-legend i { width: 11px; height: 9px; border: 1px solid #cbd4de; border-radius: 2px; }
.idea-empty { background: #dce2e8; }
.idea-revisit { background: #cb7773; }
.idea-secure { background: #588e69; }
.idea-mixed { background: #d4b14d; }
.idea-repairs { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.idea-repairs > summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.idea-repairs > summary span { color: var(--ink-soft); font-weight: 400; }
.idea-repair { border: 1px solid var(--line); border-radius: 7px; margin-top: 7px; padding: 9px; font-size: 12px; line-height: 1.5; }
.idea-repair > summary { cursor: pointer; font-weight: 600; }
.idea-repair p { margin: 8px 0; }
.selection-guidance { margin: 5px 0 12px; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.question-purpose { margin: -3px 0 14px; font-size: 12px; color: var(--ink-soft); }
.question-purpose summary { cursor: pointer; display: list-item; }
.question-purpose p { margin: 8px 0; line-height: 1.5; }
.situation-diagram { max-width: 480px; width: 100%; margin: 14px 0 18px; background: #f9fbfd; border: 1px solid var(--line); border-radius: 9px; padding: 8px; box-sizing: border-box; }
.situation-diagram svg { display: block; width: 100%; height: auto; max-height: 200px; }
.situation-diagram figcaption { color: var(--ink-soft); font-size: 11px; padding: 3px 7px; }
@media (pointer: coarse) { .idea-cluster { --cell: 22px; --gap: 3px; } }
.es-stage { margin-top: 14px; }
.es-progress { font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }
.es-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 14px 0; }
.es-input-row { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.es-input-row input { width: 130px; padding: 9px; border: 1px solid var(--line); border-radius: 7px; font: inherit; }
.es-stage button.primary-btn { padding: 10px 16px; border: 0; border-radius: 7px; background: var(--accent); color: white; font: inherit; cursor: pointer; }
.es-working { font-size: 14px; margin: 14px 0; padding: 10px; background: var(--bg); border-radius: 8px; }
.es-worked-step { margin: 6px 0; }
.es-inline-feedback { font-size: 14px; color: var(--ink); margin: 10px 0; }
@media (max-width: 560px) {
  .qoptions-graph { grid-template-columns: 1fr; }
}

/* --- Feedback --- */
.qfeedback { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.fb-verdict { font-weight: 650; font-size: 16px; margin-bottom: 8px; }
.fb-verdict.is-correct { color: var(--correct); }
.fb-verdict.is-wrong { color: var(--wrong); }
.fb-verdict.is-half { color: var(--half); }
.fb-slug {
  display: inline-block; font-size: 13px; font-weight: 600; color: var(--wrong);
  background: var(--wrong-bg); border-radius: 6px; padding: 3px 9px; margin-bottom: 8px;
}
.fb-gloss { font-size: 15px; color: var(--ink); margin-bottom: 8px; }
.fb-body { font-size: 15px; line-height: 1.55; color: var(--ink); margin-bottom: 16px; }
.fb-note { font-size: 14px; color: var(--half); margin-bottom: 8px; }

.phase-head { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); margin: 14px 0 6px; }

/* --- Coverage rows --- */
.cov-group { margin-bottom: 16px; }
.cov-group-title, .filter-group-title { font-size: 12px; color: var(--ink-soft); margin-bottom: 6px; }
.cov-row, .mistakes-row {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  border: 1px solid transparent; background: none; border-radius: 7px; padding: 6px 8px;
  cursor: pointer; font-size: 13.5px; color: var(--ink);
}
.cov-row:hover, .mistakes-row:hover { background: var(--bg); }
.cov-row.is-active, .mistakes-row.is-active { background: var(--accent-soft); border-color: var(--accent); }
.cov-dot { flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.08); }
.cov-label { flex: 1 1 auto; }
.cov-meta, .mistakes-meta { color: var(--ink-soft); font-size: 12px; }

/* --- Filters --- */
.filter-group { margin-bottom: 14px; }
.chip {
  display: inline-block; border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 5px 11px; margin: 0 6px 6px 0; font-size: 13px; cursor: pointer; color: var(--ink);
}
.chip:hover { border-color: var(--accent); }
.chip.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.active-filters { display: flex; flex-wrap: wrap; }
.chip.active-filter { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chip.clear-all { color: var(--wrong); }
.filter-foot { font-size: 12px; color: var(--ink-soft); margin-top: 10px; }

/* --- Mistakes panel --- */
.mistakes-panel {
  margin-top: 16px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 4px 14px 14px;
}
.mistakes-summary { cursor: pointer; font-weight: 600; padding: 10px 0; font-size: 15px; }
.mistakes-count { color: var(--ink-soft); font-weight: 400; }
.mistakes-body { display: flex; flex-direction: column; gap: 4px; }
.mistakes-label { flex: 1 1 auto; }
.mistakes-seq { letter-spacing: 1px; font-size: 13px; margin: 0 8px; }
.seq-tick { color: var(--correct); }
.seq-cross { color: var(--wrong); }
.mistakes-family { border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.mistakes-family-summary {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px;
  padding: 8px 10px; cursor: pointer; list-style: none;
}
.mistakes-family-summary::-webkit-details-marker { display: none; }
.mistakes-family-summary::before { content: "▸"; color: var(--ink-soft); font-size: 12px; }
.mistakes-family[open] .mistakes-family-summary::before { content: "▾"; }
.mistakes-family-head { flex: 1 1 160px; font-size: 13px; font-weight: 650; }
.mistakes-family-meta { color: var(--ink-soft); font-size: 12px; }
.mistakes-family-path { flex: 1 0 100%; color: var(--ink-soft); font-size: 11px; }
.mistakes-family-leaves { padding: 2px 6px 6px; border-top: 1px solid var(--line); background: var(--card); }
.mistakes-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--wrong); }

/* --- Sign-in modal --- */
.signin-overlay {
  position: fixed; inset: 0; background: rgba(20,30,50,.45); display: none;
  align-items: center; justify-content: center; z-index: 50;
}
.signin-overlay.open { display: flex; }
.signin-panel { background: #fff; border-radius: 14px; padding: 24px; width: 420px; max-width: 92vw; box-shadow: var(--shadow); }
.signin-title { font-size: 20px; font-weight: 650; margin-bottom: 14px; }
.signin-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.signin-tab { flex: 1; padding: 8px; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; cursor: pointer; font-size: 14px; }
.signin-tab.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.signin-pane { display: none; }
.signin-pane.is-active { display: block; }
.signin-lede { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
.signin-field { display: block; margin-bottom: 12px; }
.signin-code[hidden] { display: none; }
.signin-code .signin-code-entry { display: flex; align-items: center; gap: 8px; }
.signin-code .signin-code-entry input { flex: 1; min-width: 0; }
.signin-code button { border: 1px solid var(--line); border-radius: 5px; background: #fff; padding: 4px 8px; color: var(--ink); cursor: pointer; }
.signin-code p { margin: 5px 0 0; font-size: 13px; color: var(--ink-soft); }
.signin-code [role="alert"] { color: #8c2525; }
.signin-field span { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 4px; }
.signin-field input, .signin-field select { width: 100%; font-size: 16px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; }
.signin-field input:focus, .signin-field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#identity-pill-cohort { max-width: 14em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signin-go-btn { width: 100%; font-size: 16px; font-weight: 600; padding: 12px; border: none; background: var(--accent); color: #fff; border-radius: 8px; cursor: pointer; margin-top: 4px; }


/* --- Diagram assets (d034) --- */
.qasset-wrap { margin: 10px 0 14px; }
/* The SVGs are drawn at 380x250. Without a cap they stretch to whatever width
   the card happens to have, so every layout change inflated the graph again
   (Smith, three times). Cap at a little above native size and stop. */
.qasset { max-width: 440px; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; display: block; }
.qasset-frame { width: 100%; height: 320px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.qasset-missing { font-size: 13px; color: var(--half); background: var(--half-bg); border: 1px dashed #e7d9a6; border-radius: 8px; padding: 8px 10px; }

/* --- method_select (d034) --- */
/* QoderWork 2026-07-22 */

.ms-givens { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.ms-given {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 11px; font-size: 13.5px; color: var(--ink);
}

.ms-stage { margin-top: 18px; }
.ms-stage.ms-locked { opacity: .45; pointer-events: none; }
.ms-stage.ms-done { opacity: 1; pointer-events: default; }
.ms-stage.ms-done .ms-tool, .ms-stage.ms-done .ms-slot { pointer-events: none; }

.ms-step-label {
  display: flex; align-items: center; gap: 9px; font-size: 12px;
  letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 10px; font-weight: 600;
}
.ms-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); font-size: 12px; font-weight: 700;
}
.ms-done .ms-step-num { background: var(--correct); color: #fff; }

.ms-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .ms-tools { grid-template-columns: 1fr; } }
.ms-tool {
  display: flex; flex-direction: column; gap: 3px; text-align: left;
  background: #fff; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 12px 14px; cursor: pointer; color: var(--ink);
  transition: border-color .15s, background .15s, transform .07s;
}
.ms-tool:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.ms-tool:disabled { cursor: default; opacity: .7; }
.ms-tool-name { font-weight: 600; font-size: 14px; }
.ms-tool-eq { font-size: 14px; color: var(--ink-soft); }
.ms-tool.ms-correct { border-color: var(--correct); background: var(--correct-bg); }
.ms-tool.ms-correct .ms-tool-name { color: var(--correct); }
.ms-tool.ms-wrong { border-color: var(--wrong); background: var(--wrong-bg); animation: ms-shake .3s; }
@keyframes ms-shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }

.ms-equation {
  font-size: 19px; line-height: 2.2; display: flex; flex-wrap: wrap;
  align-items: center; gap: 6px; padding: 6px 0;
}
.ms-slot {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 52px; height: 36px; padding: 0 10px; border-radius: 8px;
  border: 1.5px dashed var(--accent); background: var(--accent-soft);
  cursor: pointer; font-size: 15px; color: var(--ink);
}
.ms-slot.ms-filled { border-style: solid; cursor: default; }
.ms-slot.ms-slot-correct { border-color: var(--correct); background: var(--correct-bg); }
.ms-slot.ms-slot-wrong { border-color: var(--wrong); background: var(--wrong-bg); animation: ms-shake .3s; }

.ms-opts {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0;
  padding: 12px; border: 1px dashed var(--line); border-radius: 10px; background: var(--bg);
}
.ms-opts-q { width: 100%; font-size: 13px; color: var(--ink-soft); margin-bottom: 4px; }
.ms-opt {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 13px; cursor: pointer; font-size: 14px; color: var(--ink);
}
.ms-opt:hover { border-color: var(--accent); background: var(--accent-soft); }

.ms-compute { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
.ms-compute-lead { font-size: 15px; color: var(--ink-soft); }

.ms-feedback { margin-top: 10px; padding: 10px 13px; border-radius: 9px; font-size: 14px; }
.ms-feedback.ms-good { background: var(--correct-bg); border: 1px solid var(--correct); color: var(--correct); }
.ms-feedback.ms-bad { background: var(--wrong-bg); border: 1px solid var(--wrong); color: var(--wrong); }

/* diagram_interaction widget (d040). MEASURED on the live page at 1280x850
   (Smith, 2026-09-18: "doesn't fit on screen..jumps down with answer"): the
   centre column is 709px, the card was 810, and the feedback landed below the
   fold at y=858. Height is now viewport-relative, and the frame SHRINKS once the
   drawing is done, so the feedback arrives in room that already existed instead
   of pushing the page down. Measured again after: card 610 of 709, no overflow,
   99px spare for a longer wrong-answer paragraph. */
.di-frame { height: clamp(240px, 38vh, 420px); }
/* The Tools group: last block in the left column, below everything else and
   OUTSIDE the collapsed Refine panel, because a tool is no longer dealt in the
   normal flow and its chip is the only way in. Smith, 2026-09-18: "as a group on
   the left below the rest of the things". */
.tool-group { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 16px; margin-bottom: 4px; }
.tool-note { font-size: 12px; color: var(--ink-soft); margin: 0 0 8px; line-height: 1.35; }
.tool-group .chip { margin-bottom: 4px; }
.di-frame.di-done { height: clamp(190px, 26vh, 300px); }


/* === v0.5.0 layout: fixed compact header + ticks, three columns each scrolling independently === */
html, body { height: 100%; }
body { display: flex; flex-direction: column; overflow: hidden; }
.app-header { flex: 0 0 auto; padding: 9px 24px; align-items: center; }
.brand-title { font-size: 18px; margin: 0; }
.brand-eyebrow { font-size: 11px; }
.brand-sub { margin-top: 0; }
.header-actions { display: flex; align-items: center; gap: 14px; }
/* ticks stat now sits inline in the header, compact, non-scrolling */
.ticks-row { padding: 0; border: none; background: none; font-size: 12px; white-space: nowrap; }
.app-shell.three-col { flex: 1 1 auto; min-height: 0; width: 100%; padding: 14px 24px; overflow: hidden; align-items: stretch; grid-template-rows: minmax(0, 1fr); }
/* Bound the grid row so long coverage cannot expand every column beyond the
   viewport. Only the three direct children own desktop scrolling. */
.left-filters, .right-col, .app { min-height: 0; max-height: 100%; overflow-y: auto; align-self: stretch; }
@media (max-width: 920px) {
  body { display: block; height: auto; min-height: 100%; overflow: auto; }
  .app-shell.three-col { overflow: visible; grid-template-rows: none; }
  .left-filters, .right-col, .app { max-height: none; overflow: visible; }
}
/* coverage row: short name + secondary code, and the drill-down detail */
.cov-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cov-code { color: var(--ink-soft); font-size: 11px; margin-left: 6px; }
.cov-detail { margin: 0 0 10px 22px; padding: 4px 0 6px 8px; border-left: 2px solid var(--line); }
.cov-detail-head { font-size: 12px; color: var(--ink-soft); margin-bottom: 5px; }
.cov-item { display: flex; align-items: center; gap: 7px; padding: 3px 0; font-size: 12.5px; }
.cov-item-label { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cov-detail .chip { margin-top: 7px; }


/* Feedback widget (estate kit) */
.wd-fb-btn { position: fixed; right: 16px; bottom: 16px; z-index: 40; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font-size: 13px; cursor: pointer; box-shadow: var(--shadow); color: var(--accent); }
.wd-fb-panel { position: fixed; right: 16px; bottom: 56px; z-index: 40; width: 300px; max-width: 90vw; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 12px; }
.wd-fb-title { font-weight: 650; font-size: 14px; margin-bottom: 8px; }
.wd-fb-panel textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px; font: inherit; font-size: 13px; resize: vertical; box-sizing: border-box; }
.wd-fb-row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.wd-fb-cancel { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 12px; cursor: pointer; font-size: 13px; }
.wd-fb-done { color: var(--correct); font-size: 13px; margin-top: 8px; }

.nav-link { color: var(--accent); text-decoration: none; }
.nav-link:hover { text-decoration: underline; }

/* --- desc_compose (d017 flagship; Language 2026-09-02, Architecture to restyle) --- */
.dc-hint { font-size: 13px; color: var(--ink-soft); margin: 4px 0 10px; }
.dc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; min-height: 4px; }
.dc-chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 6px 12px; font-size: 14px; cursor: pointer; }
.dc-chip:hover { border-color: #b33; }
.dc-x { color: var(--ink-soft); margin-left: 4px; }
/* Above the typing box now, so the gap goes underneath (Smith: "people don't see them"). */
.dc-suggest { display: flex; flex-direction: column; gap: 6px; margin: 0 0 8px; }
.dc-sug { text-align: left; border: 1px solid var(--line); background: var(--card);
  border-radius: 8px; padding: 8px 12px; font-size: 15px; cursor: pointer; }
.dc-sug:hover { background: var(--bg); }
.dc-detail { margin: 8px 0; }
.dc-line { font-size: 14px; padding: 3px 0; }
.dc-full { color: #1a7f37; }
.dc-nudge { color: var(--ink); background: #fff9e3; border-left: 3px solid var(--half); border-radius: 4px; margin: 4px 0; padding: 6px 8px; }
.dc-nudge-credit { color: var(--correct); font-weight: 650; }
.dc-trap { color: #b3261e; }
.dc-noise, .dc-unlisted { color: var(--ink-soft); }
.dc-missing { color: var(--ink); }
/* The question-bank stamp, beside the build number in the header. Quiet: it is
   a serial number a teacher reads off a screen, not a thing a pupil acts on. */
.bank-label { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
/* Newer-questions banner. Reloads with a changed query, which defeats the page
   cache and leaves localStorage alone, so the pupil keeps their progress. */
.update-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 24px 10px; padding: 9px 14px; font-size: 14px;
  background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 8px; }
.update-banner .go-btn { padding: 5px 12px; font-size: 14px; }
.update-banner[hidden] { display: none; }
/* Optional points. Labelled as optional so a complete answer does not read as
   a list of omissions (pupil feedback 2026-09-05). */
.dc-alsohd { color: var(--ink-soft); font-size: 12.5px; margin-top: 6px; }
.dc-alsotrue { color: var(--ink-soft); padding-left: 10px; }
.dc-nudge-note { font-size: 12.5px; color: var(--ink-soft); margin-left: 6px; }
.dc-equivalence { color: var(--correct); background: var(--correct-bg); border-radius: 4px; margin: 4px 0; padding: 6px 8px; }

/* --- hidden_given_probe (Pack 4 / Floor 3) --- */
.hg-hint { font-size: 13px; color: var(--ink-soft); margin: 8px 0 10px; }
.hg-convention {
  display: inline-block; margin-top: 8px; padding: 4px 10px;
  border: 1px solid var(--line); border-radius: 999px; font-size: 13px;
  background: var(--accent-soft);
}
#hg-commit { margin-top: 14px; }
.hg-detail { margin: 8px 0; }
.hg-line { font-size: 14px; padding: 3px 0; }
.hg-full { color: #1a7f37; }
.hg-miss { color: #8a6d00; }
.hg-trap { color: #b3261e; }
.hg-unusable { color: var(--ink); background: var(--half-bg); border-left: 3px solid var(--half); border-radius: 4px; margin: 4px 0; padding: 6px 8px; }
.hg-note { font-size: 12.5px; color: var(--ink-soft); margin-left: 6px; }
.dc-summary { margin: 12px 0 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.dc-summary-head { font-size: 14px; font-weight: 650; margin-bottom: 6px; }
.dc-summary-list { margin: 0; padding-left: 1.2em; font-size: 13.5px; color: var(--ink); }

/* --- equation_select (Pack 7) --- */
.es-assign {
  width: 100%; border-collapse: collapse; margin: 12px 0 14px; font-size: 14px;
}
.es-assign caption { text-align: left; font-weight: 650; padding-bottom: 10px; }
.es-assign th {
  text-align: left; font-size: 12px; font-weight: 650; color: var(--ink-soft);
  padding: 2px 8px 4px 0; border-bottom: 1px solid var(--line);
}
.es-assign td { padding: 4px 8px 4px 0; }
.es-row-target td { font-weight: 650; color: var(--accent); }
.es-row-absent td { color: var(--ink-soft); }
.es-sym { font-style: italic; min-width: 24px; }
.es-hidden { font-size: 12px; color: var(--ink-soft); }
.es-options { flex-direction: column; }
.es-opt .es-eq-form { font-style: italic; }
.es-detail-line { font-size: 14px; padding: 3px 0; }
.es-correct { color: #1a7f37; }
.es-wrong   { color: #b3261e; }

/* --- convention_pick (Pack 3 / d022) --- */
.conv-chip-host { margin: 0 0 10px; }
.conv-chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.conv-chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 4px 12px; border-radius: 999px; font-size: 14px; font-weight: 650;
  border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent);
}
.conv-chip.is-prefilled { border-style: dashed; }
.conv-chip-k { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.conv-chip-origin, .conv-flip-label { font-size: 12px; color: var(--ink-soft); }
.conv-chip-pending { font-size: 13px; color: var(--ink-soft); }
.conv-flip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 3px 10px; font-size: 13px; cursor: pointer; color: var(--ink);
}
.conv-flip:hover { border-color: var(--accent); background: var(--accent-soft); }
.conv-picker { margin: 12px 0; }
.conv-picker-prompt { font-size: 14px; color: var(--ink-soft); margin-bottom: 8px; }
.conv-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.conv-choice {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--card); border-radius: 10px;
  padding: 10px 14px; cursor: pointer; font-size: 16px;
}
.conv-choice:hover { border-color: var(--accent); background: var(--accent-soft); }
.fb-verdict.is-declared { color: var(--accent); }

/* --- Task picker, taught gate and the not-learned flag (Language 2026-09-03).
   Smith: "critically i want to choose what they do... or for them to." --- */
.chip-count {
  display: inline-block;
  margin-left: .35em;
  padding: 0 .4em;
  border-radius: 999px;
  background: rgba(0, 0, 0, .08);
  font-size: .82em;
  font-variant-numeric: tabular-nums;
}
.task-locked {
  display: inline-block;
  padding: .3em .7em;
  border-radius: 6px;
  background: #eef3fa;
  border: 1px solid #c6d6ea;
  font-weight: 600;
}
.taught-note {
  margin: .5em 0 .8em;
  padding: .45em .6em;
  border-left: 3px solid #d6a417;
  background: #fdf8e8;
  font-size: .9em;
  line-height: 1.35;
}

/* Right column holds coverage above the misconception rows (Language 2026-09-03). */
.right-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.right-col .coverage-panel { align-self: stretch; flex: 0 0 auto; }
.right-col .mistakes-panel { margin-top: 0; flex: 0 0 auto; }

/* How-you-can-tell line under feedback (dispatch packet D, 2026-09-03). */
.fb-tell {
  margin-top: .7em; padding: .5em .7em; border-left: 3px solid var(--accent);
  background: var(--accent-soft); font-size: .95em; line-height: 1.4;
}
.fb-tell-label {
  display: block; font-size: .78em; text-transform: uppercase; letter-spacing: .04em;
  font-weight: 650; color: var(--ink-soft); margin-bottom: .2em;
}


/* ==========================================================================
   Graft 5 (edit 17): the left-hand selector, from Special Relativity Driller
   at c372b77. The packet names these rules by hand:  .left-filters, .sel-sticky,
   .sel-chosen, .sel-chip, .sel-serving, .sel-more, .filter-axes, .axis,
   .axis-chips, .cov-group and the two-column frequency shading.

   One deliberate difference from SR. SR puts the two frequency cells on the
   POINT row only; edit 17 asks for them on each question TYPE ("the question
   types themselves ... shaded on two frequency columns on one shared scale, so
   a pupil reads 'asked rarely, needed everywhere' at a glance"), and our
   metadata carries an exam block per type, so the .sel-atom grid gains two
   leading tracks that SR's does not have.
   ========================================================================== */
:root {
  --fq-col: 30px;
  --fq1: #f2f5f9;
  --fq2: #dde5f1;
  --fq3: #c2d0e7;
  --fq4: #93aed6;
  --fq5: #5b83c0;
  --fq6: #2b5cab;
}

.sel-sticky {
  position: sticky; top: -14px; z-index: 3;
  background: var(--card, #fff); border-bottom: 1px solid var(--line);
  margin: 0 -14px 10px; padding: 8px 14px 9px;
}
.sel-serving { font-size: 12px; color: var(--ink-soft); }
.sel-serving strong { color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums; }
.sel-chosen { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.sel-chip {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
  border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent);
  border-radius: 999px; padding: 2px 8px; font-size: 11px; cursor: pointer; text-align: left;
}
.sel-chip:hover { background: #dde8fa; }
.sel-chip-x { font-size: 13px; line-height: 1; opacity: .7; }
.sel-chip-clear { border-color: var(--line); background: #fff; color: var(--ink-soft); }
.sel-more { font-size: 11px; color: var(--ink-soft); align-self: center; }

.sel-hint { font-size: 11.5px; color: var(--ink-soft); padding: 0 8px 7px; line-height: 1.4; }
.sel-count { font-weight: 400; color: var(--accent); text-transform: none; letter-spacing: 0; }

/* The two frequency numbers sit in fixed gutters so they stack into two clean
   vertical lines the eye can run down, rather than drifting with the text. */
.sel-head {
  display: grid; grid-template-columns: var(--fq-col) 1fr;
  gap: 4px; align-items: end; padding: 6px 8px 4px;
  font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft);
}
.sel-head-n { text-align: center; }
.sel-head-x { opacity: .75; }

.left-filters .sel-point {
  display: grid; grid-template-columns: var(--fq-col) var(--fq-col) 1fr;
  gap: 4px; align-items: center;
  padding: 12px 8px 3px; border-top: 1px solid var(--line); margin-top: 6px;
}
.left-filters .cov-group > .sel-point:first-of-type { border-top: none; margin-top: 0; }
.sel-point-name {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-soft);
}
.sel-point-name .cov-code {
  display: inline-block; margin-left: 6px; font-weight: 400;
  letter-spacing: normal; text-transform: none; color: var(--accent);
}

.fq {
  display: block; text-align: center; border-radius: 4px;
  font-size: 10.5px; font-weight: 650; font-variant-numeric: tabular-nums;
  padding: 2px 0; color: var(--ink); background: var(--fq1);
}
.fq-na { background: transparent; }
.fq1 { background: var(--fq1); color: #93a0b2; }
.fq2 { background: var(--fq2); }
.fq3 { background: var(--fq3); }
.fq4 { background: var(--fq4); }
.fq5 { background: var(--fq5); color: #fff; }
.fq6 { background: var(--fq6); color: #fff; }

/* Five tracks: the two frequency cells, the checkbox, the name, the count.
   Multi-select, so the rows read as checkboxes rather than radio-ish buttons:
   picking a second type must look like adding to the first, not replacing it. */
.sel-atom {
  display: grid;
  /* One frequency gutter, not two: the second was constant down a family and
     squeezed the name below the width of its longest word. */
  grid-template-columns: var(--fq-col) 15px 1fr auto;
  gap: 4px; align-items: start; width: 100%; text-align: left;
  border: 1px solid transparent; background: none; border-radius: 7px;
  padding: 5px 8px; cursor: pointer; font-size: 12.5px; line-height: 1.35; color: var(--ink);
}
.sel-atom:hover { background: var(--bg); }
.sel-atom.is-on { background: var(--accent-soft); border-color: var(--accent); }
.sel-box {
  justify-self: center; width: 14px; height: 14px; margin-top: 1px; border-radius: 4px;
  border: 1.5px solid var(--line); background: #fff; color: var(--accent);
  font-size: 10px; line-height: 12px; text-align: center;
}
.sel-atom.is-on .sel-box { border-color: var(--accent); }
.sel-name { min-width: 0; overflow-wrap: break-word; }
.sel-name .type-number { margin-right: 5px; }
.sel-n { color: var(--ink-soft); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.type-number {
  flex: 0 0 auto; white-space: nowrap; font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--accent);
}
.chip-clear { border-color: var(--accent); color: var(--accent); }

/* Two axes (three here, with Task), ruled apart, so setting a mode AND a
   question type does not read as one choice among several. */
.filter-axes { display: flex; flex-direction: column; gap: 5px; }
.filter-axes .axis { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.filter-axes .filter-group-title { flex: 0 0 5.5em; margin-bottom: 0; }
.axis-chips { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 auto; min-width: 0; }
.filter-axes .chip { margin: 0; padding: 3px 9px; font-size: 12px; }
.chip-n { opacity: .65; font-variant-numeric: tabular-nums; margin-left: 3px; }
.filter-foot { font-size: 11px; color: var(--ink-soft); padding: 10px 8px 4px; line-height: 1.45; }

/* ==========================================================================
   Graft 7, revised: the coverage mosaic, after Trilogy Physics' coverage map
   (its d074, itself the Pre-IB `new` shape), which is what Smith asked for on
   2026-09-23. Colour lives ONLY on the cells; a tile is a neutral container.
   Cells are small squares with a plain-language title; the type id never
   reaches the screen. A family with nothing written renders as a dashed tile,
   because a map whose job is to show coverage must show the holes.
   ========================================================================== */
.cov-hd { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.cov-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }

.cov-band-h {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 12px 0 6px; padding-bottom: 3px; border-bottom: 1px solid var(--line);
}
.cov-band-name { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.cov-band-count { font-size: 11px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.cov-tiles { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.cov-tile {
  background: var(--card, #fff); border: 1px solid var(--line); border-radius: 6px;
  padding: 5px 6px 6px; min-width: 96px; max-width: 100%; flex: 1 1 96px;
}
.cov-tile.is-focused { box-shadow: 0 0 0 2px var(--accent); border-color: var(--accent); }
.cov-tile.is-gap { border-style: dashed; background: transparent; opacity: .85; }
.cov-tile-lab {
  display: block; width: 100%; text-align: left; font-size: 10.5px; line-height: 1.2;
  color: var(--ink-soft); background: none; border: 0; padding: 0 0 4px; cursor: pointer;
}
.cov-tile.is-gap .cov-tile-lab { cursor: default; }
.cov-tile-gap { font-size: 10px; color: var(--ink-soft); font-style: italic; }

.cov-cells { display: flex; flex-wrap: wrap; gap: 3px; }
.cov-cells.has-clusters { gap: 6px 10px; }
.cov-cluster { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 2px 4px 2px 0; border-right: 1px solid var(--line); }
.cov-cluster:last-child { border-right: 0; padding-right: 0; }
.cov-cell {
  width: 16px; height: 16px; border-radius: 3px; border: 1px solid rgba(0,0,0,.14);
  padding: 0; cursor: pointer; flex: 0 0 auto; transition: box-shadow .1s;
}
.cov-cell:hover, .cov-cell:focus-visible { box-shadow: 0 0 0 2px rgba(0,0,0,.25); outline: none; }
.cov-cell.is-focused { box-shadow: 0 0 0 2px var(--accent); }
.cov-cell.is-current { box-shadow: inset 0 0 0 2px rgba(20,20,20,.55); }
/* No items authored: an outline with nothing in it, never a coloured square,
   because an empty result and an unwritten question are different facts. */
.cov-cell.is-unauthored { border-style: dashed; cursor: default; }
@media (max-width: 860px) { .cov-cell { width: 20px; height: 20px; } }

.cov-repairs { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 8px; }
.cov-repairs > summary { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); cursor: pointer; }
.cov-repair { margin-top: 8px; font-size: 12px; }
.cov-repair p { margin: 3px 0 0; color: var(--ink-soft); }
.cov-note { font-size: 11.5px; color: var(--ink-soft); margin: 6px 0 0; }

/* The chosen-type summary: one line, not a block of truncated chips. */
.sel-chosen-n { font-size: 11.5px; color: var(--accent); font-weight: 600; }
.sel-chosen { align-items: center; justify-content: space-between; }
/* Names wrap on words. A narrow rail must not break "Recognise" as
   "Recognis / e", which is what a too-narrow track produced. */
.sel-name { min-width: 0; overflow-wrap: normal; word-break: normal; hyphens: none; }

/* The course split rides at the top of the sticky head: it decides the whole
   diet, so it must not be something you scroll past. */
.sel-course { display: flex; gap: 4px; margin-bottom: 7px; }
.sel-course .chip { padding: 3px 9px; font-size: 12px; }
.sel-course-fixed { font-size: 11.5px; color: var(--ink-soft); margin-bottom: 7px; }

/* The families with nothing authored: one line at the foot, not eight empty
   tiles at the bottom of the rail. The hole stays visible; it stops being the
   biggest thing on the page. */
.cov-gaps { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.cov-gaps > summary { font-size: 11.5px; color: var(--ink-soft); cursor: pointer; }
.cov-gaps > summary span { font-variant-numeric: tabular-nums; opacity: .75; }
.cov-gaps ul { margin: 6px 0 0; padding-left: 16px; }
.cov-gaps li { font-size: 11.5px; color: var(--ink-soft); margin-bottom: 3px; }
.cov-gap-where { opacity: .6; }

/* --- A.2 deltas (instinctivelymechanical d014) ------------------------------
   Everything above this line is SHM Driller's stylesheet as taken. Each rule
   here was needed to pass tools/verify_layout.cjs on A.2 content. */
/* A.2 stimulus drawings are nearer square than SHM's traces, so a width cap
   alone let them run 290px tall and push the options below the fold. */
.qasset { width: auto; max-width: min(440px, 100%); max-height: clamp(130px, 26vh, 250px); }
/* Four picture options share one row wherever the card allows 140px each,
   and two per row on a phone, rather than one tall column. */
.qoptions-graph { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
@media (max-width: 560px) { .qoptions-graph { grid-template-columns: 1fr 1fr; } }
/* The value of g in use (RULES 25), on the meta line so it costs no height. */
.g-flag { display: inline-block; text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--ink); background: #f3f6f9; border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; margin-left: 10px; }
/* d019 (Smith, 2026-09-30): nothing says what type of question this is until it is
   answered. The g flag stays, because the answer needs it. */
body.card-unanswered .qmeta-type, body.card-unanswered .question-purpose { display: none; }
body.card-unanswered .g-flag { margin-left: 0; }
body.card-unanswered .cov-cell.is-current { box-shadow: none; }
/* v0.3.19 (d060; Thermal, 15 November; Smith: "I see it tells you which thing you're being asked ... It
   shouldn't be highlighting them"). The rule above took the focus ring off the dealt question's cell too, so
   with several cells chosen the unringed one was the type being asked. A chosen cell keeps its ring. */
body.card-unanswered .cov-cell.is-current.is-focused { box-shadow: 0 0 0 2px var(--accent); }
/* v0.3.11 (d046): the left column's ideas list (v0.3.1, d027) underlined the current question's
   idea before it was answered, which d019 forbids. It shows once the question is answered. */
body.card-unanswered .sel-idea-row.is-current .sel-idea-name { text-decoration: none; }
/* Picture and data side by side (Smith's forces page layout); they wrap on a narrow card. */
.qstim-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 4px 0 10px; }
.qstim-row .qasset-wrap { margin: 0; flex: 0 1 auto; }
.qstim-row .qstimulus { flex: 1 1 170px; margin: 0; }
/* v0.3.17 (d056): paragraphs and bulleted lists in question text and feedback (renderBlocks). */
.qpara { margin: 0 0 .55em; }
.qlist { margin: .2em 0 .6em; padding-left: 1.3em; }
.qlist li { margin: .15em 0; }
.qpara:last-child, .qlist:last-child { margin-bottom: 0; }
/* v0.3.17 (d057): a picture with a reading width (its manifest's min_width_px) keeps that width and
   scrolls sideways in its frame; engine.js readingPictureHtml. */
.qasset-reading { display: block; min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; text-align: left; }
.qasset-reading img { flex-shrink: 0; object-fit: contain; }
.qasset-reading-note { display: block; font-size: 12px; color: var(--ink-soft); padding: 3px 0 7px; }
/* v0.3.17 (d057): a driller that wants its question pictures at reading size puts class="pictures-large"
   on <body> (Thermal's d039): the card's width up to 640 px, no taller than 58% of the screen, above the
   stimulus text. A question whose options are pictures keeps the smaller stimulus, so its options stay
   on the screen. Mechanical Intuition does not set it (its caps keep picture and options on one screen,
   DRILLER_KIT 3). */
body.pictures-large #qcard:not(:has(.qoptions-graph)) .qasset-wrap:not(.qasset-reading) .qasset { width: auto; height: auto; max-width: min(640px, 100%); max-height: min(560px, 58vh); }
body.pictures-large #qcard:not(:has(.qoptions-graph)) .qstim-row { flex-direction: column; align-items: stretch; }
body.pictures-large #qcard:not(:has(.qoptions-graph)) .qstim-row .qasset-wrap { flex: 1 1 auto; }
/* v0.3.19 (d060; Thermal's d051, offered 15 November). A driller whose picture options are graphs drawn
   large, with labels to read, puts class="graph-options-large" on <body>: two to a row, one on a phone,
   each at its own height. Mechanical Intuition does not set it: its force diagrams stay three or four to a
   row so a choice fits one screen (17 September), and its graphs are two to a row already. */
body.graph-options-large .qoptions-graph { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.graph-options-large .qoptions-graph .qopt-thumb { height: auto; max-height: none; }
@media (max-width: 560px) { body.graph-options-large .qoptions-graph { grid-template-columns: minmax(0, 1fr); } }
/* Short answers two or more to a row. */
.qoptions-short { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; }
/* A picture beside its data has a set height, so it keeps its size in the row. */
.qstim-row .qasset { height: clamp(110px, 22vh, 230px); width: auto; max-width: 100%; }
/* Picture options: the number is a tab on the tile's top edge instead of a row
   above the picture (it must not sit on the drawing, where labels are), and four
   fit one row down to a 470px card. */
.qopt-graph { position: relative; }
.qopt-graph .qopt-key { position: absolute; top: -10px; left: 8px; margin: 0; z-index: 1; }
.qoptions-graph { row-gap: 16px; margin-top: 12px; }
/* Graphs carry axis numbers and labels, so they stay two to a row and readable. */
.qoptions-graph.qoptions-graphs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qopt-thumb { height: clamp(100px, 17vh, 200px); }
.qoptions-graph { grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); }
/* iPad landscape and small laptops: the same three columns, narrower at the sides,
   so the card has room for a picture question on one screen. */
@media (min-width: 921px) and (max-width: 1100px) {
  .app-shell.three-col { grid-template-columns: 190px minmax(0, 1fr) 220px; gap: 14px; padding: 14px 14px 40px; }
  .qprompt { font-size: 17px; }
}
/* The header link to the coverage page (ours; SHM has no coverage page yet). */
.coverage-link { color: var(--accent); font-size: 13px; white-space: nowrap; text-decoration: none; }
.coverage-link:hover { text-decoration: underline; }
/* A phone: the header's name, link and sign-in badge wrap rather than widen the page. */
@media (max-width: 560px) {
  .app-header { flex-wrap: wrap; gap: 6px 12px; }
  .header-actions { flex-wrap: wrap; gap: 6px 12px; }
}
/* Short windows (a laptop at 720px, an iPad with Safari's bars): a little less air. */
@media (min-width: 921px) and (max-height: 800px) {
  .qprompt { font-size: 17px; margin-bottom: 8px; }
  .qcard { padding-top: 14px; padding-bottom: 14px; }
  .qopt-thumb { height: clamp(96px, 16vh, 200px); }
}
.g-flag-real { color: var(--ink-soft); }
/* A part's feedback sits under its options, like a single question's. */
.phase-feedback, .phase-final { margin-top: 12px; padding-top: 12px; }
.qstimulus sub, .qprompt sub, .qopt sub, .fb-body sub { font-size: 75%; }

/* ==========================================================================
   v0.3.1 (d027): one job per column. Left: choose what to practise, in
   syllabus order, as families > ideas (atoms) > question types; each idea with
   its progress colour and the mistakes made there; question types open under
   an idea, one line each, full wording in the hover text. Right: progress in
   teaching order, with the routes. The overall route is the one big choice.
   ========================================================================== */
.panel-order { font-weight: 400; text-transform: none; letter-spacing: 0; color: #8a97a8; margin-left: 4px; }
.left-filters .route-global { margin: 0 0 8px; }
.left-filters .route-control-label { font-size: 11.5px; font-weight: 650; color: var(--ink); margin-bottom: 5px; }
.left-filters .route-mode { font-size: 12.5px; padding: 7px 4px; font-weight: 600; border-radius: 6px; }
.left-filters .route-mode.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.left-filters .route-mode-help { font-size: 11px; margin: 5px 0 6px; }
.sel-sticky .sel-chosen { margin-top: 5px; }
.sel-filters { margin: 0 0 6px; font-size: 12px; }
.sel-filters > summary { cursor: pointer; color: var(--ink-soft); font-size: 11.5px; padding: 2px 0; }
.sel-filters > summary span { color: var(--accent); font-weight: 600; margin-left: 4px; }
.sel-filters .filter-axes { margin-top: 6px; }
.sel-filters .filter-axes .filter-group-title { flex: 0 0 3.6em; font-size: 11px; }
.sel-filters .filter-axes .chip { font-size: 11.5px; padding: 2px 8px; }
.sel-head-line { font-size: 10.5px; color: #8a97a8; padding: 0 2px 4px; line-height: 1.35; }
.sel-fam {
  display: grid; grid-template-columns: var(--fq-col) 1fr; gap: 6px; align-items: start;
  width: 100%; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; cursor: pointer;
  padding: 9px 2px 4px; margin-top: 4px; font: inherit;
}
.sel-list > .sel-fam:first-of-type { border-top: 0; margin-top: 0; }
.sel-fam-name { font-size: 12px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.sel-fam:hover .sel-fam-name, .sel-fam.is-on .sel-fam-name { color: var(--accent); }
.sel-idea-row { display: grid; grid-template-columns: 16px 1fr; align-items: start; margin-top: 1px; border-radius: 6px; }
.sel-idea-row.is-on { background: var(--accent-soft); }
.sel-idea-row.is-some { background: #f3f6fb; }
.sel-idea-row.is-current .sel-idea-name { text-decoration: underline; text-decoration-color: #b9c7da; text-underline-offset: 2px; }
.sel-idea-open { border: 0; background: none; cursor: pointer; color: #8a97a8; font-size: 11px; padding: 5px 0 0; line-height: 1; }
.sel-idea-open:hover { color: var(--accent); }
.sel-idea {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; gap: 6px; align-items: center;
  width: 100%; text-align: left; border: 0; background: none; border-radius: 6px;
  padding: 4px 6px 4px 2px; cursor: pointer; font: inherit; font-size: 12px; color: var(--ink); line-height: 1.3;
}
.sel-idea:hover .sel-idea-name { color: var(--accent); }
.sel-idea-name { min-width: 0; }
.sel-dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(28,36,48,.22); box-sizing: border-box; }
.sel-dot.is-small { width: 8px; height: 8px; }
/* Only applied after grading; dot fill still comes from recorded evidence. Since v0.3.17 (d054) the
   ring stands still: under Smith's EDICT a dot moves only when its colour changes (.fresh-flash). */
#left-filters .is-assessed { --assessment-ring:#3d70ac; }
#left-filters .is-assessed[data-assessment-status="wrong"] { --assessment-ring:#b44843; }
#left-filters .is-assessed[data-assessment-status="half"] { --assessment-ring:#a47725; }
#left-filters .is-assessed .sel-dot { outline:2px solid var(--assessment-ring); outline-offset:2px; }
/* v0.3.17 (d054; Smith's EDICT of 15 November 2026, Rule 2): a dot, cell, node or mark whose colour an
   answer changed flashes once in its new colour, as Linguics's fresh-dot-flash does (1.4 s). Under
   reduced motion, a brief outline instead. engine.js adds the class and takes it off again. */
.fresh-flash { position:relative; z-index:3; animation:fresh-dot-flash 1400ms ease-in-out 1; }
.cov-cell.fresh-flash, .practice-history-mark.fresh-flash { --flash-scale:1.5; }
@keyframes fresh-dot-flash {
  0%   { transform:scale(1); box-shadow:0 0 0 0 transparent; }
  20%  { transform:scale(var(--flash-scale,1.9)); box-shadow:0 0 0 3px var(--accent); }
  45%  { transform:scale(1.2); box-shadow:0 0 0 1px var(--accent); }
  65%  { transform:scale(var(--flash-scale,1.9)); box-shadow:0 0 0 3px var(--accent); }
  100% { transform:scale(1); box-shadow:0 0 0 0 transparent; }
}
@media (prefers-reduced-motion:reduce) { .fresh-flash { animation:none; outline:2px solid var(--accent) !important; outline-offset:2px !important; } }
.route-free-boundary { margin:7px 0 4px; border-top:1px dotted #c4ceda; }
.single-question-notice { display:flex; flex-wrap:wrap; align-items:center; gap:5px 10px; margin:8px 0; color:var(--ink-soft); font-size:12px; }
.single-question-notice button { border:0; padding:0; background:none; color:var(--accent); font:inherit; cursor:pointer; text-align:left; }
.single-question-notice button:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.sel-made {
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; box-sizing: border-box;
  background: #fbe9e7; color: #b3412e; border: 1px solid #efb7ad; font-size: 10.5px; font-weight: 700; line-height: 14px; text-align: center;
}
.sel-type {
  display: grid; grid-template-columns: var(--fq-col) 8px minmax(0, 1fr) auto; gap: 5px; align-items: center;
  width: calc(100% - 14px); margin-left: 14px; text-align: left; border: 1px solid transparent; background: none; border-radius: 5px;
  padding: 2px 6px 2px 2px; cursor: pointer; font: inherit; font-size: 11.5px; color: var(--ink); line-height: 1.3;
}
.sel-type:hover { background: var(--bg); }
.sel-type.is-on { background: var(--accent-soft); border-color: var(--accent); }
.sel-type .fq { font-size: 9.5px; padding: 1px 0; }
.sel-type .sel-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-idea .sel-n, .sel-type .sel-n { font-size: 10.5px; color: #8a97a8; }
/* v0.3.1: the Bridge mark sits in the card's top-right corner, so it costs the card no height. */
#qcard { position: relative; }
#qcard .qmeta .practice-role-badge { position: absolute; top: 10px; right: 14px; margin: 0; }
#qcard:has(.qmeta .practice-role-badge) > .qprompt:first-of-type, #qcard:has(.qmeta .practice-role-badge) .qprompt-main { padding-right: 64px; }
/* d030: picture options show no words until the question is answered (unless the item keeps them). */
body.card-unanswered #qcard:not(.keeps-captions) .qopt-graph .qopt-text { display: none; }

/* v0.3.3 (Smith's review of v0.3.2, 2026-10-10). The exam share reads as a percentage on
   every layer, each layer shaded on its own scale (white at zero, house blue at the top,
   black text). A click focuses; what is chosen lights up, the family header included. */
:root { --fq-col: 40px; }
.fq { color: var(--ink); font-size: 10.5px; padding: 2px 0; border: 1px solid rgba(43,92,171,.12); }
.fq-na { border-color: transparent; }
.sel-head-line { font-size: 11px; color: #6f7d90; }
.fq-key { display: inline-block; width: 26px; height: 9px; margin-right: 5px; vertical-align: -1px; border-radius: 2px;
  background: linear-gradient(90deg, #fff, #7bafd4); border: 1px solid rgba(43,92,171,.18); }
.sel-click-tag { color: #6f7d90; }
.sel-kbd { display: inline-block; border: 1px solid #c9d3e1; border-bottom-width: 2px; border-radius: 3px; padding: 0 3px;
  font-size: 10px; line-height: 13px; color: var(--ink-soft); background: #fff; }
.sel-multi-on, .sel-multi-off { border: 0; background: none; padding: 0; font: inherit; color: var(--accent);
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.sel-multi-off { font-weight: 650; margin-left: 4px; }
.sel-chip-named { max-width: 100%; }
.sel-chip-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* Family header: lit like what it chooses. */
.sel-fam { border-radius: 6px; padding: 9px 4px 5px 2px; }
.sel-fam.is-on { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.sel-fam.is-on .sel-fam-name { color: var(--accent); }
.sel-fam.is-some { background: #f3f6fb; box-shadow: inset 3px 0 0 #b9c9e3; }
/* Idea rows carry their own share in the same column as the family's. */
.sel-idea-row { grid-template-columns: var(--fq-col) 14px minmax(0, 1fr); gap: 0 4px; align-items: center; padding: 1px 0; }
.sel-idea-row > .fq { align-self: center; }
.sel-idea-row.is-on { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.sel-idea-row.is-on .sel-idea-name { color: var(--accent); font-weight: 650; }
.sel-idea-row.is-some { box-shadow: inset 3px 0 0 #b9c9e3; }
.sel-idea-open { padding: 0; }
/* Question types line up under the same shaded column. */
.sel-type { width: 100%; margin-left: 0; grid-template-columns: var(--fq-col) 22px minmax(0, 1fr) auto; gap: 0 4px; }
.sel-type .sel-dot { justify-self: end; margin-right: 4px; }
.sel-type.is-on .sel-name { color: var(--accent); font-weight: 650; }
.route-mode-n { display: inline-block; min-width: 22px; margin-left: 5px; padding: 0 5px; border-radius: 9px; font-size: 11px; font-weight: 650;
  line-height: 17px; background: #eef2f8; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.route-mode.is-active .route-mode-n { background: rgba(255,255,255,.22); color: #fff; }
/* v0.3.3: wider side columns on a wide screen, so an idea's name fits beside its share. */
@media (min-width: 1101px) {
  .app-shell.three-col { grid-template-columns: clamp(250px, 17vw, 320px) minmax(0, 1fr) clamp(280px, 19vw, 340px); }
}
.sel-idea-row { grid-template-columns: var(--fq-col) 12px minmax(0, 1fr); }
.coverage-link { font-size: 14px; border: 1px solid #c8d8ef; border-radius: 999px; padding: 4px 12px; background: var(--accent-soft); }
.coverage-link:hover { text-decoration: none; background: #dde8fa; }
/* d035: the lab line under the feedback of a friction question. */
.fb-lab { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 10px 0 4px; }
.fb-lab-note { font-size: 13px; color: var(--ink-soft); }
/* TeacherViewer, 2026-10-10: the class picker stays within its container on a phone. */
#signin-cohort, .signin-field select { max-width: 100%; }
/* d037: class sets (TeacherViewer "Sets", Trilogy d172's shared player), above the question.
   v0.3.8 (d042): one strip that folds away, a line per set, a dot per target (after Fields d074). */
.sets-area { margin: 0 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); padding: 4px 8px; }
.sets-area[hidden], .set-bar[hidden] { display: none; }
.sets-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 28px; }
.sets-toggle { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink-soft);
  background: none; border: 0; padding: 2px 2px; cursor: pointer; letter-spacing: .03em; }
.sets-toggle:hover .sets-h, .sets-toggle:focus-visible .sets-h { color: var(--accent); }
.sets-chevron { width: 10px; font-size: 11px; }
.sets-count { font-weight: 600; font-size: 11.5px; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent-soft); color: var(--ink); text-align: center; }
.sets-playing { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; min-width: 0; }
.sets-playing-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.sets-area .set-leave { margin-left: auto; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--accent);
  background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 2px 9px; }
.sets-area .set-leave:hover { border-color: var(--accent); }
.sets-list { list-style: none; margin: 2px 0 2px; padding: 0; }
.sets-list li { margin: 0; }
.set-row { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; font: inherit; font-size: 13.5px; color: var(--ink);
  background: none; border: 0; border-radius: 6px; padding: 4px 6px; cursor: pointer; }
.set-row:hover, .set-row:focus-visible { background: var(--accent-soft); }
.set-row.is-active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.set-row .set-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.set-tag, .set-due { font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; }
.set-due.is-late { color: #a8461f; }
.set-done { color: var(--correct, #2e8b57); font-weight: 700; }
.set-dots { display: inline-flex; flex-wrap: wrap; gap: 3px; margin-left: auto; padding-left: 6px; }
.set-dot { width: 11px; height: 11px; border-radius: 50%; box-sizing: border-box; border: 1px solid rgba(0,0,0,.12); }
.set-dot.is-untried { background: transparent; border: 1.5px solid #b9b9b9; }
.set-dot.is-secure { box-shadow: 0 0 0 1.5px var(--card), 0 0 0 3px #2e8b57; }
.set-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 10px;
  background: var(--accent-soft); border: 1px solid #c8d8ef; border-radius: 10px; padding: 8px 12px; font-size: 13.5px; }
.set-bar .set-leave { margin-left: auto; font: inherit; font-size: 13px; cursor: pointer; color: var(--accent);
  background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; }
.set-bar .set-leave:hover { border-color: var(--accent); }
/* v0.3.18 (d059): the end of a set (set player 1.3): what was done, then "Keep going with the ones I got
   wrong (N)" and "Stop here". */
.set-end .qprompt { margin-bottom: 6px; }
.set-end-note { margin: 0 0 4px; color: var(--ink-soft); font-size: 14px; }
.set-end-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 12px; }
.set-end-stop { font: inherit; font-size: 14.5px; cursor: pointer; color: var(--accent); background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 16px; }
.set-end-stop:hover { border-color: var(--accent); }
/* v0.3.18 (d059; Smith, 15 November, "L c"): a tap on a question's picture shows it at the full width of
   the screen (engine.js openPictureZoom). In the card the picture keeps its caps; a mark on its corner
   says it opens. */
#qcard img.qasset[data-zoom] { cursor: zoom-in; }
#qcard img.qasset[data-zoom]:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.qasset-wrap.can-zoom { position: relative; }
.zoom-badge { position: absolute; width: 22px; height: 22px; box-sizing: border-box; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #fff; border: 1px solid #c8d3e3; color: var(--accent); box-shadow: 0 1px 3px rgba(20,30,50,.18);
  cursor: zoom-in; user-select: none; -webkit-user-select: none; }
.zoom-badge[hidden] { display: none; }
.zoom-badge svg { display: block; }
/* Above everything on the page, the feedback widget's button included (99999); white, so nothing shows through. */
.picture-zoom { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center;
  padding: 8px; background: #fff; cursor: zoom-out; }
.picture-zoom[hidden] { display: none; }
.picture-zoom:focus { outline: none; }
.picture-zoom-img { display: block; width: 100%; max-width: min(1200px, 100%); height: auto; max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px); object-fit: contain; }
.picture-zoom-close { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: var(--shadow); z-index: 1; }
.picture-zoom-close:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
body.picture-zoom-open { overflow: hidden; }
/* v0.3.19 (d060): "Ideas to revisit" lists each mistake with how often; one put right is greyed. */
.cov-repair-n { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 1px; }
.cov-repair.is-put-right strong { color: var(--ink-soft); font-weight: 600; }
.cov-repair.is-put-right p { display: none; }
/* v0.3.19 (d060): "That did not read as a number", beside the box, in place of a wrong answer. */
.number-again { margin-top: 6px; }
.sel-set-note { margin-top: 6px; padding: 6px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--ink); font-size: 12px; line-height: 1.4; }
/* v0.3.5: no exam shares at all (a family or a copy of this page without them): close the column. */
.left-filters.no-shares { --fq-col: 0px; }
.left-filters.no-shares .fq { visibility: hidden; padding: 0; border: 0; min-width: 0; overflow: hidden; }
/* v0.3.16 (d053; Smith, 8 November, "Jb"): a family's and an idea's share asked, with the share it
   underpins under it in the house orange, stacked in the one column so the names keep their width. */
.fq-pair { display: flex; flex-direction: column; gap: 2px; align-self: center; min-width: 0; }
.fq.fq-reach { border-color: rgba(200, 120, 50, .22); }
.fq-key.is-reach { background: linear-gradient(90deg, #fff, #f0b27a); border-color: rgba(200, 120, 50, .3); }
.sel-key-pair { display: block; margin-top: 2px; }
.sel-key-pair .fq-key { width: 16px; margin-right: 3px; }
.sel-key-pair .fq-key.is-reach { margin-left: 6px; }

/* d048 (v0.3.13): when this browser cannot save the pupil's progress, said once in a line that
   floats over the page (bottom left, clear of the feedback button) and costs the card no height. */
.save-trouble { position: fixed; left: 16px; bottom: 16px; z-index: 45; max-width: min(440px, calc(100vw - 32px)); display: flex; gap: 10px; align-items: flex-start; background: #fff8e6; border: 1px solid #e3c46b; border-radius: 10px; box-shadow: var(--shadow); padding: 9px 12px; font-size: 13px; line-height: 1.4; color: var(--ink); }
.save-trouble[hidden] { display: none; }
.save-trouble-close { flex: 0 0 auto; border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 2px 8px; font: inherit; font-size: 12px; cursor: pointer; }
/* v0.3.14 (d050). C1 (Smith, 4 November, "all 7"): the three route buttons on one row, each with
   its count beneath; the line that described the chosen route is in each button's hover text. */
.left-filters .route-mode-options { flex-wrap: nowrap; gap: 4px; }
.left-filters .route-mode { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 5px 2px 6px; line-height: 1.15; white-space: normal; text-align: center; min-width: 0; }
.left-filters .route-mode .route-mode-n { margin-left: 0; }
/* C3, C5, C7: the key on one line, a legend for the dot, the red badge and the grey number, and
   "Pick several" beneath. */
.sel-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 10px; }
.sel-legend-item { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.sel-legend .sel-legend-dot { background: #9fd3a8; }
.sel-legend .sel-made, .sel-legend .sel-n { margin: 0; }
.sel-legend .sel-multi-on { margin-left: auto; font-size: 10.5px; }

/* d064 (Smith, 25 November): the value of g is a note of its own. At the top of the card it is a box,
   larger than the old chip and in its own colour; beside the question's picture where the drawn picture
   leaves room for it (the engine measures, placeGNote). */
.g-note { font-size: 15px; line-height: 1.45; color: var(--ink); background: #fff5d9; border: 1px solid #ecd28a;
  border-left: 4px solid #d29a00; border-radius: 8px; padding: 7px 12px; margin: 2px 0 10px; }
.g-note strong { font-weight: 700; }
#qcard:has(.qmeta .practice-role-badge) .g-note-top { margin-right: 72px; }
#qcard:has(.qmeta .practice-role-badge) .g-note-top + .qprompt { padding-right: 64px; }
.q-figure-row { display: flex; align-items: flex-start; gap: 18px; }
.q-figure-row > .qasset-wrap { flex: 0 1 auto; min-width: 0; }
.g-note-side { display: none; flex: 0 0 200px; margin-top: 10px; }
#qcard.g-side .g-note-side { display: block; }
#qcard.g-side .g-note-top { display: none; }

/* --- Waves Driller deltas (tools/adopt_mi_page.py, styles 1) ---------------------------
   Kept in one appended block, as Mechanical Intuition kept its own deltas to SHM's sheet. */
/* No exam shares yet (engine edits 6b and 6e): the share column takes no width. */
.left-filters.no-shares { --fq-col: 0px; }
.fq.fq-none { display: block; width: 0; padding: 0; border: 0; }
/* A picture question whose options are pictures: the stimulus gives up some height so
   the prompt, the picture, four options and Next fit one 1280 x 720 screen (brief rule 11). */
#qcard:has(.qoptions-graph) .qasset { max-height: clamp(110px, 19vh, 200px); }
/* A phone: a graph option is as tall as its graph, so a two-up row of wide graphs
   does not leave half of each tile empty. */
@media (max-width: 560px) {
  .qoptions-graph.qoptions-graphs .qopt-thumb { height: auto; }
  .qoptions-graph.qoptions-graphs .qopt-graph { padding: 10px 6px 6px; }
}
/* Wave-topic mobile cards use the screen width for the question rather than wide
   nested gutters. Text remains 17px for prompts and 16px for answers. */
@media (max-width: 560px) {
  body:has(#qcard[data-question-topic]) .app-shell.three-col { padding-left: 8px; padding-right: 8px; }
  #qcard[data-question-topic] { padding: 12px; }
  #qcard[data-question-topic] .qprompt { font-size: 17px; line-height: 1.35; margin-bottom: 8px; }
  #qcard[data-question-topic] .qopt:not(.qopt-graph) { padding: 8px 10px; gap: 8px; line-height: 1.35; }
  #qcard[data-question-topic] .phase-head { margin-top: 10px; margin-bottom: 5px; }
  #qcard[data-question-topic] .qasset-wrap { margin: 7px 0 9px; }
  #qcard[data-question-topic] .choice-instruction { margin: 6px 0; }
  /* Float the small role badge so only the first line gives it space. */
  body.card-unanswered #qcard[data-question-topic] .qmeta:has(.practice-role-badge) { float: right; margin: 0 0 3px 8px; }
  #qcard[data-question-topic] .qmeta .practice-role-badge { position: static; margin: 0; }
  body:has(#qcard[data-question-topic]) #wk-fb-btn { position: static; margin: 0; padding: 6px 10px; font-size: 12px; }
  /* These readings need their full-width scales, including the onset and P. */
  #qcard:is([data-question-id="wv2a_007"], [data-question-id="wv2c_012"], [data-question-id="wv2c_013"], [data-question-id="wv2c_022"]) .qasset {
    width: 100%; max-width: 100%; max-height: 250px; object-fit: contain;
  }
  #qcard:is([data-question-id="wv5c_306"], [data-question-id="wv5c_307"]) .qprompt { font-size: 16px; line-height: 1.3; }
  #qcard:is([data-question-id="wv5c_306"], [data-question-id="wv5c_307"]) .qoptions { gap: 6px; }
  #qcard:is([data-question-id="wv5c_306"], [data-question-id="wv5c_307"]) .qopt { padding-top: 6px; padding-bottom: 6px; }
  #qcard[data-question-id="wv2a_007"] .qoptions { gap: 2px; }
  #qcard[data-question-id="wv2a_007"] .qopt:not(.qopt-graph) { padding-top: 6px; padding-bottom: 6px; }
}
@media (min-width: 561px) and (max-height: 800px) {
  /* Two rows of fully labelled graphs: trim spacing, retain drawing size. */
  #qcard:is([data-question-id="wv2a_027"], [data-question-id="wv4c_029"], [data-question-id="wv4c_043"]) .qoptions-graph { row-gap: 6px; }
  #qcard:is([data-question-id="wv2a_027"], [data-question-id="wv4c_029"], [data-question-id="wv4c_043"]) .qopt-graph { padding-top: 4px; padding-bottom: 4px; }
}

/* Reviewed C.3 cards: preserve readable diagram labels at phone widths. */
@media (max-width: 560px) {
  #qcard[data-question-topic="C.3"] .qoptions-graph { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 8px; }
  #qcard[data-question-topic="C.3"] .qopt-graph { padding: 6px; }
  #qcard[data-question-topic="C.3"] .qopt-thumb { height: auto; }
  #qcard:is([data-question-id="wv3a_007"], [data-question-id="wv3a_023"], [data-question-id="wv3a_029"], [data-question-id="wv3a_031"], [data-question-id="wv3b_004"], [data-question-id="wv3b_006"], [data-question-id="wv3b_043"], [data-question-id="wv3c_023"], [data-question-id="wv3c_041"]) .qasset-wrap { width: 100%; flex-basis: 100%; }
  #qcard:is([data-question-id="wv3a_007"], [data-question-id="wv3a_023"], [data-question-id="wv3a_029"], [data-question-id="wv3a_031"], [data-question-id="wv3b_004"], [data-question-id="wv3b_006"], [data-question-id="wv3b_043"], [data-question-id="wv3c_023"], [data-question-id="wv3c_041"]) .qasset { width: 100%; height: auto; max-width: 100%; max-height: 320px; }
  #qcard:is([data-question-id="wv3c_039"], [data-question-id="wv3c_042"]) .qoptions-graph { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
  #qcard:is([data-question-id="wv3c_039"], [data-question-id="wv3c_042"]) .qopt-graph { padding: 4px 6px; }
  #qcard:is([data-question-id="wv3a_007"], [data-question-id="wv3a_023"]) .qasset { max-height: 230px; }
  #qcard:is([data-question-id="wv3a_029"], [data-question-id="wv3a_031"]) .qasset { max-height: 260px; }
}

/* Display navigation: neutral wrappers over existing type-ID selections. */
.left-filters { min-width: 0; }
.left-filters .sel-chip-named { min-width: 0; }
.left-filters .sel-chip-text { white-space: normal; overflow-wrap: anywhere; }
/* v0.7.0 (q016 (b)): open, in Fields' dense style: small type, tight rows, no folds. */
.physics-browse { margin: 14px 0 6px; border-top: 1px solid var(--line); padding-top: 8px; }
.physics-browse-head { color: var(--ink); font-weight: 650; font-size: 13px; }
.physics-browse-note { margin: 2px 0 4px; color: var(--ink-soft); font-size: 11px; line-height: 1.35; }
.physics-nav-topic { margin: 10px 0 3px; border-bottom: 1px solid var(--line); padding-bottom: 3px; font-size: 12px; font-weight: 650; color: var(--ink-soft); }
.physics-nav-cluster { margin-top: 5px; }
.physics-nav-subcluster { margin: 1px 0 2px 8px; border-left: 1px solid var(--line); padding-left: 5px; }
.physics-nav-pick { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; min-height: 24px; background: transparent; border: 1px solid transparent; border-radius: 3px; padding: 2px 4px; margin: 0; font: inherit; font-size: 11px; line-height: 1.3; color: var(--ink); text-align: left; cursor: pointer; }
.physics-nav-pick > span { min-width: 0; overflow-wrap: break-word; }
.physics-nav-pick > small { flex: 0 0 auto; color: var(--ink-soft); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.physics-nav-pick.physics-nav-group { font-weight: 650; font-size: 11.5px; }
.physics-nav-pick.physics-nav-subgroup { font-weight: 600; color: var(--ink-soft); }
.physics-nav-pick:hover, .physics-nav-pick:focus-visible { border-color: var(--accent); outline: 2px solid transparent; background: var(--accent-soft); }
.physics-nav-pick.is-on { border-color: var(--accent); background: var(--accent-soft); }

/* v0.8.0 (d051): the data booklet menu in the header (the school's four Drive copies). It opens
   over the page, so it never pushes the card down. */
.booklet-menu { position: relative; }
.booklet-menu > summary { list-style: none; cursor: pointer; font-size: 13px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.booklet-menu > summary::-webkit-details-marker { display: none; }
.booklet-menu[open] > summary { color: var(--ink); border-color: var(--accent); }
.booklet-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 2147483600; width: min(300px, 86vw); background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 8px 10px; display: grid; gap: 4px; }
.booklet-panel a { display: block; padding: 6px 4px; color: var(--accent); font-weight: 600; text-decoration: none; }
.booklet-panel a:hover, .booklet-panel a:focus-visible { text-decoration: underline; }
.booklet-panel p { margin: 4px 0 0; font-size: 12px; line-height: 1.4; color: var(--ink-soft); }
/* v0.8.0 (d051; q021 (a)): C.2's redrawn pictures shown larger. The donor's general picture size
   (body.pictures-large, its d057: the card's width up to 640 px, no taller than 58% of the screen,
   above the data, except where the options are pictures), scoped here to C.2's questions, so C.3 to C.5
   keep their size until they are redrawn. Above a list of choices it stops at 36% of the screen's height,
   and at 26% above five or more, so the prompt, the picture, every choice, the verdict and Next still fit
   one screen at 1280 x 720 and 1024 x 768 (DRILLER_KIT section 3; tools/verify_layout.cjs). A tap still
   opens a picture across the screen (the donor's v0.3.18). */
#qcard[data-question-topic="C.2"]:not(:has(.qoptions-graph)) .qasset-wrap:not(.qasset-reading) .qasset { width: auto; height: auto; max-width: min(640px, 100%); max-height: min(560px, 58vh); }
#qcard[data-question-topic="C.2"]:not(:has(.qoptions-graph)) .qstim-row { flex-direction: column; align-items: stretch; }
#qcard[data-question-topic="C.2"]:not(:has(.qoptions-graph)) .qstim-row .qasset-wrap { flex: 1 1 auto; }
#qcard[data-question-topic="C.2"]:not(:has(.qoptions-graph)):has(.qopt) .qasset-wrap:not(.qasset-reading) .qasset { max-height: min(560px, 36vh); }
#qcard[data-question-topic="C.2"]:not(:has(.qoptions-graph)):has(.qopt:nth-child(5)) .qasset-wrap:not(.qasset-reading) .qasset { max-height: min(560px, 26vh); }
/* Above C.2's picture options the stimulus keeps the page's 19% of the screen's height, so the options stay
   on the screen; it is drawn wide and low at larger type instead (tools/render_exam_c2.py). */
/* On a phone the header's action row already holds the answer ticks, the sign-in pill and Feedback,
   so the menu sits in the header's top corner, beside the brand, and adds no row (one-screen rule). */
@media (max-width: 760px) {
  .app-header { position: relative; }
  .booklet-menu { position: absolute; top: 8px; right: 10px; }
  .booklet-menu > summary { font-size: 12px; padding: 3px 9px; }
}

/* Waves v0.8.2 (d053): the card that says a choice has been answered right (tools/waves_pick_done.py). */
.waves-pick-done strong { display: block; margin-bottom: 6px; }
.waves-pick-done-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.waves-pick-done-actions .waves-pick-keep { background: #fff; color: #1f3f78; border: 1px solid #b9c3d4; }
.waves-pick-done-actions .waves-pick-keep:hover { background: #eef2f9; }
