/* ================================================================
   math-render.css — AmarPorashona
   Styles for KaTeX math rendering
   Add this link to questions.html head section
================================================================ */

/* KaTeX display math - centered block equations */
.katex-display {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 0;
}

/* Inline math */
.katex {
  font-size: 1em;
  line-height: 1.5;
}

/* Question text with math */
.question-text .katex {
  font-size: 1.05em;
}

/* Option items with math */
.option-item .katex {
  font-size: 0.95em;
}

/* Matrix display */
.katex .mord.mtight {
  font-size: 0.85em;
}

/* Fix overflow on mobile */
@media (max-width: 600px) {
  .katex-display {
    font-size: 0.9em;
  }
  .question-text .katex {
    font-size: 0.95em;
  }
}

/* Error styling */
.katex-error {
  color: #e53e3e;
  font-size: 0.85em;
}

/* Math block for display equations */
.math-block {
  display: block;
  text-align: center;
  margin: 10px 0;
  overflow-x: auto;
}

/* Matrix styling */
.math-matrix {
  display: inline-block;
  vertical-align: middle;
}

/* Fraction styling */
.math-frac {
  display: inline-block;
  text-align: center;
  vertical-align: middle;
}