/* Same palette as code blocks; table semantics and Markdown alignment survive. */
.markdown-table-scroll {
  box-sizing: border-box; width: 100%; max-width: 100%; margin: 1.1em 0;
  overflow-x: auto; border: 1px solid var(--code-border); border-radius: 10px;
  background: var(--code-bg); color: var(--code-text);
  scrollbar-width: thin; scrollbar-color: var(--code-muted) transparent;
}
.markdown-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: 14px; line-height: 1.6; text-align: left;
}
.markdown-table :is(th, td) {
  box-sizing: border-box; min-width: 7rem; padding: 12px 16px;
  vertical-align: top; overflow-wrap: anywhere;
}
.markdown-table th {
  background: var(--code-heading-bg);
  color: var(--code-text); font-weight: 600; text-align: inherit; border-bottom: 1px solid var(--code-border);
}
.markdown-table :is(th, td) + :is(th, td) { border-left: 1px solid var(--code-border); }
.markdown-table tbody tr + tr td { border-top: 1px solid var(--code-border); }
.markdown-table tbody tr:nth-child(even) { background: rgba(148, 114, 187, .05); }
.markdown-table :is(th, td) > code {
  font: .92em/1.5 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  background: rgba(148, 114, 187, .08); border-radius: 4px; padding: 2px 5px; box-decoration-break: clone;
}
@media (hover: hover) and (pointer: fine) {
  .markdown-table tbody tr:hover { background: rgba(148, 114, 187, .11); }
}
@media (min-width: 1200px) { .markdown-table { font-size: 15px; } }
@media (max-width: 599px) { .markdown-table :is(th, td) { min-width: 6rem; padding: 10px 12px; } }
@media print {
  .markdown-table-scroll { overflow: visible; border-color: #aaa; background: white; color: #111; }
  .markdown-table { table-layout: fixed; font-size: 10pt; }
  .markdown-table :is(th, td) { min-width: 0; padding: 6px; border-color: #aaa !important; }
  .markdown-table thead { display: table-header-group; }
  .markdown-table th { color: #111; background: #eee; }
  .markdown-table tbody tr { background: white !important; break-inside: avoid; }
}
