/* reports.css — Reports page styles */

/* ══════════════════════════════════════════════════════════════
   REPORTS PAGE — Styles specific to reports
   ══════════════════════════════════════════════════════════════ */

/* ── Report Toolbar — Apple-style, matches other pages ────── */
.page-main.page-reports {
  overflow-y: auto !important;
}
.report-toolbar input[type='text'] {
  font-family: var(--font-base);
  font-size: var(--text-base);
  padding: 5px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--overlay-hover);
  color: var(--text);
  outline: none;
  width: 220px;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
}
.report-toolbar input[type='text']:focus {
  background: var(--surface);
  border-color: var(--active);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12);
}

/* Multi-select student picker */
.student-picker {
  position: relative;
  display: inline-block;
}
.student-picker-btn {
  height: var(--control-h);
  font-family: var(--font-base);
  font-size: var(--text-sm);
  font-weight: 600;
  /* Grey like the Report picker and the other bars' buttons, with the same
     chevron. A fixed width, so a longer label never moves the bar. */
  background: rgba(118, 118, 128, 0.12) var(--select-chevron) no-repeat right 10px center;
  border: 0;
  border-radius: 8px;
  padding: 0 30px 0 12px;
  cursor: pointer;
  color: var(--text);
  width: 168px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  display: flex;
  align-items: center;
  transition: background-color 0.15s;
}
.student-picker-btn:hover {
  background-color: rgba(118, 118, 128, 0.2);
}
.student-picker-btn:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 2px;
}
.student-picker-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  z-index: 100;
  min-width: 240px;
  max-height: 360px;
  overflow-y: auto;
}
.student-picker-dropdown.open {
  display: block;
}
.student-picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: var(--text-md);
  transition: background 0.08s;
  border-bottom: 1px solid var(--overlay-hover);
}
.student-picker-item:hover {
  background: rgba(0, 122, 255, 0.05);
}
.student-picker-item.checked {
  background: rgba(26, 26, 46, 0.05);
}
.student-picker-check {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  color: #fff;
  flex-shrink: 0;
  transition:
    background-color 0.1s,
    border-color 0.1s;
}
.student-picker-item.checked .student-picker-check {
  background: var(--text);
  border-color: var(--text);
}
.student-picker-actions {
  display: flex;
  gap: 6px;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  background: var(--surface);
}
.student-picker-action {
  font-family: var(--font-base);
  font-size: var(--text-xs);
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
  color: var(--text-2);
  transition:
    border-color 0.1s,
    color 0.1s;
}
.student-picker-action:hover {
  border-color: var(--active);
  color: var(--text);
}
/* ── Student Progress Report ─────────────────────────────────── */
/* Letterhead: school, class and block over the student's name on the left;
   the report, its dates, the teacher and the student number on the right. */
.report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--text);
}
.report-header-main {
  min-width: 0;
}
.report-course-title {
  font-family: var(--font-base);
  font-size: var(--text-sm);
  color: var(--text-2);
  margin-bottom: 4px;
}
.report-student-name {
  font-family: var(--font-base);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.report-header-meta {
  flex-shrink: 0;
  text-align: right;
  font-family: var(--font-base);
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.5;
}
.report-period {
  font-weight: 600;
  color: var(--text);
}

/* The level as four dots before its word. Inherits the word's colour on
   screen; black in print. */
.report-dots {
  display: inline-block;
  margin-right: 5px;
  font-size: 0.8em;
  letter-spacing: 0.1em;
  vertical-align: 1px;
}

/* ── Overall bar ─────────────────────────────────────────────── */
.report-overall {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.report-overall-main {
  flex: 0 0 200px;
  padding: 18px 22px;
  background: var(--text);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.report-overall-label {
  font-family: var(--font-base);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 3px;
}
.report-overall-word {
  font-family: var(--font-base);
  font-size: var(--text-2xl);
  font-weight: 700;
}
.report-overall-sections {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
}
.report-section-chip {
  flex: 1 1 130px;
  padding: 14px 16px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  min-width: 110px;
}
.report-section-chip:last-child {
  border-right: none;
}
.report-section-chip-name {
  font-family: var(--font-base);
  font-size: var(--text-sm);
  color: var(--text-3);
  margin-bottom: 3px;
}
.report-section-chip-value {
  font-family: var(--font-base);
  font-size: var(--text-lg);
  font-weight: 600;
}

/* ── Proficiency Legend ───────────────────────────────────────── */
.report-legend {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}
.report-legend-item {
  flex: 1;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-right: 1px solid var(--border);
  font-size: var(--text-base);
  line-height: 1.35;
}
.report-legend-item:last-child {
  border-right: none;
}
.report-legend-word {
  font-family: var(--font-base);
  font-size: var(--text-sm);
  font-weight: 700;
}
.report-legend-desc {
  font-size: var(--text-sm);
  color: var(--text-3);
  line-height: 1.3;
}

/* ── Parent / Guardian Response ──────────────────────────────── */
.report-parent-response {
  page-break-inside: avoid;
  margin-bottom: 14px;
}
.report-parent-lines {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
}
.report-parent-line {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex: 1;
}
.report-parent-label {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}
.report-parent-field {
  flex: 1;
  border-bottom: 1.5px solid var(--text-3);
  min-height: 24px;
}
.report-parent-checks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0;
}
.report-parent-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-md);
  color: var(--text);
  line-height: 1.4;
}
.report-parent-checkbox {
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--text-3);
  border-radius: var(--radius-xs);
  flex-shrink: 0;
}
/* The slip's options (One Report, Nov 27): a dashed cut line over it, and
   the student's name beside its heading. */
.report-parent-cut {
  position: relative;
  border-top: 1.5px dashed var(--text-3);
  margin: 6px 0 14px;
}
.report-parent-cut-mark {
  position: absolute;
  left: 8px;
  top: -0.72em;
  padding: 0 4px;
  background: #fff;
  font-size: var(--text-md);
  line-height: 1;
  color: var(--text-2);
}
.report-parent-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.report-parent-head .report-block-title {
  flex: 1 1 auto;
}
.report-parent-who {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

/* ── Student Self-Reflection blocks ─────────────────────────── */
.report-reflect-bubble {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--text-3);
  border-radius: 50%;
  flex-shrink: 0;
}
.report-reflect-open {
  margin-top: 6px;
}
.report-reflect-open-line {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}
.report-reflect-open-label {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.report-reflect-open-field {
  flex: 1;
  border-bottom: 1.5px solid var(--border);
  min-height: 20px;
}

/* Habits block — rating rows */
.report-habits-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}
.report-habits-table th {
  font-family: var(--font-base);
  font-size: var(--text-xs);
  color: var(--text-3);
  padding: 6px 4px;
  text-align: center;
  border-bottom: 1.5px solid var(--border);
}
.report-habits-table th:first-child {
  text-align: left;
  width: 55%;
}
.report-habits-table td {
  padding: 9px 4px;
  border-bottom: 1px solid var(--overlay-hover);
  font-size: var(--text-base);
  color: var(--text);
  text-align: center;
}
.report-habits-table td:first-child {
  text-align: left;
}
.report-habits-bubble {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--text-3);
  border-radius: 50%;
  display: inline-block;
}
.report-habits-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
  margin-bottom: 14px;
}

/* ── Learning Outcomes — redesigned ─────────────────────────── */
.report-outcome-section {
  margin-bottom: 16px;
  page-break-inside: avoid;
}
.report-outcome-section-header {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-2);
  padding-bottom: 5px;
  margin-bottom: 2px;
  border-bottom: 1.5px solid var(--border);
}
.report-outcome-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--overlay-hover);
}
.report-outcome-row:last-child {
  border-bottom: none;
}
.report-outcome-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.report-outcome-label {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text);
}
.report-outcome-statement {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.35;
  margin-top: 1px;
}
.report-ican-list {
  margin: 4px 0 0 0;
  padding: 0 0 0 16px;
  list-style: none;
}
.report-ican-item {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.4;
  padding: 2px 0;
  position: relative;
  padding-left: 12px;
}
.report-ican-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-3);
}
.report-outcome-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.report-outcome-bar {
  width: 48px;
  height: 6px;
  border-radius: var(--radius-xs);
  background: var(--divider-subtle);
  overflow: hidden;
}
.report-outcome-bar-fill {
  height: 100%;
  border-radius: var(--radius-xs);
}
.report-outcome-pill {
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
}
.report-outcome-evidence {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text-3);
  display: flex;
  flex-wrap: wrap;
  gap: 2px 0;
  margin-top: 3px;
  line-height: 1.6;
  max-width: 75%;
}
.report-outcome-ev {
  white-space: nowrap;
}

