/**
 * ============================================================================
 * TEST BUILDER UI — REFINED DESIGN
 * Principles: generous whitespace, layered depth, spring-feeling transitions,
 * precise typography, micro-interactions that earn attention.
 * ============================================================================
 */

/* ============================================================================
   DESIGN TOKENS
   ============================================================================ */
:root {
  --tb-radius-sm: 6px;
  --tb-radius-md: 10px;
  --tb-radius-lg: 14px;
  --tb-radius-xl: 20px;

  --tb-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.06);
  --tb-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.05);
  --tb-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.05);
  --tb-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06);
  --tb-shadow-xl:
    0 20px 48px rgba(0, 0, 0, 0.14), 0 8px 20px rgba(0, 0, 0, 0.08);
  --tb-shadow-card:
    0 0 0 1px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.06);

  /* Derived from mainstyles.css tokens — no hardcoding */
  --tb-red: var(--primary-color);
  --tb-red-light: rgba(232, 17, 35, 0.08);
  --tb-red-ring: rgba(232, 17, 35, 0.2);

  /* Difficulty — use accent tokens from mainstyles.css */
  --tb-diff-easy-bg: var(--secondary-light); /* #d1fae5 */
  --tb-diff-easy-fg: var(--secondary-dark); /* #059669 */
  --tb-diff-medium-bg: rgba(245, 158, 11, 0.12);
  --tb-diff-medium-fg: var(--accent-orange); /* #f59e0b */
  --tb-diff-hard-bg: rgba(239, 68, 68, 0.1);
  --tb-diff-hard-fg: var(--accent-red); /* #ef4444 */

  /* MCQ badge */
  --tb-mcq-bg: var(--secondary-light);
  --tb-mcq-fg: var(--secondary-dark);

  /* AO coverage bar */
  --tb-ao1-color: var(--primary-dark); /* #1e40af blue */
  --tb-ao2-color: var(--accent-purple); /* #8b5cf6 */
  --tb-ao3-color: var(--secondary-color); /* #10b981 */

  --tb-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --tb-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --tb-ease-in: cubic-bezier(0.4, 0, 1, 1);

  --tb-duration-fast: 120ms;
  --tb-duration-normal: 200ms;
  --tb-duration-slow: 320ms;
}

/* ============================================================================
   PAGE SHELL
   ============================================================================ */
.test-builder-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--background-alt);
  margin: 0;
  border-top: 1px solid var(--border-color);
}

/* ============================================================================
   TOP BAR
   ============================================================================ */
.test-builder-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 52px;
  background: var(--background);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  gap: 16px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  min-width: 0;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--tb-duration-fast) ease;
  white-space: nowrap;
}

.breadcrumb a:hover {
  color: var(--text-dark);
}

.breadcrumb i {
  font-size: 9px;
  opacity: 0.45;
  flex-shrink: 0;
}

.breadcrumb span {
  color: var(--text-dark);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.test-builder-top-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-edit-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--tb-radius-md);
  cursor: pointer;
  transition:
    background var(--tb-duration-fast) ease,
    color var(--tb-duration-fast) ease,
    border-color var(--tb-duration-fast) ease;
  font-family: inherit;
}

.btn-edit-title:hover {
  background: var(--background-alt);
  color: var(--text-dark);
  border-color: var(--border-color);
}

.beta-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--secondary-dark);
  background: rgba(5, 150, 105, 0.08);
  border: 1.5px dashed var(--secondary-dark);
  border-radius: var(--tb-radius-md);
}

/* ============================================================================
   TWO-COLUMN LAYOUT
   ============================================================================ */
.test-builder-layout {
  display: grid;
  grid-template-columns: 580px 1fr;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

@media (max-width: 1200px) {
  .test-builder-layout {
    grid-template-columns: 360px 1fr;
  }
}

/* ============================================================================
   LEFT PANEL — QUESTION BANK
   ============================================================================ */
.question-bank-panel {
  display: flex;
  flex-direction: column;
  background: var(--background-alt);
  border-right: 1px solid var(--border-color);
  overflow: hidden;
  min-height: 0;
}

/* Filters bar */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--background);
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-light);
  background: var(--background-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--tb-radius-md);
  cursor: pointer;
  transition:
    background var(--tb-duration-fast) ease,
    color var(--tb-duration-fast) ease,
    border-color var(--tb-duration-fast) ease,
    box-shadow var(--tb-duration-fast) ease;
  font-family: inherit;
  white-space: nowrap;
}

