/* ============================================================
   Theology Quiz — UI styling
   ------------------------------------------------------------
   Matches the existing main-site palette: cream parchment
   background, gold borders, crimson accents, Cinzel for labels,
   Cormorant for prose, EB Garamond for body text.
   ============================================================ */

.tquiz {
  margin: 28px 0;
  padding: 28px 32px;
  background: linear-gradient(135deg, rgba(244, 234, 213, 0.9), rgba(232, 220, 192, 0.9));
  border: 1px solid var(--gold);
  position: relative;
  font-family: 'EB Garamond', serif;
  color: #2a2a2a;
}

.tquiz::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(184, 134, 11, 0.3);
  pointer-events: none;
}

/* ---- Header ---- */
.tquiz-header {
  margin-bottom: 16px;
  position: relative;
}

.tquiz-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--gold-deep);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.tquiz-title {
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.tquiz-score {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--gold-deep);
  text-transform: uppercase;
  margin-top: 8px;
}

/* ---- Progress bar ---- */
.tquiz-bar-wrap {
  height: 4px;
  background: rgba(184, 134, 11, 0.15);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 22px;
}
.tquiz-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--gold);
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Body ---- */
.tquiz-body {
  margin-bottom: 16px;
  position: relative;
}

.tquiz-q {
  font-family: 'EB Garamond', serif;
  font-size: 1.08rem;
  line-height: 1.6;
  color: #1a1a1a;
  margin-bottom: 18px;
  padding: 14px 16px;
  background: rgba(255, 250, 235, 0.6);
  border-left: 3px solid var(--gold);
}

.tquiz-q em {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--sepia);
}

/* ---- Answer options ---- */
.tquiz-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.tquiz-option {
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  line-height: 1.5;
  text-align: left;
  padding: 12px 16px;
  background: rgba(255, 252, 244, 0.85);
  border: 1px solid rgba(184, 134, 11, 0.4);
  color: #2a2a2a;
  cursor: pointer;
  transition: all 0.18s;
  width: 100%;
}

.tquiz-option:hover:not(:disabled) {
  background: rgba(255, 250, 235, 1);
  border-color: var(--gold);
  transform: translateX(2px);
}

.tquiz-option:disabled {
  cursor: default;
  opacity: 0.85;
}

.tquiz-option.correct {
  background: rgba(184, 220, 184, 0.45);
  border-color: #4a8a4a;
  color: #1f4f1f;
  font-weight: 500;
  opacity: 1;
}

.tquiz-option.incorrect {
  background: rgba(217, 123, 123, 0.25);
  border-color: var(--crimson);
  color: var(--crimson);
  text-decoration: line-through;
  opacity: 1;
}

/* ---- Explanatory note ---- */
.tquiz-note {
  margin-top: 16px;
  padding: 14px 18px;
  font-family: 'EB Garamond', serif;
  font-size: 0.98rem;
  line-height: 1.65;
  color: #2a2a2a;
  background: rgba(255, 250, 235, 0.7);
  border-left: 3px solid var(--gold);
}

.tquiz-note em {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--sepia);
}

.tquiz-note strong {
  color: #1a1a1a;
  font-weight: 600;
}

.tquiz-note.note-correct {
  border-left-color: #4a8a4a;
}

.tquiz-note.note-incorrect {
  border-left-color: var(--crimson);
}

/* ---- Footer / Continue button ---- */
.tquiz-footer {
  text-align: right;
}

.tquiz-continue,
.tquiz-reset {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: white;
  text-transform: uppercase;
  background: var(--gold-deep);
  border: 1px solid var(--gold-deep);
  padding: 10px 22px;
  cursor: pointer;
  transition: all 0.18s;
}

.tquiz-continue:hover,
.tquiz-reset:hover {
  background: var(--crimson);
  border-color: var(--crimson);
}

.tquiz-reset {
  background: transparent;
  color: var(--gold-deep);
}

.tquiz-reset:hover {
  background: var(--crimson);
  color: white;
  border-color: var(--crimson);
}

/* ---- Review banner (between rounds) ---- */
.tquiz-review-banner {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--sepia);
  text-align: center;
  padding: 18px;
  background: rgba(255, 250, 235, 0.6);
  border: 1px dashed rgba(184, 134, 11, 0.4);
}

/* ---- Completed state ---- */
.tquiz-completed {
  text-align: center;
  padding: 24px 12px;
}