/* ── Next Steps ──────────────────────────────────────────────── */
.report-next-steps {
  background: var(--report-callout-bg);
  border: 1px solid var(--report-callout-border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 24px 0;
}
.report-next-step-item {
  font-size: var(--text-md);
  color: var(--text);
  padding: 5px 0;
  display: flex;
  gap: 10px;
  line-height: 1.5;
}
.report-next-step-bullet {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: var(--text-sm);
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

/* ── Learner Profile (Observations) ─────────────────────────── */
.report-learner-profile {
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.report-learner-title {
  font-family: var(--font-base);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-2);
  padding: 12px 18px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.report-obs-notes {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
}
.report-obs-note {
  font-size: var(--text-md);
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 6px;
  padding-left: 10px;
  border-left: 3px solid var(--border);
}
.report-obs-note-date {
  font-family: var(--font-base);
  font-size: var(--text-xs);
  color: var(--text-3);
}

/* ── Report block containers ── */
.report-block-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 14px;
  background: var(--surface);
}
.report-block-title {
  font-family: var(--font-base);
  font-size: var(--text-xs);
  color: var(--text-3);
  font-weight: 600;
  margin-bottom: 8px;
}

/* ══════════════════════════════════════════════════════════════
   REPORT BUILDER — Panel + preview layout
   ══════════════════════════════════════════════════════════════ */

.rb-preview {
  flex: 1;
  padding: 20px 28px;
  overflow-y: auto;
}

/* ══════════════════════════════════════════════════════════════
   PRINT STYLES — Letter, double-sided, B&W optimised
   ══════════════════════════════════════════════════════════════ */
@media print {
  /* Equal margins: reports are stapled or loose, not bound, so there is no
     inside edge to favour. 0.5in all round gives the content 7.5in. */
  @page {
    size: letter;
    margin: 0.5in;
  }
  body {
    background: #fff !important;
    padding: 0 !important;
    font-size: 9.5pt !important;
    color: #000 !important;
    line-height: 1.4 !important;
  }
  #app-dock,
  #gb-sidebar,
  #sidebar-mount,
  .no-print,
  .page-layout > aside,
  .report-toolbar {
    display: none !important;
  }
  /* Print the report as flowing pages, not a snapshot of the app shell.
     Every wrapper between <body> and the report is a fixed-height flex box
     or scroll container on screen; left alone, the printout keeps the
     scrollbar, clips the right edge and cannot paginate cleanly. */
  html,
  body {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  .page-layout,
  .u-flex-col-fill,
  .page-main,
  .page-main.page-reports,
  #report-output {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  .page-main {
    padding: 0 !important;
  }
  #report-output {
    overflow: visible !important;
    height: auto !important;
  }
  .rb-preview {
    padding: 0 !important;
    max-width: none !important;
    overflow: visible !important;
  }

  /* ── Print density — compact everything ── */
  .report-header {
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
  }
  .report-student-name {
    font-size: var(--text-2xl) !important;
  }
  .report-header-meta {
    font-size: var(--text-xs) !important;
    line-height: 1.45 !important;
  }
  .report-course-title {
    font-size: var(--text-xs) !important;
  }
  .report-overall {
    margin-bottom: 12px !important;
  }
  .report-overall-main {
    padding: 10px 14px !important;
    flex: 0 0 150px !important;
  }
  .report-overall-word {
    font-size: var(--text-xl) !important;
  }
  .report-overall-label {
    font-size: var(--text-xs) !important;
  }
  .report-section-chip {
    padding: 8px 10px !important;
  }
  .report-section-chip-name {
    font-size: var(--text-2xs) !important;
  }
  .report-section-chip-value {
    font-size: var(--text-base) !important;
  }
  .report-block-box {
    padding: 10px 14px !important;
    margin-bottom: 10px !important;
  }
  .report-block-title {
    font-size: var(--text-2xs) !important;
    margin-bottom: 4px !important;
  }
  .report-learner-profile {
    margin-bottom: 10px !important;
  }
  .report-learner-title {
    font-size: var(--text-sm) !important;
    padding: 6px 14px !important;
  }
  .report-section-chart > div[style*='margin-top:12px'] {
    margin-top: 7px !important;
    padding-top: 6px !important;
  }
  .report-next-steps {
    margin-bottom: 10px !important;
  }
  .report-legend {
    margin-bottom: 10px !important;
  }
  .report-legend-word {
    font-size: var(--text-sm) !important;
  }
  .report-legend-desc {
    font-size: var(--text-xs) !important;
  }

  /* Short blocks stay whole; the section breakdown can run longer than a
     page, so it breaks between sections (each section row keeps itself
     together) instead of leaving the first page half empty. */
  .report-block-box {
    page-break-inside: avoid !important;
    border-color: #bbb !important;
  }
  .report-block-box.report-section-chart {
    page-break-inside: auto !important;
  }
  .report-block-title {
    page-break-after: avoid !important;
  }
  /* Next Steps may break between its items. Kept whole it was the block
     that landed alone on a third page. Each item stays together. */
  .report-next-steps {
    page-break-inside: auto !important;
  }
  .report-next-step-item {
    page-break-inside: avoid;
  }
  .report-overall {
    page-break-inside: avoid !important;
  }

  /* ══════════════════════════════════════════════════════════════
     PRINT: BLACK AND WHITE
     Reports are photocopied. A level is its dots and its word; colour
     never carries the meaning on paper. Fills print only where the fill
     is the information (the overall box, bars, numbered bullets).
     ══════════════════════════════════════════════════════════════ */
  [data-prof],
  .report-section-chip-name,
  .report-outcome-ev,
  .report-legend-word {
    color: #000 !important;
  }
  [data-prof-bg] {
    background: transparent !important;
  }
  .report-level-pill {
    border: 1px solid #000 !important;
    border-radius: 4px !important;
  }
  .report-overall-main {
    background: #000 !important;
    color: #fff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .report-overall-label {
    color: #ddd !important;
  }
  .report-outcome-bar-fill,
  .report-next-step-bullet,
  [data-prof-bg][style*='height:100%'] {
    background: #000 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .report-outcome-bar {
    background: #e2e2e2 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .report-next-steps {
    background: #fff !important;
    border-color: #bbb !important;
  }
  [data-prof-stroke='1'] {
    stroke: #1a1a1a !important;
  }
  [data-prof-stroke='2'] {
    stroke: #595959 !important;
  }
  [data-prof-stroke='3'] {
    stroke: #8f8f8f !important;
  }
  [data-prof-stroke='4'] {
    stroke: #c8c8c8 !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   SHEETS — the Report Card form (report-sheets.js)
   A sheet is a Letter or Legal page drawn at its real size, on screen
   and on paper, with its own 0.5in padding. Everything inside it uses
   the print sizes, so what the teacher sees is what the copier gets.
   ══════════════════════════════════════════════════════════════ */
.rb-preview.report-sheets-on {
  --sheet-zoom: 1;
  background: var(--bg);
}
.sheet-zoom {
  zoom: var(--sheet-zoom);
  width: 8.5in;
  margin: 0 auto 22px;
}
.sheet-label {
  font-family: var(--font-base);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  margin: 0 0 6px 2px;
}
.report-sheet {
  /* Paper stays paper in both themes: the theme tokens the blocks read are
     set to their light values on the sheet itself, so a dark-mode screen
     shows (and prints) the same black on white. */
  --bg: #f5f5f7;
  --bg-secondary: #ececf0;
  --surface: #ffffff;
  --surface-2: #e5e5ea;
  --border: #d1d1d6;
  --border-2: #c7c7cc;
  --text: #1d1d1f;
  --text-2: #636366;
  --text-3: #58585d;
  --divider-subtle: rgba(0, 0, 0, 0.06);
  --divider-medium: rgba(0, 0, 0, 0.09);
  --divider-strong: rgba(0, 0, 0, 0.12);
  --score-0: #bbb;
  --score-1: #d32f2f;
  --score-2: #c07a00;
  --score-3: #2e7d32;
  --score-4: #1565c0;
  --report-block-bg: #f5f3ef;
  --report-callout-bg: #fef9f0;
  --report-callout-border: #e8d5a8;
  color-scheme: light;
  /* The print sizes, on the sheet itself, so a sheet measures the same
     wherever it is rendered (the preview, or a stage on <body>). */
  --text-2xs: 0.625rem;
  --text-xs: 0.6875rem;
  --text-sm: 0.75rem;
  --text-base: 0.8125rem;
  --text-md: 0.875rem;
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 8.5in;
  height: 11in;
  /* The letterhead sits near the top; the content column is 720px wide. */
  padding: 24px 48px 36px;
  background: #fff;
  color: #000;
  font-size: 9.5pt;
  line-height: 1.4;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
.report-sheet[data-paper='legal'] {
  height: 14in;
}
.report-sheet-measure {
  box-shadow: none;
}
/* The side: a stack of rows 12px apart; the pinned row docks to the
   bottom; the room left stays at the bottom. */
.sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}
.sheet-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  flex: 0 0 auto;
}
.sheet-item {
  display: flow-root;
}
.sheet-pinned {
  flex: 0 0 auto;
  margin-top: auto;
}
/* The line naming the student at the top of every side after the Front. */
.sheet-name-line {
  flex: 0 0 auto;
  font-family: var(--font-base);
  font-size: var(--text-xs);
  color: #000;
}
.sheet-blank {
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: #888;
  font-size: 8pt;
}
.sheet-overflow {
  outline: 2px solid var(--score-2);
}
.report-ruled {
  position: relative;
  overflow: hidden;
  margin-top: 6px;
}
/* Its lines (report-sheets.js RULED_LINES): borders, so they print; a
   layer, so they take no room. */
.report-ruled-lines {
  position: absolute;
  inset: 0;
}
.report-ruled-lines > .report-line {
  height: 22px;
  box-sizing: border-box;
  border-bottom: 1px solid #bbb;
}
/* A copy issued before Nov 25 saved its boxes with no lines in them:
   ReportSheets.ruleOldCopy puts them in before it is shown again. */
.report-ct {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.report-ct th {
  text-align: left;
  font-weight: 600;
  font-size: var(--text-2xs);
  color: var(--text-2);
  border-bottom: 1px solid #000;
  padding: 3px 4px;
}
.report-ct td {
  padding: 4px 4px;
  border-bottom: 1px solid #e3e6ea;
  vertical-align: top;
}
.report-ct .report-ct-name {
  font-weight: 500;
}
.report-ct .report-ct-level {
  white-space: nowrap;
  font-weight: 600;
}
.report-ct .report-ct-evidence,
.report-ct th.report-ct-evidence {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.report-ct-group td {
  background: #f1f3f5;
  font-weight: 600;
  font-size: var(--text-2xs);
  color: #333;
  padding: 3px 4px;
}
.report-ct-none {
  color: var(--text-3);
  font-weight: 400;
  font-style: italic;
}
.report-ct-pct {
  font-weight: 400;
  color: var(--text-2);
}
.report-ct-legend {
  margin-top: 6px;
  font-size: var(--text-2xs);
  color: #333;
}
@media print {
  .sheet-zoom {
    zoom: 1 !important;
    width: auto !important;
    margin: 0 !important;
  }
  .sheet-label,
  .sheet-student-head {
    display: none !important;
  }
  /* The blank back of a duplex sheet prints empty; the note is a screen hint. */
  .sheet-blank {
    visibility: hidden !important;
  }
  .rb-preview.report-sheets-on {
    background: #fff !important;
    display: block !important;
  }
  .report-fitmap .sheet-zoom {
    zoom: 1 !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
  }
  .report-fitmap .sheet-zoom > .report-sheet {
    transform: none !important;
  }
  .report-fitmap .sheet-student {
    width: auto !important;
    padding: 0 !important;
  }
  .report-fitmap .sheet-zoom .report-sheet {
    outline: none !important;
  }
  .report-sheet {
    box-shadow: none !important;
    page-break-after: always;
    break-after: page;
  }
  .sheet-zoom:last-child .report-sheet {
    page-break-after: auto;
    break-after: auto;
  }
  .sheet-overflow {
    outline: none !important;
  }
}

/* A student's sheets, with a head and a note on screen. */
.sheet-student {
  display: block;
}
.sheet-student-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  width: 8.5in;
  max-width: 100%;
  margin: 0 auto 6px;
  font-family: var(--font-base);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
}
.sheet-badge,
.student-row-sheets {
  display: inline-block;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 4px;
  padding: 1px 6px;
  white-space: nowrap;
}
.sheet-badge.ok,
.student-row-sheets.ok {
  background: rgba(21, 128, 61, 0.12);
  color: var(--score-3);
}
.sheet-badge.over,
.student-row-sheets.over {
  background: rgba(180, 83, 9, 0.14);
  color: var(--score-2);
}
.sheet-badge.none,
.student-row-sheets.none {
  background: var(--divider-subtle);
  color: var(--text-3);
}

/* Fit Map: every student's sheets at a glance. A CSS mode on the same
   render, so the thumbnails are the real sheets. */
.rb-preview.report-fitmap {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-content: flex-start;
}
.report-fitmap .sheet-student {
  width: 232px;
  cursor: pointer;
  border-radius: 8px;
  padding: 6px;
}
.report-fitmap .sheet-student:hover {
  background: var(--overlay-hover);
}
.report-fitmap .sheet-student-head {
  width: auto;
  margin: 0 0 6px;
  font-size: var(--text-sm);
}
.report-fitmap .sheet-label {
  display: none;
}
/* A transform, not zoom: zoom re-lays the page out at 13% and rounds every
   line box, so a thumbnail could grow past what the engine measured. */
.report-fitmap .sheet-zoom {
  display: inline-block;
  position: relative;
  width: calc(8.5in * 0.13);
  height: calc(11in * 0.13);
  margin: 0 20px 0 0;
  vertical-align: top;
  overflow: visible;
}
.report-fitmap .sheet-zoom:has(.report-sheet[data-paper='legal']) {
  height: calc(14in * 0.13);
}
.report-fitmap .sheet-zoom > .report-sheet {
  transform: scale(0.13);
  transform-origin: top left;
}
.report-fitmap .sheet-student:not([data-sheets='1']) .sheet-zoom:nth-child(n + 4) .report-sheet {
  outline: 16px solid var(--score-2);
}
.report-fitmap .sheet-zoom .report-sheet {
  box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.12);
}
.tb-toggle-btn.active {
  background: rgba(10, 108, 255, 0.1);
  color: var(--active);
  border-color: var(--active);
}

/* Spacing inside a sheet. The back holds the dispositions and the Parent /
   Guardian Response together; these tighten gaps only, never text. */
.report-sheet .report-parent-response {
  margin-bottom: 0 !important;
}
.report-sheet .report-parent-intro {
  margin-bottom: 8px !important;
}
.report-sheet .report-parent-lines {
  margin-bottom: 10px;
}
.report-sheet .report-parent-field {
  min-height: 20px;
}
.report-sheet .report-parent-checks {
  gap: 6px;
  margin: 8px 0;
}
.report-sheet .report-parent-comments {
  margin-top: 8px !important;
}
.report-sheet .report-parent-comments-box {
  min-height: 48px !important;
}
.report-sheet .report-next-step-item {
  padding: 3px 0;
}
.report-sheet .report-next-steps {
  padding: 10px 14px !important;
  margin: 0 0 10px !important;
}

/* Print sizes inside a sheet, on screen as well as on paper. Generated from
   the @media print block above: every compaction rule, scoped to .report-sheet,
   so the preview and the printout share one layout. */
.report-sheet .report-header {
  margin-bottom: 12px !important;
  padding-bottom: 8px !important;
}
.report-sheet .report-header-meta {
  font-size: var(--text-xs) !important;
  line-height: 1.45 !important;
}
.report-sheet .report-course-title {
  font-size: var(--text-xs) !important;
}
.report-sheet .report-overall {
  margin-bottom: 12px !important;
}
.report-sheet .report-overall-main {
  padding: 10px 14px !important;
  flex: 0 0 150px !important;
}
.report-sheet .report-overall-word {
  font-size: var(--text-xl) !important;
}
.report-sheet .report-overall-label {
  font-size: var(--text-xs) !important;
}
.report-sheet .report-section-chip {
  padding: 8px 10px !important;
}
.report-sheet .report-section-chip-name {
  font-size: var(--text-2xs) !important;
}
.report-sheet .report-section-chip-value {
  font-size: var(--text-base) !important;
}
.report-sheet .report-block-box {
  padding: 10px 14px !important;
  margin-bottom: 10px !important;
}
.report-sheet .report-block-title {
  font-size: var(--text-2xs) !important;
  margin-bottom: 4px !important;
}
.report-sheet .report-learner-profile {
  margin-bottom: 10px !important;
}
.report-sheet .report-learner-title {
  font-size: var(--text-sm) !important;
  padding: 6px 14px !important;
}
.report-sheet .report-section-chart > div[style*='margin-top:12px'] {
  margin-top: 7px !important;
  padding-top: 6px !important;
}
.report-sheet .report-next-steps {
  margin-bottom: 10px !important;
}
.report-sheet .report-legend {
  margin-bottom: 10px !important;
}
.report-sheet .report-legend-word {
  font-size: var(--text-sm) !important;
}
.report-sheet .report-legend-desc {
  font-size: var(--text-xs) !important;
}
.report-sheet .report-block-box {
  page-break-inside: avoid !important;
  border-color: #bbb !important;
}
.report-sheet .report-block-box.report-section-chart {
  page-break-inside: auto !important;
}
.report-sheet .report-block-title {
  page-break-after: avoid !important;
}
.report-sheet .report-next-steps {
  page-break-inside: auto !important;
}
.report-sheet .report-next-step-item {
  page-break-inside: avoid;
}
.report-sheet .report-overall {
  page-break-inside: avoid !important;
}

/* Reports always print black and white (they are photocopied), so the
   sheets on screen carry the print block's black-and-white rules too: the
   preview shows what prints. */
.report-sheet [data-prof],
.report-sheet .report-section-chip-name,
.report-sheet .report-outcome-ev,
.report-sheet .report-legend-word {
  color: #000 !important;
}
.report-sheet [data-prof-bg] {
  background: transparent !important;
}
.report-sheet .report-level-pill {
  border: 1px solid #000 !important;
  border-radius: 4px !important;
}
.report-sheet .report-overall-main {
  background: #000 !important;
  color: #fff !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}
.report-sheet .report-overall-label {
  color: #ddd !important;
}
.report-sheet .report-outcome-bar-fill,
.report-sheet .report-next-step-bullet,
.report-sheet [data-prof-bg][style*='height:100%'] {
  background: #000 !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}
.report-sheet .report-outcome-bar {
  background: #e2e2e2 !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}
.report-sheet .report-next-steps {
  background: #fff !important;
  border-color: #bbb !important;
}
.report-sheet [data-prof-stroke='1'] {
  stroke: #1a1a1a !important;
}
.report-sheet [data-prof-stroke='2'] {
  stroke: #595959 !important;
}
.report-sheet [data-prof-stroke='3'] {
  stroke: #8f8f8f !important;
}
.report-sheet [data-prof-stroke='4'] {
  stroke: #c8c8c8 !important;
}

/* Compact type: one step down on every size, for a class whose form runs
   long. A whole-form setting, so every student prints the same. */
.report-sheet.compact {
  --text-2xs: 0.5625rem;
  --text-xs: 0.625rem;
  --text-sm: 0.6875rem;
  --text-base: 0.75rem;
  --text-md: 0.8125rem;
  font-size: 8.75pt;
}

/* Review on a tablet or a phone: the rail hides behind a Layout button and
   opens over the pages; one student at a time with the stepper; sheets
   scale to the width (ReportSheets sets --sheet-zoom from the preview). */
.report-stepper {
  display: none;
  align-items: center;
  gap: 2px;
}
#tb-rail-btn {
  display: none;
}
@media (max-width: 900px) {
  .report-toolbar {
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .report-stepper[style*='display: none'] {
    display: none !important;
  }
  .report-stepper {
    display: inline-flex;
  }
  #tb-rail-btn[style*='display: none'] {
    display: none !important;
  }
  #tb-rail-btn {
    display: inline-flex;
  }
  .studio {
    position: relative;
    grid-template-columns: 1fr;
  }
  .studio-palette {
    display: none;
  }
  .studio.rail-open .studio-palette {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 90vw);
    z-index: 5;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
  }

  .report-fitmap .sheet-student {
    width: calc(50% - 9px);
  }
}
@media (min-width: 901px) {
  .report-stepper,
  #tb-rail-btn {
    display: none !important;
  }
}

/* The toolbar's copy picker. */
#report-copy {
  max-width: 220px;
}

/* Print Reports in One Print Box (teacher/report-print-box.js): Before You
   Print at the top of the settings, and the page shown in the preview. */