.filter-btn i {
  font-size: 10px;
  opacity: 0.7;
}

.filter-btn:hover {
  background: var(--background);
  color: var(--text-dark);
  border-color: rgba(0, 0, 0, 0.18);
  box-shadow: var(--tb-shadow-xs);
}

.filter-btn.filter-active {
  background: var(--tb-red);
  color: #fff;
  border-color: var(--tb-red);
  box-shadow: 0 1px 4px rgba(232, 17, 35, 0.3);
}

.filter-btn.filter-active i {
  opacity: 1;
}

/* Questions count */
.questions-count {
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--background);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

#questionsShown {
  font-weight: 700;
  color: var(--text-dark);
}

/* Filter dropdown */
.filter-dropdown {
  position: fixed;
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--tb-radius-lg);
  box-shadow: var(--tb-shadow-lg);
  min-width: 220px;
  max-width: 320px;
  max-height: 380px;
  overflow: hidden;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  animation: tb-dropdown-in var(--tb-duration-normal) var(--tb-ease-out) both;
}

@keyframes tb-dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.filter-dropdown-content {
  overflow-y: auto;
  max-height: 340px;
  padding: 4px;
}

.filter-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-dark);
  border-radius: var(--tb-radius-sm);
  cursor: pointer;
  transition: background var(--tb-duration-fast) ease;
  gap: 8px;
}

.filter-option:hover {
  background: var(--background-alt);
}

.filter-option.active {
  background: var(--tb-red-light);
  color: var(--tb-red);
  font-weight: 600;
}

.filter-count {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--background-alt);
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 500;
  margin-left: auto;
}

.filter-option.active .filter-count {
  background: rgba(232, 17, 35, 0.12);
  color: var(--tb-red);
}

/* ============================================================================
   QUESTION CARDS
   ============================================================================ */
.questions-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.questions-list::-webkit-scrollbar {
  width: 5px;
}
.questions-list::-webkit-scrollbar-track {
  background: transparent;
}
.questions-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 99px;
}

.question-card {
  position: relative;
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--tb-radius-lg);
  padding: 13px 44px 13px 14px;
  cursor: pointer;
  transition:
    border-color var(--tb-duration-fast) ease,
    box-shadow var(--tb-duration-normal) var(--tb-ease-out),
    transform var(--tb-duration-normal) var(--tb-ease-spring);
  box-shadow: var(--tb-shadow-card);
  display: flex;
  flex-direction: column;
  gap: 6px;
  /* Consistent minimum height so all cards feel uniform */
  min-height: 220px;
}

.question-card:hover {
  border-color: var(--text-muted);
  box-shadow: var(--tb-shadow-md);
  transform: translateY(-1px);
}

.question-card.selected {
  border-color: var(--tb-red);
  box-shadow:
    0 0 0 1px var(--tb-red-ring),
    var(--tb-shadow-sm);
  transform: translateY(0);
}

/* Card header row */
.question-card-header {
  display: flex;
  align-items: center;
  gap: 7px;
}

.question-title-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.question-preview-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--background-alt);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 10px;
  flex-shrink: 0;
  transition:
    background var(--tb-duration-fast) ease,
    color var(--tb-duration-fast) ease,
    border-color var(--tb-duration-fast) ease;
}

.question-card:hover .question-preview-icon {
  background: var(--background-alt);
  border-color: rgba(0, 0, 0, 0.18);
  color: var(--text-dark);
}

.question-card.selected .question-preview-icon {
  background: var(--tb-red);
  border-color: var(--tb-red);
  color: #fff;
}

/* Type badge */
.question-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--tb-radius-sm);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.mcq-badge {
  background: var(--tb-mcq-bg);
  color: var(--tb-mcq-fg);
}

/* Difficulty badge */
.question-difficulty-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--tb-radius-sm);
  font-size: 10.5px;
  font-weight: 600;
  flex-shrink: 0;
}

