@font-face {
  font-family: GOST;
  src: url(../fonts/gost_2.304.ttf);
}

body {
  -ms-user-select: none;
  user-select: none;
  -moz-user-select: none;
  -khtml-user-select: none;
  -webkit-user-select: none;
  font-family: GOST;
  font: 14px;
  margin: 0px;
  padding: 0px;
}

tspan {
  pointer-events: auto;
  cursor: pointer;
}

VarSYM {
  pointer-events: auto;
  cursor: pointer;
}

.lt1 {
  fill: none;
  stroke: black;
  stroke-width: 1;
  stroke-linecap: round;
}

.lt2 {
  fill: none;
  stroke: red;
  stroke-width: 1;
  stroke-linecap: round;
}

.lt3 {
  fill: none;
  stroke: green;
  stroke-width: 1;
  stroke-linecap: round;
}

.TextStyle {
  font: normal 14px GOST;
  margin: 0px;
  padding: 0px;
}

p {
  font-family: GOST;
  font-size: 14px;
  margin: 0 10px 0 30px;
  padding: 0px;
  line-height: 1;
}

h1 {
  font: bold 14px GOST;
  margin: 0 10px 0 10px;
  padding: 0px;
  line-height: 1;
}

a.shifted-anchor {
  display: block;
  position: relative;
  top: -30px;
}

.block {
  display: inline-block;
  vertical-align: middle;
}

input[type="checkbox"] {
  display: none;
}

label {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
}

.innerContextTitle {
  position: relative;
  display: block;
  transform: translateY(-50%);
  max-width: 54px;
  top: 50%;
  margin: 0px 9px 0px 2px;
  overflow: hidden;
}

.innerContext {
  position: relative;
  display: block;
  transform: translateY(-50%);
  max-width: 70px;
  top: 50%;
  margin: 0px auto;
  overflow: hidden;
}

.MenuLevel2 {
  position: relative;
  float: left;
  display: flex;
  flex-flow: row wrap;
  align-items: flex-start;
  justify-content: space-between;
  align-content: flex-start;
  margin: 0px 0px 4px 0px;
  width: 100%;
  padding: 0px 0px 0px 0px;
  overflow: hidden;
}
.fixed-el {
  position: fixed;
  z-index: 900;
  top: 0;
  left: 0;
  right: 0;
  height: 30px;
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  background-color: #2e3c56;
  color: #fff;
  font: normal 14px GOST;
  padding: 0 10px;
}

.fixed-el .centralDiv {
  flex: 0 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  padding: 0 10px;
  max-width: 50%;
}

/* Стили для компактной группы элементов в левой части */
.fixed-el .leftDiv {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  gap: 0; /* Убираем стандартные gap */
  padding-right: 10px;
}

/* Стили для блока с элементами управления */
.fixed-el .leftDiv .block {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}

/* Специфичные стили для проблемных элементов */
#PortretLandscapePage + label,
#ReSolve + label,
#AllPages {
  margin-left: 2px !important; /* Минимальный отступ */
  margin-right: 2px !important;
}

/* Стили для input[type="number"] и AllPages */
#InpPg,
#AllPages {
  width: auto !important;
  margin: 0 2px !important;
  padding: 0 !important;
}

/* Особые стили для чекбоксов */
#PortretLandscapePage + label {
  width: 30px !important; /* Фиксированная ширина */
  margin: 0 2px !important;
}

#ReSolve + label {
  width: 70px !important; /* Фиксированная ширина */
  margin: 0 2px !important;
}

#InpPg {
  width: 30px !important; /* Ширина примерно под 3 цифры */
  min-width: 30px !important;
  max-width: 30px !important;
  padding: 0 2px !important;
  margin: 0 2px !important;
  text-align: center !important; /* Центрируем цифры */
  box-sizing: border-box !important; /* Чтобы padding не увеличивал ширину */
}

/* Стили для правого блока */
.fixed-el .rightDiv {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Прижимаем элементы к левому краю (к центру) */
  flex: 1;
  gap: 5px; /* Зазор между элементами */
  padding-left: 10px; /* Отступ от центрального блока */
}

