/* Lecture 5 teaching tables and classwork link. */
.reveal .slides section.slide.level2 table {
  border-collapse: collapse;
  font-size: 0.72em;
  line-height: 1.2;
  margin: 0.58em auto 0.68em;
  width: 88%;
}

.reveal .slides section.slide.level2 table th,
.reveal .slides section.slide.level2 table td {
  border-bottom: 1px solid var(--clean-line);
  padding: 0.24em 0.45em;
  text-align: left;
}

.reveal .slides section.slide.level2 table th {
  border-bottom: 0.11em solid var(--clean-accent);
  font-weight: 800;
}

.reveal .slides section.slide.level2 table tbody tr:nth-child(even) {
  background: var(--clean-surface-soft);
}

.reveal .slides section.slide.level2 table code {
  font-size: 0.94em;
  white-space: nowrap;
}

.reveal .slides section.slide.level2.classwork-slide .classwork-link {
  background: var(--clean-surface-soft);
  border: 1px solid var(--clean-line);
  border-left: 0.22em solid var(--clean-accent-2);
  border-radius: 0.45em;
  font-size: 1.08em;
  font-weight: 800;
  margin: 0.85em auto 0;
  max-width: 80%;
  padding: 0.65em 0.8em;
  text-align: center;
}

.reveal .slides section.slide.level2.classwork-slide .classwork-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35em;
  justify-content: center;
  margin: 0.65em auto 0;
  max-width: 88%;
}

.reveal .slides section.slide.level2.classwork-slide .classwork-targets span {
  background: color-mix(in srgb, var(--clean-accent) 12%, var(--clean-surface));
  border: 1px solid var(--clean-line);
  border-radius: 1em;
  font-size: 0.65em;
  font-weight: 700;
  padding: 0.28em 0.55em;
}

/* The DT callbacks on later slides paint every `thead th` and `tbody tr` in the
   deck with inline jQuery colors, so markdown tables need !important to keep
   the theme's colors. */
.reveal .slides section.slide.level2 table:not(.dataTable) thead th {
  background-color: var(--clean-heading) !important;
  color: var(--clean-canvas) !important;
}

html[data-clean-theme="dark"] .reveal .slides section.slide.level2 table:not(.dataTable) thead th {
  background-color: #243b58 !important;
  color: #f7fbff !important;
}

.reveal .slides section.slide.level2 table:not(.dataTable) tbody tr {
  background-color: transparent !important;
  color: var(--clean-ink) !important;
}

.reveal .slides section.slide.level2 table:not(.dataTable) tbody tr:nth-child(even) {
  background-color: var(--clean-surface-soft) !important;
}

.reveal .slides section.slide.level2 table:not(.dataTable) thead code {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .4);
  color: inherit;
}

@media (max-width: 900px) {
  .reveal .slides section.slide.level2 table {
    width: 96%;
  }
}

/* Dark mode: line-by-line reveals give each code line class="fragment", so the
   theme's span:not([class]) rule no longer lightens unhighlighted code text. */
html[data-clean-theme="dark"] .reveal pre code > span[id^="cb"] {
  color: var(--clean-code-ink) !important;
}

/* Argument names (num =) and NA, which the theme leaves at light-mode colors. */
html[data-clean-theme="dark"] .reveal code span.at {
  color: #f5c2e7;
}

html[data-clean-theme="dark"] .reveal code span.cn {
  color: #ffa594;
}