.difficulty-easy {
  background: var(--tb-diff-easy-bg);
  color: var(--tb-diff-easy-fg);
}
.difficulty-medium {
  background: var(--tb-diff-medium-bg);
  color: var(--tb-diff-medium-fg);
}
.difficulty-hard {
  background: var(--tb-diff-hard-bg);
  color: var(--tb-diff-hard-fg);
}

.question-marks {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Topic row */
.question-card-topic {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dark);
  flex-wrap: wrap;
  row-gap: 3px;
}

.topic-icon {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.preview-source {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--background-alt);
  border: 1px solid var(--border-color);
  padding: 1px 6px;
  border-radius: var(--tb-radius-sm);
  white-space: nowrap;
}

/* Stem preview — fixed height so all cards align visually */
.question-card-content {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
  /* Reserve exactly 4 lines so cards with/without KaTeX have same height */
  height: calc(12.5px * 1.55 * 4);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  flex-shrink: 0;
}

/* Diagram tag */
.question-card-meta {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.meta-tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--background-alt);
  padding: 2px 7px;
  border-radius: var(--tb-radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.has-diagram-tag {
  background: rgba(232, 17, 35, 0.07);
  color: var(--tb-red);
}

/* Checkbox */
.question-checkbox {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 20px;
  height: 20px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--background-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background var(--tb-duration-fast) ease,
    border-color var(--tb-duration-fast) ease,
    transform var(--tb-duration-normal) var(--tb-ease-spring);
}

.question-card:hover .question-checkbox {
  border-color: rgba(0, 0, 0, 0.25);
}

.question-card.selected .question-checkbox {
  background: var(--tb-red);
  border-color: var(--tb-red);
  transform: scale(1.05);
}

.question-checkbox i {
  color: #fff;
  font-size: 9px;
  opacity: 0;
  transform: scale(0.4);
  transition:
    opacity var(--tb-duration-fast) ease-out,
    transform var(--tb-duration-fast) var(--tb-ease-spring);
}

.question-card.selected .question-checkbox i {
  opacity: 1;
  transform: scale(1);
}

/* ============================================================================
   RIGHT PANEL — SELECTED QUESTIONS
   ============================================================================ */
.test-preview-panel {
  display: flex;
  flex-direction: column;
  background: var(--background);
  overflow: hidden;
  min-height: 0;
}

/* Bottom action bar */
.bottom-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 20px;
  background: var(--background);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.left-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}

.right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.save-status {
  font-size: 12px;
  color: var(--secondary-dark);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-download,
.btn-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border-radius: var(--tb-radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
  white-space: nowrap;
  transition:
    background var(--tb-duration-fast) ease,
    color var(--tb-duration-fast) ease,
    border-color var(--tb-duration-fast) ease,
    box-shadow var(--tb-duration-fast) ease,
    transform var(--tb-duration-normal) var(--tb-ease-spring);
}

.btn-toggle {
  background: var(--background);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
  box-shadow: var(--tb-shadow-xs);
}

.btn-toggle:hover {
  background: var(--background-alt);
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow: var(--tb-shadow-sm);
  transform: translateY(-1px);
}

.btn-toggle:active {
  transform: translateY(0) scale(0.97);
}

.btn-toggle[aria-pressed="false"] {
  background: var(--background-alt);
  color: var(--text-muted);
  border-color: var(--border-color);
  box-shadow: none;
}

.btn-toggle[aria-pressed="false"]:hover {
  background: var(--background);
  color: var(--text-dark);
}

.btn-primary {
  background: var(--tb-red);
  color: #fff;
  box-shadow: 0 1px 3px rgba(232, 17, 35, 0.25);
}

.btn-primary:hover {
  background: #c80530;
  box-shadow: 0 4px 12px rgba(232, 17, 35, 0.3);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--background);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
  box-shadow: var(--tb-shadow-xs);
}

.btn-secondary:hover {
  background: var(--background-alt);
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow: var(--tb-shadow-sm);
  transform: translateY(-1px);
}

.btn-download {
  background: var(--secondary-color);
  color: #fff;
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.25);
}

.btn-download:hover {
  background: var(--secondary-dark);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
  transform: translateY(-1px);
}

/* Empty state */
.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background: var(--pp-surface-2, var(--background-alt));
}

