/* Course completion: native controls, local assets and short, finite motion. */
.chapter-test-link, .chapter-checklist a { display: flex; align-items: center; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 13px; }
.chapter-test-link > span:first-of-type, .chapter-checklist a > span:first-of-type { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.chapter-test-link svg, .chapter-checklist svg { width: 18px; height: 18px; flex-shrink: 0; }
.chapter-checklist h3 { font-size: 13px; margin: 6px 0 12px; }
.chapter-checklist h3 span { float: right; }
.environment-banner { padding: 10px 42px; color: #715018; background: #f4e8c9; font-size: 12px; border-block: 1px solid #e4d4af; }
.learning-progress { display: grid; gap: 14px; padding: 26px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.course-facts .learning-progress { border: 0; border-top: 1px solid var(--line); padding: 25px 0 0; margin-top: 24px; border-radius: 0; background: transparent; }
.learning-progress p { margin: 0; line-height: 1.6; }
.learning-progress progress { display: block; appearance: none; border: 0; border-radius: 20px; width: 100%; height: 6px; background: var(--line); overflow: hidden; accent-color: var(--green); }
.learning-progress progress::-webkit-progress-bar { background: var(--line); }
.learning-progress progress::-webkit-progress-value { background: var(--green); }
.learning-progress progress::-moz-progress-bar { background: var(--green); }
.completion-status { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--green); }
.completion-status svg { width: 18px; height: 18px; }
.lesson-completion { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 0; margin-top: 25px; border-top: 1px solid var(--line); }
.lesson-completion p { margin: 8px 0 0; line-height: 1.6; }
.lesson-completion .btn { flex-shrink: 0; }
.assessment-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.test-intro { padding: 32px; }
.test-intro h2 { font: 36px/1.2 Georgia, serif; letter-spacing: -.7px; margin: 18px 0; overflow-wrap: anywhere; }
.test-instructions { white-space: pre-wrap; line-height: 1.8; overflow-wrap: anywhere; }
.test-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; border-block: 1px solid var(--line); margin: 28px 0; padding: 24px 0; }
.test-facts strong, .test-facts span { display: block; }
.test-facts strong { font-size: 25px; font-weight: 550; margin-bottom: 8px; }
.test-facts span { color: var(--muted); font-size: 12px; }
.test-intro > .btn { margin-top: 16px; }
.attempt-history { margin-top: 28px; padding: 26px; }
.attempt-history h2 { margin-bottom: 20px; }
.attempt-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.attempt-row > div { display: flex; align-items: center; gap: 14px; }
.attempt-row > div:first-child { flex-direction: column; align-items: flex-start; gap: 6px; }
.attempt-row svg { width: 16px; height: 16px; }
.assessment-editor { display: grid; gap: 24px; }
.assessment-editor > .panel { padding: 28px; }
.assessment-editor .form-grid { margin-top: 24px; }
.quiz-questions { display: grid; gap: 24px; counter-reset: question; }
.quiz-editor-question { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 28px; counter-increment: question; }
.quiz-editor-question h3::after { content: " " counter(question, decimal-leading-zero); color: var(--muted); font-weight: 400; }
.quiz-editor-question > .field { margin: 22px 0; }
.quiz-options-editor { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.quiz-options-editor legend { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.quiz-option-editor { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.quiz-option-editor .field { flex: 1; min-width: 0; }
.quiz-option-editor input[type=radio] { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 20px; accent-color: var(--green); }
.assessment-editor-footer { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.assessment-editor-footer p { flex: 1; min-width: 200px; line-height: 1.7; }
.test-attempt { max-width: 860px; margin: auto; }
.test-attempt-bar { display: flex; justify-content: space-between; gap: 20px; padding: 0 0 22px; line-height: 1.6; }
.test-question { margin: 12px 0 28px; min-width: 0; padding: 24px 28px 28px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.test-question legend { max-width: 100%; padding: 0 10px; font-size: 18px; font-weight: 550; line-height: 1.6; overflow-wrap: anywhere; }
.test-question legend span { font: 12px ui-monospace, monospace; color: var(--muted); margin-right: 12px; }
.test-option { display: flex; align-items: center; gap: 15px; padding: 18px; margin-top: 12px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; line-height: 1.6; transition: background-color 140ms, border-color 140ms; }
.test-option:hover { background: var(--soft); }
.test-option:has(input:checked) { background: #edf1e3; border-color: #648344; }
.test-option input { width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--green); }
.test-option span { overflow-wrap: anywhere; min-width: 0; }
.test-submit { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.test-submit p { max-width: 480px; line-height: 1.7; }
.test-submit .btn { flex-shrink: 0; }
.test-result { max-width: 760px; margin: auto; padding: 48px 28px; text-align: center; }
.test-result h2 { font: 36px/1.25 Georgia, serif; margin: 18px 0; }
.result-emblem { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 26px; border: 1px solid var(--line); border-radius: 50%; background: var(--soft); }
.result-emblem.passed { background: var(--lime); }
.result-emblem svg { width: 30px; height: 30px; }
.test-score { font-size: 56px; letter-spacing: -2px; margin: 20px 0; }
.test-result .row { justify-content: center; margin-top: 28px; }
.certificate-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,340px),1fr)); gap: 24px; }
.certificate-card { position: relative; border: 1px solid #cbd2bd; border-radius: 10px; padding: 30px; background: var(--panel); }
.certificate-card::before { content: ""; position: absolute; top: 0; left: 30px; width: 60px; height: 4px; background: var(--green); }
.certificate-card-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 8px 0 30px; }
.certificate-card-top > svg { width: 34px; height: 34px; stroke-width: 1.3; color: var(--green); }
.certificate-card h2 { font: 30px/1.25 Georgia, serif; margin: 15px 0; overflow-wrap: anywhere; }
.certificate-card dl { display: flex; gap: 30px; border-block: 1px solid var(--line); padding: 20px 0; margin: 24px 0 18px; }
.certificate-card dt { font-size: 11px; color: var(--muted); margin-bottom: 7px; }
.certificate-card dd { margin: 0; font-weight: 550; }
.certificate-card .row { margin-top: 24px; }
.consent-field { display: flex; align-items: flex-start; gap: 12px; line-height: 1.6; }
.consent-field input { width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px; accent-color: var(--green); }
@media (max-width: 1100px) { .assessment-layout { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .environment-banner { padding: 10px 22px; font-size: 11px; }
  .test-intro, .quiz-editor-question, .assessment-editor > .panel, .certificate-card { padding: 22px; }
  .test-facts { gap: 10px; }
  .test-facts strong { font-size: 21px; }
  .test-question { padding: 20px 16px; }
  .test-question legend { font-size: 16px; }
  .test-option { padding: 14px; }
  .lesson-completion, .test-submit, .test-attempt-bar { flex-direction: column; align-items: flex-start; }
  .test-submit .btn, .lesson-completion .btn { width: 100%; }
  .attempt-row > div:last-child { flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
  .attempt-history { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { .test-option { transition: none; } }
