/* AFM Exams — scoped Elementor integration; preserve complete reading images. */
.exam-shell.afm-exam {
  direction: ltr; text-align: left; width: 100%; max-width: 420px;
  margin-inline: auto; padding: 8px; box-sizing: border-box;
  color: #1a1a19; --afm-blue: #185fa5;
}
.afm-exam *, .afm-exam *::before, .afm-exam *::after { box-sizing: border-box; }
.afm-exam .exam-id, .afm-exam .exam-code { display: none !important; }
.afm-exam .afm-question-host[data-afm-hidden="true"] { display: none !important; }
.afm-exam .jet-listing-grid__items { display: block; }
.afm-exam .jet-listing-grid__item { width: 100%; max-width: 100%; flex-basis: 100%; }
.afm-exam .exam-question {
  direction: ltr; text-align: left; width: 100%; max-width: 100%; margin: 0 auto;
  background: #f7f7f5; border-radius: 12px; padding: 16px;
}
.afm-exam .exam-status-row { display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.afm-exam .question-counter, .afm-exam .exam-timer { width: auto; border-radius: 99px; padding: 6px 12px; font-size: 13px; line-height: 1.4; }
.afm-exam .question-counter { color: #62625e; background: #fff; border: 1px solid #e3e2dc; }
.afm-exam .exam-timer { color: #185fa5; background: #e6f1fb; font-weight: 600; font-variant-numeric: tabular-nums; }
.afm-exam .question-counter .elementor-heading-title, .afm-exam .exam-timer .elementor-heading-title { font-size: inherit; line-height: inherit; color: inherit; margin: 0; }
.afm-exam .exam-progress-track { height: 5px; min-height: 5px; padding: 0; background: #e3e2dc; border-radius: 99px; overflow: hidden; margin-bottom: 16px; }
.afm-exam .progress-fill { height: 100%; min-height: 5px; min-width: 0; max-width: 100%; flex: none; width: 0; padding: 0; background: linear-gradient(90deg,#185fa5,#2f7fd1); transition: width .2s; }
.afm-exam .question-media { width: 100%; max-height: none; padding: 0; border-radius: 10px; background: #fff; border: 1px solid #e3e2dc; overflow: hidden; margin-bottom: 12px; }
.afm-exam .question-media img { display: block; width: 100%; max-width: 100%; height: auto !important; max-height: none !important; object-fit: contain !important; transform: none !important; }
.afm-exam .question-text, .afm-exam .question-text .jet-listing-dynamic-field__content { font-size: 16px; line-height: 1.65; color: #1a1a19; overflow-wrap: anywhere; }
.afm-exam .question-audio { width: 100%; padding: 6px; margin-bottom: 8px; border-radius: 8px; background: #fff; }
.afm-exam .question-audio audio { width: 100%; display: block; }
.afm-exam .answer-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 16px; }
.afm-exam .answer-option { width: 100%; display: flex; flex-direction: row; align-items: center; flex-wrap: nowrap; gap: 10px; padding: 12px; margin-bottom: 8px; border: 1.5px solid #d3d1c7; border-radius: 10px; cursor: pointer; background: #fff; }
.afm-exam .answer-option:hover { border-color: #185fa5; }
.afm-exam .answer-option .answer-badge { flex: 0 0 28px; width: 28px; height: 28px; min-height: 0; display: flex; justify-content: center; align-items: center; padding: 0; border-radius: 50%; border: 1.5px solid #aaa; color: #1a1a19; font-size: 13px; }
.afm-exam .answer-badge .elementor-heading-title { font-size: inherit; line-height: 1; color: inherit; margin: 0; }
.afm-exam .answer-option .answer-text { flex: 1 1 auto; width: auto; min-width: 0; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; color: #1a1a19; }
.afm-exam .answer-text .jet-listing-dynamic-field__content { font-size: inherit; line-height: inherit; color: inherit; }
.afm-exam .answer-option .answer-check { margin-left: auto; margin-right: 0; flex: 0 0 22px; width: 22px; padding: 0; color: #185fa5; opacity: 0; }
.afm-exam .answer-check .elementor-icon { font-size: 18px; color: inherit; fill: currentColor; }
.afm-exam .answer-option.selected { border-color: #185fa5; background: #e6f1fb; }
.afm-exam .answer-option.selected .answer-badge { color: #fff; background: #185fa5; border-color: #185fa5; }
.afm-exam .answer-option.selected .answer-check { opacity: 1; }
.afm-exam .exam-nav { display: flex; flex-direction: row; gap: 10px; width: 100%; }
.afm-exam .exam-prev, .afm-exam .exam-next { flex: 1; cursor: pointer; }
.afm-exam .exam-prev .elementor-button, .afm-exam .exam-next .elementor-button,
.afm-exam button.afm-action, .afm-exam button.afm-retry {
  padding: 12px 18px; border-radius: 10px; border: 1px solid #185fa5;
  background: #185fa5; color: #fff; font-size: 15px; font-weight: 600; line-height: 1.4; cursor: pointer; text-decoration: none;
}
.afm-exam .exam-prev .elementor-button { color: #185fa5; background: #fff; }
.afm-exam [aria-disabled="true"], .afm-exam button:disabled { opacity: .55; cursor: not-allowed; }
.afm-exam .answer-option[aria-disabled="true"] { opacity: 1; }
.afm-exam:not([data-afm-status="active"]) .exam-prev,
.afm-exam:not([data-afm-status="active"]) .exam-next,
.afm-exam:not([data-afm-status="active"]) .exam-nav { display: none !important; }
.afm-exam .exam-result { display: none; direction: ltr; text-align: left; width: 100%; padding: 0; margin: 12px 0; min-height: 0; }
.afm-exam .exam-result.afm-result-visible { display: block !important; }
.afm-exam .report-item { padding: 14px 0; border-bottom: 1px solid #e3e2dc; }
.afm-exam .report-item h3 { font-size: 17px; margin: 0 0 8px; }
.afm-exam .report-item p { font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.afm-exam .afm-explanation { white-space: pre-wrap; }
.afm-exam .afm-score { font-size: 24px; font-weight: 700; color: #185fa5; }
.afm-exam .afm-controls { margin-bottom: 14px; }
.afm-exam .afm-message { font-size: 14px; line-height: 1.6; margin: 0 0 10px; }
.afm-exam .afm-error { color: #a32424; }
.afm-exam .afm-save-note { display: inline-block; margin: 8px; font-size: 12px; color: #62625e; }
.afm-exam [hidden] { display: none !important; }
.afm-exam .answer-option:focus-visible, .afm-exam button:focus-visible, .afm-exam a:focus-visible { outline: 3px solid #185fa5; outline-offset: 3px; }
@media(max-width:520px) { .exam-shell.afm-exam { padding: 4px; } .afm-exam .exam-question { padding: 12px; } }
@media(prefers-reduced-motion:reduce) { .afm-exam * { transition: none !important; scroll-behavior: auto !important; } }

/* 1.1.0: compact media and explicit LTR option content for Elementor Atomic. */
.exam-shell.afm-exam .question-media { display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: flex-start !important; gap: 4px; margin-bottom: 8px; }
.exam-shell.afm-exam .question-media > .elementor-widget-image { width: 100% !important; max-width: 100% !important; margin: 0 !important; }
.exam-shell.afm-exam .question-media img { width: auto !important; height: auto !important; max-width: 100% !important; max-height: 260px !important; object-fit: contain !important; margin-inline: auto !important; cursor: zoom-in; }
.exam-shell.afm-exam .question-media a { display: block; }
.exam-shell.afm-exam .answer-option { direction: ltr !important; flex-direction: row !important; justify-content: flex-start !important; text-align: left !important; gap: 10px !important; }
.exam-shell.afm-exam .answer-option .answer-badge { order: 0; margin: 0 !important; }
.exam-shell.afm-exam .answer-option .answer-text { order: 1; direction: ltr !important; text-align: left !important; margin: 0 !important; flex: 1 1 0 !important; align-self: center; }
.exam-shell.afm-exam .answer-text .jet-listing-dynamic-field,
.exam-shell.afm-exam .answer-text .jet-listing-dynamic-field__inline-wrap { display: flex !important; justify-content: flex-start !important; align-items: center !important; width: 100%; direction: ltr !important; text-align: left !important; }
.exam-shell.afm-exam .answer-text .jet-listing-dynamic-field__content { direction: ltr !important; text-align: left !important; margin: 0 !important; }
.exam-shell.afm-exam .answer-option .answer-check { order: 2; margin-left: auto !important; margin-right: 0 !important; }
.afm-exam .afm-image-zoom { padding: 4px 10px; margin: 2px auto 6px; border: 1px solid #bed2e4; border-radius: 6px; background: #fff; color: #185fa5; font-size: 12px; line-height: 1.4; cursor: zoom-in; }
.afm-image-dialog { padding: 16px; max-width: 96vw; width: max-content; max-height: 94vh; border: 0; border-radius: 10px; background: #fff; overflow: auto; }
.afm-image-dialog::backdrop { background: #000b; }
.afm-image-dialog img { display: block; width: auto; height: auto; max-width: 90vw; max-height: none; margin: 12px auto 0; }
.afm-image-dialog button { position: sticky; top: 0; background: #185fa5; color: #fff; padding: 8px 14px; border: 0; border-radius: 6px; cursor: pointer; }
@media(max-width:520px) { .exam-shell.afm-exam .question-media img { max-height: 230px !important; } }

/* 1.2 — compact exam, spacious report; all rules scoped to AFM. */
.exam-shell.afm-exam { max-width: 620px !important; width: 100% !important; --afm-ink: #182c45; --afm-muted: #62748a; --afm-line: #dde6ee; }
.exam-shell.afm-exam[data-afm-status="finished"] { max-width: 960px !important; display: block !important; padding: 20px 16px; }
.afm-exam[data-afm-status="finished"] .exam-status-row,
.afm-exam[data-afm-status="finished"] .question-counter,
.afm-exam[data-afm-status="finished"] .exam-timer,
.afm-exam[data-afm-status="finished"] .exam-progress-track,
.afm-exam[data-afm-status="finished"] .progress-fill { display: none !important; }
.exam-shell.afm-exam .exam-result.afm-result-visible { width: 100% !important; max-width: none !important; min-width: 0 !important; margin: 12px 0 !important; }
.afm-exam .exam-question { border: 1px solid #e6ecf1; background: #f7f9fc; border-radius: 18px; padding: 20px; }
.afm-exam .answer-option { border-color: #dbe3ec; border-radius: 12px; }
.afm-exam .afm-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.afm-exam .afm-controls .afm-message { flex: 1 1 260px; margin: 0; color: #62748a; }
.afm-exam .afm-controls .afm-message.afm-error { color: #a32424; }
.exam-shell.afm-exam .afm-report { font-size: 15px; line-height: 1.6; color: var(--afm-ink); text-align: left !important; direction: ltr !important; }
.afm-exam .afm-report h2, .afm-exam .afm-report h3, .afm-exam .afm-report h4,
.afm-exam .afm-report p, .afm-exam .afm-report dl { margin: 0; padding: 0; }
.afm-exam .afm-result-hero { display: grid; grid-template-columns: minmax(0,1fr) 148px; align-items: center; gap: 24px; background: #eef5fc; border: 1px solid #dce8f5; border-radius: 22px; padding: 30px; }
.afm-exam .afm-hero-info { min-width: 0; }
.afm-exam .afm-report .afm-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 1.8px; color: #526b88; margin-bottom: 12px; }
.afm-exam .afm-result-hero h2 { font-size: clamp(23px,3vw,32px); line-height: 1.25; color: #182c45; font-weight: 700; overflow-wrap: anywhere; margin-bottom: 14px; }
.afm-exam .afm-report .afm-score { font-size: 20px; line-height: 1.4; color: #185fa5; margin-bottom: 12px; }
.afm-exam .afm-report .afm-report-meta { font-size: 12px; color: #526b88; margin-top: 5px; }
.afm-exam .afm-report .afm-pass-note { font-size: 12px; margin-top: 12px; color: #526b88; }
.afm-exam .afm-score-ring { width: 148px; height: 148px; border-radius: 50%; padding: 9px; background: conic-gradient(#185fa5 var(--afm-percent), #d8e5f2 0); }
.afm-exam .afm-score-ring > div { width: 100%; height: 100%; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #eef5fc; }
.afm-exam .afm-score-ring strong { font-size: 29px; line-height: 1.3; color: #185fa5; }
.afm-exam .afm-score-ring span { font-size: 10px; color: #526b88; }
.afm-exam .afm-result-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 16px 0 24px; }
.afm-exam .afm-stat { border: 1px solid #dde6ee; border-radius: 14px; padding: 18px; background: white; }
.afm-exam .afm-stat strong, .afm-exam .afm-stat span { display: block; }
.afm-exam .afm-stat strong { font-size: 28px; line-height: 1.3; }
.afm-exam .afm-stat span { font-size: 12px; color: #62748a; margin-top: 5px; }
.afm-exam .afm-stat-correct strong { color: #19744e; }
.afm-exam .afm-stat-wrong strong { color: #b44439; }
.afm-exam .afm-stat-unanswered strong { color: #7c6530; }
.afm-exam .afm-level-panel { border: 1px solid #dde6ee; border-radius: 16px; padding: 22px; margin-bottom: 20px; }
.afm-exam .afm-level-panel h3 { font-size: 15px; color: #526b88; }
.afm-exam .afm-report .afm-level-value { font-size: 30px; font-weight: 700; color: #185fa5; margin: 8px 0 14px; }
.afm-exam .afm-level-scale { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 6px; margin-bottom: 12px; }
.afm-exam .afm-level-scale span { background: #f1f5f9; border-radius: 6px; padding: 6px; text-align: center; font-size: 12px; color: #62748a; }
.afm-exam .afm-level-scale .afm-current-level { color: #fff; background: #185fa5; font-weight: 700; }
.afm-exam .afm-report .afm-level-note { color: #62748a; font-size: 12px; }
.afm-exam .afm-report-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.afm-exam .afm-report button { font-family: inherit; line-height: 1.4; cursor: pointer; box-shadow: none; text-transform: none; letter-spacing: normal; min-height: 40px; }
.afm-exam .afm-report .afm-print-button { background: #185fa5; color: white; border: 1px solid #185fa5; border-radius: 10px; padding: 11px 18px; font-size: 14px; font-weight: 600; }
.afm-exam .afm-print-status { font-size: 12px; color: #62748a; }
.afm-exam .afm-review-heading { display: flex; justify-content: space-between; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.afm-exam .afm-review-heading h3 { font-size: 21px; }
.afm-exam .afm-review-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.afm-exam .afm-report .afm-filter { border: 1px solid #dde6ee; background: #fff; color: #526b88; border-radius: 8px; padding: 7px 12px; font-size: 12px; }
.afm-exam .afm-report .afm-filter[aria-pressed="true"] { border-color: #185fa5; color: #185fa5; background: #eef5fc; }
.afm-exam .afm-report .afm-filter-count { font-size: 12px; color: #62748a; margin-bottom: 16px; }
.afm-exam .afm-review-list { display: grid; gap: 14px; }
.exam-shell.afm-exam .afm-report .report-item { border: 1px solid #dde6ee; border-radius: 14px; padding: 22px !important; margin: 0; background: #fff; min-width: 0; }
.afm-exam .afm-item-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.afm-exam .afm-item-head h3 { font-size: 16px; font-weight: 700; color: #182c45; }
.afm-exam .afm-item-status { border-radius: 99px; padding: 4px 10px; font-size: 11px; font-weight: 600; white-space: nowrap; background: #f6f2e9; color: #7c6530; }
.afm-exam .afm-item-correct .afm-item-status { background: #eaf7ef; color: #19744e; }
.afm-exam .afm-item-wrong .afm-item-status { background: #fcf0ee; color: #b44439; }
.afm-exam .afm-report .afm-question-summary { font-size: 15px; line-height: 1.65; margin-bottom: 14px; }
.afm-exam .afm-answer-pair, .afm-explanation-dialog .afm-answer-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; padding: 14px !important; background: #f7f9fc; border-radius: 10px; }
.afm-answer-pair dt { font-size: 11px; color: #62748a; margin-bottom: 5px; font-weight: normal; }
.afm-answer-pair dd { font-size: 14px; line-height: 1.6; margin: 0; overflow-wrap: anywhere; color: #182c45; }
.afm-exam .afm-report .afm-item-points { font-size: 12px; color: #62748a; margin-top: 12px; }
.afm-exam .afm-report .afm-explain-button { font-size: 13px; margin-top: 12px; background: #fff; color: #185fa5; border: 1px solid #cbddec; border-radius: 8px; padding: 8px 12px; }
.afm-exam .afm-report .afm-print-only { display: none; }
.afm-exam .afm-report .afm-print-only.afm-inline-explanation { display: block; margin-top: 14px; }
.afm-explanation-dialog { border: 1px solid #dde6ee; border-radius: 18px; padding: 26px; width: min(680px,94vw); max-width: 94vw; max-height: 86vh; overflow: auto; color: #182c45; background: #fff; text-align: left; direction: ltr; box-shadow: 0 20px 70px #132e4a33; }
.afm-explanation-dialog::backdrop { background: #102438aa; }
.afm-exam .afm-report .afm-dialog-close { float: right; position: sticky; top: 0; color: #185fa5; background: #eef5fc; border: 1px solid #cbddec; border-radius: 8px; padding: 8px 14px; font-size: 13px; margin-left: 10px; }
.afm-exam .afm-explanation-dialog h2 { font-size: 21px; line-height: 1.4; margin: 6px 0 24px; }
.afm-exam .afm-explanation-dialog .afm-explanation { font-size: 15px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 20px; }
@media(max-width:600px) {
  .exam-shell.afm-exam[data-afm-status="finished"] { padding: 12px 8px; }
  .afm-exam .afm-result-hero { padding: 20px; grid-template-columns: minmax(0,1fr); gap: 18px; }
  .afm-exam .afm-score-ring { display: none; }
  .afm-exam .afm-result-stats { gap: 8px; }
  .afm-exam .afm-stat { padding: 14px 10px; }
  .afm-exam .afm-stat strong { font-size: 24px; }
  .afm-exam .afm-answer-pair, .afm-explanation-dialog .afm-answer-pair { grid-template-columns: minmax(0,1fr); }
  .exam-shell.afm-exam .afm-report .report-item { padding: 16px !important; }
  .afm-explanation-dialog { padding: 18px; }
}

.afm-exam[data-afm-status="finished"] > :not(.afm-controls):not(.exam-result) { display: none !important; }
/* 1.3 navigation, membership and account surfaces */
.afm-exam .afm-name-label {display:flex;flex-direction:column;gap:6px;width:100%;font-size:13px;margin:12px 0;color:#526b88}
.afm-exam .afm-name-label input {width:100%;padding:10px 12px;border:1px solid #cbddec;border-radius:9px;background:white;color:#182c45;font:inherit}
.afm-exam .afm-question-map {width:100%;padding:12px;border:1px solid #dce8f5;border-radius:12px;background:#f7faff;margin:12px 0}
.afm-exam .afm-question-map summary {cursor:pointer;font-size:14px;color:#185fa5;font-weight:600}
.afm-exam .afm-question-map p {font-size:11px;color:#62748a;margin:10px 0}
.afm-exam .afm-map-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(40px,1fr));gap:8px}
.afm-exam .afm-map-grid button {min-height:40px;padding:7px 2px;background:white;color:#526b88;border:1px solid #cbddec;border-radius:8px;font:600 13px/1.3 sans-serif;cursor:pointer}
.afm-exam .afm-map-grid .afm-map-answered {background:#185fa5;color:white;border-color:#185fa5}
.afm-exam .afm-map-grid [aria-current="step"] {outline:2px solid #bb741d;outline-offset:2px}
.afm-exam .afm-map-grid button:focus-visible {outline:3px solid #102438;outline-offset:2px}
.afm-exam .afm-map-grid button:disabled {cursor:default;opacity:.6}
.afm-exam .question-audio {position:relative!important;inset:auto!important;transform:none!important;float:none!important;display:block;width:100%!important;flex-basis:100%;clear:both;margin:12px 0!important;padding:8px!important;border:1px solid #dce8f5!important;background:#eef5fc!important;border-radius:12px!important}
.afm-exam .question-audio audio {display:block;width:100%!important;max-width:100%;height:40px}
.afm-exam .afm-report .afm-student-name {margin:0 0 12px;color:#526b88;font-size:15px;overflow-wrap:anywhere}
.afm-exam .afm-report .afm-near-level {margin-top:12px;padding:10px;background:#eef5fc;border-radius:8px;font-size:13px;color:#185fa5}
.afm-exam .afm-explain-locked {display:inline-block;margin-top:12px;padding:8px 10px;border:1px solid #dce8f5;border-radius:8px;font-size:12px;color:#62748a;text-decoration:none}
.afm-exam .afm-account-link {display:inline-block;margin-bottom:16px;color:#185fa5;font-size:14px}
.afm-standalone {margin:20px 0!important}
.afm-account {direction:ltr;text-align:left;color:#182c45}
.afm-history-list {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:16px;margin-top:20px}
.afm-history-card {border:1px solid #dce8f5;border-radius:14px;background:#f7faff;padding:20px}
.afm-history-card h3 {font-size:18px;margin:0 0 12px}
.afm-history-card p {font-size:13px;overflow-wrap:anywhere}
.afm-account [data-afm-guest-claims] button {margin:6px}
.afm-reports .widefat {margin-top:20px;border-radius:10px;overflow:hidden}
.afm-exam [hidden] {display:none!important}
/* 1.4: distinguish the complete answer card, preserving labels and filters. */
.exam-shell.afm-exam .afm-report .report-item.afm-item-correct {background:#f0f9f4;border-color:#bddfcb;border-left:6px solid #23835b}
.exam-shell.afm-exam .afm-report .report-item.afm-item-wrong {background:#fff3f1;border-color:#edc4be;border-left:6px solid #c05247}
.exam-shell.afm-exam .afm-report .report-item.afm-item-unanswered {background:#fff9ec;border-color:#e8d6ab;border-left:6px solid #af812d}
.afm-exam .afm-report .report-item .afm-answer-pair {background:#ffffffb3}
.afm-exam .afm-report-locked {padding:28px!important;border:1px solid #dce4ed;border-radius:16px;background:#f7faff}
.afm-exam .afm-report-locked h2 {font-size:22px;margin-bottom:12px}
.afm-exam .afm-report-locked p {margin-bottom:16px}
.afm-exam .afm-renew-link {display:inline-block;padding:10px 16px;border-radius:8px;background:#185fa5;color:#fff;text-decoration:none}

/* 1.5 compact header and question number, also for text/audio-only questions. */
.afm-exam .afm-legacy-status {display:none!important}
.afm-exam .afm-question-map {margin:6px 0 10px;padding:0;overflow:hidden}
.afm-exam .afm-question-map summary {position:relative;display:flex;align-items:center;gap:8px;min-height:44px;padding:10px 12px;list-style:none}
.afm-exam .afm-question-map summary::-webkit-details-marker {display:none}
.afm-exam .afm-question-map summary::before {content:'›';font-size:20px;line-height:1;transition:transform .15s}
.afm-exam .afm-question-map[open] summary::before {transform:rotate(90deg)}
.afm-exam .afm-question-map summary::after {content:'';position:absolute;bottom:0;left:0;height:3px;width:var(--afm-answered,0%);background:#185fa5;transition:width .2s}
.afm-exam .afm-map-label {flex:1;min-width:0;font-size:13px}
.afm-exam .afm-compact-timer {flex:none;margin:0!important;padding:4px 8px!important;font-size:13px!important;white-space:nowrap}
.afm-exam .afm-question-map > p {padding:0 12px}
.afm-exam .afm-map-grid {padding:0 12px 12px}
.exam-shell.afm-exam .exam-question {position:relative;padding-top:44px!important}
.afm-exam .afm-question-number {position:absolute;top:8px;left:12px;z-index:2;display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:28px;padding:0 8px;border-radius:8px;background:#185fa5;color:#fff;font:700 13px/1 Arial,sans-serif;pointer-events:none}
.afm-exam .afm-controls {margin-bottom:6px}
.afm-exam .afm-message {margin-bottom:4px}

/* First paint hides test content before the footer controller loads. */
.afm-test-page .exam-shell:not([data-afm-status]) .exam-question {display:none!important}
.afm-exam:not([data-afm-status="active"]) .exam-question {display:none!important}
.afm-exam[data-afm-status="loading"] .afm-controls > :not(.afm-message) {display:none!important}
.afm-exam[data-afm-status="loading"] .afm-message {display:flex;justify-content:center;align-items:center;gap:12px;padding:24px 0}
.afm-exam[data-afm-status="loading"] .afm-message::before {content:'';width:20px;height:20px;border:2px solid #d5e4f2;border-top-color:#185fa5;border-radius:50%;animation:afm-spin .8s linear infinite}
@keyframes afm-spin {to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.afm-exam[data-afm-status="loading"] .afm-message::before{animation:none}}
.afm-exam .afm-mark-review {display:block;margin:6px 0 12px;padding:8px 12px;border:1px solid #d4dce5;border-radius:8px;background:#fff;color:#52657b;font-size:13px;cursor:pointer}
.afm-exam .afm-mark-review[aria-pressed="true"] {border-color:#b88739;background:#fff6e1;color:#946621}
.afm-exam .afm-map-grid button.afm-map-review {position:relative;border-bottom:3px solid #b88739}
.afm-exam .afm-map-grid button.afm-map-review::after {content:'⚑';position:absolute;right:1px;top:-4px;font-size:13px;color:#946621}
.afm-exam .afm-submit-dialog {width:min(92vw,440px);border:1px solid #d4dce5;border-radius:14px;padding:22px;color:#20324b;box-shadow:0 20px 60px #17385733}
.afm-exam .afm-submit-dialog::backdrop {background:#17385766}
.afm-exam .afm-submit-dialog button {margin:5px;padding:10px 14px;border-radius:8px;cursor:pointer}
.afm-exam .afm-submit-dialog p {font-size:16px;line-height:1.6}
.afm-exam .afm-save-note:empty {display:none}
.afm-exam .afm-continue {margin-right:8px;margin-bottom:8px}

.afm-exam a.afm-sign-in {display:inline-block;margin:6px 8px 6px 0;padding:10px 14px;border-radius:8px;background:#185fa5;color:#fff;text-decoration:none}
.afm-exam .afm-separate {margin:6px 0}

.afm-test-update-notice{border:1px solid #dfc990;border-left:4px solid #b88739;border-radius:10px;background:#fffbef;color:#6b5425;padding:14px 18px;margin:0 0 16px;font-size:14px;line-height:1.6}
.afm-correction-note{font-size:12px;color:#64748a}
.afm-exam .afm-guest-signup{border:1px solid #bdd4ec;border-radius:16px;padding:22px;margin:0 0 22px;background:linear-gradient(125deg,#e9f3ff,#f5f9fe);box-shadow:0 5px 18px #17385712}
.afm-exam .afm-guest-signup h3{font-size:22px;color:#173857;margin:0 0 8px}
.afm-exam .afm-guest-signup p{font-size:15px;color:#52657b;line-height:1.6;margin:0 0 16px}
.afm-exam .afm-signup-button{display:inline-block;padding:12px 18px;background:#185fa5;color:white;border-radius:10px;text-decoration:none;font-weight:600}
.afm-exam .afm-signup-login{display:block;margin-top:12px;color:#185fa5;font-size:13px}
