.prose-wrapper table {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
}

.prose-wrapper thead th {
  background: color-mix(in oklab, var(--border) 50%, var(--surface));
}

.prose-wrapper > table {
  border-radius: var(--radius-md);
  overflow: hidden;
  outline: 1px solid var(--border);
}

.prose-wrapper th,
.prose-wrapper td {
  border: 1px solid var(--border);
  padding: 0.5714286em !important;
  max-width: min(32rem, 50vw);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.prose-wrapper thead tr:first-child th,
.prose-wrapper thead tr:first-child td { border-top: none; }

.prose-wrapper tr:last-child th,
.prose-wrapper tr:last-child td { border-bottom: none; }

.prose-wrapper th:first-child,
.prose-wrapper td:first-child { border-left: none; }

.prose-wrapper th:last-child,
.prose-wrapper td:last-child { border-right: none; }

.prose-wrapper .table-block {
  position: relative;
  margin: 2em 0;
}

.prose-wrapper .table-block table {
  margin: 0;
}

.prose-wrapper .table-block-scroll {
  overflow-x: auto;
  border-radius: var(--radius-md);
  outline: 1px solid var(--border);
  outline-offset: -1px;
}
