/* Figures and tables are numbered by hand in the text ("Table 2.1"). Hide Sphinx's book-wide
   automatic number on list-table captions ("Table 1", "Table 2", ...); the PDF build forces numfig on. */
.bd-article table caption .caption-number { display: none; }

/* Tables generated by code cells (e.g. Table 1.1). myst-nb styles them like pandas output:
   fixed column widths, black text and light stripes. Size columns to their content and follow
   the light/dark theme instead. */
.bd-article div.cell_output table { table-layout: auto; color: inherit; }
.bd-article div.cell_output thead { border-bottom-color: var(--pst-color-text-base); }
.bd-article div.cell_output tbody tr:nth-child(odd) { background: var(--pst-color-surface); }

/* Phones: keep table columns apart. Wide tables and equations scroll sideways inside their own box. */
@media (max-width: 576px) {
  .bd-article table { font-size: 0.85em; }
  .bd-article table th,
  .bd-article table td,
  .bd-article div.cell_output th,
  .bd-article div.cell_output td { padding: 0.35em 0.45em; }
  .bd-article div.cell_output table { font-size: 0.8em; }
  .bd-article div.cell_output th,
  .bd-article div.cell_output td { padding: 0.35em 0.3em; }
}

/* "Lab homepage" link in the article header. On phones only the house icon is shown. */
.header-article-items__end { display: flex; align-items: center; }
.lab-home-link { display: inline-flex; align-items: center; gap: 0.4em; margin-right: 0.75rem;
  font-weight: 600; font-size: 0.95rem; color: var(--pst-color-text-base); text-decoration: none; white-space: nowrap; }
.lab-home-link:hover { color: var(--pst-color-primary); text-decoration: none; }
@media (max-width: 576px) { .lab-home-text { display: none; } .lab-home-link { margin-right: 0.25rem; } }