.es-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 300px;
  width: 100%;
}

@keyframes esItemIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.es-icon {
  font-size: 48px;
  color: var(--primary-color);
  opacity: 0.25;
  margin-bottom: 20px;
  animation: esItemIn 220ms cubic-bezier(0.23, 1, 0.32, 1) both 0ms;
}

.es-title {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  animation: esItemIn 220ms cubic-bezier(0.23, 1, 0.32, 1) both 50ms;
}

.es-desc {
  font-size: var(--font-size-sm);
  color: var(--text-light);
  line-height: 1.6;
  margin: 0 0 20px;
  animation: esItemIn 220ms cubic-bezier(0.23, 1, 0.32, 1) both 90ms;
}

.es-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 14px;
  border-radius: 999px;
  background: var(--background);
  border: 1px solid var(--border-color);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-secondary);
  animation: esItemIn 220ms cubic-bezier(0.23, 1, 0.32, 1) both 130ms;

  /* Standardize line-height for the text span */
  line-height: 1.2;
}

.es-hint i {
  color: var(--primary-color);
  font-size: var(--font-size-xs);
  flex-shrink: 0;

  /* Overriding FontAwesome's internal layout mechanics */
  display: inline-block !important;
  vertical-align: middle !important;
  line-height: 1 !important;

  /* Kill any explicit dimensions that might be stretching the icon box */
  width: auto !important;
  height: auto !important;

  /* If it's STILL slightly off, this manual nudge will absolutely force it down */
  position: relative;
  top: 1px;
}

@media (prefers-reduced-motion: reduce) {
  .es-icon,
  .es-title,
  .es-desc,
  .es-hint {
    animation: none;
  }
}

/* Selected questions scroll area — matches Topical Questions reader */
.test-content {
  flex: 1;
  overflow-y: auto;
  background: var(--pp-surface-2, var(--background-alt));
  padding: 20px 16px 48px;
}

.test-content::-webkit-scrollbar {
  width: 5px;
}
.test-content::-webkit-scrollbar-track {
  background: transparent;
}
.test-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.14);
  border-radius: 99px;
}

.selected-questions {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--tb-radius-lg);
  box-shadow: var(--tb-shadow-md);
  overflow: hidden;
}

/* Questions render inside the card; use site theme colours */
.test-content .tqp-print-container {
  width: 100%;
  padding: 32px 48px 36px;
  background: transparent;
  color: inherit;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

/* Divider between question blocks */
.test-content .tqp-print-container + .tb-q-controls {
  border-top: 1px solid var(--border-color);
}

/* Separator between questions inside the card */
.test-content .tqp-separator {
  display: block;
  height: 1px;
  background: var(--border-color);
  margin: 0 48px;
}

/* Move/remove controls — shown between questions inside the card */
.tb-q-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px 48px;
  border-top: 0px solid var(--border-color);
}

.tb-q-ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--background-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--tb-radius-sm);
  cursor: pointer;
  color: var(--text-muted);
  font-size: 11px;
  transition:
    background var(--tb-duration-fast) ease,
    color var(--tb-duration-fast) ease,
    border-color var(--tb-duration-fast) ease,
    transform var(--tb-duration-normal) var(--tb-ease-spring);
  font-family: inherit;
}

.tb-q-ctrl-btn:hover:not(:disabled) {
  background: var(--background);
  color: var(--text-dark);
  border-color: rgba(0, 0, 0, 0.2);
  transform: scale(1.08);
}

.tb-q-ctrl-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.tb-q-remove:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.08);
  color: var(--accent-red);
  border-color: rgba(239, 68, 68, 0.25);
}

/* Merge / unmerge — distinct always-on tint so the affordance is noticeable.
   Merge = blue (combine parts), Unmerge = amber (split back). */
.tb-q-merge {
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.25);
}
.tb-q-merge:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  border-color: rgba(59, 130, 246, 0.32);
}
.tb-q-unmerge {
  color: #d97706;
  border-color: rgba(245, 158, 11, 0.28);
}
.tb-q-unmerge:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.35);
}

/* Separator between paper sheets — rendered between tqp-print-container blocks */
.tqp-separator {
  display: none; /* not needed: sheets are visually separated by the grey tray gap */
}

