.quiz-box {
  border: 1px solid var(--color-background-border, #ccc);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--color-background-secondary, #f8f8f8);
}

.quiz-box h3 {
  margin-top: 0;
}

.quiz-field {
  display: block;
  margin-bottom: 0.75rem;
}

.quiz-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.quiz-field input[type="text"],
.quiz-field input[type="email"] {
  width: 100%;
  max-width: 320px;
  padding: 0.4rem 0.6rem;
  box-sizing: border-box;
}

.quiz-question {
  margin: 1.25rem 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-background-border, #ddd);
}

.quiz-question p.quiz-prompt {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.quiz-option {
  display: block;
  margin: 0.3rem 0;
  cursor: pointer;
}

.quiz-option input {
  margin-right: 0.5rem;
}

.quiz-question.correct {
  border-left: 4px solid #2e7d32;
  padding-left: 0.75rem;
}

.quiz-question.incorrect {
  border-left: 4px solid #c62828;
  padding-left: 0.75rem;
}

.quiz-explanation {
  display: none;
  font-size: 0.9em;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--color-background-hover, #eee);
  border-radius: 4px;
}

.quiz-question.correct .quiz-explanation,
.quiz-question.incorrect .quiz-explanation {
  display: block;
}

button.quiz-btn {
  font-size: 1rem;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  border: none;
  background: var(--color-brand-primary, #1a5fb4);
  color: #fff;
  cursor: pointer;
}

button.quiz-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.quiz-result {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: 6px;
  font-weight: 600;
}

.quiz-result.pass {
  background: #e8f5e9;
  color: #1b5e20;
}

.quiz-result.fail {
  background: #ffebee;
  color: #b71c1c;
}

.quiz-hidden {
  display: none;
}

/* Academy landing page */
.academy-hero { width: 100%; border-radius: 0.75rem; margin: 0.5rem 0 1.5rem; }
.academy-grid .sd-card-img-top { padding: 0.75rem 0.75rem 0; background: #f6f8f8; object-fit: contain; max-height: 220px; }
body[data-theme="dark"] .academy-grid .sd-card-img-top { background: #1f2a2a; }

/* Sign-in, topbar and result extras */
.quiz-note { margin: 0.5rem 0; }
.quiz-note.fail { color: #b71c1c; font-weight: 600; }
.quiz-topbar { font-size: 0.9em; color: var(--color-foreground-muted, #666); margin: 0.5rem 0; }
button.quiz-link { background: none; border: none; padding: 0; font: inherit; color: var(--color-brand-content, #1a5fb4); text-decoration: underline; cursor: pointer; }
a.quiz-btn-link { display: inline-block; margin-top: 0.75rem; padding: 0.5rem 1.25rem; border-radius: 6px; background: var(--color-brand-primary, #1a5fb4); color: #fff; text-decoration: none; }
.quiz-option.right { font-weight: 600; }
.quiz-option.right::after { content: "  ✓ correct answer"; color: #2e7d32; font-weight: 600; }
.quiz-field input[type="text"], .quiz-field input[type="email"] { max-width: 360px; }