.issue-warn {
  padding: 10px var(--space-3);
  border-radius: var(--radius);
  background: rgba(180, 83, 9, 0.08);
  font-size: var(--text-sm);
  color: var(--text);
  line-height: 1.5;
}
.issue-warn b {
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
}
.issue-warn button {
  font: inherit;
  color: var(--link);
  font-weight: 600;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.rpb-page {
  display: flex;
  justify-content: center;
  align-items: center;
}
.rpb-frame {
  overflow: hidden;
  background: #fff;
  color: #000;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.rpb-frame .report-sheet {
  margin: 0;
}

/* ── The Reports toolbar's student stepper ─────────────────── */
.tq-toolbar-arrow {
  width: var(--control-h);
  height: var(--control-h);
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  transition:
    background-color 0.15s,
    color 0.15s;
}
.tq-toolbar-arrow:hover {
  background: var(--divider-subtle);
  color: var(--text);
}
.tq-toolbar-arrow:active {
  background: rgba(0, 0, 0, 0.1);
}

/* The student page's header sits in its grid; the grid's 12px gap is the
   space below it. */
.student-header-top {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

/* ── Panel cards ── */
.tq-panel {
  /* The same card as the student page's: white, hairline, 12px corners. */
  background: var(--surface);
  border: 0.5px solid var(--divider-medium);
  border-radius: var(--radius);
  padding: 16px 20px 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.tq-panel-title {
  font-family: var(--font-base);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* ══════════════════════════════════════════════════════════════
   PROGRESS REPORTS — One Report's panel · pages (page-reports.js;
   the panel's and the page's own rules are report-one-panel.css and
   report-one-page.css)
   ══════════════════════════════════════════════════════════════ */
#report-output.has-studio {
  overflow: hidden;
}
.studio {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}
.studio-palette {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 14px 14px 20px;
  overflow-y: auto;
}

.studio-canvas {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #e9ecf0;
}
.studio-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--text-2);
  border-bottom: 0.5px solid var(--divider-medium);
  background: var(--surface);
}
.studio-fit {
  min-width: 0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.studio-fit.ok {
  color: #15803d;
}

.studio-view {
  flex: 0 0 auto;
}
.rb-preview.studio-pages {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 22px 24px 40px;
  background: #e9ecf0;
}
/* One student: the pages side by side, scaled to the canvas with a
   transform, not zoom: a transform leaves layout alone, so a page measures
   on screen exactly as the engine measured it (zoom re-wraps text in
   WebKit). The wrapper takes the scaled size so the pages sit together. */
.rb-preview.studio-pages:not(.studio-all) .sheet-student {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  justify-content: center;
  align-items: flex-start;
}
.rb-preview.studio-pages:not(.studio-all) .sheet-zoom {
  zoom: 1;
  margin: 0;
  position: relative;
  width: calc(8.5in * var(--sheet-zoom));
  height: calc(11in * var(--sheet-zoom) + 24px);
}
.rb-preview.studio-pages:not(.studio-all) .sheet-zoom:has(.report-sheet[data-paper='legal']) {
  height: calc(14in * var(--sheet-zoom) + 24px);
}
.rb-preview.studio-pages:not(.studio-all) .sheet-zoom > .report-sheet {
  transform: scale(var(--sheet-zoom));
  transform-origin: top left;
}
.rb-preview.studio-pages:not(.studio-all) .sheet-student-head {
  display: none;
}
.rb-preview.studio-pages .sheet-label {
  text-align: center;
  font-size: 11px;
  color: var(--text-3);
  margin: 0 0 6px;
}
.rb-preview.studio-pages .report-sheet {
  overflow: visible;
}
.rb-preview.studio-pages .report-sheet .sheet-body {
  overflow: hidden;
}
/* A cell: one block at Row or Side by Side width, as tall as its row
   (report-sheets.js sets both). A cell is a size container, so a block
   lays itself out for the width it is given; the measuring stage uses the
   same cells, so what is measured is what prints. */
.report-sheet .sheet-body {
  position: relative;
}
.sheet-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  container-type: inline-size;
  border-radius: 6px;
  flex: 0 0 auto;
}
.sheet-cell > .report-block-box {
  flex: 1 1 auto;
  box-sizing: border-box;
}
.sheet-fill > .report-block-box {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.report-ruled-fill {
  flex: 1 1 auto;
  min-height: 0;
}
.report-ruled-empty {
  min-height: 22px;
}
.sheet-fill .report-parent-comments {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.sheet-fill .report-parent-comments-box {
  flex: 1 1 auto;
}
.sheet-cell svg {
  max-width: 100%;
  height: auto;
}
.report-text-body {
  font-size: var(--text-base);
  line-height: 1.5;
  white-space: pre-wrap;
}
.tb-label {
  font-size: 11.5px;
  color: var(--text-3);
  margin-left: 2px;
}
.tb-divider {
  color: var(--border);
  font-size: 12px;
}
/* The student list stays open beside Progress Reports, so on narrower
   screens the toolbar wraps rather than pushing Print Reports off the edge. */
.report-toolbar {
  flex-wrap: wrap;
  row-gap: 8px;
}
/* The print settings and the view switch, at the right of the canvas head.
   On narrower screens their labels go, and the fit line wraps above them
   rather than being squeezed away. */
.studio-head {
  flex-wrap: wrap;
  row-gap: 4px;
}
.studio-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}
@media (max-width: 1520px) {
  .studio-tools .tb-label,
  .studio-tools .tb-divider {
    display: none;
  }
}
@media (max-width: 1600px) {
  .report-toolbar .report-seg-btn {
    padding-left: 10px;
    padding-right: 10px;
  }
}
@media print {
  .studio {
    display: block;
    height: auto;
  }
  .studio-canvas {
    display: block;
    background: none;
  }
  .rb-preview.studio-pages {
    padding: 0;
    overflow: visible;
    background: none;
  }
  .rb-preview.studio-pages:not(.studio-all) .sheet-student {
    display: block;
  }
  .rb-preview.studio-pages .report-sheet {
    overflow: hidden;
  }
}

/* ── A part in focus on the page ───────────────────────────────────
   The pages are scaled with a transform, so an outline on a page is sized
   against --sheet-zoom to read at screen size. */
.studio-pages .sheet-cell:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 1px;
}
.studio-pages .sheet-cell:focus-visible {
  outline-width: calc(2px / var(--sheet-zoom, 1));
}
.studio-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
/* A block that prints nothing for this student (left off, or with nothing
   to say) takes no room on paper; on the canvas it keeps its place as a
   dashed box with its name, so it can still be selected. */
.sheet-row-empty {
  display: none;
}
.studio-pages:not(.studio-all) .sheet-row-empty {
  display: flex;
}
.studio-pages:not(.studio-all) .sheet-row-empty .sheet-cell {
  min-height: 30px;
}

/* A row holds the page's own controls (report-one-page.js). */
.studio-pages .sheet-row {
  position: relative;
}

@media print {
  .studio-live {
    display: none !important;
  }
}

/* ── Block options ─────────────────────────────────────────── */
.report-ct-note {
  font-size: 7.5pt;
  font-weight: 400;
  color: #444;
  line-height: 1.35;
  margin-top: 1px;
}

/* Laptop widths: the Progress Reports toolbar keeps one row with room to
   spare for the wider system fonts on Windows and Linux. */
@media (max-width: 1240px) {
  .report-toolbar {
    gap: 8px;
  }
  .report-toolbar .report-seg-btn {
    padding-left: 8px;
    padding-right: 8px;
  }
  .report-toolbar .seg-sm .seg-btn {
    padding-left: 7px;
    padding-right: 7px;
  }
}

/* ── Blocks adapt to their box ─────────────────────────────────
   Each block's cell is a size container (container-type above); what a
   narrow box cannot hold goes by width, never by student. */
@container (width < 520px) {
  .report-sheet .report-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .report-sheet .report-header-meta {
    text-align: left;
  }
}
@container (width < 460px) {
  .report-sheet .report-overall {
    flex-wrap: wrap;
  }
  .report-sheet .report-overall-main {
    flex: 1 1 100% !important;
  }
  .report-sheet .report-section-chip {
    flex: 0 0 50%;
    min-width: 0;
    box-sizing: border-box;
  }
}
@container (width < 320px) {
  .report-ct .report-ct-evidence,
  .report-ct-legend {
    display: none;
  }
}
@container (width < 300px) {
  .report-growth .col-before {
    display: none;
  }
  .report-sheet .report-section-chip {
    flex: 0 0 100%;
  }
}

/* ── Proficiency, the legend strip and the letterhead (plan PR 3) ── */
.report-prof-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.report-prof-meta {
  font-size: var(--text-2xs);
  color: #555;
}
.report-prof .report-prof-n,
.report-prof th.report-prof-n {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.report-prof td.report-prof-n {
  font-weight: 600;
}
.report-prof td.report-prof-ev {
  font-weight: 400;
  color: #444;
}
.report-prof-count {
  font-weight: 400;
  color: #555;
}
.report-prof-overall td {
  font-weight: 700;
}
.report-prof-group td.report-ct-name {
  font-weight: 600;
}
.report-prof-top {
  margin-bottom: 4px;
}
.report-prof-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
  align-items: start;
}
.report-prof-cols .report-prof {
  font-size: var(--text-xs);
}
.report-prof-facts {
  margin-top: 6px;
  font-size: var(--text-xs);
  line-height: 1.4;
}
.report-prof-half .report-prof {
  font-size: var(--text-xs);
}
.report-sheet .report-proficiency {
  margin-bottom: 0 !important;
}
/* The legend: one strip of the four levels, two by two at Side by Side. */
.report-sheet .report-legend {
  display: block;
  margin-bottom: 0 !important;
  padding: 8px 14px;
  background: var(--surface);
  overflow: visible;
}
.report-legend-title {
  font-family: var(--font-base);
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: 4px;
}
.report-legend-items {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 10px;
}
.report-legend-half .report-legend-items {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  row-gap: 8px;
}
.report-sheet .report-legend-item {
  display: block;
  padding: 0;
  border: 0;
  font-size: var(--text-sm);
}
.report-sheet .report-legend-word {
  font-size: var(--text-sm);
  font-weight: 700;
}
.report-sheet .report-legend-desc {
  font-size: var(--text-2xs);
  color: #444;
  white-space: nowrap;
}
/* The letterhead sits near the top: the class, block and report on one
   line over the name; term, teacher and student number as pairs at the
   right. */
.report-sheet .report-header {
  align-items: flex-end;
  margin-bottom: 0 !important;
  padding-bottom: 8px !important;
  border-bottom: 2px solid #1d1d1f;
}
.report-sheet .report-course-title {
  font-size: var(--text-sm) !important;
  color: #48484a;
}
.report-sheet .report-student-name {
  font-size: 30px !important;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin-top: 4px;
}
.report-sheet .report-header-meta {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 12px;
  row-gap: 2px;
  text-align: right;
  font-size: var(--text-xs) !important;
  line-height: 1.35 !important;
}
.report-sheet .report-header-k {
  color: #636366;
}

/* ── Next Steps, Progress in One Area (plan PR 5) ── */
.report-steps {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 3px;
  font-size: var(--text-base);
  line-height: 1.35;
}
.report-steps-half .report-steps {
  grid-template-columns: 86px minmax(0, 1fr);
}
.report-steps-k,
.report-progress-k {
  color: #636366;
}
.report-steps-v {
  font-weight: 600;
}
.report-steps-latest {
  color: #48484a;
  font-size: var(--text-xs);
}
.report-sheet .report-next-steps {
  margin-bottom: 0 !important;
  padding: 10px 14px !important;
}
.report-progress-sub {
  font-weight: 400;
  color: #636366;
}
.report-progress-body {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.report-progress-half .report-progress-body {
  flex-direction: column;
  align-items: stretch;
}
.report-progress-facts {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 5px;
  font-size: var(--text-sm);
  line-height: 1.35;
  align-content: start;
  font-variant-numeric: tabular-nums;
}
.report-progress-chg {
  color: #48484a;
}
.report-progress-list {
  flex: none;
  width: 290px;
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
}
.report-progress-half .report-progress-list {
  width: auto;
}
.report-progress-lh,
.report-progress-li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 46px;
  column-gap: 6px;
  align-items: center;
}
.report-progress-lh {
  font-size: var(--text-2xs);
  color: #636366;
  border-bottom: 1px solid #1d1d1f;
  padding-bottom: 2px;
}
.report-progress-li {
  min-height: 17px;
  border-bottom: 1px solid #e5e5ea;
}
.report-progress-date {
  color: #636366;
}
.report-progress-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.report-progress-n {
  text-align: right;
}
.report-sheet .report-progress {
  margin-bottom: 0 !important;
}

/* ── Attendance, Missing Work, Learning Dispositions, Self-Assessment (plan PR 6) ── */
.report-sheet .report-strip {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 14px !important;
  min-height: 44px;
  margin-bottom: 0 !important;
  font-size: var(--text-base);
}
.report-strip-title {
  font-size: var(--text-md);
  width: 96px;
  flex: none;
}
.report-strip-k {
  color: #636366;
}
.report-strip-meta {
  margin-left: auto;
  font-size: var(--text-2xs);
  color: #636366;
}
.report-sheet .report-strip-half {
  margin-bottom: 0 !important;
  padding: 10px 14px !important;
}
.report-strip-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.report-strip-head b {
  font-size: var(--text-md);
}
.report-strip-figs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.report-strip-fig {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.report-strip-fig b {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.1;
}
.report-strip-fig span {
  font-size: var(--text-2xs);
  color: #636366;
}
.report-disp {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 18px;
  row-gap: 8px;
  font-size: var(--text-base);
}
.report-disp-half .report-disp {
  grid-template-columns: minmax(0, 1fr);
}
.report-disp-half .report-disp-head {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.report-disp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #e5e5ea;
  padding-bottom: 5px;
}
.report-disp-word {
  white-space: nowrap;
  font-weight: 600;
}
.report-sheet .report-learner-profile {
  margin-bottom: 0 !important;
}
.report-self-body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 16px;
  font-size: var(--text-base);
  line-height: 1.4;
}
.report-self-half .report-self-body {
  grid-template-columns: minmax(0, 1fr);
}
.report-self-half .report-self-head {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.report-self-col {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.report-self-right {
  border-left: 1px solid #e5e5ea;
  padding-left: 14px;
}
.report-self-half .report-self-right {
  border-left: 0;
  padding-left: 0;
  border-top: 1px solid #e5e5ea;
  padding-top: 7px;
}
.report-self-k {
  font-size: var(--text-2xs);
  color: #636366;
}
.report-self-goal {
  font-weight: 600;
}
.report-sheet .report-self {
  margin-bottom: 0 !important;
}

/* ── Assignment Grades as rows (plan PR 4) ─────────────────────── */
/* Nothing draws these now (the Assessments part took its place, Nov 13);
   kept for printed copies saved before, which reprint from their own
   HTML with today's styles. */
.report-grades-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
  align-items: start;
}
.report-grades-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.report-grades-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-base);
  font-size: var(--text-2xs);
  font-weight: 700;
  color: #48484a;
  border-bottom: 1px solid #1d1d1f;
  padding: 6px 0 2px;
}
/* The date column is in em, wide enough for the widest date ("May 30")
   on one line in a wide font such as DejaVu Sans, Linux's default, with
   room to spare: at 40px a date wrapped to two lines there and made its
   row taller than the rest (Nov 12). A Proficiency or Both class has no
   word column (report-grades-noword): its title has the room. */
