/* Increase the page content width */
.md-grid {
    max-width: 90%;
}

/* Ensures KaTeX elements do not exceed container width */
.katex-display {
    width: 100%;      /* Makes the equation take the full width */
    overflow: hidden; /* Prevents overflow issues */
    box-sizing: border-box; /* Ensures padding is included in width */
}
.katex {
    max-width: 100%;
}


img[src*="#small"] {
    width: 10%;
    display: block;
    margin: auto; /* for centering */
}


/* optional: keep captions consistent */
.md-typeset table caption {
  caption-side: top;
}

/* optional: avoid ugly overflow in fixed layout */
.md-typeset table th,
.md-typeset table td {
  overflow-wrap: anywhere;
}

/* force ALL tables to be full width */
table {
  width: 100% !important;
  max-width: 100% !important;
  table-layout: fixed;
}

/* keep Material typography behavior too */
.md-typeset table {
  width: 100% !important;
  max-width: 100% !important;
  table-layout: fixed;
}

/* caption size + padding */
.md-typeset table caption,
table caption {
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.6rem 0.4rem;   /* vertical | horizontal */
}

/* optional: add space below caption (before table) */
.md-typeset table caption {
  margin-bottom: 0.25rem;
}