* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;

    font-family: Arial, Helvetica, sans-serif;

    background: #f3f5f4;
    color: #283a38;
}

.hidden {
    display: none !important;
}


/* HEADER */

.topbar {
    min-height: 88px;

    padding: 18px 7%;

    background: white;

    border-bottom: 1px solid #dde4e2;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar h1 {
    color: #173e3a;
}

.topbar p {
    margin-top: 4px;
    color: #74817e;
}


/* TIMER */

.timer {
    padding: 10px 24px;

    background: #174c47;
    color: white;

    border-radius: 12px;

    display: flex;
    flex-direction: column;

    text-align: center;
}

.timer small {
    font-size: 10px;
    letter-spacing: 1px;
}

.timer strong {
    margin-top: 3px;
    font-size: 24px;
}

.timer.warning {
    background: #ad3733;
}


/* MAIN */

.container {
    width: min(1150px, 92%);

    margin: 45px auto;
}

.main-card {
    max-width: 880px;

    margin: auto;
    padding: 45px;

    background: white;

    border-radius: 20px;

    box-shadow:
        0 8px 30px
        rgba(20, 50, 45, 0.07);

    text-align: center;
}


/* BADGE */

.badge {
    display: inline-block;

    padding: 7px 15px;
    margin-bottom: 18px;

    background: #e2ebe8;
    color: #235e56;

    border-radius: 25px;

    font-size: 12px;
    font-weight: bold;

    letter-spacing: 1px;
}

.main-card > h2 {
    color: #173e3a;

    font-size: 34px;
}

.intro {
    max-width: 650px;

    margin: 12px auto 30px;

    color: #697a76;

    line-height: 1.55;
}


/* STATS */

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 15px;

    margin-bottom: 30px;
}

.stats div {
    padding: 20px;

    background: #f5f7f6;

    border-radius: 12px;
}

.stats strong {
    display: block;

    color: #24665d;

    font-size: 30px;
}

.stats span {
    color: #74817e;

    font-size: 13px;
}


/* MODULES */

.modules {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 20px;

    margin-bottom: 30px;
}

.module-card {
    padding: 24px;

    border: 2px solid #dfe6e4;

    border-radius: 14px;

    text-align: left;
}

.module-card > span {
    color: #28685f;

    font-size: 11px;
    font-weight: bold;
}

.module-card h3 {
    margin: 7px 0 10px;

    font-size: 22px;
}

.module-card p {
    margin: 5px 0;

    color: #66736f;
}

.module-card small {
    display: block;

    margin-top: 10px;

    color: #926536;
}


/* INSTRUCTIONS */

.instructions {
    padding: 24px;

    margin-bottom: 30px;

    background: #f6f8f7;

    border-radius: 12px;

    text-align: left;
}

.instructions h3 {
    margin-bottom: 12px;
}

.instructions ul {
    padding-left: 22px;
}

.instructions li {
    margin: 7px 0;

    color: #5e6d69;

    line-height: 1.5;
}


/* BUTTONS */

button {
    font-family: inherit;
}

.primary {
    padding: 14px 27px;

    background: #286b62;
    color: white;

    border: none;
    border-radius: 9px;

    font-size: 15px;
    font-weight: bold;

    cursor: pointer;
}

.primary:hover {
    background: #17524b;
}

.secondary {
    padding: 13px 22px;

    background: white;
    color: #315d57;

    border: 1px solid #a9b9b5;
    border-radius: 9px;

    cursor: pointer;
}

button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}


/* TEST HEADER */

.test-heading {
    margin-bottom: 15px;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

#partLabel {
    color: #286c62;

    font-size: 12px;
    font-weight: bold;

    letter-spacing: 1px;
}

.test-heading p {
    color: #6a7774;
}


/* PROGRESS */

.progress {
    height: 7px;

    margin-bottom: 25px;

    background: #dbe4e2;

    border-radius: 10px;

    overflow: hidden;
}

#progressFill {
    width: 0;
    height: 100%;

    background: #347d72;

    transition: width 0.25s;
}


/* TEST LAYOUT */

.test-layout {
    display: grid;
    grid-template-columns: 220px 1fr;

    gap: 25px;
}


/* NAVIGATOR */

.question-nav {
    height: fit-content;

    padding: 20px;

    background: white;

    border-radius: 15px;

    box-shadow:
        0 5px 20px
        rgba(0,0,0,0.04);
}

.question-nav h3 {
    margin-bottom: 15px;
}

#questionGrid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);

    gap: 7px;
}

#questionGrid button {
    height: 38px;

    background: white;

    border: 1px solid #ccd8d5;

    border-radius: 7px;

    cursor: pointer;
}

