/* Bold every cell in the header details block (Name / Class / Year / Average etc.) */
.result_body .result_details td {
  font-weight: bold;
}

/* Fit the whole grade sheet within the page width on screen so it shows in a
   single view (no horizontal scroll). PDF/image exporters that drop the
   scrollbar would otherwise truncate the right-hand columns (GPA, Grade,
   Remarks). Allowing the cells to wrap lets the table shrink to fit. */
.result_body .table-responsive {
  overflow-x: visible;
}
.result_body .grade_sheet.list {
  width: 100%;
  table-layout: auto;
}
.result_body .grade_sheet.list td,
.result_body .grade_sheet.list th {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  padding: 6px 4px;
  font-size: 13px;
}

@media print {
  @page modern-result-page {
    size: 400mm 520mm;
    margin: 10mm;
  }

  body {
    page: modern-result-page;
  }

  /* Header details stay bold in print/PDF too. */
  .result_body .result_details td {
    font-weight: bold !important;
  }

  /* Force the grade sheet to fit the page (no clipped columns on export). */
  .result_body .table-responsive {
    overflow: visible !important;
  }
  .result_body .grade_sheet.list,
  .result_body .grade_sheet.list td,
  .result_body .grade_sheet.list th {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }
}