* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;

    font-family: Arial, Helvetica, sans-serif;

    background: #f4f5f4;
    color: #283937;
}

.hidden {
    display: none !important;
}


/* HEADER */

.topbar {
    min-height: 88px;

    padding: 18px 7%;

    background: #ffffff;

    border-bottom: 1px solid #dde4e2;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar h1 {
    color: #193e3b;
    font-size: 25px;
}

.topbar p {
    margin-top: 4px;
    color: #77827f;
}


/* TIMER */

.timer {
    padding: 10px 24px;

    background: #194e49;
    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: #b13d37;
}


/* MAIN */

.container {
    width: min(1150px, 92%);
    margin: 45px auto;
}


/* START */

.start-card,
.result-card {
    max-width: 880px;

    margin: auto;

    padding: 45px;

    background: white;

    border-radius: 20px;

    box-shadow:
        0 8px 32px
        rgba(20, 50, 45, 0.07);

    text-align: center;
}

.badge {
    display: inline-block;

    padding: 7px 15px;
    margin-bottom: 18px;

    background: #e9ede8;
    color: #4e635c;

    border-radius: 20px;

    font-size: 12px;
    font-weight: bold;

    letter-spacing: 0.8px;
}

.start-card h2 {
    color: #193e3b;
    font-size: 35px;
}

.description {
    max-width: 600px;

    margin: 12px auto 30px;

    color: #6f7d79;

    line-height: 1.5;
}


/* STATS */

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 15px;

    margin-bottom: 30px;
}

.stats div {
    padding: 21px;

    background: #f5f7f6;

    border-radius: 12px;
}

.stats strong {
    display: block;

    color: #28695f;

    font-size: 30px;
}

.stats span {
    font-size: 13px;
    color: #77827f;
}


/* MODULES */

.modules {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 20px;

    margin-bottom: 30px;
}

.module-card {
    padding: 24px;

    border: 2px solid #e0e6e4;

    border-radius: 14px;

    text-align: left;
}

.module-card > span {
    color: #276b61;

    font-size: 11px;
    font-weight: bold;
}

.module-card h3 {
    margin: 7px 0 10px;

    font-size: 22px;
}

.module-card p {
    margin-top: 5px;

    color: #65746f;
}

.module-card small {
    display: block;

    margin-top: 10px;

    color: #956b3b;
}


/* 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: #5e6c68;

    line-height: 1.45;
}


/* BUTTON */

button {
    font-family: inherit;
}

.primary-btn {
    padding: 14px 27px;

    background: #286e63;
    color: white;

    border: none;
    border-radius: 9px;

    font-size: 15px;
    font-weight: bold;

    cursor: pointer;

    transition: 0.2s;
}

.primary-btn:hover {
    background: #18554d;
}

.secondary-btn {
    padding: 13px 22px;

    color: #315e57;
    background: white;

    border: 1px solid #a9b9b5;

    border-radius: 9px;

    cursor: pointer;
}

button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}


/* TEST HEADER */

.test-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 14px;
}

.part-label {
    color: #276e63;

    font-size: 12px;
    font-weight: bold;

    letter-spacing: 1px;
}

.test-heading p {
    color: #697773;
}


/* PROGRESS */

.progress {
    height: 7px;

    margin-bottom: 25px;

    background: #dae3e1;

    border-radius: 10px;

    overflow: hidden;
}

#progressFill {
    width: 0;
    height: 100%;

    background: #367f74;

    transition: width 0.25s;
}


/* TEST LAYOUT */

.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 #ced8d5;
    border-radius: 7px;

    cursor: pointer;
}

.question-grid button.answered {
    background: #dcebe7;

    color: #17564e;
}

.question-grid button.current {
    background: #276d63;

    color: white;
}


/* LEGEND */

.legend {
    padding-top: 12px;
    margin-top: 18px;

    border-top: 1px solid #e1e6e5;

    color: #6c7875;

    font-size: 12px;
}

.legend p {
    margin: 7px 0;
}

.legend-current,
.legend-answered {
    width: 12px;
    height: 12px;

    display: inline-block;

    margin-right: 5px;

    border-radius: 3px;
}

.legend-current {
    background: #276d63;
}

.legend-answered {
    background: #dcebe7;
}


/* 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: #eef3f1;
    color: #31645d;

    border-radius: 5px;

    font-size: 12px;
    font-weight: bold;
}

#questionText {
    margin-bottom: 25px;

    font-size: 21px;

    line-height: 1.55;
}


/* ANSWERS */

.choices {
    display: grid;

    gap: 12px;
}

.choice {
    width: 100%;

    padding: 16px;

    background: white;

    border: 2px solid #dfe6e4;

    border-radius: 10px;

    font-size: 16px;

    text-align: left;

    cursor: pointer;

    transition: 0.15s;
}

.choice:hover {
    border-color: #79a39b;
}

.choice.selected {
    background: #e4efec;

    border-color: #286d63;
}


/* GRID RESPONSE */

.grid-area {
    margin-top: 20px;
}

.grid-area label {
    display: block;

    margin-bottom: 8px;

    font-weight: bold;
}

.grid-area input {
    width: 100%;
    max-width: 360px;

    padding: 14px;

    border: 2px solid #d5dfdd;

    border-radius: 8px;

    font-size: 18px;
}

.grid-area input:focus {
    outline: none;

    border-color: #286d63;
}


/* NAVIGATION */

.navigation {
    display: flex;
    justify-content: space-between;

    margin-top: 40px;
}

.submit-btn {
    display: block;

    margin: 25px 0 0 auto;

    padding: 13px 23px;

    background: #955f31;
    color: white;

    border: none;

    border-radius: 8px;

    cursor: pointer;
}


/* RESULT */

.complete-icon {
    width: 70px;
    height: 70px;

    margin: 0 auto 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #e0ece8;
    color: #25695f;

    border-radius: 50%;

    font-size: 34px;
    font-weight: bold;
}

.result-card > p {
    max-width: 600px;

    margin: 12px auto;

    color: #697773;

    line-height: 1.5;
}

.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;

    display: flex;
    flex-direction: column;
    justify-content: center;

    border: 10px solid #dce9e5;

    border-radius: 50%;
}

.score-circle strong {
    color: #25695f;

    font-size: 46px;
}

.score-circle span {
    color: #74807d;
}

.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: #73807c;

    font-size: 12px;
}

.route-result {
    padding: 12px;

    background: #eef4f2;

    border-radius: 8px;
}


/* REVIEW */

.review-area {
    margin: 30px 0;

    text-align: left;
}

.review-area h3 {
    margin-bottom: 15px;
}

.review-item {
    padding: 15px;

    margin: 10px 0;

    background: #f7f8f8;

    border-left: 4px solid #c15048;

    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;
    }

    .navigator {
        order: 2;
    }

    .stats,
    .modules,
    .result-grid {
        grid-template-columns: 1fr;
    }

    .start-card,
    .result-card {
        padding: 30px 20px;
    }

}