/* Оптимизация для маленьких экранов */
@media (max-width: 768px) {
  .fixed-el .centralDiv {
    max-width: 40%; /* Уменьшаем ширину центрального блока на маленьких экранах */
    font-size: 12px; /* Уменьшаем размер шрифта */
  }
}

#LabelPortretLandscapePage {
  width: 100px;
  height: 30px;
  border-radius: 0%;
  border: none;
  background-color: inherit;
  position: relative;
  overflow: hidden;
}

#LabelPortretLandscapePage:after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2730%27 height=%2730%27 viewBox=%27144 144 512 512%27%3E%3Cpath fill=%27white%27 d=%27M248.86 173.29c-5.77.01-10.01 5.12-10.08 10.08v433.28c0 5.28 4.8 10.07 10.08 10.08h302.29c5.28 0 10.07-4.8 10.08-10.08v-352.67c0-2.68-1.08-5.36-2.99-7.24l-80.61-80.61c-1.88-1.82-4.48-2.86-7.09-2.84zm10.08 20.15h201.52v70.54c0 5.56 4.51 10.07 10.07 10.07h70.54v332.52H258.94zm221.68 14.17 46.29 46.29h-46.29zm-60.46 157.12c-2.54 0-5.12 1.02-7.09 2.99-3.93 3.93-3.93 10.23 0 14.17l33.22 33.22h-116.82c-5.57 0-10.08 4.51-10.08 10.08s4.51 10.08 10.08 10.08h116.82l-33.22 33.22c-3.93 3.93-4.03 10.33 0 14.17 4.23 4.03 10.16 3.95 14.17 0 16.59-16.64 33.23-33.53 49.91-49.91 2.11-1.85 3.46-4.53 3.46-7.56 0-3.07-1.45-5.71-3.62-7.56-15.77-16.71-33.39-33.22-49.75-49.91-2.03-2.03-4.54-3.01-7.09-2.99z%27 transform=%27rotate%2890 400 400%29%27/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

#LabelReSolve {
  width: 70px;
  height: 18px;
  border-radius: 0%;
  border: 2px solid #4caf50;
  text-align: center;
  background-color: #4caf50;
}

#LabelReSolve:after {
  content: "Расчитано";
  font-size: 14px;
  color: white;
  position: relative;
  background-color: #4caf50;
}

#LabelMathASCII {
  width: 50px;
  height: 18px;
  border-radius: 0%;
  border: 2px solid #fa8072;
  text-align: center;
  background-color: #fa8072;
}

#LabelMathASCII:after {
  content: "MathJax";
  font-size: 14px;
  color: black;
  position: relative;
  background-color: #fa8072;
}

#a:checked ~ label {
  background-color: red;
}

#b:checked ~ label {
  background-color: #00fa9a;
}

#c:checked ~ label {
  background-color: #00bfff;
}

#d:checked ~ label {
  background-color: #9400d3;
}

#LabelForA {
  border: 4px solid red;
}

#LabelForB {
  border: 4px solid #00fa9a;
}

#LabelForC {
  border: 4px solid #00bfff;
}

#LabelForD {
  border: 4px solid #9400d3;
}

#PortretLandscapePage:checked ~ label {
  background-color: inherit;
}

#PortretLandscapePage:checked ~ label:after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2730%27 height=%2730%27 viewBox=%27144 144 512 512%27%3E%3Cpath fill=%27white%27 d=%27M248.86 173.29c-5.77.01-10.01 5.12-10.08 10.08v433.28c0 5.28 4.8 10.07 10.08 10.08h302.29c5.28 0 10.07-4.8 10.08-10.08v-352.67c0-2.68-1.08-5.36-2.99-7.24l-80.61-80.61c-1.88-1.82-4.48-2.86-7.09-2.84zm10.08 20.15h201.52v70.54c0 5.56 4.51 10.07 10.07 10.07h70.54v332.52H258.94zm221.68 14.17 46.29 46.29h-46.29zm-60.46 157.12c-2.54 0-5.12 1.02-7.09 2.99-3.93 3.93-3.93 10.23 0 14.17l33.22 33.22h-116.82c-5.57 0-10.08 4.51-10.08 10.08s4.51 10.08 10.08 10.08h116.82l-33.22 33.22c-3.93 3.93-4.03 10.33 0 14.17 4.23 4.03 10.16 3.95 14.17 0 16.59-16.64 33.23-33.53 49.91-49.91 2.11-1.85 3.46-4.53 3.46-7.56 0-3.07-1.45-5.71-3.62-7.56-15.77-16.71-33.39-33.22-49.75-49.91-2.03-2.03-4.54-3.01-7.09-2.99z%27/%3E%3C/svg%3E");
  transform: translate(-50%, -50%) rotate(0deg);
}

