/* ===== Deechea Quiz — Public Stylesheet ===== */
:root {
    --dq-primary:   #7c3aed;
    --dq-primary-l: #a78bfa;
    --dq-primary-bg:#faf5ff;
    --dq-correct:   #059669;
    --dq-correct-bg:#ecfdf5;
    --dq-wrong:     #dc2626;
    --dq-wrong-bg:  #fef2f2;
    --dq-gray:      #6b7280;
    --dq-border:    #e5e7eb;
    --dq-radius:    14px;
    --dq-shadow:    0 4px 24px rgba(124,58,237,.10);
}

.dq-exam-wrap { font-family:'Segoe UI',system-ui,sans-serif; max-width:100%; margin:0 auto; padding:16px; }

/* ---- Start Screen ---- */
.dq-start-card {
    background:#fff; border-radius:20px; padding:48px 40px;
    box-shadow:var(--dq-shadow); text-align:center;
    border:1px solid #e9d5ff;
}
.dq-start-icon { font-size:56px; margin-bottom:16px; }
.dq-exam-title { font-size:26px; font-weight:700; color:#1f2937; margin:0 0 12px; }
.dq-exam-desc  { color:var(--dq-gray); font-size:15px; line-height:1.6; margin-bottom:28px; }

.dq-start-meta {
    display:flex; justify-content:center; gap:24px; flex-wrap:wrap;
    margin-bottom:32px;
}
.dq-meta-item {
    display:flex; align-items:center; gap:6px;
    background:var(--dq-primary-bg); border-radius:30px;
    padding:8px 18px; font-size:14px; font-weight:600; color:var(--dq-primary);
    border:1px solid #e9d5ff;
}
.dq-meta-icon { font-size:18px; }

.dq-btn {
    display:inline-flex; align-items:center; gap:8px;
    padding:13px 32px; border-radius:40px;
    font-size:16px; font-weight:600; cursor:pointer;
    border:none; transition:all .2s; text-decoration:none;
}
.dq-btn-start, .dq-btn-primary {
    background:var(--dq-primary); color:#fff;
    box-shadow:0 4px 16px rgba(124,58,237,.3);
}
.dq-btn-start:hover, .dq-btn-primary:hover {
    background:#6d28d9; transform:translateY(-2px);
    box-shadow:0 6px 20px rgba(124,58,237,.4);
}
.dq-btn-outline {
    background:#fff; color:var(--dq-primary);
    border:2px solid var(--dq-primary);
}
.dq-btn-outline:hover { background:var(--dq-primary-bg); }

.dq-start-note {
    margin-top:20px; color:var(--dq-gray); font-size:13px;
}

/* ---- Quiz Header ---- */
.dq-quiz-header {
    background:#fff; border-radius:16px; padding:16px 24px;
    display:flex; justify-content:space-between; align-items:center;
    box-shadow:0 2px 8px rgba(0,0,0,.06); margin-bottom:20px;
    flex-wrap:wrap; gap:12px;
    border:1px solid var(--dq-border);
}
.dq-quiz-info { flex:1; min-width:200px; }
.dq-exam-name { font-weight:700; color:#1f2937; font-size:15px; display:block; margin-bottom:8px; }

.dq-progress-wrap { display:flex; align-items:center; gap:10px; }
.dq-progress-bar  { flex:1; height:8px; background:#e9d5ff; border-radius:4px; min-width:120px; }
.dq-progress-fill { height:100%; background:var(--dq-primary); border-radius:4px; transition:width .4s ease; width:0; }
.dq-progress-label { font-size:13px; color:var(--dq-gray); white-space:nowrap; }

.dq-quiz-controls { display:flex; align-items:center; gap:16px; }

.dq-score-badge {
    display:flex; flex-direction:column; align-items:center;
    background:var(--dq-primary-bg); border-radius:12px;
    padding:8px 16px; border:1px solid #e9d5ff;
}
.dq-score-num { font-size:22px; font-weight:800; color:var(--dq-primary); line-height:1; }
.dq-score-lbl { font-size:11px; color:var(--dq-gray); text-transform:uppercase; letter-spacing:.05em; }

.dq-timer {
    display:flex; align-items:center; gap:6px;
    background:#fff; border:2px solid var(--dq-border);
    border-radius:40px; padding:8px 16px;
    font-weight:700; font-size:16px; color:#1f2937;
}
.dq-timer.dq-timer-warning { border-color:#f59e0b; color:#b45309; animation:dq-pulse .6s infinite; }
.dq-timer.dq-timer-danger  { border-color:var(--dq-wrong); color:var(--dq-wrong); animation:dq-pulse .3s infinite; }

@keyframes dq-pulse { 0%,100%{opacity:1} 50%{opacity:.5} }

/* ---- Question Panel ---- */
.dq-question-panel { }

.dq-question-card {
    background:#fff; border-radius:var(--dq-radius);
    box-shadow:var(--dq-shadow); padding:32px;
    border:1px solid var(--dq-border);
    animation:dq-slidein .35s ease;
}
@keyframes dq-slidein {
    from { opacity:0; transform:translateY(16px); }
    to   { opacity:1; transform:translateY(0); }
}

.dq-q-number {
    display:inline-block; background:var(--dq-primary-bg);
    color:var(--dq-primary); font-size:12px; font-weight:700;
    padding:4px 12px; border-radius:20px; margin-bottom:16px;
    border:1px solid #e9d5ff; text-transform:uppercase; letter-spacing:.08em;
}
.dq-q-text {
    font-size:17px; font-weight:600; color:#1f2937;
    line-height:1.7; margin-bottom:24px; white-space:pre-wrap;
}

/* ---- Options ---- */
.dq-options { display:flex; flex-direction:column; gap:10px; margin-bottom:24px; }

.dq-option {
    display:flex; align-items:flex-start; gap:14px;
    padding:14px 18px; border:2px solid var(--dq-border);
    border-radius:12px; cursor:pointer;
    transition:all .18s; background:#fff;
}
.dq-option:hover:not(.dq-answered) {
    border-color:var(--dq-primary-l);
    background:var(--dq-primary-bg);
    transform:translateX(4px);
}
.dq-option.dq-selected { border-color:var(--dq-primary); background:var(--dq-primary-bg); }
.dq-option.dq-correct  { border-color:var(--dq-correct); background:var(--dq-correct-bg); }
.dq-option.dq-wrong    { border-color:var(--dq-wrong);   background:var(--dq-wrong-bg); }
.dq-option.dq-answered { cursor:default; }

.dq-opt-label {
    flex-shrink:0; width:30px; height:30px;
    border-radius:50%; display:flex; align-items:center; justify-content:center;
    font-weight:700; font-size:13px;
    background:var(--dq-primary-bg); color:var(--dq-primary);
    border:2px solid #e9d5ff;
    transition:all .18s;
}
.dq-option.dq-correct .dq-opt-label { background:var(--dq-correct); color:#fff; border-color:var(--dq-correct); }
.dq-option.dq-wrong   .dq-opt-label { background:var(--dq-wrong);   color:#fff; border-color:var(--dq-wrong); }

.dq-opt-text { font-size:15px; color:#374151; line-height:1.5; padding-top:3px; }
.dq-opt-icon { margin-left:auto; font-size:18px; flex-shrink:0; }

/* ---- Feedback Panel ---- */
.dq-feedback {
    border-radius:12px; overflow:hidden;
    border:1px solid var(--dq-border);
    margin-top:24px; animation:dq-fadein .4s ease;
}
@keyframes dq-fadein { from{opacity:0} to{opacity:1} }

.dq-feedback-header {
    padding:14px 20px; font-weight:700; font-size:15px;
    display:flex; align-items:center; gap:8px;
    user-select:none;
}
.dq-feedback.dq-fb-correct .dq-feedback-header { background:var(--dq-correct-bg); color:var(--dq-correct); }
.dq-feedback.dq-fb-wrong   .dq-feedback-header { background:var(--dq-wrong-bg);   color:var(--dq-wrong); }

/* Show Explanation toggle button */
.dq-show-exp-btn {
    display:block; width:calc(100% - 40px); margin:12px 20px 4px;
    padding:8px 16px; border-radius:8px; cursor:pointer;
    border:1.5px solid var(--dq-primary); background:#fff;
    color:var(--dq-primary); font-size:13px; font-weight:700;
    letter-spacing:.02em; transition:all .15s; text-align:center;
}
.dq-show-exp-btn:hover { background:var(--dq-primary); color:#fff; }

/* Explanation body — hidden by default, shown when toggled */
.dq-feedback-body { padding:0; overflow:hidden; transition:max-height .4s ease, padding .3s; }
.dq-feedback-body.dq-exp-hidden { max-height:0; padding:0 !important; }
.dq-feedback-body:not(.dq-exp-hidden) { padding:20px; max-height:3000px; }
/* Legacy open class still works for review screen */
.dq-feedback-body.dq-open { padding:20px; max-height:3000px; }

.dq-fb-section { margin-bottom:18px; }
.dq-fb-section:last-child { margin-bottom:0; }
.dq-fb-section-title {
    font-weight:700; font-size:13px; text-transform:uppercase;
    letter-spacing:.07em; color:var(--dq-primary); margin-bottom:6px;
    display:flex; align-items:center; gap:6px;
}
.dq-fb-section-body {
    font-size:14px; color:#374151; line-height:1.7;
    background:var(--dq-primary-bg); border-radius:8px;
    padding:12px 14px; white-space:pre-wrap;
    border-left:3px solid var(--dq-primary);
}

.dq-fb-tabs {
    display:flex; gap:6px; flex-wrap:wrap; margin-bottom:14px;
}
.dq-fb-tab {
    padding:5px 14px; border-radius:20px; font-size:13px;
    border:1.5px solid var(--dq-border); cursor:pointer; background:#fff;
    font-weight:600; transition:all .15s; color:var(--dq-gray);
}
.dq-fb-tab.active {
    background:var(--dq-primary); color:#fff; border-color:var(--dq-primary);
}
.dq-fb-tab-panel { display:none; }
.dq-fb-tab-panel.active { display:block; }

.dq-ncert-tag {
    display:inline-flex; align-items:center; gap:6px;
    font-size:12px; color:#6d28d9; background:#f3e8ff;
    padding:4px 12px; border-radius:20px; margin-top:8px;
    border:1px solid #e9d5ff; font-weight:600;
}

/* ---- Navigation ---- */
.dq-nav {
    display:flex; justify-content:space-between; align-items:center;
    margin-top:20px; flex-wrap:wrap; gap:10px;
}
.dq-nav-skip { font-size:13px; color:var(--dq-gray); cursor:pointer; text-decoration:underline; }
.dq-nav-skip:hover { color:var(--dq-primary); }

/* ---- Question Navigator ---- */
.dq-q-nav-grid {
    display:flex; flex-wrap:wrap; gap:6px; margin:16px 0;
}
.dq-q-nav-btn {
    width:34px; height:34px; border-radius:8px; border:2px solid var(--dq-border);
    background:#fff; font-size:13px; font-weight:700; cursor:pointer; color:#374151;
    transition:all .15s;
}
.dq-q-nav-btn:hover            { border-color:var(--dq-primary); color:var(--dq-primary); }
.dq-q-nav-btn.dq-nav-correct   { background:var(--dq-correct);   border-color:var(--dq-correct); color:#fff; }
.dq-q-nav-btn.dq-nav-wrong     { background:var(--dq-wrong);     border-color:var(--dq-wrong); color:#fff; }
.dq-q-nav-btn.dq-nav-current   { border-color:var(--dq-primary); box-shadow:0 0 0 3px #e9d5ff; }

/* ---- Result Screen ---- */
.dq-result-card {
    background:#fff; border-radius:20px; padding:48px 40px;
    box-shadow:var(--dq-shadow); text-align:center;
    border:1px solid #e9d5ff; max-width:560px; margin:0 auto;
}
.dq-result-emoji { font-size:64px; margin-bottom:12px; }
.dq-result-title { font-size:26px; font-weight:800; color:#1f2937; margin:0 0 24px; }

.dq-result-score-ring {
    position:relative; width:160px; height:160px; margin:0 auto 28px;
}
.dq-result-score-ring svg { width:100%; height:100%; }
.dq-ring-text {
    position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
    display:flex; flex-direction:column; align-items:center;
}
.dq-ring-pct { font-size:32px; font-weight:800; color:var(--dq-primary); }
.dq-ring-sub { font-size:12px; color:var(--dq-gray); }

.dq-result-stats {
    display:flex; justify-content:center; gap:24px; margin-bottom:24px;
}
.dq-stat {
    background:var(--dq-primary-bg); border-radius:12px;
    padding:14px 24px; border:1px solid #e9d5ff;
    display:flex; flex-direction:column; align-items:center;
}
.dq-stat-val { font-size:28px; font-weight:800; color:var(--dq-primary); }
.dq-stat-lbl { font-size:12px; color:var(--dq-gray); text-transform:uppercase; }

.dq-result-verdict {
    padding:14px 24px; border-radius:12px;
    font-weight:700; font-size:15px; margin-bottom:28px;
}
.dq-verdict-pass { background:var(--dq-correct-bg); color:var(--dq-correct); }
.dq-verdict-fail { background:var(--dq-wrong-bg); color:var(--dq-wrong); }

.dq-result-actions { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }

/* ---- Review Screen ---- */
.dq-review-header {
    display:flex; justify-content:space-between; align-items:center;
    margin-bottom:20px; flex-wrap:wrap; gap:10px;
}
.dq-review-header h2 { font-size:20px; font-weight:700; color:#1f2937; margin:0; }

.dq-review-item {
    background:#fff; border-radius:14px; padding:24px;
    margin-bottom:16px; box-shadow:0 2px 8px rgba(0,0,0,.06);
    border-left:4px solid var(--dq-border);
}
.dq-review-item.dq-rev-correct { border-left-color:var(--dq-correct); }
.dq-review-item.dq-rev-wrong   { border-left-color:var(--dq-wrong); }

.dq-rev-meta {
    display:flex; justify-content:space-between; align-items:center;
    margin-bottom:10px;
}
.dq-rev-num { font-size:12px; font-weight:700; color:var(--dq-gray); text-transform:uppercase; }
.dq-rev-badge {
    font-size:12px; font-weight:700; padding:3px 10px; border-radius:20px;
}
.dq-rev-badge-correct { background:var(--dq-correct-bg); color:var(--dq-correct); }
.dq-rev-badge-wrong   { background:var(--dq-wrong-bg); color:var(--dq-wrong); }
.dq-rev-unit-badge {
    font-size:11px; font-weight:600; padding:2px 10px; border-radius:20px;
    background:#f3e8ff; color:#6d28d9; margin-left:auto;
}

.dq-rev-q  { font-size:15px; font-weight:600; color:#1f2937; margin-bottom:12px; white-space:pre-wrap; }
.dq-rev-opts { display:flex; flex-direction:column; gap:6px; margin-bottom:12px; }
.dq-rev-opt {
    display:flex; gap:10px; align-items:flex-start;
    padding:8px 12px; border-radius:8px; font-size:14px;
}
.dq-rev-opt-correct { background:var(--dq-correct-bg); color:var(--dq-correct); }
.dq-rev-opt-wrong   { background:var(--dq-wrong-bg);   color:var(--dq-wrong); }
.dq-rev-opt-neutral { color:#374151; }
.dq-rev-opt-label   { font-weight:700; flex-shrink:0; }

/* Responsive */
@media (max-width:600px) {
    .dq-start-card, .dq-result-card { padding:28px 16px; }
    .dq-question-card { padding:20px 16px; }
    .dq-quiz-header { flex-direction:column; }
    .dq-result-stats { gap:12px; }
    .dq-stat { padding:10px 16px; }
}

/* ===== v2.2.0 Additions ===== */

/* ---- Formatted Question Text ---- */
.dq-q-text { white-space: normal !important; } /* override pre-wrap — we handle breaks in JS */

.dq-q-formatted {
    white-space: pre-line;  /* respects \n but collapses spaces */
    line-height: 1.8;
}

.dq-q-intro {
    margin-bottom: 12px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.7;
}

/* ---- Match the Following Table ---- */
.dq-match-table-wrap {
    overflow-x: auto;
    margin: 8px 0 16px;
    border-radius: 10px;
    border: 1.5px solid #e9d5ff;
}

.dq-match-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.dq-match-table thead tr {
    background: var(--dq-primary);
    color: #fff;
}

.dq-match-table th {
    padding: 10px 16px;
    font-weight: 700;
    font-size: 13px;
    text-align: left;
    letter-spacing: .04em;
}

.dq-match-table td {
    padding: 10px 16px;
    border-bottom: 1px solid #f3e8ff;
    color: #374151;
    line-height: 1.5;
    vertical-align: top;
}

.dq-match-table tbody tr:last-child td {
    border-bottom: none;
}

.dq-match-table tbody tr:nth-child(even) {
    background: #faf5ff;
}

.dq-match-table tbody tr:hover {
    background: #f3e8ff;
}

/* ---- Feedback Text Formatting ---- */
.dq-fb-text {  /* legacy - kept for safety */
    white-space: pre-line;
    line-height: 1.8;
    display: block;
}

/* Bullet points in feedback */
.dq-fb-section-body br + br {
    display: block;
    content: '';
    margin-top: 4px;
}

/* ---- Option text wrapping ---- */
.dq-opt-text {
    white-space: pre-line;
    line-height: 1.6;
}

/* ===== v2.3.1 Additions ===== */

/* ---- Passage Question Layout ---- */
.dq-passage-block {
    background: #f8f5ff;
    border: 1.5px solid #e0d4fc;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 20px;
    line-height: 1.8;
}

.dq-passage-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--dq-primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dq-passage-text {
    font-size: 15px;
    color: #374151;
    line-height: 1.85;
    white-space: pre-line;
}

.dq-passage-question {
    font-size: 17px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.6;
    margin-top: 4px;
    padding-top: 4px;
}

/* ---- Match Table: better column sizing ---- */
.dq-match-table td:first-child {
    width: 50%;
    font-weight: 500;
}

.dq-match-table td:last-child {
    width: 50%;
    color: #4b5563;
}

.dq-q-intro {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 10px;
    line-height: 1.6;
}

/* ---- Answer Review: explanation sections (like docx) ---- */
.dq-rev-explanation {
    margin-top: 14px;
    border-top: 1px solid #f0e8ff;
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dq-rev-exp-section {
    border-radius: 8px;
    overflow: hidden;
}

.dq-rev-exp-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 7px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dq-rev-exp-body {
    font-size: 14px;
    color: #374151;
    line-height: 1.75;
    padding: 10px 14px;
    white-space: pre-line;
}

/* Short explanation — neutral blue-purple */
.dq-rev-exp-short .dq-rev-exp-title  { background: #ede9fe; color: #5b21b6; }
.dq-rev-exp-short .dq-rev-exp-body   { background: #f5f3ff; border-left: 3px solid #a78bfa; }

/* Correct explanation — green */
.dq-rev-exp-correct .dq-rev-exp-title { background: #d1fae5; color: #065f46; }
.dq-rev-exp-correct .dq-rev-exp-body  { background: #ecfdf5; border-left: 3px solid #10b981; }

/* Why wrong — red/orange */
.dq-rev-exp-wrong .dq-rev-exp-title  { background: #fee2e2; color: #991b1b; }
.dq-rev-exp-wrong .dq-rev-exp-body   { background: #fff7f7; border-left: 3px solid #f87171; }

/* Strategy — amber */
.dq-rev-exp-strategy .dq-rev-exp-title { background: #fef3c7; color: #92400e; }
.dq-rev-exp-strategy .dq-rev-exp-body  { background: #fffbeb; border-left: 3px solid #fbbf24; }

/* Memory trick — indigo */
.dq-rev-exp-memory .dq-rev-exp-title  { background: #e0e7ff; color: #3730a3; }
.dq-rev-exp-memory .dq-rev-exp-body   { background: #eef2ff; border-left: 3px solid #818cf8; }


/* ── User name badge & greeting (v2.3.3) ────────────────────── */
.dq-user-greeting {
    background: #f3e8ff;
    color: #5b21b6;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 14px;
    margin-bottom: 14px;
    text-align: center;
}
.dq-quiz-name-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.dq-user-name-badge {
    background: #ede9fe;
    color: #5b21b6;
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.dq-review-user {
    font-size: 13px;
    color: #7c3aed;
}


/* ── Feedback structured list (v2.3.5) ──────────────────────── */
.dq-fb-content { font-size:14px; line-height:1.7; color:#374151; }

.dq-fb-list {
    margin: 6px 0 10px 0;
    padding: 0;
    list-style: none;
}
.dq-fb-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 10px;
    margin-bottom: 4px;
    background: #f9f5ff;
    border-left: 3px solid #7c3aed;
    border-radius: 0 6px 6px 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: #1f2937;
}
.dq-fb-list li::before {
    content: '▸';
    color: #7c3aed;
    font-size: 11px;
    margin-top: 3px;
    flex-shrink: 0;
}
.dq-fb-para {
    margin: 4px 0 8px 0;
    font-size: 13.5px;
    color: #374151;
    line-height: 1.6;
}

/* ── v7: Unit Selector ──────────────────────────────────────────────── */
.dq-unit-selector {
    margin: 16px 0 8px;
    text-align: left;
}
.dq-unit-label {
    font-size: 13px;
    font-weight: 700;
    color: #6d28d9;
    margin-bottom: 8px;
    letter-spacing: .02em;
}
.dq-unit-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.dq-unit-btn {
    background: #f3e8ff;
    color: #5b21b6;
    border: 1.5px solid #e0d4f7;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.dq-unit-btn:hover {
    background: #ede9fe;
    border-color: #7c3aed;
}
.dq-unit-btn.active {
    background: #7c3aed;
    color: #fff;
    border-color: #7c3aed;
}
.dq-unit-count {
    font-weight: 400;
    opacity: .8;
    font-size: 11px;
}
/* Unit badge in quiz header */
.dq-unit-badge {
    background: #f3e8ff;
    color: #6d28d9;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 10px;
    margin-left: 8px;
}
/* Unit badge on question card */
.dq-q-unit-badge {
    display: inline-block;
    background: #f3e8ff;
    color: #6d28d9;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 12px;
    margin-bottom: 8px;
    letter-spacing: .02em;
}

/* ── v7: Question Image ─────────────────────────────────────────────── */
.dq-q-image {
    margin: 14px 0 18px;
    text-align: center;
    background: #f9f7ff;
    border: 1.5px solid #e0d4f7;
    border-radius: 12px;
    overflow: hidden;
    padding: 8px;
}
.dq-q-image img {
    max-width: 100%;
    max-height: 360px;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

/* ── v8: Arrange / Chronological questions ──────────────────────────── */
.dq-arrange-intro {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.65;
    margin-bottom: 14px;
}

.dq-arrange-list {
    margin: 0 0 4px 0;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
    counter-reset: arrange-counter;
}

.dq-arrange-list li {
    font-size: 15px;
    color: #374151;
    line-height: 1.6;
    padding: 9px 14px 9px 48px;
    background: #f3f0ff;
    border-radius: 8px;
    border-left: 3px solid #7c3aed;
    position: relative;
    counter-increment: arrange-counter;
}

.dq-arrange-list li::before {
    content: counter(arrange-counter) ".";
    position: absolute;
    left: 14px;
    font-weight: 700;
    color: #7c3aed;
    min-width: 20px;
}

/* ── v8.1.2: Choose-correct question statements ─────────────────────── */
.dq-choose-intro {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.65;
    margin-bottom: 14px;
}

.dq-choose-list {
    margin: 0 0 4px 0;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
}

.dq-choose-list li {
    font-size: 15px;
    color: #374151;
    line-height: 1.6;
    padding: 9px 14px 9px 14px;
    background: #f8f7ff;
    border-radius: 8px;
    border-left: 3px solid #a78bfa;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.dq-stmt-num {
    flex-shrink: 0;
    font-weight: 700;
    color: #7c3aed;
    font-size: 14px;
    min-width: 22px;
    padding-top: 1px;
}

/* ── v8: Passage question — each line as <p> ────────────────────────── */
.dq-passage-text .dq-passage-line {
    margin: 0 0 6px 0;
    padding: 0;
}

.dq-passage-text .dq-passage-line:last-child {
    margin-bottom: 0;
}

/* ── v8: Passage question text (bold) ──────────────────────────────── */
.dq-passage-question {
    font-size: 17px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.65;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1.5px solid #e9d5ff;
}

/* ── v8: Passage block bold label and italic text ──────────────────── */
.dq-passage-text {
    font-size: 14.5px;
    color: #374151;
    line-height: 1.85;
    font-style: italic;
}

/* ── v8: Match table — bold column headers with color ───────────────── */
.dq-match-table thead th {
    background: #7c3aed;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 14px;
    text-align: left;
}

/* ── v8: choose-correct statement list formatting ───────────────────── */
.dq-stmt-list {
    margin: 8px 0 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dq-stmt-list li {
    font-size: 14.5px;
    color: #374151;
    padding: 5px 10px;
    border-radius: 6px;
    background: #faf5ff;
    border-left: 3px solid #c4b5fd;
    line-height: 1.55;
}

/* ── v8.3.2: Arrange items injected above options (when items mis-stored as options) ── */
.dq-arrange-opts-label {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin: 12px 0 8px 0;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
    letter-spacing: 0.01em;
}

/* ================================================================
   LAUNCHPAD 360 — Question Palette  (built into deechea-quiz)
   ================================================================ */

/* 1. Push the question panel left to make room for the palette */
.dq-question-panel {
    margin-right: 270px !important;
    max-width: calc(100% - 290px) !important;
    width: calc(100% - 290px) !important;
    box-sizing: border-box !important;
    transition: margin-right .2s ease;
}

/* Hide the original built-in nav: skip link, next btn, q-nav-grid */
.dq-nav .dq-nav-skip,
.dq-q-nav-grid {
    display: none !important;
}

/* Mobile: palette moves to a bottom sheet */
@media (max-width: 700px) {
    .dq-question-panel {
        margin-right: 0 !important;
        max-width: 100% !important;
    }
    #cuet-pal {
        width: 100% !important;
        top: auto !important;
        bottom: 0 !important;
        right: 0 !important;
        max-height: 54vh !important;
        border-radius: 16px 16px 0 0 !important;
        border-left: none !important;
        border-top: 1px solid #c2cfe0 !important;
    }
}

/* 2. Palette container */
#cuet-pal {
    position: fixed;
    top: 58px; right: 0;
    width: 262px;
    max-height: calc(100vh - 66px);
    background: #fff;
    border-left: 1px solid #c2cfe0;
    border-bottom: 1px solid #c2cfe0;
    border-radius: 0 0 0 10px;
    box-shadow: -3px 4px 24px rgba(0,0,0,.14);
    z-index: 9999999;
    font-family: 'Segoe UI','Trebuchet MS',Arial,sans-serif;
    display: flex; flex-direction: column; overflow: hidden;
}

/* 3. Header */
#cuet-pal .lp-hdr {
    background: linear-gradient(135deg,#1a3a6b,#1e5baa);
    padding: 10px 13px;
    display: flex; align-items: center; gap: 9px;
    flex-shrink: 0;
}
#cuet-pal .lp-av {
    width:36px; height:36px; border-radius:50%;
    background:rgba(255,255,255,.15); border:2px solid rgba(255,255,255,.35);
    display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
#cuet-pal .lp-info { display:flex; flex-direction:column; min-width:0; flex:1; }
#cuet-pal .lp-name {
    font-size:13px; font-weight:700; color:#fff;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
#cuet-pal .lp-subj {
    font-size:9.5px; color:rgba(255,255,255,.75);
    text-transform:uppercase; letter-spacing:1px; margin-top:1px;
}
#cuet-pal .lp-timer {
    background:rgba(0,0,0,.28); border-radius:5px;
    padding:3px 8px; font-size:13px; font-weight:700; color:#fff;
    font-family:'Courier New',monospace; letter-spacing:1px;
    flex-shrink:0; min-width:62px; text-align:center;
}
#cuet-pal .lp-timer.lp-warn {
    background:rgba(220,38,38,.85);
    animation: lp-blink 1s infinite;
}
@keyframes lp-blink { 0%,100%{opacity:1} 50%{opacity:.42} }

/* 4. Legend */
#cuet-pal .lp-legend {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 5px 4px; padding: 9px 12px 8px;
    background: #f5f8fc; border-bottom: 1px solid #dde4ef;
    flex-shrink: 0;
}
#cuet-pal .lp-leg-row {
    display: flex; align-items: center; gap: 6px;
    font-size: 9.5px; color: #374151; font-weight: 500; line-height: 1.3;
}
#cuet-pal .lp-full { grid-column: 1 / -1; }

#cuet-pal .lp-lb {
    width:22px; height:22px; min-width:22px;
    display:inline-flex; align-items:center; justify-content:center;
    font-size:10px; font-weight:700; color:#fff;
    flex-shrink:0; position:relative; line-height:1;
}
#cuet-pal .lp-lb-nv  { background:#94a3b8; border-radius:4px; }
#cuet-pal .lp-lb-na  { background:#dc2626; border-radius:4px; }
#cuet-pal .lp-lb-ans { background:#16a34a; border-radius:4px; }
#cuet-pal .lp-lb-mk  { background:#7c3aed; border-radius:50%; }
#cuet-pal .lp-lb-am  { background:#7c3aed; border-radius:50%; overflow:visible; }
#cuet-pal .lp-lb-am::after {
    content:''; position:absolute; bottom:-3px; right:-4px;
    width:11px; height:11px; border-radius:2px; border:1.5px solid #fff;
    background:#16a34a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 11'%3E%3Crect x='2.5' y='2.5' width='6' height='1.1' rx='.4' fill='white'/%3E%3Crect x='2.5' y='4.8' width='6' height='1.1' rx='.4' fill='white'/%3E%3Crect x='2.5' y='7.1' width='4' height='1.1' rx='.4' fill='white'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* 5. Section label */
#cuet-pal .lp-sec {
    background:#1e3f7a; color:#fff;
    font-size:10px; font-weight:700;
    padding:5px 12px; letter-spacing:.7px;
    text-transform:uppercase; flex-shrink:0;
}

/* 6. Scrollable grid */
#cuet-pal .lp-scroll {
    flex:1 1 auto; overflow-y:auto; overflow-x:hidden;
    padding:8px 10px 6px; background:#fff;
}
#cuet-pal .lp-scroll::-webkit-scrollbar { width:4px; }
#cuet-pal .lp-scroll::-webkit-scrollbar-track { background:#eef2f7; }
#cuet-pal .lp-scroll::-webkit-scrollbar-thumb { background:#94a3b8; border-radius:4px; }

#cuet-pal .lp-grid {
    display: grid !important;
    grid-template-columns: repeat(6,1fr) !important;
    gap: 5px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 7. Question number buttons */
#cuet-pal .lp-q {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    aspect-ratio: 1/1 !important;
    width: 100% !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    user-select: none !important;
    color: #fff !important;
    position: relative !important;
    transition: transform .1s, box-shadow .1s !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
    border-radius: 4px;
}
#cuet-pal .lp-q:hover {
    transform: scale(1.12) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.22) !important;
    z-index: 2 !important;
}

/* State colours */
#cuet-pal .lp-nv  { background:#94a3b8 !important; border-radius:4px !important; }
#cuet-pal .lp-na  { background:#dc2626 !important; border-radius:4px !important; }
#cuet-pal .lp-ans { background:#16a34a !important; border-radius:4px !important; }
#cuet-pal .lp-mk  { background:#7c3aed !important; border-radius:50% !important; }
#cuet-pal .lp-am  {
    background:#7c3aed !important;
    border-radius:50% !important;
    overflow:visible !important;
}
#cuet-pal .lp-am::after {
    content:'' !important;
    position:absolute !important; bottom:-3px !important; right:-4px !important;
    width:11px !important; height:11px !important;
    border-radius:2px !important; border:1.5px solid #fff !important; z-index:3 !important;
    background:#16a34a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 11'%3E%3Crect x='2.5' y='2.5' width='6' height='1.1' rx='.4' fill='white'/%3E%3Crect x='2.5' y='4.8' width='6' height='1.1' rx='.4' fill='white'/%3E%3Crect x='2.5' y='7.1' width='4' height='1.1' rx='.4' fill='white'/%3E%3C/svg%3E") center/contain no-repeat !important;
}
#cuet-pal .lp-cur {
    background:#1d4ed8 !important;
    border-radius:4px !important;
    transform:scale(1.13) !important;
    box-shadow:0 3px 10px rgba(29,78,216,.4) !important;
}

/* 8. Action buttons */
#cuet-pal .lp-btns {
    display:flex; flex-direction:column; gap:5px;
    padding:8px 11px 11px;
    border-top:1px solid #dde4ef;
    background:#f5f8fc; flex-shrink:0;
}
#cuet-pal .lp-btn {
    width:100% !important;
    padding:8px !important;
    font-size:11px !important; font-weight:600 !important;
    border:none !important; border-radius:5px !important;
    cursor:pointer !important; font-family:inherit !important;
    text-align:center !important; display:block !important;
    box-sizing:border-box !important; line-height:1.4 !important;
    transition:opacity .15s, transform .1s !important;
}
#cuet-pal .lp-btn:hover  { opacity:.86 !important; transform:translateY(-1px) !important; }
#cuet-pal .lp-btn:active { transform:translateY(0) !important; }
#cuet-pal .lp-btn-sm  { background:#5b21b6 !important; color:#fff !important; }
#cuet-pal .lp-btn-mk  { background:#7c3aed !important; color:#fff !important; }
#cuet-pal .lp-btn-cl  { background:#fff !important; color:#475569 !important; border:1px solid #c5d0df !important; }
#cuet-pal .lp-btn-sn  { background:linear-gradient(90deg,#16a34a,#22c55e) !important; color:#fff !important; }
#cuet-pal .lp-btn-sub { background:linear-gradient(90deg,#dc2626,#ef4444) !important; color:#fff !important; margin-top:2px !important; }

/* 9. Time-up modal */
#cuet-timeup {
    display:none; position:fixed; inset:0;
    background:rgba(0,0,0,.7);
    z-index:99999999;
    align-items:center; justify-content:center;
}
#cuet-timeup.show, #cuet-timeup[style*="flex"] { display:flex !important; }
#cuet-timeup .cup-box {
    background:#fff; border-radius:14px;
    padding:44px 52px; text-align:center; max-width:400px;
    box-shadow:0 20px 60px rgba(0,0,0,.3);
    animation:lp-popin .3s ease;
}
@keyframes lp-popin { from{transform:scale(.85);opacity:0} to{transform:scale(1);opacity:1} }
#cuet-timeup .cup-box h2  { color:#dc2626; margin:0 0 10px; font-size:22px; }
#cuet-timeup .cup-box p   { color:#374151; margin:0 0 24px; font-size:14px; line-height:1.65; }
#cuet-timeup .cup-btn {
    padding:11px 32px;
    background:linear-gradient(90deg,#dc2626,#ef4444);
    color:#fff; font-size:14px; font-weight:700;
    border-radius:8px; border:none; cursor:pointer;
    box-shadow:0 4px 14px rgba(220,38,38,.35);
}
#cuet-timeup .cup-countdown { font-size:12px; color:#94a3b8; margin-top:14px; }


/* =====================================================
   DEECHEA QUIZ — HIDE FEEDBACK / NEXT BTN DURING QUIZ
   Correct/Incorrect/Explanation shown only in Review
   ===================================================== */
#dq-exam-wrap .dq-screen-quiz #dq-feedback-*,
[id^="dq-feedback-"],
[id^="dq-next-btn-"] {
    display: none !important;
}

/* =====================================================
   DEECHEA QUIZ v8.3.5 — CLEAN QUIZ MODE
   - No correct/wrong reveal during quiz (review only)
   - No Next Question button (right panel navigation)
   - dq-selected = blue highlight only
   ===================================================== */
[id^="dq-feedback-"],
[id^="dq-next-btn-"],
.dq-nav { display: none !important; }

/* During quiz: answered options show only selection, no green/red */
.dq-screen-quiz .dq-option.dq-correct,
.dq-screen-quiz .dq-option.dq-wrong {
    background: inherit;
    border-color: inherit;
    color: inherit;
}
.dq-screen-quiz .dq-option.dq-correct .dq-opt-icon,
.dq-screen-quiz .dq-option.dq-wrong .dq-opt-icon {
    display: none;
}

/* =====================================================
   v8.3.5 — Wider question panel
   ===================================================== */
.dq-exam-wrap .dq-screen-quiz {
    width: 100%;
}
.dq-quiz-header {
    margin-right: 270px;
    box-sizing: border-box;
}
@media (max-width: 700px) {
    .dq-quiz-header {
        margin-right: 0;
    }
}