.report-grades-row {
  display: grid;
  grid-template-columns: 4.2em minmax(0, 1fr) 90px 62px;
  column-gap: 6px;
  align-items: center;
  min-height: 20px;
  padding: 2px 0;
  box-sizing: border-box;
  border-bottom: 1px solid #e5e5ea;
  font-size: var(--text-xs);
  line-height: 1.25;
}
.report-grades-noword .report-grades-row {
  grid-template-columns: 4.2em minmax(0, 1fr) 90px;
}
.report-grades-col:only-child .report-grades-row {
  grid-template-columns: 4.4em minmax(0, 1fr) 104px 70px;
}
.report-grades-noword .report-grades-col:only-child .report-grades-row {
  grid-template-columns: 4.4em minmax(0, 1fr) 104px;
}
.report-grades-headgrade {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.report-grades .report-prof-head {
  flex-wrap: wrap;
}
.report-grades-course {
  margin-left: auto;
  font-size: var(--text-sm);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.report-grades-date {
  color: #636366;
  white-space: nowrap;
}
.report-grades-figs {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.report-grades-word {
  color: #48484a;
  white-space: nowrap;
}
/* A Proficiency or Both class's mark wider than its column ("Proficient −
   · 67%"; report-blocks.js renderBlockGradeTable) reaches left past it, on
   the title's last line: the mark ends at the column's right edge and sits
   on the last line, and the title ends in a spacer as wide as the mark
   needs past the column (--grades-mark less the column; the column gap is
   left clear). The spacer floats right on the title's last line when that
   line has room and drops to a line of its own when it has not, so the
   mark never covers the title and a title wraps where it did. At a fixed
   90px a Both class's marks ran into the next column (Nov 12). */
.report-grades-wide .report-grades-figs {
  justify-self: end;
  align-self: end;
  width: max-content;
}
.report-grades-room {
  float: right;
  height: 1.25em;
  width: max(0px, calc(var(--grades-mark) - 96px));
}
.report-grades-col:only-child .report-grades-room {
  width: max(0px, calc(var(--grades-mark) - 110px));
}
.report-grades-legend {
  margin-top: 6px;
  font-size: var(--text-2xs);
  color: #636366;
}
.report-sheet .report-grades {
  margin-bottom: 0 !important;
}

/* ── The newer blocks and their shapes ───────────────────────── */
.report-glance {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: #ddd;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
}
.report-glance-fig {
  background: #fff;
  padding: 6px 8px;
  min-width: 0;
}
.report-glance-value {
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.25;
}
.report-glance-fig.word .report-glance-value {
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}
.report-glance-label {
  font-size: var(--text-2xs);
  color: #555;
}
.report-growth-arrow {
  width: 24px;
  text-align: center;
  font-weight: 700;
}
.report-missing-work td {
  font-size: var(--text-sm);
}
.report-attendance td {
  font-size: var(--text-sm);
}
@container (width < 460px) {
  /* Two levels side by side: the word goes under its dots. */
  .report-growth .report-ct .report-ct-level {
    white-space: normal;
  }
  .report-growth .report-dots {
    display: block;
  }
  .report-sheet .report-legend {
    flex-wrap: wrap;
  }
  .report-sheet .report-legend-item {
    flex: 0 0 50%;
    box-sizing: border-box;
    border-bottom: 1px solid var(--border);
  }
  .report-glance {
    grid-template-columns: repeat(3, 1fr);
  }
}
@container (width < 300px) {
  .report-sheet .report-legend-item {
    flex: 0 0 100%;
  }
  .report-glance {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ══ Term Questionnaire: the review screen ══════════════════════════
   fullvision-generate-plan PR 11a, built to the "Review screen" mockup
   (LayoutE): the student header, Work Habits, At a Glance and the
   student's Voice on the left; the Teacher Comment, Attendance and (PR
   11b) the Sentences card on the right. The page scrolls as one, so the
   comment grows with its text and never scrolls inside. */
#report-output.qn-output {
  overflow: hidden !important;
}
.qn {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 18px 24px 24px;
  overflow-y: auto;
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-base);
}
.qn-left {
  width: 470px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.qn-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* The column scrolls on its own (max-height below); its cards keep their
   height instead of shrinking to fit it. Attendance was squeezed to a sliver
   on a 1000 px tall window. */
.qn-right > * {
  flex-shrink: 0;
}
/* Side by side (Questionnaire glance plan, step 6): the right column (the
   Teacher Comment, Attendance, Sentences) stays in view while the left
   scrolls, and scrolls on its own when it is taller than the window. The
   left column stays 470 px wide, as it was, and the right takes the rest;
   only when the student list is hidden does the left column take the
   list's room (470 → 710 px). Colin, Nov 4: the left column had grown on
   every wide screen ("i wanted it the way it was before, but only for that
   to grow when the name block was minimized"). The right column's 4 px
   padding, taken back by the margin, keeps the cards' shadows from being
   cut. */
@media (min-width: 1281px) {
  .page-layout.sidebar-hidden .qn-left {
    width: calc(470px + var(--sidebar-w));
  }
  .qn-right {
    flex: 1;
    position: sticky;
    top: 0;
    align-self: flex-start;
    max-height: calc(100vh - var(--dock-h) - 53px - 36px);
    overflow-y: auto;
    padding: 0 4px 6px;
    margin: 0 -4px;
    box-sizing: border-box;
  }
}
.qn,
.qn-info,
.qno-panel {
  --qn-hairline: #f0f0f3;
  --qn-dim: var(--text-3);
  --qn-best-bg: #e8f1fe;
  --qn-ring: #c07a00;
  --qn-copied-bg: #f0faf2;
  --qn-att-bg: #f5f9ff;
  --qn-new-bg: #e6f4ea;
}
@media (prefers-color-scheme: dark) {
  .qn,
  .qn-info,
  .qno-panel {
    --qn-hairline: var(--surface-2);
    --qn-dim: var(--text-2);
    --qn-best-bg: var(--active-light);
    --qn-ring: var(--score-2-text);
    --qn-copied-bg: var(--score-3-bg);
    --qn-att-bg: var(--surface-2);
    --qn-new-bg: var(--score-3-bg);
  }
}

/* The toolbar (teacher/report-toolbar.js): the right-hand group, the Ready
   count with its track, and the two buttons that share one width. */
.rtb-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* The words keep room for the widest count a class has ("26 of 27 Ready" is
   14 characters), measured in the font on screen: a wider font (Linux,
   Windows) widens the room with it rather than spilling, and the count
   changing does not move the buttons beside it. */
.rtb-ready {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: var(--control-h);
  padding: 0 4px;
  flex-shrink: 0;
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.rtb-track {
  width: 64px;
  height: 6px;
  border-radius: 3px;
  background: rgba(118, 118, 128, 0.2);
  overflow: hidden;
  flex-shrink: 0;
}
.rtb-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 3px;
  background: var(--active-fill);
  transition: width 0.2s var(--ease-out);
}
#tq-ready {
  min-width: 15ch;
}
.rtb-ready.is-done {
  color: var(--score-3-text);
}
.rtb-ready.is-done .rtb-fill {
  background: var(--score-3);
}
.report-toolbar .rtb-more-wrap,
.report-toolbar .atb-icon-btn {
  flex-shrink: 0;
}
.report-toolbar .rtb-more-wrap .assess-menu {
  min-width: 290px;
}
/* Approve and Next and Print Reports: one size and one width, so the right
   edge does not move between the tabs. */
.report-toolbar .tb-action-btn {
  width: 152px;
  justify-content: center;
  flex-shrink: 0;
}
/* The student arrows and Parts: grey, like the ⋯ and Filter buttons. */
.report-toolbar .tq-toolbar-arrow {
  background: rgba(118, 118, 128, 0.12);
  color: var(--text);
}
.report-toolbar .tq-toolbar-arrow:hover {
  background: rgba(118, 118, 128, 0.2);
}
.report-toolbar .tq-toolbar-arrow:focus-visible,
.report-toolbar .tb-toggle-btn:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 2px;
}
.report-toolbar .tb-toggle-btn {
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  font-size: var(--text-sm);
  font-weight: 600;
  background: rgba(118, 118, 128, 0.12);
  color: var(--text);
}
.report-toolbar .tb-toggle-btn:hover {
  background: rgba(118, 118, 128, 0.2);
}
.report-toolbar .tb-toggle-btn.active,
.report-toolbar .tb-toggle-btn[aria-pressed='true'] {
  background: var(--active-light);
  color: var(--link);
}

/* The roster (ui.js setSidebarAnnotator): All · Not Ready above the list */
.qn-roster-filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 6px;
}
.qn-roster-filter .seg-btn {
  min-height: 28px;
  padding: 0 4px;
  font-size: var(--text-xs);
  white-space: nowrap;
}
/* Needs Approval reads amber, as on the canvas. */
body.qn-roster #gb-sidebar .student-row-note {
  color: var(--score-2-text);
}

/* The student header */
.qn-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.qn-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.qn-who {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.qn-name {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}
.qn-head-sub {
  color: var(--text-2);
  font-size: var(--text-sm);
}
.qn-head-link {
  white-space: nowrap;
}
.qn-head-link,
.qn-card-link {
  color: var(--link);
  text-decoration: none;
  cursor: pointer;
}
.qn-head-link:hover,
.qn-card-link:hover {
  text-decoration: underline;
}

/* Cards */
.qn-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.qn-sub {
  color: var(--text-2);
  font-size: var(--text-xs);
}
.qn-card-link {
  font-size: 12.5px;
}
.qn-hs {
  --hs-in: 12.5%;
  --hs-step: 25%;
  position: relative;
  min-width: 0;
  border-radius: 6px;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.qn-hs:focus {
  outline: none;
}
.qn-hs:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 1px;
}
.qn-hs-track {
  position: relative;
  height: 24px;
}
.qn-hs-rail,
.qn-hs-fill {
  position: absolute;
  top: 9.5px;
  height: 5px;
  border-radius: 2.5px;
}
.qn-hs-rail {
  /* From the Rarely stop to the Consistently stop and no further: grey past
     either end read as more scale (Colin, Nov 4). The whole row still
     takes the click (.qn-hs-stop). */
  left: calc(var(--hs-in) - 2.5px);
  right: calc(var(--hs-in) - 2.5px);
  background: var(--surface-2);
}
.qn-hs-fill {
  left: var(--hs-in);
  width: calc(var(--hs-step) * var(--at, 0));
  background: var(--active);
  display: none;
}
.qn-hs-dot {
  position: absolute;
  top: 9px;
  left: calc(var(--hs-in) + var(--hs-step) * var(--i) - 3px);
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: var(--border-2);
}
.qn-hs-thumb {
  position: absolute;
  top: 3px;
  left: calc(var(--hs-in) + var(--hs-step) * var(--at, 0) - 9px);
  width: 18px;
  height: 18px;
  box-sizing: border-box;
  border-radius: 9px;
  background: var(--active);
  border: 2px solid var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  display: none;
}
/* Over each column, a clear stop that takes the click. */
.qn-hs-stop {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--hs-step) * var(--i));
  width: var(--hs-step);
}
.qn-hs.set .qn-hs-fill,
.qn-hs.set .qn-hs-thumb {
  display: block;
}
.qn-count {
  flex: none;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--score-2-text);
}
.qn-skill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  font-size: var(--text-sm);
  border-top: 1px solid var(--qn-hairline);
}
.qn-skill-name {
  flex: 1;
  min-width: 0;
}
.qn-level {
  flex: none;
  width: 76px;
  text-align: right;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--score-3);
}
.qn-level[data-level='4'] {
  color: var(--score-4);
}
.qn-level[data-level='2'] {
  color: var(--score-2);
}
.qn-level[data-level='1'] {
  color: var(--score-1);
}
.qno-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 12px;
}
.qno-glance-foot,
.qn-obs .qno-foot {
  padding: 10px 0 2px;
}
.qno-view-all {
  background: none;
  border: 0;
  padding: 0;
  font-family: var(--font-base);
  font-size: var(--text-sm);
  font-weight: 600;
}

/* The Observations card (Questionnaire glance plan, step 4): a strip of the
   four types and All with their counts, the newest three observations as
   the Observations page's card (read only, text cut to two lines), and a
   foot. Always the same size, however many there are. */
.qn-obs {
  padding: 10px 14px;
}
.qno-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 8px 0;
}
.qno-seg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 6px 4px 5px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--border-2);
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-base);
  cursor: pointer;
}
.qno-seg:hover {
  background: var(--bg);
}
.qno-seg:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 1px;
}
.qno-seg[data-sentiment='strength'] {
  border-top-color: var(--score-3);
}
.qno-seg[data-sentiment='growth'] {
  border-top-color: var(--score-4);
}
.qno-seg[data-sentiment='concern'] {
  border-top-color: var(--score-2);
}
.qno-seg[data-sentiment='note'] {
  border-top-color: var(--obs-note);
}
.qno-seg-n {
  font-size: 17px;
  font-weight: 650;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.qno-seg-word {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}
.qno-recent {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
/* The card's observations follow the board: a soft fill with no border; the
   kind chip, then the date, then the text, then the tags; Private small at
   the top right. */
.qn-obs .obs-card {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 8px;
  align-items: center;
  position: relative;
  background: var(--qn-obs-fill, #f5f5f7);
  border: 0;
  border-radius: 10px;
  padding: 9px 10px;
  margin-bottom: 0;
}
.qn-obs .obs-card:hover {
  box-shadow: none;
}
.qn-obs .obs-card-main,
.qn-obs .obs-card-header {
  display: contents;
}
.qn-obs .obs-type {
  width: auto;
  height: 20px;
  padding: 0 7px;
  margin: 0;
  font-size: 12px;
  border-radius: 5px;
}
.qn-obs .obs-card-time {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.qn-obs .obs-card-text {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}
.qn-obs .obs-card-meta {
  grid-column: 1 / -1;
  margin: 0;
  gap: 4px 10px;
  font-size: 12.5px;
}
.qn-obs
  .obs-card-meta:not(:has(.obs-card-dim, .obs-card-context, .obs-card-assessment, .obs-card-link, .obs-card-quoted)) {
  display: none;
}
.qn-obs .obs-card-context {
  color: var(--text-2);
}
.qn-obs .obs-card-meta .obs-card-dim {
  color: var(--text);
  font-weight: 500;
}
.qn-obs .obs-private {
  position: absolute;
  top: 9px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
  background: rgba(0, 0, 0, 0.07);
  border-radius: 5px;
  padding: 2px 6px;
}
/* Read only: no delete column. */
.qn-obs .obs-card,
.qno-panel .obs-card {
  grid-template-columns: 74px minmax(0, 1fr);
}
.qno-recent .obs-card-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.qno-foot-note {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--text-3);
}

/* The drawer (Questionnaire glance plan, step 3): over the left column,
   edge to edge, stopping where the left column ends (662 px right column
   + 20 px gap + 24 px padding; _fitDrawer measures it), with its own
   scroll. The Teacher Comment stays in view beside it. */
#report-output.qn-output {
  position: relative;
}
.qno-panel {
  position: absolute;
  z-index: 20;
  top: 0;
  bottom: 0;
  left: 0;
  right: 706px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--text);
  font-size: var(--text-base);
  box-shadow:
    6px 0 24px rgba(0, 0, 0, 0.12),
    1px 0 0 var(--border);
  overflow: hidden;
}
@media (max-width: 1280px) {
  .qno-panel {
    right: 0;
  }
}
.qno-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 18px 12px 24px;
}
.qno-panel-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.qno-panel-title {
  font-size: 17px;
  font-weight: 650;
}
.qno-close {
  flex: none;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
}
.qno-close:hover {
  color: var(--text);
}
.qno-close:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 1px;
}
.qno-panel-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 0 14px;
  background: var(--bg);
}
/* A month or folder heading stays in view while its rows scroll. */
.qno-month {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg);
  padding: 10px 14px 6px;
}
.qno-panel .qno-month {
  padding: 10px 18px 6px 24px;
}
.qno-empty {
  padding: 14px;
  font-size: var(--text-sm);
  color: var(--text-2);
}
/* In the drawer the empty line lines up with the rows. */
.qno-panel .qno-empty {
  padding: 14px 18px 14px 24px;
}

