/* ========= Challenge Prep ========= */
.prep-intro h2 { margin-top: 0; }
.prep-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.prep-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; cursor: pointer; font: inherit; text-align: left; box-shadow: var(--shadow);
  transition: transform 0.1s, box-shadow 0.1s;
}
.prep-card:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,0.08); }
.prep-card.fr { border-left: 4px solid #6a3fa0; }
.prep-card.en { border-left: 4px solid #2d5aa0; }
.prep-card-id { font-family: monospace; font-size: 0.85rem; color: var(--muted); }
.prep-card-title { font-weight: 600; margin: 4px 0 6px; }
.prep-card-meta { font-size: 0.8rem; color: var(--muted); }
.prep-card-ready { margin-top: 8px; font-size: 0.82rem; }

.prep-breadcrumb { margin-bottom: 10px; }
.prep-course-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.readiness-big { text-align: center; }
.readiness-big .ring {
  width: 70px; height: 70px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 700;
  background: var(--grey-bg); color: var(--muted);
  border: 3px solid var(--border);
}
.readiness-big.ready-high .ring { background: var(--green-bg); color: var(--green); border-color: var(--green); }
.readiness-big.ready-med  .ring { background: var(--amber-bg); color: var(--amber); border-color: var(--amber); }
.readiness-big.ready-low  .ring { background: var(--red-bg);   color: var(--red);   border-color: var(--red); }
.readiness-big .label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; margin-top: 4px; }
.readiness-msg { font-size: 0.95rem; margin: 0 0 16px; padding: 10px 14px; border-radius: var(--radius); background: var(--grey-bg); }
.readiness-msg.ready-high { background: var(--green-bg); color: #184a2a; }
.readiness-msg.ready-med  { background: var(--amber-bg); color: #724611; }
.readiness-msg.ready-low  { background: var(--red-bg);   color: #7a2222; }

.prep-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin-bottom: 20px; }
.tool-btn {
  background: var(--surface); border: 1px solid var(--border); padding: 12px; border-radius: 8px;
  text-align: left; font: inherit; cursor: pointer; font-size: 0.95rem;
}
.tool-btn:hover:not(:disabled) { background: #eef4fb; border-color: var(--accent); }
.tool-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.tool-btn .muted { font-size: 0.8rem; color: var(--muted); }

.prep-textbooks { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }
.textbook-list { margin: 8px 0; padding-left: 20px; }
.textbook-list li { margin-bottom: 10px; }
.book-links { font-size: 0.8rem; margin-top: 4px; }
.decision-hint { background: #eef6ff; border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: var(--radius); font-size: 0.95rem; }

.prose { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; line-height: 1.6; }
.prose h1, .prose h2, .prose h3 { margin-top: 1.2em; }
.prose h1:first-child, .prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 22px; }
.prose code { background: var(--grey-bg); padding: 1px 5px; border-radius: 3px; font-size: 0.88em; }

.quiz-start { background: var(--surface); border: 1px solid var(--border); padding: 14px; border-radius: var(--radius); }
.quiz-start label { display: block; margin-bottom: 10px; }
.quiz-start select { margin-left: 8px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 4px; }
.quiz-start button, .quiz-card button, .quiz-actions button { padding: 8px 16px; border: 0; background: var(--accent); color: #fff; border-radius: 6px; cursor: pointer; font: inherit; }
.quiz-start button:hover, .quiz-actions button:hover { background: var(--accent-dark); }
.quiz-progress { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.quiz-card { background: var(--surface); border: 1px solid var(--border); padding: 16px; border-radius: var(--radius); }
.quiz-q { font-size: 1.05rem; font-weight: 500; margin-bottom: 14px; }
.quiz-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.quiz-opt {
  padding: 10px 12px; background: #fff; border: 1px solid var(--border); border-radius: 6px;
  text-align: left; cursor: pointer; font: inherit;
}
.quiz-opt:hover:not(:disabled) { background: var(--grey-bg); }
.quiz-opt.correct { background: var(--green-bg); border-color: var(--green); color: var(--green); font-weight: 600; }
.quiz-opt.wrong { background: var(--red-bg); border-color: var(--red); color: var(--red); }
.quiz-feedback { background: var(--grey-bg); padding: 10px; border-radius: 6px; }
.quiz-feedback p { margin: 0 0 8px; }
.quiz-score { font-size: 1.8rem; margin: 10px 0 20px; }
.quiz-review { padding-left: 22px; }
.quiz-review li { margin-bottom: 14px; padding: 10px; border-radius: 6px; }
.quiz-review li.ok { background: var(--green-bg); }
.quiz-review li.bad { background: var(--red-bg); }
.quiz-actions { margin-top: 16px; display: flex; gap: 12px; align-items: center; }

.flashcard-progress { font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; }
.flashcard {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 24px; min-height: 180px; margin-bottom: 16px;
  display: flex; flex-direction: column; justify-content: center; gap: 14px;
}
.fc-front { font-size: 1.3rem; font-weight: 500; }
.fc-back { font-size: 1rem; color: var(--text); padding-top: 10px; border-top: 1px dashed var(--border); }
.quality-buttons { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.quality-buttons p { margin: 0 8px 0 0; }
.quality-buttons button { padding: 8px 12px; border: 1px solid var(--border); background: var(--surface); border-radius: 6px; cursor: pointer; font: inherit; }
.quality-buttons button:hover { background: var(--grey-bg); }

.writing-list details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 10px; }
.writing-list summary { cursor: pointer; font-weight: 500; }
.writing-response { width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: 4px; font: inherit; margin-top: 8px; }
.writing-wc { font-size: 0.8rem; margin-top: 4px; }
.writing-list pre { white-space: pre-wrap; background: var(--grey-bg); padding: 8px; border-radius: 4px; font-size: 0.85rem; }

.decision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
@media (max-width: 600px) { .decision-grid { grid-template-columns: 1fr; } }
.decision-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.decision-col .cost { font-size: 1.6rem; font-weight: 700; color: var(--accent); margin: 4px 0 10px; }
.decision-verdict { margin-top: 14px; padding: 14px; background: #eef6ff; border-left: 4px solid var(--accent); border-radius: var(--radius); }

.walkthrough { padding-left: 22px; }
.walkthrough li { margin-bottom: 10px; }
.exam-date { background: var(--surface); border: 1px solid var(--border); padding: 14px; border-radius: var(--radius); margin-top: 14px; }
.exam-date label { display: block; margin-bottom: 8px; }
.exam-date input[type=date] { padding: 6px; border: 1px solid var(--border); border-radius: 4px; }
.exam-date button { padding: 8px 16px; background: var(--accent); color: #fff; border: 0; border-radius: 6px; cursor: pointer; }

.sched-summary { font-weight: 600; margin: 14px 0 8px; }
.sched-list { padding-left: 22px; }
.sched-list li { margin-bottom: 10px; }

.attempt-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.attempt-table th, .attempt-table td { padding: 8px 12px; text-align: left; border-top: 1px solid var(--border); }
.attempt-table tr.ok { background: var(--green-bg); }
.attempt-table tr.mid { background: var(--amber-bg); }
.attempt-table tr.low { background: var(--red-bg); }

/* Challenge Info */
.ci-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.ci-card h4 { margin: 0 0 6px; font-size: 1rem; }
.ci-card.warning { background: var(--amber-bg); border-color: #f0d49a; }
.ci-card.tip { background: #eef6ff; border-left: 4px solid var(--accent); }
.ci-card.muted-card { background: var(--grey-bg); }
.ci-components { list-style: none; padding: 0; margin: 6px 0 0; }
.ci-components li { padding: 6px 10px; background: var(--grey-bg); border-radius: 4px; margin-bottom: 4px; }
.ci-card .passing { font-size: 1.05rem; color: var(--red); }
.email-template { width: 100%; padding: 10px; font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 0.85rem; border: 1px solid var(--border); border-radius: 4px; background: #fafbfc; }
.copy-email { margin-top: 8px; padding: 8px 16px; border: 0; background: var(--accent); color: #fff; border-radius: 6px; cursor: pointer; }
.copy-email:hover { background: var(--accent-dark); }
