.student-report-shell { max-width: 1040px; padding-block: 28px 54px; }
.report-toolbar, .report-actions, .report-period-controls, .report-period-picker { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.report-toolbar { justify-content: space-between; margin-bottom: 22px; }
.report-period-controls { margin-bottom: 24px; justify-content: space-between; }
.report-mode { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: 8px; padding: 4px; background: var(--sheet); }
.report-mode button { border: 0; border-radius: 5px; background: transparent; color: var(--slate); min-height: 44px; padding: 8px 18px; font-size: var(--text-small); }
.report-mode button[aria-pressed="true"] { background: var(--ink); color: var(--sheet); }
.report-period-picker label { display: grid; gap: 3px; color: var(--slate); font-size: var(--text-caption); }
.report-period-picker input { min-height: 44px; min-width: 0; border: 1px solid var(--rule-strong); border-radius: 6px; padding: 7px 10px; background: var(--sheet); color: var(--ink); font-size: var(--text-small); }
.report-step { min-width: 44px; padding-inline: 12px; font-size: 26px; }
.student-report-paper { background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: 12px; padding: 30px 36px 24px; box-shadow: 0 7px 24px #392C4807; }
.report-brand { display: flex; justify-content: space-between; gap: 20px; align-items: center; border-bottom: 1px solid var(--rule); padding-bottom: 18px; }
.report-brand > div { display: flex; align-items: center; gap: 12px; font: 500 20px/1.4 var(--font-display); }
.report-brand img { flex-shrink: 0; }
.report-brand > span { font-size: var(--text-caption); color: var(--slate); }
.report-intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 0; }
.report-period-label { color: var(--brass); font-size: var(--text-small); margin: 0 0 6px; font-weight: 500; }
.report-intro h1 { font: 500 clamp(28px, 3vw, 37px)/1.35 var(--font-display); margin: 0; overflow-wrap: anywhere; }
.report-grade { color: var(--slate); margin: 8px 0 0; font-size: var(--text-small); }
.report-personal-note { font: italic 18px/1.7 var(--font-display); color: var(--slate); border-left: 3px solid var(--yellow); padding-left: 18px; flex-shrink: 0; }
.report-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--oat); border-radius: 8px; padding: 20px 0; }
.report-metrics > div { padding: 0 20px; border-right: 1px solid var(--rule-strong); display: flex; flex-direction: column; }
.report-metrics > div:last-child { border-right: 0; }
.report-metrics span { font-size: var(--text-small); }
.report-metrics strong { font-size: 34px; font-weight: 600; line-height: 1.45; margin: 5px 0; }
.report-metrics small, .report-bar-item small { font-size: var(--text-caption); color: var(--slate); }
.report-comparison { font-size: var(--text-caption); color: var(--slate); margin: 10px 0 22px; }
.report-middle { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
.student-report-paper h2 { font: 500 21px/1.45 var(--font-display); margin: 0; }
.report-section-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 12px; justify-content: space-between; }
.report-section-heading > span { color: var(--slate); font-size: var(--text-caption); }
.report-bars { display: flex; gap: 10px; align-items: end; margin-top: 12px; }
.report-bar-item { display: flex; flex: 1; min-width: 0; align-items: center; flex-direction: column; font-size: var(--text-caption); }
.report-bar-item strong { font-weight: 500; }
.report-bar-track { height: 65px; display: flex; align-items: end; width: min(28px, 80%); border-bottom: 1px solid var(--rule-strong); margin: 3px 0 6px; }
.report-bar-track > div { width: 100%; background: var(--brass); border-radius: 4px 4px 0 0; }
.report-bar-item > small { font-size: 12px; text-align: center; }
.report-skill-row { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 13px 0; border-bottom: 1px solid var(--rule); font-size: var(--text-small); }
.report-skill-row:last-child { border-bottom: 0; padding-bottom: 0; }
.report-skill-row strong { font-weight: 500; }
.report-skill-row small { display: block; font-size: var(--text-caption); color: var(--slate); }
.report-skill-row > span { font-size: 23px; font-weight: 600; }
.report-lessons { padding-top: 24px; }
.report-lesson-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: var(--text-small); table-layout: fixed; }
.report-lesson-table th, .report-lesson-table td { text-align: left; border-bottom: 1px solid var(--rule); padding: 11px 10px; vertical-align: top; }
.report-lesson-table thead th { color: var(--slate); font-size: var(--text-caption); font-weight: 500; }
.report-lesson-table th:first-child { width: 44%; padding-left: 0; }
.report-lesson-table tbody th { font-weight: 500; }
.report-lesson-table small { display: block; color: var(--slate); font-weight: 400; font-size: var(--text-caption); margin-top: 3px; }
.report-lesson-link { background: none; border: 0; color: var(--ink); text-align: left; padding: 0; font: inherit; text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 4px; overflow-wrap: anywhere; }
.report-lesson-link:hover { color: var(--brass); }
.student-name-link { background: none; border: 0; font: inherit; font-weight: 600; color: var(--brass); text-align: left; padding: 6px 0; min-height: 44px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--rule-strong); }
.student-report-row:hover { background: var(--paper); }
.report-footnote { padding-top: 20px; color: var(--slate); font-size: var(--text-caption); line-height: 1.7; }
.report-footnote p { margin: 0 0 10px; }
.report-footnote > div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 18px; }
.report-empty { margin: 16px 0 0; background: var(--paper); padding: 18px; color: var(--slate); font-size: var(--text-small); }
.report-mobile-label, .report-exit-capture { display: none; }
.report-export-status { font-size: var(--text-small); color: var(--slate); margin: -8px 0 16px; }
.report-export-status:empty { display: none; }
.report-capture .site-header, .report-capture .site-footer, .report-capture .report-toolbar, .report-capture .report-period-controls, .report-capture .report-export-status, .report-capture #toast-container { display: none; }
.report-capture .student-report-shell { padding-block: 20px 90px; }
.report-capture .report-exit-capture { display: inline-flex; position: fixed; right: 16px; bottom: 16px; box-shadow: 0 3px 15px #392C4815; }
.report-capture .report-lesson-link { text-decoration: none; }
@media (max-width: 760px) {
  .student-report-shell { padding-inline: 16px; }
  .student-report-paper { padding: 24px 22px; }
  .report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 0; }
  .report-metrics > div:nth-child(2) { border-right: 0; }
  .report-middle { grid-template-columns: 1fr; gap: 24px; }
  .report-personal-note { display: none; }
  .report-brand > span { display: none; }
  .report-period-controls { justify-content: flex-start; }
}
@media (max-width: 480px) {
  .report-toolbar > .btn, .report-actions { width: 100%; }
  .report-actions > .btn { flex: 1; padding-inline: 10px; }
  .student-report-paper { padding-inline: 18px; }
  .report-brand > div { font-size: 18px; gap: 8px; }
  .report-metrics > div { padding-inline: 14px; }
  .report-metrics span { font-size: var(--text-caption); }
  .report-metrics strong { font-size: 30px; }
  .report-bars { gap: 5px; }
  .report-lesson-table thead { display: none; }
  .report-lesson-table tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--rule); padding-bottom: 8px; }
  .report-lesson-table th:first-child { width: auto; grid-column: 1/-1; }
  .report-lesson-table th, .report-lesson-table td { border: 0; padding: 8px 4px 8px 0; }
  .report-lesson-table .report-mobile-label { display: block; font-size: 12px; color: var(--slate); margin-bottom: 4px; }
}
@media print {
  @page { size: A4; margin: 12mm; }
  body:has(#view-student-report:not([hidden])) { background: white; }
  body:has(#view-student-report:not([hidden])) .site-header, body:has(#view-student-report:not([hidden])) .site-footer,
  .report-toolbar, .report-period-controls, .report-exit-capture, .report-export-status, #toast-container { display: none !important; }
  .student-report-shell { max-width: none; padding: 0 !important; }
  .student-report-paper { border: 0; box-shadow: none; padding: 0; border-radius: 0; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .report-lesson-link { text-decoration: none; }
  .report-metrics, .report-middle, .report-intro, .report-lesson-table tr { break-inside: avoid; }
  .report-middle { grid-template-columns: 1.4fr 1fr; }
  .report-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .report-metrics > div:nth-child(2) { border-right: 1px solid var(--rule-strong); }
}
