* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: #233938;
    background: #f3f6f5;
}

.hidden {
    display: none !important;
}


/* HEADER */

.topbar {
    min-height: 85px;
    padding: 18px 7%;
    background: white;
    border-bottom: 1px solid #dce5e3;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar h1 {
    color: #173f3c;
    font-size: 25px;
}

.topbar p {
    color: #71807e;
    margin-top: 4px;
}


/* TIMER */

.timer {
    display: flex;
    flex-direction: column;
    text-align: center;

    color: white;
    background: #18544d;

    padding: 10px 24px;
    border-radius: 12px;
}

.timer small {
    font-size: 10px;
    letter-spacing: 1px;
}

.timer strong {
    font-size: 24px;
    margin-top: 3px;
}

.timer.warning {
    background: #b8403a;
}


/* MAIN */

.container {
    width: min(1150px, 92%);
    margin: 45px auto;
}

.card {
    max-width: 880px;
    margin: auto;
    padding: 45px;

    background: white;
    border-radius: 20px;

    box-shadow: 0 7px 30px rgba(20, 60, 55, 0.07);
}


/* START */

.start-card {
    text-align: center;
}

.badge {
    display: inline-block;

    color: #216c61;
    background: #e1f0ec;

    padding: 7px 14px;
    border-radius: 20px;

    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.8px;

    margin-bottom: 17px;
}

.start-card > h2 {
    font-size: 35px;
    color: #173f3c;
}

.intro {
    max-width: 620px;
    margin: 12px auto 30px;

    line-height: 1.6;
    color: #6c7c79;
}


/* STATS */

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 15px;
    margin-bottom: 30px;
}

.stats div {
    padding: 20px;
    background: #f5f8f7;
    border-radius: 12px;
}

.stats strong {
    display: block;
    font-size: 30px;
    color: #247367;
}

.stats span {
    color: #73827f;
    font-size: 13px;
}


/* MODULES */

.modules {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 20px;
    margin-bottom: 28px;
}

.module-card {
    padding: 23px;
    border: 2px solid #e0e9e7;
    border-radius: 13px;

    text-align: left;
}

.module-card > span {
    color: #28766a;
    font-size: 11px;
    font-weight: bold;
}

.module-card h3 {
    font-size: 22px;
    margin: 7px 0 10px;
}

.module-card p {
    color: #637370;
    margin: 5px 0;
}

.module-card small {
    display: block;

    margin-top: 10px;

    color: #9d713f;
}


/* INSTRUCTIONS */

.instructions {
    padding: 24px;

    background: #f6f9f8;
    border-radius: 12px;

    text-align: left;

    margin-bottom: 28px;
}

.instructions h3 {
    margin-bottom: 12px;
}

.instructions ul {
    padding-left: 22px;
}

.instructions li {
    margin: 7px 0;
    color: #5c6d69;
    line-height: 1.45;
}


/* BUTTONS */

button {
    font-family: inherit;
}

.primary {
    padding: 14px 26px;

    color: white;
    background: #277368;

    border: none;
    border-radius: 9px;

    font-size: 15px;
    font-weight: bold;

    cursor: pointer;
}

.primary:hover {
    background: #18594f;
}

.secondary {
    padding: 13px 22px;

    background: white;
    color: #315f59;

    border: 1px solid #a7bbb7;
    border-radius: 9px;

    cursor: pointer;
}

button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}


/* TEST HEADER */

.test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 15px;
}

.part {
    color: #277368;

    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
}

.test-header p {
    color: #687976;
}


/* PROGRESS */

.progress {
    height: 7px;

    background: #dbe5e2;

    border-radius: 10px;
    overflow: hidden;

    margin-bottom: 25px;
}

#progressFill {
    width: 0;
    height: 100%;

    background: #348b7c;

    transition: width 0.25s;
}


/* TEST */

.test-layout {
    display: grid;
    grid-template-columns: 220px 1fr;

    gap: 25px;
}


/* NAVIGATOR */

.navigator {
    height: fit-content;

    padding: 20px;

    background: white;
    border-radius: 15px;

    box-shadow: 0 5px 20px rgba(0,0,0,0.04);
}

.navigator h3 {
    margin-bottom: 15px;
}

