/* Mathematik topic bank — stable multi-row answer layout v0.88 */

/*
 * Five single-choice answers no longer have to fit into one row.
 * Desktop: 3 + 2, tablet: 2 + 2 + 1, phone: one per row.
 * This is intentionally CSS-only; MathJax formulas are not measured by JS.
 */
.topic-answer-grid{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
}

.topic-answer-option{
  min-width:0;
}

.topic-answer-option__value{
  min-width:0;
  overflow:visible;
}

/* MathJax expressions themselves are kept intact and receive enough width. */
.topic-answer-option__value mjx-container{
  max-width:100%;
  margin:0 !important;
}

@media(max-width:900px){
  .topic-answer-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

@media(max-width:620px){
  .topic-answer-grid{
    grid-template-columns:1fr !important;
  }
}
