/* Quantrex — professional solution cards with shortcut corner */

.qx-sol-card {
  position: relative;
  border-radius: 14px;
  border: 1px solid rgba(13, 148, 136, 0.22);
  background: linear-gradient(145deg, rgba(13, 148, 136, 0.06) 0%, rgba(255, 255, 255, 0.02) 48%);
  padding: 14px 16px 16px;
  margin-top: 10px;
  overflow: hidden;
}

.qx-sol-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #0d9488, #14b8a6);
  border-radius: 14px 0 0 14px;
}

.qx-sol-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.qx-sol-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f766e;
  background: rgba(13, 148, 136, 0.12);
  border: 1px solid rgba(13, 148, 136, 0.25);
}

.qx-sol-shortcut-panel {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.05));
  border: 1px solid rgba(245, 158, 11, 0.32);
}

.qx-sol-shortcut-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.qx-sol-shortcut-icon {
  font-size: 16px;
  line-height: 1;
}

.qx-sol-shortcut-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #b45309;
}

.qx-sol-shortcut-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qx-sol-shortcut-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(245, 158, 11, 0.18);
}

.qx-sol-shortcut-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.qx-sol-shortcut-text {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  color: #78350f;
  word-break: break-word;
}

.qx-sol-shortcut-text mjx-container {
  font-size: 105% !important;
}

.qx-sol-body {
  font-size: 15px;
  line-height: 1.72;
  color: var(--text, #1e293b);
  overflow-x: auto;
  word-break: break-word;
}

.qx-sol-body p,
.qx-sol-para { margin: 8px 0; }
.qx-sol-body strong { color: #0f766e; }

.qx-sol-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  margin: 8px 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(13, 148, 136, 0.12);
}

.qx-sol-step-label {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  color: #0f766e;
  background: rgba(13, 148, 136, 0.14);
  border: 1px solid rgba(13, 148, 136, 0.22);
}

.qx-sol-step-body {
  flex: 1;
  min-width: 0;
  line-height: 1.65;
}

.qx-sol-step-plain .qx-sol-step-body { width: 100%; }

.qx-sol-warn {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #92400e;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.qx-prac-result-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 16px 0;
}

.qx-prac-result-wrap .result-box { margin: 0; }
.qx-prac-result-wrap .qx-sol-reveal-box { margin: 0; }

/* Subject accent themes */
.qx-sol-phys {
  border-color: rgba(37, 99, 235, 0.28);
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.07) 0%, rgba(255, 255, 255, 0.02) 50%);
}
.qx-sol-phys::before { background: linear-gradient(180deg, #2563eb, #3b82f6); }
.qx-sol-phys .qx-sol-badge { color: #1d4ed8; background: rgba(37, 99, 235, 0.1); border-color: rgba(37, 99, 235, 0.25); }

.qx-sol-chem {
  border-color: rgba(147, 51, 234, 0.28);
  background: linear-gradient(145deg, rgba(147, 51, 234, 0.07) 0%, rgba(255, 255, 255, 0.02) 50%);
}
.qx-sol-chem::before { background: linear-gradient(180deg, #7c3aed, #a855f7); }
.qx-sol-chem .qx-sol-badge { color: #6d28d9; background: rgba(147, 51, 234, 0.1); border-color: rgba(147, 51, 234, 0.25); }

.qx-sol-math {
  border-color: rgba(13, 148, 136, 0.28);
  background: linear-gradient(145deg, rgba(13, 148, 136, 0.08) 0%, rgba(255, 255, 255, 0.02) 50%);
}

.qx-sol-bio {
  border-color: rgba(22, 163, 74, 0.28);
  background: linear-gradient(145deg, rgba(22, 163, 74, 0.07) 0%, rgba(255, 255, 255, 0.02) 50%);
}
.qx-sol-bio::before { background: linear-gradient(180deg, #16a34a, #22c55e); }
.qx-sol-bio .qx-sol-badge { color: #15803d; background: rgba(22, 163, 74, 0.1); border-color: rgba(22, 163, 74, 0.25); }

.qx-sol-reveal-box .qx-sol-card { margin-top: 0; }

.marks-result .qx-sol-card,
.qx-exam-sol .qx-sol-card {
  margin-top: 8px;
}

[data-theme="dark"] .qx-sol-body { color: #e2e8f0; }
[data-theme="dark"] .qx-sol-shortcut-text { color: #fcd34d; }
[data-theme="dark"] .qx-sol-shortcut-panel { background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(0, 0, 0, 0.12)); }
[data-theme="dark"] .qx-sol-shortcut-item { background: rgba(0, 0, 0, 0.2); }

@media (max-width: 640px) {
  .qx-sol-shortcut-text { font-size: 13px; }
}