/* Tables in lesson and article bodies (.content-body) and in hub intros (.pair-table):
   Canvas heading row, White cells, Canvas rules. Width tokens: pages/content.css
   (--lesson-table-width), with a fallback for hub intros, which do not load it. */

.content-body table,
.pair-table {
  width: max-content;
  min-width: min(100%, var(--lesson-table-width, 27.5rem));
  max-width: 100%;
  margin-inline: 0;
  padding: 0;
  table-layout: auto;
  border: 1px solid var(--color-hairline);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: var(--type-table-size);
  font-weight: var(--type-table-weight);
  line-height: var(--type-table-leading);
}

.content-body th,
.content-body td,
.pair-table th,
.pair-table td {
  padding: 0.55rem 1rem;
  border-bottom: 0;
  text-align: left;
}

.content-body th,
.pair-table th {
  background: var(--color-surface-muted);
  color: inherit;
  font-size: inherit;
  font-weight: var(--type-table-heading-weight);
}

.content-body td,
.pair-table td {
  border-top: 1px solid var(--color-hairline);
  background: var(--color-surface);
}

.pair-table--example:not(:has(.example-target)) td:first-child {
  font-style: italic;
}

.pair-table--example td:last-child {
  color: inherit;
  font-style: normal;
}

/* After the last-column rule: the target-language column may be last. */
.pair-table td.example-target {
  font-style: italic;
}
