/* IQJoust Challenge — quiz, timer, score view */

.iqj-page {
  background:
    radial-gradient(100% 70% at 50% 0%, rgba(28, 36, 54, 0.52), transparent 55%),
    linear-gradient(180deg, #080c16 0%, #101626 50%, #070a12 100%);
  color: rgba(241, 246, 255, 0.94);
}

.iqj-page .app-shell {
  background: transparent;
}

.iqj-page .iqj-root.legal-card {
  max-width: 52rem;
  margin-inline: auto;
  padding: 1.5rem 1.25rem 2rem;
  background: linear-gradient(165deg, rgba(18, 24, 40, 0.96), rgba(8, 12, 22, 0.98));
  border: 1px solid rgba(120, 160, 220, 0.26);
  border-radius: 20px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.55);
  color: rgba(241, 246, 255, 0.96);
}

.iqj-page .iqj-root.legal-card .muted-copy {
  color: rgba(214, 228, 252, 0.9);
}

.iqj-section-heading {
  margin-bottom: 1rem;
}

.iqj-page-title {
  margin: 0 0 0.35rem;
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: clamp(1.3rem, 3.4vw, 1.85rem);
  letter-spacing: 0.04em;
  color: #dde8ff;
}

.iqj-intro-lead {
  margin-bottom: 1rem;
}

.iqj-start-button {
  margin-top: 0.5rem;
}

/* Quiz layout */

.iqj-quiz-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.iqj-toprow {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1rem;
}

.iqj-quiz-progress {
  font-size: 0.9rem;
  color: rgba(214, 228, 252, 0.78);
  margin: 0;
}

.iqj-timer-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(132, 156, 206, 0.5);
  background: rgba(14, 22, 42, 0.92);
  color: rgba(232, 240, 255, 0.96);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.iqj-timer-label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(196, 214, 244, 0.82);
}

.iqj-timer-value {
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.iqj-timer-pill--warn {
  border-color: rgba(248, 198, 116, 0.85);
  background: rgba(58, 44, 12, 0.82);
  color: #ffe9c2;
  box-shadow: 0 0 0 2px rgba(248, 198, 116, 0.22);
}

.iqj-timer-pill--danger {
  border-color: rgba(255, 130, 120, 0.95);
  background: rgba(72, 14, 10, 0.92);
  color: #ffe0d4;
  animation: iqj-timer-flash 1s linear infinite;
}

.iqj-timer-pill--expired {
  border-color: rgba(160, 60, 60, 0.95);
  background: rgba(50, 12, 12, 0.92);
  color: #ffd0c4;
  animation: none;
}

@keyframes iqj-timer-flash {
  0%, 100% { box-shadow: 0 0 0 2px rgba(255, 130, 120, 0.45); }
  50%      { box-shadow: 0 0 0 6px rgba(255, 130, 120, 0.18); }
}

.iqj-meta {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(180, 200, 230, 0.78);
  margin: 0;
}

.iqj-image-wrap {
  margin: 0.25rem 0 0.25rem;
  text-align: center;
}

.iqj-image {
  max-width: 100%;
  max-height: 320px;
  border-radius: 12px;
  border: 1px solid rgba(120, 160, 220, 0.32);
  background: rgba(8, 12, 22, 0.8);
}

.iqj-question-text {
  font-size: 1.08rem;
  line-height: 1.5;
  margin: 0;
  color: #f2f6ff;
  font-weight: 600;
}

/* 6 options in a 2-column grid, single column on narrow screens */
.iqj-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

@media (max-width: 480px) {
  .iqj-options {
    grid-template-columns: 1fr;
  }
}

.iqj-option {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  width: 100%;
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(132, 156, 206, 0.4);
  background: rgba(10, 16, 30, 0.92);
  color: rgba(245, 250, 255, 0.98);
  -webkit-text-fill-color: rgba(245, 250, 255, 0.98);
  font: inherit;
  font-size: 0.98rem;
  cursor: pointer;
  line-height: 1.4;
  min-height: 3rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.iqj-option:hover,
.iqj-option:focus-visible {
  border-color: rgba(180, 210, 255, 0.72);
  outline: none;
}

.iqj-option.selected {
  border-color: rgba(120, 230, 210, 0.85);
  background: linear-gradient(165deg, rgba(18, 48, 56, 0.95), rgba(10, 22, 32, 0.95));
  box-shadow: 0 0 0 1px rgba(88, 186, 170, 0.32);
  color: #fff;
  -webkit-text-fill-color: #fff;
}

.iqj-option-letter {
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: rgba(60, 92, 132, 0.75);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.iqj-option.selected .iqj-option-letter {
  background: linear-gradient(135deg, #64d0ff 0%, #88f0d5 100%);
  color: #07121c;
}

.iqj-option-text {
  flex: 1 1 auto;
}

/* Navigation */

.iqj-quiz-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.5rem;
  align-items: center;
}

/* Jump grid: shows answered / current / pending */

.iqj-jump-wrap {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(132, 156, 206, 0.22);
}

.iqj-jump-label {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(196, 214, 244, 0.82);
}

.iqj-jump-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(2.25rem, 1fr));
  gap: 0.35rem;
}

.iqj-jump-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.25rem 0.4rem;
  border-radius: 8px;
  border: 1px solid rgba(132, 156, 206, 0.4);
  background: rgba(10, 16, 30, 0.88);
  color: rgba(225, 236, 255, 0.92);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  cursor: pointer;
}

