/* Examonkey shared theme. Vendor CSS stays unchanged. Text pairs >= 7:1. */
:root {
  --em-black: #000000;
  --em-navy: #14213d;
  --em-orange: #fca311;
  --em-apricot: #f1c47b;
  --em-wheat: #ebd5b0;
  --em-bone: #e8ddcb;
  --em-gray: #e5e5e5;
  --em-white: #ffffff;
  --em-danger: #8b0000;
  --em-danger-hover: #6f0000;
  --em-success: #005a2b;
  --em-success-hover: #004020;
  --em-page: var(--em-gray);
  --em-surface: var(--em-white);
  --em-panel: var(--em-bone);
  --em-ink: var(--em-black);
  --em-text: var(--em-navy);
  --em-line: var(--em-navy);
  --em-focus: var(--em-navy);
  --em-focus-gap: var(--em-white);
}
:root[data-reading-colors="warm"] {
  --em-page: var(--em-bone);
  --em-surface: var(--em-bone);
  --em-panel: var(--em-wheat);
}
:root[data-reading-colors="dark"] {
  --em-page: var(--em-black);
  --em-surface: var(--em-navy);
  --em-panel: var(--em-black);
  --em-ink: var(--em-white);
  --em-text: var(--em-white);
  --em-line: var(--em-white);
  --em-focus: var(--em-white);
  --em-focus-gap: var(--em-navy);
  color-scheme: dark;
}
html { scroll-padding-block: 1rem; }
body { background: var(--em-page); color: var(--em-ink); font-size: 1rem; line-height: 1.5; }
h1,h2,h3,h4,h5,h6 { color: var(--em-text); overflow-wrap: anywhere; }
a, a:visited { color: var(--em-text); text-decoration: underline; text-underline-offset: .2em; }
a:hover, a:active { color: var(--em-text); text-decoration-thickness: .15em; }
p { max-width: 75ch; }
code, pre { color: var(--em-text); }
small, .small, .badge, .form-control-sm, .btn-sm { font-size: 1rem; }
.text-muted, .muted, .spec-note, .text-secondary { color: var(--em-text) !important; opacity: 1; }
.text-primary, .text-info, .text-warning { color: var(--em-text) !important; }
.text-danger, .invalid-feedback { color: var(--em-danger) !important; }
.text-success, .valid-feedback { color: var(--em-success) !important; }
[data-reading-colors="dark"] :is(.text-danger,.invalid-feedback,.text-success,.valid-feedback) { color: var(--em-white) !important; }
:root[data-reading-spacing="wide"] :is(p, .question-rc, .answer-rc, .remark-rc, .note-editable) { line-height: 1.8; text-align: start; }
:root[data-reading-spacing="wide"] p { margin-block-end: 2.7em; }
:root[data-reading-spacing="wide"] :is(.spec-main,.content) { max-width: 80rem; margin-inline: auto; }
/* !important defeats Bootstrap focus/utility declarations, not author content. */
:where(a,button,input,select,textarea,summary,[tabindex],[contenteditable="true"]):focus-visible {
  outline: 3px solid var(--em-focus) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 3px var(--em-focus-gap) !important;
}
.skip-link { position: fixed; inset-block-start: 8px; inset-inline-start: 8px; z-index: 10000; transform: translateY(-200%); background: var(--em-white); color: var(--em-navy); padding: 12px 18px; }
.skip-link:focus { transform: none; color: var(--em-navy); }
#main-content { scroll-margin-block-start: 1rem; }
#main-content:focus { outline: none; }
.sr-only, .visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
/* Shared button aliases preserve existing handlers and markup. */
.btn, button, input[type="submit"], summary { min-height: 44px; }
.btn, button, input[type="submit"] { min-width: 44px; }
.btn { font-weight: 700; border-radius: 8px; white-space: normal; text-decoration: none; }
.btn-color1, .btn-primary, .btn-warning, .student-action-submit,
.spec-hero.home .spec-actions .btn-color1, .nav-actions > .btn {
  background: var(--em-orange) !important; color: var(--em-navy) !important; border: 2px solid var(--em-navy) !important;
}
:is(.btn-color1,.btn-primary,.btn-warning,.student-action-submit):hover,
.spec-hero.home .spec-actions .btn-color1:hover, .nav-actions > .btn:hover { background: var(--em-apricot) !important; }
:is(.btn-color1,.btn-primary,.btn-warning,.student-action-submit):active,
.spec-hero.home .spec-actions .btn-color1:active, .nav-actions > .btn:active { background: var(--em-wheat) !important; }
.btn-color2, .btn-secondary, .btn-info { background: var(--em-navy); color: var(--em-white); border: 2px solid var(--em-navy); }
:is(.btn-color2,.btn-secondary,.btn-info):is(:hover,:active,:focus), .btn-color2:visited { background: var(--em-black); color: var(--em-white); border-color: var(--em-black); }
.btn-light, .btn-default, .btn-outline-primary, .btn-outline-secondary, .btn-link, .note-btn { background: var(--em-surface); color: var(--em-text); border: 1px solid var(--em-line); }
:is(.btn-light,.btn-default,.btn-outline-primary,.btn-outline-secondary,.note-btn):is(:hover,:active), .dropdown-item:is(:hover,:focus,.active), .page-item.active .page-link { background: var(--em-navy); color: var(--em-white); }
.btn-danger, .red { background: var(--em-danger) !important; color: var(--em-white) !important; border-color: var(--em-danger) !important; }
:is(.btn-danger,.red):is(:hover,:active) { background: var(--em-danger-hover) !important; border-color: var(--em-danger-hover) !important; }
.btn-success, .green { background: var(--em-success); color: var(--em-white); border-color: var(--em-success); }
:is(.btn-success,.green):is(:hover,:active) { background: var(--em-success-hover); color: var(--em-white); border-color: var(--em-success-hover); }
.btn:disabled, .btn.disabled, button:disabled, [aria-disabled="true"].btn { background: var(--em-gray) !important; color: var(--em-navy) !important; border: 2px dashed var(--em-navy) !important; opacity: 1 !important; cursor: not-allowed; }
.bg-primary, .bg-info, .bg-secondary, .badge-primary, .badge-info { background-color: var(--em-navy) !important; color: var(--em-white) !important; }
.bg-warning, .badge-warning { background-color: var(--em-orange) !important; color: var(--em-navy) !important; }
.bg-success, .badge-success { background-color: var(--em-success) !important; color: var(--em-white) !important; }
.bg-danger, .badge-danger { background-color: var(--em-danger) !important; color: var(--em-white) !important; }
.bg-light, .bg-white { background-color: var(--em-surface) !important; color: var(--em-text); }
.badge { line-height: 1.4; white-space: normal; }
/* Forms, third-party widgets, and messages. */
.form-control, .form-select, select, textarea, .custom-select, .input-group-text, .note-editor.note-frame, .note-editor .note-editing-area .note-editable {
  background-color: var(--em-surface); color: var(--em-text); border-color: var(--em-line); font-size: 1rem;
}
.form-control, .form-select, select, .custom-select { min-height: 44px; height: auto; }
.form-control:focus, .form-select:focus { color: var(--em-text); background: var(--em-surface); border-color: var(--em-line); }
.form-control::placeholder, input::placeholder, textarea::placeholder { color: var(--em-text); opacity: 1; }
.form-control:disabled, .form-control[readonly] { background: var(--em-panel); color: var(--em-text); opacity: 1; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--em-navy); width: 1.3rem; height: 1.3rem; }
.form-check { min-height: 44px; padding-block: 8px; }
.form-check-label, .checkbox-inline { min-height: 44px; align-content: center; }
label { color: var(--em-text); }
.alert { color: var(--em-text); background: var(--em-panel); border: 1px solid var(--em-line); border-inline-start-width: 5px; }
.alert-danger { background: var(--em-white); color: var(--em-danger); border-color: var(--em-danger); }
.alert-success { background: var(--em-white); color: var(--em-success); border-color: var(--em-success); }
.alert :is(a,.alert-link) { color: inherit; }
.modal-content, .dropdown-menu, .popover, .ui-widget-content, .note-toolbar, .note-statusbar { background: var(--em-surface) !important; color: var(--em-text); border-color: var(--em-line) !important; }
.dropdown-item, .page-link, .ui-widget-content a { color: var(--em-text); }
.page-link { background: var(--em-surface); min-width: 44px; min-height: 44px; }
.close, .btn-close { color: var(--em-text); opacity: 1; min-width: 44px; min-height: 44px; }
.note-editor .note-toolbar .note-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; padding: 6px 8px; font-size: 1rem; line-height: 1; }
.note-editor .note-toolbar [class^="note-icon"]::before,
.note-editor .note-toolbar [class*=" note-icon"]::before { font-family: summernote; font-size: 1rem; line-height: 1; }
.note-editor.note-frame { border: 1px solid var(--em-line); }
.note-editor .note-statusbar .note-resizebar { min-height: 14px; }
.note-editor .note-editable { min-height: 160px; }
/* Public surfaces. The image is decorative and never behind text. */
.marketing-header, .header, .navbar-custom, .footer, .spec-cta {
  background: var(--em-navy); color: var(--em-white);
  --em-focus: var(--em-white); --em-focus-gap: var(--em-navy);
}
.marketing-header, .header.fixed-top { position: relative; inset: auto; margin: 0; }
.marketing-header { border-bottom: 2px solid var(--em-navy); }
.marketing-header :is(.nav-links a,.login-link), .footer :is(a,h2,p), .spec-cta :is(h2,p,a:not(.btn)) { color: var(--em-white); }
.marketing-header :is(.nav-links a,.login-link):hover, .footer a:hover { color: var(--em-orange); }
.brand-tools > a { background: transparent; border-radius: 0; padding: 0; display: inline-flex; }
.admin-header-logo > a, .student-logo > a { background: transparent; border-radius: 0; padding: 0; display: inline-flex; }
.marketing-nav, .nav-actions, .brand-tools { flex-wrap: wrap; }
.nav-links a, .login-link { display: inline-flex; min-height: 44px; align-items: center; }
.footer a { display: inline-flex; align-items: center; }
.mobile-menu-panel { inset-inline-end: 0; inset-inline-start: auto; max-height: 70vh; overflow-y: auto; padding: 18px 22px; background: var(--em-surface); border-color: var(--em-line); --em-focus: var(--em-text); --em-focus-gap: var(--em-surface); }
.mobile-menu-panel a { color: var(--em-text); }
.hero, .spec-hero.home { background: var(--em-navy); color: var(--em-white); --em-focus: var(--em-white); --em-focus-gap: var(--em-navy); }
.hero-shade { background: none; }
.hero h1, .spec-hero.home :is(h1,.spec-note,.spec-eyebrow) { color: var(--em-white); opacity: 1; }
.spec-hero.home .spec-hero-grid > div:first-child { background: transparent; }
.hero.compact, .spec-hero { background: var(--em-surface); color: var(--em-ink); }
.hero.compact h1, .hero.compact .secondary-link { color: var(--em-text); }
.spec-hero.home .spec-actions .secondary-link { color: var(--em-white); background: var(--em-navy); border: 2px solid var(--em-white); }
.spec-screen, .proof-screen { --em-focus: var(--em-text); --em-focus-gap: var(--em-surface); color: var(--em-text); }
.spec-hero.home :is(.spec-screen,.proof-screen) p { color: var(--em-text); }
.page-band.alt, .spec-section.alt, .feature-card, .pricing-card, .workflow-card, .spec-card, .spec-screen, .spec-screen-body, .proof-screen, .spec-row, .faq-item, .spec-faq details { background: var(--em-surface); color: var(--em-ink); }
.spec-card.featured { border: 2px solid var(--em-navy); box-shadow: 0 0 0 4px var(--em-orange); }
.spec-process-number, .question_number { background: var(--em-orange); color: var(--em-navy); }
.feature-icon, .spec-pill, .proof-pill { background: var(--em-wheat); color: var(--em-navy); }
.spec-eyebrow, .spec-label, .workflow-step { color: var(--em-text); font-size: 1rem; }
.spec-note, .spec-pill, .proof-pill { font-size: 1rem; }
.spec-screen-bar, .proof-bar { background: var(--em-navy); }
.spec-line, .proof-line { background: var(--em-gray); }
.spec-table, .comparison-table, .table { color: var(--em-ink); background: var(--em-surface); }
.spec-table th, .comparison-table th, .table thead th { background: var(--em-panel); color: var(--em-text); }
.table-striped tbody tr:nth-of-type(odd), .table-hover tbody tr:hover { background: var(--em-panel); color: var(--em-text); }
.table td, .table th, .spec-table td, .spec-table th, .comparison-table td, .comparison-table th { border-color: var(--em-line); }
.upload-drop, .ai-exam-dropzone { background: var(--em-surface); color: var(--em-text); border-color: var(--em-line); }
.ai-exam-dropzone.dragover { background: var(--em-wheat); color: var(--em-navy); border-color: var(--em-navy); }
/* App panels and compact actions. */
.question-rc { background: var(--em-surface); color: var(--em-ink); }
.answer-rc { background: var(--em-panel); color: var(--em-ink); }
.remark-rc { background: var(--em-wheat); color: var(--em-navy); }
.grade-rc { background: var(--em-apricot); color: var(--em-navy); }
.question-rc, .answer-rc, .remark-rc, .grade-rc { padding: 16px; overflow-wrap: anywhere; }
.student-exam-header { background: var(--em-navy); color: var(--em-white); }
.student-exam-header .student-exam-title { color: var(--em-white); white-space: normal; }
.student-exam-header > .col-sm-6 { align-items:center; display:flex; flex-wrap:wrap; gap:10px; }
.student-exam-header .student-exam-title { flex:1 1 220px; min-width:0; }
.student-exam-header .student-action-submit { flex:0 0 auto; margin:0; }
.student-status #saving { background: var(--em-wheat) !important; color: var(--em-navy); border-color: var(--em-navy); }
.student-action-save { color: var(--em-white) !important; min-width: 44px; min-height: 44px; }
.student-start-panel { background: var(--em-surface); border-color: var(--em-line); }
.admin-top-nav { flex-wrap: wrap; overflow: visible; padding: 6px; }
.admin-nav-button, .admin-create-exam, .admin-icon-only, .admin-icon-with-count, .admin-tests-table .action-btn { height: auto; min-height: 44px; max-width: none; white-space: normal; overflow: visible; }
.admin-icon-only { width: 44px; min-width: 44px; }
.admin-button-count { background: var(--em-white); color: var(--em-navy); font-size: 1rem; height: auto; min-height: 24px; }
.exam-status .toggle, .exam-status .toggle.btn, .exam-status .toggle-group .btn, .exam-status .toggle-handle { height: 44px !important; min-height: 44px; max-height: none; }
.exam-status { height: auto; min-height: 44px; }
.admin-table-wrapper, .table-responsive { padding: 7px; }
.admin-table-wrapper:focus-visible { outline-offset: -3px !important; }
.dashboard-summary-card, .dashboard-stack-wrap, .dashboard-student-row, .dashboard-stat-column { background: var(--em-surface); border-color: var(--em-line); }
.dashboard-summary-card span, .dashboard-student-main span, .dashboard-student-metrics, .dashboard-question-list span, .dashboard-loading, .dashboard-empty, .dashboard-legend { color: var(--em-text); font-size: 1rem; }
.dashboard-stack { background: var(--em-gray); border: 1px solid var(--em-line); }
.dashboard-stack-segment + .dashboard-stack-segment { border-inline-start: 2px solid var(--em-white); }
.dashboard-stack-right { background: var(--em-success); }
.dashboard-stack-wrong { background: repeating-linear-gradient(45deg,var(--em-danger) 0 4px,var(--em-white) 4px 6px); }
.dashboard-stack-open { background: repeating-linear-gradient(90deg,var(--em-navy) 0 6px,var(--em-white) 6px 8px); }
.dashboard-stack-blank { background: var(--em-white); border: 1px dashed var(--em-navy); }
.edit-loading-card, .edit-loading-card::before, .edit-loading-overlay { background: var(--em-navy); color: var(--em-white); }
.edit-loading-card p, .edit-loading-progress { color: var(--em-white); opacity: 1; }
.question-move-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 8px; }
.exam-score-summary { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; margin: 0 0 16px; background: var(--em-surface); border: 1px solid var(--em-line); border-inline-start-width: 5px; }
.exam-score-summary.score-invalid { border-inline-start-color: var(--em-danger); }
.quiz-row { align-items: center; row-gap: 8px; margin-bottom: 8px; }
.quiz-delete-cell { display: flex; align-items: center; }
.quiz-delete-cell .quizDel { margin-top: 0 !important; }
@media (max-width: 900px) {
  .marketing-nav { flex-wrap: wrap; }
  .nav-actions { margin: 0; flex-wrap: wrap; }
  .nav-lang-select { display: none; }
  .brand-tools img { max-width: min(170px, 60vw); }
  .spec-hero-grid, .spec-tour, .spec-tour.reverse { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 576px) {
  .marketing-header .login-link { display: none; }
  .content { padding: 12px; }
  .marketing-nav { justify-content: center; }
  .brand-tools { flex: 0 1 auto; }
  .nav-actions { justify-content: center; }
  .student-exam-header .student-exam-title { display: block; }
  .spec-hero h1 { font-size: clamp(1.8rem,8vw,2.35rem); }
  .spec-card, .spec-screen-body { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  :where(a,button,input,select,textarea,summary,[tabindex]):focus-visible { outline-color: Highlight !important; }
  .btn, .badge, .dashboard-stack { border: 1px solid ButtonText !important; }
  .dashboard-stack-segment { forced-color-adjust: auto; }
}

/* Focus and text remain legible inside dark navigation and nested light controls. */
.header label { color: var(--em-white); }
:is(.header,.marketing-header) :is(input,select,.btn-color1,.btn-color2) { --em-focus: var(--em-white); --em-focus-gap: var(--em-navy); }
.footer .spec-footer-grid a { display: flex; min-height: 0; margin-bottom: 2px; }
.admin-top-nav .admin-lang-select { width: auto !important; max-width: 100% !important; flex: 0 1 180px; }
.ai-exam-dropzone input[type="file"] { display: block; width: 100%; max-width: 100%; min-height: 44px; }
.note-editor .note-toolbar { display: flex; flex-wrap: wrap; }
.note-editor .note-toolbar .note-btn-group { margin-inline: 0 5px; }
.note-editor .note-toolbar .note-dropdown-menu { max-width: 90vw; }

.ai-exam-dropzone input[type="file"] { position: static; inset: auto; width: 100%; height: auto; opacity: 1; }

/* Student exam: clear reading areas, compact status and native form controls. */
.header.fixed-top.student-exam-header { position: sticky; top: 0; z-index: 1030; }
.student-exam-header .student-status { flex-wrap: wrap; gap: 8px; }
.student-status #done { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; gap: 8px; }
.student-progress-count { display: grid; grid-template-rows: auto auto; padding: 0; font-size: .875rem; font-weight: 400; text-align: center; color: var(--em-white); background: transparent; border: 0; border-radius: 0; }
.student-question { margin-block: 28px; padding-block-end: 24px; border-bottom: 1px solid var(--em-line); }
.student-question-heading { font-size: 1.35rem; margin-block: 0 12px; }
.student-question .question-rc { background: var(--em-wheat); color: var(--em-navy); border-radius: 0; border-inline-start: 4px solid var(--em-orange); }
.student-question .question-rc img { display: block; max-width: 100%; height: auto; margin-block: 12px; }
.student-question .answer { margin-block-start: 20px; }
.student-question legend { font-size: 1rem; font-weight: 700; }
.student-question .form-check { display: flex; align-items: center; gap: 12px; padding: 6px 0; min-height: 44px; }
.student-question .form-check-input { position: static; flex: 0 0 24px; width: 24px; height: 24px; margin: 0; }
.student-question .form-check-label { display: flex; align-items: center; min-height: 44px; margin: 0; flex: 1; }
.student-question .note-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; }
.student-question .note-toolbar > .note-btn-group { margin: 0; }
.student-question .note-editable { min-height: 180px; }
.student-question-progress { position: sticky; top: 84px; z-index: 1020; margin-block: 16px; padding: 10px 14px; background: var(--em-navy); color: var(--em-white); font-weight: 700; text-align: center; }
.student-question-navigation { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-block: 20px; }
.student-question-navigation #review-submit { margin-inline-start: auto; }
.student-question-navigation button[disabled] { visibility: hidden; }
@media (max-width: 575px) {
  .student-exam-header .student-logo { display: none; }
  .student-exam-header .student-status { justify-content: flex-start; }
  .student-status #done { width: auto; min-width: 230px; }
  .student-question-progress { top: 72px; }
}

.student-exam-content #questions, .student-question { scroll-margin-block-start: 160px; }

/* Product-proof workflow surfaces: the teacher journey should read as a calm
   sequence of decisions, rather than a collection of default form controls. */
.exam-create-paths { gap:28px; align-items:stretch; }
.exam-create-path { padding:24px; border:1px solid var(--em-line); border-radius:14px; background:var(--em-surface); box-shadow:0 10px 26px rgba(20,33,61,.07); }
.exam-create-path-ai { border-top:5px solid var(--em-orange); }
.exam-create-path-manual { background:var(--em-panel); }
.exam-create-title { margin:0 0 4px; font-size:1.35rem; }
.exam-create-path .form-group:first-child { margin-top:0; }
.exam-create-path label { display:block; margin-bottom:7px; font-weight:750; }
.exam-create-path .ai-exam-controls { gap:16px; margin-top:16px; }
.exam-create-path .ai-exam-dropzone { margin:20px 0; padding:24px; border-radius:12px; border-style:dashed; }
.exam-create-path .ai-exam-dropzone strong { display:block; margin-bottom:6px; font-size:1.08rem; }
.exam-create-path #ai-exam-file-list { min-height:1.5rem; margin-top:12px!important; color:var(--em-text)!important; }
.exam-create-path #ai-exam-submit { min-height:48px; padding-inline:20px; font-weight:800; }
.exam-create-path #questions { margin-top:18px; padding:0; list-style:none; }
.exam-create-path li.sortable { margin:18px 0; padding:18px; border:1px solid var(--em-line); border-radius:12px; background:var(--em-surface); }
.exam-create-path .question-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.exam-create-path .question-editor { min-width:0; }
.exam-create-path .question_number { flex:0 0 auto; }
.results-page-heading { margin-bottom:12px; }
.results-release-panel { display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:14px 16px; border-radius:10px; }
.results-ai-action { display:inline-flex; }
.admin-results-table td, .admin-results-table th { vertical-align:middle; }
.review-page-heading { margin-bottom:12px; }
.review-student-code { display:inline-block; padding:14px 16px; border-radius:10px; }
.review-page-layout { padding-block:24px; }
.review-results-content { width:100%; max-width:800px; margin-inline:auto; }
.review-result-summary { margin-bottom:20px; }
.review-exam-title { margin:0 0 10px; font-size:clamp(1.4rem,2.4vw,1.85rem); line-height:1.2; }
.review-student-details { display:flex; flex-wrap:wrap; gap:0; margin:0 0 14px; color:var(--em-text); font-size:.82rem; }
.review-student-details > div { display:flex; align-items:baseline; }
.review-student-details > div + div::before { content:"·"; margin-inline:8px; color:var(--em-gray); }
.review-student-details dt { margin:0; margin-inline-end:4px; font-weight:600; color:var(--em-gray); }
.review-student-details dd { margin:0; }
.review-total-score { display:flex; flex-direction:column; gap:2px; margin:0; }
.review-total-score > span, .review-content-label, .review-grade-label { color:#334155; font-size:.78rem; font-weight:700; letter-spacing:.02em; text-transform:uppercase; }
.review-total-score strong { color:var(--em-navy); font-size:clamp(2rem,4vw,2.5rem); font-weight:800; line-height:1.05; font-variant-numeric:tabular-nums; }
.review-overall-feedback { margin-top:10px; color:var(--em-text); font-size:.98rem; line-height:1.55; }
.review-question-card { margin:0 0 16px; padding:18px 20px; border:1px solid var(--em-line); border-radius:12px; background:var(--em-surface); box-shadow:0 3px 10px rgba(20,33,61,.035); }
.review-question-header { display:flex; align-items:flex-start; gap:10px; margin-bottom:14px; }
.review-question-card .question_number { flex:0 0 30px; width:30px; height:30px; line-height:30px; border-radius:50%; font-size:.88rem; font-weight:800; }
.review-question-text { min-width:0; overflow-wrap:anywhere; padding-top:4px; color:var(--em-ink); font-size:1rem; font-weight:650; line-height:1.45; }
.review-question-text img, .review-question-card .answer-rc img { display:block; max-inline-size:100%; height:auto; }
.review-answer-section, .review-feedback { margin-top:12px; }
.review-answer-section:first-of-type { margin-top:0; }
.review-content-label { margin-bottom:5px; }
.review-question-card .answer-rc { padding:10px 12px; border:0; border-radius:8px; background:var(--em-panel); color:var(--em-ink); font-size:.94rem; line-height:1.5; }
.review-question-card .answer-rc :is(p,ul,ol) { margin:0; }
.review-question-card .answer-rc ul { padding-inline-start:1.25rem; }
.review-question-card .answer-rc li + li { margin-top:4px; }
.review-option-selected { padding:2px 6px; margin-inline:-6px; border-radius:5px; font-weight:700; }
.review-option-correct { color:#216b42; background:#e8f5ec; }
.review-option-incorrect { color:#9f1239; background:#fff1f2; }
.review-option-partial { color:#8a5700; background:#fff7df; }
.review-option-status { display:inline-flex; vertical-align:text-bottom; margin-inline-start:6px; }
.review-option-status .tabler-icon { width:1.1em; height:1.1em; }
.review-correct-label { display:inline-block; margin-inline-start:6px; font-size:.78rem; font-weight:800; text-transform:uppercase; }
.review-feedback .remark-rc { padding:10px 12px; border:0; border-radius:8px; background:#eef7f0; color:#1f5135; font-size:.92rem; line-height:1.45; }
.review-result-overview { display:grid; grid-template-columns:minmax(150px,.35fr) minmax(0,1fr); gap:18px; align-items:stretch; margin:0 0 14px; }
.review-result-overview .review-total-score { margin:0; }
.review-result-overview .review-overall-feedback { align-self:center; margin:0; }
.review-question-footer { display:flex; align-items:center; justify-content:flex-end; gap:8px; margin-top:14px; }
.review-question-footer .grade-rc { padding:5px 9px; border-radius:999px; background:var(--em-apricot); color:var(--em-navy); font-size:.9rem; font-weight:800; line-height:1.25; font-variant-numeric:tabular-nums; text-align:center; }
.admin-main .review-question-card .answer-rc { border-inline-start:4px solid var(--em-navy); }
.review-ai-suggestion { margin-bottom:0; border-inline-start:4px solid var(--em-orange); background:var(--em-wheat); color:var(--em-navy); }
.student-start-content { max-width:820px; margin-inline:auto; }
.student-start-content #exam_name { margin-bottom:18px; }
.student-score-code-panel { padding:16px 18px; border-inline-start:5px solid var(--em-orange); border-radius:10px; }
.student-start-panel { padding:26px; border-radius:14px; box-shadow:0 12px 26px rgba(20,33,61,.08); }
.student-start-panel #start-exam { min-height:48px; padding-inline:22px; font-weight:800; }
.dashboard-overview { padding:22px; border:1px solid var(--em-line); border-radius:14px; background:var(--em-surface); box-shadow:0 10px 26px rgba(20,33,61,.07); }
.dashboard-question-stats { margin-top:24px; }
@media (max-width:576px) {
 .review-page-layout { padding-block:16px; }
 .review-results-content { padding-inline:4px; }
 .review-exam-title { font-size:1.45rem; }
 .exam-create-path { padding:18px; }
 .review-question-card { padding:16px; }
 .review-result-overview { grid-template-columns:1fr; gap:12px; }
 .student-start-panel { padding:20px; }
}

/* Public card rhythm: all CTAs sit on a common baseline without changing link semantics. */
.pricing-grid { align-items:stretch; }
.pricing-grid .pricing-card { display:flex; flex-direction:column; min-height:100%; padding:26px; }
.pricing-card .card-icon { display:grid; place-items:center; width:48px; height:48px; margin-block-end:16px; border-radius:50%; color:var(--em-navy); background:var(--em-wheat); }
.pricing-card .card-title { min-height:2.7rem; margin:0; font-size:1.35rem; line-height:1.25; }
.pricing-card .spec-price { min-height:3.4rem; margin:12px 0 14px; font-variant-numeric:tabular-nums; }
.pricing-card .card-copy { margin:0 0 12px; }
.pricing-card .card-detail { min-height:3.2rem; margin:0 0 20px; }
.pricing-card .plan-action { display:inline-flex; align-items:center; justify-content:center; gap:8px; width:100%; margin-top:auto; }
.pricing-card .plan-action .tabler-icon { flex:0 0 auto; width:20px; height:20px; }
.related-card { display:flex; flex-direction:column; height:100%; padding:20px; overflow:hidden; }
.related-card h3 { min-height:0; margin:0 0 10px; font-size:1.2rem; line-height:1.25; }
.related-card-title, .related-card-more { color:var(--em-text); text-decoration:none; }
.related-card-title:hover, .related-card-title:focus-visible { color:var(--em-text); text-decoration:underline; text-underline-offset:4px; }
.related-card p { margin:0; }
.related-card-more { display:flex; justify-content:flex-end; margin-top:auto; padding-top:14px; }
.related-card-more:hover, .related-card-more:focus-visible { color:var(--em-text); }
.related-card-more .tabler-icon { width:22px; height:22px; }
.nav-links a[aria-current="page"] { color:var(--em-orange); text-decoration:underline; text-decoration-thickness:2px; text-underline-offset:6px; }
.student-nav-icon { display:inline-flex; align-items:center; justify-content:center; }
html[dir="rtl"] :is(.plan-action .tabler-icon,.related-card-more .tabler-icon,.student-nav-icon .tabler-icon) { transform:scaleX(-1); }

/* Auth screens use the same readable, bounded card treatment as the teacher workspace. */
.app-auth-card { margin-block:28px; padding:28px; background:var(--em-surface); border:1px solid var(--em-line); border-radius:10px; box-shadow:0 10px 24px rgba(20,33,61,.08); }
.app-auth-card h1 { margin-block-end:24px; }
.app-auth-card .form-group { margin-block-end:18px; }
.app-auth-card .form-group > .form-group { margin-block-end:0; }
.app-auth-card .btn[type="submit"], .app-auth-card input[type="submit"] { width:100% !important; max-width:22rem; }

@media (max-width:767px) {
  .marketing-header .marketing-nav { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px 14px; justify-content:initial; }
  .marketing-header .nav-links { grid-column:1 / -1; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:2px 8px; width:100%; }
  .marketing-header .nav-links a { justify-content:center; text-align:center; font-size:.92rem; }
  .marketing-header .brand-tools { justify-content:flex-end; }
  .pricing-card .card-title, .related-card h3 { min-height:auto; }
  .pricing-card .card-detail { min-height:0; }
  .pricing-card .plan-action { min-height:48px; }
  .app-auth-card { padding:20px; margin-inline:-4px; }
}

/* Review summary hierarchy and score alignment. */
.review-exam-title { font-size:clamp(1.65rem,3vw,2.4rem); line-height:1.2; margin-bottom:24px; }
.review-student-details { display:flex; flex-wrap:wrap; gap:12px 36px; margin:0 0 20px; }
.review-student-details dt { color:var(--em-navy); font-size:.875rem; font-weight:600; }
.review-student-details dd { font-size:1.125rem; font-weight:600; margin:2px 0 0; }
.review-total-score { display:inline-flex; align-items:center; gap:20px; padding:12px 20px; background:var(--em-apricot); border-radius:10px; }
.review-total-score > span { font-size:1rem; font-weight:600; }
.review-total-score > strong { font-size:2rem; line-height:1.2; }
.review-question-card .grade-rc, .review-question-card .review-grade-label { text-align:center; }

/* Screenshot feedback: status must not change the sticky header height. */
.header.student-exam-header .student-status { position:static; }
.header.student-exam-header #saving {
  position:absolute; top:calc(100% + 6px); left:50%; transform:translateX(-50%);
  z-index:1; padding:8px 14px; color:var(--em-navy) !important;
  pointer-events:none; white-space:nowrap;
}
.bootbox .modal-header .bootbox-close-button {
  display:inline-flex; align-items:center; justify-content:center;
  flex:0 0 44px; width:44px; height:44px; margin:0 0 0 auto;
  padding:0; border:0; background:transparent !important; color:var(--em-text);
  opacity:1; box-shadow:none;
}
.bootbox .bootbox-close-button .tabler-icon { width:22px; height:22px; }
.spec-hero.home .spec-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.spec-hero.home .spec-actions > a { width:100%; text-align:center; white-space:normal; }
@media (max-width:575px) {
  .header.student-exam-header > .col-sm-6 { justify-content:center; text-align:center; }
  .header.student-exam-header .student-exam-title { flex-basis:100%; text-align:center; }
  .header.student-exam-header .student-status { justify-content:center; text-align:center; }
  .header.student-exam-header #done { width:100%; justify-content:center; }
  .spec-hero.home .spec-actions { grid-template-columns:minmax(0,1fr); }
}

.bootbox .modal-header { direction:ltr; }
html[dir="rtl"] .bootbox .modal-title { direction:rtl; text-align:right; }

.admin-main.review-results-content { max-width:800px; margin-inline:auto; }
.review-question-footer .review-grade-input { width:6rem; text-align:center; }
.admin-main .review-result-overview .review-total-score { align-self:start; }
.admin-main.review-results-content .review-question-card .answer-rc { border-inline-start:0; }
.admin-main.review-results-content > .review-total-score { margin-bottom:16px; }