/* Per-question unit (question + controls + separator) — animated on add/remove */
.tb-unit {
  transition:
    opacity var(--tb-duration-normal) var(--tb-ease-out),
    transform var(--tb-duration-normal) var(--tb-ease-out);
}

.tb-unit-enter {
  opacity: 0;
  transform: translateY(8px) scale(0.98);
}

.tb-unit-exit {
  opacity: 0;
  transform: scale(0.97);
  pointer-events: none;
}

/* ============================================================================
   AO COVERAGE PANEL
   ============================================================================ */
.ao-coverage-panel {
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--tb-radius-lg);
  padding: 14px 16px;
  margin: 0 auto 12px;
  width: 100%;
  max-width: 880px;
  box-shadow: var(--tb-shadow-xs);
}

.ao-coverage-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.ao-coverage-panel-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dark);
}

.ao-coverage-panel-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.ao-coverage-bar {
  display: flex;
  height: 20px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.06);
  gap: 2px;
}

.ao-coverage-bar > .seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  border-radius: 4px;
  transition: width 0.4s var(--tb-ease-out);
}

.ao-coverage-bar > .seg.AO1 {
  background: var(--tb-ao1-color);
}
.ao-coverage-bar > .seg.AO2 {
  background: var(--tb-ao2-color);
}
.ao-coverage-bar > .seg.AO3 {
  background: var(--tb-ao3-color);
}

.ao-coverage-targets {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ao-coverage-target-chip {
  font-size: 11px;
  color: var(--text-muted);
}

.ao-coverage-target-chip strong {
  color: var(--text-dark);
}
.ao-coverage-target-chip .delta-good {
  color: var(--secondary-dark);
}
.ao-coverage-target-chip .delta-warn {
  color: var(--accent-orange);
}
.ao-coverage-target-chip .delta-bad {
  color: var(--accent-red);
}

/* ============================================================================
   PREVIEW MODAL
   ============================================================================ */
.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--tb-duration-slow) var(--tb-ease-out),
    visibility var(--tb-duration-slow) ease;
}

.preview-modal.active {
  opacity: 1;
  visibility: visible;
}

.preview-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.preview-modal-content {
  position: relative;
  width: 90vw;
  max-width: 880px;
  height: 90vh;
  background: var(--background);
  border-radius: var(--tb-radius-xl);
  box-shadow: var(--tb-shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.93) translateY(12px);
  transition: transform var(--tb-duration-slow) var(--tb-ease-spring);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-modal.active .preview-modal-content {
  transform: scale(1) translateY(0);
}

.preview-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.preview-modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

.preview-modal-title i {
  color: var(--tb-red);
  font-size: 15px;
}

.preview-modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--tb-radius-md);
  border: 1px solid var(--border-color);
  background: var(--background-alt);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition:
    background var(--tb-duration-fast) ease,
    color var(--tb-duration-fast) ease,
    transform var(--tb-duration-normal) var(--tb-ease-spring);
  font-family: inherit;
}

.preview-modal-close:hover {
  background: rgba(239, 68, 68, 0.08);
  color: var(--accent-red);
  border-color: rgba(239, 68, 68, 0.2);
  transform: scale(1.1);
}

.preview-modal-body {
  flex: 1;
  overflow: hidden;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
}

/* Pages */
.preview-pages-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-page {
  position: absolute;
  width: 720px;
  max-width: 100%;
  height: 100%;
  background: #fff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  border-radius: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(40px) scale(0.98);
  transition:
    opacity var(--tb-duration-slow) var(--tb-ease-out),
    transform var(--tb-duration-slow) var(--tb-ease-out),
    visibility var(--tb-duration-slow) ease;
  overflow: auto;
}

.preview-page.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
}

.preview-page-inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* Cover page */
.preview-cover-page {
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  flex: 1;
}

.preview-cover-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.preview-cover-subject {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: -20px;
}

.preview-cover-instructions {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  background: var(--background-alt);
}

.preview-instructions-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 14px;
}

.preview-instructions-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preview-instructions-list li {
  font-size: 13.5px;
  color: var(--text-light);
  padding-left: 18px;
  position: relative;
}

.preview-instructions-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: 700;
}

