/* ============================================
   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;
}
/* ======================================================
   DISMISSIBLE INTRO — FREE TEST
   ====================================================== */

.free-test-intro {
  max-width: 880px;
  margin: 1.5rem auto 1.2rem;
  padding: 0 1rem;
}

.free-test-intro-inner {
  position: relative;
  background: #ffffff;
  border-radius: 22px;
  padding: 1.4rem 1.6rem 1.5rem;
  box-shadow: 0 14px 36px rgba(0,0,0,0.08);
}

.free-test-intro h2 {
  margin-bottom: 0.6rem;
}

.free-test-intro p {
  margin-bottom: 0.6rem;
  line-height: 1.55;
}

.intro-rules {
  background: #f6f7fb;
  border-radius: 16px;
  padding: 0.8rem 1rem;
  margin: 0.8rem 0 0.9rem;
}

.intro-rules ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}

.intro-note {
  font-size: 0.9rem;
  color: rgba(0,0,0,0.65);
}

.intro-dismiss {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.6;
}

.intro-dismiss:hover {
  opacity: 1;
}

.intro-cta {
  margin-top: 0.7rem;
  background: #ede9fe;
  color: #5b3ee6;
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.4rem;
  font-weight: 700;
  cursor: pointer;
}

.intro-cta:hover {
  background: #e0dbff;
}
.free-test-intro button {
  font-family: 'Lexend', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
.intro-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.intro-date-pill {
  font-family: 'Lexend', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f1ecff;   /* slightly coloured, consistent with your UI */
  color: #5b4fd8;        /* CivicLearn purple tone */
  white-space: nowrap;
}



/* Mobile tightening */
@media (max-width: 600px) {
  .free-test-intro-inner {
    padding: 1.1rem 1.2rem 1.2rem;
  }
}