.qno-skill-card {
  margin: 0 18px 0 24px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}
.qno-skill-card .qn-skill:first-child {
  border-top: 0;
}
.qno-skill-fig {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-2);
  margin-top: 1px;
}
.qno-skill-change {
  flex: none;
  font-size: var(--text-xs);
  color: var(--text-2);
  white-space: nowrap;
}

/* The Observations drawer (step 5): the strip as a filter, the chosen type
   filled in its colour as the capture band fills it (All in black), a
   search box, rows cut to four lines with Show More, and the line where
   the earlier report fell. */
.qno-strip-panel {
  padding: 0 18px 12px 24px;
}
.qno-seg.on {
  color: #fff;
}
.qno-seg.on .qno-seg-word {
  color: inherit;
}
.qno-seg.on[data-sentiment='strength'] {
  background: var(--score-3);
  border-color: var(--score-3);
}
.qno-seg.on[data-sentiment='growth'] {
  background: var(--score-4);
  border-color: var(--score-4);
}
.qno-seg.on[data-sentiment='concern'] {
  background: var(--score-2);
  border-color: var(--score-2);
}
.qno-seg.on[data-sentiment='note'] {
  background: var(--obs-note);
  border-color: var(--obs-note);
  color: var(--obs-note-on);
}
.qno-seg.on[data-sentiment='all'] {
  background: var(--text);
  border-color: var(--text);
  color: var(--surface);
}
.qno-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px 12px 24px;
  border-bottom: 1px solid var(--border);
}
.qno-search .obs-search-wrap {
  flex: 1;
  min-width: 0;
  width: auto;
}
.qno-search .obs-search-input {
  width: 100%;
  box-sizing: border-box;
}
.qno-showing {
  font-size: var(--text-xs);
  color: var(--text-3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.qno-item {
  padding: 0 18px 0 24px;
}
.qno-panel .obs-card {
  cursor: default;
}
.qno-panel .obs-card.qno-clamp .obs-card-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}
.qno-panel .obs-card.qno-open {
  border-color: var(--active);
}
.qno-more {
  display: inline-block;
  margin-top: 2px;
  background: none;
  border: 0;
  padding: 0;
  font-family: var(--font-base);
  font-weight: 500;
}
.qno-checkpoint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 10px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-2);
}
.qno-checkpoint[hidden] {
  display: none;
}
.qno-checkpoint::before,
.qno-checkpoint::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-2);
}

/* The student's Voice */
.qn-voice {
  padding: 10px 14px;
}

/* The Teacher Comment */
.qn-comment {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.08),
    0 2px 4px rgba(0, 0, 0, 0.04);
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.qn-comment-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.qn-comment-tabs .seg-btn {
  white-space: nowrap;
}
.qn-generate {
  border: 0;
  background: var(--active-fill);
  color: #fff;
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  flex: none;
  white-space: nowrap;
}
.qn-generate:hover {
  filter: brightness(0.92);
}
.qn-generate:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 2px;
}
@keyframes qn-added-mark {
  0%,
  60% {
    background-color: var(--qn-new-bg);
    box-shadow: 0 0 0 2px var(--qn-new-bg);
  }
  100% {
    background-color: transparent;
    box-shadow: 0 0 0 2px transparent;
  }
}
.qn-comment-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-2);
}
.qn-comment-foot[hidden] {
  display: none;
}
/* The count under the comment: plain text. */
.qn-count-wrap {
  flex: 1;
  display: flex;
}
.qn-count {
  color: var(--text);
  padding: 2px 6px;
  border-radius: 6px;
}
.qn-copy {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.qn-copy:hover {
  background: var(--overlay-hover);
}
/* "✓ Copied" for a moment after Copy (the States mockup). */
.qn-copy.copied,
.qn-copy.copied:hover {
  color: var(--score-3-text);
  border-color: var(--score-3-bg);
  background: var(--qn-copied-bg);
  font-weight: 600;
}
.qn-copy.copied svg {
  display: none;
}
.qn-copy.copied .qn-copy-label::before {
  content: '✓ ';
}
/* Before Generate: "No comment yet" over the empty box (the States mockup). */
.qn-empty {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  cursor: text;
}
.qn-empty[hidden] {
  display: none;
}
.qn-empty-title {
  font-size: var(--text-md);
  font-weight: 600;
}
.qn-empty-hint {
  font-size: var(--text-sm);
  color: var(--text-2);
}
.qn-empty-chip {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--score-2-text);
  background: var(--score-2-bg);
  padding: 2px 8px;
  border-radius: 6px;
}
/* A class warning in the Teacher Comment card: a near-identical comment. */
.qn-warn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--report-callout-bg);
  border-radius: 10px;
  font-size: var(--text-sm);
  color: var(--score-2-text);
}
.qn-warn-text {
  flex: 1;
  line-height: 1.4;
}
.qn-warn-link {
  flex: none;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  color: inherit;
  cursor: pointer;
}
.qn-warn-link:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 2px;
  border-radius: 4px;
}
/* Marks changed after approval (plan PR 12; the States mockup). */
.qn-approved-chip {
  flex: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--score-3-text);
  background: var(--score-3-bg);
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.qn-stale {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.qn-stale-note {
  padding: 10px 12px;
  background: var(--report-callout-bg);
  border-radius: 10px;
  font-size: var(--text-sm);
  color: var(--score-2-text);
  line-height: 1.4;
}
.qn-stale-change {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--score-2);
  border-radius: 10px;
}
.qn-stale-line {
  display: flex;
  gap: 10px;
}
.qn-stale-label {
  width: 70px;
  flex: none;
  font-size: 12px;
  color: var(--text-2);
  padding-top: 2px;
}
.qn-stale-was {
  font-size: 14.5px;
  color: var(--text-2);
  text-decoration: line-through;
}
.qn-stale-now {
  font-size: 14.5px;
  background: var(--active-light);
  border-radius: 4px;
  padding: 0 4px;
}
.qn-stale-none {
  font-size: 14.5px;
  color: var(--text-2);
}
.qn-stale-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
  flex-wrap: wrap;
}
.qn-stale-grade {
  flex: 1;
  font-size: 12.5px;
  color: var(--text-2);
}
.qn-stale-keep,
.qn-stale-use {
  font: inherit;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.qn-stale-keep {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.qn-stale-use {
  border: 0;
  background: var(--active-fill);
  color: #fff;
  font-weight: 600;
}
.qn-stale-keep:focus-visible,
.qn-stale-use:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 2px;
}
.qn-stale-hint {
  font-size: 12.5px;
  color: var(--text-2);
}
/* A sentence that no longer matches the gradebook, under its row, before
   approval: what it says, what is true now, Keep as Written or Use the New
   Sentence. */
.qn-claim {
  padding: 0 14px 10px 44px;
}
/* Show Both: the two comments side by side, shared sentences marked. */
.qn-info.qn-both {
  width: min(1100px, 100%);
}
.qn-both .qn-info-top .qn-sub {
  flex: 1;
}
.qn-both-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.qn-both-col {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.qn-both-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.qn-both-name {
  font-size: var(--text-md);
  font-weight: 600;
}
.qn-both-grade {
  font-size: var(--text-sm);
  color: var(--text-2);
}
.qn-both-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
}
.qn-both-s.shared {
  background: var(--score-2-bg);
  box-shadow: 0 0 0 2px var(--score-2-bg);
  border-radius: 4px;
}
@media (max-width: 760px) {
  .qn-both-cols {
    grid-template-columns: 1fr;
  }
}
.qn-hint {
  font-size: var(--text-xs);
  color: var(--text-2);
  line-height: 1.35;
}
.qn-nodraft,
.qn-pron-notice {
  margin-bottom: 8px;
}
.qn-pron-notice {
  color: var(--score-2-text);
}
.qn-earlier {
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.qn-earlier p {
  margin: 0 0 8px;
  font-size: var(--text-base);
  line-height: 1.6;
}
.qn-earlier p:last-child {
  margin-bottom: 0;
}

/* Attendance: one line */
.qn-att {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: var(--text-sm);
}
.qn-att-field {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.qn-att-input {
  width: 56px;
  border: 1px solid var(--border-2);
  border-radius: 7px;
  padding: 4px 8px;
  font: inherit;
  background: var(--surface);
  color: var(--text);
}
.qn-att-input.warn,
.qn-att-input.bad {
  border-color: var(--score-2);
}
.qn-att-note {
  flex: 1;
  text-align: right;
  font-size: var(--text-xs);
  color: var(--text-2);
}
.qn-att-warn {
  color: var(--score-2-text);
}

/* Where This Information Comes From */
.qn-info-overlay {
  align-items: flex-start;
  overflow-y: auto;
  padding: 20px;
}
.qn-info {
  width: min(640px, 100%);
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 auto;
  font-size: var(--text-base);
}
.qn-info-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.qn-info-title {
  font-size: 17px;
  font-weight: 700;
}
.qn-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
}
.qn-btn:hover {
  background: var(--overlay-hover);
}
.qn-info-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-2);
  padding-left: 12px;
}
.qn-info-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.qn-info-row,
.qn-info-never {
  display: flex;
  gap: 12px;
  padding: 9px 14px;
  align-items: flex-start;
  font-size: var(--text-sm);
}
.qn-info-row + .qn-info-row,
.qn-info-off {
  border-top: 1px solid var(--qn-hairline);
}
.qn-info-part {
  width: 120px;
  flex: none;
  font-weight: 600;
}
.qn-info-from {
  flex: 1;
  color: var(--qn-dim);
}
.qn-info-who {
  flex: none;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--qn-dim);
}
.qn-info-who.who-you {
  background: var(--score-4-bg);
  color: var(--score-4-text);
}
.qn-info-who.who-student {
  background: #dcfce7;
  color: #166534;
}
.qn-info-off {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 14px;
  font-size: var(--text-sm);
  color: var(--text-2);
}
.qn-info-off-title {
  font-weight: 600;
  color: var(--text);
}
.qn-info-never {
  padding: 10px 14px;
}

@media (max-width: 1280px) {
  .qn {
    flex-direction: column;
    align-items: stretch;
  }
  .qn-left {
    width: auto;
  }
  body.qn-roster {
    --sidebar-w: 220px;
  }
}

/* The Teacher Comment's paragraphs (a line each in the questionnaire). */
.report-comment-text p {
  margin: 0;
}
.report-comment-text p + p {
  margin-top: 0.4em;
}

/* ── Grade Report (grade-report.js) ──────────────────────────────
   A plain table of this term's work, black on white, like the old
   gradebook printouts. Rows have a fixed height so the layout can count
   how many fit on a side; a row whose title or category is too long for
   its cell is two lines high (.gr-wrap), and only a third line ends in
   "…". */