.preview-cover-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.preview-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preview-field label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

.preview-field-line {
  border-bottom: 1.5px solid var(--border-color);
  height: 28px;
}

/* Question content area */
.preview-questions-content {
  padding: 36px 48px;
  flex: 1;
}

/* Page footer */
.preview-page-footer {
  margin-top: auto;
  padding: 14px 48px;
  border-top: 1px solid var(--border-color);
  background: var(--background-alt);
  flex-shrink: 0;
}

.preview-footer-text {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* Modal footer */
.preview-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

.preview-page-info {
  font-size: 12.5px;
  color: var(--text-muted);
}

.preview-page-info span {
  font-weight: 700;
  color: var(--text-dark);
}

.preview-navigation {
  display: flex;
  gap: 8px;
}

.preview-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--tb-radius-md);
  border: 1px solid var(--border-color);
  background: var(--background);
  color: var(--text-dark);
  cursor: pointer;
  font-family: inherit;
  transition:
    background var(--tb-duration-fast) ease,
    border-color var(--tb-duration-fast) ease,
    box-shadow var(--tb-duration-fast) ease,
    transform var(--tb-duration-normal) var(--tb-ease-spring);
}

.preview-nav-btn:hover:not(:disabled) {
  background: var(--tb-red);
  border-color: var(--tb-red);
  color: #fff;
  box-shadow: 0 2px 8px rgba(232, 17, 35, 0.25);
  transform: translateY(-1px);
}

.preview-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.preview-nav-btn i {
  font-size: 0.8em;
}

/* ============================================================================
   ERROR & EMPTY STATES
   ============================================================================ */
.error-state {
  text-align: center;
  padding: 40px 24px;
  max-width: 440px;
  margin: 0 auto;
}

.error-state-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.error-state-icon i {
  font-size: 28px;
  color: var(--accent-orange);
}
.error-state-icon.error {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
}
.error-state-icon.error i {
  color: var(--tb-red);
}

.error-state .beta-badge {
  display: inline-flex;
  margin-bottom: 10px;
}

.error-state-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 8px;
}

.error-state-message {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 20px;
}

.error-state-suggestions {
  background: var(--background-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--tb-radius-lg);
  padding: 16px;
  margin-bottom: 20px;
}

.suggestions-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 0 0 10px;
}

.suggestions-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.suggestion-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--tb-radius-md);
  color: var(--text-dark);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition:
    border-color var(--tb-duration-fast) ease,
    transform var(--tb-duration-normal) var(--tb-ease-spring),
    box-shadow var(--tb-duration-fast) ease;
}

.suggestion-link:hover {
  border-color: var(--tb-red);
  color: var(--tb-red);
  transform: translateX(3px);
  box-shadow: var(--tb-shadow-xs);
}

.suggestion-link i {
  color: var(--secondary-color);
  font-size: 14px;
}

.error-state-feedback {
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}
.error-state-feedback p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  background: #25d366;
  color: #fff;
  border-radius: var(--tb-radius-md);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition:
    background var(--tb-duration-fast) ease,
    transform var(--tb-duration-normal) var(--tb-ease-spring),
    box-shadow var(--tb-duration-fast) ease;
}

.feedback-btn:hover {
  background: #128c7e;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* ============================================================================
   MCQ PREVIEW BADGES
   ============================================================================ */
.preview-mcq-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0;
}

.preview-mcq-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 0;
}

.preview-mcq-bubble {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  color: var(--text-light);
}

.preview-mcq-text {
  flex: 1;
  font-size: 13.5px;
  line-height: 1.5;
  padding-top: 3px;
  color: var(--text-light);
}

/* ============================================================================
   SCREEN TOO SMALL
   ============================================================================ */
.screen-too-small-message {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--pp-bg);
  z-index: 100000;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}

.stm-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 400px;
  width: 100%;
  padding: 8px 0 24px;
}

.stm-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--pp-accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.stm-icon-wrap i {
  font-size: 30px;
  color: var(--pp-accent);
}

.stm-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--pp-surface-2);
  border: 1px solid var(--pp-border);
  color: var(--pp-text-3);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.stm-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--pp-text);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.stm-desc {
  font-size: 0.9rem;
  color: var(--pp-text-2);
  line-height: 1.6;
  margin: 0 0 28px;
}

