#allaround:has(#subjectsQuiz) {
    background-color: #0b9795 !important;
    background-image: var(--ct-master-background-image) !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
}

.centre-column:has(#subjectsQuiz) > .page_title { box-sizing: border-box; height: 10%; padding-inline-start: 0; }
.centre-column:has(#subjectsQuiz) > .shared_body { height: 90%; padding-bottom: 0; }
.quiz-main-panel, #subjectsQuiz { box-sizing: border-box; width: 100%; height: 100%; min-height: 0; }
#subjectsQuiz { padding: clamp(8px,1.3vh,15px) clamp(10px,1.3vw,20px) clamp(10px,1.5vh,18px); }

#subjectsQuiz .quiz-activity-card {
    display: flex; box-sizing: border-box; width: 100%; height: 100%; min-height: 0;
    padding: clamp(12px,1.55vh,20px) clamp(14px,1.6vw,24px); flex-direction: column; overflow: hidden;
    border: 1px solid rgba(0,128,125,.16); border-radius: var(--ct-radius-panel);
    background: linear-gradient(145deg,var(--ct-surface) 0%,#fffdf8 100%); box-shadow: var(--ct-shadow-panel);
}

#subjectsQuiz .quiz-summary { display: flex; flex: 0 0 auto; gap: clamp(18px,3vw,44px); align-items: flex-start; justify-content: space-between; padding: 0 4px clamp(7px,1vh,12px); }
#subjectsQuiz .quiz-heading-row { display: flex; gap: 10px; align-items: center; }
#subjectsQuiz .quiz-instruction-block h1 { margin: 0; color: #007f7c; font-size: clamp(23px,2.35vw,33px); font-weight: 780; line-height: 1.08; }
#subjectsQuiz .quiz-instruction-block p { margin: 4px 0 0; color: var(--ct-muted); font-size: clamp(16px,1.5vw,21px); font-weight: 560; }
#subjectsQuiz .quiz-progress { width: min(28%,260px); min-width: 190px; padding-top: 3px; }
#subjectsQuiz .quiz-progress > div { color: var(--ct-ink); font-size: clamp(17px,1.5vw,21px); font-weight: 720; text-align: right; }
#subjectsQuiz .quiz-progress-track { display: block; height: 10px; margin-top: 7px; overflow: hidden; border-radius: 999px; background: #dfe4e3; }
#subjectsQuiz .quiz-progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--ct-brand-teal); transition: width 300ms ease; }

#subjectsQuiz .quiz-question-panel { display: flex; min-height: 45px; padding: clamp(5px,.7vh,9px) clamp(10px,1vw,16px); flex: 0 0 auto; align-items: center; justify-content: center; gap: 11px; }
#subjectsQuiz .quiz-question-panel h2 { max-width: 85%; margin: 0; color: var(--ct-ink-strong); font-size: clamp(21px,2.15vw,30px); font-weight: 730; line-height: 1.15; text-align: center; }

#subjectsQuiz #quiz_grid.quiz-answer-grid {
    display: grid; width: min(82%,880px); min-height: 0; margin: 0 auto; padding: clamp(5px,.7vh,9px) 0;
    flex: 1 1 auto; align-items: stretch; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(10px,1.4vh,16px) clamp(16px,2vw,28px);
}

#subjectsQuiz .quiz-cell {
    display: flex; position: relative; box-sizing: border-box; min-width: 0; min-height: 0; padding: clamp(7px,.85vh,11px);
    flex-direction: column; overflow: hidden; border: 2px solid rgba(0,128,125,.13); border-radius: var(--ct-radius-card);
    background: rgba(255,255,255,.9); box-shadow: var(--ct-shadow-card); cursor: pointer;
    transition: border-color var(--ct-transition-quick),background-color var(--ct-transition-quick),box-shadow var(--ct-transition-quick),transform var(--ct-transition-quick);
}
#subjectsQuiz #normal_quiz_main_container #quiz_grid .quiz-cell {
    box-sizing: border-box; width: 100%; min-width: 0; max-width: none; height: auto; max-height: none; margin: 0;
    padding: clamp(6px,.75vh,9px); overflow: hidden; border: 2px solid rgba(0,128,125,.13);
    border-radius: var(--ct-radius-card); background: #fffdf8; box-shadow: var(--ct-shadow-card);
}
#subjectsQuiz .quiz-cell:hover, #subjectsQuiz .quiz-cell:focus-visible { border-color: rgba(0,177,173,.52); box-shadow: var(--ct-shadow-card-raised); transform: translateY(-2px); outline: none; }
#subjectsQuiz .quiz-cell.is-selected { border-color: var(--ct-brand-teal); background: rgba(0,177,173,.08); box-shadow: 0 0 0 3px rgba(0,177,173,.15),var(--ct-shadow-card-raised); }
#subjectsQuiz .quiz-cell img.quiz-answer-image { display: block; width: 100%; min-height: 0; flex: 1 1 auto; object-fit: contain; border-radius: 13px; }
#subjectsQuiz .quiz-cell img.quiz-answer-image { background: var(--quiz-image-background, transparent); }
#subjectsQuiz #normal_quiz_main_container #quiz_grid img.quiz-answer-image {
    width: 100%; min-width: 0 !important; max-width: none !important; height: 100%; padding: 0 !important;
}
#subjectsQuiz #normal_quiz_main_container .ct-audio-action img {
    display: block; box-sizing: border-box; width: 100%; min-width: 0 !important; max-width: 100% !important;
    height: 100%; min-height: 0; max-height: 100%; padding: 0 !important; object-fit: contain;
}
#subjectsQuiz .quiz-answer-label { display: flex; min-height: 42px; margin-top: 5px; flex: 0 0 auto; align-items: center; justify-content: center; gap: 9px; }
#subjectsQuiz .quiz-answer-label p { margin: 0; color: var(--ct-ink-strong); font-size: clamp(18px,1.65vw,24px); font-weight: 720; line-height: 1.1; text-align: center; }
#subjectsQuiz .quiz-answer-audio { width: 36px; min-width: 36px; height: 36px; padding: 6px; }