.gr-sheet .sheet-body {
  align-items: stretch;
}
.gr-table {
  width: 100%;
  font-size: 9pt;
  line-height: 1.2;
}
.gr-row {
  display: grid;
  grid-template-columns: var(--gr-cols);
  column-gap: 6px;
  align-items: center;
  height: var(--gr-row, 19px);
  border-bottom: 1px solid #d0d0d0;
  white-space: nowrap;
}
.gr-row.gr-wrap {
  height: var(--gr-row2, auto);
}
.gr-wrap .gr-title,
.gr-wrap .gr-category {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  white-space: normal;
  overflow-wrap: break-word;
}
.gr-head {
  height: auto;
  padding-bottom: 2px;
  border-bottom: 1.5px solid #000;
  font-weight: 700;
}
.gr-c {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gr-r {
  text-align: right;
}
.gr-n,
.gr-missing .gr-note,
.gr-note,
.gr-flag {
  font-weight: 700;
}
.gr-summary {
  font-size: 9pt;
}
.gr-summary .gr-row {
  height: 19px;
}
.gr-term {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 0;
  border-bottom: 1.5px solid #000;
  font-size: 11pt;
  font-weight: 700;
}
/* For printed copies saved before One Report (a copy reprints from its own
   HTML with today's styles): the old Quick Report's smaller and two-column
   lists, its summary under the list, and its "more not shown" line.
   Nothing draws these now. */
.gr-table.gr-small,
.gr-table.gr-two {
  font-size: 7.5pt;
}
.gr-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 16px;
  align-items: start;
}
.gr-tail {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gr-facts {
  font-size: 9pt;
}
.gr-cut {
  font-size: 8pt;
  font-style: italic;
}
/* The Assessments part in groups or side by side (grade-report.js
   _assemble): each row with the heading over it is one item, so a page
   break never strands a heading. Side by side, two tables 16px apart. */
.gr-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
  align-items: start;
}
.gr-ghead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0 2px;
  border-bottom: 1px solid #000;
  font-weight: 700;
  white-space: nowrap;
}
.gr-ggrade {
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.gr-none {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 2px 0 3px;
  border-bottom: 1px solid #d0d0d0;
  font-size: 9pt;
  font-weight: 700;
}
.gr-asof {
  font-weight: 400;
  color: #636366;
}
/* The font the sheet prints in (styles.css, @media print --font-base),
   for measuring its columns on screen (grade-report.js _fitPx). */
.gr-print-font {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* ── Feedback cards (Feedback Pages) ───────────────────────────────────
   One bordered card per assessment, built by ReportFeedback.cardHtml
   (teacher/report-feedback-cards.js). Black and white only: it is
   photocopied. Every rule is under .fb-card so nothing leaks into the
   other report blocks. The look is the Full Record mockup (layout B). */
.fb-card {
  box-sizing: border-box;
  border: 1.5px solid #000;
  padding: 0 8px 8px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 10.5px;
  line-height: 1.25;
  color: #000;
  background: #fff;
  break-inside: avoid;
}
.fb-card .fb-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  background: #ececec;
  margin: 0 -8px;
  padding: 6px 8px;
  border-bottom: 1.5px solid #000;
}
.fb-card .fb-id {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.fb-card .fb-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.fb-card .fb-title {
  font-size: 15px;
  line-height: 1.2;
}
.fb-card .fb-meta {
  color: #333;
}
.fb-card .fb-num {
  display: inline-block;
  flex: 0 0 auto;
  min-width: 20px;
  padding: 0 4px;
  box-sizing: border-box;
  border: 1.5px solid #000;
  border-radius: 4px;
  background: #fff;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}
.fb-card .fb-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: 0 0 auto;
}
.fb-card .fb-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}
.fb-card .fb-status {
  border: 1px solid #000;
  padding: 0 5px;
  margin-top: 2px;
  font-weight: 700;
  background: #fff;
}
.fb-card .fb-feedback {
  border: 1px solid #000;
  padding: 4px 6px;
  font-size: 11px;
  white-space: pre-line;
}
.fb-card .fb-more {
  margin-top: 3px;
  padding-top: 3px;
  border-top: 1px dashed #000;
}
/* Points and Complete/Incomplete: the box beside the Feedback. */
.fb-card .fb-split {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  column-gap: 12px;
  align-items: start;
}
.fb-card .fb-split.is-alone {
  grid-template-columns: 130px;
}
.fb-card .fb-score {
  border: 1px solid #000;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fb-card .fb-score-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.fb-card .fb-score-n {
  font-size: 22px;
  font-weight: 700;
}
.fb-card .fb-score-of {
  font-size: 12px;
}
.fb-card .fb-complete {
  border: 1px solid #000;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fb-card .fb-sq {
  display: inline-flex;
  box-sizing: border-box;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #000;
  background: #fff;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.fb-card .fb-sq.is-on {
  background: #000;
}
.fb-card .fb-complete-word {
  font-size: 15px;
  font-weight: 700;
}
/* The rubric table. */
.fb-card .fb-rb {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  /* 9px; the Feedback Pages step it down for a rubric whose longest words
     do not fit their cells (grade-report.js _rubricTextSize). */
  font-size: var(--fb-rb-size, 9px);
  line-height: 1.25;
}
.fb-card .fb-rb th,
.fb-card .fb-rb td {
  border: 1px solid #000;
  padding: 3px;
  vertical-align: top;
  text-align: left;
  hyphens: manual;
  overflow-wrap: break-word;
}
.fb-card .fb-rb thead th {
  background: #f1f1f1;
  text-align: center;
  font-size: calc(var(--fb-rb-size, 9px) + 0.5px);
  hyphens: none;
}
.fb-card .fb-rb .fb-c1 {
  width: 23%;
}
.fb-card .fb-rb .fb-c2 {
  width: 24%;
}
.fb-card .fb-rb .fb-c3 {
  width: 30%;
}
.fb-card .fb-rb .fb-crit {
  font-weight: 700;
  background: #fff;
  overflow-wrap: normal;
  word-break: keep-all;
}
.fb-card .fb-rb .fb-on {
  position: relative;
  background: #e2e2e2;
  outline: 2.5px solid #000;
  outline-offset: -2.5px;
}
/* The mark sits in the top-right corner over its own line, so it never
   narrows the descriptor beside it and splits a word ("Separate s"). */
.fb-card .fb-rb .fb-on:has(> .fb-mk) {
  padding-top: 16px;
}
.fb-card .fb-rb .fb-mk {
  position: absolute;
  top: 3px;
  right: 3px;
  padding: 0 3px;
  border-radius: 3px;
  background: #000;
  color: #fff;
  font-weight: 700;
}
.fb-card .fb-rb .fb-lvl {
  display: block;
  margin-bottom: 2px;
}
.fb-card .fb-rb tr:has(+ tr.fb-cm) > * {
  border-bottom: 1px dashed #000;
}
.fb-card .fb-rb .fb-cm td {
  border-top: 1px dashed #000;
  border-bottom: 1.5px solid #000;
  font-size: 9.5px;
  padding: 2px 4px 3px;
}
/* Advanced Rubric checks: every check at every level, ticked or not. */
.fb-card .fb-cks {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
  padding-top: 3px;
  border-top: 1px solid #9a9a9a;
  font-weight: 400;
  font-size: calc(var(--fb-rb-size, 9px) - 0.5px);
}
.fb-card .fb-ck {
  display: flex;
  gap: 3px;
  align-items: flex-start;
  min-width: 0;
}
.fb-card .fb-ck > span:last-child {
  min-width: 0;
}
.fb-card .fb-bx {
  box-sizing: content-box;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 1px;
  border: 1px solid #000;
  background: #fff;
  color: #fff;
  font-size: 8px;
  line-height: 9px;
  text-align: center;
  font-weight: 700;
}
.fb-card .fb-bx.is-on {
  background: #000;
}
/* Observations and the Term Comment. */
.fb-card .fb-obs {
  padding: 3px 0;
  border-bottom: 1px dashed #000;
  font-size: 10.5px;
  white-space: pre-line;
}
.fb-card .fb-obs:last-child {
  border-bottom: 0;
}
.fb-card .fb-tags {
  color: #333;
  font-size: 9.5px;
}
.fb-card .fb-para {
  margin: 0;
  font-size: 11px;
}
@media print {
  .fb-card .fb-head,
  .fb-card .fb-rb thead th,
  .fb-card .fb-rb .fb-on,
  .fb-card .fb-rb .fb-mk,
  .fb-card .fb-pill,
  .fb-card .fb-sq.is-on,
  .fb-card .fb-bx.is-on {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ── Feedback Pages (grade-report.js) ──────────────────────────────────
   After the report: a head (the student's name, the
   class, block and term, the page number) and two equal columns of cards,
   16px apart, 12px between cards. The cards are measured at the column's
   width (352px) and placed by those heights, so a column never overflows. */
.fb-sheet .sheet-body {
  align-items: stretch;
}
.fb-page-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 4px;
  border-bottom: 2px solid #000;
  color: #000;
}
.fb-page-who {
  min-width: 0;
}
.fb-page-name {
  font-size: 20px;
  line-height: 1.2;
}
.fb-page-meta,
.fb-page-n {
  font-size: 12px;
  color: #333;
}
.fb-page-n {
  flex: 0 0 auto;
  white-space: nowrap;
}
.fb-cols {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
  align-items: start;
}
.fb-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.fb-col > .fb-card {
  margin-bottom: 0;
}

/* The Teacher Comment's reporting switch: Letter Grade | IE, Language
   Goals or IEP Goals (Generate plan PR 3, the IE and goals mockups). */
.qn-basis {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 10px;
}
.qn-basis-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--text-sm);
  line-height: 1.4;
}
.qn-basis-seg {
  flex: none;
}
.qn-basis-seg .seg-btn {
  white-space: nowrap;
}
/* IE chosen, waiting for its deadline: nothing is saved until a date is
   picked (the calendar opens under the switch). */
.qn-basis.has-cal {
  position: relative;
}
.qn-basis-seg .seg-btn.pending {
  background: var(--seg-thumb);
  color: var(--active);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--active);
}
.qn-req-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
}
.qn-req-row + .qn-req-row,
.qn-gap + .qn-req-row {
  border-top: 1px solid var(--surface-2);
}
.qn-req-row.flag {
  background: var(--report-callout-bg);
}
.qn-req-row.statement {
  background: var(--focus-banner-bg);
}
.qn-req-part {
  width: 92px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 2px;
}
.qn-req-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}
.qn-req-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.qn-req-text {
  font-size: 14.5px;
  line-height: 1.45;
}
.qn-req-source {
  font-size: 12px;
  color: var(--text-2);
}
/* A thin part of the bank, under the row's source line (plan PR 13). */
.qn-pron-note {
  display: block;
  font-size: 12px;
  line-height: 1.4;
  color: var(--score-2-text);
}
.qn-thin-link {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: inherit;
  cursor: pointer;
}
.qn-thin-link:hover {
  text-decoration: underline;
}
.qn-thin-link:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 2px;
  border-radius: 4px;
}
.qn-req-ctrl {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--score-2-text);
  background: var(--surface);
  border: 1px solid var(--report-callout-border);
  border-radius: 7px;
  padding: 3px 9px;
  white-space: nowrap;
  cursor: pointer;
}
.qn-req-ctrl input {
  margin: 0;
}
.qn-req-ctrl:focus-visible,
.qn-req-ctrl:focus-within {
  outline: 2px solid var(--active);
  outline-offset: 2px;
}
.qn-req-row.has-menu {
  position: relative;
}
.qn-line-empty-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.qn-line-empty {
  flex: 1;
  font-size: 13.5px;
  color: var(--text-2);
}
.qn-line-text:focus-visible,
.qn-line-choose:focus-visible,
.qn-line-menu:focus-visible,
.qn-menu-item:focus-visible,
.qn-menu-add:focus-visible,
.qn-line-save:focus-visible,
.qn-line-cancel:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 2px;
}
/* A focused menu item takes the hover fill, whether the menu was opened by
   mouse or keyboard (board C); the focus ring stays keyboard-only. */
.qn-menu-item:focus,
.qn-menu-add:focus {
  background: var(--overlay-hover);
}
.qn-menu-item:focus-visible,
.qn-menu-add:focus-visible {
  outline-offset: -2px;
}
.qn-line-choose {
  flex: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--link);
  padding: 3px 10px;
  border-radius: 7px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.qn-line-menu {
  flex: none;
  font: inherit;
  font-size: 12.5px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 3px 8px 3px 10px;
  white-space: nowrap;
  cursor: pointer;
}
.qn-line-menu.on {
  background: var(--focus-banner-bg);
  border-color: var(--active);
}
.qn-line-edit {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qn-line-input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 14.5px;
  padding: 5px 10px;
  border: 1px solid var(--active);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 0 0 3px var(--focus-banner-bg);
}
.qn-line-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.qn-line-save,
.qn-line-cancel {
  font: inherit;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.qn-line-save {
  border: 0;
  background: var(--active-fill);
  color: #fff;
  font-weight: 600;
}
.qn-line-cancel {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.qn-menu {
  position: absolute;
  top: calc(100% - 6px);
  right: 10px;
  z-index: var(--z-fab);
  width: 470px;
  max-width: calc(100% - 20px);
  box-sizing: border-box;
  background: var(--surface);
  border-radius: 12px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.16),
    0 0 0 1px rgba(0, 0, 0, 0.06);
  padding: 6px;
  display: flex;
  flex-direction: column;
}
/* Opened upward when the row is low in the window (_fitMenus). */
.qn-menu.up {
  top: auto;
  bottom: calc(100% - 6px);
}
.qn-cal.up {
  top: auto;
  bottom: calc(100% - 4px);
}
.qn-menu-head {
  padding: 6px 10px 2px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
}
.qn-menu-item {
  border: 0;
  border-radius: 8px;
  padding: 7px 10px;
  font: inherit;
  text-align: left;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.qn-menu-item:hover {
  background: var(--overlay-hover);
}
.qn-menu-item.on {
  background: var(--focus-banner-bg);
}
.qn-menu-mark {
  width: 14px;
  flex: none;
  color: var(--active);
  font-weight: 700;
}
.qn-menu-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.qn-menu-text {
  font-size: 13.5px;
}
.qn-menu-meta {
  font-size: 11.5px;
  color: var(--text-2);
}
.qn-menu-sep {
  height: 1px;
  background: var(--surface-2);
  margin: 4px 6px;
}
.qn-menu-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
}
.qn-menu-check input {
  margin: 0;
}
.qn-menu-add {
  border: 0;
  background: transparent;
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
  text-align: left;
  color: var(--link);
  cursor: pointer;
}
.qn-menu-own {
  flex-direction: column;
  align-items: stretch;
  padding: 6px 10px;
}

/* The Sentences card's rows (plan PR 11b): a handle, the part, the
   sentence and its source, Other Wording or Edited. */
.qn-srow-handle {
  flex: none;
  width: 12px;
  padding-top: 3px;
  color: var(--text-3);
  cursor: grab;
  display: flex;
  border-radius: 4px;
}
.qn-srow-handle:active {
  cursor: grabbing;
}
.qn-srow-handle:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 2px;
}
.qn-srow.best {
  background: var(--qn-best-bg);
}
/* The attendance sentence, newly added (the States mockup). */
.qn-srow.attendance {
  background: var(--qn-att-bg);
}
.qn-srow.dragging {
  opacity: 0.35;
}
/* A row put in just now (the InsertRows mockup): a tint that fades. */
.qn-srow.added {
  background: var(--qn-new-bg);
  animation: qn-added 5s ease-in forwards;
}
@keyframes qn-added {
  0%,
  60% {
    background-color: var(--qn-new-bg);
  }
  100% {
    background-color: transparent;
  }
}

/* Browse Sentences: the sheet over the page. The tabs and the Fits | All
   switch are the app's sliders (.seg, .seg-btn); Done, Use, Remove and
   Write Your Own are its buttons (.btn). */
.qn-browse-overlay {
  padding: 30px 40px;
}
.qn-browse {
  --qn-inuse-bg: #f5f9ff;
  width: min(820px, 100%);
  margin: 0 auto;
  background: var(--bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  font-size: var(--text-base);
  color: var(--text);
}
@media (prefers-color-scheme: dark) {
  .qn-browse {
    --qn-inuse-bg: rgba(10, 132, 255, 0.12);
  }
}
.qn-browse-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--surface-2);
}
.qn-browse-title {
  flex: 1;
  font-size: var(--text-xl);
  font-weight: 700;
}
.qn-browse-search {
  width: 220px;
  height: 32px;
  box-sizing: border-box;
  font: inherit;
  font-size: var(--text-base);
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--seg-track);
  color: var(--text);
}
.qn-browse-search:focus {
  background: var(--surface);
}
.qn-browse-search:focus-visible,
.qn-browse .btn:focus-visible,
.qn-browse .seg-btn:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 2px;
}
.qn-browse-body {
  padding: 14px 18px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.qn-browse-parts {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  scrollbar-width: none;
}
.qn-browse-tab,
.qn-browse-fits .seg-btn {
  height: 28px;
  padding: 0 8px;
  line-height: 1;
  border-radius: 6px;
  font-size: var(--text-base);
}
.qn-browse-tab {
  flex: 1 1 0;
  min-width: max-content;
}
.qn-browse-fits .seg-btn {
  min-width: 124px;
}
.qn-browse-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.qn-browse-listwrap {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.qn-browse-list {
  overflow-y: auto;
}
/* The cases: a heading per case that opens and closes its sentences. */
.qn-browse-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px 8px;
  border: 0;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.qn-browse-head svg {
  flex: none;
  align-self: center;
  color: var(--text-2);
  transition: transform 0.12s;
}
.qn-browse-head[aria-expanded='true'] svg {
  transform: rotate(90deg);
}
.qn-browse-head:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: -2px;
}
.qn-browse-head-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qn-browse-head-n {
  flex: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.qn-browse-group-rows[hidden] {
  display: none;
}
.qn-browse-none {
  padding: 10px 16px 12px;
  font-size: 13px;
  color: var(--text-3);
}
.qn-browse-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  box-sizing: border-box;
  padding: 8px 12px 8px 16px;
  border-top: 1px solid var(--divider-subtle);
  background: var(--surface);
  transition: background-color var(--duration-micro) ease;
}
.qn-browse-row:hover {
  background: var(--overlay-hover);
}
.qn-browse-row.on {
  background: var(--qn-inuse-bg);
}
.qn-browse-sentence {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  line-height: 1.4;
}
.qn-chip-yours {
  flex: none;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--score-4-bg);
  color: var(--score-4-text);
}
/* How many other students in the class have the sentence. */
.qn-browse-shared {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 11px;
  background: var(--divider-subtle);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.qn-browse-inuse {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--link);
  white-space: nowrap;
}
.qn-browse-row .btn,
.qn-browse-bar .btn {
  flex: none;
  min-width: 64px;
  white-space: nowrap;
}
.qn-browse-row .btn:disabled {
  color: var(--text-3);
  cursor: not-allowed;
}
/* A search with no match here: where else it matches (Nov 3 sweep). */
.qn-browse-elsewhere {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: 6px;
}
.qn-browse-empty {
  padding: 18px 16px;
  font-size: 13.5px;
  color: var(--text-2);
}
.qn-browse-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0 8px;
  cursor: ns-resize;
  touch-action: none;
}
.qn-browse-handle:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: -2px;
}
.qn-browse-grip {
  width: 44px;
  height: 5px;
  border-radius: 3px;
  background: var(--border);
}

