/* ===== Quiz Engine (Fase 2 Bagian 2) — mobile-first ===== */
/* Memakai variabel brand dari layout: --brand, --ink, --muted, --line, --surface, --bg */

.quiz-stage {
    padding: 16px;
    max-width: 760px;
    margin: 0 auto;
}

.quiz-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ink, #1a1a1a);
    margin: 0 0 16px;
}

.quiz-note {
    text-align: center;
    padding: 32px 16px;
}
.quiz-note .quiz-icon { font-size: 2.5rem; margin-bottom: 8px; }

.quiz-attempts-info {
    font-size: 0.85rem;
    margin: 0 0 12px;
}

/* ---- Soal ---- */
.quiz-q {
    background: var(--surface, #fff);
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
}
.quiz-q-num {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted, #6b7280);
    margin: 0 0 8px;
}
.quiz-q-hint {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    color: var(--brand, #16a34a);
}
.quiz-q-prompt {
    font-size: 1rem;
    color: var(--ink, #1a1a1a);
    margin-bottom: 14px;
    line-height: 1.5;
}
.quiz-q-prompt img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 8px 0;
}

/* ---- Opsi jawaban ---- */
.quiz-options { display: flex; flex-direction: column; gap: 8px; }
.quiz-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    font-size: 0.95rem;
    line-height: 1.4;
}
.quiz-option:hover { border-color: var(--brand, #16a34a); }
.quiz-option input { margin-top: 3px; flex-shrink: 0; width: 18px; height: 18px; accent-color: var(--brand, #16a34a); }
.quiz-option:has(input:checked) {
    border-color: var(--brand, #16a34a);
    background: color-mix(in srgb, var(--brand, #16a34a) 8%, transparent);
}

/* ---- Tombol submit ---- */
.quiz-submit-btn {
    display: block;
    width: 100%;
    padding: 14px;
    margin-top: 8px;
    background: var(--brand, #16a34a);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}
.quiz-submit-btn:disabled { opacity: .6; cursor: default; }

/* ---- Hasil ---- */
.quiz-result {
    text-align: center;
    padding: 28px 20px;
    border-radius: 16px;
    border: 1px solid var(--line, #e5e7eb);
    background: var(--surface, #fff);
}
.quiz-result.is-pass { border-color: var(--brand, #16a34a); background: color-mix(in srgb, var(--brand,#16a34a) 6%, #fff); }
.quiz-result.is-fail { border-color: #f59e0b; background: #fffbeb; }
.quiz-result-score {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    color: var(--ink, #1a1a1a);
}
.quiz-result-score span { font-size: 1.5rem; font-weight: 600; color: var(--muted, #6b7280); }
.quiz-result-status { font-size: 1.05rem; font-weight: 600; margin: 12px 0 4px; }
.quiz-result.is-pass .quiz-result-status { color: var(--brand, #16a34a); }
.quiz-result.is-fail .quiz-result-status { color: #b45309; }
.quiz-result-meta { font-size: 0.9rem; margin: 0; }

.quiz-retry-btn {
    display: inline-block;
    margin-top: 18px;
    padding: 12px 24px;
    background: var(--brand, #16a34a);
    color: #fff;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
}

.quiz-banner {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    text-align: center;
}
.quiz-banner-warn { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }

.muted { color: var(--muted, #6b7280); }

/* ===== Banner Mode Preview (admin) ===== */
.preview-banner {
    background: #1e293b;
    color: #fff;
    font-size: 0.85rem;
    text-align: center;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.preview-banner a {
    color: #fff;
    text-decoration: underline;
    font-weight: 600;
    opacity: 0.9;
}
.preview-banner a:hover { opacity: 1; }
