/* 初中章末测验（PY-270）。颜色只用 site.css 的主题变量，深浅色跟随 learning-shell。 */
.cq-page { max-width: 820px; margin: 0 auto; }
.cq-intro, .cq-note, .cq-warn { color: var(--muted); line-height: 1.7; }
.cq-warn { color: var(--no); }
.cq-form { display: grid; gap: 16px; margin-top: 12px; }
.cq-item { border: 1px solid var(--line); border-radius: var(--radius, 12px); background: var(--card); padding: 14px 16px; margin: 0; min-width: 0; }
.cq-prompt { float: left; width: 100%; margin-bottom: 4px; padding: 0; line-height: 1.7; font-size: 1rem; overflow-wrap: anywhere; }
.cq-prompt + * { clear: both; }
.cq-no { font-weight: 700; margin-right: 6px; }
.cq-tier { display: inline-block; font-size: .875rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; margin-right: 8px; }
.cq-opt { display: flex; align-items: flex-start; gap: 8px; min-height: 44px; padding: 8px 10px; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; overflow-wrap: anywhere; }
.cq-opt input { margin-top: 5px; width: 18px; height: 18px; flex: none; }
.cq-opt:focus-within { outline: 3px solid var(--a); outline-offset: 2px; }
.cq-key { font-weight: 700; flex: none; }
.cq-opt.is-answer { border-color: var(--ok, #2f7d4a); background: var(--ok-soft); }
.cq-opt.is-wrong { border-color: var(--no); background: var(--no-soft); }
.cq-result { margin-top: 10px; line-height: 1.7; }
.cq-verdict { font-weight: 700; margin: 4px 0; }
.cq-verdict.is-wrong { color: var(--no); }
.cq-feedback, .cq-answer { margin: 4px 0; }
.cq-reasoning { margin: 6px 0 0; padding-left: 1.4em; }
.cq-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cq-submit, .cq-again { min-height: 44px; padding: 0 20px; border-radius: 10px; border: 1px solid var(--a); background: var(--a); color: var(--bg); font-size: 1rem; cursor: pointer; }
.cq-again { background: transparent; color: var(--fg); }
.cq-submit:focus-visible, .cq-again:focus-visible, .cq-report a:focus-visible { outline: 3px solid var(--a); outline-offset: 3px; }
.cq-count { margin: 0; color: var(--muted); }
.cq-status { min-height: 1.5em; color: var(--muted); }
.cq-report { border: 1px solid var(--a); border-radius: var(--radius, 12px); padding: 12px 16px; margin-bottom: 16px; background: var(--card); }
.cq-report h2 { margin: 0 0 6px; font-size: 1.25rem; }
.cq-report p { margin: 4px 0; }
.cq-report a { display: inline-block; min-height: 44px; line-height: 44px; }
.cq-score, .cq-first { font-size: 1.125rem; font-weight: 700; }
.cq-item.cq-target { border: 3px solid var(--a); scroll-margin-top: 100px; }
.cq-item.cq-target:focus { outline: 3px solid var(--fg); outline-offset: 4px; }
.cq-target-note { clear: both; font-weight: 700; line-height: 1.7; }
.cq-target-back, .cq-target-start { min-height: 44px; padding: 8px 16px; font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--a); border-radius: 10px; cursor: pointer; }
.cq-target-back:focus-visible, .cq-target-start:focus-visible { outline: 3px solid var(--a); outline-offset: 3px; }
.cq-target-result { border: 2px solid var(--a); border-radius: 10px; padding: 12px 16px; background: var(--card); line-height: 1.7; }
.cq-target-result:focus { outline: 3px solid var(--fg); outline-offset: 3px; }
@media print {
  .cq-actions, .cq-status { display: none; }
  .cq-item { break-inside: avoid; }
}

/* 小学单元测评：文字输入后才可揭示标准答案，自评不混入自动成绩。 */
.cq-fill { display: block; width: 100%; box-sizing: border-box; min-height: 88px; font: inherit; font-size: 17px; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; resize: vertical; }
.cq-reveal { min-height: 44px; margin-top: 8px; padding: 8px 16px; font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--a); border-radius: 8px; cursor: pointer; }
body[data-stage="primary"] .cq-page { font-size: 17px; }
body[data-stage="primary"] .cq-tier { font-size: 14px; }
body[data-stage="primary"] .cq-prompt { font-size: 17px; }
.unit-assessment-entry { padding: 16px; font-size: 17px; }

.cq-fr { display: inline-flex; flex-direction: column; align-items: stretch; vertical-align: middle; line-height: 1.2; margin: 0 .15em; text-align: center; font-variant-numeric: tabular-nums; }
.cq-numerator { border-bottom: 1px solid currentColor; padding: 0 .15em; }
.cq-denominator { padding: 0 .15em; }