/* The IE deadline calendar: one month, the school year only. */
.qn-req-row.has-cal {
  position: relative;
}
.qn-cal {
  position: absolute;
  right: 10px;
  top: calc(100% - 4px);
  z-index: var(--z-fab);
  width: 280px;
  box-sizing: border-box;
  background: var(--surface);
  border-radius: 12px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.16),
    0 0 0 1px rgba(0, 0, 0, 0.06);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.qn-cal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.qn-cal-title {
  font-weight: 600;
}
.qn-cal-nav {
  display: flex;
  gap: 2px;
}
.qn-cal-nav button {
  border: 0;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 15px;
  padding: 0 6px;
  border-radius: 6px;
  cursor: pointer;
}
.qn-cal-nav button:hover {
  background: var(--overlay-hover);
}
.qn-cal-nav button:disabled {
  opacity: 0.35;
  cursor: default;
}
.qn-cal-week,
.qn-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
}
.qn-cal-week {
  font-size: 11px;
  color: var(--text-2);
}
.qn-cal-grid {
  row-gap: 4px;
}
.qn-cal-day {
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  padding: 4px 0;
  border-radius: 6px;
  cursor: pointer;
}
.qn-cal-day:hover {
  background: var(--overlay-hover);
}
.qn-cal-day.weekend {
  color: var(--text-2);
}
.qn-cal-day.on {
  background: var(--active-fill);
  color: #fff;
  font-weight: 600;
}
.qn-cal-day:disabled {
  color: var(--border-2);
  cursor: default;
  background: transparent;
}
.qn-cal-note {
  font-size: 11.5px;
  color: var(--text-2);
}

/* Approve and Next with something still waiting (an IE's deadline, a
   sentence that no longer matches): pressing it goes to the box, which
   draws this ring once. No motion under Reduce Motion. */
.qn-attn {
  outline: 2px solid var(--active);
  outline-offset: 3px;
  border-radius: 8px;
  animation: qn-attn-ring 180ms ease-out;
}
@keyframes qn-attn-ring {
  from {
    outline-color: transparent;
    outline-offset: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .qn-attn {
    animation: none;
  }
}

/* Suggested for Your Bank (plan PR 10): the teacher's own sentences after a
   class's last comment is approved. */
.qn-bank {
  --qn-bank-chip: #e3eefc;
  width: min(900px, 100%);
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  color: var(--text);
}
@media (prefers-color-scheme: dark) {
  .qn-bank {
    --qn-bank-chip: var(--active-light);
  }
}
.qn-bank-head,
.qn-bank-card,
.qn-bank-out,
.qn-bank-foot {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
}
.qn-bank-head {
  gap: 4px;
}
.qn-bank-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.qn-bank-title {
  font-weight: 600;
  font-size: 15px;
}
.qn-bank-dim {
  color: var(--text-2);
}
.qn-bank-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.qn-bank-card {
  gap: 10px;
}
.qn-bank-from {
  font-size: 11px;
  color: var(--text-2);
}
.qn-bank-sentence {
  font-size: 15px;
  line-height: 1.5;
}
.qn-bank-chips,
.qn-bank-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.qn-bank-chip {
  padding: 3px 8px;
  background: var(--qn-bank-chip);
  border-radius: 6px;
}
.qn-bank-gap {
  flex: 1;
}
.qn-bank-out {
  padding: 12px 16px;
  gap: 4px;
  color: var(--text-2);
}
.qn-bank-out-title {
  font-weight: 600;
  color: var(--text);
}
.qn-bank-foot {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
}
.qn-bank .qn-btn:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 2px;
}

/* A sentence of the teacher's own (Colin, Nov 1): the box under a row of
   the Sentences card, at the end of a part in Browse Sentences, or under
   the sheet's bar; "Add to My Bank" on a typed sentence; the × on a Yours
   row. The advice is orange, like the count. */
.qn-own {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  padding: 6px 0 2px;
}
.qn-own .qn-line-input {
  width: 100%;
  box-sizing: border-box;
}
/* Two lines that wrap, so a long sentence can be read while it is typed. */
.qn-own .qn-own-text {
  display: block;
  line-height: 1.4;
  resize: vertical;
  min-height: calc(2 * 1.4em + 12px);
}
.qn-own-hint,
.qn-own-offered,
.qn-own-label {
  font-size: 12px;
  color: var(--text-2);
}
.qn-own-label {
  font-weight: 600;
}
.qn-own-saved {
  font-size: 13px;
  color: var(--text);
}
.qn-own-why {
  font-size: 12.5px;
  color: var(--score-2-text);
}
.qn-own-out {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.qn-own-out:empty {
  display: none;
}
.qn-own-under {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.qn-own-select {
  font: inherit;
  font-size: 12.5px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  max-width: 100%;
}
.qn-own-add {
  flex: none;
  border: 0;
  background: transparent;
  padding: 2px 6px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--link);
  white-space: nowrap;
  cursor: pointer;
}
.qn-browse-ownwrap {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 0 0 2px var(--active-fill) inset;
  padding: 6px 14px 10px;
}
.qn-browse-ownwrap .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.qn-browse-del {
  flex: none;
  border: 0;
  background: transparent;
  color: var(--text-3);
  font: inherit;
  font-size: 17px;
  line-height: 1;
  padding: 2px 7px;
  border-radius: 6px;
  cursor: pointer;
}
.qn-browse-del:hover {
  color: var(--text);
  background: var(--overlay-hover);
}
.qn-sel-add {
  flex: none;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--link);
  white-space: nowrap;
  cursor: pointer;
}
.qn-sel-add[hidden] {
  display: none;
}
.qn-own-add:focus-visible,
.qn-browse-del:focus-visible,
.qn-sel-add:focus-visible,
.qn-own-select:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 2px;
}
.qn-line-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
/* The undo toast for a deleted Yours sentence sits over the open sheet. */
.qn-browse-overlay ~ .undo-toast {
  z-index: 10003;
}

/* The class's shared next step, with the Closing row (Nov 2 mockup). */
.qn-shared-step {
  display: block;
  margin-top: 4px;
  font-size: var(--text-sm);
  line-height: 1.4;
  color: var(--text);
}
.qn-shared-step b {
  font-weight: 600;
}
.qn-shared-count {
  color: var(--text-2);
}

/* ── The Term Questionnaire on a phone (Nov 3 sweep) ───────────
   At 375 px the student's name and "Student Dashboard" were squeezed into
   58 px beside the grade and ran into it, the Work Habits labels ran
   together left of their radios, Times Late was cut off, and each
   sentence's text was squeezed between its label and Options. Under
   600 px the grade goes under the name, a habit's name and words go above
   its slider, Attendance wraps, and a sentence's label sits above its
   text. */
@media (max-width: 600px) {
  .qn {
    padding: 12px;
  }
  .qn-head {
    flex-wrap: wrap;
  }
  .qn-who {
    flex-basis: calc(100% - 52px);
  }
  .qn-head-sub {
    white-space: normal;
  }
  .qn-habit-scale,
  .qn-hs {
    width: var(--hs-w);
    justify-self: end;
  }
  .qn-att {
    flex-wrap: wrap;
    gap: 8px 16px;
  }
  .qn-att-head,
  .qn-att-note {
    flex-basis: 100%;
    text-align: left;
  }
}

/* ── Progress Reports on a phone or narrow window (Nov 3 sweep) ──
   The 900 px rule above that gives the canvas the whole width sits before
   .studio's own rule, which won, so under 900 px the canvas kept the
   palette's 272 px column (the palette itself hidden) and the sheets were
   cut off at the left. Placed after it, the canvas takes the full width;
   on a phone the toolbar's buttons and the canvas head wrap so Black,
   Colour, One Student and Everyone stay on screen. */
