:root{
    --text-muted: #8e8ea0;
    --tr-clr: #7171710e;
    --tr-odd-clr: rgba(0, 0, 0, 0.096);
    --updown-shadow: 2px 2px 16px #00000075;
    --box-shadow: 3px 3px 16px #00000079;
    --header-box-shadow: 3px 0px 20px rgba(0, 0, 0, 0.363);
    --white: #fff;
}
.light{
    --header-box-shadow: 3px 0px 20px rgba(0, 0, 0, 0.1);
    --box-shadow: 3px 3px 16px #00000032;
    --updown-shadow: 2px 2px 16px #00000037;
}
.method {
    color: var(--color-white);
    font-family: monospace;
    font-size: 14px;
    letter-spacing: .5px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--dark-bg);
    opacity: 0;
    visibility: hidden;
    left: 100%;
    transition: .3s;
    text-transform: uppercase;
    white-space: nowrap;
    z-index: 11;
}

.method.active {
    visibility: visible;
    opacity: 1;
    left: 0;
}

.method .container {
    padding: 0 8px;
    padding-top: 8px;
    width: 100%;
    margin: auto;
    margin-top: 50px;
    height: calc(100% - 50px);
    overflow: scroll;
    position: relative;
}

.method .container::-webkit-scrollbar {
    background-color: transparent;
    width: 8px;
    height: 8px;
    border-radius: 10px;
}

.method .container::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-clr);
    border-radius: 10px;
}

.method .equations {
    margin-top: 4px;
    margin-bottom: 30px;
    color: var(--text-muted);
}

section.step {
    margin-bottom: 56px;
}

section.step .step-heading {
    margin-bottom: 8px;
    color: var(--text-muted);
}

.step-container {
    margin-left: 30px;
}

.matrix-container {
    display: flex;
    align-items: center;
}

.matrix {
    position: relative;
    padding: 4px;
    margin: 10px;
    margin-right: 30px;
}

.matrix::before,
.matrix::after {
    content: '';
    position: absolute;
    top: 0;
    width: 10px;
    height: 100%;
    border: 2px solid var(--color-white);
}

.matrix::before {
    border-right: none;
    left: 0;
}

.matrix::after {
    border-left: none;
    right: 0;
}

.matrix-3x3 {
    display: grid;
    grid-template-columns: repeat(3, auto);
    grid-template-rows: repeat((3, auto));
}

.matrix-3x4 {
    grid-template-columns: repeat(4, auto);
    grid-template-rows: repeat((3, auto));
    display: grid;
}

.matrix-3x4>div:nth-child(4),
.matrix-3x4>div:nth-child(8),
.matrix-3x4>div:nth-child(12) {
    text-align: right;
    position: relative;
}

.colon {
    position: absolute;
    left: 0;
}

.matrix-3x1 {
    display: grid;
    grid-template-columns: auto;
    grid-template-rows: repeat(3, auto);
}

.matrix>div {
    padding: 8px 16px;
    text-align: center;
}

.mg-left-10 {
    margin-left: 10px;
}

.mg-right-10 {
    margin-right: 10px;
}

.mg-top-10 {
    margin-top: 10px;
}

.mg-btm-10 {
    margin-bottom: 10px;
}

.ans {
    margin: 20px 0;
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 12px 16px;
}

.ans>div,
.formula,
.eliminate {
    box-shadow: var(--box-shadow);
    background-color: var(--dark-box);
    padding: 8px;
}



.ans>div>div:first-child {
    font-size: 14px;
    color: var(--text-muted);
}

h3 {
    color: var(--text-muted);
}

.final.ans>div {
    border: 1px solid white;
}

.method-toggle {
    position: fixed;
    top: 0;
    left: 0;
}

.method>header {
    display: flex;
    align-items: center;
    padding: 8px;
    background-color: var(--dark-box);
    box-shadow: var(--header-box-shadow);
    height: 50px;
    width: 100%;
    position: fixed;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.light .method>header {
    background-color: transparent;
}

.method>header .left {
    display: flex;
    gap: 32px;
    display: none;
}

/* .method>header .left > div{
    border: 1px solid white;
} */
.method>header .left input {
    background-color: transparent;
    outline: none;
    border: 1px solid var(--color-white);
    border-radius: 4px;
    padding: 4px 8px;
    color: var(--color-white);
    max-width: 100px;
}

.method-close {
    background-image: url("images/icon-close.svg");
    position: absolute;
    right: 8px;
}

.light .method-close {
    background-image: url("images/icon-close-dark.svg");
}

.formula {
    display: inline-block;
    margin: 16px 0;
    padding-left: 32px;
    padding-right: 32px;
}

.formula .formula-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
}

.formula-wrapper .cofficient {
    padding: 4px 0;
}

.cofficient {
    text-align: center;
}

.cofficient:first-child {
    border-bottom: 2px solid white;
}

.r {
    display: flex;
    gap: 16px;
    align-items: center;
}

.eliminate {
    border: 2px solid white;
    display: inline-block;
    padding-left: 20px;
    padding-right: 20px;
    margin: 4px 0;
}

.final-ans {
    display: flex;
    gap: 20px;
    margin-bottom: 56px;
}

.final-ans>div {
    width: 100%;
    max-width: 400px;
    text-align: center;
    padding: 20px;
    background-color: var(--dark-box);
    font-weight: 600;
    font-size: 18px;
    box-shadow: var(--box-shadow);
}


.tab {
    margin-left: 20px;
}

.mg-btm-24 {
    margin-bottom: 24px;
}

.mg-left-24 {
    margin-left: 24px;
}

.mg-right-24 {
    margin-right: 24px;
}

.mg-top-24 {
    margin-top: 24px;
}

.f {
    text-transform: lowercase;
}

.numerator {
    padding: 0 4px;
    margin: 0 12px;
    border-bottom: 2px solid var(--color-white);
    text-align: center;
}

.denominator {
    padding: 0 4px;
    margin: 0 12px;
    text-align: center;
}

table {
    /* border: 1px solid white; */
    overflow: hidden;
    border-collapse: collapse;
    border-radius: 8px;
}

table tr {
    background-color: var(--tr-clr);
}

table tbody tr:nth-child(odd) {
    background-color: var(--tr-odd-clr);
}

thead {
    background-color: var(--blue);
    color: white;
}

thead td {
    text-align: center;
    font-weight: 600;
}

.difference-table td {
    border: none;
}

.difference-table tbody td:nth-child(2) {
    border-right: 1px solid white;
}


.equations table td:first-child {
    background-color: var(--blue);
    color: white;
}

td {
    padding: 8px 16px;
}

.equations td:first-child {
    border-right: 1px solid white;
}

.updown {
    cursor: pointer;
    width: 44px;
    aspect-ratio: 1;
    border-radius: 50%;
    background-color: var(--dark-bg);
    background-image: url('images/icon-previous.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 8px;
    position: fixed;
    bottom: 10px;
    right: 10px;
    z-index: 1;
    transform: rotate(-90deg);
    box-shadow: var(--updown-shadow);
}

.updown.active {
    background-image: url('images/icon-next.svg');
}

.light .updown {
    background-image: url('images/icon-previous-dark.svg');
}

.light .updown.active {
    background-image: url('images/icon-next-dark.svg');
}

.updown:hover {
    background-color: var(--hover-dark);
}

@media screen and (max-width: 400px) {
    .method>header .left {
        gap: 10px;
    }
    .method>header .left input {
        max-width: 60px;
    }
}