/* ================= PHÒNG THI SPEAKING =================
   Dùng chung khung .cd-exam với Reading/Listening, chỉ thay ruột.
   Bố cục cố tình trống trải: khi đang nói, mọi thứ trên màn hình đều là thứ
   gây phân tâm, nên chỉ để lại câu hỏi, đồng hồ và vạch âm lượng. */

.spk-exam .spk-body {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; padding: 28px 20px; overflow: auto;
}

.spk-card {
  max-width: 760px; width: 100%;
  background: #fff; border: 1px solid #d7d7d7; border-radius: 6px;
  padding: 26px 30px;
}
.spk-card h3 { margin: 0 0 12px; font-size: 1.25em; }
.spk-card ul { margin: 8px 0 0 20px; }
.spk-card li { margin: 4px 0; }
.spk-card .fine { color: #666; font-size: .88em; margin-top: 14px; }

.spk-part {
  display: inline-block; margin-bottom: 12px; padding: 3px 10px;
  background: #1f3864; color: #fff; border-radius: 3px;
  font-size: .78em; letter-spacing: .09em; font-weight: 700;
}
.spk-prompt { font-size: 1.28em; line-height: 1.5; }
.spk-cue {
  margin-top: 18px; padding: 16px 20px;
  background: #f6f6f4; border: 1px solid #ddd; border-left: 4px solid #1f3864;
}
.spk-cue p { margin: 0 0 8px; }
.spk-cue ul { margin: 6px 0 8px 20px; }

/* ---- Vạch âm lượng: thí sinh phải thấy được máy có nghe mình không ---- */
.spk-meter {
  width: min(420px, 80%); height: 10px;
  background: #e6e6e6; border-radius: 5px; overflow: hidden;
}
.spk-meter i {
  display: block; height: 100%; width: 0;
  background: #c9a227; transition: width .06s linear;
}
.spk-meter i.ok { background: #2e7d32; }

.spk-hint { min-height: 24px; color: #444; text-align: center; max-width: 700px; }
.spk-hint .danger { color: #b3261e; }

/* Đèn đỏ nhấp nháy — dấu hiệu duy nhất cho biết "đang thu" */
.rec-dot { color: #b3261e; animation: spk-blink 1s steps(2, start) infinite; }
@keyframes spk-blink { to { visibility: hidden; } }
.spk-exam.rec .cd-top { box-shadow: inset 0 -3px 0 #b3261e; }

.spk-progress { color: #555; font-size: .9em; }
.spk-actions { display: flex; gap: 10px; }

/* ---- Kết quả ---- */
.spk-band {
  font-size: 2.6em; font-weight: 700; color: #1f3864;
  text-align: center; margin: 18px 0 14px;
}
.spk-crit { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.spk-crit span {
  background: #f4f4f2; border: 1px solid #e0e0dc; border-radius: 4px;
  padding: 8px 14px; font-size: .92em;
}
.spk-crit b { color: #1f3864; font-size: 1.15em; margin-left: 6px; }

/* ---- Trang xem lại bài nói (ngoài phòng thi, dùng màu brand bình thường) ---- */
.spk-answer {
  border: 1px solid var(--line, #e3e3e3); border-radius: 8px;
  padding: 14px 16px; margin-bottom: 12px;
}
.spk-answer header {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px;
}
.spk-answer .tag {
  background: #1f3864; color: #fff; border-radius: 3px;
  padding: 2px 8px; font-size: .74em; letter-spacing: .06em; font-weight: 700;
}
.spk-answer .q { font-weight: 600; }
.spk-answer audio { width: 100%; margin: 8px 0; }
.spk-answer .tx {
  background: #fafafa; border-left: 3px solid #ccc; padding: 8px 12px;
  font-size: .95em; white-space: pre-wrap;
}
.spk-answer .miss { color: #b3261e; }

.spk-metrics { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.spk-metrics span {
  background: #f4f4f2; border: 1px solid #e6e6e2; border-radius: 4px;
  padding: 4px 10px; font-size: .84em; color: #444;
}
.spk-metrics b { color: #111; }