.tquiz-check {
  font-size: 2.6rem;
  color: #4a8a4a;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1;
}

.tquiz-completed-msg {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.18rem;
  color: var(--ink);
}

/* ---- Quiz section header (the wrapping <section> on each page) ---- */
.theology-quizzes {
  margin: 50px 0 30px;
  padding: 32px 36px;
  background: rgba(255, 252, 244, 0.6);
  border: 1px solid var(--gold);
}

.theology-quizzes-heading {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gold);
  position: relative;
}

.theology-quizzes-heading::after {
  content: '✦';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--parchment, #fdf6e3);
  color: var(--gold);
  padding: 0 12px;
  font-size: 1rem;
}

.theology-quizzes-intro {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--sepia);
  text-align: center;
  margin: 22px auto 14px;
  max-width: 720px;
  line-height: 1.6;
}

/* ---- Dark theme adjustments ---- */
[data-theme="dark"] .tquiz {
  background: linear-gradient(135deg, rgba(60, 50, 40, 0.7), rgba(50, 42, 32, 0.7));
  color: #d6d6d2;
}
[data-theme="dark"] .tquiz-q,
[data-theme="dark"] .tquiz-note {
  background: rgba(40, 34, 28, 0.5);
  color: #d6d6d2;
}
[data-theme="dark"] .tquiz-q,
[data-theme="dark"] .tquiz-title {
  color: #e8e8e4;
}
[data-theme="dark"] .tquiz-option {
  background: rgba(40, 34, 28, 0.6);
  color: #d6d6d2;
  border-color: rgba(184, 134, 11, 0.3);
}
[data-theme="dark"] .tquiz-option:hover:not(:disabled) {
  background: rgba(50, 42, 32, 0.85);
}
[data-theme="dark"] .tquiz-option.correct {
  background: rgba(74, 138, 74, 0.3);
  color: #b8e8b8;
}
[data-theme="dark"] .tquiz-option.incorrect {
  background: rgba(217, 123, 123, 0.2);
  color: #f4a8a8;
}
[data-theme="dark"] .tquiz-note strong {
  color: #f0f0ec;
}

/* Trick question badge */
.quiz-trick-badge {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8b1a1a;
  background: rgba(255, 240, 235, 0.9);
  border: 1px solid rgba(139, 26, 26, 0.4);
  padding: 5px 12px;
  margin-bottom: 12px;
  font-weight: 600;
}

[data-theme="dark"] .quiz-trick-badge {
  background: rgba(50, 30, 30, 0.6);
  color: #e88;
  border-color: rgba(232, 136, 136, 0.4);
}

/* ============================================================
   v2 — Working class names (the engine uses quiz-* not tquiz-*)
   These are the rules that actually apply to rendered quizzes.
   ============================================================ */

/* Container card */
.quiz-container {
  margin: 28px 0 36px;
  padding: 32px 36px 28px;
  background: linear-gradient(135deg, rgba(244, 234, 213, 0.85), rgba(232, 220, 192, 0.85));
  border: 1px solid var(--gold);
  position: relative;
  font-family: 'EB Garamond', serif;
  color: var(--ink);
}

.quiz-container::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(184, 134, 11, 0.3);
  pointer-events: none;
}

.quiz-container > * { position: relative; }

/* Header */
.quiz-header {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px dashed rgba(184, 134, 11, 0.35);
}

.quiz-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--gold-deep);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.quiz-title {
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
  line-height: 1.3;
  margin-bottom: 8px;
}

.quiz-score {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--gold-deep);
  text-transform: uppercase;
}

/* Progress bar */
.quiz-bar-wrap {
  height: 4px;
  background: rgba(184, 134, 11, 0.18);
  overflow: hidden;
  margin-bottom: 24px;
}

.quiz-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--gold);
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Body */
.quiz-body { margin-bottom: 18px; }

.quiz-prompt-wrap { margin-bottom: 18px; }

.quiz-prompt-context {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--sepia);
  margin-bottom: 12px;
  line-height: 1.55;
}

.quiz-prompt-q {
  font-family: 'EB Garamond', serif;
  font-size: 1.18rem;
  line-height: 1.55;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 4px;
}

/* Choices — shown as a column of full-width buttons (mobile-friendly) */
.quiz-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
  margin-bottom: 16px;
}

