/**
 * Learner-facing course pages: tables size from cell content (browser auto layout).
 * Opt out: class `table-fill-width` on <table>, or `.matrix-table` inside `.matrix-bracket-wrap`.
 */
.topic-page table:not(.matrix-table),
.subtopic-page table:not(.matrix-table),
.course-overview table:not(.matrix-table) {
  width: max-content;
  max-width: 100%;
  table-layout: auto;
}

.topic-page table.table-fill-width,
.subtopic-page table.table-fill-width,
.course-overview table.table-fill-width {
  width: 100%;
  max-width: 100%;
}

/* Shrink-wrapped scroll when a table is wider than the reading column */
.topic-page .igllm-table-wrap,
.subtopic-page .igllm-table-wrap,
.course-overview .igllm-table-wrap,
.topic-page .data-table-wrap,
.subtopic-page .data-table-wrap,
.course-overview .data-table-wrap,
.topic-page .tool-summary-table-wrap,
.subtopic-page .tool-summary-table-wrap,
.course-overview .tool-summary-table-wrap {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  box-sizing: border-box;
  vertical-align: top;
}

.topic-page .vd-table-wrap,
.subtopic-page .vd-table-wrap {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  vertical-align: top;
}

.topic-page .vd-data-table,
.subtopic-page .vd-data-table {
  width: max-content;
  max-width: 100%;
  table-layout: auto;
}

/* Statistics / LA course wrappers: table fills wrap; wrap hugs content */
.topic-page .data-table-wrap > .data-table,
.subtopic-page .data-table-wrap > .data-table {
  width: max-content;
  max-width: 100%;
  table-layout: auto;
}
