/* ═══════════════════════════════════════════════════════
   Quiz Manager — Front-end Styles  v3.0
   Theme: Teal Ocean
   Features: Interactive answers, Report modal, Math, Images
═══════════════════════════════════════════════════════ */

/* ── Page wrapper ── */
.qm-page-wrap {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ── Quiz wrapper ── */
.qm-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15px;
    color: #1a1a1a;
    border: 1.5px solid #16a34a;
    border-radius: 6px;
    overflow: visible; /* Changed from hidden to allow sticky sidebar */
    background: #fff;
}

/* ──────────── HEADER ──────────── */
.qm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0fdf4;
    padding: 14px 22px;
    border-bottom: 1.5px solid #16a34a;
    border-radius: 6px 6px 0 0;
}
.qm-header-title { font-size: 20px; font-weight: 700; color: #1a1a1a; }
.qm-header-date  { font-size: 14px; color: #444; white-space: nowrap; }

/* Shuffle badge — shown in header when questions are randomised */
.qm-shuffle-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #5b21b6;
    background: #ede9fe;
    border: 1px solid #c4b5fd;
    border-radius: 20px;
    padding: 2px 10px;
    white-space: nowrap;
    letter-spacing: .2px;
}

/* ──────────── BODY ──────────── */
.qm-body { display: flex; align-items: stretch; }

.qm-questions-col {
    flex: 1 1 68%;
    padding: 22px 26px;
    border-right: 1.5px solid #e0e0e0;
    min-width: 0;
    box-sizing: border-box;
}
.qm-questions-col.qm-full-width { flex: 1 1 100%; border-right: none; }

/* ──────────── QUESTION BLOCK ──────────── */
.qm-question-block { margin-bottom: 2px; position: relative; }

.qm-question-num-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.qm-question-num {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #239745;
    margin-bottom: 0;
}
/* Share button next to question number — only shown on quiz page */
a.qm-question-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #16a34a;
    text-decoration: none;
    background: #e4faeb;
    border: 1px solid #16a34a7d;
    border-radius: 20px;
    padding: 3px 10px 3px 7px;
    line-height: 1;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
a.qm-question-share-btn svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}
a.qm-question-share-btn:hover,
a.qm-question-share-btn:focus {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
    text-decoration: none;
    outline: none;
}

.qm-question-image {
    margin-bottom: 14px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #b5e4ee;
    background: #fff;
    text-align: center;
}
.qm-question-image img {
    max-width: 100%; height: auto; max-height: 340px;
    object-fit: contain; display: block; margin: 0 auto;
}

/* Multiple images — horizontal strip inside one box */
.qm-question-image--multi {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
}
.qm-question-image--multi img {
    flex: 1 1 0;
    min-width: 60px;
    max-width: 100%;
    max-height: 280px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0;
    border-radius: 3px;
}

.qm-question-text { line-height: 1.75; margin-bottom: 18px; color: #1a1a1a; }


/* ── Rich-text formatting inside question text and explanation ── */
.qm-question-text sup,
.qm-opt-text sup,
.qm-explanation sup,
.qm-option-img-text sup { font-size: 0.72em; vertical-align: super; line-height: 0; }

.qm-question-text sub,
.qm-opt-text sub,
.qm-explanation sub,
.qm-option-img-text sub { font-size: 0.72em; vertical-align: sub; line-height: 0; }

.qm-question-text ul,
.qm-question-text ol,
.qm-explanation ul,
.qm-explanation ol {
    margin: 6px 0 6px 22px;
    padding: 0;
}
.qm-question-text li,
.qm-explanation li { margin-bottom: 3px; }

.qm-question-text p,
.qm-explanation p { margin: 0 0 6px; }
.qm-question-text p:last-child,
.qm-explanation p:last-child { margin-bottom: 0; }

/* ──────────── INTERACTIVE OPTIONS — TEXT ──────────── */
.qm-options { list-style: none; margin: 0 0 14px; padding: 0; }

.qm-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    margin-bottom: 8px;
    border: 2px solid #f2803575;
    border-radius: 8px;
    background: #f2803505;
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .1s;
    user-select: none;
    outline: none;
}
.qm-option:hover:not(.qm-opt-correct):not(.qm-opt-wrong) {
    border-color: #f28035;
    background: #FFF;
    transform: translateX(3px);
}
.qm-option:focus { box-shadow: 0 0 0 3px rgba(14,116,144,.25); }