.quiz-choice {
  font-family: 'EB Garamond', serif;
  font-size: 1.04rem;
  line-height: 1.5;
  text-align: left;
  padding: 14px 18px;
  background: rgba(255, 250, 240, 0.85);
  border: 1px solid rgba(184, 134, 11, 0.4);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.quiz-choice:hover:not(:disabled) {
  background: rgba(255, 250, 240, 1);
  border-color: var(--gold);
  transform: translateX(2px);
}

.quiz-choice:disabled {
  cursor: default;
  opacity: 0.85;
}

.quiz-choice.correct {
  background: rgba(220, 240, 220, 0.85);
  border-color: #2c7a4a;
  color: #1f5c36;
  font-weight: 600;
}

.quiz-choice.incorrect {
  background: rgba(255, 230, 230, 0.7);
  border-color: var(--crimson);
  color: var(--crimson);
  text-decoration: line-through;
  text-decoration-color: rgba(139, 26, 26, 0.5);
}

.quiz-choice.reveal-correct {
  background: rgba(220, 240, 220, 0.85);
  border-color: #2c7a4a;
  color: #1f5c36;
  font-weight: 600;
  position: relative;
}

.quiz-choice.reveal-correct::after {
  content: ' ← correct answer';
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: #2c7a4a;
  text-transform: uppercase;
  margin-left: 8px;
  font-weight: 600;
}

/* Feedback note (shown after answering) */
.quiz-feedback-note {
  margin-top: 18px;
  padding: 16px 22px;
  background: rgba(255, 250, 235, 0.7);
  border-left: 3px solid var(--gold);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* "Now reviewing" inter-section note */
.quiz-section-note {
  padding: 14px 18px;
  background: rgba(255, 240, 220, 0.6);
  border: 1px dashed rgba(184, 134, 11, 0.45);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--sepia);
  text-align: center;
  font-size: 0.98rem;
}

/* Footer + next button */
.quiz-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.quiz-next-btn {
  font-family: 'Cinzel', serif;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 10px 22px;
  background: var(--ink);
  color: #f8f0e0;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
}

.quiz-next-btn:hover {
  background: var(--crimson);
  letter-spacing: 0.22em;
}

/* Completion screen */
.quiz-complete {
  text-align: center;
  padding: 24px 16px 8px;
}

.quiz-complete-title {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  letter-spacing: 0.12em;
  color: var(--gold-deep);
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 600;
}

.quiz-complete-stats {
  font-family: 'EB Garamond', serif;
  font-size: 1.08rem;
  color: var(--ink);
  margin-bottom: 14px;
  line-height: 1.6;
}

.quiz-complete-msg {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.12rem;
  color: var(--sepia);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.55;
}

/* Trick badge — refined to align with the new sizing */
.quiz-trick-badge {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8b1a1a;
  background: rgba(255, 240, 235, 0.95);
  border: 1px solid rgba(139, 26, 26, 0.5);
  padding: 5px 12px;
  margin-bottom: 14px;
  font-weight: 600;
}

/* Mobile */
@media (max-width: 700px) {
  .quiz-container { padding: 22px 18px 18px; }
  .quiz-prompt-q { font-size: 1.08rem; }
  .quiz-choice { font-size: 0.98rem; padding: 12px 14px; }
  .quiz-choice.reveal-correct::after { display: block; margin-left: 0; margin-top: 4px; }
}

/* Dark theme */
[data-theme="dark"] .quiz-container {
  background: linear-gradient(135deg, rgba(40, 32, 25, 0.85), rgba(50, 40, 30, 0.85));
}

[data-theme="dark"] .quiz-choice {
  background: rgba(35, 30, 25, 0.85);
  color: var(--text);
}

[data-theme="dark"] .quiz-choice:hover:not(:disabled) {
  background: rgba(50, 42, 32, 0.95);
}

[data-theme="dark"] .quiz-choice.correct,
[data-theme="dark"] .quiz-choice.reveal-correct {
  background: rgba(30, 50, 35, 0.65);
  color: #b8e6c8;
}

[data-theme="dark"] .quiz-choice.incorrect {
  background: rgba(60, 30, 30, 0.6);
  color: #e88;
}

[data-theme="dark"] .quiz-feedback-note {
  background: rgba(35, 30, 25, 0.7);
  color: var(--text);
}

[data-theme="dark"] .quiz-trick-badge {
  background: rgba(60, 30, 30, 0.7);
  color: #f4a;
  border-color: rgba(232, 136, 136, 0.5);
}

[data-theme="dark"] .quiz-next-btn {
  background: var(--gold);
  color: #1a1410;
}