#subjectsQuiz .quiz-feedback { display: flex; min-height: 45px; padding: 5px 12px 1px; flex: 0 0 auto; align-items: center; justify-content: center; gap: 10px; border-radius: 13px; background: rgba(0,177,173,.08); }
#subjectsQuiz .quiz-feedback[hidden] { display: none !important; }
#subjectsQuiz .quiz-feedback p { margin: 0; color: #145955; font-size: clamp(17px,1.5vw,21px); font-weight: 680; }
#subjectsQuiz .quiz-feedback .ct-audio-action { width: 36px; min-width: 36px; height: 36px; padding: 6px; }

.quiz-review-overlay { display: grid; position: fixed; z-index: 10030; inset: 0; box-sizing: border-box; padding: clamp(14px,2.5vw,34px); place-items: center; background: rgba(15,45,53,.62); backdrop-filter: blur(4px); }
.quiz-review-overlay[hidden] { display: none !important; }
.quiz-review-card { display: flex; box-sizing: border-box; width: min(94vw,1280px); height: min(88vh,820px); min-height: 0; flex-direction: column; overflow: hidden; border: 1px solid rgba(0,128,125,.18); border-radius: var(--ct-radius-panel); background: linear-gradient(145deg,var(--ct-surface) 0%,#fffdf8 100%); box-shadow: 0 24px 64px rgba(14,48,57,.36); }
#quizResultsPopup { min-height: 0; flex: 1 1 auto; overflow: hidden; }
.quiz-review-completion { display: flex; box-sizing: border-box; width: 100%; height: 100%; min-height: 0; padding: clamp(14px,1.8vw,24px); flex-direction: column; color: var(--ct-ink); text-align: left; }
.quiz-review-completion > header { display: flex; flex: 0 0 auto; gap: 13px; align-items: center; margin-bottom: 12px; }
.quiz-review-completion > header > span { display: grid; width: 48px; min-width: 48px; height: 48px; place-items: center; border-radius: 50%; background: rgba(253,198,82,.22); color: #b68100; font-size: 29px; }
.quiz-review-completion h2 { margin: 0; color: #007f7c; font-size: clamp(24px,2.2vw,32px); font-weight: 780; }
.quiz-review-completion header p { margin: 3px 0 0; color: var(--ct-muted); font-size: clamp(16px,1.35vw,20px); }
.quiz-review-table-wrap { min-height: 0; flex: 1 1 auto; overflow: auto; border: 1px solid rgba(0,128,125,.16); border-radius: 14px; }
.quiz-review-completion table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: clamp(13px,1.05vw,16px); }
.quiz-review-completion th { position: sticky; z-index: 1; top: 0; padding: 9px 10px; background: #e4f1ef; color: #145955; font-weight: 760; text-align: left; }
.quiz-review-completion td { padding: 8px 10px; border-top: 1px solid rgba(32,53,72,.09); color: var(--ct-ink); vertical-align: middle; }
.quiz-review-completion tr.is-correct td { background: rgba(0,177,173,.065); }
.quiz-review-completion tr.needs-practice td { background: rgba(253,198,82,.15); }
.quiz-review-number { color: var(--ct-muted) !important; font-weight: 720; text-align: center; }
.quiz-review-question { width: 38%; line-height: 1.25; }
.quiz-review-status { display: inline-block; padding: 4px 8px; border-radius: 999px; white-space: nowrap; font-size: .92em; font-weight: 760; }
.is-correct .quiz-review-status { background: rgba(0,177,173,.15); color: #00736f; }
.needs-practice .quiz-review-status { background: rgba(253,198,82,.42); color: #755700; }
.quiz-review-note { margin: 10px 0 0; color: var(--ct-muted); font-size: clamp(13px,1vw,16px); }
.quiz-review-card > footer { display: flex; flex: 0 0 auto; padding: 10px 20px 16px; justify-content: center; }
#quizReviewDone { min-width: 132px; min-height: 48px; padding: 9px 24px; border: 0; border-radius: 999px; background: var(--ct-brand-teal); box-shadow: 0 5px 12px rgba(0,94,91,.22); color: #fff; cursor: pointer; font-size: clamp(16px,1.3vw,19px); font-weight: 760; }
#quizReviewDone:focus-visible { outline: 4px solid rgba(0,134,205,.4); outline-offset: 3px; }

@media (max-width:1000px) { #subjectsQuiz #quiz_grid.quiz-answer-grid { width: min(94%,880px); } }
@media (max-width:700px) { #subjectsQuiz #quiz_grid.quiz-answer-grid { width: 100%; gap: 10px; } #subjectsQuiz .quiz-activity-card { padding-inline: 10px; } }
@media (max-width:540px) { #subjectsQuiz #quiz_grid.quiz-answer-grid { grid-template-columns: 1fr; overflow: auto; } #subjectsQuiz .quiz-summary { gap: 8px; } #subjectsQuiz .quiz-progress { min-width: 145px; } }
@media (max-width:700px) { .quiz-review-completion th:nth-child(2),.quiz-review-completion td:nth-child(2) { display: none; } .quiz-review-question { width: auto; } }
@media (max-height:620px) { .quiz-review-overlay { padding: 8px; } .quiz-review-card { height: 96vh; } .quiz-review-completion { padding-block: 10px; } .quiz-review-completion > header { margin-bottom: 7px; } .quiz-review-note { margin-top: 6px; } .quiz-review-card > footer { padding-block: 7px; } }
@media (max-height:680px) { #subjectsQuiz .quiz-activity-card { padding-block: 8px; } #subjectsQuiz .quiz-summary { padding-bottom: 4px; } #subjectsQuiz .quiz-question-panel { min-height: 38px; padding-block: 2px; } #subjectsQuiz #quiz_grid.quiz-answer-grid { gap: 8px 18px; padding-block: 3px; } #subjectsQuiz .quiz-cell { padding: 5px; } #subjectsQuiz .quiz-answer-label { min-height: 35px; margin-top: 2px; } }
@media (prefers-reduced-motion:reduce) { #subjectsQuiz .quiz-cell { transition: none; } }
