/* DP-91: compact, keyboard-accessible stages within the existing review dialog. */
.rv-staged.course-ov-sec { margin-top: 0; padding-top: 0; border-top: 0; }
.rv-staged h3 { margin: 8px 0; font-size: 1rem; }
.rv-staged .rv-field { padding: 7px 0; gap: 12px; justify-content: flex-start; }
.rv-staged .rv-field > span:first-child { flex: 0 0 116px; }
.rv-staged .rv-field .rv-choices { flex: 1 1 auto; justify-content: flex-start; min-width: 0; }
.rv-staged .rv-status:empty { display: none; }
#review-overlay:has(.rv-staged) .modal-header { margin-bottom: 12px; }
#review-overlay:has(.rv-staged) .modal-actions { margin-top: 12px; padding-top: 10px; }
.rv-staged .rv-choices { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.rv-staged .rv-choices label { display: inline-flex; align-items: center; gap: 3px; min-height: 32px; padding: 3px 7px; border: 1px solid var(--border); border-radius: var(--radius-md); cursor: pointer; }
.rv-staged .rv-choices label:has(input:checked), .rv-staged button[aria-pressed="true"] { background: var(--accent-bg, #eaf1ff); border-color: var(--accent, #2563eb); }
.rv-staged .rv-choices label:focus-within { outline: 2px solid var(--accent, #2563eb); outline-offset: 2px; }
.rv-staged input[type="radio"], .rv-staged input[type="checkbox"] { accent-color: var(--accent, #2563eb); }
.rv-staged select { max-width: 100%; min-height: 36px; }
.rv-stage-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.rv-staged .rv-draft { margin-top: 10px; }
.rv-staged button { min-height: 34px; }
.rv-staged .rv-private-save { margin: 10px 0; }
.rv-staged .rv-check { display: flex; align-items: center; gap: 7px; margin-top: 10px; }
/* The semester box closes the course stage as its own row, clear of the text box. */
.rv-staged .rv-term-share { gap: 9px; margin-top: 16px; padding: 12px 2px 6px; border-top: 1px solid var(--border-light); }
/* Room for the written response: a wider dialog, and the scroll area keeps the
   box off its scrollbar. */
#review-overlay > .modal { max-width: 720px; }
#review-overlay .course-ov-body { padding-right: 10px; scrollbar-gutter: stable; }
.rv-saved-grade { margin: 10px 0; }
@media (max-width: 560px) {
  .rv-staged .rv-field { display: flex; flex-direction: column; align-items: flex-start; }
  .rv-staged .rv-field > span:first-child { flex: none; }
  .rv-staged .rv-choices label, .rv-staged button { min-height: 38px; }
}

/* Optional written responses stay readable on narrow screens. */
/* Label above, full-width box, live count under its right edge. */
.rv-staged .rv-field.rv-response { display: block; padding: 10px 0 0; }
.rv-response label { display: block; margin-bottom: 6px; color: var(--text-secondary); }
.rv-count { margin-top: 4px; text-align: right; font-size: 12px; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.rv-count.is-over { color: var(--danger-text); font-weight: 600; }
/* A set, generous size, not a drag handle: long text scrolls inside the box. */
.rv-field textarea { display:block; width:100%; box-sizing:border-box; height:12rem; padding:.75rem .85rem; resize:none; font:inherit; line-height:1.5; color:inherit; background:var(--bg,#fff); border:1px solid var(--border,#ccc); border-radius:.4rem; }
/* Owner 2026-10-19: the box fills the column, so the shared 4px ring stuck out past the
   other fields and was clipped by the scrolling form. Its focus ring is drawn inside. */
.rv-field textarea:focus-visible { border-color:var(--rice-blue-bright); box-shadow:inset 0 0 0 1px var(--rice-blue-bright); }
@media (max-width: 560px) { .rv-field textarea { height:10rem; } }
.rv-text p { white-space:pre-wrap; overflow-wrap:anywhere; }
