/* Modul "math": Formeln aus dem MathAddOn, gerendert mit KaTeX */

/* 1. Grund-Schriftgröße harmonisieren (nicht mehr übergroß) */
.katex {
	font-size: 1.05em;
	text-rendering: auto;
}

.math-inline .katex {
	font-size: 1.0em;
}

/* 2. Block-Formeln */
.math-display {
	display: block;
	margin: 1.5rem 0;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

	.math-display > .katex-display {
		margin: 0;
		text-align: center;
	}

	/* Platz für die Scrollbar, damit sie Unterlängen nicht abschneidet */
	.math-display > .katex-display > .katex {
		padding: 0.25em 0;
	}

/* 3. Optimierung für Mobiltelefone */
@media screen and (max-width: 736px) {
	.katex {
		font-size: 0.92em;
	}

	.math-display {
		margin-left: -1rem;
		margin-right: -1rem;
		padding: 0 1rem;
	}

	.math-display .katex {
		font-size: 0.85em; /* Passt Matrizen und breitere Gleichungen sauber auf mobile Displays ein */
	}

	.katex .mtable .arraycolsep {
		min-width: 1px;
	}
}
