/* ============================================
   CivicLearn – TEST PAGE CORE STYLES (clean)
   ============================================ */

main {
  max-width: 900px;
  margin: 2.5rem auto;
  padding: 0 1.2rem;
}

/* Test header */
.test-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.8rem;
  margin-top: 2rem;
}

.badge {
  background: #ece6ff;
  color: var(--brand);
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.2px;
  display: inline-block;
  margin-bottom: 1rem;
}

.timer {
  background: #fee;
  color: #b00020;
  font-weight: 600;
}

/* Question card */
.question-card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.8rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.q-title {
  font-size: 1.2rem;
  margin-bottom: 1.4rem;
  font-weight: 600;
}

/* Answer choices */
.choices {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.choice {
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 0.6rem;
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  text-align: left;
  font-size: 0.95rem;
  transition: background 0.15s;
  font-family: "Lexend", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.choice:hover {
  background: #f0eef4;
}

.choice.disabled {
  cursor: default;
  opacity: 0.9;
}

.choice.correct {
  background: #e3f7e6;
  border-color: #4caf50;
  font-weight: 600;
}

.choice.wrong {
  background: #fde7e7;
  border-color: #e53935;
}

/* Navigation buttons */
.controls {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
}

.btn {
  background: var(--brand);
  color: #fff;
  padding: 0.65rem 1.4rem;
  border: none;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: "Lexend", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.btn.secondary {
  background: #ddd;
  color: #333;
}

.btn.secondary:hover {
  background: #ccc;
}

/* Results panel */
.result-panel {
  background: #fff;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  text-align: center;
  margin-top: 2rem;
}

.result-stamp {
  font-size: 1.3rem;
  margin: 1.2rem 0;
  font-weight: 700;
}

.result-stamp.pass {
  color: #2e7d32;
}

.result-stamp.fail {
  color: #c62828;
}

.result-chart-container {
  max-width: 360px;
  margin: 1.5rem auto;
}

/* CTA button */
.cta .btn {
  width: auto;
  margin-top: 1rem;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .question-card {
    padding: 1.3rem;
  }

  .controls {
    flex-direction: column;
    gap: 0.8rem;
  }

  .btn {
    width: 100%;
    text-align: center;
  }
}

/* ============================================
   GRAPHIK TEST MODE — clean & correct
   (applies on ALL screen sizes)
   ============================================ */

body.graphik-mode,
body.graphik-mode * {
  font-family: "Graphik", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

/* Overrides inline styles (from JS engines) */
body.graphik-mode [style*="font-family"] {
  font-family: "Graphik", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
}