#ReSolve:checked ~ label {
  border: 2px solid #fa8072;
  background-color: #fa8072;
}

#ReSolve:checked ~ label:after {
  content: "Пересчитать";
  color: black;
  background-color: #fa8072;
}

#MathASCII:checked ~ label {
  border: 2px solid #4caf50;
  background-color: #4caf50;
}

#MathASCII:checked ~ label:after {
  content: "ASCII";
  color: white;
  background-color: #4caf50;
}

.button {
  background-color: #4caf50;
  border: none;
  color: white;
  height: 24px;
  padding: 0px 20px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
  margin: 0px 0px;
  cursor: pointer;
  font: normal 14px GOST;
}
.buttonPrevPg {
  background-color: inherit;
  border: none;
  color: white;
  width: 30px;
  height: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2730%27 height=%2730%27 viewBox=%27144 144 512 512%27 stroke-width=%2715%27%3E%3Cpath fill=%27white%27 stroke=%27white%27 d=%27M400 198.48c-111.12 0-201.52 90.4-201.52 201.52S288.88 601.52 400 601.52s201.52-90.4 201.52-201.52S511.12 198.48 400 198.48zm0 392.97c-105.56 0-191.45-85.89-191.45-191.45 0-105.56 85.89-191.45 191.45-191.45 105.56 0 191.45 85.89 191.45 191.45 0 105.57-85.89 191.45-191.45 191.45zm114.54-193.38c-.25-.62-.63-1.18-1.09-1.64l-63.07-63.07c-1.97-1.97-5.16-1.97-7.13 0s-1.97 5.16 0 7.13l54.48 54.47H286.68c-2.79 0-5.04 2.25-5.04 5.04 0 2.78 2.25 5.04 5.04 5.04h207.61l-54.47 54.47c-1.97 1.97-1.97 5.16 0 7.13.98.98 2.27 1.48 3.56 1.48s2.58-.49 3.56-1.48l63.07-63.07c.46-.46.83-1.02 1.09-1.64.51-1.23.51-2.62 0-3.85z%27 transform=%27rotate%2890 400 400%29%27/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.buttonNextPg {
  background-color: inherit;
  border: none;
  color: white;
  width: 30px;
  height: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2730%27 height=%2730%27 viewBox=%27144 144 512 512%27 stroke-width=%2715%27%3E%3Cpath fill=%27white%27 stroke=%27white%27 d=%27M400 198.48c-111.12 0-201.52 90.4-201.52 201.52S288.88 601.52 400 601.52s201.52-90.4 201.52-201.52S511.12 198.48 400 198.48zm0 392.97c-105.56 0-191.45-85.89-191.45-191.45 0-105.56 85.89-191.45 191.45-191.45 105.56 0 191.45 85.89 191.45 191.45 0 105.57-85.89 191.45-191.45 191.45zm114.54-193.38c-.25-.62-.63-1.18-1.09-1.64l-63.07-63.07c-1.97-1.97-5.16-1.97-7.13 0s-1.97 5.16 0 7.13l54.48 54.47H286.68c-2.79 0-5.04 2.25-5.04 5.04 0 2.78 2.25 5.04 5.04 5.04h207.61l-54.47 54.47c-1.97 1.97-1.97 5.16 0 7.13.98.98 2.27 1.48 3.56 1.48s2.58-.49 3.56-1.48l63.07-63.07c.46-.46.83-1.02 1.09-1.64.51-1.23.51-2.62 0-3.85z%27 transform=%27rotate%28-90 400 400%29%27/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.topbutton {
  opacity: 0;
  background-color: inherit;
  border: none;
  color: white;
  width: 30px;
  height: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2716%27 height=%2716%27 fill=%27%23ffffff%27 viewBox=%270 0 16 16%27%3E%3Cpath d=%27M8.707 1.5a1 1 0 0 0-1.414 0L.646 8.146a.5.5 0 0 0 .708.708L2 8.207V13.5A1.5 1.5 0 0 0 3.5 15h9a1.5 1.5 0 0 0 1.5-1.5V8.207l.646.647a.5.5 0 0 0 .708-.708L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293zM13 7.207V13.5a.5.5 0 0 1-.5.5h-9a.5.5 0 0 1-.5-.5V7.207l5-5z%27/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.buttonAll {
  background-color: inherit;
  border: none;
  color: white;
  width: 30px;
  height: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2730%27 height=%2730%27 viewBox=%27144 144 512 512%27%3E%3Cpath fill=%27white%27 d=%27M598.18 261.14h-104.82v-17.68c0-22.57-18.36-40.93-40.93-40.93h-104.87c-22.57 0-40.92 18.36-40.92 40.93v17.68h-104.82c-22.57 0-40.93 18.36-40.93 40.93v254.47c0 22.57 18.36 40.92 40.93 40.92h396.36c22.57 0 40.93-18.36 40.93-40.92v-254.47c0-22.57-18.36-40.93-40.93-40.93zm-417.12 91.27c2.29.21 4.58.35 6.89.35 40.13 0 72.9-31.77 74.68-71.48h274.76c1.79 39.7 34.55 71.48 74.68 71.48 2.31 0 4.6-.14 6.89-.35v153.77c-2.29-.21-4.58-.35-6.89-.35-20 0-38.79 7.79-52.93 21.93-13.35 13.34-20.94 30.85-21.75 49.55l-274.77 0c-1.79-39.7-34.54-71.48-74.68-71.48-2.31 0-4.61.14-6.89.35v-153.77zm437.89-50.35v30.1c-2.28.29-4.57.45-6.89.45-29.02 0-52.77-22.74-54.53-51.32h40.64c11.45 0 20.77 9.32 20.77 20.77zm-292.15-58.61c0-11.45 9.32-20.77 20.77-20.77h104.87c11.45 0 20.77 9.32 20.77 20.77v17.68h-146.41zm-124.98 37.84h40.64c-1.76 28.59-25.51 51.32-54.53 51.32-2.31 0-4.61-.17-6.89-.45v-30.1c0-11.45 9.32-20.77 20.77-20.77zm-20.77 275.24v-30.11c2.28-.28 4.57-.45 6.89-.45 29.02 0 52.77 22.74 54.53 51.32h-40.64c-11.46 0-20.77-9.32-20.77-20.77zm417.12 20.77h-40.64c.8-13.33 6.32-25.77 15.85-35.3 10.33-10.33 24.07-16.02 38.68-16.02 2.31 0 4.61.17 6.89.45v30.1c0 11.45-9.32 20.77-20.77 20.77z%27/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.buttonLocalStorage {
  background-color: inherit;
  border: none;
  color: white;
  width: 30px;
  height: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2724%27 height=%2724%27 viewBox=%270 0 24 24%27%3E%3Cpath fill=%27white%27 d=%27M19 5H5C3.89543 5 3 5.89543 3 7V17C3 18.1046 3.89543 19 5 19H19C20.1046 19 21 18.1046 21 17V7C21 5.89543 20.1046 5 19 5ZM5 7H19V8H5V7ZM19 17H5V9H19V17ZM7 11H17V13H7V11ZM7 14H14V16H7V14Z%27/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

TEX {
  display: none;
}

.LabelCkd {
  width: 15px;
  height: 18px;
  border-radius: 0%;
  border: 2px solid #fa8072;
  text-align: center;
  background-color: #fa8072;
}

.LabelCkd:after {
  content: "X";
  font-size: 14px;
  color: black;
  position: relative;
  background-color: #fa8072;
}

.Ckd:checked ~ label {
  border: 2px solid #4caf50;
  background-color: #4caf50;
}

.Ckd:checked ~ label:after {
  content: "=";
  color: white;
  background-color: #4caf50;
}

.buttonDef {
  background-color: #4caf50;
  border: none;
  color: white;
  height: 22px;
  padding: 0px 5px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
  margin: 0px 0px;
  cursor: pointer;
  font: normal 14px GOST;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

a {
  pointer-events: auto;
}

VarSYM {
  pointer-events: auto;
}

VarSYM[CoefVarEq="a"] {
  color: red;
}

VarSYM[CoefVarEq="b"] {
  color: #00fa9a;
}

VarSYM[CoefVarEq="c"] {
  color: #00bfff;
}

VarSYM[CoefVarEq="d"] {
  color: #9400d3;
}
.list {
  display: flex;
  justify-content: space-between;
  margin-left: 30px;
  margin-right: 80px;
}

.list div:nth-child(2) {
  flex: 1 0;
  border-bottom: 1px dotted #000;
  height: 1em;
  margin: 0 0.4em;
}
.table {
  font-family: GOST;
  font-size: 12px;
  border-collapse: collapse;
  margin-left: 30px;
  width: 80%;
}
.table th,
.table td {
  border: 1px solid #000;
  padding: 5px;
  text-align: center;
  word-wrap: break-word;
}
.table td.left {
  text-align: left;
}
.table td.right {
  text-align: right;
}
.title {
  font-family: GOST;
  font-size: 22px;
  margin-top: 30px;
  margin-bottom: 10px;
  text-align: center;
}

[class*=" js-a-"],
[class*=" rez-a-"] {
  color: red;
}
[class*=" js-b-"],
[class*=" rez-b-"] {
  color: #00fa9a;
}
[class*=" js-c-"],
[class*=" rez-c-"] {
  color: #00bfff;
}
[class*=" js-d-"],
[class*=" rez-d-"] {
  color: #9400d3;
}

[class^="js-a-"],
[class^="rez-a-"] {
  color: red;
}
[class^="js-b-"],
[class^="rez-b-"] {
  color: #00fa9a;
}
[class^="js-c-"],
[class^="rez-c-"] {
  color: #00bfff;
}
[class^="js-d-"],
[class^="rez-d-"] {
  color: #9400d3;
}

[class*=" js-"],
[class*=" rez-"] {
  cursor: pointer;
  pointer-events: auto;
}
[class^="js-"],
[class^="rez-"] {
  cursor: pointer;
  pointer-events: auto;
}
/* Отключаем события для дочерних элементов */

/* [class*=" js-"] * {
  pointer-events: none;
}
[class^="js-"] * {
  pointer-events: none;
} */

.vmodal {
}

.vmodal.open .modal-overlay,
.vmodal.open .modal-window {
  opacity: 1;
  z-index: 1000;
}

.vmodal.hide .modal-overlay,
.vmodal.hide .modal-window {
  opacity: 1;
  z-index: 1000;
}

.vmodal.open .modal-window {
  transform: translateY(100px);
}

.vmodal.open .modal-overlay {
  background: rgba(0, 0, 0, 0.5);
}

.vmodal.hide .modal-window {
  transform: translateY(-200px);
}

.vmodal.hide .modal-overlay {
  background: rgba(0, 0, 0, 0);
}

.modal-window,
.modal-overlay {
  opacity: 0;
  z-index: -1;
}

.modal-overlay {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.2s ease-in;
}

.modal-window {
  width: 650px;
  border-radius: 5px;
  background: #fff;
  margin: 0 auto;
  transform: translateY(-200px);
  transition: transform 0.2s ease-in;
  max-height: 80vh; /* Ограничиваем максимальную высоту */
}

.modal-header {
  padding: 5px 10px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
}

.modal-title {
  font-size: 1.5rem;
}

.modal-close {
  cursor: pointer;
}

.modal-body {
  padding: 10px;
  padding-top: 0;
  overflow-y: auto; /* Вертикальный скролл при необходимости */
  flex: 1; /* Занимает все доступное пространство */
  max-height: calc(80vh - 120px); /* Вычитаем высоту header и footer */
}

.modal-body p {
  margin: 0 0 5px;
}

/* Стиль для скроллбара в modal-body */
.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.modal-footer {
  padding: 5px 10px;
  border-top: 1px solid #eee;
}
.modal-table-header {
  box-sizing: border-box;
}

/* Гарантируем одинаковые отступы для header и body */
.modal-header,
.modal-table-header,
.modal-body {
  padding-left: 20px;
  padding-right: 20px;
}