.question-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);

    gap: 7px;
}

.question-grid button {
    height: 38px;

    background: white;

    border: 1px solid #cfdbd8;
    border-radius: 7px;

    cursor: pointer;
}

.question-grid button.answered {
    background: #d9ebe6;
    color: #185b50;
}

.question-grid button.current {
    color: white;
    background: #267166;
}


/* LEGEND */

.legend {
    padding-top: 12px;
    margin-top: 18px;

    border-top: 1px solid #e1e8e6;

    color: #6a7976;
    font-size: 12px;
}

.legend p {
    margin: 7px 0;
}

.current-box,
.answered-box {
    display: inline-block;

    width: 12px;
    height: 12px;

    margin-right: 5px;

    border-radius: 3px;
}

.current-box {
    background: #267166;
}

.answered-box {
    background: #d9ebe6;
}


/* QUESTION */

.question-card {
    min-height: 470px;

    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: #edf4f2;
    color: #316a60;

    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 #dfe8e6;
    border-radius: 10px;

    font-size: 16px;
    text-align: left;

    cursor: pointer;
}

.choice:hover {
    border-color: #72a99e;
}

.choice.selected {
    border-color: #287468;
    background: #e3f0ec;
}


/* 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: 350px;

    padding: 14px;

    border: 2px solid #d4e0dd;
    border-radius: 8px;

    font-size: 18px;
}

.grid-area input:focus {
    outline: none;
    border-color: #267166;
}


/* QUESTION BUTTONS */

.question-buttons {
    display: flex;
    justify-content: space-between;

    margin-top: 40px;
}

.submit {
    display: block;

    padding: 13px 22px;
    margin: 25px 0 0 auto;

    background: #9e6433;
    color: white;

    border: none;
    border-radius: 8px;

    cursor: pointer;
}


/* RESULTS */

.result-card {
    text-align: center;
}

.icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 70px;
    height: 70px;

    margin: 0 auto 20px;

    border-radius: 50%;

    background: #dcefe9;
    color: #267166;

    font-size: 35px;
    font-weight: bold;
}

.result-card > p {
    margin: 12px auto;
    max-width: 560px;

    color: #687875;
    line-height: 1.5;
}

.next-module {
    max-width: 360px;

    margin: 25px auto;
    padding: 20px;

    background: #f4f8f7;
    border-radius: 12px;
}

.next-module strong,
.next-module span {
    display: block;
}

.next-module span {
    margin-top: 6px;

    color: #71807d;
}


/* SCORE */

.score-circle {
    width: 160px;
    height: 160px;

    margin: 28px auto;

    display: flex;
    flex-direction: column;
    justify-content: center;

    border: 10px solid #dcece7;
    border-radius: 50%;
}

.score-circle strong {
    color: #236e62;
    font-size: 46px;
}

.score-circle span {
    color: #71817e;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 12px;
    margin: 30px 0;
}

.result-grid div {
    padding: 18px;

    background: #f3f7f6;
    border-radius: 10px;
}

.result-grid strong,
.result-grid span {
    display: block;
}

.result-grid span {
    margin-top: 5px;

    color: #72827f;
    font-size: 12px;
}

.route-result {
    padding: 12px;

    background: #edf5f2;

    border-radius: 8px;
}


/* REVIEW */

.review {
    margin: 30px 0;
    text-align: left;
}

.review h3 {
    margin-bottom: 15px;
}

.review-item {
    padding: 15px;
    margin: 10px 0;

    background: #f7f9f8;

    border-left: 4px solid #c0544c;
    border-radius: 5px;
}

.review-item.correct {
    border-left-color: #319175;
}

.review-item p {
    margin-top: 7px;
    line-height: 1.5;
}


/* FOOTER */

footer {
    padding: 30px;

    text-align: center;

    color: #84918f;
    font-size: 13px;
}


/* RESPONSIVE */

@media (max-width: 800px) {

    .test-layout {
        grid-template-columns: 1fr;
    }

    .question-card {
        order: 1;
    }

    .navigator {
        order: 2;
    }

    .stats,
    .modules,
    .result-grid {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 30px 20px;
    }

    .topbar {
        padding: 15px 4%;
    }

}