.iqj-jump-cell:hover,
.iqj-jump-cell:focus-visible {
  border-color: rgba(180, 210, 255, 0.72);
  outline: none;
}

.iqj-jump-cell--answered {
  border-color: rgba(120, 230, 210, 0.6);
  background: rgba(18, 42, 48, 0.85);
  color: #d3f7ec;
}

.iqj-jump-cell--current {
  border-color: rgba(248, 198, 116, 0.9);
  background: rgba(58, 44, 12, 0.65);
  color: #ffe9c2;
}

/* Review */

.iqj-review {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(132, 156, 206, 0.32);
  background: rgba(12, 18, 32, 0.92);
}

.iqj-review-title {
  margin: 0 0 0.5rem;
  font-family: "Cinzel", serif;
  font-size: 1.2rem;
  color: #e9f2ff;
}

.iqj-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.iqj-review-unanswered {
  margin-top: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(248, 198, 116, 0.55);
  background: rgba(58, 44, 12, 0.45);
  color: rgba(255, 232, 200, 0.95);
  font-size: 0.9rem;
}

/* Errors and cooldown */

.iqj-error {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(80, 24, 24, 0.45);
  border: 1px solid rgba(255, 140, 120, 0.4);
  color: #ffd8d0;
}

.iqj-cooldown-note {
  margin: 0.5rem 0 0;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(145, 162, 190, 0.48);
  background: rgba(40, 52, 74, 0.5);
  color: rgba(210, 222, 244, 0.92);
  font-size: 0.9rem;
  line-height: 1.45;
}

/* Results */

.iqj-results {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(132, 156, 206, 0.25);
}

.iqj-result-title {
  font-family: "Cinzel", serif;
  font-size: clamp(1.4rem, 4vw, 1.95rem);
  margin: 0 0 0.35rem;
  color: #e9f2ff;
  letter-spacing: 0.04em;
}

.iqj-result-subhead {
  margin: 0 0 0.4rem;
  color: rgba(212, 224, 246, 0.92);
  line-height: 1.5;
}

.iqj-result-time {
  margin: 0 0 1rem;
  font-variant-numeric: tabular-nums;
}

.iqj-result-section-title {
  margin: 1.1rem 0 0.5rem;
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(196, 214, 244, 0.88);
}

.iqj-category-grid,
.iqj-difficulty-grid {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.iqj-bar-row {
  display: grid;
  grid-template-columns: minmax(9rem, auto) 1fr auto;
  align-items: center;
  gap: 0.55rem;
}

.iqj-bar-label {
  font-weight: 600;
  color: rgba(226, 236, 252, 0.95);
}

.iqj-bar-track {
  height: 0.6rem;
  background: rgba(40, 56, 84, 0.75);
  border-radius: 999px;
  overflow: hidden;
}

.iqj-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #64d0ff 0%, #88f0d5 100%);
}

.iqj-bar-value {
  min-width: 4rem;
  text-align: right;
  font-size: 0.9rem;
  color: rgba(220, 232, 252, 0.88);
  font-variant-numeric: tabular-nums;
}

.iqj-disclaimer {
  margin: 1.25rem 0 0;
  font-size: 0.88rem;
  font-style: italic;
}

.iqj-results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.hidden {
  display: none !important;
}
