/* Accepted native teaching tables only; the reader emits this hook on six pages. */
.grammar-details-cnt[data-rlc-teaching-page] .rlc-teaching-table-wrap {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.grammar-details-cnt[data-rlc-teaching-page] .rlc-teaching-table {
  width: 100%;
  max-width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  border-spacing: 0;
  background: #fff;
  color: var(--black2, #141414);
  font-size: 18px;
  line-height: 24px;
  text-align: left;
}

/* Keep native row/column geometry, including the two full-row short answers. */
.grammar-details-cnt[data-rlc-teaching-page] .rlc-teaching-table th,
.grammar-details-cnt[data-rlc-teaching-page] .rlc-teaching-table td {
  padding: 10px 12px;
  border: 1px solid #d9d9d9;
  vertical-align: top;
  text-align: left;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.grammar-details-cnt[data-rlc-teaching-page] .rlc-teaching-table thead th {
  background: var(--light-blueviolet, #eee4ff);
  font-weight: 700;
}

.grammar-details-cnt[data-rlc-teaching-page] .rlc-teaching-table tbody th[scope="row"] {
  background: #f7f7f7;
  font-weight: 600;
}

.grammar-details-cnt[data-rlc-teaching-page] .rlc-teaching-table caption {
  caption-side: top;
  padding: 0 0 12px;
  color: inherit;
  text-align: left;
  font-weight: 600;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

/* Match existing reader type size; retain inline emphasis and paragraph breaks. */
.grammar-details-cnt[data-rlc-teaching-page] .rlc-teaching-table p,
.grammar-details-cnt[data-rlc-teaching-page] .rlc-teaching-table b,
.grammar-details-cnt[data-rlc-teaching-page] .rlc-teaching-table strong {
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

.grammar-details-cnt[data-rlc-teaching-page] .rlc-teaching-table th p,
.grammar-details-cnt[data-rlc-teaching-page] .rlc-teaching-table caption p {
  font-weight: inherit;
}

.grammar-details-cnt[data-rlc-teaching-page] .rlc-teaching-table p + p {
  margin-top: 6px;
}

@media (max-width: 768px) {
  /* These are the reader's existing 16px/22px mobile metrics, not a table reduction. */
  .grammar-details-cnt[data-rlc-teaching-page] .rlc-teaching-table {
    font-size: 16px;
    line-height: 22px;
  }

  .grammar-details-cnt[data-rlc-teaching-page] .rlc-teaching-table th,
  .grammar-details-cnt[data-rlc-teaching-page] .rlc-teaching-table td {
    padding: 8px 6px;
  }
}

@media (max-width: 480px) {
  /* Give dense five-column schemes more text space without resizing their type. */
  .grammar-details-cnt[data-rlc-teaching-page] .rlc-teaching-table[data-rlc-columns="5"] th,
  .grammar-details-cnt[data-rlc-teaching-page] .rlc-teaching-table[data-rlc-columns="5"] td {
    padding-right: 4px;
    padding-left: 4px;
  }
}