#questionGrid button.answered {
    background: #dcebe6;

    color: #19574e;
}

#questionGrid button.current {
    background: #266a60;

    color: white;
}


/* LEGEND */

.legend {
    padding-top: 12px;
    margin-top: 18px;

    border-top: 1px solid #e0e7e5;

    color: #6b7875;

    font-size: 12px;
}

.legend p {
    margin: 7px 0;
}

.current-key,
.answered-key {
    width: 12px;
    height: 12px;

    display: inline-block;

    margin-right: 5px;

    border-radius: 3px;
}

.current-key {
    background: #266a60;
}

.answered-key {
    background: #dcebe6;
}


/* QUESTION */

.question-card {
    min-height: 480px;

    padding: 35px;

    background: white;

    border-radius: 15px;

    box-shadow:
        0 5px 20px
        rgba(0,0,0,0.04);
}

.category {
    display: inline-block;

    padding: 6px 10px;

    margin-bottom: 20px;

    background: #edf3f1;
    color: #31645d;

    border-radius: 5px;

    font-size: 12px;
    font-weight: bold;
}

#questionText {
    margin-bottom: 25px;

    font-size: 21px;

    line-height: 1.55;
}


/* CHOICES */

#choices {
    display: grid;

    gap: 12px;
}

.choice {
    width: 100%;

    padding: 16px;

    background: white;

    border: 2px solid #dee6e3;

    border-radius: 10px;

    font-size: 16px;

    text-align: left;

    cursor: pointer;
}

.choice:hover {
    border-color: #72a198;
}

.choice.selected {
    background: #e3efeb;

    border-color: #286a61;
}


/* GRID ANSWER */

.grid-area {
    margin-top: 20px;
}

.grid-area label {
    display: block;

    margin-bottom: 8px;

    font-weight: bold;
}

.grid-area input {
    width: 100%;
    max-width: 380px;

    padding: 14px;

    border: 2px solid #d5dfdc;

    border-radius: 8px;

    font-size: 18px;
}

.grid-area input:focus {
    outline: none;

    border-color: #286a61;
}


/* NAVIGATION */

.navigation {
    margin-top: 40px;

    display: flex;
    justify-content: space-between;
}

.submit {
    display: block;

    margin: 25px 0 0 auto;

    padding: 13px 23px;

    background: #955c30;
    color: white;

    border: none;
    border-radius: 8px;

    cursor: pointer;
}


/* RESULTS */

.result-card > p {
    max-width: 600px;

    margin: 12px auto;

    color: #697874;

    line-height: 1.5;
}

.icon {
    width: 70px;
    height: 70px;

    margin: 0 auto 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #dcebe6;
    color: #25685e;

    border-radius: 50%;

    font-size: 35px;
    font-weight: bold;
}

.next-box {
    max-width: 360px;

    padding: 20px;

    margin: 25px auto;

    background: #f4f7f6;

    border-radius: 12px;
}

.next-box strong,
.next-box span {
    display: block;
}

.next-box span {
    margin-top: 6px;

    color: #71807c;
}


/* SCORE */

.score-circle {
    width: 160px;
    height: 160px;

    margin: 28px auto;

    border: 10px solid #dce9e5;

    border-radius: 50%;

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.score-circle strong {
    color: #24665d;

    font-size: 46px;
}

.score-circle span {
    color: #74817d;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 12px;

    margin: 30px 0;
}

.result-grid div {
    padding: 18px;

    background: #f3f6f5;

    border-radius: 10px;
}

.result-grid strong,
.result-grid span {
    display: block;
}

.result-grid span {
    margin-top: 5px;

    color: #73807d;

    font-size: 12px;
}

.route-result {
    padding: 12px;

    background: #edf4f1;

    border-radius: 8px;
}


/* REVIEW */

.review {
    margin: 30px 0;

    text-align: left;
}

.review h3 {
    margin-bottom: 15px;
}

.review-item {
    padding: 15px;

    margin: 10px 0;

    background: #f7f8f8;

    border-left: 4px solid #c25149;

    border-radius: 5px;
}

.review-item.correct {
    border-left-color: #328a70;
}

.review-item p {
    margin-top: 7px;

    line-height: 1.5;
}


/* FOOTER */

footer {
    padding: 30px;

    color: #84908d;

    text-align: center;

    font-size: 13px;
}


/* MOBILE */

@media (max-width: 800px) {

    .test-layout {
        grid-template-columns: 1fr;
    }

    .question-card {
        order: 1;
    }

    .question-nav {
        order: 2;
    }

    .stats,
    .modules,
    .result-grid {
        grid-template-columns: 1fr;
    }

    .main-card {
        padding: 30px 20px;
    }

    .topbar {
        padding: 15px 4%;
    }

}