:root {
	--bg_color_l: #fbffe0;
	--bg_color_d: #222;
	--text_d: #e0e0e0;
}


@font-face {
	font-family: "lmroman10";
	src: url(fonts/latin_modern_roman/lmroman10-regular.otf);
	font-weight: normal;
	font-style: normal;
}
@font-face {
	font-family: "lmroman10";
	src: url(fonts/latin_modern_roman/lmroman10-italic.otf);
	font-weight: normal;
	font-style: italic;
}

p {
/*
	font: 18pt/28pt "Latin Modern Roman";
*/
	font: 18pt/28pt "lmroman10";
}

math {
	font: 18pt/28pt "lmroman10";
}

sub {
	font-size: 12pt;
}

sup {
	font-size: 12pt;
}

mi {
	font-size: 18pt;
}

mn {
	font-size: 18pt;
}

mo {
	font-size: 18pt;
}

mtext {
	font-size: 18pt;
}

mfrac {
	font-size: 1em;
}

.mlittle {
	font-size: 12pt;
}

.mlittle mn {
	font-size: 12pt;
}

.mlittle mi {
	font-size: 12pt;
}

.mlittle mo {
	font-size: 12pt;
}

.mlittle mtext {
	font-size: 12pt;
}

.mllittle {
	font-size: 7pt;
}

.mllittle mn {
	font-size: 7pt;
}

.mllittle mi {
	font-size: 7pt;
}

.mllittle mo {
	font-size: 7pt;
}

.mllittle mtext {
	font-size: 7pt;
}

.moin {
	margin-left: -0.3em;
}

.sup_back {
	margin-left: -0.6em;
}

.sub-back {
	margin-left: -0.6em;
}
.sub-back1 {
	margin-left: -1.9em;
}

mtd {
	padding: 2px;
}

.quadrat {
	font-size: 30px;
}
.quadrat th {
	min-width: 77px;
}
.prime_number td {
	font-size: 30px;
	width: 55px;
}
.prime_number th {
	font-size: 30px;
	width: 55px;
}

.trigonometry mi {
	font-size: 20px;
}
.trigonometry mn {
	font-size: 20px;
}
.trigonometry mo {
	font-size: 20px;
}
.trigonometry td {
	min-width:60px;
}

span.formula {
	white-space: nowrap;
}
.formula {
	white-space: nowrap;
}

/* матрица */
.matrix {
	border-left: 2px solid #000;
	border-right: 2px solid #000;
	border-radius: 10%/40%;
	width: min-content;
	padding: 0 .7em;
}
.matrix table {
	background-color: var(--bg_color_l);
	border: none;
	font: 18pt/28pt "lmroman10";
}
.matrix td {
	padding: 0 .5em;
	text-align: center;
	white-space: nowrap;
}
.bef_matr {
	padding-right: .6em;
}
.bet_matr {
	padding-left: .6em;
	padding-right: .6em;
}
.frac {
	background-color: var(--bg_color_l);
	border: none;
	font: 18pt/28pt "lmroman10";
	text-align: center;
}
. frac td {
	height: 50%;
}
.m {
	vertical-align: middle;
}

/* определитель */
table.def {
	border: 0;
	font: 18pt/28pt "lmroman10";
	background-color: var(--bg_color_l);
}
.lf {
	border-left: 1.5px solid #000;
}
.rg {
	border-right: 1.5px solid #000;
}
.bor_top {
	border-top: 1px solid #000;
}
.bor_bot {
	border-bottom: 1px solid #000;
}
.def td {
	padding: 0 .5em;
	text-align: center;
}
.def_div {
	margin-left: -0.5em;
}

/* фигурные скобки */
.braces {
	position: relative;
	padding: .3em .5em;
	margin: .2em 0 .2em 1em;
}
.curly {
	width: min-content;
}
.braces::before,
.braces::after,
.curly::before,
.curly::after {
	content: "";
	position:absolute;
	width: .8em;
	height: 25%;
}
.braces::before,
.braces::after {
	left: 0;
	border-left: 2px solid;
}
.braces::before {
	top: 0;
	border-top-left-radius: .8em;
}
.braces::after {
	bottom: 0;
	border-bottom-left-radius: .8em;
}
.curly::before,
.curly::after {
	left: -.8em;
	border-right: 2px solid;
}
.curly::before {
	top: 25%;
	border-bottom-right-radius: .8em;
}
.curly::after {
	bottom: 25%;
	border-top-right-radius: .8em;
}
.braces p {
	padding: 0;
	margin: 0;
	white-space: nowrap;
}


@media (prefers-color-scheme: dark) {
	body {
		background-color: var(--bg_color_d);
		color: #e0e0e0;
	}
	a {
		color: #e0e0e0;
	}
	nav, footer {
		background-color: #111;
	}
	img, figure {
		background-color: #bbb;
	}
	figcaption {
		background-color: var(--bg_color_d);
	}
	#toc, #up {
		background-color: var(--bg_color_d);
	}
	table {
		background-color: #333;
	}
	th {
		background-color: #3d3d3d;
	}
	.links {
		background-color: #3d3d3d;
	}
	.links a:hover {
		background-color: #111;
	}
	
	.matrix {
		border-left: 2px solid var(--text_d);
		border-right: 2px solid var(--text_d);
	}
	.matrix table {
		background-color: var(--bg_color_d);
	}
	.frac {
		background-color: var(--bg_color_d);
	}
	table.def {
		background-color: var(--bg_color_d);
	}
	.lf {
		border-left: 1.5px solid var(--text_d);
	}
	.rg {
		border-right: 1.5px solid var(--text_d);
	}
	.bor_top {
		border-top: 1px solid var(--text_d);
	}
	.bor_bot {
		border-bottom: 1px solid var(--text_d);
	}
	.bg_standart td, .bg_standart th {
		background-color: var(--bg_color_d);
	}
	.bg_standart {
		background-color: var(--bg_color_d);
	}
}
