/* ============================================================
   K53 PassRight - 180 Question Quiz
   Layered on top of assets/css/content.css, which supplies the
   light theme, the black header/footer and the red accents.
   ============================================================ */

.quiz-shell {
    max-width: 820px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

.quiz-screen { display: none; }
.quiz-screen.active { display: block; }

/* ---------- shared card ---------- */
.quiz-card {
    background-color: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    padding: 1.75rem 1.5rem;
}

@media (min-width: 768px) {
    .quiz-card { padding: 2.25rem; }
}

.quiz-eyebrow {
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #FF0004;
    margin-bottom: 0.6rem;
}

.quiz-h1 {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    color: #1F2430;
}

.quiz-lead {
    color: #55606E;
    margin-bottom: 1.5rem;
}

/* ---------- intro: pick a mode ---------- */
.mode-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    .mode-grid { grid-template-columns: 1fr 1fr; }
}

.mode-card {
    display: block;
    width: 100%;
    text-align: left;
    font-family: inherit;
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 14px;
    padding: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.mode-card:hover,
.mode-card:focus-visible {
    border-color: rgba(255, 0, 4, 0.45);
    box-shadow: 0 0 16px rgba(255, 0, 4, 0.14);
    outline: none;
}

.mode-card .mode-count {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    color: #D10003;
}

.mode-card .mode-name {
    display: block;
    font-weight: 800;
    color: #1F2430;
    margin: 0.4rem 0 0.25rem;
}

.mode-card .mode-note {
    display: block;
    font-size: 0.85rem;
    color: #55606E;
    line-height: 1.45;
}

.quiz-rules {
    list-style: none;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 1.25rem;
}

.quiz-rules li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: #55606E;
    font-size: 0.92rem;
}

.quiz-rules li::before {
    content: "\2192";
    position: absolute;
    left: 0;
    color: #FF0004;
    font-weight: 800;
}

/* ---------- progress ---------- */
.quiz-progress-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.6rem;
}

.quiz-counter {
    font-weight: 800;
    color: #1F2430;
    font-size: 0.95rem;
}

.quiz-counter strong { color: #D10003; }

.quiz-mode-tag {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #7A8594;
}

.quiz-bar {
    height: 8px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.quiz-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(to right, #FF0004, #B00003);
    border-radius: 100px;
    transition: width 0.25s ease-out;
}

/* ---------- the question ---------- */
.q-figure {
    background: #F4F6F8;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.25rem;
    text-align: center;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.q-figure img {
    max-width: 100%;
    max-height: 340px;
    height: auto;
    border-radius: 6px;
}

.q-text {
    font-size: 1.15rem;
    font-weight: 800;
    color: #000000;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.q-options {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.q-options button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: #000000;
    padding: 0.95rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(0, 0, 0, 0.02);
    cursor: pointer;
    transition: var(--transition);
}

.q-options button:hover,
.q-options button:focus-visible {
    border-color: rgba(255, 0, 4, 0.45);
    background: rgba(255, 0, 4, 0.05);
    outline: none;
}

.q-options button[disabled] { cursor: default; }

.q-options .q-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: #1F2430;
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.q-options button:hover .q-letter,
.q-options button:focus-visible .q-letter {
    background: #D10003;
    border-color: #D10003;
    color: #FFFFFF;
}

/* the moment of the tap - acknowledgement only, never right/wrong */
.q-options button.picked {
    border-color: #D10003;
    background: rgba(255, 0, 4, 0.08);
}

.q-options button.picked .q-letter {
    background: #D10003;
    border-color: #D10003;
    color: #FFFFFF;
}

.quiz-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.quiz-hint {
    font-size: 0.82rem;
    color: #7A8594;
}

.quiz-quit {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    color: #7A8594;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.quiz-quit:hover { color: #D10003; }

/* ---------- report ---------- */
.score-ring {
    text-align: center;
    margin-bottom: 1.5rem;
}

.score-pct {
    font-size: clamp(3rem, 12vw, 4.5rem);
    font-weight: 900;
    line-height: 1;
    color: #1F2430;
}

.score-verdict {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.4rem 1rem;
    border-radius: 100px;
}

.score-verdict.pass {
    background: rgba(61, 220, 132, 0.15);
    color: #15803D;
    border: 1px solid rgba(21, 128, 61, 0.35);
}

.score-verdict.fail {
    background: rgba(255, 0, 4, 0.10);
    color: #B00003;
    border: 1px solid rgba(176, 0, 3, 0.35);
}

.tally {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.tally div {
    text-align: center;
    padding: 1.1rem 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.10);
    background: #F9FAFB;
}

.tally span {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}

.tally .n-correct span { color: #15803D; }
.tally .n-wrong span { color: #B00003; }

.tally small {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #55606E;
}

.review-head {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1F2430;
    margin-bottom: 0.35rem;
}

.review-note {
    font-size: 0.86rem;
    color: #7A8594;
    margin-bottom: 1rem;
}

.review-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
}

.review-list li {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-left: 3px solid #FF0004;
    background: #FDFDFD;
    font-size: 0.92rem;
}

.review-list li b {
    color: #B00003;
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 800;
    min-width: 42px;
}

.review-list li span { color: #1F2430; font-weight: 600; }

.quiz-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.qbtn {
    display: inline-block;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    padding: 0.8rem 1.4rem;
    border-radius: 100px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
}

.qbtn.primary {
    background: #D10003;
    color: #FFFFFF;
}

.qbtn.primary:hover {
    background: #FF0004;
    box-shadow: 0 0 18px rgba(255, 0, 4, 0.35);
}

.qbtn.ghost {
    background: #FFFFFF;
    color: #D10003;
    border-color: rgba(255, 0, 4, 0.35);
}

.qbtn.ghost:hover {
    background: rgba(255, 0, 4, 0.08);
    color: #FF0004;
}

/* ---------- resume banner ---------- */
.resume-note {
    display: none;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1.25rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 0, 4, 0.30);
    background: rgba(255, 0, 4, 0.06);
    font-size: 0.9rem;
    font-weight: 600;
    color: #1F2430;
}

.resume-note.show { display: flex; }

.resume-note .qbtn { padding: 0.5rem 1rem; font-size: 0.85rem; }

/* ---------- no-JS / load failure ---------- */
.nojs-warn {
    padding: 1rem 1.1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 0, 4, 0.30);
    background: rgba(255, 0, 4, 0.06);
    font-weight: 600;
    color: #1F2430;
}

/* ---------- the "study first" panel above the test ---------- */
.quiz-first{
    border-color: rgba(255, 0, 4, 0.28);
    background: linear-gradient(180deg, #FFFFFF 0%, #FFF6F6 100%);
}
.quiz-h2{
    font-size: clamp(1.3rem, 3vw, 1.65rem);
    font-weight: 900;
    line-height: 1.25;
    color: #1F2430;
    margin-bottom: 0.6rem;
}
.quiz-first .quiz-lead{
    margin-bottom: 1.35rem;
    line-height: 1.65;
}
