/* =====================================================================
   CryptoLab Adaptive Testing & Question Bank Studio Stylesheet
   Enforces:
   - Touch targets >= 44px
   - Zero horizontal overflow at 320px, 768px, 1440px
   - High contrast (>= 4.5:1) on actual dark/light cards
   - Unified 1em KaTeX formula scale
   ===================================================================== */

.cl-quiz-ai { background: var(--cl-surface, #fff); color: var(--cl-ink, #17212b); margin-block: 1rem; overflow-wrap: anywhere; }
.cl-quiz-ai *, .cl-quiz-ai *::before, .cl-quiz-ai *::after { box-sizing: border-box; min-width: 0; }
.cl-quiz-ai summary { min-height: 44px; padding: .65rem; cursor: pointer; font-weight: 700; }
.cl-quiz-ai button, .cl-quiz-ai select, .cl-quiz-ai input:not([type=checkbox]) { min-height: 44px; max-width: 100%; }
.cl-quiz-ai button { margin: .3rem; white-space: normal; }
.cl-quiz-ai .cl-btn { border: 1px solid var(--cl-accent-fill, #2952cc); border-radius: .55rem; padding: .65rem .9rem; background: var(--cl-surface-info, #eef6ff); color: var(--cl-ink-info, #0b3a66); font: inherit; font-weight: 600; cursor: pointer; }
.cl-quiz-ai .cl-btn.cl-primary { background: var(--cl-accent-fill, #2952cc); color: #fff; }
.cl-quiz-ai .cl-btn:focus-visible { outline: 3px solid var(--cl-ink-info, #0b3a66); outline-offset: 2px; }
.cl-quiz-ai .cl-btn:disabled { opacity: .65; cursor: wait; }
.cl-quiz-ai .cl-quiz-field { display: grid; gap: .4rem; margin-block: .7rem; }
.cl-quiz-ai-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.cl-quiz-ai pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 16rem; overflow-y: auto; background: var(--cl-surface-muted, #f1f5f9); color: var(--cl-ink-muted, #334155); padding: .7rem; }
.cl-quiz-ai input[type=checkbox] { width: 22px; height: 22px; flex-shrink: 0; }
.cl-quiz-ai-check { display: flex; align-items: center; gap: .6rem; min-height: 44px; margin-block: .8rem; }
.cl-quiz-ai-audit { background: var(--cl-surface-info, #eef6ff); color: var(--cl-ink, #17212b); padding: 1rem; }
.cl-quiz-ai-item { margin-block: 1rem; }
.cl-quiz-ai-question { overflow-wrap: anywhere; }
.cl-quiz-ai textarea { width: 100%; }
@media (max-width: 640px) { .cl-quiz-ai-grid { grid-template-columns: 1fr; } .cl-quiz-ai { padding: .65rem; } }

.cl-quiz-studio,
.cl-quiz-session-page,
.cl-quiz-dashboard-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.cl-quiz-studio *,
.cl-quiz-session-page *,
.cl-quiz-dashboard-card * {
  box-sizing: border-box;
}

.cl-quiz-page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.cl-quiz-hero-card {
  margin-bottom: 1rem;
}

.cl-quiz-dashboard-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.cl-quiz-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

/* Touch targets >= 44px */
.cl-quiz-studio .cl-btn,
.cl-quiz-session-page .cl-btn,
.cl-quiz-dashboard-card .cl-btn,
.cl-quiz-page-nav .cl-btn,
.cl-quiz-studio .cl-input,
.cl-quiz-session-page .cl-input {
  min-height: 44px;
}

.cl-quiz-stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.cl-quiz-stat-item {
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cl-quiz-stat-label {
  font-size: 0.82rem;
  color: #334155;
  font-weight: 600;
}

.cl-quiz-stat-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.cl-quiz-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.cl-quiz-tab {
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
}

.cl-quiz-tab.is-active,
.cl-quiz-tab[aria-selected="true"] {
  background: #2563eb;
  color: #ffffff;
  border-color: #3b82f6;
}

.cl-quiz-panel {
  margin-bottom: 1rem;
  max-width: 100%;
  overflow-x: hidden;
}

.cl-quiz-panel-head {
  margin-bottom: 0.9rem;
}

.cl-quiz-panel-head h3 {
  margin: 0 0 0.35rem 0;
}

.cl-quiz-context-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.cl-quiz-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.cl-quiz-field-btn {
  justify-content: flex-end;
}

.cl-quiz-label {
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.cl-quiz-lock-badge,
.cl-quiz-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e3a8a;
  border: 1px solid #93c5fd;
}

.cl-quiz-custom-topic {
  margin-top: 0.25rem;
}

.cl-quiz-stem-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 0.85rem;
  margin-bottom: 0.9rem;
}

.cl-quiz-label-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.cl-quiz-tex-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cl-quiz-chip {
  min-height: 44px;
  padding: 0.35rem 0.65rem;
  font-size: 0.84rem;
}

.cl-quiz-textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  font-family: inherit;
}

.cl-quiz-preview-box {
  min-height: 110px;
  padding: 0.85rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  overflow-x: auto;
  max-width: 100%;
}

.cl-quiz-options-section {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.cl-quiz-options-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.cl-quiz-options-head h4 {
  margin: 0;
}

.cl-quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cl-quiz-option-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: center;
}

.cl-quiz-option-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  min-width: 64px;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  cursor: pointer;
  font-weight: 700;
}

.cl-quiz-option-check input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.cl-quiz-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.cl-quiz-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
}

.cl-quiz-subcard {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cl-quiz-subcard h4 {
  margin: 0 0 0.25rem 0;
}

.cl-quiz-status-msg {
  margin-top: 0.6rem;
}

.cl-quiz-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.cl-quiz-table th,
.cl-quiz-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
  text-align: left;
  vertical-align: top;
}

.cl-quiz-table th {
  font-weight: 700;
  white-space: nowrap;
}

/* Student Session Runner */
.cl-quiz-session-lookup {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
  margin-top: 0.75rem;
  align-items: end;
}

.cl-quiz-session-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.cl-quiz-qcard {
  margin-bottom: 0.85rem;
}

.cl-quiz-qcard,
.cl-quiz-matching-left,
.cl-quiz-matching-choices,
.cl-quiz-ordering-item > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.cl-quiz-ordering-item > span {
  flex: 1;
}

.cl-quiz-ordering-item > div {
  flex-shrink: 0;
}

[data-structured-options] fieldset,
.cl-quiz-option-row input {
  min-width: 0;
  max-width: 100%;
}

.cl-quiz-qcard.cl-quiz-integrity-reminder {
  padding-block-end: 2.35rem;
  background-image: var(--quiz-integrity-image);
  background-repeat: no-repeat;
  background-position: right 0.75rem bottom 0.45rem;
  background-size: min(216px, 90%) auto;
}

.cl-quiz-qhead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.cl-quiz-qnum {
  font-weight: 700;
  font-size: 0.92rem;
}

.cl-quiz-qpts {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.cl-quiz-qstem {
  margin: 0 0 0.7rem 0;
  line-height: 1.5;
}

.cl-quiz-multi-hint {
  margin: 0 0 0.55rem 0;
  font-size: 0.85rem;
  opacity: 0.9;
}

.cl-quiz-opt-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.cl-quiz-opt-choice {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  cursor: pointer;
}

.cl-quiz-opt-choice input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin: 0;
}

/* Unified KaTeX scale */
.cl-quiz-studio .katex,
.cl-quiz-session-page .katex {
  font-size: 1em;
}

.cl-quiz-studio .cl-math-block,
.cl-quiz-session-page .cl-math-block {
  display: block;
  overflow-x: auto;
  max-width: 100%;
  padding: 0.25rem 0;
}

@media (max-width: 960px) {
  .cl-quiz-stem-grid,
  .cl-quiz-two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .cl-quiz-context-grid {
    grid-template-columns: 1fr;
  }
  .cl-quiz-session-lookup {
    grid-template-columns: 1fr;
  }
  .cl-quiz-tabs {
    flex-direction: column;
  }
  .cl-quiz-tab {
    width: 100%;
    text-align: left;
  }
  .cl-quiz-action-row .cl-btn {
    width: 100%;
  }
}

/* Quiz test editing and archive controls */
.cl-quiz-edit-variant {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.8rem;
  margin: 0.9rem 0;
  min-width: 0;
}
.cl-quiz-edit-variant legend { font-weight: 700; padding: 0 0.35rem; }
.cl-quiz-edit-question {
  border-top: 1px solid #e2e8f0;
  padding: 0.75rem 0;
  min-width: 0;
}
.cl-quiz-edit-variant { min-inline-size: 0; }
.cl-quiz-test-edit-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.cl-quiz-test-edit-split > * { min-width: 0; }
.cl-quiz-test-edit-split textarea { width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; }
.cl-quiz-test-edit-split [data-edit-student-preview] { overflow-wrap: anywhere; }
.cl-quiz-test-edit-split .cl-math-block { max-width: 100%; overflow-x: auto; }
@media (max-width: 760px) {
  .cl-quiz-test-edit-split { grid-template-columns: minmax(0, 1fr); gap: .65rem; }
}
.cl-quiz-edit-options { display: grid; gap: 0.45rem; }
.cl-quiz-bank-edit-options { display: grid; gap: 0.55rem; max-width: 100%; }
.cl-quiz-bank-editor-row > td { padding: 0.85rem; background: var(--bg-panel, #f8fafc); }
.cl-quiz-bank-editor-row textarea { width: 100%; min-width: 0; resize: vertical; }
.cl-quiz-edit-option {
  display: grid;
  grid-template-columns: minmax(4rem, auto) minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
}
.cl-quiz-edit-option > label { white-space: nowrap; }
.cl-quiz-revisions { margin-top: 1rem; }
.cl-quiz-revisions ul { padding-left: 1.2rem; }
.cl-quiz-revisions li { margin: 0.7rem 0; overflow-wrap: anywhere; }
.cl-quiz-archive-keep { display: inline-flex; align-items: center; gap: 0.25rem; }
.cl-quiz-editor-card { margin-top: 1rem; }
.cl-quiz-import-modal { position:fixed; inset:3vh 3vw; z-index:10000; display:flex; flex-direction:column; overflow:hidden; padding:1rem; border:1px solid #94a3b8; border-radius:14px; background:var(--bg-panel,#fff); color:var(--text-strong,#172033); box-shadow:0 18px 70px rgba(0,0,0,.35); box-sizing:border-box; }
.cl-quiz-question-editor-modal { inset: 2vh 2vw; }
.cl-quiz-import-modal-head { flex:0 0 auto; }
.cl-quiz-question-editor-layout { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr); grid-template-rows:minmax(0,1fr); flex:1 1 auto; min-height:0; overflow:hidden; gap:1rem; align-items:stretch; }
.cl-quiz-question-editor-pane { min-width:0; min-height:0; max-height:100%; overflow-y:auto; overflow-anchor:none; overscroll-behavior:contain; scrollbar-gutter:stable; }
.cl-quiz-question-editor-pane[data-bank-question-form] { padding-right:.2rem; }
.cl-quiz-question-editor-pane textarea { width:100%; min-width:0; resize:vertical; }
.cl-quiz-question-editor-pane .cl-quiz-textarea { min-height:180px; }
.cl-quiz-question-editor-modal .cl-quiz-edit-option { grid-template-columns:minmax(4.5rem,auto) minmax(0,1fr); }
.cl-quiz-question-editor-modal .cl-quiz-edit-option textarea { min-height:3.5rem; }
.cl-quiz-question-editor-history { margin-top:1rem; max-height:24vh; overflow:auto; }
.cl-quiz-question-editor-history li { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; padding:.45rem 0; border-bottom:1px solid var(--border-subtle,#e2e8f0); }
.cl-quiz-question-editor-modal [data-bank-question-form] .cl-quiz-textarea { flex:none; min-height:15rem; max-height:45vh; resize:vertical; }
.cl-quiz-bank-bulk-tools { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; }
.cl-quiz-danger-zone { display:flex; justify-content:space-between; align-items:center; gap:1rem; margin-top:1rem; padding:1rem; border:2px solid #b42318; border-radius:.75rem; background:#fff5f4; }
.cl-quiz-danger-zone > div { min-width:0; }
.cl-quiz-danger-zone p { margin:.35rem 0 0; }
.cl-quiz-danger-zone .cl-management-danger { flex:0 0 auto; background:#b42318; border-color:#b42318; color:#fff; }
.cl-quiz-panel[data-quiz-panel="bank"] .cl-table-wrap > table.cl-quiz-bank-table { display:table; width:100%; min-width:0 !important; max-width:100%; table-layout:fixed; border-spacing:0; }
.cl-quiz-bank-table th:nth-child(1), .cl-quiz-bank-table td:nth-child(1) { width:4%; padding-inline:.25rem; text-align:center; }
.cl-quiz-bank-table th:nth-child(2), .cl-quiz-bank-table td:nth-child(2) { width:8%; }
.cl-quiz-bank-table th:nth-child(3), .cl-quiz-bank-table td:nth-child(3) { width:18%; }
.cl-quiz-bank-table th:nth-child(4), .cl-quiz-bank-table td:nth-child(4) { width:14%; }
.cl-quiz-bank-table th:nth-child(5), .cl-quiz-bank-table td:nth-child(5) { width:32%; }
.cl-quiz-bank-table th:nth-child(6), .cl-quiz-bank-table td:nth-child(6) { width:10%; }
.cl-quiz-bank-table th:nth-child(7), .cl-quiz-bank-table td:nth-child(7) { width:14%; }
.cl-quiz-bank-table th, .cl-quiz-bank-table td { min-width:0; max-width:none !important; overflow-wrap:anywhere; word-break:normal; white-space:normal; }
.cl-quiz-bank-table td:nth-child(5) { overflow-wrap:anywhere; word-break:break-word; }
.cl-quiz-bank-table td:nth-child(5) .katex, .cl-quiz-bank-table td:nth-child(5) .katex-html { white-space:normal !important; overflow-wrap:anywhere; }
.cl-quiz-bank-table td:nth-child(5) .katex-display { max-width:100%; overflow-x:auto; }
.cl-quiz-bank-table td:nth-child(7) .cl-quiz-action-row .cl-btn { white-space:normal; }
.cl-quiz-bank-table input[type="checkbox"] { margin:0; vertical-align:middle; }
.cl-quiz-bank-table thead th { position:static; }
.cl-quiz-panel[data-quiz-panel="bank"] [data-quiz-bank-table-wrap] { overflow-x:hidden; }
.cl-quiz-bank-table td:nth-child(7) .cl-quiz-action-row { flex-wrap:wrap; }
@media(max-width:760px) {
  .cl-quiz-panel[data-quiz-panel="bank"] .cl-table-wrap > table.cl-quiz-bank-table { font-size:.78rem; }
  .cl-quiz-bank-table th, .cl-quiz-bank-table td { padding:.35rem .25rem; }
  .cl-quiz-bank-table th:nth-child(1), .cl-quiz-bank-table td:nth-child(1) { width:7%; }
  .cl-quiz-bank-table th:nth-child(2), .cl-quiz-bank-table td:nth-child(2) { width:9%; }
  .cl-quiz-bank-table th:nth-child(3), .cl-quiz-bank-table td:nth-child(3) { width:17%; }
  .cl-quiz-bank-table th:nth-child(4), .cl-quiz-bank-table td:nth-child(4) { width:14%; }
  .cl-quiz-bank-table th:nth-child(5), .cl-quiz-bank-table td:nth-child(5) { width:30%; }
  .cl-quiz-bank-table th:nth-child(6), .cl-quiz-bank-table td:nth-child(6) { width:9%; }
  .cl-quiz-bank-table th:nth-child(7), .cl-quiz-bank-table td:nth-child(7) { width:14%; }
  .cl-quiz-danger-zone { align-items:stretch; flex-direction:column; }
}
@media(max-width:760px) { .cl-quiz-question-editor-layout { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr) minmax(0,1fr); gap:.55rem; } .cl-quiz-question-editor-history { max-height:18vh; } }
.cl-quiz-import-modal-head { display:flex; justify-content:space-between; align-items:center; gap:.75rem; margin-bottom:.8rem; }
.cl-quiz-import-split { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); grid-template-rows:minmax(0,1fr); flex:1 1 auto; min-height:0; overflow:hidden; gap:1rem; align-items:stretch; }
.cl-quiz-import-split > * { min-width:0; min-height:0; max-height:100%; overflow-y:auto; overflow-anchor:none; overscroll-behavior:contain; scrollbar-gutter:stable; }
.cl-quiz-import-split > label { display:flex; flex-direction:column; }
.cl-quiz-import-modal .cl-quiz-textarea { flex:1 1 auto; width:100%; min-height:0; max-height:100%; resize:none; font-family:ui-monospace,Consolas,monospace; white-space:pre-wrap; overflow-wrap:anywhere; word-break:break-word; overflow-x:hidden; }
.cl-quiz-student-preview { min-height:180px; padding:1rem; }
.cl-quiz-student-options { padding-left:1.8rem; }
.cl-quiz-student-options li { padding:.45rem .35rem; border-bottom:1px solid #dbe2ea; }
.cl-quiz-student-answer-line { margin:1rem 0; min-height:5rem; border-bottom:1px solid #64748b; }
.cl-quiz-import-modal-actions { display:flex; flex:0 0 auto; flex-wrap:wrap; justify-content:flex-end; gap:.65rem; margin-top:.9rem; }
.cl-quiz-question-archive-list { flex:1 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
.cl-quiz-topic-checklist { display:grid; gap:.4rem; max-height:14rem; overflow:auto; padding:.55rem; border:1px solid var(--border-subtle,#d7dee8); border-radius:.5rem; background:var(--surface,#fff); }
.cl-quiz-topic-option { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:.55rem; align-items:start; padding:.4rem .45rem; border-radius:.35rem; cursor:pointer; }
.cl-quiz-topic-option:hover { background:var(--surface-muted,#f1f5f9); }
.cl-quiz-topic-option span { overflow-wrap:anywhere; }
.cl-quiz-topic-option small { color:var(--text-muted,#64748b); white-space:nowrap; }
.cl-quiz-quota-group { min-width:0; margin:.7rem 0; padding:.65rem .8rem; border:1px solid var(--border-subtle,#d7dee8); border-radius:.5rem; }
.cl-quiz-quota-group legend { padding:0 .3rem; font-weight:600; }
.cl-quiz-quota-group .cl-quiz-mini-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
@media(max-width:760px) { .cl-quiz-import-modal { inset:1vh 1vw; padding:.7rem; } .cl-quiz-import-split { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr) minmax(0,1fr); gap:.55rem; } }
@media (max-width: 520px) {
  .cl-quiz-edit-option { grid-template-columns: minmax(3.5rem, auto) minmax(0, 1fr); }
  .cl-quiz-revisions li > * { margin: 0.2rem 0; }
}

.cl-quiz-guide-heading, .cl-quiz-guide > header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.cl-quiz-guide-heading h2, .cl-quiz-guide > header h2 { margin: 0; }
.cl-quiz-guide {
  inline-size: min(48rem, calc(100% - 1.5rem));
  max-block-size: min(85dvh, 52rem);
  padding: 1rem;
  border: 1px solid #64748b;
  border-radius: .85rem;
  background: Canvas;
  color: CanvasText;
  overflow: auto;
}
.cl-quiz-guide::backdrop { background: rgb(15 23 42 / 65%); }
.cl-quiz-guide [data-quiz-guide-sections] > section { padding-block: .85rem; border-top: 1px solid #94a3b8; }
.cl-quiz-guide li { margin-block-end: .55rem; }
.cl-quiz-guide ol, .cl-quiz-guide ul { padding-inline-start: 1.5rem; }
.cl-quiz-guide details { margin-block: .75rem; }
.cl-quiz-guide summary { cursor: pointer; }
.cl-quiz-guide .cl-btn, .cl-quiz-guide-heading .cl-btn { min-height: 44px; }

.cl-quiz-formula-field { display: flex; flex-wrap: wrap; align-items: start; gap: .5rem; }
.cl-quiz-formula-field > .cl-input { flex: 1 1 13rem; min-width: 0; }
.cl-quiz-formula-field > .cl-quiz-equation-preview { flex-basis: 100%; }
.cl-quiz-equation-tools { display: flex; flex-wrap: wrap; gap: .35rem; margin-block: .7rem; }
.cl-quiz-equation-tools .cl-btn { min-inline-size: 44px; }
.cl-quiz-equation-cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 5rem), 1fr)); gap: .35rem; margin-block: .5rem; }
.cl-quiz-equation-cells input { min-width: 0; width: 100%; }
.cl-quiz-equation-preview { overflow-x: auto; padding-block: .4rem; overflow-wrap: anywhere; }

.cl-quiz-equation .cl-btn { min-block-size: 44px; }
.cl-quiz-equation-tools[hidden] { display: none; }
.cl-quiz-equation-tabs [aria-pressed="true"] { outline: 2px solid currentColor; outline-offset: -2px; }
.cl-quiz-equation-cells { grid-template-columns: repeat(var(--equation-columns, 1), minmax(0, 1fr)); }
.cl-quiz-equation-cells label { min-width: 0; }
.cl-quiz-equation-cells input { padding-inline: .25rem; }
.cl-quiz-equation [data-equation-value] { font-family: ui-monospace, monospace; }

[data-quiz-exact-bulk][hidden], [data-quiz-exact-results] [data-exact-copy][hidden] { display: none; }
[data-quiz-exact-dupes] { margin-block: .75rem; }
[data-quiz-exact-results] [data-exact-group] { min-width: 0; overflow-wrap: anywhere; margin-bottom: .5rem; }

.cl-quiz-duplicate-tools {
  position: relative;
  padding-inline-end: 3.25rem;
}

.cl-quiz-duplicate-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.5rem;
}

.cl-quiz-duplicate-actions .cl-quiz-field {
  min-width: 0;
  max-width: 100%;
  margin: 0;
}

.cl-quiz-duplicate-actions input[type="file"] {
  max-width: 100%;
  min-height: 44px;
}

.cl-quiz-duplicate-help > summary {
  position: absolute;
  inset-inline-end: 0;
  inset-block-start: 0;
  display: inline-grid;
  place-items: center;
  width: 44px;
  min-height: 44px;
  padding: 0;
  list-style: none;
  cursor: pointer;
}

.cl-quiz-duplicate-help > summary::-webkit-details-marker {
  display: none;
}

.cl-quiz-duplicate-help p {
  margin-block: 0.5rem;
}
[data-quiz-session-questions] [data-quiz-protected-text] {
    -webkit-user-select: none;
    user-select: none;
}