.stm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-bottom: 14px;
}

.stm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--pp-radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  font-family: inherit;
  transition:
    background-color var(--pp-fast),
    border-color var(--pp-fast),
    box-shadow var(--pp-fast),
    transform 200ms var(--pp-ease);
}

.stm-btn:active {
  transform: scale(0.97);
  transition-duration: 100ms;
}

.stm-btn-primary {
  background: var(--pp-accent);
  color: #fff;
}

@media (hover: hover) and (pointer: fine) {
  .stm-btn-primary:hover {
    background: var(--pp-accent-2);
    box-shadow: 0 4px 16px rgba(232, 17, 35, 0.28);
    transform: translateY(-1px);
  }
}

.stm-btn-secondary {
  background: var(--pp-surface);
  color: var(--pp-text);
  border: 1px solid var(--pp-border);
}

@media (hover: hover) and (pointer: fine) {
  .stm-btn-secondary:hover {
    border-color: var(--pp-border-strong);
    box-shadow: var(--pp-shadow-sm);
    transform: translateY(-1px);
  }
}

.stm-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  background: var(--pp-surface);
  border: 1px solid var(--pp-border);
  border-radius: var(--pp-radius-sm);
  text-align: left;
  width: 100%;
}

.stm-tip i {
  font-size: 13px;
  color: #d97706;
  flex-shrink: 0;
  margin-top: 3px;
}

.stm-tip p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--pp-text-2);
  line-height: 1.5;
}

.stm-tip strong {
  color: var(--pp-text);
  font-weight: 600;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 889px) {
  .test-builder-page,
  .test-builder-top-bar,
  .test-builder-layout {
    display: none !important;
  }
  .screen-too-small-message {
    display: flex !important;
  }
}

@media (max-width: 1024px) {
  .test-builder-layout {
    grid-template-columns: 1fr 1fr;
  }

  .filters-bar {
    padding: 8px 10px;
    gap: 5px;
  }
  .filter-btn {
    padding: 4px 9px;
    font-size: 12px;
  }

  .bottom-actions {
    padding: 8px 14px;
  }

  .btn-primary,
  .btn-secondary,
  .btn-download {
    padding: 6px 13px;
    font-size: 12px;
  }
}

/* Loading spinner */
.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--background-alt);
  border-top-color: var(--tb-red);
  border-radius: 50%;
  animation: tb-spin 0.8s linear infinite;
}

@keyframes tb-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Question renderer — tick-box options ─────────────────────────────────── */
.selected-questions .tqp-tick-options {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 10px 0 4px 32px;
}
.selected-questions .tqp-tick-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 300px;
}
.selected-questions .tqp-tick-options-inline {
  flex-direction: row;
  align-items: center;
  gap: 32px;
  margin: 10px 0 4px 0;
}
.selected-questions .tqp-tick-options-inline .tqp-tick-option {
  max-width: none;
  justify-content: flex-start;
  gap: 10px;
}
.selected-questions .tqp-tick-box {
  flex-shrink: 0;
  display: inline-block;
  width: 26px;
  height: 26px;
  border: 1.5px solid currentColor;
  border-radius: 0;
}
/* Tick-multi-column (true/false etc.) */
.selected-questions .tqp-tick-table {
  border-collapse: collapse;
  margin: 10px 0 4px 32px;
}
.selected-questions .tqp-tick-table th,
.selected-questions .tqp-tick-table td {
  padding: 5px 10px;
}
.selected-questions .tqp-tick-table .tqp-tick-col-head {
  text-align: center;
  font-weight: 600;
}
.selected-questions .tqp-tick-table .tqp-tick-row-head {
  text-align: left;
  font-weight: 600;
}
.selected-questions .tqp-tick-table .tqp-tick-row-label {
  padding-right: 16px;
}
.selected-questions .tqp-tick-table .tqp-tick-cell {
  text-align: center;
}

/* ── Question renderer — bullet lists ─────────────────────────────────────── */
.selected-questions .tqp-bullet-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0 4px;
}
.selected-questions .tqp-bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding-left: 18px;
}
.selected-questions .tqp-bullet-item::before {
  content: "•";
  flex-shrink: 0;
  padding-left: 18px;
}

