/* ============================================
   Code input blocks styling
   ============================================ */
pre.sourceCode {
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 16px;
  margin: 16px 0;
  overflow-x: auto;
}

/* Ensure consistent styling inside code blocks */
pre.sourceCode code {
  background-color: transparent !important;
  padding: 0;
  border: none;
}

/* Comments inside code - same background, just different color */
pre.sourceCode code .co {
  color: #6a737d;
  background-color: transparent !important;
}

/* Function names */
pre.sourceCode code .fu {
  color: #6f42c1;
}

/* Strings */
pre.sourceCode code .st {
  color: #032f62;
}

/* Numbers */
pre.sourceCode code .dv, pre.sourceCode code .fl {
  color: #005cc5;
}

/* ============================================
   Output blocks styling
   ============================================ */
pre.bg-light,
pre:not(.sourceCode):not(.bg-light) {
  background-color: #fefce8 !important;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 16px;
  margin: 16px 0;
  overflow-x: auto;
}

pre.bg-light code,
pre:not(.sourceCode):not(.bg-light) code {
  color: #2c3e50;
  background-color: transparent !important;
}

/* ============================================
   Spacing and layout
   ============================================ */
div.sourceCode {
  margin: 20px 0;
}

.cell {
  margin-bottom: 24px;
}

/* Tables — centered with visible captions */
main .table,
.col-md-9 .table,
.section .table {
  width: fit-content !important;
  max-width: 90% !important;
  margin-top: 16px !important;
  margin-bottom: 16px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

table caption,
.table caption,
.table > caption {
  caption-side: top !important;
  text-align: center !important;
  white-space: nowrap !important;
  color: #333 !important;
  font-weight: 600 !important;
  font-size: 0.95em !important;
  padding-top: 0.5em !important;
  padding-bottom: 0.5em !important;
}

/* Remove syntax highlighting background artifacts */
code span {
  background-color: transparent !important;
}