@media (max-width: 900px) {
  .studio {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 600px) {
  .studio-tools {
    flex-wrap: wrap;
    flex-shrink: 1;
    min-width: 0;
    margin-left: 0;
  }
}
@media (max-width: 600px) {
  /* No room for the inspector's gutter beside a page on a phone: the page
     takes the canvas's width instead of sitting 92 px off its left edge. */
  .rb-preview.studio-pages {
    padding: 12px 12px 32px;
  }
}

/* With 44 px controls on a phone, the toolbar's right-hand group (Ready
   count, ⋯ and Approve and Next) wraps inside
   the page instead of running past its right edge. */
@media (max-width: 600px) {
  .report-toolbar > div:last-child {
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 8px;
    min-width: 0;
    max-width: 100%;
  }
}

/* ── One Report (report-one.js): its parts on the sheet ────────── */
/* The legend's descriptors are a sentence each: they wrap under the word. */
/* (Keyed on the part, not the sheet, so the measuring stage wraps them too.) */
.report-sheet .sheet-cell[data-part='legend'] .report-legend-desc {
  white-space: normal;
}
/* The Assessments table, the Categories summary and the grade line
   (grade-report.js), each a part here. */
.one-part {
  width: 100%;
}
.one-assessments > .report-block-title {
  margin-bottom: 4px;
}

/* ── One look for every part on the sheet (Colin, 2026-11-13) ──────
   Every part prints as the Assessments list does: no box and no rounded
   corners, its name, then its content under a black rule with grey rules
   between rows, so the parts read as one document and a part cut between
   pages reads the same on both. A part led by its own table takes the
   rule from the table's header row; any other part's name is ruled.
   Only on sheets drawn from Nov 13 on (.one-flat, report-one.js and the
   measuring stage): a copy printed before reprints as it went home. */
.one-flat .report-block-box,
.one-flat .report-legend {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.one-flat .report-block-title {
  color: #000;
  font-weight: 700;
}
.one-flat .report-block-box:not(:has(> table, > .report-prof-cols, > .report-legend-items)) > .report-block-title,
.one-flat .report-block-box:not(:has(> table, > .report-prof-cols)) > .report-prof-head,
.one-flat .report-legend > .report-legend-title {
  padding-bottom: 3px;
  margin-bottom: 6px !important;
  border-bottom: 1.5px solid #000;
}
/* The slip's heading with the student's name beside it: one rule under both. */
.one-flat .report-parent-head {
  padding-bottom: 3px;
  margin-bottom: 6px;
  border-bottom: 1.5px solid #000;
}
.one-flat .report-parent-head .report-block-title {
  margin-bottom: 0 !important;
}
.one-flat .report-parent-who,
.one-flat .report-parent-cut-mark {
  color: #000;
}
.one-flat .report-ct th {
  border-bottom: 1.5px solid #000;
  color: #000;
  font-weight: 700;
}
.one-flat .report-ct td {
  border-bottom: 1px solid #d0d0d0;
}
.one-flat .report-ct-group td {
  background: transparent;
  border-bottom: 1px solid #000;
  color: #000;
  padding-top: 7px;
}
.one-flat .report-parent-comments-box,
.one-flat .report-level-pill,
.one-flat .report-glance {
  border-radius: 0 !important;
}
.one-flat .report-strip {
  padding: 0 !important;
}

/* Work Habits (report-blocks.js renderBlockLearnerDimensions) and the
   student's printed reflections: a habit or disposition, what it means
   under it, then the teacher's word and the student's circles. */
.report-habit-intro {
  margin-bottom: 4px;
  font-size: var(--text-xs);
  color: #333;
}
.report-habits-tbl,
.report-reflect-tbl {
  table-layout: auto;
}
.report-habit-k {
  width: 100%;
}
.report-habit-name {
  display: block;
  font-weight: 600;
}
.report-habit-desc {
  display: block;
  font-size: var(--text-2xs);
  font-style: italic;
  color: #444;
  line-height: 1.3;
}
.report-sheet .report-ct .report-habit-t {
  white-space: nowrap;
  font-weight: 700;
  text-align: left;
  padding-right: 14px;
}
.report-sheet .report-ct .report-habit-o {
  width: 74px;
  min-width: 74px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}
/* A teacher's own scale words ("Almost Always, Without Reminders") wrap
   in their column instead of widening it and squeezing the statements. */
.report-sheet .report-reflect-tbl th.report-habit-o {
  white-space: normal;
  vertical-align: bottom;
}
.report-habit-over th {
  border-bottom: 0 !important;
  padding-bottom: 0 !important;
  font-size: var(--text-2xs);
  text-align: center;
}
.report-sheet .report-ct td.report-habit-k,
.report-sheet .report-ct td.report-habit-o {
  padding-top: 6px;
  padding-bottom: 6px;
}
.report-bubble {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 1.5px solid #000;
  border-radius: 50%;
  box-sizing: border-box;
  vertical-align: middle;
}
.report-habit-key {
  margin-top: 5px;
  font-size: var(--text-2xs);
  color: #333;
  line-height: 1.4;
}
.report-reflect-checks {
  margin-top: 10px;
}
.report-reflect-write {
  margin-top: 6px;
}
.report-reflect-q {
  margin-top: 10px;
  break-inside: avoid;
}
.report-reflect-q-label {
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: 2px;
}
/* Writing lines 26px apart: room for a student's handwriting. Each line
   is an element with a bottom border (report-blocks.js _openHtml). They
   were a background pattern, and Chrome's print engine dropped most of
   its one-pixel stripes (Colin, 2026-11-25: the lines did not print). */
.report-write-lines > .report-line {
  height: 26px;
  box-sizing: border-box;
  border-bottom: 1px solid #888;
}
/* The row being added on the page (report-one-words.js), on screen only. */
.report-write-lines.one-w-newlines {
  background: repeating-linear-gradient(to bottom, transparent 0 25px, #888 25px 26px);
}
.report-disp-half .report-ct .report-habit-o {
  width: 40px;
  min-width: 40px;
  font-size: 7pt;
}

/* ── The Sentences card: one box per part (term-questionnaire-redesign-plan,
   slice 1). The rows keep their classes; each part's rows sit in a white box
   under a head line (a tile, the part's name, the evidence at the right).
   The left label column is gone; a row's label stays in the markup for
   readers and is not drawn. ── */
.qn {
  --qn-box-bg: var(--surface);
  --qn-missing-bg: #fff4dc;
  --qn-tint-bg: rgba(0, 102, 204, 0.1);
  /* The link blue on that tint over a grey card is 4.44:1, under the 4.5 small text needs; one step darker passes. */
  --qn-tint-ink: #0058b0;
  --qn-tint-bg-amber: rgba(255, 255, 255, 0.8);
  --qn-btn-bg: rgba(0, 0, 0, 0.04);
  --qn-ev-badge-bg: #fbefd6;
  --qn-ev-badge-text: #7a4a00;
  --qn-ev-track: rgba(0, 0, 0, 0.1);
  --qn-habit: #6b4fbb;
  --qn-missing-ink: #a35f00;
  --qn-obs-fill: #f5f5f7;
  /* Each part's colour (the ring and tint) and its text shade, light and dark. */
  --qn-c-grade: #0066cc;
  --qn-ink-grade: #0062c4;
  --qn-c-bestPiece: #a8690a;
  --qn-ink-bestPiece: #85530a;
  --qn-c-strengths: #2e7d4f;
  --qn-ink-strengths: #25673f;
  --qn-c-habits: #6b4fbb;
  --qn-ink-habits: #5e43a8;
  --qn-c-attendance: #3f6fb5;
  --qn-ink-attendance: #33609f;
  --qn-c-voice: #b83a72;
  --qn-ink-voice: #9a2c5d;
  --qn-c-notHandedIn: #a35f00;
  --qn-ink-notHandedIn: #8a5000;
  --qn-c-nextStep: #0f7b83;
  --qn-ink-nextStep: #0b666d;
  --qn-c-change: #5b5b60;
  --qn-ink-change: #56565b;
}
@media (prefers-color-scheme: dark) {
  .qn {
    --qn-missing-bg: rgba(255, 214, 10, 0.12);
    --qn-tint-bg: rgba(10, 132, 255, 0.18);
    --qn-tint-ink: var(--link);
    --qn-tint-bg-amber: rgba(255, 255, 255, 0.12);
    --qn-btn-bg: rgba(255, 255, 255, 0.08);
    --qn-ev-badge-bg: rgba(255, 214, 10, 0.16);
    --qn-ev-badge-text: #ffd60a;
    --qn-ev-track: rgba(255, 255, 255, 0.16);
    --qn-habit: #a18cf0;
    --qn-missing-ink: #ffd60a;
    --qn-obs-fill: rgba(255, 255, 255, 0.07);
    --qn-c-grade: #4da3ff;
    --qn-ink-grade: #4da3ff;
    --qn-c-bestPiece: #e6b050;
    --qn-ink-bestPiece: #e6b050;
    --qn-c-strengths: #5fc486;
    --qn-ink-strengths: #5fc486;
    --qn-c-habits: #b3a1f5;
    --qn-ink-habits: #b3a1f5;
    --qn-c-attendance: #86b3ea;
    --qn-ink-attendance: #86b3ea;
    --qn-c-voice: #f08ab4;
    --qn-ink-voice: #f08ab4;
    --qn-c-notHandedIn: #ffd60a;
    --qn-ink-notHandedIn: #ffd60a;
    --qn-c-nextStep: #4fc3cb;
    --qn-ink-nextStep: #4fc3cb;
    --qn-c-change: #a1a1a6;
    --qn-ink-change: #a1a1a6;
  }
}
.qn-box {
  position: relative;
  background: var(--qn-box-bg);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 10px 14px 11px;
}
.qn-box + .qn-box {
  margin-top: 8px;
}

/* A card and its sentence light each other when pointed at (slice 7): a
   soft tint and ring in the part's colour. Nothing moves; each part's
   colour is --qn-part. Under Reduce Motion it is not drawn. */
[data-lit='grade'],
.qn-box[data-part='grade'] {
  --qn-part: var(--qn-c-grade);
  --qn-ink: var(--qn-ink-grade);
}
[data-lit='bestPiece'],
.qn-box[data-part='bestPiece'] {
  --qn-part: var(--qn-c-bestPiece);
  --qn-ink: var(--qn-ink-bestPiece);
}
[data-lit='strengths'],
.qn-box[data-part='strengths'] {
  --qn-part: var(--qn-c-strengths);
  --qn-ink: var(--qn-ink-strengths);
}
[data-lit='habits'],
.qn-box[data-part='habits'] {
  --qn-part: var(--qn-c-habits);
  --qn-ink: var(--qn-ink-habits);
}
[data-lit='attendance'],
.qn-box[data-part='attendance'] {
  --qn-part: var(--qn-c-attendance);
  --qn-ink: var(--qn-ink-attendance);
}
[data-lit='voice'],
.qn-box[data-part='voice'] {
  --qn-part: var(--qn-c-voice);
  --qn-ink: var(--qn-ink-voice);
}
[data-lit='notHandedIn'],
.qn-box[data-part='notHandedIn'] {
  --qn-part: var(--qn-c-notHandedIn);
  --qn-ink: var(--qn-ink-notHandedIn);
}
[data-lit='nextStep'],
.qn-box[data-part='nextStep'] {
  --qn-part: var(--qn-c-nextStep);
  --qn-ink: var(--qn-ink-nextStep);
}
[data-tone='change'] {
  --qn-part: var(--qn-c-change);
  --qn-ink: var(--qn-ink-change);
}
.qn-box,
.qn-card[data-lit],
.qn-fact[data-lit],
.qn-grade[data-lit] {
  transition:
    box-shadow 0.16s ease,
    background-color 0.16s ease;
}
@media (prefers-reduced-motion: reduce) {
  .qn-box,
  .qn-card[data-lit],
  .qn-fact[data-lit],
  .qn-grade[data-lit] {
    transition: none;
  }
}
.qn-box[data-part='notHandedIn'] {
  background: var(--qn-missing-bg);
}

/* The rows in a box: the handle, the sentence (indented to line up with the
   part's name), the button. */
.qn-box .qn-req-row {
  padding: 0;
  gap: 10px;
  align-items: flex-start;
  border-top: 0;
  margin-top: 5px;
}
.qn-box .qn-req-row + .qn-req-row,
.qn-box .qn-gap + .qn-req-row {
  border-top: 0;
}
.qn-box .qn-req-part {
  display: none;
}
.qn-box .qn-srow-handle {
  width: 22px;
  height: 26px;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.qn-box .qn-req-body {
  padding-top: 2px;
}
.qn-box .qn-req-text,
.qn-box .qn-line-text {
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
}
.qn-box .qn-req-row.flag {
  background: var(--report-callout-bg);
  border-radius: 8px;
  padding: 4px 8px;
  margin-left: -8px;
  margin-right: -8px;
}
.qn-box[data-part='notHandedIn'] .qn-req-row.flag {
  background: transparent;
  padding: 0;
  margin-left: 0;
  margin-right: 0;
}
.qn-box .qn-req-row.statement,
.qn-box .qn-srow.best,
.qn-box .qn-srow.attendance {
  background: transparent;
}
.qn-box .qn-srow.added {
  background: var(--qn-new-bg);
  border-radius: 8px;
  padding: 4px 8px;
  margin-left: -8px;
  margin-right: -8px;
}
.qn-box .qn-line-menu {
  min-height: 26px;
  border: 0;
  border-radius: 7px;
  background: var(--qn-btn-bg);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  padding: 0 10px;
}
.qn-box .qn-line-menu.on {
  background: var(--focus-banner-bg);
  box-shadow: inset 0 0 0 1px var(--active);
}
.qn-box .qn-line-choose {
  min-height: 26px;
  border: 0;
  border-radius: 7px;
  background: var(--qn-tint-bg);
  color: var(--link);
  font-size: 12.5px;
  font-weight: 600;
  padding: 0 10px;
}
.qn-box .qn-line-choose.on {
  box-shadow: inset 0 0 0 1px var(--active);
}
.qn-box[data-part='notHandedIn'] .qn-line-choose {
  background: var(--qn-tint-bg-amber);
}
.qn-box .qn-line-empty-row {
  display: flex;
}
@media (max-width: 600px) {
}
.qn-add-sentence:focus-visible,
.qn-gap-add:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 2px;
}
/* The gap between two sentences or two boxes takes the room the space
   between them took, so nothing moves. The line and the pill are drawn
   over it after the pointer rests (180 ms) or at once on keyboard focus. */
.qn-box .qn-gap {
  position: relative;
  height: 5px;
  margin: 0 -14px;
  z-index: 2;
}
.qn-box .qn-gap + .qn-req-row {
  margin-top: 0;
}
.qn-box .qn-gap:last-child {
  height: 11px;
}
.qn-box:has(> .qn-gap:last-child) {
  padding-bottom: 0;
}
/* The part of the hover area that lies in the space between two boxes. */
.qn-box .qn-gap:last-child::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 8px;
}
.qn-gap-add {
  position: absolute;
  z-index: 1;
  left: 44px;
  top: -6px;
  height: 18px;
  border: 0;
  border-radius: 9px;
  background: #0066cc;
  color: #fff;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 18px;
  padding: 0 9px;
  white-space: nowrap;
  box-shadow: 0 0 0 2px var(--qn-box-bg);
  opacity: 0;
  cursor: pointer;
  transition: opacity 1ms;
}
.qn-box .qn-gap:last-child .qn-gap-add {
  top: calc(100% - 5px);
}
.qn-box[data-part='notHandedIn'] .qn-gap-add {
  box-shadow: 0 0 0 2px var(--qn-missing-bg);
}
.qn-box .qn-gap:hover .qn-gap-line,
.qn-box .qn-gap:hover .qn-gap-add {
  opacity: 1;
  transition-delay: 180ms;
}
.qn-box .qn-gap:focus-within .qn-gap-line,
.qn-box .qn-gap:focus-within .qn-gap-add {
  opacity: 1;
  transition-delay: 0s;
}
/* A sentence's own edges lie over the pill, so a click there reaches it. */
.qn-box .qn-srow .qn-req-text {
  position: relative;
  z-index: 3;
  cursor: text;
}
.qn-box .qn-srow.editing {
  position: relative;
  z-index: 6;
}
/* The writing box at a gap: the choices as tinted buttons under it. */
.qn-own-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.qn-own-pick {
  min-height: 26px;
  border: 0;
  border-radius: 7px;
  background: var(--qn-tint-bg);
  color: var(--link);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 0 10px;
  cursor: pointer;
}
.qn-own-pick:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 2px;
}
.qn-box .qn-own-gap {
  flex: 1;
  min-width: 0;
}

/* ── Dragging and motion (slice 5) ── */
.qn-box .qn-srow-handle {
  touch-action: none;
  user-select: none;
}
/* The lifted sentence: its own background rings it, a long shadow lifts it,
   it is a little larger and follows the pointer. */
.qn-box .qn-srow.lifted {
  position: relative;
  z-index: 20;
  background: var(--lift-bg, var(--qn-box-bg));
  border-radius: 12px;
  box-shadow:
    0 0 0 6px var(--lift-bg, var(--qn-box-bg)),
    0 14px 34px 6px rgba(0, 0, 0, 0.2);
  cursor: grabbing;
}
.qn-slot {
  position: absolute;
  left: 8px;
  right: 8px;
  background: #dbe8fa;
  border-radius: 12px;
  z-index: 1;
  pointer-events: none;
}
.qn-box .qn-srow,
.qn-box .qn-req-row.flag {
  transition: background-color 150ms ease;
}
@media (prefers-reduced-motion: reduce) {
}
@media (prefers-color-scheme: dark) {
}
.qn-ev-bars-btn:focus-visible,
.qn-hm-step:focus-visible,
.qn-habit-note button:focus-visible,
.qn-add-btn:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 2px;
}
.qn-hm-step {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 0 0 3px;
  cursor: pointer;
}
.qn-hm-step > span {
  width: 5px;
  border-radius: 2px;
  background: var(--qn-ev-track);
}
.qn-hm-step.lit > span {
  background: var(--qn-habit);
}
.qn-hm-step:hover {
  background: rgba(107, 79, 187, 0.12);
}
@media (prefers-color-scheme: dark) {
}

/* ── The BC Proficiency Scale as steps (report-legend.js) ──────────
   A bar from light grey to black, Emerging to Extending, over the four
   levels, and the word that tells them apart in bold. Black and grey
   only: a printed report is never in colour. Older printed copies have
   none of these classes and print as they went home. Emerging's grey is
   dark enough to survive a photocopier. */
.report-legend-steps .report-legend-items {
  column-gap: 3px;
}
.report-legend-steps.report-legend-half .report-legend-items {
  row-gap: 10px;
}
.report-legend-step {
  height: 8px;
  margin-bottom: 7px;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
.report-legend-step-1 {
  background: #b3b3b3;
}
.report-legend-step-2 {
  background: #858585;
}
.report-legend-step-3 {
  background: #4d4d4d;
}
.report-legend-step-4 {
  background: #000;
}
.report-legend-steps:not(.report-legend-half) .report-legend-step-1 {
  border-radius: 999px 0 0 999px;
}
.report-legend-steps:not(.report-legend-half) .report-legend-step-4 {
  border-radius: 0 999px 999px 0;
}
.report-sheet .report-legend-steps .report-legend-word {
  font-size: 10.5pt !important;
  margin-bottom: 2px;
}
.report-legend-steps .report-legend-desc {
  padding-right: 8px;
}
.report-legend-key {
  font-weight: 700;
  color: #000;
}

/* ── The Student Page on a report (report-student-page.js) ─────────
   The code is a little over an inch square: each of its squares is at
   least the printed card's (0.045 in), and white space round it at least
   the card's (0.14 in) once its own one-square margin is counted. */
.report-code-qr {
  width: 1.04in;
  height: 1.04in;
  flex-shrink: 0;
  background: #fff;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
.report-code-qr svg {
  display: block;
  width: 100%;
  height: 100%;
}
/* The letterhead with the code: the class on the code's top line, the
   details down to its foot. */
.report-header.report-header-code {
  align-items: stretch;
  gap: 20px;
}
.report-header-code .report-header-main {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.report-sheet .report-header-code .report-student-name {
  margin-top: 0;
}
.report-header-code-meta {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  gap: 1px 10px;
  font-size: var(--text-xs);
  line-height: 1.35;
  color: var(--text);
}
.report-header-code-meta .report-header-k {
  color: #636366;
}
.report-header-code-qr {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-shrink: 0;
}
.report-header-code-qr .report-code-qr {
  margin-bottom: 0.06in;
}
.report-header-code-label {
  text-align: right;
  font-size: var(--text-xs);
  line-height: 1.35;
  color: #636366;
  padding-bottom: calc(0.06in + 2px);
}
.report-header-code-k {
  font-weight: 700;
  color: var(--text);
}
/* The part: the code, the steps, and the card beside them. */
.report-sp-body {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: 12px;
}
.report-sp-steps {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 10pt;
  line-height: 1.45;
  color: var(--text);
}
.report-sp-card {
  flex: 0 0 190px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding-left: 14px;
  border-left: 1px solid #bbb;
  font-size: var(--text-sm);
  line-height: 1.4;
  color: var(--text);
}
.report-sp-card-k {
  font-size: 10pt;
  font-weight: 700;
  color: #000;
}
.report-sp-lost {
  margin-top: 6px;
}