/* ── Question renderer — labeled sections ──────────────────────────────────── */
.selected-questions .tqp-labeled-sections {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 10px 0 6px;
}
.selected-questions .tqp-labeled-section-first {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.selected-questions .tqp-labeled-section-label {
  flex-shrink: 0;
  white-space: nowrap;
}
.selected-questions .tqp-labeled-section-first .tqp-answer-line {
  flex: 1;
}

/* ── Question renderer — labeled statements list (A/B/C/D/E) ─────────────── */
.selected-questions .tqp-labeled-statements-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0 14px;
}
.selected-questions .tqp-labeled-statement-row {
  display: flex;
  gap: 12px;
}
.selected-questions .tqp-labeled-statement-letter {
  font-weight: bold;
  min-width: 14px;
  flex-shrink: 0;
}
.selected-questions .tqp-labeled-statement-text {
  flex: 1;
}

/* ── Question renderer — sequence boxes ──────────────────────────────────── */
.selected-questions .tqp-sequence-boxes {
  display: flex;
  gap: 8px;
  margin: 10px 0 4px;
}
.selected-questions .tqp-sequence-box {
  width: 64px;
  height: 36px;
  border: 1px solid #444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9em;
}
.selected-questions .tqp-sequence-box-given {
  font-weight: bold;
}
.selected-questions .tqp-sequence-dots {
  font-size: 0.65em;
  color: #888;
  letter-spacing: -1px;
}

/* ── Question renderer — numbered lines ────────────────────────────────────── */
.selected-questions .tqp-numbered-lines {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 10px 0 6px;
}
.selected-questions .tqp-numbered-line {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.selected-questions .tqp-numbered-line-num {
  min-width: 14px;
  flex-shrink: 0;
  line-height: 1;
  padding-bottom: 2px;
}
.selected-questions .tqp-numbered-line-dots {
  flex: 1;
  border-bottom: 1px dotted #444;
  height: 20px;
}

/* ── Question renderer — ordering options ─────────────────────────────────── */
.selected-questions .tqp-ordering-options {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 10px 0 4px 32px;
  max-width: 440px;
}
.selected-questions .tqp-ordering-header {
  display: flex;
  gap: 10px;
}
.selected-questions .tqp-ordering-head-label {
  flex: 1;
  text-align: center;
  font-weight: 600;
}
.selected-questions .tqp-ordering-head-stage {
  flex-shrink: 0;
  width: 50px;
  text-align: center;
  font-weight: 600;
}
.selected-questions .tqp-ordering-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}
.selected-questions .tqp-ordering-label {
  flex: 1;
  border: 1.5px solid currentColor;
  padding: 5px 14px;
  text-align: center;
}
.selected-questions .tqp-ordering-stage {
  flex-shrink: 0;
  width: 50px;
  min-height: 34px;
  border: 1.5px solid currentColor;
  padding: 5px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.selected-questions .tqp-ordering-given {
  font-weight: bold;
}

/* ── Question renderer — word equation boxes ─────────────────────────────── */
.selected-questions .tqp-word-eq-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 10px 0 4px;
}
.selected-questions .tqp-word-eq {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.selected-questions .tqp-word-eq-box {
  border: 1.5px solid currentColor;
  border-radius: 0;
  padding: 12px 18px;
  min-width: 120px;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.selected-questions .tqp-word-eq-box-blank {
  min-width: 130px;
  align-items: flex-end;
  padding-bottom: 12px;
}
.selected-questions .tqp-word-eq-blank-line {
  display: block;
  width: 70%;
  height: 1px;
  border-bottom: 1.5px dashed currentColor;
}
.selected-questions .tqp-word-eq-op {
  font-weight: 700;
  font-size: 1.05em;
}
.selected-questions .tqp-word-eq-arrow {
  position: relative;
  width: 40px;
  height: 2px;
  background: currentColor;
  flex-shrink: 0;
  margin: 0 2px;
}
.selected-questions .tqp-word-eq-arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
  transform: translateY(-50%);
}
.selected-questions .tqp-word-eq-marks {
  flex-shrink: 0;
  white-space: nowrap;
}