/* Option label circle */
.qm-opt-lbl {
    flex-shrink: 0;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: #f28035;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.qm-opt-text { flex: 1; line-height: 1.5; }
.qm-opt-icon { flex-shrink: 0; font-size: 18px; width: 22px; text-align: center; }

/* Correct state — green */
.qm-option.qm-opt-correct {
    border-color: #16a34a;
    background: #f0fdf4;
}
.qm-option.qm-opt-correct .qm-opt-lbl { background: #16a34a; }
.qm-option.qm-opt-correct .qm-opt-icon::before { content: "✓"; color: #16a34a; font-weight: 700; }

/* Wrong state */
.qm-option.qm-opt-wrong {
    border-color: #e74c3c;
    background: #fdf2f2;
}
.qm-option.qm-opt-wrong .qm-opt-lbl { background: #e74c3c; }
.qm-option.qm-opt-wrong .qm-opt-icon::before { content: "✗"; color: #e74c3c; font-weight: 700; }

/* Answered state — disable hover */
.qm-question-block.qm-answered .qm-option { cursor: default; }
.qm-question-block.qm-answered .qm-option:hover { transform: none; }

/* ──────────── REASONING — IMAGE OPTIONS ──────────── */
.qm-options-img-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}
.qm-option-img-card {
    border: 2px solid #b5e4ee;
    border-radius: 8px;
    overflow: hidden;
    background: #FFF;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    user-select: none;
}
.qm-option-img-card:hover { border-color: #0e7490; background: #fff; }
.qm-option-img-card.qm-opt-correct { border-color: #16a34a; background: #f0fdf4; }
.qm-option-img-card.qm-opt-wrong   { border-color: #e74c3c; background: #fdf2f2; }
.qm-question-block.qm-answered .qm-option-img-card { cursor: default; }

.qm-option-img-label {
    background: #0e7490; color: #fff;
    font-weight: 700; font-size: 13px;
    text-align: center; padding: 6px;
}
.qm-option-img-card.qm-opt-correct .qm-option-img-label { background: #15803d; }
.qm-option-img-card.qm-opt-wrong   .qm-option-img-label { background: #e74c3c; }

.qm-option-img-card img {
    width: 100%; max-height: 160px;
    object-fit: contain; display: block; padding: 8px; box-sizing: border-box;
}
.qm-option-img-text { padding: 6px 10px; font-size: 13px; text-align: center; }

.qm-option-indicator { height: 4px; }
.qm-opt-correct .qm-option-indicator { background: #16a34a; }
.qm-opt-wrong   .qm-option-indicator { background: #e74c3c; }

/* ──────────── EXPLANATION BOX ──────────── */
.qm-answer-box {
    background: #f0fdf4;
    border-left: 4px solid #16a34a;
    padding: 12px 16px;
    border-radius: 0 6px 6px 0;
    margin: 4px 0 10px;
}
.qm-explanation { font-size: 14px; color: #1a1a1a; line-height: 1.65; margin-bottom: 10px; }
/* Try Again button removed */


/* ── Correct Answer Reveal Line ── */
.qm-correct-answer-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #bbf7d0;
}
.qm-correct-tick {
    color: #16a34a;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}
.qm-correct-label {
    font-weight: 700;
    font-size: 14px;
    color: #14532d;
    flex-shrink: 0;
}
.qm-correct-option-name {
    background: #16a34a;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    border-radius: 4px;
    padding: 2px 10px;
    flex-shrink: 0;
}
.qm-correct-option-text {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 600;
}
.qm-correct-option-img {
    max-height: 80px;
    max-width: 120px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid #b5e4ee;
}
.qm-answer-box .qm-explanation {
    font-size: 13.5px;
    color: #444;
    line-height: 1.6;
    margin: 0;
}

/* ── Explanation Images ── */
.qm-explanation-images {
    margin-top: 10px;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #a7f3c0;
    text-align: center;
    padding: 8px;
}
.qm-explanation-images img {
    max-width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}

/* Multiple explanation images — horizontal strip */
.qm-expl-img--multi {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}
.qm-expl-img--multi img {
    flex: 0 1 auto;
    max-width: calc(50% - 4px);
    max-height: 220px;
}

/* ──────────── QUESTION FOOTER + REPORT ──────────── */
.qm-question-footer { margin-top: 8px; }

.qm-report-btn {
    background: none;
    border: none;
    color: #aaa;
    font-size: 12px;
    cursor: pointer;
    padding: 2px 0;
}

/* ──────────── REPORT MODAL ──────────── */
.qm-report-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.qm-report-inner {
    background: #fff;
    border-radius: 10px;
    max-width: 440px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
}
.qm-report-header {
    background: #0e7490;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.qm-report-close {
    background: none; border: none; color: rgba(255,255,255,.85);
    font-size: 18px; cursor: pointer; line-height: 1; padding: 0;
}
.qm-report-close:hover { color: #fff; }
.qm-report-body { padding: 18px; }
.qm-report-label { font-weight: 700; font-size: 13px; margin-bottom: 10px; color: #333; }
.qm-report-reasons { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.qm-reason-opt {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; cursor: pointer;
    padding: 8px 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    transition: border-color .15s, background .15s;
}
.qm-reason-opt:has(input:checked) { border-color: #0e7490; background: #e8f7fa; }
.qm-reason-opt input { margin: 0; }
.qm-report-note {
    width: 100%; box-sizing: border-box;
    border: 1.5px solid #ccc; border-radius: 6px;
    padding: 8px 12px; font-size: 13px; resize: vertical;
    margin-bottom: 12px;
}
.qm-report-note:focus { border-color: #0e7490; outline: none; }
.qm-report-actions { display: flex; align-items: center; gap: 12px; }
.qm-report-submit {
    background: #0e7490; color: #fff;
    border: none; border-radius: 6px;
    padding: 8px 20px; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: background .15s;
}
.qm-report-submit:hover { background: #0a5e75; }
.qm-report-submit:disabled { background: #aaa; cursor: default; }
.qm-report-msg { font-size: 13px; }

/* ──────────── DIVIDER ──────────── */
.qm-divider { border: none; border-top: 1.5px dashed #239745; margin: 22px 0; }
.qm-empty    { color: #888; font-style: italic; }

/* ──────────── SIDEBAR ──────────── */
.qm-sidebar-col {
    flex: 0 0 32%; max-width: 320px; min-width: 220px;
    padding: 18px 16px 22px; background: #fff;
    box-sizing: border-box;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    /* Thin custom scrollbar — teal theme */
    scrollbar-width: thin;
    scrollbar-color: #9ce0b1 transparent;
}
.qm-sidebar-col::-webkit-scrollbar {
    width: 3px;
}
.qm-sidebar-col::-webkit-scrollbar-track {
    background: transparent;
}
.qm-sidebar-col::-webkit-scrollbar-thumb {
    background: #7ecde0;
    border-radius: 99px;
}
.qm-sidebar-col::-webkit-scrollbar-thumb:hover {
    background: #0e7490;
}
.qm-sidebar-widget { border: 1.5px solid #16a34a; border-radius: 5px; overflow: hidden; margin-bottom: 22px; }
.qm-sidebar-title {
    background: #239745; color: #fff;
    font-size: 15px; font-weight: 700;
    padding: 11px 16px; text-align: center;
}
.qm-sidebar-links { list-style: none; margin: 0; padding: 0; }
.qm-sidebar-links li { padding: 10px 16px; border-bottom: 1px solid #16a34a; font-size: 13.5px; }
.qm-sidebar-links li:last-child { border-bottom: none; }
.qm-sidebar-links a { color: #1a1a1a; text-decoration: none; display: block; transition: color .15s; }
.qm-sidebar-links a:hover { color: #16a34a; text-decoration: underline; }

/* ──────────── ARCHIVE PAGE ──────────── */
.qm-archive-page { max-width: 1100px; margin: 30px auto; padding: 0 16px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
.qm-archive-wrap { display: flex; align-items: flex-start; gap: 28px; }
.qm-archive-main { flex: 1 1 66%; min-width: 0; }
.qm-archive-header { background: #239745; border-radius: 5px 5px 0 0; padding: 13px 20px; }
.qm-archive-title { color: #fff !important; font-size: 18px !important; font-weight: 700 !important; margin: 0 !important; padding: 0 !important; text-align: center; border: none !important; }
.qm-archive-desc { color: #555; font-size: 14px; margin: 10px 0 16px; }
.qm-quiz-list { border: 1.5px solid #16a34a; border-top: none; border-radius: 0 0 5px 5px; overflow: hidden; background: #fff; }
.qm-quiz-card {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px; border: 1.5px solid #16a34a; border-radius: 4px;
    margin: 14px; background: #f0fdf4; text-decoration: none; color: inherit;
    transition: background .15s, box-shadow .15s; gap: 12px;
}
.qm-quiz-card:hover { background: #bae9c8; box-shadow: 0 2px 8px rgba(14,116,144,.12); color: inherit; }
.qm-quiz-card-title { font-size: 15px; font-weight: 700; color: #1a1a1a; flex: 1; }
.qm-quiz-card-date  { font-size: 13.5px; color: #444; white-space: nowrap; font-weight: 600; flex-shrink: 0; }
.qm-no-quizzes { text-align: center; padding: 40px 20px; color: #888; background: #fff; border: 1.5px solid #7ecde0; border-top: none; border-radius: 0 0 5px 5px; }
.qm-no-quizzes a { color: #0e7490; text-decoration: none; font-weight: 600; }
.qm-archive-sidebar {
    flex: 0 0 30%; max-width: 300px; min-width: 220px;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #9ce0b1 transparent;
}
.qm-archive-sidebar::-webkit-scrollbar {
    width: 3px;
}
.qm-archive-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.qm-archive-sidebar::-webkit-scrollbar-thumb {
    background: #7ecde0;
    border-radius: 99px;
}
.qm-archive-sidebar::-webkit-scrollbar-thumb:hover {
    background: #0e7490;
}

/* Pagination */
.qm-pagination { margin-top: 20px; text-align: center; }
.qm-pagination .page-numbers { display: inline-block; padding: 7px 14px; margin: 0 2px; border: 1px solid #16a34a; border-radius: 4px; color: #16a34a; text-decoration: none; font-size: 14px; transition: background .15s; }
.qm-pagination .page-numbers.current, .qm-pagination .page-numbers:hover { background: #239745; color: #fff; border-color: #239745; }

/* List shortcode standalone */
.qm-list-shortcode { border: 1.5px solid #7ecde0; border-radius: 5px; overflow: hidden; background: #fff; }

/* ──────────── RESPONSIVE ──────────── */
@media (max-width: 720px) {
    .qm-body, .qm-archive-wrap { flex-direction: column; }
    .qm-questions-col { border-right: none; border-bottom: 1.5px solid #b5e4ee; padding: 16px; }
    .qm-sidebar-col, .qm-archive-sidebar { max-width: 100%; width: 100%; min-width: unset; padding: 14px 16px; }
    .qm-header { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 16px; }
    .qm-header-title { font-size: 17px; }
    .qm-options-img-grid { grid-template-columns: 1fr 1fr; }
    .qm-quiz-card { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ── Shortcode Subject Nav ── */
.qm-subject-nav { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; margin: 16px 0; }
.qm-subject-nav-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.qm-snav-item { position: relative; }
.qm-snav-link {
    display: flex; align-items: center; gap: 5px;
    background: #0e7490; color: #fff !important;
    text-decoration: none !important;
    padding: 8px 16px; border-radius: 5px; font-size: 14px; font-weight: 600;
    transition: background .15s;
}
.qm-snav-link:hover { background: #0a5e75; }
.qm-snav-item .qm-dropdown { top: calc(100% + 4px); }
.qm-subject-nav--horizontal .qm-subject-nav-list { flex-direction: row; }
.qm-subject-nav--vertical   .qm-subject-nav-list { flex-direction: column; }
.qm-subject-nav--vertical .qm-snav-item { width: 100%; }
.qm-subject-nav--vertical .qm-snav-link { justify-content: space-between; border-radius: 4px; }
.qm-subject-nav--vertical .qm-dropdown  { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; border-left: 3px solid #0e7490; margin-left: 16px; padding: 4px 0; }

@media (max-width: 600px) {
    .qm-subject-nav-list { flex-direction: column; }
    .qm-snav-item { width: 100%; }
    .qm-snav-link { justify-content: space-between; }
}

/* ── Subject Archive — Sub-subject Cards ── */
.qm-breadcrumb { font-size: 13px; color: #888; margin-bottom: 10px; }
.qm-breadcrumb a { color: #0e7490; text-decoration: none; }
.qm-breadcrumb a:hover { text-decoration: underline; }
.qm-breadcrumb span { margin: 0 6px; }
.qm-breadcrumb-current { color: #333; font-weight: 600; }

.qm-subsubject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.qm-subsubject-card {
    display: flex; flex-direction: column; align-items: center;
    background: #e8f7fa; border: 1.5px solid #7ecde0;
    border-radius: 8px; padding: 18px 12px;
    text-decoration: none !important; color: inherit;
    transition: background .15s, box-shadow .15s;
    text-align: center;
}
.qm-subsubject-card:hover { background: #cceef7; box-shadow: 0 2px 10px rgba(14,116,144,.15); color: inherit; }
.qm-subsubject-icon  { font-size: 28px; margin-bottom: 8px; }
.qm-subsubject-name  { font-weight: 700; font-size: 14px; color: #0a4f60; margin-bottom: 4px; }
.qm-subsubject-count { font-size: 12px; color: #888; }

.qm-archive-divider-label {
    font-size: 13px; font-weight: 700; color: #888;
    text-transform: uppercase; letter-spacing: .5px;
    margin: 16px 0 8px; padding-bottom: 6px;
    border-bottom: 1.5px solid #b5e4ee;
}

/* ═══════════════════════════════════════════════════════
   TOPIC NAVIGATION DROPDOWN  (quiz header)
═══════════════════════════════════════════════════════ */

/* Header layout adjustment when topic nav is present */
.qm-header {
    flex-wrap: nowrap;
    gap: 10px;
}

/* Groups dropdown + count together on the right */
.qm-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}

/* The topic nav widget */
.qm-topic-nav {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Trigger button (shows subject name + arrow) */
.qm-topic-nav-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1.5px solid #16a34a;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #16a34a;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.qm-topic-nav-label:hover {
    background: #16a34a;
    color: #fff;
}
.qm-topic-nav-arrow {
    font-size: 10px;
    transition: transform .2s;
}
.qm-topic-nav.qm-topic-open .qm-topic-nav-arrow {
    transform: rotate(180deg);
}

/* Subject label chip */
.qm-topic-nav-subject {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dropdown panel */
.qm-topic-nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 220px;
    background: #fff;
    border: 1.5px solid #b5e4ee;
    border-radius: 8px;
    box-shadow: 0 6px 22px rgba(0,0,0,.13);
    z-index: 999;
    overflow: hidden;
}
.qm-topic-nav.qm-topic-open .qm-topic-nav-dropdown {
    display: block;
    animation: qm-drop-in .15s ease;
}
@keyframes qm-drop-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* Dropdown heading */
.qm-topic-nav-heading {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #16a34a;
    padding: 10px 14px 8px;
    border-bottom: 1px solid #e8f7fa;
    background: #f0fdf4db;
}

/* Individual topic links */
.qm-topic-nav-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 9px 14px;
    font-size: 14px;
    color: #1a1a1a;
    text-decoration: none;
    transition: background .12s;
    border-bottom: 1px solid #f0f0f0;
    width: 100%;
    box-sizing: border-box;
}
.qm-topic-nav-item:last-child { border-bottom: none; }
.qm-topic-nav-item:hover {
    background: #e4faeb;
    color: #16a34a;
}
.qm-topic-nav-item.qm-topic-nav-active {
    background: #e4faeb;
    color: #16a34a;
    font-weight: 600;
}
.qm-topic-nav-dot {
    font-size: 8px;
    color: #16a34a;
    flex-shrink: 0;
}

/* Close dropdown when clicking outside */
.qm-topic-nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 998;
}
.qm-topic-nav.qm-topic-open .qm-topic-nav-backdrop {
    display: block;
}

/* Responsive */
@media (max-width: 600px) {
    .qm-topic-nav-dropdown {
        left: auto;
        right: 0;
        min-width: 200px;
    }
    .qm-topic-nav-subject { max-width: 120px; }
}

/* ═══════════════════════════════════════════════════════
   TOPIC ARCHIVE PAGE  (/quiz-topic/sandhi/)
═══════════════════════════════════════════════════════ */

/* Three-column layout: [topic switcher] [quiz list] [global sidebar] */
.qm-topic-layout {
    display: grid;
    grid-template-columns: 210px 1fr 240px;
    gap: 22px;
    max-width: 1140px;
    margin: 28px auto;
    padding: 0 16px;
    align-items: start;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ── Topic Switcher Sidebar (left) ── */
.qm-topic-switcher-sidebar {
    background: #fff;
    border: 1.5px solid #b5e4ee;
    border-radius: 10px;
    overflow: hidden;
    position: sticky;
    top: 24px;
}

.qm-ts-subject-header {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #0e7490;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 11px 14px;
    letter-spacing: .3px;
}
.qm-ts-subject-icon { font-size: 15px; }

.qm-ts-list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

/* .qm-ts-item {} */

.qm-ts-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    transition: background .12s, color .12s;
    border-bottom: 1px solid #f3f3f3;
}
.qm-ts-item:last-child .qm-ts-link { border-bottom: none; }
.qm-ts-link:hover { background: #e8f7fa; color: #0e7490; }

.qm-ts-item.qm-ts-active .qm-ts-link {
    background: #e8f7fa;
    color: #0e7490;
    font-weight: 700;
}

.qm-ts-dot { font-size: 9px; color: #0e7490; flex-shrink: 0; width: 12px; }
.qm-ts-name { flex: 1; line-height: 1.4; }
.qm-ts-count {
    font-size: 11px;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 10px;
    padding: 1px 7px;
    flex-shrink: 0;
}

/* ── Topic Main (centre) ── */
.qm-topic-main {
    min-width: 0;
}

.qm-topic-header {
    background: #fff;
    border: 1.5px solid #b5e4ee;
    border-radius: 10px;
    padding: 18px 22px;
    margin-bottom: 16px;
}

/* Breadcrumb */
.qm-topic-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #777;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.qm-bc-subject {
    color: #0e7490;
    text-decoration: none;
    font-weight: 600;
}
.qm-bc-subject:hover { text-decoration: underline; }
.qm-bc-sep { color: #bbb; }
.qm-bc-topic { color: #555; font-weight: 600; }

.qm-topic-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px;
}

.qm-topic-count {
    display: inline-block;
    font-size: 12px;
    background: #e8f7fa;
    color: #0e7490;
    border-radius: 20px;
    padding: 3px 12px;
    font-weight: 600;
}

.qm-topic-desc {
    margin: 10px 0 0;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

/* ── Topic Quiz Cards ── */
.qm-topic-quiz-list { display: flex; flex-direction: column; gap: 0; }

.qm-topic-quiz-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 18px;
    background: #fff;
    border: 1.5px solid #dde8f0;
    border-bottom-width: 0;
    text-decoration: none;
    color: #1a1a1a;
    transition: background .12s, border-color .12s;
}
.qm-topic-quiz-card:first-child { border-radius: 10px 10px 0 0; }
.qm-topic-quiz-card:last-child  { border-bottom-width: 1.5px; border-radius: 0 0 10px 10px; }
.qm-topic-quiz-card:only-child  { border-radius: 10px; border-bottom-width: 1.5px; }
.qm-topic-quiz-card:hover {
    background: #e8f7fa;
    border-color: #7ecde0;
    z-index: 1;
}

.qm-tqc-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: #0e7490;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.qm-tqc-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.qm-topic-quiz-card .qm-quiz-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.qm-topic-quiz-card:hover .qm-quiz-card-title { color: #0e7490; }

.qm-tqc-meta { display: flex; gap: 6px; flex-wrap: wrap; }

.qm-tqc-tag {
    font-size: 11px;
    border-radius: 10px;
    padding: 1px 8px;
}
.qm-tqc-day    { background: #e0f2fe; color: #0369a1; }
.qm-tqc-date   { background: #f0fdf4; color: #15803d; }
.qm-tqc-qcount { background: #fef9c3; color: #854d0e; }

.qm-tqc-arrow {
    font-size: 20px;
    color: #bbb;
    flex-shrink: 0;
    transition: color .12s, transform .12s;
}
.qm-topic-quiz-card:hover .qm-tqc-arrow {
    color: #0e7490;
    transform: translateX(3px);
}

/* ═══════════════════════════════════════════════════════
   SUBJECT ARCHIVE PAGE  (/quiz-subject/hindi/)
   Clean list layout — no folder cards
═══════════════════════════════════════════════════════ */

.qm-subject-header { background: linear-gradient(135deg, #e8f7fa 0%, #fff 100%); }

/* ── Topic list ── */
.qm-topic-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1.5px solid #e6f5f8;
}

.qm-topic-list-item {
    border-bottom: 1.5px solid #e6f5f8;
}

.qm-topic-list-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 6px;
    text-decoration: none;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 500;
    transition: color .14s, background .14s;
    border-radius: 4px;
}

.qm-topic-list-link:hover {
    color: #0e7490;
    background: #f4fbfd;
    padding-left: 12px;
}

.qm-topic-list-name {
    flex: 1;
    min-width: 0;
}

.qm-topic-list-meta {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: #0369a1;
    background: #e0f2fe;
    border-radius: 10px;
    padding: 2px 10px;
    margin-left: 10px;
    white-space: nowrap;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .qm-topic-layout {
        grid-template-columns: 1fr;
    }
    .qm-topic-switcher-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr;
    }
    .qm-ts-list {
        display: flex;
        flex-wrap: wrap;
        padding: 8px;
        gap: 6px;
    }
    .qm-ts-item { flex: none; }
    .qm-ts-link {
        background: #f0fafc;
        border: 1.5px solid #b5e4ee;
        border-radius: 20px;
        padding: 5px 14px;
        font-size: 13px;
        border-bottom: none;
    }
    .qm-ts-item.qm-ts-active .qm-ts-link {
        background: #0e7490;
        color: #fff;
        border-color: #0e7490;
    }
    .qm-ts-dot { display: none; }
}

@media (max-width: 600px) {
    .qm-topic-title { font-size: 18px; }
}

/* ── Topic nav item inner layout (name + count) ── */
.qm-topic-nav-item-name {
    flex: 1;
    min-width: 0;
}
.qm-topic-nav-item-count {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    background: #e4faeb;
    color: #16a34a;
    border-radius: 10px;
    padding: 2px 8px;
    flex-shrink: 0;
    margin-left: auto;
    white-space: nowrap;
}
.qm-topic-nav-active .qm-topic-nav-item-count {
    background: #c8ecd3;
    color: #16a34a;
}

/* ═══════════════════════════════════════════════════════
   AJAX PAGINATION BAR
═══════════════════════════════════════════════════════ */

.qm-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 0 6px;
    margin-top: 22px;
    border-top: 1.5px solid #16a34a2b;
    flex-wrap: wrap;
}

.qm-page-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: #239745;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, opacity .15s;
    white-space: nowrap;
}
.qm-page-btn:hover:not(:disabled) { background: #239745; color: #fff;}
.qm-page-btn:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    opacity: .7;
}

.qm-page-info {
    font-size: 13px;
    color: #555;
    text-align: center;
    flex: 1;
    white-space: nowrap;
}
.qm-page-qrange {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════
   LOADING OVERLAY + SPINNER
═══════════════════════════════════════════════════════ */

.qm-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.82);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 10;
    border-radius: 4px;
    font-size: 13px;
    color: #0e7490;
    font-weight: 600;
    pointer-events: all;
}

/* Make parent relative so overlay positions correctly */
.qm-questions-col {
    position: relative;
}

/* Spinner ring */
.qm-spinner {
    width: 36px;
    height: 36px;
    border: 4px solid #b5e4ee;
    border-top-color: #0e7490;
    border-radius: 50%;
    animation: qm-spin .7s linear infinite;
}
@keyframes qm-spin {
    to { transform: rotate(360deg); }
}

/* Minimum height while loading so layout doesn't collapse */
.qm-questions-col.qm-loading-active {
    min-height: 200px;
}

/* ═══════════════════════════════════════════════════════
   OPTIONS — 2-COLUMN GRID LAYOUT
═══════════════════════════════════════════════════════ */

/* Override: text options now use a 2x2 grid instead of vertical list */
.qm-options.qm-options-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
}

/* Each option card in the grid */
.qm-options-grid-2col .qm-option {
    margin-bottom: 0;  /* gap handles spacing */
    border-radius: 8px;
    min-height: 52px;
    align-items: center;
    padding: 10px 14px;
}

/* Label circle stays left, text wraps */
.qm-options-grid-2col .qm-opt-text {
    white-space: normal;
    word-break: break-word;
    line-height: 1.45;
}

/* On small screens fall back to single column */
@media (max-width: 520px) {
    .qm-options.qm-options-grid-2col {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════
   SUBMIT QUIZ BAR
═══════════════════════════════════════════════════════ */

.qm-submit-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 0 6px;
    margin-top: 18px;
    border-top: 2px solid #b5e4ee;
    flex-wrap: wrap;
}

.qm-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 32px;
    background: #0e7490;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .3px;
    transition: background .15s, transform .1s, box-shadow .15s;
    box-shadow: 0 3px 10px rgba(14,116,144,.25);
}
.qm-submit-btn:hover {
    background: #0a5a70;
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(14,116,144,.35);
}
.qm-submit-btn:active {
    transform: translateY(0);
}

.qm-submit-hint {
    font-size: 13px;
    color: #777;
    font-style: italic;
}

/* ═══════════════════════════════════════════════════════
   SCORE CARD MODAL
═══════════════════════════════════════════════════════ */

/* Prevent body scroll when modal open */
body.qm-modal-open {
    overflow: hidden;
}

/* Full-screen backdrop */
.qm-score-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity .25s ease;
    backdrop-filter: blur(3px);
}
.qm-score-modal-overlay.qm-score-modal-visible {
    opacity: 1;
}

/* Modal box */
.qm-score-modal-box {
    background: #fff;
    border-radius: 16px;
    max-width: 440px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    transform: translateY(24px) scale(.97);
    transition: transform .28s ease, opacity .25s ease;
    opacity: 0;
}
.qm-score-modal-visible .qm-score-modal-box {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Close button */
.qm-score-modal-close {
    position: absolute;
    top: 14px;
    right: 0px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #555;
    font-size: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background .15s, color .15s;
    z-index: 1;
}
/* Inner content */
.qm-score-inner {
    padding: 36px 28px 28px;
    text-align: center;
}

/* Header */
.qm-score-header { margin-bottom: 20px; }
.qm-score-trophy {
    font-size: 48px;
    display: block;
    margin-bottom: 8px;
    animation: qm-bounce .5s ease .25s both;
}
@keyframes qm-bounce {
    0%   { transform: scale(0.5); opacity: 0; }
    70%  { transform: scale(1.15); }
    100% { transform: scale(1);    opacity: 1; }
}
.qm-score-title {
    font-size: 22px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 8px;
}
.qm-score-grade {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    padding: 3px 16px;
    border-radius: 20px;
    margin: 0;
}
.qm-grade-good { background: #d4f0d4; color: #1a7a1a; }
.qm-grade-avg  { background: #fff3cd; color: #856404; }
.qm-grade-low  { background: #fee2e2; color: #991b1b; }

/* Big score */
.qm-score-big {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin: 18px 0 4px;
}
.qm-score-num {
    font-size: 72px;
    font-weight: 900;
    color: #0e7490;
    line-height: 1;
}
.qm-score-denom {
    font-size: 30px;
    color: #888;
    font-weight: 600;
}
.qm-score-pct {
    font-size: 26px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 22px;
}

/* Stats */
.qm-score-stats {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.qm-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: #f8f8f8;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px 18px;
    min-width: 85px;
}
.qm-stat-icon { font-size: 16px; font-weight: 900; }
.qm-stat-num  { font-size: 26px; font-weight: 800; line-height: 1; }
.qm-stat-lbl  { font-size: 11px; color: #666; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }

.qm-stat-correct .qm-stat-icon { color: #1a7a1a; }
.qm-stat-correct .qm-stat-num  { color: #1a7a1a; }
.qm-stat-correct { border-color: #a8d5a8; background: #f0fdf0; }

.qm-stat-wrong .qm-stat-icon { color: #c0392b; }
.qm-stat-wrong .qm-stat-num  { color: #c0392b; }
.qm-stat-wrong { border-color: #f5b5b0; background: #fff5f5; }

.qm-stat-skip .qm-stat-icon { color: #888; }
.qm-stat-skip .qm-stat-num  { color: #888; }

.qm-score-note {
    font-size: 12px;
    color: #999;
    margin: 4px 0 0;
    font-style: italic;
}

/* Post-submit reviewed state */
.qm-reviewed.qm-question-block:not(.qm-answered) .qm-options .qm-option {
    opacity: .65;
}

@media (max-width: 480px) {
    .qm-score-modal-box { border-radius: 12px; }
    .qm-score-inner { padding: 28px 18px 22px; }
    .qm-score-num { font-size: 56px; }
    .qm-score-stats { gap: 8px; }
    .qm-stat { padding: 10px 12px; min-width: 72px; }
}

/* ═══════════════════════════════════════════
   SOCIAL SHARE BAR  (added in v3.6.0)
   Sits between the quiz header and the body.
═══════════════════════════════════════════ */
.qm-share-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 22px;
    background: #e4faeb40;
    border-bottom: 1.5px solid #16a34a7d;
}

.qm-share-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #555;
    margin-right: 2px;
    flex-shrink: 0;
}

/* Base button / link style */
.qm-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px 5px 9px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: opacity .15s, transform .12s;
    white-space: nowrap;
    font-family: inherit;
}
.qm-share-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* Per-platform colours — no hover effects */
.qm-share-whatsapp { background: #25d366; color: #fff; }
.qm-share-facebook { background: #1877f2; color: #fff; }
.qm-share-telegram { background: #229ed9; color: #fff; }
.qm-share-twitter  { background: #000;    color: #fff; }
.qm-share-instagram { background: #c13584; color: #fff; }

/* Copy Link — outlined style */
.qm-share-copy {
    background: #fff;
    color: #239745;
    border: 1.5px solid #16a34a7d;
}

/* "Copied!" feedback state — plain copy button */
.qm-share-copy.qm-copied {
    background: #d4f0d4;
    color: #1a7a1a;
    border-color: #a8d5a8;
}

/* "Link Copied!" feedback state — Instagram button */
.qm-share-instagram.qm-copied {
    background: #d4f0d4 !important;
    color: #1a7a1a;
}

@media (max-width: 600px) {
    .qm-share-bar { padding: 8px 14px; gap: 5px; }
    .qm-share-btn { font-size: 11px; padding: 5px 9px 5px 8px; }
    .qm-share-btn svg { width: 14px; height: 14px; }
    /* Hide button text labels on very small screens, keep icons */
    .qm-share-btn span:not(.qm-share-copy-label) { display: none; }
    .qm-share-label { display: none; }
}

/* ── Page-number pagination buttons ── */
.qm-page-numbers {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    flex: 1;
    justify-content: center;
}
.qm-page-num-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 6px;
    background: #fff;
    color: #239745;
    border: 1.5px solid #16a34a7d;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
    line-height: 1;
}
.qm-page-num-btn:hover:not(:disabled) {
    background: #f0fdf4;
    border-color: #239745;
    color: #0a5a70;
}
.qm-page-num-btn.qm-page-num-active,
.qm-page-num-btn:disabled {
    background: #239745;
    color: #fff;
    border-color: #239745;
    cursor: default;
}
.qm-page-ellipsis {
    font-size: 13px;
    color: #94a3b8;
    padding: 0 2px;
    user-select: none;
    line-height: 34px;
}
/* On small screens, shrink the number buttons a little */
@media ( max-width: 480px ) {
    .qm-page-num-btn {
        min-width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

/* ══════════════════════════════════════════════════════════════
   SINGLE QUESTION PAGE — Additional styles
   All existing quiz.css classes (.qm-share-bar, .qm-body,
   .qm-sidebar-col, .qm-question-block, etc.) are reused.
   Only new / overriding rules are defined here.
   ══════════════════════════════════════════════════════════════ */

/* ── Breadcrumbs ── */
.qm-breadcrumbs {
    font-size: 12.5px;
    color: #888;
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    line-height: 1.6;
}
.qm-breadcrumbs a {
    color: #16a34a;
    text-decoration: none;
}
.qm-breadcrumbs a:hover { text-decoration: underline; }
.qm-bc-sep {
    margin: 0 4px;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}
.qm-bc-current {
    color: #334155;
    font-weight: 600;
}

/* ── Question badge in header ── */
.qm-question-badge {
    display: inline-block;
    margin-left: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #0e7490;
    background: #e0f2f7;
    border-radius: 20px;
    padding: 2px 12px;
    vertical-align: middle;
    white-space: nowrap;
}

/* ── Prev/Next navigation bar ── */
.qm-question-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 28px 0 10px;
    padding: 12px 0;
    border-top: 1px solid #e0f2f7;
    flex-wrap: wrap;
}
.qm-quiz-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 500;
    color: #239745;
    background: #f0fdf4;
    border: 1.5px solid #16a34a7d;
    border-radius: 6px;
    padding: 7px 16px;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.qm-quiz-home-btn:hover {
    background: #239745;
    color: #fff;
    border-color: #239745;
}

/* ── Related Questions panel ── */
.qm-related-questions {
    margin-top: 28px;
    background: #f8fcfd;
    border: 1.5px solid #b5e4ee;
    border-radius: 8px;
    overflow: hidden;
}
.qm-related-title {
    font-size: 14px;
    font-weight: 600;
    color: #0e7490;
    margin: 0;
    padding: 12px 16px;
    background: #e0f2f7;
    border-bottom: 1.5px solid #b5e4ee;
}
.qm-related-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.qm-related-item {
    border-bottom: 1px solid #e0f2f7;
}
.qm-related-item:last-child { border-bottom: none; }
.qm-related-item a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px;
    text-decoration: none;
    color: #1a1a1a;
    font-size: 13.5px;
    transition: background .12s;
}
.qm-related-item a:hover { background: #e0f2f7; }
.qm-related-current a {
    background: #e0f2f7;
    font-weight: 600;
    color: #0e7490;
    pointer-events: none;
}
.qm-related-num {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    color: #0e7490;
    background: #fff;
    border: 1.5px solid #7ecde0;
    border-radius: 4px;
    padding: 1px 7px;
    margin-top: 1px;
    line-height: 1.6;
}
.qm-related-current .qm-related-num {
    background: #0e7490;
    color: #fff;
    border-color: #0e7490;
}
.qm-related-text {
    flex: 1;
    line-height: 1.5;
}

/* ── Admin: All Questions page tweaks ── */
.qm-question-badge {
    vertical-align: middle;
}

/* ── Sidebar heading (used in single-question sidebar renderer) ── */
.qm-sidebar-section {
    background: #fff;
    border: 1.5px solid #16a34a7d;
    border-radius: 7px;
    overflow: hidden;
    margin-bottom: 20px;
}
.qm-sidebar-heading {
    font-size: 13.5px;
    font-weight: 700;
    color: #239745;
    margin: 0;
    padding: 10px 14px;
    background: #f0fdf4;
    border-bottom: 1.5px solid #16a34a7d;
}

.qm-sidebar-quiz-link {
    color: #239745;
    text-decoration: none;
    display: block;
}
.qm-sidebar-quiz-link:hover { text-decoration: underline; color: #239745;}

/* ── Questions-per-page toolbar ── */
.footer_toobar{
    display: flex;
    align-items: center;
    justify-content:space-between;
    margin-bottom: 10px;
}
.social_media_icon a{
    color: #334155;
    line-height: 0;
}
.social_media_icon {
    display: flex;
    gap:8px;
    align-items: center;
}
.qm-per-page-toolbar {
    display: flex;
    align-items: center;
    justify-content:center;
    gap: 10px;
}
.qm-per-page-label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}
.qm-per-page-select {
    font-size: 13px;
    padding: 4px 10px;
    border: 1.5px solid #16a34a7d;
    border-radius: 5px;
    background: #fff;
    color: #1a1a1a;
    cursor: pointer;
    outline: none;
    transition: border-color .15s;
}
.qm-per-page-select:focus { border-color: #239745; }

/* ── Sidebar: questions list ── */
.qm-sidebar-questions { list-style: none; margin: 0; padding: 0; }
.qm-sidebar-q-item { border-bottom: 1px solid #16a34a7d;
}

; }
.qm-sidebar-q-item:last-child { border-bottom: none; }
.qm-sidebar-q-item a {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 14px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.45;
    transition: background .15s, color .15s;
}
.qm-sidebar-q-item a:hover { background: #f0fdf4; color: #239745; }
.qm-sidebar-q-item.qm-sq-current a {
    background: #cff3fc;
    color: #239745;
    font-weight: 600;
    cursor: default;
    pointer-events: none;
}
.qm-sidebar-q-text { flex: 1; }

/* ── Responsive adjustments ── */
@media ( max-width: 640px ) {
    .qm-question-nav-bar {
        gap: 8px;
    }
    .qm-question-badge {
        display: block;
        margin: 6px 0 0;
        font-size: 12px;
    }
    .qm-related-item a {
        padding: 9px 12px;
        font-size: 13px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   IMAGE SLIDER  —  single-question left column
   ═══════════════════════════════════════════════════════════════ */

.qm-image-slider {
    position: relative;
    margin: 24px 0 8px;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 2px 8px rgba(0,0,0,.14);
    /* fixed 16:5 aspect ratio for banner-style images */
    aspect-ratio: 16 / 5;
    min-height: 90px;
}

/* ── Slides ── */
.qm-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.qm-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .55s ease;
    pointer-events: none;
}
.qm-slide.qm-slide-active {
    opacity: 1;
    pointer-events: auto;
}

.qm-slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.qm-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

/* Cursor pointer only when slide has a link */
.qm-slide a img { cursor: pointer; }
.qm-slide > img  { cursor: default; }

/* ── Arrows ── */
.qm-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0,0,0,.42);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    padding: 0;
    outline: none;
}
.qm-slider-arrow:hover  { background: rgba(0,0,0,.72); }
.qm-slider-prev { left: 8px; }
.qm-slider-next { right: 8px; }

/* ── Dot indicators ── */
.qm-slider-dots {
    position: absolute;
    bottom: 7px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.qm-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    cursor: pointer;
    transition: background .2s, transform .2s;
    display: inline-block;
}
.qm-slider-dot.qm-dot-active {
    background: #fff;
    transform: scale(1.25);
}

/* ── Responsive ── */
@media ( max-width: 640px ) {
    .qm-image-slider {
        aspect-ratio: 16 / 6;
        border-radius: 6px;
    }
    .qm-slider-arrow {
        width: 26px;
        height: 26px;
        font-size: 18px;
    }
}
