/* LMSCursio rich editor */
.cursio-editor {
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.cursio-editor__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 8px;
  background: #f7f8fa;
  border-bottom: 1px solid #e4e7ec;
}
.cursio-editor__toolbar button {
  font: 600 13px/1 system-ui, sans-serif;
  padding: 6px 9px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.cursio-editor__toolbar button:hover { background: #eef2ff; border-color: #b4c0ff; }
.cursio-editor__area {
  min-height: 180px;
  padding: 12px 14px;
  outline: none;
  line-height: 1.6;
}
.cursio-editor__area img { max-width: 100%; height: auto; border-radius: 6px; }
.cursio-editor__area table { border-collapse: collapse; }
.cursio-editor__area td, .cursio-editor__area th { border: 1px solid #d0d5dd; padding: 6px 10px; }
.cursio-editor__area pre {
  background: #0f172a; color: #e2e8f0; padding: 12px; border-radius: 8px; overflow: auto;
}
.cursio-math { white-space: nowrap; }

/* Read-only rendered content (pages, questions) reuses image sizing. */
.cursio-content img { max-width: 100%; height: auto; }

/* CursioMath (offline LaTeX renderer) */
.cm-math { font-family: "Cambria Math", "Latin Modern Math", Georgia, serif; white-space: nowrap; }
.cm-display { display: block; text-align: center; margin: 8px 0; }
.cm-frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 2px; }
.cm-frac .cm-num { border-bottom: 1px solid currentColor; padding: 0 4px; }
.cm-frac .cm-den { padding: 0 4px; }
.cm-sqrt { border-top: 1px solid currentColor; padding: 0 3px; }
.cm-root { font-size: 0.7em; }
