.question {
    line-height: 1;
    font-size: calc(1.5rem + 1.5vh + 3.5vw);
}

#answer_box {
    display: flex;
    align-self: end;
    overflow: hidden;
    text-align: left;
}

#answer {
    top: 0;
    position: absolute;
    width: 0;
    height: 0;
    visibility: hidden;
}

.num1 {
    color: var(--blue3);
}

.num2 {
    color: var(--orange3);
}

.num3 {
    color: var(--turq);
}

.past_questions .num1,
.past_questions .num2,
.past_questions .num3 {
    color: inherit;
}

.eq {
    white-space: pre;
}

.red {
    margin-left: 5px;
    text-decoration: line-through;
}

.past_questions {
    margin: 17px 0;
    font-size: calc(1rem + 0.5vw);
}

.past_questions div {
    position: relative;
    margin-top: 5px;
    white-space: pre;
}


/* fraction */

.fraction {
    text-align: center;
    display: inline-flex;
    flex-direction: column;
    font-size: 95%;
}

.fraction span:last-child {
    margin-top: 5px;
    padding-top: 3px;
    border-top: 4px solid var(--lightgray);
}

.past_questions .fraction span:last-child {
    margin-top: 0px;
    padding-top: 0px;
    border-width: 2px;
    border-color: inherit;
}

.past_questions .op {
    margin: -2px 2px 0;
}

.eq .fraction:first-child span:first-child {
    color: var(--blue3);
}

.eq .fraction:first-child span:last-child {
    color: var(--orange3);
}

.eq .fraction span:first-of-type {
    color: var(--progress);
}

.eq .fraction span:last-of-type {
    color: var(--coral);
}

.drob .eq,
.drob .past_questions div {
    display: flex;
    align-items: center;
    justify-content: center;
}

.op {
    margin: -9px 10px 0;
}

.eq .small {
    font-size: calc(0.3rem + 0.5vh + 1vw);
}

/* SETTINGS */

.combo_switch a {
    padding: 8px 24px;
    border: var(--border);
    border-bottom: 0;
    color: var(--main);
    font-weight: var(--main_bolder_weight);
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
}

.combo_switch a.active {
    background-color: var(--progress);
    color: #fff;
}

.settings.combo .levels a.btn:not(.secondary)::before {
    background-color: var(--progress);
    box-shadow: 0 4px 0 #634dc5;
}

.negative_switch span {
    padding: 8px 24px;
    border: var(--border);
    border-top: 0;
    color: var(--main);
    font-weight: var(--main_bolder_weight);
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
}

.negative_switch span.active {
    background-color: rgb(255, 223, 224);
    border-color: rgb(255, 223, 224);
    color: var(--red);
}

.settings table {
    background-color: transparent;
}

/* KEYPAD */

.keypad {
    display: none;
}

.keypad section {
    border: 1px solid var(--white);
    border-left-width: 2px;
    border-right-width: 2px;
    display: flex;
    justify-content: stretch;
    flex-direction: row;
    align-items: stretch;
}

.keypad section:last-child {
    border-bottom-width: 2px;
}

.mobile_mode .keypad {
    display: block;
}

.keypad div {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    flex: 1;
    font-size: 30px;
    height: 11vh;
    line-height: 11vh;
    text-align: center;
}

.keypad div:nth-child(2),
#zero {
    border-left: 2px solid var(--white);
    border-right: 2px solid var(--white);
}

#clean, #minus {
    border: 0;
}

.keypad div:active {
    background-color: var(--white);
}

.pow {
    font-size: calc(0.7rem + 1vh + 2vw);
    margin-right: 20px;
    position: absolute;
}

.past_questions .pow {
    color: inherit !important;
    font-size: 16px;
    position: absolute;
    margin-top: -2px;
}

.test_footer {
    align-items: baseline;
}

td {
    font-weight: 500;
    cursor: pointer;
    text-align: center !important;
    position: relative;
}

td.active {
    background-color: var(--accent);
    color: #fff;
}

.combo td.active {
    background-color: var(--secondary_background1);
    color: var(--main);
}

.combo td.selected {
    background-color: var(--progress);
    color: #fff;
}

.levels .box {
    justify-content: center;
    display: none;
    padding: 11px !important;
}

.levels .btn {
    margin: 5px;
    padding-left: 12px;
    padding-right: 12px;
}

.levels .box.active {
    display: flex;
}

.compact .past_questions div:not(:first-child) {
    display: none;
}

.compact .fraction {
    font-size: 75%;
}

@media (min-width: 768px) {
    .keypad section:last-child {
        border-bottom-left-radius: var(--radius);
        border-bottom-right-radius: var(--radius);
    }
}

.smaller_eq .eq,
.smaller_eq #answer_box {
    font-size: 80%;
}

@media (max-width: 1000px) {
    .smaller_eq .eq,
    .smaller_eq #answer_box {
        font-size: 70%;
    }
}

@media (max-width: 600px) {
    .smaller_eq .eq,
    .smaller_eq #answer_box {
        font-size: 50%;
    }
}


.urav_spacer {
    height: 10px;
}

.past_questions .urav_spacer {
    height: 0px;
}

.uravneniya .question {
    position: relative;
}

.iks_wrapper {
    display: flex;
    align-items: center;
}

.past_questions .iks_wrapper {
    display: block;
}

.input_box {
    border: var(--border);
    border-radius: var(--radius);
    border-bottom-width: 4px;
    display: inline-block;
    padding: 5px;
    font-size: 75%;
}

.input_box.wrong {
    color: var(--red);
    border-color: var(--red);
}

.past_questions .input_box {
    border: none;
}

.with_index {
    margin-right: 15px;
    position: relative;
}

.index {
    font-size: calc(0.7rem + 1vh + 2vw);
    position: absolute;
    bottom: -10%;
}

.past_questions .index {
    font-size: 14px;
}

.past_questions .with_index {
    margin-right: 7px;
}

.math_buttons .btn {
    font-size: 30px;
}