/* =========================================================
   AD ASTRA EDUCARE — CONSOLIDATED FINAL CLEAN LAYER
   Built from existing final V8.11–V8.12.24 patch layers in original load order.
   Purpose: preserve same visual experience while removing stacked stylesheet includes.
   ========================================================= */


/* ===== BEGIN zz-v8-11-equation-editor.css ===== */
/* =====================================================
   V8.12 DEEP PORTAL COLOR CLEANUP
   Scope: only pages with body.portal-theme (Admin + Student portals).
   Goal: remove remaining white/light frames, cards, modal layers, table
   cells and inline authoring surfaces without touching Home/public pages.
   ===================================================== */
body.portal-theme{
  --portal-page-bg:#04080f!important;
  --portal-page-bg-2:#071121!important;
  --portal-card-bg:linear-gradient(180deg,rgba(8,15,30,.98),rgba(12,24,48,.92))!important;
  --portal-card-bg-hover:linear-gradient(180deg,rgba(12,24,48,.98),rgba(19,35,63,.94))!important;
  --portal-input-bg:rgba(4,8,15,.88)!important;
  --portal-soft-bg:rgba(242,223,170,.07)!important;
  --portal-soft-bg-2:rgba(240,192,64,.12)!important;
  --portal-border:rgba(240,192,64,.28)!important;
  --portal-border-soft:rgba(240,192,64,.16)!important;
  --portal-text:#f2dfaa!important;
  --portal-muted:rgba(242,223,170,.72)!important;
  --portal-gold:#f0c040!important;
  --portal-gold-dark:#c9961a!important;
  --portal-dark:#04080f!important;
  background:#04080f!important;
  color:var(--portal-text)!important;
}
body.portal-theme,
body.portal-theme .app-shell,
body.portal-theme .admin-shell,
body.portal-theme .student-shell,
body.portal-theme .exam-window-shell,
body.portal-theme .app-main,
body.portal-theme main,
body.portal-theme section,
body.portal-theme .page,
body.portal-theme .content,
body.portal-theme .main-content{
  background-color:transparent!important;
  color:var(--portal-text)!important;
}
body.portal-theme::before{background:radial-gradient(circle at 15% 0%,rgba(240,192,64,.10),transparent 28%),radial-gradient(circle at 85% 8%,rgba(59,130,246,.12),transparent 30%),linear-gradient(180deg,#04080f 0%,#071121 52%,#04080f 100%)!important;}

/* Cards, frames, panels and white boxes */
body.portal-theme .panel,
body.portal-theme .card,
body.portal-theme .white-card,
body.portal-theme .form-card,
body.portal-theme .login-card,
body.portal-theme .portal-box,
body.portal-theme .dashboard-card,
body.portal-theme .dashboard-banner,
body.portal-theme .stat-card,
body.portal-theme .stats-tile,
body.portal-theme .quick-admin-card,
body.portal-theme .quick-link,
body.portal-theme .gateway-card,
body.portal-theme .info-card,
body.portal-theme .mini-panel,
body.portal-theme .panel-subtle,
body.portal-theme .table-wrap,
body.portal-theme .content-card,
body.portal-theme .app-card,
body.portal-theme .student-card,
body.portal-theme .payment-card,
body.portal-theme .lesson-card,
body.portal-theme .result-card,
body.portal-theme .exam-card,
body.portal-theme .summary-card,
body.portal-theme .question-card,
body.portal-theme .question-review-card,
body.portal-theme .question-preview-card,
body.portal-theme .question-preview-card-live,
body.portal-theme .complete-option-preview-card,
body.portal-theme .rich-field-card,
body.portal-theme .rich-preview-card,
body.portal-theme .editor-card,
body.portal-theme .question-premium-panel,
body.portal-theme .preview-panel,
body.portal-theme .preview-box,
body.portal-theme .preview-card,
body.portal-theme .preview-box,
body.portal-theme .preview-panel,
body.portal-theme .math-input,
body.portal-theme .math-preview,
body.portal-theme .math-preview-card,
body.portal-theme .math-authoring-card,
body.portal-theme .math-live-wrap,
body.portal-theme .math-preview-sheet,
body.portal-theme .upload-box,
body.portal-theme .diagram-preview,
body.portal-theme .question-media,
body.portal-theme .question-diagram,
body.portal-theme .inline-render-box,
body.portal-theme .matrix-box,
body.portal-theme .q-modal-card,
body.portal-theme .modal-box,
body.portal-theme .nta-layout,
body.portal-theme .nta-shell,
body.portal-theme .nta-question-card,
body.portal-theme .nta-question-surface,
body.portal-theme .nta-question-header,
body.portal-theme .nta-option-item,
body.portal-theme .nta-timer-panel,
body.portal-theme .nta-candidate-card,
body.portal-theme .nta-count-box,
body.portal-theme .exam-sidebar-card,
body.portal-theme .palette-card,
body.portal-theme .exam-sticky,
body.portal-theme .exam-shell,
body.portal-theme .exam-layout-shell,
body.portal-theme .heatmap-item,
body.portal-theme .ai-review-item,
body.portal-theme .v82-mini-event,
body.portal-theme .review-option{
  background:var(--portal-card-bg)!important;
  background-color:rgba(8,15,30,.96)!important;
  border-color:var(--portal-border)!important;
  color:var(--portal-text)!important;
  box-shadow:0 18px 48px rgba(0,0,0,.38)!important;
}
body.portal-theme .panel:hover,
body.portal-theme .quick-admin-card:hover,
body.portal-theme .info-card:hover,
body.portal-theme .preview-panel:hover,
body.portal-theme .nta-option-item:hover{
  background:var(--portal-card-bg-hover)!important;
  border-color:rgba(240,192,64,.52)!important;
}

/* Question Bank modal and editor hard cleanup */
body.portal-theme .q-modal{background:rgba(4,8,15,.76)!important;backdrop-filter:blur(12px)!important;}
body.portal-theme .q-modal-head h3,
body.portal-theme .q-modal-card h1,
body.portal-theme .q-modal-card h2,
body.portal-theme .q-modal-card h3,
body.portal-theme .q-modal-card h4{color:var(--portal-text)!important;}
body.portal-theme .toolbar-grid-premium .toolbar-btn,
body.portal-theme .q-modal-card .toolbar-btn,
body.portal-theme .btn-soft,
body.portal-theme #hide-keyboard-btn,
body.portal-theme #copy-latex-btn,
body.portal-theme #openEquationEditorTop{
  background:var(--portal-soft-bg)!important;
  border-color:var(--portal-border)!important;
  color:var(--portal-text)!important;
  box-shadow:none!important;
}
body.portal-theme .toolbar-grid-premium .toolbar-btn:hover,
body.portal-theme .q-modal-card .toolbar-btn:hover,
body.portal-theme .btn-soft:hover{
  background:var(--portal-soft-bg-2)!important;
  border-color:rgba(240,192,64,.52)!important;
  color:var(--portal-gold)!important;
}
body.portal-theme .close-x,
body.portal-theme .nta-modal-close{
  width:46px!important;height:46px!important;
  background:var(--portal-soft-bg)!important;
  border-color:var(--portal-border)!important;
  color:var(--portal-text)!important;
  box-shadow:none!important;
  line-height:1!important;
}
body.portal-theme .v811-build-badge{background:rgba(240,192,64,.12)!important;color:var(--portal-gold)!important;border-color:var(--portal-border)!important;}

/* Forms, selects, math fields, search boxes */
body.portal-theme input,
body.portal-theme select,
body.portal-theme textarea,
body.portal-theme math-field,
body.portal-theme .form-control,
body.portal-theme .form-select,
body.portal-theme .premium-input,
body.portal-theme .premium-select,
body.portal-theme .premium-textarea,
body.portal-theme .target-select,
body.portal-theme .search-input,
body.portal-theme #visual-math-field,
body.portal-theme #sharedEquationPreview,
body.portal-theme #sharedEquationLatex{
  background:var(--portal-input-bg)!important;
  background-color:rgba(4,8,15,.88)!important;
  border-color:var(--portal-border)!important;
  color:var(--portal-text)!important;
  box-shadow:none!important;
}
body.portal-theme input:focus,
body.portal-theme select:focus,
body.portal-theme textarea:focus,
body.portal-theme math-field:focus,
body.portal-theme .premium-input:focus,
body.portal-theme .premium-select:focus,
body.portal-theme .premium-textarea:focus,
body.portal-theme .target-select:focus{
  border-color:rgba(240,192,64,.58)!important;
  box-shadow:0 0 0 4px rgba(240,192,64,.12)!important;
}
body.portal-theme input::placeholder,
body.portal-theme textarea::placeholder{color:rgba(242,223,170,.46)!important;}
body.portal-theme option,
body.portal-theme select option,
body.portal-theme .premium-select option,
body.portal-theme .q-modal-card select option{background:#08111f!important;color:var(--portal-text)!important;}
body.portal-theme label,
body.portal-theme .premium-label{color:var(--portal-gold)!important;}

/* Tables */
body.portal-theme table,
body.portal-theme .data-table,
body.portal-theme .saved-table,
body.portal-theme .matrix-table{background:transparent!important;color:var(--portal-text)!important;border-color:var(--portal-border-soft)!important;}
body.portal-theme th,
body.portal-theme .data-table th,
body.portal-theme .saved-table th,
body.portal-theme .matrix-table th{
  background:rgba(240,192,64,.10)!important;
  color:var(--portal-gold)!important;
  border-color:var(--portal-border)!important;
}
body.portal-theme td,
body.portal-theme .data-table td,
body.portal-theme .saved-table td,
body.portal-theme .matrix-table td{
  background:rgba(8,15,30,.52)!important;
  color:var(--portal-text)!important;
  border-color:rgba(240,192,64,.12)!important;
}
body.portal-theme tr:nth-child(even) td,
body.portal-theme .data-table tr:nth-child(even) td{background:rgba(12,24,48,.58)!important;}
body.portal-theme tr:hover td,
body.portal-theme .table-wrap table tr:hover td,
body.portal-theme .saved-table tr:hover td{background:rgba(240,192,64,.08)!important;}

/* Text and small utility colors */
body.portal-theme h1,
body.portal-theme h2,
body.portal-theme h3,
body.portal-theme h4,
body.portal-theme h5,
body.portal-theme .page-title,
body.portal-theme .section-title,
body.portal-theme .card-title,
body.portal-theme .sidebar-title,
body.portal-theme .admin-intro-title,
body.portal-theme .stat-card strong,
body.portal-theme .mini-panel h4{color:var(--portal-text)!important;}
body.portal-theme p,
body.portal-theme li,
body.portal-theme small,
body.portal-theme .muted,
body.portal-theme .muted-2,
body.portal-theme .small-muted,
body.portal-theme .light-muted,
body.portal-theme .text-muted,
body.portal-theme .text-small,
body.portal-theme .math-helper,
body.portal-theme .admin-intro-copy,
body.portal-theme .section-subtitle,
body.portal-theme .exam-meta{color:var(--portal-muted)!important;}
body.portal-theme .tag,
body.portal-theme .pill,
body.portal-theme .badge,
body.portal-theme .chip,
body.portal-theme .inline-chip,
body.portal-theme .status-chip,
body.portal-theme .badge-soft,
body.portal-theme .test-type,
body.portal-theme .choice-chip,
body.portal-theme .nta-meta-chip,
body.portal-theme .review-status,
body.portal-theme .proctor-chip{
  background:rgba(240,192,64,.12)!important;
  border-color:var(--portal-border)!important;
  color:var(--portal-gold)!important;
}

/* Navigation and buttons */
body.portal-theme #navbar,
body.portal-theme .mobile-menu,
body.portal-theme .app-sidebar{background:linear-gradient(180deg,rgba(4,8,15,.98),rgba(8,15,30,.96))!important;border-color:var(--portal-border)!important;color:var(--portal-text)!important;}
body.portal-theme .app-sidebar a,
body.portal-theme .sidebar-links a{background:var(--portal-soft-bg)!important;border-color:var(--portal-border-soft)!important;color:var(--portal-text)!important;}
body.portal-theme .app-sidebar a:hover,
body.portal-theme .app-sidebar a.active,
body.portal-theme .app-sidebar a.current,
body.portal-theme .sidebar-links a:hover,
body.portal-theme .sidebar-links a.active,
body.portal-theme .btn-gold,
body.portal-theme .btn-primary,
body.portal-theme .btn-primary-strong,
body.portal-theme .btn-warning,
body.portal-theme .nta-btn-primary,
body.portal-theme #submitExamBtn{
  background:linear-gradient(135deg,#c9961a 0%,#f0c040 62%,#ffe37a 100%)!important;
  color:#04080f!important;
  border-color:rgba(255,227,122,.55)!important;
  box-shadow:0 12px 28px rgba(201,150,26,.22)!important;
}
body.portal-theme .btn-outline,
body.portal-theme .btn-ghost,
body.portal-theme .btn-secondary{
  background:var(--portal-soft-bg)!important;
  color:var(--portal-text)!important;
  border-color:var(--portal-border)!important;
  box-shadow:none!important;
}
body.portal-theme .btn-outline:hover,
body.portal-theme .btn-ghost:hover,
body.portal-theme .btn-secondary:hover{background:var(--portal-soft-bg-2)!important;color:var(--portal-gold)!important;border-color:rgba(240,192,64,.52)!important;}

/* Images/snapshots/media should not sit on white plates */
body.portal-theme img,
body.portal-theme .snapshot-frame,
body.portal-theme .question-preview-card-live img,
body.portal-theme .editor-card img,
body.portal-theme .question-media img{background:transparent!important;}
body.portal-theme .empty{background:rgba(242,223,170,.04)!important;border-color:var(--portal-border)!important;color:var(--portal-muted)!important;}

/* Preserve CBT palette meaning */
body.portal-theme .answered{background:#16a34a!important;color:#fff!important;border-color:#16a34a!important;}
body.portal-theme .marked-review{background:#7c3aed!important;color:#fff!important;border-color:#7c3aed!important;}
body.portal-theme .answered-review{background:#2563eb!important;color:#fff!important;border-color:#2563eb!important;}
body.portal-theme .not-answered{background:#dc2626!important;color:#fff!important;border-color:#dc2626!important;}
body.portal-theme .not-visited{background:#e5e7eb!important;color:#111827!important;border-color:#cbd5e1!important;}

/* ===== END zz-v8-11-equation-editor.css ===== */


/* ===== BEGIN zz-v8-12-deep-portal-clean.css ===== */
/* =====================================================
   V8.12 DEEP PORTAL COLOR CLEANUP
   Scope: only pages with body.portal-theme (Admin + Student portals).
   Goal: remove remaining white/light frames, cards, modal layers, table
   cells and inline authoring surfaces without touching Home/public pages.
   ===================================================== */
body.portal-theme{
  --portal-page-bg:#04080f!important;
  --portal-page-bg-2:#071121!important;
  --portal-card-bg:linear-gradient(180deg,rgba(8,15,30,.98),rgba(12,24,48,.92))!important;
  --portal-card-bg-hover:linear-gradient(180deg,rgba(12,24,48,.98),rgba(19,35,63,.94))!important;
  --portal-input-bg:rgba(4,8,15,.88)!important;
  --portal-soft-bg:rgba(242,223,170,.07)!important;
  --portal-soft-bg-2:rgba(240,192,64,.12)!important;
  --portal-border:rgba(240,192,64,.28)!important;
  --portal-border-soft:rgba(240,192,64,.16)!important;
  --portal-text:#f2dfaa!important;
  --portal-muted:rgba(242,223,170,.72)!important;
  --portal-gold:#f0c040!important;
  --portal-gold-dark:#c9961a!important;
  --portal-dark:#04080f!important;
  background:#04080f!important;
  color:var(--portal-text)!important;
}
body.portal-theme,
body.portal-theme .app-shell,
body.portal-theme .admin-shell,
body.portal-theme .student-shell,
body.portal-theme .exam-window-shell,
body.portal-theme .app-main,
body.portal-theme main,
body.portal-theme section,
body.portal-theme .page,
body.portal-theme .content,
body.portal-theme .main-content{
  background-color:transparent!important;
  color:var(--portal-text)!important;
}
body.portal-theme::before{background:radial-gradient(circle at 15% 0%,rgba(240,192,64,.10),transparent 28%),radial-gradient(circle at 85% 8%,rgba(59,130,246,.12),transparent 30%),linear-gradient(180deg,#04080f 0%,#071121 52%,#04080f 100%)!important;}

/* Cards, frames, panels and white boxes */
body.portal-theme .panel,
body.portal-theme .card,
body.portal-theme .white-card,
body.portal-theme .form-card,
body.portal-theme .login-card,
body.portal-theme .portal-box,
body.portal-theme .dashboard-card,
body.portal-theme .dashboard-banner,
body.portal-theme .stat-card,
body.portal-theme .stats-tile,
body.portal-theme .quick-admin-card,
body.portal-theme .quick-link,
body.portal-theme .gateway-card,
body.portal-theme .info-card,
body.portal-theme .mini-panel,
body.portal-theme .panel-subtle,
body.portal-theme .table-wrap,
body.portal-theme .content-card,
body.portal-theme .app-card,
body.portal-theme .student-card,
body.portal-theme .payment-card,
body.portal-theme .lesson-card,
body.portal-theme .result-card,
body.portal-theme .exam-card,
body.portal-theme .summary-card,
body.portal-theme .question-card,
body.portal-theme .question-review-card,
body.portal-theme .question-preview-card,
body.portal-theme .question-preview-card-live,
body.portal-theme .complete-option-preview-card,
body.portal-theme .rich-field-card,
body.portal-theme .rich-preview-card,
body.portal-theme .editor-card,
body.portal-theme .question-premium-panel,
body.portal-theme .preview-panel,
body.portal-theme .preview-box,
body.portal-theme .preview-card,
body.portal-theme .preview-box,
body.portal-theme .preview-panel,
body.portal-theme .math-input,
body.portal-theme .math-preview,
body.portal-theme .math-preview-card,
body.portal-theme .math-authoring-card,
body.portal-theme .math-live-wrap,
body.portal-theme .math-preview-sheet,
body.portal-theme .upload-box,
body.portal-theme .diagram-preview,
body.portal-theme .question-media,
body.portal-theme .question-diagram,
body.portal-theme .inline-render-box,
body.portal-theme .matrix-box,
body.portal-theme .q-modal-card,
body.portal-theme .modal-box,
body.portal-theme .nta-layout,
body.portal-theme .nta-shell,
body.portal-theme .nta-question-card,
body.portal-theme .nta-question-surface,
body.portal-theme .nta-question-header,
body.portal-theme .nta-option-item,
body.portal-theme .nta-timer-panel,
body.portal-theme .nta-candidate-card,
body.portal-theme .nta-count-box,
body.portal-theme .exam-sidebar-card,
body.portal-theme .palette-card,
body.portal-theme .exam-sticky,
body.portal-theme .exam-shell,
body.portal-theme .exam-layout-shell,
body.portal-theme .heatmap-item,
body.portal-theme .ai-review-item,
body.portal-theme .v82-mini-event,
body.portal-theme .review-option{
  background:var(--portal-card-bg)!important;
  background-color:rgba(8,15,30,.96)!important;
  border-color:var(--portal-border)!important;
  color:var(--portal-text)!important;
  box-shadow:0 18px 48px rgba(0,0,0,.38)!important;
}
body.portal-theme .panel:hover,
body.portal-theme .quick-admin-card:hover,
body.portal-theme .info-card:hover,
body.portal-theme .preview-panel:hover,
body.portal-theme .nta-option-item:hover{
  background:var(--portal-card-bg-hover)!important;
  border-color:rgba(240,192,64,.52)!important;
}

/* Question Bank modal and editor hard cleanup */
body.portal-theme .q-modal{background:rgba(4,8,15,.76)!important;backdrop-filter:blur(12px)!important;}
body.portal-theme .q-modal-head h3,
body.portal-theme .q-modal-card h1,
body.portal-theme .q-modal-card h2,
body.portal-theme .q-modal-card h3,
body.portal-theme .q-modal-card h4{color:var(--portal-text)!important;}
body.portal-theme .toolbar-grid-premium .toolbar-btn,
body.portal-theme .q-modal-card .toolbar-btn,
body.portal-theme .btn-soft,
body.portal-theme #hide-keyboard-btn,
body.portal-theme #copy-latex-btn,
body.portal-theme #openEquationEditorTop{
  background:var(--portal-soft-bg)!important;
  border-color:var(--portal-border)!important;
  color:var(--portal-text)!important;
  box-shadow:none!important;
}
body.portal-theme .toolbar-grid-premium .toolbar-btn:hover,
body.portal-theme .q-modal-card .toolbar-btn:hover,
body.portal-theme .btn-soft:hover{
  background:var(--portal-soft-bg-2)!important;
  border-color:rgba(240,192,64,.52)!important;
  color:var(--portal-gold)!important;
}
body.portal-theme .close-x,
body.portal-theme .nta-modal-close{
  width:46px!important;height:46px!important;
  background:var(--portal-soft-bg)!important;
  border-color:var(--portal-border)!important;
  color:var(--portal-text)!important;
  box-shadow:none!important;
  line-height:1!important;
}
body.portal-theme .v811-build-badge{background:rgba(240,192,64,.12)!important;color:var(--portal-gold)!important;border-color:var(--portal-border)!important;}

/* Forms, selects, math fields, search boxes */
body.portal-theme input,
body.portal-theme select,
body.portal-theme textarea,
body.portal-theme math-field,
body.portal-theme .form-control,
body.portal-theme .form-select,
body.portal-theme .premium-input,
body.portal-theme .premium-select,
body.portal-theme .premium-textarea,
body.portal-theme .target-select,
body.portal-theme .search-input,
body.portal-theme #visual-math-field,
body.portal-theme #sharedEquationPreview,
body.portal-theme #sharedEquationLatex{
  background:var(--portal-input-bg)!important;
  background-color:rgba(4,8,15,.88)!important;
  border-color:var(--portal-border)!important;
  color:var(--portal-text)!important;
  box-shadow:none!important;
}
body.portal-theme input:focus,
body.portal-theme select:focus,
body.portal-theme textarea:focus,
body.portal-theme math-field:focus,
body.portal-theme .premium-input:focus,
body.portal-theme .premium-select:focus,
body.portal-theme .premium-textarea:focus,
body.portal-theme .target-select:focus{
  border-color:rgba(240,192,64,.58)!important;
  box-shadow:0 0 0 4px rgba(240,192,64,.12)!important;
}
body.portal-theme input::placeholder,
body.portal-theme textarea::placeholder{color:rgba(242,223,170,.46)!important;}
body.portal-theme option,
body.portal-theme select option,
body.portal-theme .premium-select option,
body.portal-theme .q-modal-card select option{background:#08111f!important;color:var(--portal-text)!important;}
body.portal-theme label,
body.portal-theme .premium-label{color:var(--portal-gold)!important;}

/* Tables */
body.portal-theme table,
body.portal-theme .data-table,
body.portal-theme .saved-table,
body.portal-theme .matrix-table{background:transparent!important;color:var(--portal-text)!important;border-color:var(--portal-border-soft)!important;}
body.portal-theme th,
body.portal-theme .data-table th,
body.portal-theme .saved-table th,
body.portal-theme .matrix-table th{
  background:rgba(240,192,64,.10)!important;
  color:var(--portal-gold)!important;
  border-color:var(--portal-border)!important;
}
body.portal-theme td,
body.portal-theme .data-table td,
body.portal-theme .saved-table td,
body.portal-theme .matrix-table td{
  background:rgba(8,15,30,.52)!important;
  color:var(--portal-text)!important;
  border-color:rgba(240,192,64,.12)!important;
}
body.portal-theme tr:nth-child(even) td,
body.portal-theme .data-table tr:nth-child(even) td{background:rgba(12,24,48,.58)!important;}
body.portal-theme tr:hover td,
body.portal-theme .table-wrap table tr:hover td,
body.portal-theme .saved-table tr:hover td{background:rgba(240,192,64,.08)!important;}

/* Text and small utility colors */
body.portal-theme h1,
body.portal-theme h2,
body.portal-theme h3,
body.portal-theme h4,
body.portal-theme h5,
body.portal-theme .page-title,
body.portal-theme .section-title,
body.portal-theme .card-title,
body.portal-theme .sidebar-title,
body.portal-theme .admin-intro-title,
body.portal-theme .stat-card strong,
body.portal-theme .mini-panel h4{color:var(--portal-text)!important;}
body.portal-theme p,
body.portal-theme li,
body.portal-theme small,
body.portal-theme .muted,
body.portal-theme .muted-2,
body.portal-theme .small-muted,
body.portal-theme .light-muted,
body.portal-theme .text-muted,
body.portal-theme .text-small,
body.portal-theme .math-helper,
body.portal-theme .admin-intro-copy,
body.portal-theme .section-subtitle,
body.portal-theme .exam-meta{color:var(--portal-muted)!important;}
body.portal-theme .tag,
body.portal-theme .pill,
body.portal-theme .badge,
body.portal-theme .chip,
body.portal-theme .inline-chip,
body.portal-theme .status-chip,
body.portal-theme .badge-soft,
body.portal-theme .test-type,
body.portal-theme .choice-chip,
body.portal-theme .nta-meta-chip,
body.portal-theme .review-status,
body.portal-theme .proctor-chip{
  background:rgba(240,192,64,.12)!important;
  border-color:var(--portal-border)!important;
  color:var(--portal-gold)!important;
}

/* Navigation and buttons */
body.portal-theme #navbar,
body.portal-theme .mobile-menu,
body.portal-theme .app-sidebar{background:linear-gradient(180deg,rgba(4,8,15,.98),rgba(8,15,30,.96))!important;border-color:var(--portal-border)!important;color:var(--portal-text)!important;}
body.portal-theme .app-sidebar a,
body.portal-theme .sidebar-links a{background:var(--portal-soft-bg)!important;border-color:var(--portal-border-soft)!important;color:var(--portal-text)!important;}
body.portal-theme .app-sidebar a:hover,
body.portal-theme .app-sidebar a.active,
body.portal-theme .app-sidebar a.current,
body.portal-theme .sidebar-links a:hover,
body.portal-theme .sidebar-links a.active,
body.portal-theme .btn-gold,
body.portal-theme .btn-primary,
body.portal-theme .btn-primary-strong,
body.portal-theme .btn-warning,
body.portal-theme .nta-btn-primary,
body.portal-theme #submitExamBtn{
  background:linear-gradient(135deg,#c9961a 0%,#f0c040 62%,#ffe37a 100%)!important;
  color:#04080f!important;
  border-color:rgba(255,227,122,.55)!important;
  box-shadow:0 12px 28px rgba(201,150,26,.22)!important;
}
body.portal-theme .btn-outline,
body.portal-theme .btn-ghost,
body.portal-theme .btn-secondary{
  background:var(--portal-soft-bg)!important;
  color:var(--portal-text)!important;
  border-color:var(--portal-border)!important;
  box-shadow:none!important;
}
body.portal-theme .btn-outline:hover,
body.portal-theme .btn-ghost:hover,
body.portal-theme .btn-secondary:hover{background:var(--portal-soft-bg-2)!important;color:var(--portal-gold)!important;border-color:rgba(240,192,64,.52)!important;}

/* Images/snapshots/media should not sit on white plates */
body.portal-theme img,
body.portal-theme .snapshot-frame,
body.portal-theme .question-preview-card-live img,
body.portal-theme .editor-card img,
body.portal-theme .question-media img{background:transparent!important;}
body.portal-theme .empty{background:rgba(242,223,170,.04)!important;border-color:var(--portal-border)!important;color:var(--portal-muted)!important;}

/* Preserve CBT palette meaning */
body.portal-theme .answered{background:#16a34a!important;color:#fff!important;border-color:#16a34a!important;}
body.portal-theme .marked-review{background:#7c3aed!important;color:#fff!important;border-color:#7c3aed!important;}
body.portal-theme .answered-review{background:#2563eb!important;color:#fff!important;border-color:#2563eb!important;}
body.portal-theme .not-answered{background:#dc2626!important;color:#fff!important;border-color:#dc2626!important;}
body.portal-theme .not-visited{background:#e5e7eb!important;color:#111827!important;border-color:#cbd5e1!important;}

/* =====================================================
   V8.12.3 CLEAN CORRECTION (merged here, no new patch file)
   - Stop card/panel hover repainting in Admin/Student portals.
   - Force initial portal cards/forms to the Home-theme dark surface.
   - Restore readable Visual Equation Editor text on dark surfaces.
   ===================================================== */
body.portal-theme .panel,
body.portal-theme .panel:hover,
body.portal-theme .card,
body.portal-theme .card:hover,
body.portal-theme .form-card,
body.portal-theme .form-card:hover,
body.portal-theme .white-card,
body.portal-theme .white-card:hover,
body.portal-theme .content-card,
body.portal-theme .content-card:hover,
body.portal-theme .app-card,
body.portal-theme .app-card:hover,
body.portal-theme .student-card,
body.portal-theme .student-card:hover,
body.portal-theme .payment-card,
body.portal-theme .payment-card:hover,
body.portal-theme .dashboard-card,
body.portal-theme .dashboard-card:hover,
body.portal-theme .dashboard-banner,
body.portal-theme .dashboard-banner:hover,
body.portal-theme .stats-tile,
body.portal-theme .stats-tile:hover,
body.portal-theme .mini-panel,
body.portal-theme .mini-panel:hover,
body.portal-theme .info-card,
body.portal-theme .info-card:hover,
body.portal-theme .quick-admin-card,
body.portal-theme .quick-admin-card:hover,
body.portal-theme .quick-link,
body.portal-theme .quick-link:hover,
body.portal-theme .gateway-card,
body.portal-theme .gateway-card:hover,
body.portal-theme .table-wrap,
body.portal-theme .table-wrap:hover,
body.portal-theme .preview-panel,
body.portal-theme .preview-panel:hover,
body.portal-theme .preview-box,
body.portal-theme .preview-box:hover,
body.portal-theme .preview-card,
body.portal-theme .preview-card:hover,
body.portal-theme .question-preview-card,
body.portal-theme .question-preview-card:hover,
body.portal-theme .question-preview-card-live,
body.portal-theme .question-preview-card-live:hover,
body.portal-theme .complete-option-preview-card,
body.portal-theme .complete-option-preview-card:hover,
body.portal-theme .rich-field-card,
body.portal-theme .rich-field-card:hover,
body.portal-theme .rich-preview-card,
body.portal-theme .rich-preview-card:hover,
body.portal-theme .editor-card,
body.portal-theme .editor-card:hover,
body.portal-theme .q-modal-card,
body.portal-theme .q-modal-card:hover,
body.portal-theme .modal-box,
body.portal-theme .modal-box:hover{
  background:linear-gradient(180deg,rgba(8,18,35,.98),rgba(11,26,50,.96))!important;
  background-color:#081223!important;
  border-color:rgba(240,192,64,.34)!important;
  color:#f7e8b8!important;
  box-shadow:0 18px 48px rgba(0,0,0,.38)!important;
  transform:none!important;
  filter:none!important;
}

body.portal-theme .panel *,
body.portal-theme .card *,
body.portal-theme .form-card *,
body.portal-theme .content-card *,
body.portal-theme .app-card *,
body.portal-theme .student-card *,
body.portal-theme .payment-card *,
body.portal-theme .dashboard-card *,
body.portal-theme .dashboard-banner *,
body.portal-theme .q-modal-card *{
  text-shadow:none!important;
}

body.portal-theme .panel h1,
body.portal-theme .panel h2,
body.portal-theme .panel h3,
body.portal-theme .q-modal-card h1,
body.portal-theme .q-modal-card h2,
body.portal-theme .q-modal-card h3,
body.portal-theme .q-modal-card h4{
  color:#f7e8b8!important;
  opacity:1!important;
}

body.portal-theme .form-field[style],
body.portal-theme .form-field,
body.portal-theme .input-group,
body.portal-theme .checkbox-card,
body.portal-theme .toggle-card,
body.portal-theme .switch-card{
  background:transparent!important;
  color:#f7e8b8!important;
  border-color:rgba(240,192,64,.22)!important;
}
body.portal-theme .form-field input[type="checkbox"]{
  accent-color:#f0c040!important;
}
body.portal-theme .form-field label,
body.portal-theme label,
body.portal-theme .premium-label,
body.portal-theme .math-helper,
body.portal-theme .section-subtitle,
body.portal-theme .text-small,
body.portal-theme .muted{
  color:rgba(247,232,184,.84)!important;
  opacity:1!important;
}

/* No portal card/frame should change from white to blue on hover. */
body.portal-theme .panel:hover,
body.portal-theme .card:hover,
body.portal-theme .form-card:hover,
body.portal-theme .white-card:hover,
body.portal-theme .content-card:hover,
body.portal-theme .app-card:hover,
body.portal-theme .student-card:hover,
body.portal-theme .payment-card:hover,
body.portal-theme .dashboard-card:hover,
body.portal-theme .dashboard-banner:hover,
body.portal-theme .stats-tile:hover,
body.portal-theme .mini-panel:hover,
body.portal-theme .info-card:hover,
body.portal-theme .quick-admin-card:hover,
body.portal-theme .quick-link:hover,
body.portal-theme .gateway-card:hover,
body.portal-theme .table-wrap:hover,
body.portal-theme .preview-panel:hover,
body.portal-theme .preview-box:hover,
body.portal-theme .preview-card:hover,
body.portal-theme .question-preview-card:hover,
body.portal-theme .question-preview-card-live:hover,
body.portal-theme .complete-option-preview-card:hover,
body.portal-theme .q-modal-card:hover,
body.portal-theme .modal-box:hover{
  background:linear-gradient(180deg,rgba(8,18,35,.98),rgba(11,26,50,.96))!important;
  background-color:#081223!important;
  border-color:rgba(240,192,64,.34)!important;
}

/* Visual Equation Editor readability: Math input, Equation preview and Question preview. */
body.portal-theme .q-modal-card,
body.portal-theme .shared-equation-card,
body.portal-theme .math-editor-panel,
body.portal-theme .math-system-shell,
body.portal-theme .math-builder,
body.portal-theme .math-card,
body.portal-theme .math-system-card{
  background:linear-gradient(180deg,#071121 0%,#0b1a32 100%)!important;
  color:#f7e8b8!important;
  border-color:rgba(240,192,64,.36)!important;
}
body.portal-theme .math-live-wrap,
body.portal-theme #visual-math-field,
body.portal-theme math-field,
body.portal-theme .shared-math-editor,
body.portal-theme #sharedEquationPreview,
body.portal-theme #sharedEquationLatex,
body.portal-theme .math-preview,
body.portal-theme .math-preview-card,
body.portal-theme .math-preview-sheet,
body.portal-theme .equation-preview,
body.portal-theme .question-preview,
body.portal-theme .question-preview-card,
body.portal-theme .question-preview-card-live,
body.portal-theme .complete-option-preview-card,
body.portal-theme .admin-nta-preview,
body.portal-theme .nta-question-preview,
body.portal-theme .nta-preview-shell,
body.portal-theme .inline-render-box,
body.portal-theme .preview-box,
body.portal-theme #question-preview-box{
  background:#081223!important;
  background-color:#081223!important;
  color:#f7e8b8!important;
  border-color:rgba(240,192,64,.34)!important;
  opacity:1!important;
}
body.portal-theme .math-live-wrap *,
body.portal-theme #visual-math-field,
body.portal-theme #visual-math-field *,
body.portal-theme math-field,
body.portal-theme math-field *,
body.portal-theme #sharedEquationPreview,
body.portal-theme #sharedEquationPreview *,
body.portal-theme .math-preview,
body.portal-theme .math-preview *,
body.portal-theme .equation-preview,
body.portal-theme .equation-preview *,
body.portal-theme .question-preview,
body.portal-theme .question-preview *,
body.portal-theme .question-preview-card,
body.portal-theme .question-preview-card *,
body.portal-theme .question-preview-card-live,
body.portal-theme .question-preview-card-live *,
body.portal-theme .complete-option-preview-card,
body.portal-theme .complete-option-preview-card *,
body.portal-theme #question-preview-box,
body.portal-theme #question-preview-box *,
body.portal-theme .MathJax,
body.portal-theme .mjx-container,
body.portal-theme .mjx-container *{
  color:#f7e8b8!important;
  opacity:1!important;
  text-shadow:none!important;
}
body.portal-theme math-field::part(container),
body.portal-theme math-field::part(content),
body.portal-theme math-field::part(virtual-keyboard-toggle),
body.portal-theme math-field::part(menu-toggle){
  color:#f7e8b8!important;
  background:transparent!important;
}
body.portal-theme math-field::part(placeholder){
  color:rgba(247,232,184,.58)!important;
}
body.portal-theme .q-modal-card .toolbar-grid-premium .toolbar-btn,
body.portal-theme .math-snippet,
body.portal-theme .math-toolbar button,
body.portal-theme .shared-equation-toolbar button,
body.portal-theme .inline-chip,
body.portal-theme .visual-toolbar button,
body.portal-theme .toolbar-grid-icons .toolbar-btn,
body.portal-theme .toolbar-grid-premium .toolbar-btn{
  background:rgba(247,232,184,.08)!important;
  color:#f7e8b8!important;
  border-color:rgba(240,192,64,.34)!important;
  box-shadow:none!important;
}
body.portal-theme .q-modal-card .toolbar-grid-premium .toolbar-btn:hover,
body.portal-theme .math-snippet:hover,
body.portal-theme .math-toolbar button:hover,
body.portal-theme .shared-equation-toolbar button:hover,
body.portal-theme .inline-chip:hover,
body.portal-theme .visual-toolbar button:hover,
body.portal-theme .toolbar-grid-icons .toolbar-btn:hover,
body.portal-theme .toolbar-grid-premium .toolbar-btn:hover{
  background:rgba(240,192,64,.16)!important;
  color:#ffe9a6!important;
  border-color:rgba(240,192,64,.52)!important;
  transform:none!important;
}
body.portal-theme .tool-symbol,
body.portal-theme .tool-label,
body.portal-theme .math-symbol,
body.portal-theme .toolbar-btn .tool-symbol,
body.portal-theme .toolbar-btn .tool-label,
body.portal-theme .math-toolbar button span,
body.portal-theme .math-toolbar button small,
body.portal-theme .shared-equation-toolbar button span,
body.portal-theme .shared-equation-toolbar button small,
body.portal-theme .visual-toolbar button span,
body.portal-theme .visual-toolbar button small{
  color:#f7e8b8!important;
  opacity:1!important;
}

/* V8.12.4 DIRECT CLEAN FIX - merged in final loaded portal CSS */
body.portal-theme.admin-portal,
body.portal-theme.student-portal{background:#04080f!important;color:#f7e8b8!important;}
body.portal-theme.admin-portal .admin-shell,body.portal-theme.student-portal .student-shell,body.portal-theme .app-shell,body.portal-theme .app-main{background:transparent!important;color:#f7e8b8!important;}
body.portal-theme.admin-portal .panel,body.portal-theme.admin-portal .panel:hover,body.portal-theme.student-portal .panel,body.portal-theme.student-portal .panel:hover,body.portal-theme .card,body.portal-theme .card:hover,body.portal-theme .white-card,body.portal-theme .white-card:hover,body.portal-theme .form-card,body.portal-theme .form-card:hover,body.portal-theme .content-card,body.portal-theme .content-card:hover,body.portal-theme .app-card,body.portal-theme .app-card:hover,body.portal-theme .student-card,body.portal-theme .student-card:hover,body.portal-theme .dashboard-card,body.portal-theme .dashboard-card:hover,body.portal-theme .dashboard-banner,body.portal-theme .dashboard-banner:hover,body.portal-theme .mini-panel,body.portal-theme .mini-panel:hover,body.portal-theme .stat-card,body.portal-theme .stat-card:hover,body.portal-theme .info-card,body.portal-theme .info-card:hover,body.portal-theme .quick-admin-card,body.portal-theme .quick-admin-card:hover,body.portal-theme .quick-link,body.portal-theme .quick-link:hover,body.portal-theme .gateway-card,body.portal-theme .gateway-card:hover,body.portal-theme .table-wrap,body.portal-theme .table-wrap:hover,body.portal-theme .preview-panel,body.portal-theme .preview-panel:hover,body.portal-theme .preview-box,body.portal-theme .preview-box:hover,body.portal-theme .q-modal-card,body.portal-theme .q-modal-card:hover,body.portal-theme [class*="card"]:not(.not-visited):not(.answered):not(.answered-review):not(.marked-review):not(.not-answered),body.portal-theme [class*="card"]:not(.not-visited):not(.answered):not(.answered-review):not(.marked-review):not(.not-answered):hover,body.portal-theme [class*="panel"],body.portal-theme [class*="panel"]:hover{background:linear-gradient(180deg,rgba(8,18,35,.98),rgba(11,26,50,.96))!important;background-color:#081223!important;border-color:rgba(240,192,64,.34)!important;color:#f7e8b8!important;box-shadow:0 18px 48px rgba(0,0,0,.38)!important;transform:none!important;filter:none!important;}
body.portal-theme .form-field,body.portal-theme .form-field:hover,body.portal-theme .form-field[style],body.portal-theme .form-field[style]:hover,body.portal-theme .checkbox-card,body.portal-theme .checkbox-card:hover,body.portal-theme .toggle-card,body.portal-theme .toggle-card:hover,body.portal-theme .switch-card,body.portal-theme .switch-card:hover{background:transparent!important;background-color:transparent!important;color:#f7e8b8!important;box-shadow:none!important;transform:none!important;filter:none!important;}
body.portal-theme .form-field label,body.portal-theme label,body.portal-theme .light-muted,body.portal-theme .muted,body.portal-theme .text-small,body.portal-theme .section-subtitle{color:rgba(247,232,184,.84)!important;opacity:1!important;}
body.portal-theme h1,body.portal-theme h2,body.portal-theme h3,body.portal-theme h4,body.portal-theme h5,body.portal-theme .admin-intro-title,body.portal-theme .sidebar-title{color:#f7e8b8!important;-webkit-text-fill-color:#f7e8b8!important;opacity:1!important;}
body.portal-theme input,body.portal-theme select,body.portal-theme textarea,body.portal-theme math-field{background:#050a13!important;background-color:#050a13!important;border-color:rgba(240,192,64,.34)!important;color:#f7e8b8!important;-webkit-text-fill-color:#f7e8b8!important;box-shadow:none!important;}
body.portal-theme input:hover,body.portal-theme select:hover,body.portal-theme textarea:hover,body.portal-theme math-field:hover{background:#050a13!important;background-color:#050a13!important;transform:none!important;filter:none!important;}
body.portal-theme .btn:not(.btn-gold):hover,body.portal-theme .btn-soft:hover,body.portal-theme .toolbar-btn:hover{transform:none!important;}
body.portal-theme .q-modal-card .white-card,body.portal-theme .q-modal-card .white-card:hover,body.portal-theme .math-live-wrap,body.portal-theme .math-live-wrap:hover,body.portal-theme .preview-box,body.portal-theme .preview-box:hover,body.portal-theme #equation-preview-box,body.portal-theme #question-preview-box{background:#081223!important;background-color:#081223!important;border-color:rgba(240,192,64,.34)!important;color:#f7e8b8!important;-webkit-text-fill-color:#f7e8b8!important;opacity:1!important;}
body.portal-theme #visual-math-field,body.portal-theme #visual-math-field:hover,body.portal-theme #visual-math-field:focus,body.portal-theme math-field,body.portal-theme math-field:hover,body.portal-theme math-field:focus{color:#f7e8b8!important;-webkit-text-fill-color:#f7e8b8!important;background:#050a13!important;border-color:rgba(240,192,64,.34)!important;--caret-color:#f7e8b8!important;--selection-background-color:rgba(240,192,64,.28)!important;--placeholder-color:rgba(247,232,184,.58)!important;--primary:#f0c040!important;--on-background:#f7e8b8!important;--text-color:#f7e8b8!important;}
body.portal-theme math-field::part(container),body.portal-theme math-field::part(content),body.portal-theme math-field::part(placeholder),body.portal-theme math-field::part(virtual-keyboard-toggle),body.portal-theme math-field::part(menu-toggle){color:#f7e8b8!important;-webkit-text-fill-color:#f7e8b8!important;opacity:1!important;}
body.portal-theme #equation-preview-box,body.portal-theme #equation-preview-box *,body.portal-theme #question-preview-box,body.portal-theme #question-preview-box *,body.portal-theme .MathJax,body.portal-theme .MathJax *,body.portal-theme .mjx-container,body.portal-theme .mjx-container *,body.portal-theme mjx-container,body.portal-theme mjx-container *{color:#f7e8b8!important;opacity:1!important;}
body.portal-theme .toolbar-grid-premium .toolbar-btn,body.portal-theme .toolbar-grid-premium .toolbar-btn:hover,body.portal-theme .math-snippet-btn,body.portal-theme .math-snippet-btn:hover{background:rgba(247,232,184,.08)!important;border-color:rgba(240,192,64,.34)!important;color:#f7e8b8!important;-webkit-text-fill-color:#f7e8b8!important;box-shadow:none!important;transform:none!important;}
body.portal-theme .tool-symbol,body.portal-theme .tool-label,body.portal-theme .toolbar-btn span,body.portal-theme .toolbar-btn small{color:#f7e8b8!important;-webkit-text-fill-color:#f7e8b8!important;opacity:1!important;}

/* V8.12.5 CLEAN CORRECTIONS - merged into existing portal theme only (not loaded on Home pages) */
body.portal-theme .q-modal:not(.open){display:none!important;pointer-events:none!important;}
body.portal-theme .q-modal.open{display:block!important;pointer-events:auto!important;}
body.portal-theme.admin-portal #visual-math-field{background:#020812!important;color:#fff4c7!important;-webkit-text-fill-color:#fff4c7!important;--caret-color:#fff4c7!important;--selection-background-color:rgba(240,192,64,.28)!important;--placeholder-color:rgba(255,244,199,.62)!important;--primary:#f0c040!important;--on-background:#fff4c7!important;--text-color:#fff4c7!important;--latex-color:#fff4c7!important;--keyboard-background:#06101f!important;--keycap-background:#0f2038!important;--keycap-text:#fff4c7!important;--menu-background:#06101f!important;--menu-text:#fff4c7!important;}
body.portal-theme.admin-portal #visual-math-field::part(container),body.portal-theme.admin-portal #visual-math-field::part(content){color:#fff4c7!important;-webkit-text-fill-color:#fff4c7!important;opacity:1!important;}
body.portal-theme.admin-portal #visual-math-field .ML__frac-line,body.portal-theme.admin-portal #visual-math-field .ML__sqrt-line,body.portal-theme.admin-portal #visual-math-field .ML__sqrt-sign,body.portal-theme.admin-portal math-field .ML__frac-line,body.portal-theme.admin-portal math-field .ML__sqrt-line,body.portal-theme.admin-portal math-field .ML__sqrt-sign{color:#fff4c7!important;border-color:#fff4c7!important;background-color:#fff4c7!important;}
body.portal-theme.admin-portal .ML__popover,body.portal-theme.admin-portal .ML__menu,body.portal-theme.admin-portal .ML__menu ul,body.portal-theme.admin-portal .ML__menu li,body.portal-theme.admin-portal .ML__menu-item,body.portal-theme.admin-portal .ML__menu-item__label,body.portal-theme.admin-portal math-field::part(menu),body.portal-theme.admin-portal math-field::part(menu-item){background:#06101f!important;color:#fff4c7!important;-webkit-text-fill-color:#fff4c7!important;border-color:rgba(240,192,64,.36)!important;opacity:1!important;}
body.portal-theme.admin-portal .ML__menu [aria-disabled="true"],body.portal-theme.admin-portal .ML__menu .disabled{color:rgba(255,244,199,.56)!important;-webkit-text-fill-color:rgba(255,244,199,.56)!important;}
body.portal-theme.admin-portal #equation-preview-box,body.portal-theme.admin-portal #equation-preview-box *,body.portal-theme.admin-portal #question-preview-box,body.portal-theme.admin-portal #question-preview-box *,body.portal-theme.admin-portal .math-preview-sheet,body.portal-theme.admin-portal .math-preview-sheet *,body.portal-theme.admin-portal .mjx-container,body.portal-theme.admin-portal .mjx-container *{color:#fff4c7!important;opacity:1!important;}
body.portal-theme.exam-portal .nta-count-box.answered,body.portal-theme.exam-portal .nta-palette-btn.answered,body.portal-theme.exam-portal .swatch.answered{background:#16a34a!important;border-color:#22c55e!important;color:#fff!important;}
body.portal-theme.exam-portal .nta-count-box.answered-review,body.portal-theme.exam-portal .nta-palette-btn.answered_review,body.portal-theme.exam-portal .nta-palette-btn.answered-review,body.portal-theme.exam-portal .swatch.answered-review{background:#2563eb!important;border-color:#3b82f6!important;color:#fff!important;}
body.portal-theme.exam-portal .nta-count-box.review,body.portal-theme.exam-portal .nta-palette-btn.review,body.portal-theme.exam-portal .swatch.review{background:#7c3aed!important;border-color:#8b5cf6!important;color:#fff!important;}
body.portal-theme.exam-portal .nta-count-box.not-answered,body.portal-theme.exam-portal .nta-palette-btn.not_answered,body.portal-theme.exam-portal .nta-palette-btn.not-answered,body.portal-theme.exam-portal .swatch.not-answered{background:#dc2626!important;border-color:#ef4444!important;color:#fff!important;}
body.portal-theme.exam-portal .nta-count-box.not-visited,body.portal-theme.exam-portal .nta-palette-btn.not_visited,body.portal-theme.exam-portal .nta-palette-btn.not-visited,body.portal-theme.exam-portal .swatch.unseen{background:#cbd5e1!important;border-color:#94a3b8!important;color:#0f172a!important;}
body.portal-theme.exam-portal .nta-count-box.neutral{background:#0b1a32!important;border-color:rgba(240,192,64,.34)!important;color:#f7e8b8!important;}
body.portal-theme.exam-portal .nta-count-box:not(.not-visited) span,body.portal-theme.exam-portal .nta-count-box:not(.not-visited) small{color:#fff!important;opacity:1!important;}body.portal-theme.exam-portal .nta-count-box.not-visited span,body.portal-theme.exam-portal .nta-count-box.not-visited small{color:#0f172a!important;opacity:1!important;}
body.portal-theme.exam-portal .nta-palette-btn.current{box-shadow:0 0 0 4px rgba(139,92,246,.35)!important;}
body.portal-theme.exam-portal .exam-actions .btn-gold[name="action"][value="submit_exam"],body.portal-theme.exam-portal button[value="submit_exam"],body.portal-theme.exam-portal .submit-exam-btn{background:linear-gradient(135deg,#ef4444,#b91c1c)!important;border-color:#f87171!important;color:#fff!important;}
body.portal-theme.exam-portal .exam-timer-card,body.portal-theme.exam-portal .timer-card,body.portal-theme.exam-portal .time-card,body.portal-theme.exam-portal .time-panel,body.portal-theme.exam-portal .nta-time-card,body.portal-theme.exam-portal .exam-risk-card,body.portal-theme.exam-portal .nta-proctor-card,body.portal-theme.exam-portal .nta-proctor-panel,body.portal-theme.exam-portal [class*="time" i][class*="card" i],body.portal-theme.exam-portal [class*="timer" i],body.portal-theme.exam-portal [class*="suspicion" i]{background:linear-gradient(180deg,#081223,#0b1a32)!important;border-color:rgba(240,192,64,.34)!important;color:#f7e8b8!important;box-shadow:0 18px 48px rgba(0,0,0,.38)!important;}
body.portal-theme.exam-portal .exam-timer-card *,body.portal-theme.exam-portal .timer-card *,body.portal-theme.exam-portal .time-card *,body.portal-theme.exam-portal .time-panel *,body.portal-theme.exam-portal .nta-time-card *,body.portal-theme.exam-portal .exam-risk-card *,body.portal-theme.exam-portal [class*="time" i][class*="card" i] *,body.portal-theme.exam-portal [class*="timer" i] *,body.portal-theme.exam-portal [class*="suspicion" i] *{color:#f7e8b8!important;opacity:1!important;}
body.portal-theme.exam-portal .subject-tab,body.portal-theme.exam-portal .nta-section-tab,body.portal-theme.exam-portal .subject-card,body.portal-theme.exam-portal .exam-subject,body.portal-theme.exam-portal .nta-subject{color:#f7e8b8!important;-webkit-text-fill-color:#f7e8b8!important;}body.portal-theme.exam-portal .subject-tab *,body.portal-theme.exam-portal .nta-section-tab *,body.portal-theme.exam-portal .subject-card *,body.portal-theme.exam-portal .exam-subject *,body.portal-theme.exam-portal .nta-subject *{color:inherit!important;opacity:1!important;}

/* V8.12.6 TARGETED CLEAN CORRECTIONS */
/* Home/public pages are intentionally untouched: every rule below is scoped to body.portal-theme only. */
body.portal-theme.admin-portal #visual-math-field{--selection-background-color:rgba(240,192,64,.32)!important;--selection-color:#fff4c7!important;--placeholder-color:rgba(255,244,199,.74)!important;--primary:#f0c040!important;--contains-highlight-background-color:rgba(240,192,64,.18)!important;caret-color:#fff4c7!important;}
body.portal-theme.admin-portal #visual-math-field::selection,body.portal-theme.admin-portal #visual-math-field *::selection,body.portal-theme.admin-portal math-field::selection,body.portal-theme.admin-portal math-field *::selection{background:rgba(240,192,64,.32)!important;color:#fff4c7!important;-webkit-text-fill-color:#fff4c7!important;}
body.portal-theme.admin-portal .ML__selected,body.portal-theme.admin-portal .ML__selection,body.portal-theme.admin-portal .ML__placeholder,body.portal-theme.admin-portal .ML__contains-caret{background:rgba(240,192,64,.24)!important;color:#fff4c7!important;-webkit-text-fill-color:#fff4c7!important;opacity:1!important;}
body.portal-theme.admin-portal .ML__placeholder *,body.portal-theme.admin-portal .ML__selected *,body.portal-theme.admin-portal .ML__selection *{color:#fff4c7!important;-webkit-text-fill-color:#fff4c7!important;fill:#fff4c7!important;stroke:#fff4c7!important;opacity:1!important;}
body.portal-theme.admin-portal .ML__menu,body.portal-theme.admin-portal .ML__popover,body.portal-theme.admin-portal .ML__context-menu,body.portal-theme.admin-portal .ML__menu ul,body.portal-theme.admin-portal .ML__menu li,body.portal-theme.admin-portal .ML__menu-item,body.portal-theme.admin-portal .ML__menu-item__label,body.portal-theme.admin-portal .ML__menu span,body.portal-theme.admin-portal .ML__menu a,body.portal-theme.admin-portal .ML__menu button{background:#071121!important;color:#fff4c7!important;-webkit-text-fill-color:#fff4c7!important;opacity:1!important;border-color:rgba(240,192,64,.30)!important;text-shadow:none!important;}
body.portal-theme.admin-portal .ML__menu li:hover,body.portal-theme.admin-portal .ML__menu-item:hover,body.portal-theme.admin-portal .ML__menu button:hover{background:rgba(240,192,64,.16)!important;color:#ffe9a6!important;}
body.portal-theme input[type="file"]{color:#f7e8b8!important;-webkit-text-fill-color:#f7e8b8!important;background:#050a13!important;border-color:rgba(240,192,64,.36)!important;padding:10px 14px!important;}
body.portal-theme input[type="file"]::file-selector-button{margin-right:10px!important;border:1px solid rgba(240,192,64,.45)!important;border-radius:8px!important;background:linear-gradient(135deg,#c9961a,#f0c040)!important;color:#04080f!important;-webkit-text-fill-color:#04080f!important;font-weight:700!important;padding:7px 12px!important;}
body.portal-theme input[type="file"]::-webkit-file-upload-button{margin-right:10px!important;border:1px solid rgba(240,192,64,.45)!important;border-radius:8px!important;background:linear-gradient(135deg,#c9961a,#f0c040)!important;color:#04080f!important;-webkit-text-fill-color:#04080f!important;font-weight:700!important;padding:7px 12px!important;}
body.portal-theme.admin-portal .proctor-alert-item,body.portal-theme.admin-portal .timeline-content,body.portal-theme.admin-portal .timeline-item,body.portal-theme.admin-portal .proctor-timeline-snap,body.portal-theme.admin-portal .proctor-alert-list > *,body.portal-theme.admin-portal .timeline-list > *{background:linear-gradient(180deg,#081223,#0b1a32)!important;border-color:rgba(240,192,64,.30)!important;color:#f7e8b8!important;box-shadow:0 14px 36px rgba(0,0,0,.30)!important;}
body.portal-theme.admin-portal .proctor-alert-item *,body.portal-theme.admin-portal .timeline-content *,body.portal-theme.admin-portal .timeline-item *{color:#f7e8b8!important;opacity:1!important;}
body.portal-theme.admin-portal .proctor-risk-badge.danger,body.portal-theme.admin-portal .proctor-risk-badge.warning,body.portal-theme.admin-portal .proctor-risk-badge.low{background:rgba(239,68,68,.14)!important;border-color:rgba(239,68,68,.45)!important;color:#ffb4b4!important;}
body.portal-theme.admin-portal .proctor-risk-badge.warning{background:rgba(245,158,11,.16)!important;border-color:rgba(245,158,11,.45)!important;color:#ffd48a!important;}
body.portal-theme.admin-portal .proctor-risk-badge.low{background:rgba(34,197,94,.14)!important;border-color:rgba(34,197,94,.45)!important;color:#9ef5ca!important;}
body.portal-theme.exam-portal .nta-side-card,body.portal-theme.exam-portal .nta-side-timer-panel,body.portal-theme.exam-portal .nta-timer-panel,body.portal-theme.exam-portal #examRiskCard,body.portal-theme.exam-portal .exam-risk-card{background:linear-gradient(180deg,#081223 0%,#0b1a32 100%)!important;border:1px solid rgba(240,192,64,.34)!important;color:#f7e8b8!important;box-shadow:0 18px 48px rgba(0,0,0,.38)!important;}
body.portal-theme.exam-portal .nta-side-card *,body.portal-theme.exam-portal .nta-side-timer-panel *,body.portal-theme.exam-portal #examRiskCard *,body.portal-theme.exam-portal .exam-risk-card *{color:#f7e8b8!important;opacity:1!important;}
body.portal-theme.exam-portal .nta-timer-box,body.portal-theme.exam-portal #examTimer{color:#ffe9a6!important;-webkit-text-fill-color:#ffe9a6!important;}
body.portal-theme.exam-portal .nta-btn-submit-final,body.portal-theme.exam-portal #submitExamBtn{background:linear-gradient(135deg,#ef4444,#b91c1c)!important;border-color:#f87171!important;color:#fff!important;-webkit-text-fill-color:#fff!important;}
body.portal-theme.exam-portal .nta-section-tab,body.portal-theme.exam-portal .subject-tab{background:linear-gradient(135deg,#0ea5e9 0%,#14b8a6 100%)!important;border-color:rgba(125,211,252,.48)!important;color:#fff4c7!important;box-shadow:0 14px 34px rgba(14,165,233,.24)!important;}
body.portal-theme.exam-portal .nta-section-tab.active,body.portal-theme.exam-portal .subject-tab.active{background:linear-gradient(135deg,#2563eb 0%,#14b8a6 100%)!important;color:#fff4c7!important;}
body.portal-theme.exam-portal .nta-section-tab *,body.portal-theme.exam-portal .subject-tab *{color:#fff4c7!important;opacity:1!important;}
body.portal-theme.exam-portal .nta-count-box.review,body.portal-theme.exam-portal .nta-palette-btn.review,body.portal-theme.exam-portal .swatch.review{background:#8b5cf6!important;border-color:#a78bfa!important;color:#fff!important;}
body.portal-theme.exam-portal .nta-count-box.not-visited,body.portal-theme.exam-portal .nta-palette-btn.not_visited,body.portal-theme.exam-portal .nta-palette-btn.not-visited,body.portal-theme.exam-portal .swatch.unseen{background:#d1d5db!important;border-color:#94a3b8!important;color:#0f172a!important;}
body.portal-theme .kv,body.portal-theme .section-row,body.portal-theme .form-actions,body.portal-theme .exam-actions{align-items:center!important;}
body.portal-theme .kv{display:grid!important;grid-template-columns:minmax(145px,.9fr) 1.1fr!important;column-gap:18px!important;}
body.portal-theme .kv strong{display:flex!important;align-items:center!important;min-height:34px!important;}
body.portal-theme .kv > div{display:flex!important;align-items:center!important;min-height:34px!important;}
body.portal-theme .badge-soft,body.portal-theme .pill,body.portal-theme .btn-sm{display:inline-flex!important;align-items:center!important;justify-content:center!important;line-height:1!important;}
body.portal-theme .cards-grid,body.portal-theme .table-wrap,body.portal-theme .info-card{overflow:hidden!important;}
body.portal-theme .panel > .cards-grid:first-child,body.portal-theme .panel > .table-wrap:first-child{margin-top:0!important;}
body.portal-theme.student-portal .auth-card,body.portal-theme.student-portal .reset-card,body.portal-theme.student-portal .password-card,body.portal-theme.student-portal .form-card{background:linear-gradient(180deg,#081223,#0b1a32)!important;border-color:rgba(240,192,64,.34)!important;color:#f7e8b8!important;}

/* V8.12.10 EXACT TARGETED CORRECTION
   Scope remains only portal-theme pages; public/Home pages are not targeted. */

/* Remove the accidental extra rectangular wrapper outlines around grids/tables/blocks
   while keeping the actual cards and content panels styled. */
body.portal-theme .cards-grid,
body.portal-theme .table-wrap,
body.portal-theme .question-block,
body.portal-theme .math-content,
body.portal-theme .question-review-head,
body.portal-theme .timeline-list,
body.portal-theme .proctor-alert-list,
body.portal-theme .nta-question-card .math-content,
body.portal-theme .question-review-card .math-content{
  background:transparent!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
}
body.portal-theme .cards-grid > .student-card,
body.portal-theme .cards-grid > .lesson-card,
body.portal-theme .cards-grid > .payment-card,
body.portal-theme .cards-grid > .exam-card,
body.portal-theme .cards-grid > .card{
  border:1px solid rgba(240,192,64,.30)!important;
}
body.portal-theme .table-wrap table{
  border-collapse:collapse!important;
  width:100%!important;
}

/* Payment/login/check rows: remove remaining white plates. */
body.portal-theme .checkbox-row,
body.portal-theme label.checkbox-row,
body.portal-theme .login-feature-item,
body.portal-theme .auth-card,
body.portal-theme .reset-card,
body.portal-theme .password-card{
  background:linear-gradient(180deg,#081223,#0b1a32)!important;
  border:1px solid rgba(240,192,64,.30)!important;
  color:#f7e8b8!important;
  -webkit-text-fill-color:#f7e8b8!important;
  box-shadow:none!important;
}
body.portal-theme .checkbox-row *,
body.portal-theme label.checkbox-row *,
body.portal-theme .login-feature-item *,
body.portal-theme .auth-card *,
body.portal-theme .reset-card *,
body.portal-theme .password-card *{
  color:#f7e8b8!important;
  -webkit-text-fill-color:#f7e8b8!important;
  opacity:1!important;
}
body.portal-theme .checkbox-row input[type="checkbox"]{
  accent-color:#f0c040!important;
  -webkit-text-fill-color:initial!important;
}

/* Exam timer card: force Home-theme dark surface, not the leftover white/silver card. */
body.portal-theme.student-portal .nta-side-card,
body.portal-theme.student-portal .nta-side-timer-panel,
body.portal-theme.student-portal .nta-timer-panel,
body.portal-theme.student-portal #examRiskCard,
body.portal-theme.student-portal .exam-risk-card{
  background:linear-gradient(180deg,#081223 0%,#0b1a32 100%)!important;
  background-color:#081223!important;
  border:1px solid rgba(240,192,64,.34)!important;
  color:#f7e8b8!important;
  box-shadow:0 18px 48px rgba(0,0,0,.38)!important;
}
body.portal-theme.student-portal .nta-side-card *,
body.portal-theme.student-portal .nta-side-timer-panel *,
body.portal-theme.student-portal .nta-timer-panel *,
body.portal-theme.student-portal #examRiskCard *,
body.portal-theme.student-portal .exam-risk-card *{
  opacity:1!important;
}
body.portal-theme.student-portal .nta-timer-label,
body.portal-theme.student-portal .exam-risk-head span{color:#f7e8b8!important;-webkit-text-fill-color:#f7e8b8!important;}
body.portal-theme.student-portal #examTimer,
body.portal-theme.student-portal .nta-timer-box{color:#ffe9a6!important;-webkit-text-fill-color:#ffe9a6!important;}
body.portal-theme.student-portal #examSuspicionScore{color:#ff4d4d!important;-webkit-text-fill-color:#ff4d4d!important;}
body.portal-theme.student-portal #examSuspicionLabel{color:#ff4d4d!important;-webkit-text-fill-color:#ff4d4d!important;}

/* Restore subject cards: inactive stays dark/gold; only current section becomes vibrant sea-green/blue. */
body.portal-theme.student-portal .subject-tab,
body.portal-theme.student-portal .nta-section-tab{
  background:rgba(240,192,64,.10)!important;
  border-color:rgba(240,192,64,.32)!important;
  color:#f7e8b8!important;
  -webkit-text-fill-color:#f7e8b8!important;
  box-shadow:none!important;
}
body.portal-theme.student-portal .subject-tab.active,
body.portal-theme.student-portal .nta-section-tab.active{
  background:linear-gradient(135deg,#2d7dd2 0%,#14c8a8 100%)!important;
  border-color:rgba(125,255,229,.55)!important;
  color:#fff4c7!important;
  -webkit-text-fill-color:#fff4c7!important;
  box-shadow:0 14px 34px rgba(20,200,168,.24)!important;
}
body.portal-theme.student-portal .subject-tab * ,
body.portal-theme.student-portal .nta-section-tab *{
  color:inherit!important;
  -webkit-text-fill-color:inherit!important;
  opacity:1!important;
}

/* V8.12.11 EXACT FINAL TARGETED FIXES
   Only Admin/Student portal pages are targeted through body.portal-theme.
   Home/public pages remain untouched. */

/* 1) Remove accidental outer rectangular wrapper borders from Proctor Event/Timeline rows. */
body.portal-theme.admin-portal .timeline-list,
body.portal-theme.admin-portal .proctor-alert-list{
  background:transparent!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
}
body.portal-theme.admin-portal .timeline-list > .timeline-item,
body.portal-theme.admin-portal .timeline-item{
  background:transparent!important;
  background-color:transparent!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
}
body.portal-theme.admin-portal .timeline-list > .timeline-item::before,
body.portal-theme.admin-portal .timeline-list > .timeline-item::after,
body.portal-theme.admin-portal .proctor-alert-list > .proctor-alert-item::before,
body.portal-theme.admin-portal .proctor-alert-list > .proctor-alert-item::after{
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:transparent!important;
}
body.portal-theme.admin-portal .timeline-content,
body.portal-theme.admin-portal .proctor-alert-item{
  background:linear-gradient(180deg,#081223 0%,#0b1a32 100%)!important;
  border:1px solid rgba(240,192,64,.28)!important;
  outline:0!important;
  box-shadow:0 14px 34px rgba(0,0,0,.28)!important;
  color:#f7e8b8!important;
}

/* 2) Remove small rectangular outlines around question text/math content in exam and result pages. */
body.portal-theme.student-portal .question-block,
body.portal-theme.student-portal .question-text-block,
body.portal-theme.student-portal .math-content,
body.portal-theme.student-portal .question-review-head .math-content,
body.portal-theme.student-portal .nta-question-card .math-content,
body.portal-theme.student-portal .question-review-card .math-content{
  background:transparent!important;
  background-color:transparent!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
}
body.portal-theme.student-portal .question-block *,
body.portal-theme.student-portal .question-text-block *,
body.portal-theme.student-portal .math-content *{
  background-color:transparent!important;
}

/* 3) Result option cards: no white hover; correct is clear green, wrong is dull red. */
body.portal-theme.student-portal .question-review-card .review-option,
body.portal-theme.student-portal .question-review-card .review-option:hover,
body.portal-theme.student-portal .question-review-card .review-option.selected:not(.correct):not(.wrong),
body.portal-theme.student-portal .question-review-card .review-option.selected:not(.correct):not(.wrong):hover{
  background:linear-gradient(180deg,#081223 0%,#0b1a32 100%)!important;
  background-color:#081223!important;
  border:1px solid rgba(240,192,64,.28)!important;
  color:#f7e8b8!important;
  -webkit-text-fill-color:#f7e8b8!important;
  box-shadow:none!important;
}
body.portal-theme.student-portal .question-review-card .review-option.correct,
body.portal-theme.student-portal .question-review-card .review-option.correct:hover,
body.portal-theme.student-portal .question-review-card .review-option.selected.correct,
body.portal-theme.student-portal .question-review-card .review-option.selected.correct:hover{
  background:linear-gradient(135deg,rgba(22,163,74,.34),rgba(20,83,45,.36))!important;
  border-color:rgba(34,197,94,.62)!important;
  color:#d7ffe6!important;
  -webkit-text-fill-color:#d7ffe6!important;
}
body.portal-theme.student-portal .question-review-card .review-option.wrong,
body.portal-theme.student-portal .question-review-card .review-option.wrong:hover,
body.portal-theme.student-portal .question-review-card .review-option.selected.wrong,
body.portal-theme.student-portal .question-review-card .review-option.selected.wrong:hover{
  background:linear-gradient(135deg,rgba(185,28,28,.28),rgba(69,10,10,.34))!important;
  border-color:rgba(239,68,68,.52)!important;
  color:#ffd1d1!important;
  -webkit-text-fill-color:#ffd1d1!important;
}
body.portal-theme.student-portal .question-review-card .review-option *,
body.portal-theme.student-portal .question-review-card .review-option:hover *{
  color:inherit!important;
  -webkit-text-fill-color:inherit!important;
  opacity:1!important;
}

/* 4) Visual Equation Editor: only darken Question Preview option rows; no other editor behavior changed. */
body.portal-theme.admin-portal .q-modal-card #question-preview-box .preview-options-stack,
body.portal-theme.admin-portal .q-modal-card #question-preview-box .preview-option-row,
body.portal-theme.admin-portal .q-modal-card #question-preview-box .preview-option-row:hover,
body.portal-theme.admin-portal .q-modal-card #question-preview-box .preview-option-copy,
body.portal-theme.admin-portal .q-modal-card #question-preview-box .preview-option-badge,
body.portal-theme.admin-portal .q-modal-card .question-preview-card-live .option,
body.portal-theme.admin-portal .q-modal-card .question-preview-card-live .option:hover{
  background:linear-gradient(180deg,#081223 0%,#0b1a32 100%)!important;
  background-color:#081223!important;
  border-color:rgba(240,192,64,.30)!important;
  color:#fff4c7!important;
  -webkit-text-fill-color:#fff4c7!important;
  box-shadow:none!important;
}
body.portal-theme.admin-portal .q-modal-card #question-preview-box .preview-option-row *,
body.portal-theme.admin-portal .q-modal-card #question-preview-box .preview-option-copy *,
body.portal-theme.admin-portal .q-modal-card .question-preview-card-live .option *{
  color:#fff4c7!important;
  -webkit-text-fill-color:#fff4c7!important;
  opacity:1!important;
  fill:#fff4c7!important;
  stroke:#fff4c7!important;
}

/* 5) Exam time card: remove leftover white/silver panels and keep readable dark Home-theme card. */
body.portal-theme.student-portal.exam-portal aside.exam-card.nta-side-card,
body.portal-theme.student-portal.exam-portal .exam-card.exam-sticky.nta-side-card,
body.portal-theme.student-portal.exam-portal .nta-side-card,
body.portal-theme.student-portal.exam-portal .nta-timer-panel,
body.portal-theme.student-portal.exam-portal .nta-side-timer-panel,
body.portal-theme.student-portal.exam-portal .timer-card,
body.portal-theme.student-portal.exam-portal .time-card,
body.portal-theme.student-portal.exam-portal #examRiskCard,
body.portal-theme.student-portal.exam-portal .exam-risk-card{
  background:linear-gradient(180deg,#081223 0%,#0b1a32 100%)!important;
  background-color:#081223!important;
  border-color:rgba(240,192,64,.34)!important;
  color:#f7e8b8!important;
  -webkit-text-fill-color:#f7e8b8!important;
  box-shadow:0 18px 48px rgba(0,0,0,.38)!important;
}
body.portal-theme.student-portal.exam-portal .nta-timer-panel *,
body.portal-theme.student-portal.exam-portal .nta-side-timer-panel *,
body.portal-theme.student-portal.exam-portal #examRiskCard *,
body.portal-theme.student-portal.exam-portal .exam-risk-card *{
  opacity:1!important;
}
body.portal-theme.student-portal.exam-portal #examTimer,
body.portal-theme.student-portal.exam-portal .nta-timer-box{
  color:#ffe9a6!important;
  -webkit-text-fill-color:#ffe9a6!important;
}
body.portal-theme.student-portal.exam-portal #examSuspicionScore,
body.portal-theme.student-portal.exam-portal #examSuspicionLabel{
  color:#ff4d4d!important;
  -webkit-text-fill-color:#ff4d4d!important;
}

/* 6) Subject cards: keep original dark inactive look; make only current/active subject sea-green brighter. */
body.portal-theme.student-portal.exam-portal .subject-tab,
body.portal-theme.student-portal.exam-portal .nta-section-tab{
  background:rgba(240,192,64,.10)!important;
  border-color:rgba(240,192,64,.34)!important;
  color:#f7e8b8!important;
  -webkit-text-fill-color:#f7e8b8!important;
  box-shadow:none!important;
}
body.portal-theme.student-portal.exam-portal .subject-tab.active,
body.portal-theme.student-portal.exam-portal .nta-section-tab.active,
body.portal-theme.student-portal.exam-portal .subject-tab.current,
body.portal-theme.student-portal.exam-portal .nta-section-tab.current{
  background:linear-gradient(135deg,#178bd6 0%,#18d4ae 100%)!important;
  border-color:rgba(125,255,229,.60)!important;
  color:#fff4c7!important;
  -webkit-text-fill-color:#fff4c7!important;
  box-shadow:0 14px 34px rgba(24,212,174,.28)!important;
}
body.portal-theme.student-portal.exam-portal .subject-tab *,
body.portal-theme.student-portal.exam-portal .nta-section-tab *{
  color:inherit!important;
  -webkit-text-fill-color:inherit!important;
  opacity:1!important;
}

/* 7) Remaining white plates in portal forms/check rows/password reset. */
body.portal-theme .checkbox-row,
body.portal-theme label.checkbox-row,
body.portal-theme .login-feature-item,
body.portal-theme .auth-card,
body.portal-theme .reset-card,
body.portal-theme .password-card{
  background:linear-gradient(180deg,#081223 0%,#0b1a32 100%)!important;
  background-color:#081223!important;
  border-color:rgba(240,192,64,.30)!important;
  color:#f7e8b8!important;
  -webkit-text-fill-color:#f7e8b8!important;
}
body.portal-theme .checkbox-row *,
body.portal-theme label.checkbox-row *,
body.portal-theme .login-feature-item *,
body.portal-theme .auth-card *,
body.portal-theme .reset-card *,
body.portal-theme .password-card *{
  color:#f7e8b8!important;
  -webkit-text-fill-color:#f7e8b8!important;
  opacity:1!important;
}

@media (max-width:900px){
  body.portal-theme.admin-portal .timeline-list > .timeline-item{grid-template-columns:12px 1fr!important;gap:10px!important;}
  body.portal-theme.student-portal.exam-portal .nta-timer-panel{text-align:left!important;}
}

/* ===== END zz-v8-12-deep-portal-clean.css ===== */


/* ===== BEGIN zz-v8-12-12-targeted-corrections.css ===== */
/* =====================================================
   V8.12.12 TARGETED CORRECTIONS
   Scope: only exam/student/admin portal pages and requested home micro-fixes.
   Purpose: remove extra frames/layers, brighten dull blue text, restore
   Astra theme consistency without changing existing PHP functionality.
   ===================================================== */

/* ---------- Exam page: remove unwanted outside rectangular boundary ---------- */
body.portal-theme .exam-shell,
body.portal-theme .nta-shell,
body.portal-theme .exam-layout-shell{
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:transparent!important;
  background-color:transparent!important;
}
body.portal-theme .exam-shell::before,
body.portal-theme .exam-shell::after,
body.portal-theme .nta-shell::before,
body.portal-theme .nta-shell::after,
body.portal-theme .exam-layout-shell::before,
body.portal-theme .exam-layout-shell::after{display:none!important;content:none!important;}

/* ---------- Timer panel cleanup: remove double color impressions ---------- */
body.portal-theme .nta-side-timer-panel,
body.portal-theme .nta-timer-panel{
  background:linear-gradient(180deg,#081326 0%,#071126 100%)!important;
  border:1px solid rgba(240,192,64,.34)!important;
  box-shadow:0 16px 38px rgba(0,0,0,.34)!important;
  overflow:hidden!important;
}
body.portal-theme .nta-side-timer-panel::before,
body.portal-theme .nta-side-timer-panel::after,
body.portal-theme .nta-timer-panel::before,
body.portal-theme .nta-timer-panel::after{display:none!important;content:none!important;}
body.portal-theme .nta-timer-label,
body.portal-theme .nta-timer-box{
  background:transparent!important;
  background-color:transparent!important;
  box-shadow:none!important;
  border:0!important;
}
body.portal-theme .nta-timer-box{color:#fff1bd!important;text-shadow:0 2px 18px rgba(240,192,64,.20)!important;}
body.portal-theme .nta-timer-state{
  background:rgba(34,197,94,.16)!important;
  border:1px solid rgba(34,197,94,.42)!important;
  color:#dfffe9!important;
}
body.portal-theme .nta-timer-state.warning{
  background:rgba(245,158,11,.18)!important;
  border-color:rgba(245,158,11,.58)!important;
  color:#ffe2a2!important;
}
body.portal-theme .nta-timer-state.danger{
  background:rgba(239,68,68,.20)!important;
  border-color:rgba(239,68,68,.62)!important;
  color:#ffd2d2!important;
}
body.portal-theme .exam-risk-card{
  border:1px solid rgba(240,192,64,.38)!important;
  background:linear-gradient(180deg,rgba(7,17,38,.96),rgba(7,16,34,.94))!important;
  box-shadow:none!important;
}
body.portal-theme .exam-risk-bar{
  height:12px!important;
  border:1px solid rgba(240,192,64,.24)!important;
  background:rgba(4,8,15,.92)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.03)!important;
  border-radius:999px!important;
  overflow:hidden!important;
}
body.portal-theme .exam-risk-fill{height:100%!important;border-radius:999px!important;background:linear-gradient(90deg,#22c55e,#facc15,#f97316,#ef4444)!important;}

/* ---------- Brighten dull blue text everywhere in portal UI ---------- */
body.portal-theme .math-helper,
body.portal-theme .light-muted,
body.portal-theme .text-muted,
body.portal-theme .muted,
body.portal-theme .nta-top-candidate-label,
body.portal-theme .nta-top-candidate-copy strong,
body.portal-theme .student-card p,
body.portal-theme .student-card div,
body.portal-theme .exam-question-card,
body.portal-theme .nta-question-card,
body.portal-theme .nta-option-copy,
body.portal-theme .saved-question-render,
body.portal-theme .preview-option-copy,
body.portal-theme .math-preview-question,
body.portal-theme .preview-correct-line{
  color:#f4e6b8!important;
  opacity:1!important;
}
body.portal-theme .exam-question-card *,
body.portal-theme .nta-question-card *,
body.portal-theme .nta-option-copy *,
body.portal-theme .saved-question-render *,
body.portal-theme .math-preview-sheet *{
  color:inherit!important;
  opacity:1!important;
}
body.portal-theme .tag,
body.portal-theme .nta-top-candidate-label{color:#2dd4bf!important;letter-spacing:.16em!important;}

/* ---------- Option letter buttons: match Home page blue/cyan theme ---------- */
body.portal-theme .nta-option-badge,
body.portal-theme .option-badge,
body.portal-theme .answer-badge{
  background:linear-gradient(135deg,#2563eb 0%,#14b8a6 100%)!important;
  border:1px solid rgba(255,255,255,.20)!important;
  color:#fff6c9!important;
  box-shadow:0 10px 24px rgba(37,99,235,.22)!important;
}
body.portal-theme .nta-option-item.is-selected .nta-option-badge,
body.portal-theme .nta-option-item:hover .nta-option-badge{
  background:linear-gradient(135deg,#f0c040 0%,#18c7b3 100%)!important;
  color:#06111f!important;
}

/* ---------- Not visited: dark grey instead of near-white ---------- */
body.portal-theme .nta-count-box.not-visited,
body.portal-theme .palette-btn.not_visited,
body.portal-theme .nta-palette-btn.not_visited,
body.portal-theme .palette-btn.not-visited,
body.portal-theme .nta-palette-btn.not-visited,
body.portal-theme .swatch.unseen,
body.portal-theme .swatch.not-visited{
  background:linear-gradient(180deg,#46505c,#2f3844)!important;
  border-color:rgba(240,192,64,.34)!important;
  color:#fff0bd!important;
}
body.portal-theme .nta-count-box.not-visited span,
body.portal-theme .nta-count-box.not-visited small,
body.portal-theme .palette-btn.not_visited,
body.portal-theme .nta-palette-btn.not_visited{color:#fff0bd!important;}

/* ---------- Visual Equation Editor: remove inner rectangular preview artefacts ---------- */
body.portal-theme #question-preview-box .preview-option-row{
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:rgba(10,22,42,.72)!important;
  border-radius:14px!important;
}
body.portal-theme #question-preview-box .preview-option-badge{
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:transparent!important;
  color:#fff1bd!important;
}
body.portal-theme #question-preview-box .mjx-container,
body.portal-theme #question-preview-box mjx-container,
body.portal-theme #question-preview-box svg,
body.portal-theme #question-preview-box svg *{
  outline:0!important;
}

/* ---------- Buttons: replace remaining light-blue with Astra blue/cyan ---------- */
body.portal-theme .btn-primary,
body.portal-theme .btn-primary-strong,
body.portal-theme #show-keyboard-btn,
body.portal-theme #insert-equation-btn,
body.portal-theme .preview-question-btn,
body.portal-theme .row-preview-btn,
body.portal-theme .btn-gradient,
body.portal-theme .q-modal-card .btn-primary,
body.portal-theme .q-modal-card .btn-primary-strong,
body.portal-theme .toolbar-action-primary{
  background:linear-gradient(135deg,#2563eb 0%,#14b8a6 100%)!important;
  border-color:rgba(255,255,255,.16)!important;
  color:#fff1bd!important;
  box-shadow:0 12px 28px rgba(20,184,166,.18)!important;
}
body.portal-theme .btn-primary:hover,
body.portal-theme .btn-primary-strong:hover,
body.portal-theme #show-keyboard-btn:hover,
body.portal-theme #insert-equation-btn:hover,
body.portal-theme .preview-question-btn:hover,
body.portal-theme .row-preview-btn:hover{filter:brightness(1.08)!important;transform:translateY(-1px);}

/* ---------- Exam action buttons slightly lower ---------- */
body.portal-theme .exam-actions.nta-actions{margin-top:22px!important;padding-top:18px!important;}

/* ---------- Subject cards: match Home blue/cyan theme, no over-bright cyan block ---------- */
body.portal-theme .nta-section-tab.active,
body.portal-theme .subject-tab.active{
  background:linear-gradient(135deg,#2563eb 0%,#14b8a6 100%)!important;
  border-color:rgba(45,212,191,.42)!important;
  box-shadow:0 18px 38px rgba(20,184,166,.18)!important;
}
body.portal-theme .nta-section-tab:not(.active),
body.portal-theme .subject-tab:not(.active){background:linear-gradient(180deg,rgba(16,25,35,.96),rgba(11,20,32,.94))!important;}

/* ---------- Footer logo alignment/size ---------- */
.brand-footer-logo{width:430px!important;max-width:100%!important;}
.footer-brand-logo-wrap,
.footer-brand-wrap,
.footer-logo-wrap{justify-content:flex-start!important;margin-left:-8px!important;}

/* ---------- Home page headings: keep requested headings on one line on desktop ---------- */
@media (min-width: 1100px){
  .section-head h2,
  .section-title h2,
  #results h2,
  #faculty h2,
  #test-series h2,
  #contact h2,
  #scholarship h2{white-space:nowrap!important;}
}

/* ===== END zz-v8-12-12-targeted-corrections.css ===== */


/* ===== BEGIN zz-v8-12-13-final-polish.css ===== */
/* =====================================================
   V8.12.13 FINAL POLISH PATCH
   Scope: last remaining UI issues only. Loaded after all older CSS
   so it neutralizes conflicting layers without changing functionality.
   ===================================================== */

:root{
  --v813-bg:#071126;
  --v813-bg-2:#0a172a;
  --v813-panel:#0b1628;
  --v813-gold:#f6e7b4;
  --v813-gold-strong:#ffe8a3;
  --v813-cyan:#22d3ee;
  --v813-teal:#14b8a6;
  --v813-blue:#38bdf8;
  --v813-muted-blue:#9edcff;
  --v813-dark-grey:#20262f;
  --v813-dark-grey-2:#151a22;
  --v813-border:rgba(240,192,64,.34);
}

/* 1) Exam timer: remove rectangular color impressions/stacked strip layers */
body.portal-theme .nta-side-timer-panel,
body.portal-theme .nta-timer-panel{
  background:#071126!important;
  background-image:none!important;
  border:1px solid var(--v813-border)!important;
  box-shadow:0 18px 40px rgba(0,0,0,.36)!important;
  overflow:hidden!important;
}
body.portal-theme .nta-side-timer-panel *,
body.portal-theme .nta-timer-panel *{
  text-shadow:none;
}
body.portal-theme .nta-side-timer-panel::before,
body.portal-theme .nta-side-timer-panel::after,
body.portal-theme .nta-timer-panel::before,
body.portal-theme .nta-timer-panel::after,
body.portal-theme .nta-timer-label::before,
body.portal-theme .nta-timer-label::after,
body.portal-theme .nta-timer-box::before,
body.portal-theme .nta-timer-box::after{
  display:none!important;
  content:none!important;
}
body.portal-theme .nta-timer-label,
body.portal-theme .nta-timer-box,
body.portal-theme #examTimer{
  background:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
  border:0!important;
  outline:0!important;
}
body.portal-theme .nta-timer-label{
  color:var(--v813-gold)!important;
}
body.portal-theme .nta-timer-box,
body.portal-theme #examTimer{
  color:var(--v813-gold-strong)!important;
  filter:none!important;
}

/* Dynamic time state badge colors */
body.portal-theme .nta-timer-state,
body.portal-theme #timerStateBadge{
  background:rgba(34,197,94,.16)!important;
  border:1px solid rgba(34,197,94,.55)!important;
  color:#dfffe9!important;
  box-shadow:0 0 18px rgba(34,197,94,.10)!important;
}
body.portal-theme .nta-timer-state.warning,
body.portal-theme #timerStateBadge.warning{
  background:rgba(245,158,11,.18)!important;
  border-color:rgba(245,158,11,.68)!important;
  color:#ffe0a3!important;
  box-shadow:0 0 18px rgba(245,158,11,.12)!important;
}
body.portal-theme .nta-timer-state.danger,
body.portal-theme #timerStateBadge.danger{
  background:rgba(239,68,68,.20)!important;
  border-color:rgba(239,68,68,.72)!important;
  color:#ffd0d0!important;
  box-shadow:0 0 18px rgba(239,68,68,.16)!important;
}

/* Suspicion bar outline visibility */
body.portal-theme .exam-risk-bar{
  height:13px!important;
  border:1px solid rgba(240,192,64,.50)!important;
  background:#050911!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.05)!important;
  border-radius:999px!important;
}

/* 2) Exam progress bar above subject cards: visible fill + state colors */
body.portal-theme .nta-timer-progress-wrap{
  height:8px!important;
  border:1px solid rgba(240,192,64,.36)!important;
  background:#07101d!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.03)!important;
  border-radius:999px!important;
  overflow:hidden!important;
}
body.portal-theme .nta-timer-progress,
body.portal-theme #timerProgressBar{
  min-width:3px;
  height:100%!important;
  background:linear-gradient(90deg,#22c55e 0%,#facc15 55%,#f97316 78%,#ef4444 100%)!important;
  border-radius:999px!important;
  box-shadow:0 0 18px rgba(34,211,238,.18)!important;
}
body.portal-theme .nta-timer-progress.warning{background:linear-gradient(90deg,#facc15,#fb923c)!important;}
body.portal-theme .nta-timer-progress.danger{background:linear-gradient(90deg,#fb923c,#ef4444)!important;}

/* 3) Not visited: darkest grey everywhere, not white */
body.portal-theme .nta-count-box.not-visited,
body.portal-theme .nta-count-box.neutral.not-visited,
body.portal-theme .palette-btn.not_visited,
body.portal-theme .nta-palette-btn.not_visited,
body.portal-theme .palette-btn.not-visited,
body.portal-theme .nta-palette-btn.not-visited,
body.portal-theme .status-not_visited,
body.portal-theme .status-not-visited,
body.portal-theme .swatch.unseen,
body.portal-theme .swatch.not-visited{
  background:linear-gradient(180deg,var(--v813-dark-grey) 0%,var(--v813-dark-grey-2) 100%)!important;
  border:1px solid rgba(240,192,64,.32)!important;
  color:var(--v813-gold)!important;
  box-shadow:none!important;
}
body.portal-theme .nta-count-box.not-visited *,
body.portal-theme .palette-btn.not_visited *,
body.portal-theme .nta-palette-btn.not_visited *,
body.portal-theme .palette-btn.not-visited *,
body.portal-theme .nta-palette-btn.not-visited *{
  color:var(--v813-gold)!important;
  opacity:1!important;
}

/* 4) Brighten dull blue text while keeping Home theme harmony */
body.portal-theme .exam-question-card,
body.portal-theme .nta-question-card,
body.portal-theme .exam-question-card .question-text-block,
body.portal-theme .nta-question-card .question-text-block,
body.portal-theme .nta-option-copy,
body.portal-theme .nta-option-copy .question-text-block,
body.portal-theme .student-card p,
body.portal-theme .student-card div:not(.btn):not(.pill),
body.portal-theme .profile-info,
body.portal-theme .profile-info *,
body.portal-theme .math-helper,
body.portal-theme .saved-question-render,
body.portal-theme .saved-question-render *,
body.portal-theme .math-preview-question,
body.portal-theme .math-preview-question *,
body.portal-theme .preview-option-copy,
body.portal-theme .preview-option-copy *{
  color:var(--v813-muted-blue)!important;
  opacity:1!important;
  -webkit-text-fill-color:var(--v813-muted-blue)!important;
}
body.portal-theme .nta-option-copy,
body.portal-theme .nta-option-copy *{
  color:#d7f1ff!important;
  -webkit-text-fill-color:#d7f1ff!important;
}
body.portal-theme .exam-question-card,
body.portal-theme .exam-question-card *{
  color:#e8ddbd!important;
  -webkit-text-fill-color:#e8ddbd!important;
}
body.portal-theme .nta-top-candidate-copy strong,
body.portal-theme .nta-top-candidate-copy .math-helper{
  color:#d7f1ff!important;
  -webkit-text-fill-color:#d7f1ff!important;
}

/* 5) Subject cards: Astra home-theme cyan/teal, not flat old blue */
body.portal-theme .subject-tab.active,
body.portal-theme .nta-section-tab.active{
  background:linear-gradient(135deg,#1d4ed8 0%,#0891b2 48%,#14b8a6 100%)!important;
  border-color:rgba(34,211,238,.52)!important;
  box-shadow:0 16px 34px rgba(20,184,166,.18)!important;
}
body.portal-theme .subject-tab.active *,
body.portal-theme .nta-section-tab.active *{
  color:#fff2bd!important;
  -webkit-text-fill-color:#fff2bd!important;
}
body.portal-theme .subject-tab:not(.active),
body.portal-theme .nta-section-tab:not(.active){
  background:linear-gradient(180deg,#1b2228 0%,#111923 100%)!important;
  border-color:rgba(240,192,64,.34)!important;
}

/* 6) Visual Equation Editor preview: remove option background impressions */
body.portal-theme #question-preview-box .preview-options-stack,
body.portal-theme .math-preview-sheet .preview-options-stack{
  background:transparent!important;
  box-shadow:none!important;
  border:0!important;
}
body.portal-theme #question-preview-box .preview-option-row,
body.portal-theme .math-preview-sheet .preview-option-row{
  position:relative!important;
  background:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
  border:0!important;
  outline:0!important;
  border-radius:0!important;
  padding-right:42px!important;
}
body.portal-theme #question-preview-box .preview-option-row:hover,
body.portal-theme .math-preview-sheet .preview-option-row:hover{
  background:rgba(34,211,238,.055)!important;
}
body.portal-theme #question-preview-box .preview-option-badge,
body.portal-theme .math-preview-sheet .preview-option-badge{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  outline:0!important;
}
.preview-option-delete{
  position:absolute;
  right:8px;
  top:50%;
  transform:translateY(-50%);
  width:26px;
  height:26px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  border:1px solid rgba(239,68,68,.42);
  background:rgba(239,68,68,.12);
  color:#ffd2d2;
  cursor:pointer;
  font-weight:800;
  opacity:.72;
}
.preview-option-delete:hover{opacity:1;background:rgba(239,68,68,.22);}

/* MathLive dropdown/menu premium hover and softer border */
body.portal-theme.admin-portal .ML__popover,
body.portal-theme.admin-portal .ML__menu,
body.portal-theme.admin-portal .ML__context-menu{
  background:#050b16!important;
  border:1px solid rgba(240,192,64,.34)!important;
  outline:0!important;
  box-shadow:0 18px 42px rgba(0,0,0,.55), inset 0 0 0 1px rgba(34,211,238,.06)!important;
  border-radius:12px!important;
}
body.portal-theme.admin-portal .ML__menu li,
body.portal-theme.admin-portal .ML__menu-item,
body.portal-theme.admin-portal .ML__context-menu li,
body.portal-theme.admin-portal .ML__popover li{
  background:#071126!important;
  color:#fff2bd!important;
  -webkit-text-fill-color:#fff2bd!important;
  border-radius:6px!important;
  transition:background .16s ease,color .16s ease,transform .16s ease!important;
}
body.portal-theme.admin-portal .ML__menu li:hover,
body.portal-theme.admin-portal .ML__menu-item:hover,
body.portal-theme.admin-portal .ML__context-menu li:hover,
body.portal-theme.admin-portal .ML__popover li:hover{
  background:linear-gradient(135deg,rgba(37,99,235,.34),rgba(20,184,166,.28))!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
  transform:translateX(1px)!important;
}
body.portal-theme.admin-portal .ML__menu [aria-disabled="true"],
body.portal-theme.admin-portal .ML__menu .disabled{
  opacity:.58!important;
}

/* 7) Tables: restore horizontal scroll where page width is insufficient */
body.portal-theme .table-wrap,
body.portal-theme .table-wrapper,
body.portal-theme .data-table-wrap,
body.portal-theme .responsive-table,
body.portal-theme .panel:has(table){
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  -webkit-overflow-scrolling:touch!important;
}
body.portal-theme .data-table,
body.portal-theme table.data-table,
body.portal-theme .table-wrap table,
body.portal-theme .table-wrapper table{
  min-width:820px!important;
  width:max-content!important;
  max-width:none!important;
}
body.portal-theme .data-table th,
body.portal-theme .data-table td{
  white-space:normal!important;
}

/* 8) Footer logo final alignment/size */
#footer .footer-brand-col,
.public-footer .footer-brand-col{
  align-items:flex-start!important;
}
#footer .footer-logo-wrap,
.public-footer .footer-logo-wrap,
.footer-logo-wrap{
  justify-content:flex-start!important;
  align-items:flex-start!important;
  margin-left:-6px!important;
  padding-left:0!important;
}
#footer .brand-footer-logo,
.public-footer .brand-footer-logo,
.brand-footer-logo{
  width:min(390px,100%)!important;
  max-width:100%!important;
  height:auto!important;
  object-fit:contain!important;
  margin-left:0!important;
  transform:none!important;
}
#footer .footer-brand-col p,
.public-footer .footer-brand-col p{
  margin-left:0!important;
  max-width:420px!important;
}

@media(max-width:900px){
  #footer .brand-footer-logo,
  .public-footer .brand-footer-logo,
  .brand-footer-logo{width:min(330px,100%)!important;}
}

/* =====================================================
   V8.12.13 HOTFIX B - final remaining UI cleanup
   Scope: targeted only; no functional changes.
   ===================================================== */

/* Exam timer: remove last dark strip / ghost layers behind label and digits */
body.portal-theme.exam-portal .nta-side-timer-panel,
body.portal-theme.exam-portal .nta-timer-panel{
  background:#071126!important;
  background-image:none!important;
  isolation:isolate!important;
}
body.portal-theme.exam-portal .nta-side-timer-panel .nta-timer-label,
body.portal-theme.exam-portal .nta-side-timer-panel .nta-timer-box,
body.portal-theme.exam-portal .nta-side-timer-panel #examTimer,
body.portal-theme.exam-portal .nta-timer-panel .nta-timer-label,
body.portal-theme.exam-portal .nta-timer-panel .nta-timer-box,
body.portal-theme.exam-portal .nta-timer-panel #examTimer{
  display:block!important;
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  background:transparent!important;
  background-color:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
  border:0!important;
  outline:0!important;
  filter:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
body.portal-theme.exam-portal .nta-side-timer-panel .nta-timer-label *,
body.portal-theme.exam-portal .nta-side-timer-panel .nta-timer-box *,
body.portal-theme.exam-portal .nta-side-timer-panel #examTimer *,
body.portal-theme.exam-portal .nta-side-timer-panel [class*="timer" i]::before,
body.portal-theme.exam-portal .nta-side-timer-panel [class*="timer" i]::after,
body.portal-theme.exam-portal .nta-side-timer-panel [class*="time" i]::before,
body.portal-theme.exam-portal .nta-side-timer-panel [class*="time" i]::after{
  background:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
  border:0!important;
}
body.portal-theme.exam-portal .nta-timer-label{
  padding:0 0 4px 0!important;
  margin:0!important;
}
body.portal-theme.exam-portal .nta-timer-box,
body.portal-theme.exam-portal #examTimer{
  padding:0!important;
  margin:0 0 10px 0!important;
  line-height:1.05!important;
}

/* Exam palette: force Not Visited to darkest grey everywhere, including status cards and number chips */
body.portal-theme.exam-portal .nta-count-box.not-visited,
body.portal-theme.exam-portal .nta-count-box.neutral.not-visited,
body.portal-theme.exam-portal .nta-palette-btn.not_visited,
body.portal-theme.exam-portal .nta-palette-btn.not-visited,
body.portal-theme.exam-portal .palette-btn.not_visited,
body.portal-theme.exam-portal .palette-btn.not-visited,
body.portal-theme.exam-portal .swatch.unseen,
body.portal-theme.exam-portal .swatch.not-visited,
body.portal-theme.exam-portal .not-visited:not(.subject-tab):not(.nta-section-tab),
body.portal-theme .status-not_visited,
body.portal-theme .status-not-visited{
  background:#171c24!important;
  background-image:linear-gradient(180deg,#202630 0%,#141922 100%)!important;
  border:1px solid rgba(240,192,64,.34)!important;
  color:#f7e8b8!important;
  -webkit-text-fill-color:#f7e8b8!important;
  box-shadow:none!important;
}
body.portal-theme.exam-portal .nta-count-box.not-visited *,
body.portal-theme.exam-portal .nta-palette-btn.not_visited *,
body.portal-theme.exam-portal .nta-palette-btn.not-visited *,
body.portal-theme.exam-portal .palette-btn.not_visited *,
body.portal-theme.exam-portal .palette-btn.not-visited *,
body.portal-theme.exam-portal .swatch.unseen *,
body.portal-theme.exam-portal .swatch.not-visited *{
  color:#f7e8b8!important;
  -webkit-text-fill-color:#f7e8b8!important;
  opacity:1!important;
}

/* Visual Equation Editor preview: remove rectangular option impressions completely */
body.portal-theme.admin-portal #question-preview-box .preview-options-stack,
body.portal-theme.admin-portal #question-preview-box .preview-option-row,
body.portal-theme.admin-portal #question-preview-box .preview-option-copy,
body.portal-theme.admin-portal #question-preview-box .preview-option-badge,
body.portal-theme.admin-portal .math-preview-sheet .preview-options-stack,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-row,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-copy,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-badge{
  background:transparent!important;
  background-color:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
  border:0!important;
  outline:0!important;
}
body.portal-theme.admin-portal #question-preview-box .preview-option-row,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-row{
  border-radius:0!important;
  margin:10px 0!important;
  padding:8px 44px 8px 0!important;
}
body.portal-theme.admin-portal #question-preview-box .preview-option-row:hover,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-row:hover{
  background:rgba(240,192,64,.055)!important;
}

/* Question Preview MathJax: one premium yellow color only */
body.portal-theme.admin-portal #question-preview-box,
body.portal-theme.admin-portal #question-preview-box *,
body.portal-theme.admin-portal #question-preview-box .MathJax,
body.portal-theme.admin-portal #question-preview-box .MathJax *,
body.portal-theme.admin-portal #question-preview-box mjx-container,
body.portal-theme.admin-portal #question-preview-box mjx-container *,
body.portal-theme.admin-portal #question-preview-box .mjx-container,
body.portal-theme.admin-portal #question-preview-box .mjx-container *,
body.portal-theme.admin-portal #question-preview-box svg,
body.portal-theme.admin-portal #question-preview-box svg *{
  color:#fff2bd!important;
  -webkit-text-fill-color:#fff2bd!important;
  fill:#fff2bd!important;
  stroke:#fff2bd!important;
}
body.portal-theme.admin-portal #question-preview-box .preview-option-delete{
  color:#ffd2d2!important;
  -webkit-text-fill-color:#ffd2d2!important;
  fill:none!important;
  stroke:none!important;
}

/* MathLive menu: premium border and reliable hover for menu + matrix cells */
body.portal-theme.admin-portal .ML__popover,
body.portal-theme.admin-portal .ML__menu,
body.portal-theme.admin-portal .ML__context-menu,
body.portal-theme.admin-portal .ML__keyboard-layer{
  background:#050b16!important;
  border:1px solid rgba(240,192,64,.38)!important;
  outline:0!important;
  box-shadow:0 18px 44px rgba(0,0,0,.62), inset 0 0 0 1px rgba(34,211,238,.08)!important;
  border-radius:12px!important;
}
body.portal-theme.admin-portal .ML__menu li,
body.portal-theme.admin-portal .ML__menu-item,
body.portal-theme.admin-portal .ML__context-menu li,
body.portal-theme.admin-portal .ML__popover li,
body.portal-theme.admin-portal .ML__popover button,
body.portal-theme.admin-portal .ML__popover [role="menuitem"],
body.portal-theme.admin-portal .ML__popover [role="option"],
body.portal-theme.admin-portal .ML__matrix-cell,
body.portal-theme.admin-portal .ML__matrix-row button{
  transition:background .15s ease,color .15s ease,border-color .15s ease,transform .15s ease!important;
}
body.portal-theme.admin-portal .ML__menu li:hover,
body.portal-theme.admin-portal .ML__menu-item:hover,
body.portal-theme.admin-portal .ML__context-menu li:hover,
body.portal-theme.admin-portal .ML__popover li:hover,
body.portal-theme.admin-portal .ML__popover button:hover,
body.portal-theme.admin-portal .ML__popover [role="menuitem"]:hover,
body.portal-theme.admin-portal .ML__popover [role="option"]:hover,
body.portal-theme.admin-portal .ML__matrix-cell:hover,
body.portal-theme.admin-portal .ML__matrix-row button:hover{
  background:linear-gradient(135deg,rgba(240,192,64,.18),rgba(20,184,166,.18))!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
  border-color:rgba(240,192,64,.55)!important;
  transform:translateX(1px)!important;
}
body.portal-theme.admin-portal math-field::part(menu-toggle):hover,
body.portal-theme.admin-portal math-field::part(virtual-keyboard-toggle):hover{
  background:rgba(240,192,64,.16)!important;
  color:#fff2bd!important;
}

/* Mobile & tablet: prevent header overlap and keep hero visible */
@media (max-width: 1024px){
  #navbar,
  body.portal-theme #navbar,
  .portal-header,
  .app-topbar{
    min-height:88px!important;
    height:auto!important;
    padding:14px 18px!important;
    gap:12px!important;
    flex-wrap:wrap!important;
    align-items:center!important;
  }
  #navbar .nav-brand,
  #navbar .nav-brand-image-wrap,
  body.portal-theme .portal-brand,
  body.portal-theme .topbar-brand{
    max-width:100%!important;
    flex:0 0 auto!important;
  }
  .brand-header-logo,
  body.portal-theme .brand-header-logo{
    width:auto!important;
    max-width:min(290px,58vw)!important;
    height:auto!important;
    max-height:58px!important;
    object-fit:contain!important;
  }
  #navbar .nav-actions,
  body.portal-theme .topbar-actions{
    margin-left:auto!important;
    gap:8px!important;
    flex-wrap:wrap!important;
  }
  #navbar .nav-links{
    display:none!important;
  }
  #hero{
    display:flex!important;
    min-height:auto!important;
    padding-top:128px!important;
    padding-bottom:56px!important;
    overflow:visible!important;
  }
  #hero .hero-grid,
  #hero .hero-content,
  #hero .hero-card{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
  }
  #hero .hero-card{
    position:relative!important;
    top:auto!important;
    transform:none!important;
    margin-top:28px!important;
  }
  .hero-main-line{white-space:normal!important;}
}
@media (max-width: 640px){
  #navbar,
  body.portal-theme #navbar,
  .portal-header,
  .app-topbar{
    min-height:86px!important;
    padding:12px 14px!important;
  }
  .brand-header-logo,
  body.portal-theme .brand-header-logo{
    max-width:250px!important;
    max-height:54px!important;
  }
  #navbar .btn,
  body.portal-theme .app-topbar .btn,
  body.portal-theme .portal-header .btn{
    padding:10px 14px!important;
    font-size:13px!important;
    white-space:nowrap!important;
  }
  #hero{padding-top:120px!important;}
  .hero-h1{font-size:clamp(38px,12vw,58px)!important;}
  .hero-sub{font-size:16px!important;line-height:1.65!important;}
}

/* ===== END zz-v8-12-13-final-polish.css ===== */


/* ===== BEGIN zz-v8-12-13-hotfix-c-mobile-editor.css ===== */
/* =====================================================
   V8.12.13 HOTFIX C — final mobile + visual editor cleanup
   Loaded last. Scope is tightly targeted to avoid breaking working UI.
   ===================================================== */

:root{--c-bg:#04080f;--c-panel:#071126;--c-panel2:#0a172a;--c-gold:#f6e7b4;--c-gold2:#f0c040;--c-border:rgba(240,192,64,.34);--c-cyan:#22d3ee;}

/* Remove visible // prefix from tag labels even if present in old content */
.tag{letter-spacing:.16em!important;}

/* Visual Equation Editor title should be clean */
.v811-build-badge{display:none!important;}

/* Question Preview: remove rectangular colored bars behind options completely */
body.portal-theme.admin-portal #question-preview-box .preview-options-stack,
body.portal-theme.admin-portal .math-preview-sheet .preview-options-stack{
  display:grid!important;
  gap:18px!important;
  background:transparent!important;
  background-image:none!important;
  border:0!important;
  box-shadow:none!important;
}
body.portal-theme.admin-portal #question-preview-box .preview-option-row,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-row,
body.portal-theme.admin-portal #question-preview-box .preview-option-row:hover,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-row:hover,
body.portal-theme.admin-portal #question-preview-box .preview-option-copy,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-copy,
body.portal-theme.admin-portal #question-preview-box .preview-option-badge,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-badge{
  background:transparent!important;
  background-image:none!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  filter:none!important;
}
body.portal-theme.admin-portal #question-preview-box .preview-option-row,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-row{
  display:grid!important;
  grid-template-columns:56px 1fr 34px!important;
  align-items:center!important;
  min-height:56px!important;
  padding:0 8px!important;
  border-radius:0!important;
}
body.portal-theme.admin-portal #question-preview-box .preview-option-row::before,
body.portal-theme.admin-portal #question-preview-box .preview-option-row::after,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-row::before,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-row::after{
  display:none!important;content:none!important;
}
body.portal-theme.admin-portal #question-preview-box .preview-option-copy,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-copy,
body.portal-theme.admin-portal #question-preview-box .preview-option-copy *,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-copy *,
body.portal-theme.admin-portal #question-preview-box .math-preview-question,
body.portal-theme.admin-portal #question-preview-box .math-preview-question *{
  color:#fff2bd!important;
  -webkit-text-fill-color:#fff2bd!important;
  fill:#fff2bd!important;
  stroke:#fff2bd!important;
  opacity:1!important;
}
body.portal-theme.admin-portal #question-preview-box .preview-option-delete{
  position:static!important;
  transform:none!important;
  justify-self:end!important;
  width:30px!important;height:30px!important;
  border-radius:999px!important;
  background:rgba(239,68,68,.14)!important;
  border:1px solid rgba(239,68,68,.52)!important;
  color:#ffe7bf!important;
}
body.portal-theme.admin-portal #question-preview-box .preview-option-delete:hover{background:rgba(239,68,68,.28)!important;border-color:rgba(255,180,110,.8)!important;}

/* MathLive popover/menu: remove white premium border and add clear hover states.
   These menus are often appended to body, so rules are intentionally not scoped only under .portal-theme. */
.ML__popover,.ML__menu,.ML__context-menu,.ML__menu ul,.ML__context-menu ul,
math-field::part(menu),math-field::part(menu-item){
  background:#050b16!important;
  color:#fff2bd!important;
  border-color:rgba(240,192,64,.34)!important;
  outline:0!important;
  box-shadow:0 18px 42px rgba(0,0,0,.60), inset 0 0 0 1px rgba(34,211,238,.08)!important;
  border-radius:12px!important;
}
.ML__menu li,.ML__menu-item,.ML__context-menu li,.ML__popover li,
.ML__menu a,.ML__menu button,.ML__menu [role="menuitem"],.ML__popover [role="menuitem"]{
  background:#071126!important;
  color:#fff2bd!important;
  -webkit-text-fill-color:#fff2bd!important;
  border-radius:6px!important;
  transition:background .16s ease,color .16s ease,transform .16s ease!important;
}
.ML__menu li:hover,.ML__menu-item:hover,.ML__context-menu li:hover,.ML__popover li:hover,
.ML__menu a:hover,.ML__menu button:hover,.ML__menu [role="menuitem"]:hover,.ML__popover [role="menuitem"]:hover,
.ML__menu .is-selected,.ML__menu .selected,.ML__menu .highlighted{
  background:linear-gradient(135deg,rgba(240,192,64,.24),rgba(34,211,238,.16))!important;
  color:#fff8d6!important;
  -webkit-text-fill-color:#fff8d6!important;
}
.ML__menu [aria-disabled="true"],.ML__menu .disabled{color:rgba(255,242,189,.48)!important;-webkit-text-fill-color:rgba(255,242,189,.48)!important;}
.ML__menu .ML__shortcut{color:rgba(255,242,189,.42)!important;-webkit-text-fill-color:rgba(255,242,189,.42)!important;}

/* Improve MathLive menu icons */
body.portal-theme.admin-portal #visual-math-field::part(menu-toggle),
body.portal-theme.admin-portal #visual-math-field::part(virtual-keyboard-toggle){
  color:#e8ddbd!important;
  background:rgba(34,211,238,.10)!important;
  border-radius:8px!important;
}

/* Mobile and tablet header polish: no overlaps, no horizontal overflow */
html,body{max-width:100%;overflow-x:hidden!important;}
#navbar{
  display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;
  width:100%!important;box-sizing:border-box!important;
}
.nav-brand,.nav-brand-image-wrap{flex:0 1 auto!important;min-width:0!important;}
.brand-header-logo{object-fit:contain!important;max-width:100%!important;}
.topbar-actions,.nav-actions{display:flex;align-items:center;gap:10px;flex-wrap:nowrap;min-width:0;}
.topbar-actions .btn,.nav-actions .btn{white-space:nowrap!important;}

@media(max-width:900px){
  #navbar{height:auto!important;min-height:78px!important;padding:12px 5%!important;position:sticky!important;top:0!important;}
  .brand-header-logo{height:44px!important;max-width:220px!important;}
  .nav-links,.nav-actions{display:none!important;}
  .hamburger{display:flex!important;flex:0 0 44px!important;}
  .topbar-actions{margin-left:auto!important;gap:8px!important;}
  .topbar-actions .btn{padding:10px 16px!important;font-size:14px!important;min-width:auto!important;}
  body.portal-theme #navbar{display:grid!important;grid-template-columns:1fr auto!important;row-gap:12px!important;}
  body.portal-theme #navbar .nav-brand{grid-column:1/-1!important;justify-self:center!important;}
  body.portal-theme #navbar .topbar-actions{grid-column:1/-1!important;justify-self:center!important;width:100%;justify-content:center!important;flex-wrap:wrap!important;}
  body.portal-theme .brand-header-logo{height:54px!important;max-width:min(320px,86vw)!important;}
  .mobile-menu.open{display:grid!important;gap:10px!important;padding:16px 5%!important;max-height:calc(100vh - 82px)!important;overflow-y:auto!important;}
}

@media(max-width:700px){
  .brand-header-logo{height:38px!important;max-width:180px!important;}
  #hero{display:block!important;min-height:auto!important;padding:26px 5% 42px!important;overflow:hidden!important;}
  #hero .hero-content{max-width:100%!important;transform:none!important;position:relative!important;z-index:2!important;}
  .hero-card{display:none!important;}
  .hero-pill{max-width:100%!important;width:100%!important;box-sizing:border-box!important;white-space:normal!important;font-size:11px!important;line-height:1.45!important;}
  .hero-h1,.hero-h1-one-line{font-size:clamp(34px,10.4vw,48px)!important;line-height:1.05!important;letter-spacing:-.5px!important;margin:24px 0 18px!important;}
  .hero-h1-one-line .reach-text,.hero-h1-one-line em,.hero-main-line{white-space:normal!important;}
  .hero-sub{max-width:100%!important;font-size:15px!important;line-height:1.65!important;margin-bottom:24px!important;}
  .hero-actions{display:grid!important;grid-template-columns:1fr!important;gap:12px!important;margin-top:20px!important;}
  .hero-actions .btn,#hero .btn{width:100%!important;justify-content:center!important;min-height:50px!important;padding:13px 18px!important;}
  .hero-stats{display:grid!important;grid-template-columns:1fr 1fr!important;gap:22px!important;margin-top:28px!important;transform:none!important;}
  .hero-stat-num{font-size:32px!important;}
  .running-strip,.ticker,.admission-strip{max-width:100%!important;overflow:hidden!important;}
  section,.content-wrap{max-width:100%!important;overflow:hidden!important;}
}

@media(max-width:480px){
  #navbar{padding:10px 4%!important;}
  .brand-header-logo{height:34px!important;max-width:166px!important;}
  body.portal-theme .brand-header-logo{height:48px!important;max-width:260px!important;}
  .topbar-actions .btn{font-size:13px!important;padding:9px 14px!important;}
  .app-shell,.admin-shell,.student-shell{padding-left:4%!important;padding-right:4%!important;}
  .panel,.card,.white-card,.content-card{max-width:100%!important;box-sizing:border-box!important;}
}

/* ===== END zz-v8-12-13-hotfix-c-mobile-editor.css ===== */


/* ===== BEGIN zz-v8-12-13-hotfix-d-editor-login.css ===== */
/* V8.12.13 HOTFIX-D: final editor/menu visual cleanup. Loaded last. */
body.portal-theme.admin-portal #question-preview-box .preview-options-stack,
body.portal-theme.admin-portal .math-preview-sheet .preview-options-stack{background:transparent!important;background-image:none!important;box-shadow:none!important;border:0!important;outline:0!important;}
body.portal-theme.admin-portal #question-preview-box .preview-option-row,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-row{display:grid!important;grid-template-columns:52px minmax(0,1fr) 36px!important;align-items:center!important;gap:8px!important;min-height:78px!important;padding:12px 10px 12px 0!important;margin:0!important;background:transparent!important;background-color:transparent!important;background-image:none!important;border:0!important;outline:0!important;box-shadow:none!important;filter:none!important;border-radius:0!important;}
body.portal-theme.admin-portal #question-preview-box .preview-option-row::before,body.portal-theme.admin-portal #question-preview-box .preview-option-row::after,body.portal-theme.admin-portal .math-preview-sheet .preview-option-row::before,body.portal-theme.admin-portal .math-preview-sheet .preview-option-row::after{display:none!important;content:none!important;background:transparent!important;box-shadow:none!important;}
body.portal-theme.admin-portal #question-preview-box .preview-option-row:hover,body.portal-theme.admin-portal .math-preview-sheet .preview-option-row:hover{background:transparent!important;background-image:none!important;box-shadow:none!important;}
body.portal-theme.admin-portal #question-preview-box .preview-option-badge,body.portal-theme.admin-portal #question-preview-box .preview-option-copy,body.portal-theme.admin-portal #question-preview-box .preview-option-copy *,body.portal-theme.admin-portal .math-preview-sheet .preview-option-badge,body.portal-theme.admin-portal .math-preview-sheet .preview-option-copy,body.portal-theme.admin-portal .math-preview-sheet .preview-option-copy *{background:transparent!important;background-color:transparent!important;background-image:none!important;border:0!important;outline:0!important;box-shadow:none!important;filter:none!important;color:#fff4c7!important;-webkit-text-fill-color:#fff4c7!important;opacity:1!important;}
body.portal-theme.admin-portal #question-preview-box .preview-option-copy,body.portal-theme.admin-portal .math-preview-sheet .preview-option-copy{min-width:0!important;width:auto!important;display:flex!important;align-items:center!important;}
body.portal-theme.admin-portal #question-preview-box .preview-option-delete,body.portal-theme.admin-portal .math-preview-sheet .preview-option-delete{position:static!important;transform:none!important;justify-self:end!important;width:30px!important;height:30px!important;border-radius:50%!important;border:1px solid rgba(239,68,68,.52)!important;background:rgba(239,68,68,.14)!important;color:#fff4c7!important;box-shadow:none!important;}
body.portal-theme.admin-portal #question-preview-box .preview-option-delete:hover,body.portal-theme.admin-portal .math-preview-sheet .preview-option-delete:hover{background:rgba(239,68,68,.28)!important;border-color:rgba(239,68,68,.82)!important;}
body.portal-theme.admin-portal #question-preview-box,body.portal-theme.admin-portal #question-preview-box *,body.portal-theme.admin-portal .math-preview-sheet,body.portal-theme.admin-portal .math-preview-sheet *,body.portal-theme.admin-portal #question-preview-box .MathJax,body.portal-theme.admin-portal #question-preview-box .mjx-container,body.portal-theme.admin-portal #question-preview-box .mjx-container *,body.portal-theme.admin-portal #question-preview-box mjx-container,body.portal-theme.admin-portal #question-preview-box mjx-container *{color:#fff4c7!important;-webkit-text-fill-color:#fff4c7!important;fill:#fff4c7!important;stroke:#fff4c7!important;}
.ML__popover,.ML__context-menu,.ML__menu,.ML__menu ul,math-field::part(menu){background:#071126!important;background-color:#071126!important;background-image:none!important;border:1px solid #071126!important;outline:1px solid rgba(240,192,64,.22)!important;box-shadow:0 20px 48px rgba(0,0,0,.62)!important;border-radius:12px!important;overflow:hidden!important;}
.ML__menu li,.ML__menu-item,.ML__context-menu li,.ML__popover li,.ML__menu a,.ML__menu button,.ML__menu [role="menuitem"],.ML__context-menu [role="menuitem"],.ML__popover [role="menuitem"],math-field::part(menu-item){background:#071126!important;background-color:#071126!important;color:#fff4c7!important;-webkit-text-fill-color:#fff4c7!important;border:0!important;outline:0!important;box-shadow:none!important;border-radius:8px!important;transition:background .12s ease,color .12s ease!important;}
.ML__menu li:hover,.ML__menu-item:hover,.ML__context-menu li:hover,.ML__popover li:hover,.ML__menu a:hover,.ML__menu button:hover,.ML__menu [role="menuitem"]:hover,.ML__context-menu [role="menuitem"]:hover,.ML__popover [role="menuitem"]:hover,.ML__menu .ML__menu-item--selected,.ML__menu .is-selected,.ML__menu .selected,.ML__menu .highlighted,.ML__menu li:focus,.ML__menu-item:focus{background:#13243a!important;background-image:linear-gradient(135deg,rgba(240,192,64,.20),rgba(34,211,238,.10))!important;color:#fff8d6!important;-webkit-text-fill-color:#fff8d6!important;}
.ML__menu [aria-disabled="true"],.ML__menu .disabled,.ML__menu .ML__shortcut{color:rgba(255,244,199,.48)!important;-webkit-text-fill-color:rgba(255,244,199,.48)!important;}
body.portal-theme.admin-portal #visual-math-field::part(menu-toggle),body.portal-theme.admin-portal #visual-math-field::part(virtual-keyboard-toggle),body.portal-theme.admin-portal math-field::part(menu-toggle),body.portal-theme.admin-portal math-field::part(virtual-keyboard-toggle){color:#e8ddbd!important;background:rgba(34,211,238,.12)!important;border-radius:8px!important;}
body.portal-theme.admin-portal .v811-build-badge,body.portal-theme.admin-portal [class*="v811"],body.portal-theme.admin-portal [class*="build-badge"]{display:none!important;}

/* V8.12.13 HOTFIX-E: final Visual Equation Editor + deployment cleanup */
/* Force Question Preview options to behave like plain rows: no shaded bars/layers at all. */
body.portal-theme.admin-portal #question-preview-box .preview-options-stack,
body.portal-theme.admin-portal #question-preview-box .preview-options-stack *,
body.portal-theme.admin-portal .math-preview-sheet .preview-options-stack,
body.portal-theme.admin-portal .math-preview-sheet .preview-options-stack *{
  background-color:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
  filter:none!important;
}
body.portal-theme.admin-portal #question-preview-box .preview-option-row,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-row{
  display:grid!important;
  grid-template-columns:52px minmax(0,1fr) 36px!important;
  background:transparent!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  min-height:66px!important;
  padding:8px 10px 8px 0!important;
  margin:0!important;
}
body.portal-theme.admin-portal #question-preview-box .preview-option-row + .preview-option-row,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-row + .preview-option-row{margin-top:10px!important;}
body.portal-theme.admin-portal #question-preview-box .preview-option-badge,
body.portal-theme.admin-portal #question-preview-box .preview-option-copy,
body.portal-theme.admin-portal #question-preview-box .preview-option-copy > *,
body.portal-theme.admin-portal #question-preview-box .preview-option-copy .math-content,
body.portal-theme.admin-portal #question-preview-box .preview-option-copy .MathJax,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-badge,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-copy,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-copy > *,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-copy .math-content,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-copy .MathJax{
  background:transparent!important;
  background-color:transparent!important;
  background-image:none!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
}
body.portal-theme.admin-portal #question-preview-box .preview-correct-line{margin-top:18px!important;}

/* MathLive menu: same dark background as menu items, no off-white frame, obvious hover. */
.ML__popover,.ML__context-menu,.ML__menu,.ML__menu ul,.ML__menu-container,
.ML__submenu,.ML__keyboard-layer,.ML__panel,math-field::part(menu){
  background:#071126!important;
  background-color:#071126!important;
  background-image:none!important;
  border:1px solid #071126!important;
  outline:0!important;
  box-shadow:0 18px 46px rgba(0,0,0,.58), inset 0 0 0 1px rgba(240,192,64,.14)!important;
  border-radius:12px!important;
}
.ML__popover *,.ML__context-menu *,.ML__menu *{
  background-color:#071126!important;
  border-color:#071126!important;
}
.ML__menu li,.ML__menu-item,.ML__context-menu li,.ML__popover li,
.ML__menu a,.ML__menu button,.ML__menu [role="menuitem"],.ML__context-menu [role="menuitem"],.ML__popover [role="menuitem"],
math-field::part(menu-item){
  background:#071126!important;
  color:#fff4c7!important;
  -webkit-text-fill-color:#fff4c7!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  border-radius:8px!important;
}
.ML__menu li:hover,.ML__menu-item:hover,.ML__context-menu li:hover,.ML__popover li:hover,
.ML__menu a:hover,.ML__menu button:hover,.ML__menu [role="menuitem"]:hover,.ML__context-menu [role="menuitem"]:hover,.ML__popover [role="menuitem"]:hover,
.ML__menu li:focus,.ML__menu-item:focus,.ML__context-menu li:focus,.ML__popover li:focus,
.ML__menu .ML__menu-item--selected,.ML__menu .selected,.ML__menu .highlighted,.ML__menu .active{
  background:#13243a!important;
  background-image:linear-gradient(90deg,rgba(240,192,64,.20),rgba(34,211,238,.10))!important;
  color:#fff8d6!important;
  -webkit-text-fill-color:#fff8d6!important;
}
.ML__menu [aria-disabled="true"],.ML__menu .disabled,.ML__menu .ML__shortcut{background:#071126!important;color:rgba(255,244,199,.50)!important;-webkit-text-fill-color:rgba(255,244,199,.50)!important;}

/* Remove extra bordered action wrapper on student result/dashboard header. */
body.portal-theme.student-portal .student-report-actions,
body.portal-theme.student-portal .result-actions,
body.portal-theme.student-portal .dashboard-actions,
body.portal-theme.student-portal .student-card-actions,
body.portal-theme.student-portal .report-top-actions,
body.portal-theme.student-portal .exam-score-actions{
  background:transparent!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
}

/* Final mobile/tablet polish for deployment. */
@media (max-width: 900px){
  body.portal-theme .app-shell,body.portal-theme .student-shell,body.portal-theme .admin-shell{width:100%!important;max-width:100%!important;overflow-x:hidden!important;}
  body.portal-theme .app-header,body.portal-theme .portal-header,body.portal-theme .admin-topbar,body.portal-theme .student-topbar{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:12px!important;padding:18px!important;}
  body.portal-theme .app-header .brand,body.portal-theme .portal-brand,body.portal-theme .nav-brand{width:100%!important;justify-content:flex-start!important;}
  body.portal-theme .app-main,body.portal-theme main{padding:18px!important;}
  body.portal-theme .panel,body.portal-theme .card,body.portal-theme .content-card{max-width:100%!important;overflow:hidden!important;}
  body.portal-theme .table-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;}
  body.portal-theme table{min-width:760px!important;}
}

/* ===== END zz-v8-12-13-hotfix-d-editor-login.css ===== */


/* ===== BEGIN zz-v8-12-13-hotfix-e-final-deploy.css ===== */
/* V8.12.13 HOTFIX-E: final deployment polish */
body.portal-theme.admin-portal #question-preview-box .preview-options-stack,
body.portal-theme.admin-portal #question-preview-box .preview-options-stack *,
body.portal-theme.admin-portal .math-preview-sheet .preview-options-stack,
body.portal-theme.admin-portal .math-preview-sheet .preview-options-stack *{background:transparent!important;background-color:transparent!important;background-image:none!important;box-shadow:none!important;filter:none!important;text-shadow:none!important;}
body.portal-theme.admin-portal #question-preview-box .preview-option-row,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-row{display:grid!important;grid-template-columns:52px minmax(0,1fr) 36px!important;align-items:center!important;gap:8px!important;min-height:66px!important;padding:8px 10px 8px 0!important;margin:0 0 10px 0!important;background:transparent!important;background-color:transparent!important;background-image:none!important;border:0!important;outline:0!important;box-shadow:none!important;border-radius:0!important;}
body.portal-theme.admin-portal #question-preview-box .preview-option-row::before,
body.portal-theme.admin-portal #question-preview-box .preview-option-row::after,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-row::before,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-row::after{display:none!important;content:none!important;background:transparent!important;box-shadow:none!important;}
body.portal-theme.admin-portal #question-preview-box .preview-option-badge,
body.portal-theme.admin-portal #question-preview-box .preview-option-copy,
body.portal-theme.admin-portal #question-preview-box .preview-option-copy > *,
body.portal-theme.admin-portal #question-preview-box .preview-option-copy .math-content,
body.portal-theme.admin-portal #question-preview-box .preview-option-copy .MathJax,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-badge,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-copy,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-copy > *,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-copy .math-content,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-copy .MathJax{background:transparent!important;background-color:transparent!important;background-image:none!important;border:0!important;outline:0!important;box-shadow:none!important;color:#fff4c7!important;-webkit-text-fill-color:#fff4c7!important;fill:#fff4c7!important;stroke:#fff4c7!important;}
body.portal-theme.admin-portal #question-preview-box .preview-option-delete{background:rgba(239,68,68,.15)!important;border:1px solid rgba(239,68,68,.52)!important;}
.ML__popover,.ML__context-menu,.ML__menu,.ML__menu ul,.ML__menu-container,.ML__submenu,.ML__panel,math-field::part(menu){background:#071126!important;background-color:#071126!important;background-image:none!important;border:1px solid #071126!important;outline:0!important;box-shadow:0 18px 46px rgba(0,0,0,.58), inset 0 0 0 1px rgba(240,192,64,.14)!important;border-radius:12px!important;overflow:hidden!important;}
.ML__popover *,.ML__context-menu *,.ML__menu *{border-color:#071126!important;}
.ML__menu li,.ML__menu-item,.ML__context-menu li,.ML__popover li,.ML__menu a,.ML__menu button,.ML__menu [role="menuitem"],.ML__context-menu [role="menuitem"],.ML__popover [role="menuitem"],math-field::part(menu-item){background:#071126!important;background-color:#071126!important;color:#fff4c7!important;-webkit-text-fill-color:#fff4c7!important;border:0!important;outline:0!important;box-shadow:none!important;border-radius:8px!important;}
.ML__menu li:hover,.ML__menu-item:hover,.ML__context-menu li:hover,.ML__popover li:hover,.ML__menu a:hover,.ML__menu button:hover,.ML__menu [role="menuitem"]:hover,.ML__context-menu [role="menuitem"]:hover,.ML__popover [role="menuitem"]:hover,.ML__menu li:focus,.ML__menu-item:focus,.ML__context-menu li:focus,.ML__popover li:focus,.ML__menu .ML__menu-item--selected,.ML__menu .selected,.ML__menu .highlighted,.ML__menu .active{background:#13243a!important;background-image:linear-gradient(90deg,rgba(240,192,64,.20),rgba(34,211,238,.10))!important;color:#fff8d6!important;-webkit-text-fill-color:#fff8d6!important;}
.ML__menu [aria-disabled="true"],.ML__menu .disabled,.ML__menu .ML__shortcut{background:#071126!important;color:rgba(255,244,199,.50)!important;-webkit-text-fill-color:rgba(255,244,199,.50)!important;}
body:not(.portal-theme) .section-header .tag{display:none!important;}
body:not(.portal-theme) .tag::before{display:none!important;content:none!important;}
body.portal-theme .admin-page-intro .tag{display:none!important;}
body.portal-theme.student-portal .student-report-actions,body.portal-theme.student-portal .result-actions,body.portal-theme.student-portal .dashboard-actions,body.portal-theme.student-portal .student-card-actions,body.portal-theme.student-portal .report-top-actions,body.portal-theme.student-portal .exam-score-actions,body.portal-theme.student-portal .student-hero-actions,body.portal-theme.student-portal .attempt-actions{background:transparent!important;border:0!important;outline:0!important;box-shadow:none!important;}
@media (max-width: 900px){body.portal-theme .app-shell,body.portal-theme .student-shell,body.portal-theme .admin-shell{width:100%!important;max-width:100%!important;overflow-x:hidden!important;}body.portal-theme .app-header,body.portal-theme .portal-header,body.portal-theme .admin-topbar,body.portal-theme .student-topbar{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:12px!important;padding:18px!important;}body.portal-theme .app-header .brand,body.portal-theme .portal-brand,body.portal-theme .nav-brand{width:100%!important;justify-content:flex-start!important;}body.portal-theme .app-main,body.portal-theme main{padding:18px!important;}body.portal-theme .panel,body.portal-theme .card,body.portal-theme .content-card{max-width:100%!important;overflow:hidden!important;}body.portal-theme .table-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;}body.portal-theme table{min-width:760px!important;}}

/* ===== END zz-v8-12-13-hotfix-e-final-deploy.css ===== */


/* ===== BEGIN zz-v8-12-13-clean-final.css ===== */
/* V8.12.13 CLEAN FINAL: final replacement layer for editor + MCQ table. */

/* Visual Equation Editor preview: compact, clean, no blue-grey bars */
body.portal-theme.admin-portal #question-preview-box,
body.portal-theme.admin-portal #question-preview-box .math-preview-sheet{background:#071126!important;background-image:none!important;color:#fff4c7!important;}
body.portal-theme.admin-portal #question-preview-box .math-preview-question,
body.portal-theme.admin-portal .math-preview-sheet .math-preview-question{margin:0 0 14px!important;padding:0!important;line-height:1.35!important;color:#fff4c7!important;-webkit-text-fill-color:#fff4c7!important;}
body.portal-theme.admin-portal #question-preview-box .preview-options-stack,
body.portal-theme.admin-portal .math-preview-sheet .preview-options-stack{display:flex!important;flex-direction:column!important;gap:2px!important;margin:6px 0 14px!important;padding:0!important;background:transparent!important;background-color:transparent!important;background-image:none!important;border:0!important;outline:0!important;box-shadow:none!important;filter:none!important;}
body.portal-theme.admin-portal #question-preview-box .preview-option-row,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-row{display:grid!important;grid-template-columns:56px minmax(0,1fr) 36px!important;align-items:center!important;column-gap:10px!important;min-height:52px!important;height:auto!important;max-height:none!important;padding:6px 0!important;margin:0!important;background:transparent!important;background-color:transparent!important;background-image:none!important;border:0!important;outline:0!important;box-shadow:none!important;filter:none!important;border-radius:0!important;overflow:visible!important;}
body.portal-theme.admin-portal #question-preview-box .preview-option-row::before,body.portal-theme.admin-portal #question-preview-box .preview-option-row::after,body.portal-theme.admin-portal #question-preview-box .preview-option-copy::before,body.portal-theme.admin-portal #question-preview-box .preview-option-copy::after,body.portal-theme.admin-portal .math-preview-sheet .preview-option-row::before,body.portal-theme.admin-portal .math-preview-sheet .preview-option-row::after,body.portal-theme.admin-portal .math-preview-sheet .preview-option-copy::before,body.portal-theme.admin-portal .math-preview-sheet .preview-option-copy::after{display:none!important;content:none!important;background:transparent!important;box-shadow:none!important;}
body.portal-theme.admin-portal #question-preview-box .preview-option-row:hover,body.portal-theme.admin-portal .math-preview-sheet .preview-option-row:hover{background:transparent!important;background-color:transparent!important;background-image:none!important;box-shadow:none!important;}
body.portal-theme.admin-portal #question-preview-box .preview-option-badge,body.portal-theme.admin-portal .math-preview-sheet .preview-option-badge{display:flex!important;align-items:center!important;justify-content:flex-start!important;min-height:30px!important;padding:0!important;margin:0!important;background:transparent!important;background-color:transparent!important;background-image:none!important;border:0!important;outline:0!important;box-shadow:none!important;color:#fff4c7!important;-webkit-text-fill-color:#fff4c7!important;font-weight:800!important;}
body.portal-theme.admin-portal #question-preview-box .preview-option-copy,body.portal-theme.admin-portal .math-preview-sheet .preview-option-copy{display:flex!important;align-items:center!important;min-height:30px!important;padding:0!important;margin:0!important;line-height:1.25!important;overflow:visible!important;white-space:normal!important;word-break:normal!important;overflow-wrap:anywhere!important;background:transparent!important;background-color:transparent!important;background-image:none!important;border:0!important;outline:0!important;box-shadow:none!important;color:#fff4c7!important;-webkit-text-fill-color:#fff4c7!important;}
body.portal-theme.admin-portal #question-preview-box .preview-option-copy *,body.portal-theme.admin-portal .math-preview-sheet .preview-option-copy *,body.portal-theme.admin-portal #question-preview-box .math-preview-question *,body.portal-theme.admin-portal .math-preview-sheet .math-preview-question *{background:transparent!important;background-color:transparent!important;background-image:none!important;border:0!important;outline:0!important;box-shadow:none!important;color:#fff4c7!important;-webkit-text-fill-color:#fff4c7!important;}
body.portal-theme.admin-portal #question-preview-box mjx-container,body.portal-theme.admin-portal .math-preview-sheet mjx-container,body.portal-theme.admin-portal #question-preview-box .mjx-container,body.portal-theme.admin-portal .math-preview-sheet .mjx-container{margin:0!important;padding:0!important;overflow:visible!important;display:inline-block!important;vertical-align:middle!important;color:#fff4c7!important;-webkit-text-fill-color:#fff4c7!important;}
body.portal-theme.admin-portal #question-preview-box mjx-container[display="true"],body.portal-theme.admin-portal .math-preview-sheet mjx-container[display="true"]{display:inline-block!important;margin:0!important;}
body.portal-theme.admin-portal #question-preview-box mjx-container svg,body.portal-theme.admin-portal .math-preview-sheet mjx-container svg,body.portal-theme.admin-portal #question-preview-box .mjx-container svg,body.portal-theme.admin-portal .math-preview-sheet .mjx-container svg{overflow:visible!important;max-width:100%!important;}
body.portal-theme.admin-portal #question-preview-box mjx-container svg *,body.portal-theme.admin-portal .math-preview-sheet mjx-container svg *,body.portal-theme.admin-portal #question-preview-box .mjx-container svg *,body.portal-theme.admin-portal .math-preview-sheet .mjx-container svg *{fill:#fff4c7!important;stroke:#fff4c7!important;}
body.portal-theme.admin-portal #question-preview-box .preview-option-delete,body.portal-theme.admin-portal .math-preview-sheet .preview-option-delete{position:static!important;transform:none!important;justify-self:end!important;align-self:center!important;width:30px!important;height:30px!important;margin:0!important;display:flex!important;align-items:center!important;justify-content:center!important;border-radius:999px!important;border:1px solid rgba(239,68,68,.55)!important;background:rgba(239,68,68,.13)!important;color:#fff4c7!important;-webkit-text-fill-color:#fff4c7!important;box-shadow:none!important;}
body.portal-theme.admin-portal #question-preview-box .preview-option-delete:hover,body.portal-theme.admin-portal .math-preview-sheet .preview-option-delete:hover{background:rgba(239,68,68,.28)!important;border-color:rgba(239,68,68,.80)!important;}

/* MathLive menu: same dark color as menu item background, with visible hover */
.ML__popover,.ML__context-menu,.ML__menu,.ML__menu ul,.ML__submenu,.ML__menu-container,.ML__panel,math-field::part(menu){background:#071126!important;background-color:#071126!important;background-image:none!important;border:4px solid #071126!important;outline:0!important;box-shadow:0 20px 48px rgba(0,0,0,.72), inset 0 0 0 1px rgba(240,192,64,.16)!important;border-radius:14px!important;overflow:hidden!important;}
.ML__popover::before,.ML__popover::after,.ML__context-menu::before,.ML__context-menu::after,.ML__menu::before,.ML__menu::after,.ML__submenu::before,.ML__submenu::after{display:none!important;content:none!important;}
.ML__menu li,.ML__menu-item,.ML__context-menu li,.ML__popover li,.ML__menu a,.ML__menu button,.ML__menu [role="menuitem"],.ML__context-menu [role="menuitem"],.ML__popover [role="menuitem"],.ML__popover [role="option"],.ML__matrix-cell,.ML__matrix-row button,math-field::part(menu-item){background:#071126!important;background-color:#071126!important;color:#fff4c7!important;-webkit-text-fill-color:#fff4c7!important;border:0!important;outline:0!important;box-shadow:none!important;border-radius:9px!important;transition:background-color .14s ease,color .14s ease,filter .14s ease!important;}
.ML__menu li:hover,.ML__menu-item:hover,.ML__context-menu li:hover,.ML__popover li:hover,.ML__menu a:hover,.ML__menu button:hover,.ML__menu [role="menuitem"]:hover,.ML__context-menu [role="menuitem"]:hover,.ML__popover [role="menuitem"]:hover,.ML__popover [role="option"]:hover,.ML__matrix-cell:hover,.ML__matrix-row button:hover,.astra-menu-hover{background:#13243a!important;background-color:#13243a!important;color:#fff8d6!important;-webkit-text-fill-color:#fff8d6!important;filter:brightness(1.08)!important;}
.ML__menu li:hover *,.ML__menu-item:hover *,.ML__context-menu li:hover *,.ML__popover li:hover *,.ML__menu a:hover *,.ML__menu button:hover *,.astra-menu-hover *{color:#fff8d6!important;-webkit-text-fill-color:#fff8d6!important;}
.ML__color-swatch,.ML__color-grid button,.ML__popover [style*="background"]{border-color:#071126!important;outline:0!important;}

/* Premium Home-theme editor buttons: no flat blue */
body.portal-theme.admin-portal #show-keyboard-btn,body.portal-theme.admin-portal #insert-equation-btn,body.portal-theme.admin-portal .preview-question-btn,body.portal-theme.admin-portal .row-preview-btn,body.portal-theme.admin-portal .toolbar-action-primary,body.portal-theme.admin-portal .q-modal-card .btn-primary,body.portal-theme.admin-portal .q-modal-card .btn-primary-strong{background:linear-gradient(135deg,#c9961a 0%,#f0c040 58%,#14b8a6 100%)!important;border-color:rgba(255,232,163,.42)!important;color:#04101f!important;-webkit-text-fill-color:#04101f!important;box-shadow:0 12px 28px rgba(240,192,64,.18)!important;}
body.portal-theme.admin-portal #show-keyboard-btn:hover,body.portal-theme.admin-portal #insert-equation-btn:hover,body.portal-theme.admin-portal .preview-question-btn:hover,body.portal-theme.admin-portal .row-preview-btn:hover,body.portal-theme.admin-portal .toolbar-action-primary:hover{filter:brightness(1.06)!important;transform:translateY(-1px)!important;}

/* MCQ exam list: restore hover and fit full card width */
body.portal-theme.student-portal .table-wrap{width:100%!important;overflow-x:auto!important;background:transparent!important;}
body.portal-theme.student-portal .data-table{width:100%!important;min-width:100%!important;table-layout:auto!important;border-collapse:collapse!important;}
body.portal-theme.student-portal .data-table tbody tr{transition:background-color .16s ease,box-shadow .16s ease!important;}
body.portal-theme.student-portal .data-table tbody tr:hover td{background:rgba(240,192,64,.075)!important;box-shadow:inset 0 1px 0 rgba(240,192,64,.16),inset 0 -1px 0 rgba(240,192,64,.10)!important;}
body.portal-theme.student-portal .table-wrap::before,body.portal-theme.student-portal .table-wrap::after,body.portal-theme.student-portal .data-table tr::before,body.portal-theme.student-portal .data-table tr::after,body.portal-theme.student-portal .data-table td::before,body.portal-theme.student-portal .data-table td::after{display:none!important;content:none!important;}

#scholarship .section-header h2,#testimonials .section-header h2{white-space:nowrap!important;font-size:clamp(2rem,4.4vw,4.4rem)!important;}
@media (max-width:760px){#scholarship .section-header h2,#testimonials .section-header h2{white-space:normal!important;font-size:clamp(1.9rem,8.8vw,3rem)!important;}}
@media (max-width:900px){body.portal-theme.admin-portal #question-preview-box .preview-option-row,body.portal-theme.admin-portal .math-preview-sheet .preview-option-row{grid-template-columns:48px minmax(0,1fr) 32px!important;min-height:48px!important;}}

/* ===== END zz-v8-12-13-clean-final.css ===== */


/* ===== BEGIN zz-v8-12-14-editor-perfect.css ===== */
/* =========================================================
   V8.12.14 VISUAL EQUATION EDITOR PERFECT CLEAN LAYER
   Single final editor skin loaded last to remove old layering.
   ========================================================= */
body.portal-theme.admin-portal{
  --vee-bg:#071126;
  --vee-bg-2:#0a1629;
  --vee-surface:#081222;
  --vee-surface-hover:#12233a;
  --vee-gold:#f0c040;
  --vee-gold-soft:#fff4c7;
  --vee-border:rgba(240,192,64,.30);
  --vee-border-strong:rgba(240,192,64,.58);
}

/* Question Preview: remove blue-grey bars and preserve visible math, including a/b slash. */
body.portal-theme.admin-portal #question-preview-box,
body.portal-theme.admin-portal #question-preview-box .math-preview-sheet,
body.portal-theme.admin-portal .math-preview-sheet{
  background:#071126!important;background-color:#071126!important;background-image:none!important;
  border:1px solid var(--vee-border)!important;color:var(--vee-gold-soft)!important;
}
body.portal-theme.admin-portal #question-preview-box .preview-options-stack,
body.portal-theme.admin-portal .math-preview-sheet .preview-options-stack,
body.portal-theme.admin-portal #question-preview-box .preview-option-row,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-row,
body.portal-theme.admin-portal #question-preview-box .preview-option-badge,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-badge,
body.portal-theme.admin-portal #question-preview-box .preview-option-copy,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-copy{
  background:transparent!important;background-color:transparent!important;background-image:none!important;
  border:0!important;outline:0!important;box-shadow:none!important;filter:none!important;
}
body.portal-theme.admin-portal #question-preview-box .preview-option-row,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-row{
  display:grid!important;grid-template-columns:50px minmax(0,1fr) 34px!important;
  align-items:center!important;gap:10px!important;min-height:42px!important;margin:0!important;padding:5px 0!important;
  overflow:visible!important;border-radius:0!important;
}
body.portal-theme.admin-portal #question-preview-box .preview-option-row::before,
body.portal-theme.admin-portal #question-preview-box .preview-option-row::after,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-row::before,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-row::after{display:none!important;content:none!important;}
body.portal-theme.admin-portal #question-preview-box .preview-option-badge,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-badge,
body.portal-theme.admin-portal #question-preview-box .preview-option-copy,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-copy,
body.portal-theme.admin-portal #question-preview-box .preview-option-copy *,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-copy *,
body.portal-theme.admin-portal #question-preview-box .math-preview-question,
body.portal-theme.admin-portal .math-preview-sheet .math-preview-question{
  color:var(--vee-gold-soft)!important;-webkit-text-fill-color:var(--vee-gold-soft)!important;opacity:1!important;
}
body.portal-theme.admin-portal #question-preview-box mjx-container,
body.portal-theme.admin-portal .math-preview-sheet mjx-container{color:var(--vee-gold-soft)!important;overflow:visible!important;}
body.portal-theme.admin-portal #question-preview-box mjx-container svg,
body.portal-theme.admin-portal .math-preview-sheet mjx-container svg{overflow:visible!important;}
body.portal-theme.admin-portal #question-preview-box mjx-container svg g,
body.portal-theme.admin-portal #question-preview-box mjx-container svg path,
body.portal-theme.admin-portal #question-preview-box mjx-container svg line,
body.portal-theme.admin-portal #question-preview-box mjx-container svg rect,
body.portal-theme.admin-portal .math-preview-sheet mjx-container svg g,
body.portal-theme.admin-portal .math-preview-sheet mjx-container svg path,
body.portal-theme.admin-portal .math-preview-sheet mjx-container svg line,
body.portal-theme.admin-portal .math-preview-sheet mjx-container svg rect{
  fill:var(--vee-gold-soft)!important;stroke:var(--vee-gold-soft)!important;stroke-opacity:1!important;
}
body.portal-theme.admin-portal #question-preview-box mjx-container svg path[data-c],
body.portal-theme.admin-portal .math-preview-sheet mjx-container svg path[data-c]{stroke-width:0!important;}

/* Editor field and MathLive toggles. */
body.portal-theme.admin-portal #visual-math-field,
body.portal-theme.admin-portal .math-live-wrap{
  background:linear-gradient(180deg,#071126,#09182d)!important;color:var(--vee-gold-soft)!important;
  border:1px solid var(--vee-border)!important;border-radius:18px!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.025),0 18px 42px rgba(0,0,0,.34)!important;
}
body.portal-theme.admin-portal #visual-math-field:focus-within{border-color:var(--vee-border-strong)!important;box-shadow:0 0 0 3px rgba(240,192,64,.12),0 20px 44px rgba(0,0,0,.38)!important;}
body.portal-theme.admin-portal #visual-math-field::part(menu-toggle),
body.portal-theme.admin-portal #visual-math-field::part(virtual-keyboard-toggle){
  color:var(--vee-gold-soft)!important;background:rgba(240,192,64,.12)!important;border:1px solid rgba(240,192,64,.24)!important;border-radius:9px!important;
}
body.portal-theme.admin-portal #visual-math-field::part(menu-toggle):hover,
body.portal-theme.admin-portal #visual-math-field::part(virtual-keyboard-toggle):hover{background:rgba(240,192,64,.22)!important;color:#fff8d6!important;}

/* Buttons: Home-page Astra dark + gold, no blue gradient. */
body.portal-theme.admin-portal .math-target-btn,
body.portal-theme.admin-portal .inline-chip-equation,
body.portal-theme.admin-portal .toolbar-btn,
body.portal-theme.admin-portal .q-modal-card .toolbar-btn,
body.portal-theme.admin-portal #show-keyboard-btn,
body.portal-theme.admin-portal #hide-keyboard-btn,
body.portal-theme.admin-portal #copy-latex-btn,
body.portal-theme.admin-portal #insert-equation-btn,
body.portal-theme.admin-portal .preview-question-btn,
body.portal-theme.admin-portal .row-preview-btn,
body.portal-theme.admin-portal .btn-primary-strong,
body.portal-theme.admin-portal .btn-soft{
  background:linear-gradient(180deg,rgba(10,22,41,.98),rgba(6,13,25,.96))!important;
  border:1px solid var(--vee-border)!important;color:var(--vee-gold-soft)!important;-webkit-text-fill-color:var(--vee-gold-soft)!important;
  box-shadow:0 12px 26px rgba(0,0,0,.28),inset 0 0 0 1px rgba(255,255,255,.025)!important;
}
body.portal-theme.admin-portal #insert-equation-btn,
body.portal-theme.admin-portal #show-keyboard-btn,
body.portal-theme.admin-portal .preview-question-btn,
body.portal-theme.admin-portal .row-preview-btn{
  background:linear-gradient(135deg,#7a570d 0%,#c9961a 54%,#f0c040 100%)!important;color:#06101f!important;-webkit-text-fill-color:#06101f!important;font-weight:900!important;
}
body.portal-theme.admin-portal .math-target-btn:hover,
body.portal-theme.admin-portal .inline-chip-equation:hover,
body.portal-theme.admin-portal .toolbar-btn:hover,
body.portal-theme.admin-portal .q-modal-card .toolbar-btn:hover,
body.portal-theme.admin-portal #show-keyboard-btn:hover,
body.portal-theme.admin-portal #hide-keyboard-btn:hover,
body.portal-theme.admin-portal #copy-latex-btn:hover,
body.portal-theme.admin-portal #insert-equation-btn:hover,
body.portal-theme.admin-portal .preview-question-btn:hover,
body.portal-theme.admin-portal .row-preview-btn:hover,
body.portal-theme.admin-portal .btn-primary-strong:hover,
body.portal-theme.admin-portal .btn-soft:hover{
  transform:translateY(-1px)!important;filter:brightness(1.08)!important;border-color:var(--vee-border-strong)!important;box-shadow:0 16px 32px rgba(0,0,0,.34),0 0 0 3px rgba(240,192,64,.10)!important;
}

/* MathLive menu: no white/off-white boundary; strong hover; preserve color-grid functionality. */
.ML__popover,.ML__context-menu,.ML__menu,.ML__menu ul,.ML__submenu,.ML__menu-container,.ML__panel,math-field::part(menu){
  background:#071126!important;background-color:#071126!important;background-image:none!important;
  border:1px solid #071126!important;outline:0!important;border-radius:14px!important;
  box-shadow:0 22px 52px rgba(0,0,0,.72),inset 0 0 0 1px rgba(240,192,64,.16)!important;overflow:hidden!important;
}
.ML__menu li,.ML__menu-item,.ML__context-menu li,.ML__popover li,.ML__menu a,.ML__menu button,.ML__menu [role="menuitem"],.ML__context-menu [role="menuitem"],.ML__popover [role="menuitem"],.ML__popover [role="option"],math-field::part(menu-item){
  background:#071126!important;background-color:#071126!important;color:var(--vee-gold-soft,#fff4c7)!important;-webkit-text-fill-color:var(--vee-gold-soft,#fff4c7)!important;border:0!important;outline:0!important;box-shadow:none!important;border-radius:9px!important;
  transition:background-color .14s ease,color .14s ease,filter .14s ease!important;
}
.ML__menu li:hover,.ML__menu-item:hover,.ML__context-menu li:hover,.ML__popover li:hover,.ML__menu a:hover,.ML__menu button:hover,.ML__menu [role="menuitem"]:hover,.ML__context-menu [role="menuitem"]:hover,.ML__popover [role="menuitem"]:hover,.ML__popover [role="option"]:hover,.ML__menu .is-selected,.ML__menu .selected,.ML__menu .highlighted,.astra-menu-hover{
  background:#13243a!important;background-color:#13243a!important;background-image:none!important;color:#fff8d6!important;-webkit-text-fill-color:#fff8d6!important;filter:brightness(1.08)!important;
}
.ML__menu .ML__shortcut{color:rgba(255,244,199,.48)!important;-webkit-text-fill-color:rgba(255,244,199,.48)!important;}
.ML__color-grid,.ML__color-palette{background:#071126!important;background-color:#071126!important;}
.ML__color-swatch,.ML__color-grid button,.ML__popover .ML__color-swatch,.ML__popover [class*="swatch"]{
  border:2px solid #071126!important;outline:1px solid rgba(255,255,255,.08)!important;border-radius:9px!important;box-shadow:none!important;cursor:pointer!important;
}
.ML__color-swatch:hover,.ML__color-grid button:hover,.ML__popover [class*="swatch"]:hover{outline:2px solid rgba(240,192,64,.72)!important;filter:brightness(1.10)!important;}

/* ===== END zz-v8-12-14-editor-perfect.css ===== */


/* ===== BEGIN zz-v8-12-23-mathlive-menu-final.css ===== */

/* V8.12.23 FINAL: MathLive original three-line menu - Astra dark border + real hover. */
:root{--astra-menu-bg:#071126;--astra-menu-hover:#13243a;--astra-menu-text:#fff4c7;--astra-menu-hot:#fff8d6;--astra-gold:#f0c040;}
body.portal-theme.admin-portal .ML__popover,
body.portal-theme.admin-portal .ML__context-menu,
body.portal-theme.admin-portal .ML__menu,
body.portal-theme.admin-portal .ML__menu ul,
body.portal-theme.admin-portal .ML__submenu,
body.portal-theme.admin-portal .ML__menu-container,
body.portal-theme.admin-portal .ML__panel,
.ML__popover,.ML__context-menu,.ML__menu,.ML__menu ul,.ML__submenu,.ML__menu-container,.ML__panel,
math-field::part(menu), math-field::part(popover), math-field::part(panel){
  background:var(--astra-menu-bg)!important;
  background-color:var(--astra-menu-bg)!important;
  background-image:none!important;
  border-color:var(--astra-menu-bg)!important;
  outline:0!important;
  box-shadow:0 22px 52px rgba(0,0,0,.72), inset 0 0 0 1px rgba(240,192,64,.14)!important;
}
body.portal-theme.admin-portal .ML__popover *, body.portal-theme.admin-portal .ML__context-menu *, body.portal-theme.admin-portal .ML__menu *,
.ML__popover *, .ML__context-menu *, .ML__menu *{
  border-color:var(--astra-menu-bg)!important;
  outline-color:var(--astra-menu-bg)!important;
}
body.portal-theme.admin-portal .ML__menu li,
body.portal-theme.admin-portal .ML__menu-item,
body.portal-theme.admin-portal .ML__context-menu li,
body.portal-theme.admin-portal .ML__popover li,
body.portal-theme.admin-portal .ML__popover button,
body.portal-theme.admin-portal .ML__menu button,
body.portal-theme.admin-portal .ML__menu a,
body.portal-theme.admin-portal .ML__menu [role="menuitem"],
body.portal-theme.admin-portal .ML__popover [role="menuitem"],
body.portal-theme.admin-portal .ML__popover [role="option"],
body.portal-theme.admin-portal .ML__matrix-cell,
body.portal-theme.admin-portal .ML__matrix-row button,
.ML__menu li,.ML__menu-item,.ML__context-menu li,.ML__popover li,.ML__popover button,.ML__menu button,.ML__menu a,
.ML__menu [role="menuitem"],.ML__popover [role="menuitem"],.ML__popover [role="option"],.ML__matrix-cell,.ML__matrix-row button,
math-field::part(menu-item){
  background:var(--astra-menu-bg)!important;
  background-color:var(--astra-menu-bg)!important;
  background-image:none!important;
  color:var(--astra-menu-text)!important;
  -webkit-text-fill-color:var(--astra-menu-text)!important;
  border-color:var(--astra-menu-bg)!important;
  outline:0!important;
  box-shadow:none!important;
  transition:background-color .12s ease,color .12s ease,filter .12s ease,transform .12s ease!important;
}
body.portal-theme.admin-portal .ML__menu li:hover,
body.portal-theme.admin-portal .ML__menu-item:hover,
body.portal-theme.admin-portal .ML__context-menu li:hover,
body.portal-theme.admin-portal .ML__popover li:hover,
body.portal-theme.admin-portal .ML__popover button:hover,
body.portal-theme.admin-portal .ML__menu button:hover,
body.portal-theme.admin-portal .ML__menu a:hover,
body.portal-theme.admin-portal .ML__menu [role="menuitem"]:hover,
body.portal-theme.admin-portal .ML__popover [role="menuitem"]:hover,
body.portal-theme.admin-portal .ML__popover [role="option"]:hover,
body.portal-theme.admin-portal .ML__matrix-cell:hover,
body.portal-theme.admin-portal .ML__matrix-row button:hover,
.ML__menu li:hover,.ML__menu-item:hover,.ML__context-menu li:hover,.ML__popover li:hover,.ML__popover button:hover,.ML__menu button:hover,.ML__menu a:hover,
.ML__menu [role="menuitem"]:hover,.ML__popover [role="menuitem"]:hover,.ML__popover [role="option"]:hover,.ML__matrix-cell:hover,.ML__matrix-row button:hover,
.astra-menu-hover{
  background:var(--astra-menu-hover)!important;
  background-color:var(--astra-menu-hover)!important;
  background-image:linear-gradient(90deg,rgba(240,192,64,.18),rgba(34,211,238,.08))!important;
  color:var(--astra-menu-hot)!important;
  -webkit-text-fill-color:var(--astra-menu-hot)!important;
  filter:brightness(1.08)!important;
}
.ML__matrix-cell:hover,.ML__matrix-row button:hover,.astra-matrix-hover{transform:scale(1.05)!important;box-shadow:0 0 0 2px rgba(240,192,64,.42)!important;}
.ML__color-swatch,.ML__color-grid button,.ML__popover [class*="swatch"],.ML__popover [aria-label*="color" i],.ML__popover [title*="color" i]{
  border:2px solid var(--astra-menu-bg)!important;outline:1px solid rgba(255,255,255,.10)!important;box-shadow:none!important;cursor:pointer!important;-webkit-text-fill-color:initial!important;
}
.ML__color-swatch:hover,.ML__color-grid button:hover,.ML__popover [class*="swatch"]:hover{outline:2px solid rgba(240,192,64,.78)!important;filter:brightness(1.12)!important;}

/* ===== END zz-v8-12-23-mathlive-menu-final.css ===== */


/* ===== BEGIN zz-v8-12-24-final-clean-astra.css ===== */
/* =========================================================
   V8.12.24 FINAL CLEAN ASTRA THEME
   Purpose: remove remaining old light-theme layers safely.
   Loaded last. No PHP/JS functionality changed.
   ========================================================= */
:root{
  --astra-ink:#04080f !important;
  --astra-deep:#071121 !important;
  --astra-panel:#081327 !important;
  --astra-panel-2:#0c1830 !important;
  --astra-panel-3:#101f3d !important;
  --astra-line:rgba(240,192,64,.26) !important;
  --astra-line-soft:rgba(146,173,213,.20) !important;
  --astra-text:#f2dfaa !important;
  --astra-text-strong:#fff3c9 !important;
  --astra-muted:rgba(242,223,170,.74) !important;
  --astra-gold:#f0c040 !important;
  --astra-blue:#7db3ff !important;
  --astra-shadow:0 22px 56px rgba(0,0,0,.42) !important;
}
html,body{
  background:linear-gradient(180deg,var(--astra-ink),var(--astra-deep) 55%,var(--astra-ink)) !important;
  color:var(--astra-text) !important;
}
body::before,body::after,.app-shell::before,.student-shell::before,.admin-shell::before,.exam-shell::before{
  background-color:transparent !important;
}
/* Kill Bootstrap/light utility leftovers */
.bg-white,.bg-light,.bg-body,.bg-secondary,.text-bg-light,
[class*="bg-white"],[class*="bg-light"],.white-card,.light-card,.light-panel,
.card.bg-white,.card.bg-light,.panel.bg-white,.panel.bg-light{
  background:linear-gradient(180deg,rgba(8,19,39,.98),rgba(12,24,48,.93)) !important;
  background-color:var(--astra-panel) !important;
  color:var(--astra-text) !important;
  border-color:var(--astra-line) !important;
}
.text-dark,.text-body,.text-black,[class*="text-dark"]{color:var(--astra-text) !important;}
.text-muted,.muted,.small-muted,.help-text,.form-text,small{color:var(--astra-muted) !important;}
/* Single Astra surface language for portals, admin, exam and editor */
.card,.panel,.box,.portal-box,.dashboard-card,.student-card,.admin-card,.content-card,.app-card,.glass-card,
.feature-card,.info-card,.course-card,.result-card,.lesson-card,.payment-card,.form-card,.login-card,.table-wrap,
.kpi,.stat-box,.stats-tile,.mini-panel,.quick-admin-card,.gateway-card,.quick-link,.question-review-card,.review-option,
.preview-panel,.question-preview,.math-preview-card,.math-authoring-card,.editor-card,.math-editor-panel,.math-preview-panel,
.nta-question-card,.nta-question-surface,.nta-section-tab,.nta-candidate-card,.nta-top-candidate-card,.nta-count-box,
.nta-timer-panel,.exam-card,.exam-sidebar-card,.palette-card,.timer-card,.summary-card,.q-modal-card,
[class$="-card"],[class*=" card"],[class*="-panel"]{
  background:linear-gradient(180deg,rgba(8,19,39,.98),rgba(12,24,48,.92)) !important;
  background-color:var(--astra-panel) !important;
  color:var(--astra-text) !important;
  border:1px solid var(--astra-line) !important;
  box-shadow:var(--astra-shadow) !important;
}
/* Avoid accidental pale inner patches */
.card > div,.panel > div,.box > div,.table-wrap > div,.q-modal-card > div,
.math-preview-card > div,.question-preview > div,.preview-panel > div{
  background-color:transparent;
}
h1,h2,h3,h4,h5,h6,.page-title,.section-title,.card-title,.course-title,.sidebar-title,label,th,
.question-text-block,.question-part,.option-text,.exam-text,.nta-option-copy{
  color:var(--astra-text-strong) !important;
}
p,li,td,.card p,.panel p,.form-label,.exam-meta,.math-preview-meta{color:var(--astra-muted) !important;}
a:not(.btn){color:var(--astra-gold) !important;}
/* Forms */
input,select,textarea,.form-control,.form-select,math-field,#visual-math-field,.premium-mathfield,.modal-mathfield{
  background:linear-gradient(180deg,rgba(4,8,15,.96),rgba(9,20,42,.94)) !important;
  background-color:#050b18 !important;
  color:var(--astra-text-strong) !important;
  border:1px solid rgba(240,192,64,.30) !important;
  box-shadow:none !important;
}
input::placeholder,textarea::placeholder{color:rgba(242,223,170,.46) !important;}
select option{background:#081327 !important;color:var(--astra-text-strong) !important;}
/* Tables */
table,.data-table,.table{background:transparent !important;color:var(--astra-text) !important;}
thead,thead tr,.data-table thead,.table thead{
  background:linear-gradient(180deg,#142a50,#0b1a35) !important;
  color:var(--astra-text-strong) !important;
}
tbody tr,tbody td,.table td,.data-table td{background-color:transparent !important;border-color:rgba(240,192,64,.14) !important;}
tbody tr:hover td{background:rgba(240,192,64,.06) !important;}
/* Visual Equation Editor and previews: remove remaining white sheets */
.math-live-wrap,.math-preview-sheet,.preview-box,.preview-option-row,.preview-media img,
.preview-correct-line,.preview-explanation-block,.shared-equation-card{
  background:linear-gradient(180deg,rgba(4,8,15,.98),rgba(12,24,48,.94)) !important;
  background-color:var(--astra-panel) !important;
  color:var(--astra-text-strong) !important;
  border-color:rgba(240,192,64,.24) !important;
  box-shadow:none !important;
}
.math-preview-sheet *,.preview-option-row *,.preview-box *{color:inherit !important;}
.preview-explanation-head{
  background:rgba(240,192,64,.13) !important;
  border-color:rgba(240,192,64,.30) !important;
  color:var(--astra-gold) !important;
}
#visual-math-field::part(content),math-field::part(content){color:var(--astra-text-strong) !important;}
#visual-math-field::part(placeholder),math-field::part(placeholder){color:rgba(242,223,170,.50) !important;}
#visual-math-field::part(menu-toggle),#visual-math-field::part(virtual-keyboard-toggle),
math-field::part(menu-toggle),math-field::part(virtual-keyboard-toggle){color:var(--astra-gold) !important;}
/* Editor toolbar buttons */
.toolbar-grid-premium .toolbar-btn,.toolbar-grid-icons .toolbar-btn,.math-toolbar button,.equation-btn,.insert-equation-btn,.insert-diagram-btn{
  background:linear-gradient(180deg,#182948,#0d1a34) !important;
  color:var(--astra-text-strong) !important;
  border:1px solid rgba(240,192,64,.28) !important;
  box-shadow:none !important;
}
.toolbar-grid-premium .toolbar-btn:hover,.toolbar-grid-icons .toolbar-btn:hover,.math-toolbar button:hover,.equation-btn:hover,.insert-equation-btn:hover,.insert-diagram-btn:hover{
  background:linear-gradient(135deg,#c9961a,#f0c040 58%,#ffe37a) !important;
  color:#04080f !important;
}
.tool-symbol,.tool-label{color:var(--astra-text-strong) !important;}
/* Buttons and chips */
.badge,.pill,.chip,.tag-soft,.status-badge,.exam-chip,.subject-tab,.nta-meta-chip,.nta-topbar-chip,.review-status{
  background:rgba(240,192,64,.12) !important;
  color:var(--astra-gold) !important;
  border:1px solid rgba(240,192,64,.28) !important;
}
.btn-primary,.btn-warning,.btn-gold,.btn-main,.nta-btn-primary,#submitExamBtn,.btn-submit-exam{
  background:linear-gradient(135deg,#c9961a,#f0c040 58%,#ffe37a) !important;
  color:#04080f !important;
  border-color:transparent !important;
  box-shadow:none !important;
}
.btn-secondary,.btn-outline,.btn-ghost,.btn-light{
  background:rgba(242,223,170,.08) !important;
  color:var(--astra-text-strong) !important;
  border:1px solid rgba(240,192,64,.28) !important;
}
/* NTA option and timer surfaces */
.nta-option-item,.option-item{
  background:linear-gradient(180deg,rgba(7,18,38,.95),rgba(10,24,49,.90)) !important;
  border-color:rgba(240,192,64,.18) !important;
  color:var(--astra-text) !important;
}
.nta-option-item:hover,.option-item:hover{background:rgba(201,150,26,.12) !important;border-color:rgba(240,192,64,.46) !important;}
.nta-timer-progress-wrap{background:rgba(242,223,170,.11) !important;border:1px solid rgba(240,192,64,.18) !important;}
/* Dark modal/popover/menu remnants */
.modal-content,.dropdown-menu,.menu,.popover,.tooltip-inner,
.ml__keyboard,.ML__keyboard,.mathlive-virtual-keyboard,.mathlive-menu,.ML__popover{
  background:#081327 !important;
  color:var(--astra-text-strong) !important;
  border-color:rgba(240,192,64,.24) !important;
}
/* Keep printable question paper white only during print. On screen, it follows Astra. */
.question-paper-shell{
  background:linear-gradient(180deg,rgba(8,19,39,.98),rgba(12,24,48,.92)) !important;
  color:var(--astra-text) !important;
}
@media print{
  body{background:#fff !important;color:#111827 !important;}
  .question-paper-shell{background:#fff !important;color:#111827 !important;box-shadow:none !important;border:0 !important;}
  .question-paper-shell *{color:#111827 !important;}
}

/* ===== END zz-v8-12-24-final-clean-astra.css ===== */

/* =========================================================
   V8.12.38 ACTIVE CLEAN EDITOR + PROCTOR INTEGRATION
   Integrated inside active final CSS file. No extra patch stylesheet.
   ========================================================= */
body.portal-theme.admin-portal{
  --ad-editor-bg:#06101f!important;
  --ad-editor-bg2:#071326!important;
  --ad-editor-panel:#09182d!important;
  --ad-editor-panel2:#0b203d!important;
  --ad-editor-gold:#f4c451!important;
  --ad-editor-gold2:#c9961a!important;
  --ad-editor-cream:#fff1b8!important;
  --ad-editor-line:rgba(244,196,81,.42)!important;
  --ad-editor-line-strong:rgba(244,196,81,.78)!important;
}

/* Question page heading: match other Astra headings, not dull blue. */
body.portal-theme.admin-portal .question-title,
body.portal-theme.admin-portal .question-bank-shell .question-title{
  color:var(--ad-editor-gold)!important;
  -webkit-text-fill-color:var(--ad-editor-gold)!important;
  text-shadow:0 0 22px rgba(244,196,81,.13)!important;
}
body.portal-theme.admin-portal .question-kicker,
body.portal-theme.admin-portal .question-kicker::before{
  color:var(--ad-editor-gold)!important;
  background:var(--ad-editor-gold)!important;
}

/* Top editor/preview buttons: no sky-blue hover. */
body.portal-theme.admin-portal #openEquationEditorTop,
body.portal-theme.admin-portal #openQuestionPreviewTop,
body.portal-theme.admin-portal .math-target-btn,
body.portal-theme.admin-portal .row-preview-btn{
  background:linear-gradient(180deg,rgba(10,22,41,.98),rgba(6,13,25,.96))!important;
  color:var(--ad-editor-cream)!important;
  -webkit-text-fill-color:var(--ad-editor-cream)!important;
  border:1px solid var(--ad-editor-line)!important;
  box-shadow:0 12px 26px rgba(0,0,0,.28),inset 0 0 0 1px rgba(255,255,255,.035)!important;
  filter:none!important;
}
body.portal-theme.admin-portal #openEquationEditorTop:hover,
body.portal-theme.admin-portal #openEquationEditorTop:focus,
body.portal-theme.admin-portal #openQuestionPreviewTop:hover,
body.portal-theme.admin-portal #openQuestionPreviewTop:focus,
body.portal-theme.admin-portal .math-target-btn:hover,
body.portal-theme.admin-portal .row-preview-btn:hover{
  background:linear-gradient(135deg,#7a570d 0%,#c9961a 58%,#f4c451 100%)!important;
  color:#06101f!important;
  -webkit-text-fill-color:#06101f!important;
  border-color:var(--ad-editor-line-strong)!important;
  box-shadow:0 16px 34px rgba(0,0,0,.34),0 0 0 3px rgba(244,196,81,.12)!important;
  transform:translateY(-1px)!important;
  filter:none!important;
}

/* MathLive menus/popovers/matrix cells: replace white borders with Astra gold. */
body.portal-theme.admin-portal .ML__popover,
body.portal-theme.admin-portal .ML__context-menu,
body.portal-theme.admin-portal .ML__menu,
body.portal-theme.admin-portal .ML__menu ul,
body.portal-theme.admin-portal .ML__submenu,
body.portal-theme.admin-portal .ML__menu-container,
body.portal-theme.admin-portal .ML__panel,
.ML__popover,.ML__context-menu,.ML__menu,.ML__menu ul,.ML__submenu,.ML__menu-container,.ML__panel{
  background:#071326!important;
  background-color:#071326!important;
  background-image:none!important;
  color:#fff3c4!important;
  border:1px solid var(--ad-editor-line)!important;
  outline:0!important;
  box-shadow:0 24px 70px rgba(0,0,0,.66), inset 0 0 0 1px rgba(244,196,81,.10)!important;
}
body.portal-theme.admin-portal .ML__menu *,
body.portal-theme.admin-portal .ML__popover *,
body.portal-theme.admin-portal .ML__context-menu *,
.ML__menu *,.ML__popover *,.ML__context-menu *{
  border-color:var(--ad-editor-line)!important;
  outline-color:var(--ad-editor-line)!important;
  box-shadow:none!important;
}
body.portal-theme.admin-portal .ML__matrix-cell,
body.portal-theme.admin-portal .ML__matrix-row button,
body.portal-theme.admin-portal .ML__popover button,
body.portal-theme.admin-portal .ML__menu button,
.ML__matrix-cell,.ML__matrix-row button,.ML__popover button,.ML__menu button{
  background:#071326!important;
  color:#fff3c4!important;
  -webkit-text-fill-color:#fff3c4!important;
  border:1px solid var(--ad-editor-line-strong)!important;
  border-radius:6px!important;
}
body.portal-theme.admin-portal .ML__matrix-cell:hover,
body.portal-theme.admin-portal .ML__matrix-row button:hover,
body.portal-theme.admin-portal .ML__popover button:hover,
body.portal-theme.admin-portal .ML__menu button:hover,
.ML__matrix-cell:hover,.ML__matrix-row button:hover,.ML__popover button:hover,.ML__menu button:hover{
  background:rgba(244,196,81,.18)!important;
  border-color:rgba(244,196,81,.90)!important;
  color:#fff8d6!important;
  -webkit-text-fill-color:#fff8d6!important;
}

/* Menu icon X state. JS adds astra-menu-open/data-menu-open to active math-field. */
#equationModal #visual-math-field.astra-menu-open::part(menu-toggle),
#equationModal #visual-math-field[data-menu-open="true"]::part(menu-toggle),
#equationModal #visual-math-field.astra-menu-open::part(menu-toggle-button),
#equationModal #visual-math-field[data-menu-open="true"]::part(menu-toggle-button){
  color:transparent!important;
  -webkit-text-fill-color:transparent!important;
  border-color:var(--ad-editor-line-strong)!important;
  background-color:rgba(244,196,81,.14)!important;
  background-image:
    linear-gradient(45deg,transparent calc(50% - 1.5px),#fff3c4 calc(50% - 1.5px),#fff3c4 calc(50% + 1.5px),transparent calc(50% + 1.5px)),
    linear-gradient(-45deg,transparent calc(50% - 1.5px),#fff3c4 calc(50% - 1.5px),#fff3c4 calc(50% + 1.5px),transparent calc(50% + 1.5px))!important;
  background-repeat:no-repeat!important;
  background-size:22px 22px!important;
  background-position:center!important;
}

/* Virtual keyboard: one Astra background only, no grey/double backdrop. */
math-virtual-keyboard,
.ML__keyboard,
.MLK__keyboard{
  position:fixed!important;
  left:12px!important;
  right:12px!important;
  bottom:12px!important;
  top:auto!important;
  width:auto!important;
  max-width:none!important;
  max-height:42vh!important;
  overflow:auto!important;
  z-index:1700!important;
  background:#071326!important;
  background-color:#071326!important;
  background-image:none!important;
  color:#fff3c4!important;
  border:1px solid var(--ad-editor-line)!important;
  border-radius:18px!important;
  box-shadow:0 26px 80px rgba(0,0,0,.68),inset 0 0 0 1px rgba(244,196,81,.10)!important;
}
.ML__keyboard *,.MLK__keyboard *,math-virtual-keyboard *{
  background-color:transparent!important;
  border-color:var(--ad-editor-line)!important;
  color:#fff3c4!important;
}
.ML__keyboard-backdrop,.MLK__keyboard-backdrop,.ML__scrim,.ML__modal-backdrop,.ML__keyboard-sink{
  background:transparent!important;
  background-color:transparent!important;
  backdrop-filter:none!important;
  pointer-events:none!important;
}
body.mathlive-keyboard-open,body.ML__keyboard-open{overflow:auto!important;}

/* Equation preview and question preview: single background, no duplicate shaded bars. */
#equationModal #equation-preview-box,
#equationModal #question-preview-box,
#equationModal .premium-preview-box,
#equationModal .math-preview-sheet,
body.portal-theme.admin-portal #question-preview-box,
body.portal-theme.admin-portal #question-preview-box .math-preview-sheet{
  background:#071326!important;
  background-color:#071326!important;
  background-image:none!important;
  box-shadow:none!important;
  color:#fff3c4!important;
  -webkit-text-fill-color:#fff3c4!important;
}
#equationModal #question-preview-box .math-preview-sheet,
body.portal-theme.admin-portal #question-preview-box .math-preview-sheet{
  border:0!important;
  outline:0!important;
  padding:0!important;
}
#equationModal #question-preview-box .preview-options-stack,
#equationModal #question-preview-box .preview-option-row,
#equationModal #question-preview-box .preview-option-badge,
#equationModal #question-preview-box .preview-option-copy,
body.portal-theme.admin-portal #question-preview-box .preview-options-stack,
body.portal-theme.admin-portal #question-preview-box .preview-option-row,
body.portal-theme.admin-portal #question-preview-box .preview-option-badge,
body.portal-theme.admin-portal #question-preview-box .preview-option-copy{
  background:transparent!important;
  background-color:transparent!important;
  background-image:none!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  filter:none!important;
}
#equationModal #question-preview-box .preview-correct-line,
body.portal-theme.admin-portal #question-preview-box .preview-correct-line{
  border-top:0!important;
  margin-top:10px!important;
  padding-top:8px!important;
  background:transparent!important;
  box-shadow:none!important;
}

/* Force MathJax fraction bars, sqrt bars, slash strokes and SVG pieces to remain visible. */
#equationModal mjx-container,
body.portal-theme.admin-portal #question-preview-box mjx-container,
body.portal-theme.admin-portal .preview-box mjx-container{
  color:#fff3c4!important;
  -webkit-text-fill-color:#fff3c4!important;
  overflow:visible!important;
}
#equationModal mjx-container svg,
body.portal-theme.admin-portal #question-preview-box mjx-container svg,
body.portal-theme.admin-portal .preview-box mjx-container svg{
  overflow:visible!important;
}
#equationModal mjx-container svg path,
#equationModal mjx-container svg rect,
#equationModal mjx-container svg line,
body.portal-theme.admin-portal #question-preview-box mjx-container svg path,
body.portal-theme.admin-portal #question-preview-box mjx-container svg rect,
body.portal-theme.admin-portal #question-preview-box mjx-container svg line,
body.portal-theme.admin-portal .preview-box mjx-container svg path,
body.portal-theme.admin-portal .preview-box mjx-container svg rect,
body.portal-theme.admin-portal .preview-box mjx-container svg line{
  fill:#fff3c4!important;
  stroke:#fff3c4!important;
  opacity:1!important;
  visibility:visible!important;
}
#equationModal mjx-line,
body.portal-theme.admin-portal #question-preview-box mjx-line,
body.portal-theme.admin-portal .preview-box mjx-line{
  border-color:#fff3c4!important;
  background:#fff3c4!important;
  opacity:1!important;
}

/* Proctor cards/timeline: remove unwanted outer rectangular outlines around status groups. */
body.portal-theme.admin-portal .proctor-card-statuses,
body.portal-theme.admin-portal .proctor-card-statuses:hover,
body.portal-theme.admin-portal .proctor-card-statuses:focus,
body.portal-theme.admin-portal .proctor-card-statuses:focus-within{
  background:transparent!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  filter:none!important;
}
body.portal-theme.admin-portal .proctor-card-statuses::before,
body.portal-theme.admin-portal .proctor-card-statuses::after{
  display:none!important;
  content:none!important;
}
body.portal-theme.admin-portal .proctor-card-statuses .btn,
body.portal-theme.admin-portal .proctor-card-statuses .btn-outline,
body.portal-theme.admin-portal .proctor-card-statuses .badge-soft,
body.portal-theme.admin-portal .proctor-card-statuses .proctor-risk-badge{
  outline:0!important;
  box-shadow:none!important;
}

/* =========================================================
   V8.12.40 CLEAN ACTIVE EDITOR FIXES — integrated, no patch file
   ========================================================= */
body.portal-theme.admin-portal .question-title,
body.portal-theme.admin-portal .question-bank-shell .question-title{
  color:#f4c451!important;
  -webkit-text-fill-color:#f4c451!important;
  text-shadow:0 0 22px rgba(244,196,81,.16)!important;
}
body.portal-theme.admin-portal .question-kicker{color:#f4c451!important;-webkit-text-fill-color:#f4c451!important;}
body.portal-theme.admin-portal .question-kicker::before{background:#f4c451!important;}

/* MathLive menu surfaces and matrix picker: no white borders. */
body.portal-theme.admin-portal .ML__popover,
body.portal-theme.admin-portal .ML__context-menu,
body.portal-theme.admin-portal .ML__menu,
body.portal-theme.admin-portal .ML__menu ul,
body.portal-theme.admin-portal .ML__submenu,
body.portal-theme.admin-portal .ML__menu-container,
body.portal-theme.admin-portal .ML__panel,
.ML__popover,.ML__context-menu,.ML__menu,.ML__menu ul,.ML__submenu,.ML__menu-container,.ML__panel{
  background:#071326!important;
  background-color:#071326!important;
  background-image:none!important;
  color:#fff1b8!important;
  border:1px solid rgba(244,196,81,.58)!important;
  outline:0!important;
  box-shadow:0 24px 70px rgba(0,0,0,.66),inset 0 0 0 1px rgba(244,196,81,.12)!important;
}
body.portal-theme.admin-portal .ML__popover *,
body.portal-theme.admin-portal .ML__context-menu *,
body.portal-theme.admin-portal .ML__menu *,
.ML__popover *,.ML__context-menu *,.ML__menu *{
  border-color:rgba(244,196,81,.58)!important;
  outline-color:rgba(244,196,81,.58)!important;
}
body.portal-theme.admin-portal .ML__matrix-cell,
body.portal-theme.admin-portal .ML__matrix-row button,
body.portal-theme.admin-portal .ML__popover button,
body.portal-theme.admin-portal .ML__menu button,
.ML__matrix-cell,.ML__matrix-row button,.ML__popover button,.ML__menu button{
  background:#071326!important;
  color:#fff1b8!important;
  -webkit-text-fill-color:#fff1b8!important;
  border:1px solid rgba(244,196,81,.72)!important;
  border-radius:7px!important;
  box-shadow:none!important;
}
body.portal-theme.admin-portal .ML__matrix-cell:hover,
body.portal-theme.admin-portal .ML__matrix-row button:hover,
body.portal-theme.admin-portal .ML__popover button:hover,
body.portal-theme.admin-portal .ML__menu button:hover,
.ML__matrix-cell:hover,.ML__matrix-row button:hover,.ML__popover button:hover,.ML__menu button:hover{
  background:rgba(244,196,81,.18)!important;
  border-color:#f4c451!important;
  color:#fff8d6!important;
  -webkit-text-fill-color:#fff8d6!important;
}

/* Real close overlay for MathLive three-line menu. */
#ad-math-menu-close-overlay{
  position:fixed;
  z-index:1900;
  width:42px;
  height:42px;
  display:none;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  border:1px solid rgba(244,196,81,.72)!important;
  background:#071326!important;
  color:#fff1b8!important;
  -webkit-text-fill-color:#fff1b8!important;
  font-size:32px;
  font-weight:700;
  line-height:1;
  box-shadow:0 10px 24px rgba(0,0,0,.45), inset 0 0 0 1px rgba(244,196,81,.14)!important;
  cursor:pointer;
}
#ad-math-menu-close-overlay.show{display:flex!important;}
#ad-math-menu-close-overlay:hover{background:rgba(244,196,81,.16)!important;border-color:#f4c451!important;}

/* Virtual keyboard: premium Astra surface, visible grid/buttons, no scrollbars. */
math-virtual-keyboard,
.ML__keyboard,
.MLK__keyboard{
  background:#071326!important;
  background-color:#071326!important;
  background-image:none!important;
  color:#fff1b8!important;
  border:1px solid rgba(244,196,81,.50)!important;
  border-radius:18px!important;
  box-shadow:0 26px 80px rgba(0,0,0,.68), inset 0 0 0 1px rgba(244,196,81,.10)!important;
  scrollbar-width:none!important;
}
math-virtual-keyboard::-webkit-scrollbar,.ML__keyboard::-webkit-scrollbar,.MLK__keyboard::-webkit-scrollbar{display:none!important;width:0!important;height:0!important;}
.ML__keyboard button,.MLK__keyboard button,math-virtual-keyboard button,.ML__keyboard .keycap,.MLK__keyboard .keycap{
  background:#09182d!important;
  background-color:#09182d!important;
  border:1px solid rgba(244,196,81,.38)!important;
  color:#fff1b8!important;
  -webkit-text-fill-color:#fff1b8!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.025)!important;
}
.ML__keyboard button:hover,.MLK__keyboard button:hover,math-virtual-keyboard button:hover{
  background:rgba(244,196,81,.16)!important;
  border-color:#f4c451!important;
}

/* Editor/preview scrollbars removed but content remains usable. */
#equationModal .premium-equation-card,
#equationModal .premium-preview-box,
#equationModal .premium-math-shell,
#equationModal math-field{
  scrollbar-width:none!important;
}
#equationModal .premium-equation-card::-webkit-scrollbar,
#equationModal .premium-preview-box::-webkit-scrollbar,
#equationModal .premium-math-shell::-webkit-scrollbar,
#equationModal math-field::-webkit-scrollbar{display:none!important;width:0!important;height:0!important;}

/* Force MathJax fractions, radicals, vinculum bars and slash strokes visible. */
#equationModal mjx-container,
body.portal-theme.admin-portal #question-preview-box mjx-container,
body.portal-theme.admin-portal .inline-render-box mjx-container,
body.portal-theme.admin-portal .preview-box mjx-container{
  color:#fff1b8!important;
  -webkit-text-fill-color:#fff1b8!important;
  overflow:visible!important;
}
#equationModal mjx-container svg,
body.portal-theme.admin-portal #question-preview-box mjx-container svg,
body.portal-theme.admin-portal .inline-render-box mjx-container svg,
body.portal-theme.admin-portal .preview-box mjx-container svg{overflow:visible!important;}
#equationModal mjx-container svg path,
#equationModal mjx-container svg line,
#equationModal mjx-container svg rect,
body.portal-theme.admin-portal #question-preview-box mjx-container svg path,
body.portal-theme.admin-portal #question-preview-box mjx-container svg line,
body.portal-theme.admin-portal #question-preview-box mjx-container svg rect,
body.portal-theme.admin-portal .inline-render-box mjx-container svg path,
body.portal-theme.admin-portal .inline-render-box mjx-container svg line,
body.portal-theme.admin-portal .inline-render-box mjx-container svg rect,
body.portal-theme.admin-portal .preview-box mjx-container svg path,
body.portal-theme.admin-portal .preview-box mjx-container svg line,
body.portal-theme.admin-portal .preview-box mjx-container svg rect{
  opacity:1!important;
  visibility:visible!important;
}
#equationModal mjx-container svg [stroke],
body.portal-theme.admin-portal #question-preview-box mjx-container svg [stroke],
body.portal-theme.admin-portal .inline-render-box mjx-container svg [stroke],
body.portal-theme.admin-portal .preview-box mjx-container svg [stroke]{stroke:#fff1b8!important;}
#equationModal mjx-container svg [fill]:not([fill="none"]),
body.portal-theme.admin-portal #question-preview-box mjx-container svg [fill]:not([fill="none"]),
body.portal-theme.admin-portal .inline-render-box mjx-container svg [fill]:not([fill="none"]),
body.portal-theme.admin-portal .preview-box mjx-container svg [fill]:not([fill="none"]){fill:#fff1b8!important;}
#equationModal mjx-line,
body.portal-theme.admin-portal #question-preview-box mjx-line,
body.portal-theme.admin-portal .inline-render-box mjx-line,
body.portal-theme.admin-portal .preview-box mjx-line{
  border-color:#fff1b8!important;
  background:#fff1b8!important;
  opacity:1!important;
}

/* Remove unwanted rectangular outlines in proctor dashboard/timeline only. */
body.portal-theme.admin-portal .proctor-card-statuses,
body.portal-theme.admin-portal .proctor-card-statuses *,
body.portal-theme.admin-portal .timeline-actions,
body.portal-theme.admin-portal .timeline-actions *,
body.portal-theme.admin-portal .event-actions,
body.portal-theme.admin-portal .event-actions *{
  outline:0!important;
}
body.portal-theme.admin-portal .proctor-card-statuses,
body.portal-theme.admin-portal .timeline-actions,
body.portal-theme.admin-portal .event-actions{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
body.portal-theme.admin-portal .proctor-card-statuses::before,
body.portal-theme.admin-portal .proctor-card-statuses::after,
body.portal-theme.admin-portal .timeline-actions::before,
body.portal-theme.admin-portal .timeline-actions::after,
body.portal-theme.admin-portal .event-actions::before,
body.portal-theme.admin-portal .event-actions::after{display:none!important;content:none!important;}


/* Integrated Question Bank final cleanup */
body.portal-theme.admin-portal .question-premium-panel .question-sub{display:none!important;}
body.portal-theme.admin-portal .question-premium-panel .question-topbar::before,
body.portal-theme.admin-portal .question-premium-panel .question-topbar::after,
body.portal-theme.admin-portal .question-premium-panel::before,
body.portal-theme.admin-portal .question-premium-panel::after{display:none!important;content:none!important;background:transparent!important;}
body.portal-theme.admin-portal .clean-add-question-kicker,
body.portal-theme.admin-portal .question-bank-shell .question-kicker.clean-add-question-kicker,
body.portal-theme.admin-portal .clean-add-question-title,
body.portal-theme.admin-portal .question-bank-shell .question-title.clean-add-question-title{color:#f4c451!important;-webkit-text-fill-color:#f4c451!important;text-shadow:0 0 20px rgba(244,196,81,.16)!important;}
body.portal-theme.admin-portal .clean-add-question-kicker::before{background:#f4c451!important;}
body.portal-theme.admin-portal .question-bank-shell .inline-btns .inline-chip-equation,
body.portal-theme.admin-portal .question-bank-shell .inline-btns .inline-chip-diagram,
body.portal-theme.admin-portal .question-bank-shell .inline-btns .option-diagram-btn{background:linear-gradient(180deg,rgba(10,22,41,.98),rgba(6,13,25,.96))!important;border:1px solid rgba(244,196,81,.42)!important;color:#fff1b8!important;-webkit-text-fill-color:#fff1b8!important;box-shadow:0 12px 26px rgba(0,0,0,.28),inset 0 0 0 1px rgba(255,255,255,.025)!important;}
body.portal-theme.admin-portal .question-bank-shell .inline-btns .inline-chip-equation:hover,
body.portal-theme.admin-portal .question-bank-shell .inline-btns .inline-chip-diagram:hover,
body.portal-theme.admin-portal .question-bank-shell .inline-btns .option-diagram-btn:hover{background:linear-gradient(135deg,#7a570d 0%,#c9961a 54%,#f0c040 100%)!important;border-color:rgba(244,196,81,.78)!important;color:#06101f!important;-webkit-text-fill-color:#06101f!important;transform:translateY(-1px)!important;filter:none!important;}


/* V8.12.46 scoped Question Bank header cleanup only */
body.portal-theme.admin-portal .question-premium-panel .clean-add-question-kicker,
body.portal-theme.admin-portal .question-premium-panel .clean-add-question-kicker::before{
  display:none!important;content:none!important;background:transparent!important;
}
body.portal-theme.admin-portal .question-premium-panel .question-topbar{
  display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:16px!important;
}
body.portal-theme.admin-portal .question-premium-panel .q-actions{
  width:100%!important;display:flex!important;justify-content:flex-start!important;align-items:center!important;gap:14px!important;flex-wrap:wrap!important;margin-top:0!important;
}
/* Keep Admin Control Center locked to its normal top alignment; do not let page-fit rules move it down. */
body.portal-theme.admin-portal .app-shell.admin-shell{align-items:start!important;}
body.portal-theme.admin-portal .app-shell.admin-shell>.app-sidebar{align-self:start!important;margin-top:0!important;transform:none!important;}
/* Live Invigilator content fit without changing the sidebar or other pages. */
body.portal-theme.admin-portal .app-main{min-width:0!important;}
body.portal-theme.admin-portal .table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}
body.portal-theme.admin-portal .live-action-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;}


/* V8.12.58 clean targeted corrections: MathLive Decoration visibility + single-color exam MathJax */
body.portal-theme.admin-portal .ML__popover svg,
body.portal-theme.admin-portal .ML__menu svg,
body.portal-theme.admin-portal .ML__context-menu svg{opacity:1!important;visibility:visible!important;color:#fff8d6!important;}
body.portal-theme.admin-portal .ML__popover svg [stroke],
body.portal-theme.admin-portal .ML__menu svg [stroke],
body.portal-theme.admin-portal .ML__context-menu svg [stroke]{stroke:#fff8d6!important;stroke-opacity:1!important;}
body.portal-theme.admin-portal .ML__popover [role="option"],
body.portal-theme.admin-portal .ML__popover [role="menuitem"],
body.portal-theme.admin-portal .ML__menu [role="option"],
body.portal-theme.admin-portal .ML__menu [role="menuitem"],
body.portal-theme.admin-portal .ML__context-menu [role="option"],
body.portal-theme.admin-portal .ML__context-menu [role="menuitem"]{min-height:28px!important;opacity:1!important;color:#fff8d6!important;-webkit-text-fill-color:#fff8d6!important;}
body.portal-theme.admin-portal .ML__popover [style*="background"],
body.portal-theme.admin-portal .ML__menu [style*="background"],
body.portal-theme.admin-portal .ML__context-menu [style*="background"]{outline:1px solid rgba(244,196,81,.82)!important;box-shadow:0 0 0 1px rgba(0,0,0,.55) inset!important;min-width:16px!important;min-height:16px!important;}
body.portal-theme.admin-portal .ML__popover li:hover,
body.portal-theme.admin-portal .ML__menu li:hover,
body.portal-theme.admin-portal .ML__context-menu li:hover,
body.portal-theme.admin-portal .ML__popover [role="option"]:hover,
body.portal-theme.admin-portal .ML__popover [role="menuitem"]:hover,
body.portal-theme.admin-portal .ML__menu [role="option"]:hover,
body.portal-theme.admin-portal .ML__menu [role="menuitem"]:hover{background:linear-gradient(90deg,rgba(244,196,81,.20),rgba(20,184,166,.10))!important;color:#fff8d6!important;-webkit-text-fill-color:#fff8d6!important;}
body.portal-theme.student-portal .question-text-block mjx-container,
body.portal-theme.student-portal .nta-option-copy mjx-container,
body.portal-theme.student-portal .math-content mjx-container,
body.portal-theme.exam-portal .question-text-block mjx-container,
body.portal-theme.exam-portal .nta-option-copy mjx-container,
body.portal-theme.exam-portal .math-content mjx-container{color:#f7e8b8!important;-webkit-text-fill-color:#f7e8b8!important;text-shadow:none!important;background:transparent!important;filter:none!important;}
body.portal-theme.student-portal .question-text-block mjx-container *,
body.portal-theme.student-portal .nta-option-copy mjx-container *,
body.portal-theme.student-portal .math-content mjx-container *,
body.portal-theme.exam-portal .question-text-block mjx-container *,
body.portal-theme.exam-portal .nta-option-copy mjx-container *,
body.portal-theme.exam-portal .math-content mjx-container *{color:inherit!important;-webkit-text-fill-color:inherit!important;text-shadow:none!important;background:transparent!important;filter:none!important;}
body.portal-theme.student-portal .question-text-block mjx-line,
body.portal-theme.student-portal .nta-option-copy mjx-line,
body.portal-theme.exam-portal .question-text-block mjx-line,
body.portal-theme.exam-portal .nta-option-copy mjx-line{border-top-color:#f7e8b8!important;background:#f7e8b8!important;opacity:1!important;}


/* V8.12.77 Question Paper direct equation render */
.question-paper-shell .pdf-direct-equation,
.question-paper-shell mjx-container,
.question-paper-shell mjx-container *{
  color:inherit!important;
  -webkit-text-fill-color:currentColor!important;
}
@media print{
  .question-paper-print-hide{display:none!important;}
  .question-paper-shell .pdf-direct-equation,
  .question-paper-shell mjx-container,
  .question-paper-shell mjx-container *{
    visibility:visible!important;
    opacity:1!important;
  }
}


/* V8.12.90 Exam source-render off-white equation lock */
.exam-question-card .question-text-block mjx-container,
.exam-question-card .question-text-block mjx-container *,
.nta-option-copy mjx-container,
.nta-option-copy mjx-container *,
.exam-question-card .question-text-block mjx-container svg,
.exam-question-card .question-text-block mjx-container svg *,
.nta-option-copy mjx-container svg,
.nta-option-copy mjx-container svg *{
  color:#f6e4a8!important;
  -webkit-text-fill-color:#f6e4a8!important;
  fill:#f6e4a8!important;
  stroke:#f6e4a8!important;
}


/* V8.12.91 Result Review button + graph polish */
body.portal-theme.student-portal .question-review-card .review-status,
body.portal-theme.student-portal .question-review-card .review-status.correct,
body.portal-theme.student-portal .question-review-card .review-status.wrong,
body.portal-theme.student-portal .question-review-card .review-status.unanswered{
  background:linear-gradient(180deg,rgba(8,15,30,.98),rgba(12,24,48,.94))!important;
  color:#f6e4a8!important;
  -webkit-text-fill-color:#f6e4a8!important;
  border:1px solid rgba(240,192,64,.34)!important;
  box-shadow:none!important;
}

body.portal-theme.student-portal .question-review-card .review-status.correct{
  background:linear-gradient(135deg,rgba(12,80,56,.96),rgba(8,55,42,.98))!important;
  border-color:rgba(65,225,145,.40)!important;
  color:#dfffee!important;
  -webkit-text-fill-color:#dfffee!important;
}

body.portal-theme.student-portal .question-review-card .review-status.wrong{
  background:linear-gradient(135deg,rgba(92,24,34,.96),rgba(58,14,24,.98))!important;
  border-color:rgba(255,126,144,.42)!important;
  color:#ffe2e7!important;
  -webkit-text-fill-color:#ffe2e7!important;
}

body.portal-theme.student-portal #accuracySpeedChart{
  display:block!important;
  width:100%!important;
}


/* V8.12.206 REAL VEE PREVIEW FIX: MathLive read-only previews match Math Input and prevent raw LaTeX flash. */
#equationModal math-field.ad-astra-preview-mathfield,
#equation-preview-box math-field.ad-astra-preview-mathfield,
#question-preview-box math-field.ad-astra-preview-mathfield,
.inline-render-box math-field.ad-astra-preview-mathfield,
.saved-question-render math-field.ad-astra-preview-mathfield{
  display:inline-block !important;
  width:auto !important;
  min-width:0 !important;
  max-width:100% !important;
  vertical-align:middle !important;
  padding:0 .08em !important;
  margin:0 .08em !important;
  border:0 !important;
  outline:0 !important;
  box-shadow:none !important;
  background:transparent !important;
  color:#fff4c7 !important;
  -webkit-text-fill-color:#fff4c7 !important;
  font-size:1.08em !important;
  line-height:1.45 !important;
  overflow:visible !important;
}
#equation-preview-box math-field.ad-astra-preview-mathfield{
  font-size:1.28em !important;
}
#equationModal math-field.ad-astra-preview-mathfield::part(virtual-keyboard-toggle),
#equationModal math-field.ad-astra-preview-mathfield::part(menu-toggle){
  display:none !important;
}
#equationModal math-field.ad-astra-preview-mathfield::part(content){
  color:#fff4c7 !important;
  overflow:visible !important;
}


/* === V8.12.266 REAL BLUE TEXT REPLACEMENT FALLBACK === */
[style*="color:#2563eb"],[style*="color: #2563eb"],
[style*="color:#1d4ed8"],[style*="color: #1d4ed8"],
[style*="color:#1e40af"],[style*="color: #1e40af"],
[style*="color:#1e3a8a"],[style*="color: #1e3a8a"],
[style*="color:#183b68"],[style*="color: #183b68"],
[style*="color:#173f73"],[style*="color: #173f73"],
[style*="color:#123b6f"],[style*="color: #123b6f"],
[style*="color:#315d9b"],[style*="color: #315d9b"],
[style*="color:#2f5f9f"],[style*="color: #2f5f9f"]{
  color:#e8ddbd!important;
  -webkit-text-fill-color:#e8ddbd!important;
}
.rendered-math-preview,.math-render-preview,.option-math-preview,.preview-math-box{
  color:#f7e7b8!important;
  -webkit-text-fill-color:#f7e7b8!important;
  opacity:.94!important;
}


/* AD ASTRA live cleanup: hide demo/page-description subtitles in portal/admin pages */
body.portal-theme .section-subtitle,
body.portal-theme .admin-intro-copy,
.admin-shell .section-subtitle,
.student-shell .section-subtitle,
.app-shell .section-subtitle{display:none!important;}


/* =====================================================
   AD ASTRA V8.12.377 — MOBILE/TABLET RESPONSIVE POLISH
   Targeted fixes for header gap, logo consistency, login nav, card padding,
   home-page text visibility, question bank fields, and tablet exam header.
   ===================================================== */
:root{--aa-mobile-page-x:18px;--aa-mobile-card-x:18px;}
.brand-header-logo,
body.portal-theme .brand-header-logo,
#navbar .brand-header-logo{
  height:54px!important;
  width:auto!important;
  max-width:min(320px,62vw)!important;
  object-fit:contain!important;
}
#navbar{
  align-items:center!important;
}
body.portal-theme #navbar,
body.admin-portal #navbar,
body.student-portal #navbar{
  display:flex!important;
  justify-content:space-between!important;
  gap:16px!important;
}
body.portal-theme #navbar .topbar-actions,
body.admin-portal #navbar .topbar-actions,
body.student-portal #navbar .topbar-actions{
  margin-left:auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:10px!important;
  flex-wrap:nowrap!important;
}
body.portal-theme #navbar .topbar-actions .btn,
body.admin-portal #navbar .topbar-actions .btn,
body.student-portal #navbar .topbar-actions .btn{
  min-height:42px!important;
  padding:10px 18px!important;
  line-height:1!important;
  white-space:nowrap!important;
}
/* Home page low contrast fixes */
.course-card .course-meta,
.course-card .course-meta span,
.test-card .test-info,
.test-card .test-info span,
.feature-card p,
.scheme-card p,
.step-card p,
.testi-card p,
.center-card .center-info,
.hero-stat-lbl,
.card p,
[class*="card"] .muted,
[class*="card"] .text-muted{
  color:rgba(246,228,168,.82)!important;
  -webkit-text-fill-color:rgba(246,228,168,.82)!important;
  opacity:1!important;
}
.course-card .course-meta svg,
.course-card .course-meta i,
.test-card .test-info svg,
.test-card .test-info i,
[class*="card"] svg,
[class*="card"] i{
  color:#f0c040!important;
  fill:currentColor!important;
  opacity:1!important;
}
.hero-stat-num,
.step-num,
.process-num,
.rstat-num,
.course-num,
.feature-num,
.testi-quote{
  color:#f0c040!important;
  -webkit-text-fill-color:#f0c040!important;
  opacity:1!important;
}
/* Portal shell gap/card boundaries */
body.portal-theme .app-shell,
body.portal-theme .student-shell,
body.portal-theme .admin-shell,
body.portal-theme main,
body.portal-theme .app-main{
  box-sizing:border-box!important;
}
body.portal-theme .panel,
body.portal-theme .card,
body.portal-theme .content-card,
body.portal-theme .dashboard-banner,
body.portal-theme .login-side-card,
body.portal-theme .exam-shell,
body.portal-theme .nta-exam-shell,
body.portal-theme .compact-exam-shell,
body.portal-theme .question-card,
body.portal-theme .exam-question-card,
body.portal-theme .nta-question-card{
  box-sizing:border-box!important;
  max-width:100%!important;
}
/* Question Bank: prevent clipped placeholder/input text */
body.portal-theme input,
body.portal-theme textarea,
body.portal-theme select,
.question-bank-shell input,
.question-bank-shell textarea,
.question-bank-shell select,
.admin-portal input,
.admin-portal textarea,
.admin-portal select{
  box-sizing:border-box!important;
  max-width:100%!important;
  min-width:0!important;
  text-overflow:clip!important;
}
.question-bank-shell input::placeholder,
.question-bank-shell textarea::placeholder,
.admin-portal input::placeholder,
.admin-portal textarea::placeholder{
  color:rgba(246,228,168,.64)!important;
  opacity:1!important;
  font-size:clamp(11px,2.7vw,13px)!important;
  white-space:normal!important;
}
.question-bank-shell .form-field,
.question-bank-shell .form-grid,
.question-bank-shell .editor-actions,
.admin-portal .form-field,
.admin-portal .form-grid{
  min-width:0!important;
  max-width:100%!important;
}
@media (max-width:900px){
  html,body{overflow-x:hidden!important;}
  .brand-header-logo,
  body.portal-theme .brand-header-logo,
  #navbar .brand-header-logo{
    height:48px!important;
    max-width:min(260px,58vw)!important;
  }
  #navbar,
  body.portal-theme #navbar,
  body.admin-portal #navbar,
  body.student-portal #navbar{
    min-height:auto!important;
    padding:14px var(--aa-mobile-page-x)!important;
    gap:12px!important;
  }
  body.portal-theme #navbar .nav-brand,
  body.portal-theme #navbar .nav-brand-image-wrap,
  #navbar .nav-brand-image-wrap{
    flex:0 1 auto!important;
    width:auto!important;
    min-width:0!important;
  }
  body.portal-theme #navbar .topbar-actions,
  body.admin-portal #navbar .topbar-actions,
  body.student-portal #navbar .topbar-actions{
    flex:0 0 auto!important;
    gap:8px!important;
  }
  body.portal-theme #navbar .topbar-actions .btn,
  body.admin-portal #navbar .topbar-actions .btn,
  body.student-portal #navbar .topbar-actions .btn{
    padding:9px 14px!important;
    font-size:13px!important;
    min-height:38px!important;
    border-radius:999px!important;
  }
  body.portal-theme .app-shell,
  body.portal-theme .student-shell,
  body.portal-theme .admin-shell{
    width:100%!important;
    max-width:100%!important;
    padding:18px var(--aa-mobile-page-x) 28px!important;
    margin:0!important;
  }
  body.portal-theme .app-main,
  body.portal-theme main{
    padding:18px var(--aa-mobile-page-x) 28px!important;
    margin:0!important;
  }
  body.portal-theme .panel,
  body.portal-theme .card,
  body.portal-theme .content-card,
  body.portal-theme .dashboard-banner,
  body.portal-theme .login-side-card,
  body.portal-theme .question-card,
  body.portal-theme .exam-question-card,
  body.portal-theme .nta-question-card,
  body.portal-theme .exam-shell,
  body.portal-theme .nta-exam-shell,
  body.portal-theme .compact-exam-shell{
    width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
    padding-left:var(--aa-mobile-card-x)!important;
    padding-right:var(--aa-mobile-card-x)!important;
  }
  body.portal-theme .login-showcase{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:18px!important;
    margin-top:0!important;
  }
  /* keep the pane directly below the header, matching the home page spacing */
  body.portal-theme #navbar + .app-shell,
  body.portal-theme #navbar + main,
  body.portal-theme #navbar + .student-shell,
  body.portal-theme #navbar + .admin-shell{
    padding-top:18px!important;
  }
  .question-bank-shell .editor-actions,
  .question-bank-shell .form-actions,
  .admin-portal .form-actions{
    flex-wrap:wrap!important;
    gap:8px!important;
  }
  .question-bank-shell .btn,
  .admin-portal .question-bank-shell .btn{
    max-width:100%!important;
    white-space:normal!important;
    line-height:1.15!important;
  }
}
@media (max-width:560px){
  :root{--aa-mobile-page-x:16px;--aa-mobile-card-x:16px;}
  .brand-header-logo,
  body.portal-theme .brand-header-logo,
  #navbar .brand-header-logo{
    height:44px!important;
    max-width:min(230px,56vw)!important;
  }
  #navbar,
  body.portal-theme #navbar,
  body.admin-portal #navbar,
  body.student-portal #navbar{
    padding:12px 16px!important;
    border-bottom:1px solid rgba(201,150,26,.34)!important;
  }
  body.portal-theme #navbar .topbar-actions .btn,
  body.admin-portal #navbar .topbar-actions .btn,
  body.student-portal #navbar .topbar-actions .btn{
    padding:8px 12px!important;
    font-size:12px!important;
    min-height:36px!important;
  }
  body.portal-theme .app-shell,
  body.portal-theme .student-shell,
  body.portal-theme .admin-shell,
  body.portal-theme .app-main,
  body.portal-theme main{
    padding-left:16px!important;
    padding-right:16px!important;
  }
}
/* Tablet exam top section: keep desktop-like stacked width and positioning */
@media (min-width:701px) and (max-width:1100px){
  body.portal-theme.exam-portal .nta-exam-shell,
  body.portal-theme.exam-portal .compact-exam-shell,
  body.portal-theme .nta-exam-shell,
  body.portal-theme .compact-exam-shell{
    max-width:1180px!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  body.portal-theme.exam-portal .dashboard-banner,
  body.portal-theme.exam-portal .exam-top-panel,
  body.portal-theme.exam-portal .nta-header-panel{
    display:block!important;
    width:100%!important;
  }
  body.portal-theme.exam-portal .section-row,
  body.portal-theme.exam-portal .subject-row,
  body.portal-theme.exam-portal .subject-tabs,
  body.portal-theme.exam-portal .exam-subjects,
  body.portal-theme.exam-portal .nta-subjects{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:14px!important;
    width:100%!important;
  }
  body.portal-theme.exam-portal .subject-card,
  body.portal-theme.exam-portal .exam-subject,
  body.portal-theme.exam-portal .nta-subject,
  body.portal-theme.exam-portal .subject-tab{
    width:100%!important;
    min-height:86px!important;
    max-height:none!important;
    padding:20px 22px!important;
    margin:0!important;
  }
}


/* AD ASTRA FINAL TABLET EXAM HEADER PARITY — 2026-06-07
   Keeps desktop-like exam header on tablets: profile on right, three subject cards in one row. */
@media (min-width:701px) and (max-width:1100px){
  body.portal-theme.exam-portal .exam-shell,
  body.portal-theme.exam-portal .nta-shell{
    max-width:1180px!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  body.portal-theme.exam-portal .nta-main-card,
  body.portal-theme.exam-portal .exam-card{
    padding-left:26px!important;
    padding-right:26px!important;
  }
  body.portal-theme.exam-portal .nta-topline{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(300px,380px)!important;
    align-items:start!important;
    gap:22px!important;
    width:100%!important;
  }
  body.portal-theme.exam-portal .nta-topline > div:first-child{
    min-width:0!important;
  }
  body.portal-theme.exam-portal .nta-top-candidate-card{
    width:100%!important;
    max-width:380px!important;
    min-width:0!important;
    justify-self:end!important;
    margin-top:70px!important;
    box-sizing:border-box!important;
  }
  body.portal-theme.exam-portal .subject-tabs.nta-section-tabs,
  body.portal-theme.exam-portal .subject-row,
  body.portal-theme.exam-portal .exam-subjects,
  body.portal-theme.exam-portal .nta-subjects{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:14px!important;
    align-items:stretch!important;
    width:100%!important;
  }
  body.portal-theme.exam-portal .subject-tab,
  body.portal-theme.exam-portal .nta-section-tab,
  body.portal-theme.exam-portal .subject-card,
  body.portal-theme.exam-portal .exam-subject,
  body.portal-theme.exam-portal .nta-subject{
    width:auto!important;
    min-width:0!important;
    min-height:82px!important;
    max-height:none!important;
    padding:18px 20px!important;
    margin:0!important;
    box-sizing:border-box!important;
  }
  body.portal-theme.exam-portal .nta-section-name{
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
  body.portal-theme.exam-portal .exam-meta.nta-meta-inline{
    display:flex!important;
    flex-wrap:wrap!important;
    gap:10px!important;
  }
}
@media (min-width:701px) and (max-width:860px){
  body.portal-theme.exam-portal .nta-topline{
    grid-template-columns:minmax(0,1fr) minmax(260px,320px)!important;
  }
  body.portal-theme.exam-portal .nta-top-candidate-card{
    margin-top:58px!important;
    max-width:320px!important;
  }
  body.portal-theme.exam-portal .subject-tab,
  body.portal-theme.exam-portal .nta-section-tab{
    padding:16px 14px!important;
    min-height:76px!important;
  }
}


/* AD ASTRA LAST-MILE TABLET EXAM HEADER ALIGNMENT — 2026-06-07
   Tablet only: raise candidate profile to align with left title/meta; keeps 3 subjects in one row. */
@media (min-width:701px) and (max-width:1100px){
  body.portal-theme.exam-portal .nta-topline{
    align-items:start!important;
  }
  body.portal-theme.exam-portal .nta-top-candidate-card{
    margin-top:0!important;
    align-self:start!important;
    justify-self:end!important;
  }
}
@media (min-width:701px) and (max-width:860px){
  body.portal-theme.exam-portal .nta-top-candidate-card{
    margin-top:0!important;
  }
}


/* =====================================================
   AD ASTRA targeted polish: compact login cards, mobile login header alignment,
   and consistent professional button height across the project.
   Added as a final override only; no functional code changed.
   ===================================================== */
body.portal-theme .btn:not(.toolbar-btn):not(.math-snippet-btn):not(.nta-palette-btn):not(.palette-btn),
body.portal-theme button.btn:not(.toolbar-btn):not(.math-snippet-btn):not(.nta-palette-btn):not(.palette-btn),
body.portal-theme a.btn:not(.toolbar-btn):not(.math-snippet-btn):not(.nta-palette-btn):not(.palette-btn),
body.portal-theme input[type="submit"].btn,
body.portal-theme input[type="button"].btn{
  min-height:40px!important;
  height:auto!important;
  padding:9px 22px!important;
  border-radius:999px!important;
  line-height:1.08!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  white-space:normal!important;
  text-align:center!important;
  box-sizing:border-box!important;
}
body.portal-theme .btn-sm:not(.toolbar-btn):not(.math-snippet-btn):not(.nta-palette-btn):not(.palette-btn){
  min-height:40px!important;
  padding:9px 22px!important;
  font-size:15px!important;
}
body.portal-theme .btn-lg:not(.toolbar-btn):not(.math-snippet-btn):not(.nta-palette-btn):not(.palette-btn){
  min-height:40px!important;
  padding:9px 24px!important;
  font-size:15px!important;
}
body.portal-theme .form-actions{gap:10px!important;align-items:center!important;}

/* Student login card should not stretch like a full dashboard panel on desktop/tablet. */
body.student-login-page #navbar + .app-shell > .panel{
  width:min(100%,780px)!important;
  max-width:780px!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding:38px 44px!important;
}
body.student-login-page #navbar + .app-shell{
  display:block!important;
}

@media (max-width:900px){
  body.student-login-page #navbar + .app-shell > .panel{
    width:100%!important;
    max-width:100%!important;
    padding:32px 26px!important;
  }
}
@media (max-width:560px){
  /* Login pages only: keep the action button beside and vertically aligned with the AD ASTRA logo. */
  body.student-login-page #navbar,
  body.admin-login-page #navbar{
    display:flex!important;
    flex-direction:row!important;
    align-items:flex-start!important;
    justify-content:space-between!important;
    flex-wrap:nowrap!important;
    gap:10px!important;
    padding:14px 16px!important;
  }
  body.student-login-page #navbar .brand-header-logo,
  body.admin-login-page #navbar .brand-header-logo{
    height:38px!important;
    max-width:min(220px,55vw)!important;
  }
  body.student-login-page #navbar .topbar-actions,
  body.admin-login-page #navbar .topbar-actions{
    margin-left:auto!important;
    align-self:flex-start!important;
    margin-top:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    flex-wrap:nowrap!important;
    gap:8px!important;
  }
  body.student-login-page #navbar .topbar-actions .btn,
  body.admin-login-page #navbar .topbar-actions .btn{
    min-height:34px!important;
    padding:7px 14px!important;
    font-size:12px!important;
    line-height:1!important;
  }
  body.student-login-page #navbar + .app-shell > .panel{
    padding:28px 18px!important;
  }
  body.portal-theme .btn:not(.toolbar-btn):not(.math-snippet-btn):not(.nta-palette-btn):not(.palette-btn),
  body.portal-theme button.btn:not(.toolbar-btn):not(.math-snippet-btn):not(.nta-palette-btn):not(.palette-btn),
  body.portal-theme a.btn:not(.toolbar-btn):not(.math-snippet-btn):not(.nta-palette-btn):not(.palette-btn){
    min-height:38px!important;
    padding:8px 18px!important;
    font-size:14px!important;
  }
  body.portal-theme .form-actions{
    gap:8px!important;
  }
}

/* AD ASTRA MOBILE EXAM WIDTH FIX — 2026-06-08
   Target: Student exam page only. Reduces left/right mobile gutters so exam cards get more usable width. */
@media (max-width:700px){
  body.portal-theme.student-portal .exam-window-shell,
  body.portal-theme.student-portal .app-shell:has(.exam-shell),
  body.portal-theme.student-portal .admin-shell:has(.exam-shell){
    padding-left:4px!important;
    padding-right:4px!important;
  }
  body.portal-theme.student-portal .exam-window-main,
  body.portal-theme.student-portal .app-main:has(.exam-shell){
    padding-left:0!important;
    padding-right:0!important;
  }
  body.portal-theme.student-portal .exam-shell,
  body.portal-theme.student-portal .nta-shell,
  body.portal-theme.student-portal .compact-exam-shell,
  body.portal-theme.student-portal .nta-exam-shell{
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
    padding-left:6px!important;
    padding-right:6px!important;
    box-sizing:border-box!important;
  }
  body.portal-theme.student-portal .exam-shell > .exam-card,
  body.portal-theme.student-portal .exam-shell > .nta-main-card,
  body.portal-theme.student-portal .nta-shell > .exam-card,
  body.portal-theme.student-portal .nta-shell > .nta-main-card{
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
    padding-left:12px!important;
    padding-right:12px!important;
    box-sizing:border-box!important;
  }
  body.portal-theme.student-portal .nta-top-candidate-card,
  body.portal-theme.student-portal .subject-tabs,
  body.portal-theme.student-portal .nta-section-tabs,
  body.portal-theme.student-portal .nta-utility-row,
  body.portal-theme.student-portal .nta-question-header,
  body.portal-theme.student-portal .nta-question-card,
  body.portal-theme.student-portal .question-card{
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }
}
@media (max-width:430px){
  body.portal-theme.student-portal .exam-window-shell,
  body.portal-theme.student-portal .app-shell:has(.exam-shell),
  body.portal-theme.student-portal .admin-shell:has(.exam-shell){
    padding-left:2px!important;
    padding-right:2px!important;
  }
  body.portal-theme.student-portal .exam-shell,
  body.portal-theme.student-portal .nta-shell{
    padding-left:4px!important;
    padding-right:4px!important;
  }
  body.portal-theme.student-portal .exam-shell > .exam-card,
  body.portal-theme.student-portal .exam-shell > .nta-main-card,
  body.portal-theme.student-portal .nta-shell > .exam-card,
  body.portal-theme.student-portal .nta-shell > .nta-main-card{
    padding-left:10px!important;
    padding-right:10px!important;
  }
}

@media (min-width:768px) and (max-width:1024px){
.container,.container-fluid,.main-content,.content-wrapper,.page-content,.dashboard-container,.exam-container,.student-container,.admin-container{
padding-left:12px !important;
padding-right:12px !important;
max-width:100% !important;
}
.card,.panel,.exam-layout,.exam-wrapper{
margin-left:0 !important;
margin-right:0 !important;
}
}


/* =====================================================
   AD ASTRA FINAL TABLET WIDTH + FULLSCREEN ALIGNMENT FIX
   Scope: tablet only. Reduces left/right gutters everywhere and lowers
   fullscreen toggle to align with header/logo row. No functional changes.
   ===================================================== */
@media (min-width:701px) and (max-width:1100px){
  :root{
    --aa-tablet-page-x:8px;
    --aa-tablet-card-x:16px;
  }
  html,body{max-width:100%!important;overflow-x:hidden!important;}

  body.portal-theme #navbar,
  body.portal-theme .navbar,
  body.portal-theme .topbar,
  body.portal-theme .app-header,
  body.portal-theme .portal-header,
  body.portal-theme .admin-topbar,
  body.portal-theme .student-topbar{
    padding-left:var(--aa-tablet-page-x)!important;
    padding-right:var(--aa-tablet-page-x)!important;
    margin-left:0!important;
    margin-right:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }

  body.portal-theme .app-shell,
  body.portal-theme .student-shell,
  body.portal-theme .admin-shell,
  body.portal-theme .exam-window-shell,
  body.portal-theme .page-shell,
  body.portal-theme .dashboard-shell,
  body.portal-theme .question-bank-shell,
  body.portal-theme .math-authoring-shell,
  body.portal-theme .math-author-shell,
  body.portal-theme main,
  body.portal-theme .app-main,
  body.portal-theme .main-content,
  body.portal-theme .content-wrapper,
  body.portal-theme .page-content,
  body.portal-theme .container,
  body.portal-theme .container-fluid,
  body.portal-theme .dashboard-container,
  body.portal-theme .exam-container,
  body.portal-theme .student-container,
  body.portal-theme .admin-container,
  body.portal-theme section,
  body.portal-theme .content-wrap{
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
    padding-left:var(--aa-tablet-page-x)!important;
    padding-right:var(--aa-tablet-page-x)!important;
    box-sizing:border-box!important;
  }

  body.portal-theme #navbar + .app-shell,
  body.portal-theme #navbar + .student-shell,
  body.portal-theme #navbar + .admin-shell,
  body.portal-theme #navbar + main{
    padding-top:18px!important;
  }

  body.portal-theme .panel,
  body.portal-theme .card,
  body.portal-theme .content-card,
  body.portal-theme .form-card,
  body.portal-theme .glass-card,
  body.portal-theme .dashboard-card,
  body.portal-theme .main-card,
  body.portal-theme .side-card,
  body.portal-theme .white-card,
  body.portal-theme .result-card,
  body.portal-theme .course-card,
  body.portal-theme .quick-admin-card,
  body.portal-theme .student-overview-card,
  body.portal-theme .student-summary-card,
  body.portal-theme .question-card,
  body.portal-theme .exam-question-card,
  body.portal-theme .nta-question-card,
  body.portal-theme .exam-card,
  body.portal-theme .nta-main-card,
  body.portal-theme .nta-side-card,
  body.portal-theme .dashboard-banner,
  body.portal-theme .login-side-card,
  body.portal-theme .hero-card,
  body.portal-theme .test-card,
  body.portal-theme .faculty-card,
  body.portal-theme .contact-card{
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
    box-sizing:border-box!important;
  }

  body.portal-theme .panel,
  body.portal-theme .card,
  body.portal-theme .content-card,
  body.portal-theme .form-card,
  body.portal-theme .glass-card,
  body.portal-theme .dashboard-card,
  body.portal-theme .main-card,
  body.portal-theme .side-card,
  body.portal-theme .white-card{
    padding-left:var(--aa-tablet-card-x)!important;
    padding-right:var(--aa-tablet-card-x)!important;
  }

  body.portal-theme .grid,
  body.portal-theme .grid-2,
  body.portal-theme .grid-3,
  body.portal-theme .dashboard-grid,
  body.portal-theme .cards-grid,
  body.portal-theme .admin-shell,
  body.portal-theme .exam-layout,
  body.portal-theme .exam-wrapper,
  body.portal-theme .exam-layout-shell,
  body.portal-theme .nta-layout,
  body.portal-theme .nta-topline{
    gap:14px!important;
  }

  body.portal-theme.exam-portal .exam-window-shell,
  body.portal-theme.exam-portal .exam-shell,
  body.portal-theme.exam-portal .nta-shell,
  body.portal-theme.exam-portal .nta-exam-shell,
  body.portal-theme.exam-portal .compact-exam-shell,
  body.portal-theme.student-portal.exam-portal .exam-window-shell,
  body.portal-theme.student-portal.exam-portal .exam-shell,
  body.portal-theme.student-portal.exam-portal .nta-shell,
  body.portal-theme.student-portal.exam-portal .nta-exam-shell,
  body.portal-theme.student-portal.exam-portal .compact-exam-shell{
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
    padding-left:6px!important;
    padding-right:6px!important;
    box-sizing:border-box!important;
  }

  body.portal-theme .table-wrap{max-width:100%!important;overflow-x:auto!important;}
}

/* =====================================================
   AD ASTRA TABLET HEADER OVERLAP FINAL FIX — 2026-06-08
   Scope: tablet only. Keeps the reduced side gutters, restores clean
   vertical breathing room below the header, and prevents page content from
   being clipped under the header. No desktop/mobile or functionality changes.
   ===================================================== */
@media (min-width:701px) and (max-width:1100px){
  :root{
    --aa-tablet-page-x:8px;
    --aa-tablet-card-x:16px;
    --aa-tablet-under-header-gap:22px;
  }

  html, body{
    max-width:100%!important;
    overflow-x:hidden!important;
  }

  body.portal-theme #navbar,
  body.admin-portal #navbar,
  body.student-portal #navbar{
    position:sticky!important;
    top:0!important;
    z-index:1200!important;
    transform:none!important;
    margin:0!important;
    padding-left:var(--aa-tablet-page-x)!important;
    padding-right:var(--aa-tablet-page-x)!important;
    box-sizing:border-box!important;
  }

  body.portal-theme #navbar + .app-shell,
  body.portal-theme #navbar + .student-shell,
  body.portal-theme #navbar + .admin-shell,
  body.portal-theme #navbar + main,
  body.admin-portal #navbar + .app-shell,
  body.admin-portal #navbar + .admin-shell,
  body.admin-portal #navbar + main,
  body.student-portal #navbar + .app-shell,
  body.student-portal #navbar + .student-shell,
  body.student-portal #navbar + main{
    margin-top:0!important;
    padding-top:var(--aa-tablet-under-header-gap)!important;
  }

  body.portal-theme .app-shell,
  body.portal-theme .student-shell,
  body.portal-theme .admin-shell,
  body.portal-theme .page-shell,
  body.portal-theme .dashboard-shell,
  body.portal-theme .question-bank-shell,
  body.portal-theme .math-authoring-shell,
  body.portal-theme .math-author-shell,
  body.portal-theme main,
  body.portal-theme .app-main,
  body.portal-theme .main-content,
  body.portal-theme .content-wrapper,
  body.portal-theme .page-content,
  body.portal-theme .container,
  body.portal-theme .container-fluid,
  body.portal-theme .dashboard-container,
  body.portal-theme .exam-container,
  body.portal-theme .student-container,
  body.portal-theme .admin-container,
  body.portal-theme .content-wrap{
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
    padding-left:var(--aa-tablet-page-x)!important;
    padding-right:var(--aa-tablet-page-x)!important;
    box-sizing:border-box!important;
  }

  body.portal-theme .panel,
  body.portal-theme .card,
  body.portal-theme .content-card,
  body.portal-theme .form-card,
  body.portal-theme .glass-card,
  body.portal-theme .dashboard-card,
  body.portal-theme .main-card,
  body.portal-theme .side-card,
  body.portal-theme .white-card,
  body.portal-theme .result-card,
  body.portal-theme .course-card,
  body.portal-theme .quick-admin-card,
  body.portal-theme .student-overview-card,
  body.portal-theme .student-summary-card,
  body.portal-theme .question-card,
  body.portal-theme .exam-question-card,
  body.portal-theme .nta-question-card,
  body.portal-theme .exam-card,
  body.portal-theme .nta-main-card,
  body.portal-theme .nta-side-card,
  body.portal-theme .dashboard-banner,
  body.portal-theme .login-side-card,
  body.portal-theme .hero-card,
  body.portal-theme .test-card,
  body.portal-theme .faculty-card,
  body.portal-theme .contact-card{
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
    box-sizing:border-box!important;
  }

  body.portal-theme .panel,
  body.portal-theme .card,
  body.portal-theme .content-card,
  body.portal-theme .form-card,
  body.portal-theme .glass-card,
  body.portal-theme .dashboard-card,
  body.portal-theme .main-card,
  body.portal-theme .side-card,
  body.portal-theme .white-card{
    padding-left:var(--aa-tablet-card-x)!important;
    padding-right:var(--aa-tablet-card-x)!important;
  }

  body.portal-theme .grid,
  body.portal-theme .grid-2,
  body.portal-theme .grid-3,
  body.portal-theme .dashboard-grid,
  body.portal-theme .cards-grid,
  body.portal-theme .exam-layout,
  body.portal-theme .exam-wrapper,
  body.portal-theme .exam-layout-shell,
  body.portal-theme .nta-layout,
  body.portal-theme .nta-topline{
    gap:14px!important;
  }

  body.portal-theme.exam-portal .exam-window-shell,
  body.portal-theme.exam-portal .exam-shell,
  body.portal-theme.exam-portal .nta-shell,
  body.portal-theme.exam-portal .nta-exam-shell,
  body.portal-theme.exam-portal .compact-exam-shell,
  body.portal-theme.student-portal.exam-portal .exam-window-shell,
  body.portal-theme.student-portal.exam-portal .exam-shell,
  body.portal-theme.student-portal.exam-portal .nta-shell,
  body.portal-theme.student-portal.exam-portal .nta-exam-shell,
  body.portal-theme.student-portal.exam-portal .compact-exam-shell{
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
    padding-left:6px!important;
    padding-right:6px!important;
    box-sizing:border-box!important;
  }

  body.portal-theme .table-wrap{
    max-width:100%!important;
    overflow-x:auto!important;
  }
}




/* === AD ASTRA FINAL PROJECT FIXES 2026-06-10 ===
   Targeted only: tablet header compact nav, question-author format controls,
   equation preview baseline, and wider x-bar symbols. */
@media (min-width:769px) and (max-width:1180px){
  #navbar{
    height:64px!important;
    min-height:64px!important;
    padding:8px 2.5%!important;
    gap:12px!important;
  }
  #navbar .brand-header-logo{height:42px!important;max-height:42px!important;width:auto!important;max-width:220px!important;}
  #navbar .nav-links{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:14px!important;
    flex:1 1 auto!important;
    min-width:0!important;
    margin:0 8px!important;
    padding:0!important;
  }
  #navbar .nav-links li{display:block!important;list-style:none!important;}
  #navbar .nav-links a{font-size:12px!important;line-height:1!important;white-space:nowrap!important;letter-spacing:.01em!important;padding:6px 0!important;}
  #navbar .nav-actions{display:flex!important;gap:8px!important;flex:0 0 auto!important;}
  #navbar .nav-actions .btn{height:38px!important;min-height:38px!important;padding:0 18px!important;font-size:13px!important;line-height:38px!important;white-space:nowrap!important;}
  #navbar .hamburger{display:none!important;}
  .mobile-menu{display:none!important;}
  #hero{padding-top:96px!important;}
  .app-shell{padding-top:92px!important;}
}
.question-format-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:8px 0 10px;}
.question-format-toolbar .qfmt-btn{height:34px!important;min-height:34px!important;padding:0 13px!important;border-radius:999px!important;font-weight:700!important;}
.rich-preview-card .inline-equation mjx-container[jax="CHTML"],
.question-preview-statement .inline-equation mjx-container[jax="CHTML"],
.question-text-block .inline-equation mjx-container[jax="CHTML"]{
  vertical-align:-0.12em!important;
  line-height:1!important;
  margin:0 .05em!important;
}
.rich-preview-card mjx-mover mjx-mo,
.question-preview-statement mjx-mover mjx-mo,
.question-text-block mjx-mover mjx-mo,
.math-content mjx-mover mjx-mo{
  min-width:.72em!important;
}



/* AD ASTRA targeted tablet header + rich math alignment fixes */
@media (min-width:701px) and (max-width:1180px){
  #navbar{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;min-height:78px!important;height:78px!important;padding:12px 5%!important;width:100%!important;box-sizing:border-box!important;}
  #navbar .nav-brand,#navbar .nav-brand-image-wrap{flex:0 0 auto!important;min-width:0!important;}
  #navbar .brand-header-logo{height:52px!important;max-height:52px!important;width:auto!important;max-width:230px!important;}
  #navbar .nav-links{display:none!important;}
  #navbar .nav-actions{display:flex!important;align-items:center!important;gap:8px!important;margin-left:auto!important;flex:0 0 auto!important;}
  #navbar .nav-actions .btn{height:38px!important;min-height:38px!important;padding:0 14px!important;font-size:12.5px!important;line-height:38px!important;white-space:nowrap!important;}
  #navbar .hamburger{display:flex!important;flex:0 0 40px!important;width:40px!important;height:38px!important;align-items:center!important;justify-content:center!important;margin-left:2px!important;border:1px solid rgba(240,192,64,.25)!important;border-radius:12px!important;background:rgba(240,192,64,.06)!important;}
  #navbar .hamburger span{width:20px!important;height:2px!important;}
  .mobile-menu.open{display:grid!important;gap:10px!important;padding:16px 5%!important;max-height:calc(100vh - 78px)!important;overflow-y:auto!important;}
}
.inline-equation,.display-equation{vertical-align:middle!important;line-height:1!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;}
.inline-equation math-field,.inline-equation .ML__mathlive,.inline-equation .ML__base,.inline-equation .ML__latex{vertical-align:middle!important;transform:translateY(.04em)!important;}
.js-rich-preview .inline-equation,.question-text-block .inline-equation,.question-part .inline-equation,.exam-question-card .inline-equation{position:relative!important;top:.06em!important;}
.inline-equation .ML__overline,.display-equation .ML__overline,.inline-equation .ML__accent,.display-equation .ML__accent{text-decoration-thickness:1.4px!important;}
.inline-equation .ML__overline-line,.display-equation .ML__overline-line,.inline-equation .ML__accent-body,.display-equation .ML__accent-body{border-top-width:1.4px!important;min-width:.72em!important;}
.qfmt-btn{min-width:38px!important;height:34px!important;min-height:34px!important;padding:0 10px!important;font-family:var(--font-sans, Syne, sans-serif)!important;font-weight:800!important;}
.rich-format-help{font-size:12px!important;color:rgba(247,232,184,.72)!important;margin-top:6px!important;}


/* V8.12.381 remaining polish: one-piece B/I control and stable preview equation baseline. */
.inline-format-combo{display:inline-flex!important;align-items:center!important;justify-content:center!important;height:34px!important;border:1px solid rgba(244,196,81,.46)!important;border-radius:999px!important;overflow:hidden!important;background:linear-gradient(180deg,rgba(244,196,81,.14),rgba(244,196,81,.06))!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.08)!important;vertical-align:middle!important;}
.inline-format-combo .inline-format-half{height:32px!important;min-width:34px!important;padding:0 11px!important;border:0!important;border-radius:0!important;background:transparent!important;color:#fff4c7!important;-webkit-text-fill-color:#fff4c7!important;font-family:"Segoe UI",Arial,sans-serif!important;font-size:.9rem!important;font-weight:900!important;line-height:1!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;cursor:pointer!important;}
.inline-format-combo .inline-format-half + .inline-format-half{border-left:1px solid rgba(244,196,81,.38)!important;}
.inline-format-combo .inline-format-half:hover{background:rgba(244,196,81,.18)!important;color:#fff8d6!important;-webkit-text-fill-color:#fff8d6!important;}
.inline-format-combo .inline-format-half em{font-style:italic!important;font-weight:900!important;}
.inline-format-combo .inline-format-half strong{font-weight:900!important;}
#equationModal math-field.ad-astra-preview-mathfield,
#equation-preview-box math-field.ad-astra-preview-mathfield,
#question-preview-box math-field.ad-astra-preview-mathfield,
.inline-render-box math-field.ad-astra-preview-mathfield,
.saved-question-render math-field.ad-astra-preview-mathfield,
.math-preview-sheet math-field.ad-astra-preview-mathfield{
  vertical-align:-0.22em!important;
  transform:translateY(0.08em)!important;
  line-height:1!important;
  min-height:1em!important;
}
.inline-render-box,.math-preview-question,.preview-option-copy,.question-text-block{line-height:1.72!important;}
.math-preview-sheet .math-preview-question{display:block!important;}
.math-preview-sheet .preview-option-copy{align-items:baseline!important;}


/* AD ASTRA ACTUAL FINAL INLINE MATH AND FORMAT FIX */
.question-text-block,
.question-part,
.nta-option-copy,
.rich-preview-card,
.math-content{
  line-height:1.65!important;
}
.question-text-block .inline-equation,
.question-part .inline-equation,
.nta-option-copy .inline-equation,
.rich-preview-card .inline-equation,
.math-content .inline-equation,
.inline-equation{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  vertical-align:middle!important;
  line-height:1!important;
  margin:0 .14em!important;
  padding:0!important;
  position:relative!important;
  top:0!important;
  transform:none!important;
  white-space:nowrap!important;
}
.question-text-block .inline-equation mjx-container,
.question-part .inline-equation mjx-container,
.nta-option-copy .inline-equation mjx-container,
.rich-preview-card .inline-equation mjx-container,
.math-content .inline-equation mjx-container,
.inline-equation mjx-container,
.inline-equation mjx-container[jax="CHTML"],
.inline-equation mjx-container[jax="SVG"]{
  display:inline-block!important;
  vertical-align:middle!important;
  margin:0!important;
  padding:0!important;
  line-height:1!important;
  overflow:visible!important;
  position:static!important;
  transform:none!important;
}
.nta-option-row,
.nta-option,
.option-row{
  align-items:center!important;
}
.question-format-toolbar{display:inline-flex!important;gap:0!important;align-items:center!important;margin:8px 0!important;border:1px solid rgba(244,196,81,.46)!important;border-radius:999px!important;overflow:hidden!important;width:max-content!important;background:linear-gradient(180deg,rgba(244,196,81,.14),rgba(244,196,81,.06))!important;}
.question-format-toolbar .qfmt-btn{border:0!important;border-radius:0!important;min-width:38px!important;height:34px!important;padding:0 12px!important;margin:0!important;background:transparent!important;box-shadow:none!important;cursor:pointer!important;pointer-events:auto!important;}
.question-format-toolbar .qfmt-btn + .qfmt-btn{border-left:1px solid rgba(244,196,81,.35)!important;}
.question-format-toolbar .qfmt-btn:hover{background:rgba(244,196,81,.16)!important;}

/* AD ASTRA FINAL RESTORED: inline equation baseline alignment only.
   This restores the previously correct baseline method and does not touch warning/proctoring or toolbar flash logic. */
.question-text-block,
.question-part,
.question-part-question_text,
.question-text,
.question-content,
.option-text,
.option-content,
.nta-option-copy,
.rich-preview-card,
.math-content,
.inline-render-box,
.math-preview-question,
.preview-option-copy,
.saved-question-render,
.question-paper-question,
.question-paper-option{
  line-height:1.62!important;
}
.question-text-block .inline-equation,
.question-part .inline-equation,
.question-part-question_text .inline-equation,
.question-text .inline-equation,
.question-content .inline-equation,
.option-text .inline-equation,
.option-content .inline-equation,
.nta-option-copy .inline-equation,
.rich-preview-card .inline-equation,
.math-content .inline-equation,
.inline-render-box .inline-equation,
.math-preview-question .inline-equation,
.preview-option-copy .inline-equation,
.saved-question-render .inline-equation,
.question-paper-question .inline-equation,
.question-paper-option .inline-equation,
.inline-equation{
  display:inline-block!important;
  vertical-align:0.02em!important;
  position:static!important;
  top:auto!important;
  transform:none!important;
  line-height:0!important;
  margin:0 .12em!important;
  padding:0!important;
  white-space:nowrap!important;
}
.question-text-block .inline-equation mjx-container,
.question-part .inline-equation mjx-container,
.question-part-question_text .inline-equation mjx-container,
.question-text .inline-equation mjx-container,
.question-content .inline-equation mjx-container,
.option-text .inline-equation mjx-container,
.option-content .inline-equation mjx-container,
.nta-option-copy .inline-equation mjx-container,
.rich-preview-card .inline-equation mjx-container,
.math-content .inline-equation mjx-container,
.inline-render-box .inline-equation mjx-container,
.math-preview-question .inline-equation mjx-container,
.preview-option-copy .inline-equation mjx-container,
.saved-question-render .inline-equation mjx-container,
.question-paper-question .inline-equation mjx-container,
.question-paper-option .inline-equation mjx-container,
.inline-equation mjx-container,
.question-text-block mjx-container[jax="CHTML"],
.question-part mjx-container[jax="CHTML"],
.question-part-question_text mjx-container[jax="CHTML"],
.question-text mjx-container[jax="CHTML"],
.question-content mjx-container[jax="CHTML"],
.option-text mjx-container[jax="CHTML"],
.option-content mjx-container[jax="CHTML"],
.nta-option-copy mjx-container[jax="CHTML"],
.rich-preview-card mjx-container[jax="CHTML"],
.math-content mjx-container[jax="CHTML"],
.question-paper-question mjx-container[jax="CHTML"],
.question-paper-option mjx-container[jax="CHTML"]{
  display:inline-block!important;
  vertical-align:0.02em!important;
  position:static!important;
  top:auto!important;
  transform:none!important;
  line-height:0!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important;
}
.inline-equation math-field,
.inline-equation .ML__mathlive,
.inline-equation .ML__base,
.inline-equation .ML__latex,
#equationModal math-field.ad-astra-preview-mathfield,
#equation-preview-box math-field.ad-astra-preview-mathfield,
#question-preview-box math-field.ad-astra-preview-mathfield,
.inline-render-box math-field.ad-astra-preview-mathfield,
.saved-question-render math-field.ad-astra-preview-mathfield,
.math-preview-sheet math-field.ad-astra-preview-mathfield,
.question-text math-field.ad-astra-preview-mathfield,
.question-content math-field.ad-astra-preview-mathfield,
.option-text math-field.ad-astra-preview-mathfield,
.option-content math-field.ad-astra-preview-mathfield,
.question-paper-question math-field.ad-astra-preview-mathfield,
.question-paper-option math-field.ad-astra-preview-mathfield{
  vertical-align:0.02em!important;
  transform:none!important;
  position:static!important;
  top:auto!important;
  line-height:1!important;
}
.nta-option-row,
.nta-option,
.option-row,
.preview-option-row,
.preview-option-copy{
  align-items:baseline!important;
}
/* Preserve the already-fixed MathType toolbar LaTeX flash behavior. */
#equationModal .premium-toolbar .tool-mathjax-symbol.ad-astra-latex-pending{
  visibility:hidden!important;
}
#equationModal .premium-toolbar .tool-mathjax-symbol.ad-astra-latex-ready{
  visibility:visible!important;
  opacity:1!important;
}

/* AD ASTRA targeted fix: Question Preview math baseline only.
   Keeps exam/PDF warnings and MathType toolbar flash behavior untouched. */
body.portal-theme.admin-portal #question-preview-box .math-preview-question,
body.portal-theme.admin-portal #question-preview-box .preview-option-copy,
body.portal-theme.admin-portal .math-preview-sheet .math-preview-question,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-copy,
.admin-nta-preview .nta-preview-question-text,
.admin-nta-preview .nta-option-text{
  line-height:1.58!important;
}
body.portal-theme.admin-portal #question-preview-box .math-preview-question .inline-equation,
body.portal-theme.admin-portal #question-preview-box .preview-option-copy .inline-equation,
body.portal-theme.admin-portal .math-preview-sheet .math-preview-question .inline-equation,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-copy .inline-equation,
.admin-nta-preview .nta-preview-question-text .inline-equation,
.admin-nta-preview .nta-option-text .inline-equation{
  display:inline-block!important;
  vertical-align:0.18em!important;
  position:relative!important;
  top:0!important;
  transform:none!important;
  margin:0 .12em!important;
  line-height:0!important;
}
body.portal-theme.admin-portal #question-preview-box .math-preview-question mjx-container[jax="CHTML"],
body.portal-theme.admin-portal #question-preview-box .preview-option-copy mjx-container[jax="CHTML"],
body.portal-theme.admin-portal .math-preview-sheet .math-preview-question mjx-container[jax="CHTML"],
body.portal-theme.admin-portal .math-preview-sheet .preview-option-copy mjx-container[jax="CHTML"],
.admin-nta-preview .nta-preview-question-text mjx-container[jax="CHTML"],
.admin-nta-preview .nta-option-text mjx-container[jax="CHTML"]{
  display:inline-block!important;
  vertical-align:0.18em!important;
  position:relative!important;
  top:0!important;
  transform:none!important;
  margin:0!important;
  line-height:0!important;
  overflow:visible!important;
}
body.portal-theme.admin-portal #question-preview-box math-field.ad-astra-preview-mathfield,
body.portal-theme.admin-portal .math-preview-sheet math-field.ad-astra-preview-mathfield{
  display:inline-block!important;
  width:auto!important;
  min-width:0!important;
  min-height:0!important;
  vertical-align:0.18em!important;
  position:relative!important;
  top:0!important;
  transform:none!important;
  line-height:1!important;
}
body.portal-theme.admin-portal #question-preview-box .preview-option-row,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-row{
  align-items:baseline!important;
}
body.portal-theme.admin-portal #question-preview-box .preview-option-badge,
body.portal-theme.admin-portal .math-preview-sheet .preview-option-badge{
  align-self:baseline!important;
  padding-top:.08em!important;
}
/* End targeted Question Preview baseline fix. */



/* V8.12.88 exact Exam/Preview equation parity + professional mobile side navigation */
body.portal-theme .question-text-block,
body.portal-theme .question-part,
body.portal-theme .math-content,
body.portal-theme .nta-option-copy,
body.portal-theme .preview-option-copy,
body.portal-theme .math-preview-question{
  line-height:1.55!important;
  overflow:visible!important;
}
body.portal-theme .inline-equation,
body.portal-theme .display-equation,
body.portal-theme .mathjson-render{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  vertical-align:-0.12em!important;
  line-height:1!important;
  min-height:1.15em!important;
  margin:0 .055em!important;
  padding:0!important;
  overflow:visible!important;
  color:inherit!important;
  -webkit-text-fill-color:inherit!important;
  font-size:1em!important;
}
body.portal-theme .inline-equation mjx-container,
body.portal-theme .display-equation mjx-container,
body.portal-theme .mathjson-render mjx-container,
body.portal-theme .question-text-block mjx-container,
body.portal-theme .nta-option-copy mjx-container,
body.portal-theme .preview-option-copy mjx-container,
body.portal-theme .math-preview-question mjx-container{
  display:inline-block!important;
  vertical-align:middle!important;
  margin:0!important;
  padding:0!important;
  line-height:0!important;
  font-size:1em!important;
  min-width:0!important;
  overflow:visible!important;
  color:inherit!important;
  -webkit-text-fill-color:inherit!important;
  transform:none!important;
}
body.portal-theme .inline-equation mjx-container[jax="CHTML"],
body.portal-theme .display-equation mjx-container[jax="CHTML"],
body.portal-theme .mathjson-render mjx-container[jax="CHTML"]{
  font-size:112%!important;
}
body.portal-theme .question-text-block mjx-container svg,
body.portal-theme .nta-option-copy mjx-container svg,
body.portal-theme .preview-option-copy mjx-container svg,
body.portal-theme .math-preview-question mjx-container svg{
  overflow:visible!important;
  vertical-align:middle!important;
}
body.portal-theme.student-portal .exam-question-card,
body.portal-theme.student-portal .nta-option-copy,
body.portal-theme.admin-portal #question-preview-box,
body.portal-theme.admin-portal .math-preview-sheet{
  font-size:inherit!important;
}
@media (max-width: 1024px){
  body.portal-theme .app-shell.admin-shell{
    grid-template-columns:1fr!important;
    gap:14px!important;
    padding-inline:clamp(10px,2.2vw,18px)!important;
  }
  body.portal-theme .app-shell.admin-shell>.app-sidebar{
    width:100%!important;
    max-width:100%!important;
    position:relative!important;
    top:auto!important;
    max-height:none!important;
    padding:18px!important;
    border-radius:22px!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:10px!important;
    overflow:visible!important;
  }
  body.portal-theme .app-sidebar .tag,
  body.portal-theme .app-sidebar .sidebar-title{
    grid-column:1/-1!important;
    margin:0!important;
  }
  body.portal-theme .app-sidebar a{
    min-height:44px!important;
    height:auto!important;
    padding:10px 12px!important;
    border-radius:14px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    font-size:.92rem!important;
    line-height:1.15!important;
    white-space:normal!important;
  }
}
@media (max-width: 640px){
  body.portal-theme .app-shell.admin-shell>.app-sidebar{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    padding:16px!important;
    gap:9px!important;
  }
  body.portal-theme .app-sidebar .sidebar-title{
    font-size:1.45rem!important;
  }
  body.portal-theme .app-sidebar a{
    min-height:40px!important;
    padding:9px 10px!important;
    font-size:.86rem!important;
  }
}


/* AD ASTRA targeted final: professional Tablet/Mobile sidebar menu + Exam equation parity. */
.sidebar-head-row{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;}
.sidebar-head-row .sidebar-title{margin:0!important;}
.sidebar-menu-toggle{display:none;align-items:center;justify-content:center;flex-direction:column;gap:4px;width:42px;height:38px;border-radius:13px;border:1px solid rgba(240,192,64,.34);background:linear-gradient(180deg,rgba(242,223,170,.14),rgba(201,150,26,.08));box-shadow:0 10px 26px rgba(0,0,0,.24);cursor:pointer;}
.sidebar-menu-toggle span{display:block;width:19px;height:2px;border-radius:999px;background:#f7e8b8;box-shadow:0 0 10px rgba(240,192,64,.25);}
@media (max-width:1024px){
  body.portal-theme .app-shell.admin-shell>.app-sidebar{display:block!important;padding:16px 18px!important;border-radius:22px!important;}
  body.portal-theme .app-sidebar .tag{display:block!important;margin:0 0 7px!important;}
  body.portal-theme .app-sidebar .sidebar-head-row{display:flex!important;align-items:center!important;justify-content:space-between!important;margin:0!important;}
  body.portal-theme .app-sidebar .sidebar-menu-toggle{display:inline-flex!important;flex:0 0 auto!important;}
  body.portal-theme .app-sidebar:not(.sidebar-menu-open)>a{display:none!important;}
  body.portal-theme .app-sidebar.sidebar-menu-open{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important;}
  body.portal-theme .app-sidebar.sidebar-menu-open .tag,
  body.portal-theme .app-sidebar.sidebar-menu-open .sidebar-head-row{grid-column:1/-1!important;}
  body.portal-theme .app-sidebar.sidebar-menu-open>a{display:flex!important;min-height:42px!important;padding:9px 11px!important;border-radius:14px!important;align-items:center!important;justify-content:center!important;text-align:center!important;font-size:.9rem!important;line-height:1.15!important;white-space:normal!important;}
}
@media (max-width:640px){
  body.portal-theme .app-shell.admin-shell>.app-sidebar{padding:14px 15px!important;border-radius:20px!important;}
  body.portal-theme .app-sidebar .sidebar-title{font-size:1.38rem!important;}
  body.portal-theme .app-sidebar.sidebar-menu-open{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;}
  body.portal-theme .app-sidebar.sidebar-menu-open>a{min-height:39px!important;padding:8px 9px!important;font-size:.84rem!important;}
  .sidebar-menu-toggle{width:39px;height:35px;border-radius:12px;}
  .sidebar-menu-toggle span{width:18px;}
}
body.portal-theme.student-portal .exam-question-card.nta-question-card,
body.portal-theme.student-portal .exam-question-card.nta-question-card .question-text-block,
body.portal-theme.student-portal .nta-option-copy,
body.portal-theme.student-portal .nta-option-copy .question-text-block{font-family:"Syne","Segoe UI",Arial,sans-serif!important;font-size:inherit!important;line-height:1.58!important;font-weight:600!important;color:#f6e4a8!important;-webkit-text-fill-color:#f6e4a8!important;}
body.portal-theme.student-portal .exam-question-card.nta-question-card .inline-equation,
body.portal-theme.student-portal .nta-option-copy .inline-equation,
body.portal-theme.student-portal .exam-question-card.nta-question-card .mathjson-render,
body.portal-theme.student-portal .nta-option-copy .mathjson-render{display:inline-block!important;vertical-align:0.18em!important;position:relative!important;top:0!important;transform:none!important;margin:0 .12em!important;padding:0!important;line-height:0!important;min-height:0!important;overflow:visible!important;font-size:1em!important;}
body.portal-theme.student-portal .exam-question-card.nta-question-card mjx-container,
body.portal-theme.student-portal .nta-option-copy mjx-container,
body.portal-theme.student-portal .exam-question-card.nta-question-card mjx-container[jax="CHTML"],
body.portal-theme.student-portal .nta-option-copy mjx-container[jax="CHTML"]{display:inline-block!important;vertical-align:0.18em!important;position:relative!important;top:0!important;transform:none!important;margin:0!important;padding:0!important;line-height:0!important;font-size:1em!important;font-weight:400!important;overflow:visible!important;color:inherit!important;-webkit-text-fill-color:inherit!important;}
body.portal-theme.student-portal .exam-question-card.nta-question-card mjx-math,
body.portal-theme.student-portal .nta-option-copy mjx-math{font-family:"Cambria Math","STIX Two Math","Latin Modern Math","Times New Roman",serif!important;font-weight:400!important;}
body.portal-theme.student-portal .exam-question-card.nta-question-card svg,
body.portal-theme.student-portal .nta-option-copy svg{overflow:visible!important;vertical-align:0.18em!important;height:auto!important;width:auto!important;max-width:none!important;}
body.portal-theme.student-portal .nta-option-item{align-items:center!important;}
body.portal-theme.student-portal .nta-option-copy,
body.portal-theme.student-portal .nta-option-copy .question-part,
body.portal-theme.student-portal .nta-option-copy .question-text-block{display:block!important;min-height:0!important;width:100%!important;}
/* End targeted final. */


/* AD ASTRA targeted cleanup: remove legacy sidebar eyebrow bars and keep menu header aligned. */
body.portal-theme .app-sidebar > .tag:first-child{
  display:none!important;
}
body.portal-theme .app-sidebar .sidebar-head-row{
  margin-top:0!important;
}

/* AD ASTRA final exam equation parity: use the same MathLive preview fields as Question Preview. */
body.portal-theme.exam-portal .exam-question-card .inline-equation,
body.portal-theme.exam-portal .nta-option-copy .inline-equation,
body.portal-theme.student-portal .exam-question-card .inline-equation,
body.portal-theme.student-portal .nta-option-copy .inline-equation{
  display:inline-block!important;
  vertical-align:0.18em!important;
  position:relative!important;
  top:0!important;
  transform:none!important;
  margin:0 .12em!important;
  padding:0!important;
  line-height:0!important;
  white-space:nowrap!important;
}
body.portal-theme.exam-portal .exam-question-card math-field.ad-astra-preview-mathfield,
body.portal-theme.exam-portal .nta-option-copy math-field.ad-astra-preview-mathfield,
body.portal-theme.student-portal .exam-question-card math-field.ad-astra-preview-mathfield,
body.portal-theme.student-portal .nta-option-copy math-field.ad-astra-preview-mathfield{
  display:inline-block!important;
  width:auto!important;
  min-width:0!important;
  min-height:0!important;
  max-width:100%!important;
  vertical-align:0.18em!important;
  position:relative!important;
  top:0!important;
  transform:none!important;
  margin:0!important;
  padding:0 .08em!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:transparent!important;
  color:#fff4c7!important;
  -webkit-text-fill-color:#fff4c7!important;
  font-size:1.20em!important;
  line-height:1!important;
  overflow:visible!important;
}
body.portal-theme.exam-portal .nta-option-copy,
body.portal-theme.exam-portal .nta-option-copy .question-part,
body.portal-theme.exam-portal .nta-option-copy .question-text-block,
body.portal-theme.student-portal .exam-question-card .question-text-block,
body.portal-theme.student-portal .nta-option-copy .question-text-block{
  overflow:visible!important;
}


/* AD ASTRA SINCERE FINAL: Exam equations must match Visual Equation Editor Question Preview.
   This block deliberately overrides older MathJax/MathLive sizing and baseline patches only
   inside the Exam question/options area. It does not change menus, warnings, palette, or layout. */
body.portal-theme.exam-portal .exam-question-card .question-text-block,
body.portal-theme.exam-portal .exam-question-card .math-content,
body.portal-theme.exam-portal .nta-option-copy,
body.portal-theme.exam-portal .nta-option-copy .question-part,
body.portal-theme.exam-portal .nta-option-copy .question-text-block,
body.portal-theme.student-portal .exam-question-card .question-text-block,
body.portal-theme.student-portal .exam-question-card .math-content,
body.portal-theme.student-portal .nta-option-copy,
body.portal-theme.student-portal .nta-option-copy .question-part,
body.portal-theme.student-portal .nta-option-copy .question-text-block{
  overflow:visible!important;
  white-space:normal!important;
  line-height:1.72!important;
}
body.portal-theme.exam-portal .exam-question-card .inline-equation,
body.portal-theme.exam-portal .nta-option-copy .inline-equation,
body.portal-theme.student-portal .exam-question-card .inline-equation,
body.portal-theme.student-portal .nta-option-copy .inline-equation{
  display:inline-block!important;
  vertical-align:-0.14em!important;
  position:static!important;
  top:auto!important;
  transform:none!important;
  margin:0 .10em!important;
  padding:0!important;
  line-height:1!important;
  min-height:1em!important;
  overflow:visible!important;
  white-space:nowrap!important;
  max-width:100%!important;
}
body.portal-theme.exam-portal .exam-question-card math-field.ad-astra-preview-mathfield,
body.portal-theme.exam-portal .nta-option-copy math-field.ad-astra-preview-mathfield,
body.portal-theme.student-portal .exam-question-card math-field.ad-astra-preview-mathfield,
body.portal-theme.student-portal .nta-option-copy math-field.ad-astra-preview-mathfield{
  display:inline-block!important;
  width:auto!important;
  min-width:0!important;
  min-height:1em!important;
  max-width:100%!important;
  vertical-align:-0.14em!important;
  position:static!important;
  top:auto!important;
  transform:none!important;
  margin:0!important;
  padding:0 .04em!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:transparent!important;
  color:#fff4c7!important;
  -webkit-text-fill-color:#fff4c7!important;
  font-size:1.36em!important;
  line-height:1.18!important;
  overflow:visible!important;
  contain:none!important;
  --contains-highlight-background-color:transparent;
  --selection-background-color:rgba(240,192,64,.22);
  --caret-color:transparent;
}
body.portal-theme.exam-portal .exam-question-card mjx-container,
body.portal-theme.exam-portal .nta-option-copy mjx-container,
body.portal-theme.student-portal .exam-question-card mjx-container,
body.portal-theme.student-portal .nta-option-copy mjx-container{
  display:inline-block!important;
  vertical-align:-0.14em!important;
  position:static!important;
  top:auto!important;
  transform:none!important;
  zoom:1!important;
  margin:0 .04em!important;
  padding:0!important;
  line-height:1.18!important;
  font-size:1.36em!important;
  overflow:visible!important;
  color:#fff4c7!important;
  -webkit-text-fill-color:#fff4c7!important;
}
body.portal-theme.exam-portal .exam-question-card mjx-container svg,
body.portal-theme.exam-portal .nta-option-copy mjx-container svg,
body.portal-theme.student-portal .exam-question-card mjx-container svg,
body.portal-theme.student-portal .nta-option-copy mjx-container svg{
  overflow:visible!important;
  height:auto!important;
  width:auto!important;
  max-width:none!important;
}
@media (max-width:700px){
  body.portal-theme.exam-portal .exam-question-card math-field.ad-astra-preview-mathfield,
  body.portal-theme.exam-portal .nta-option-copy math-field.ad-astra-preview-mathfield,
  body.portal-theme.student-portal .exam-question-card math-field.ad-astra-preview-mathfield,
  body.portal-theme.student-portal .nta-option-copy math-field.ad-astra-preview-mathfield,
  body.portal-theme.exam-portal .exam-question-card mjx-container,
  body.portal-theme.exam-portal .nta-option-copy mjx-container,
  body.portal-theme.student-portal .exam-question-card mjx-container,
  body.portal-theme.student-portal .nta-option-copy mjx-container{font-size:1.30em!important;}
}


/* AD ASTRA emergency exam visibility/parity fix:
   Keep user-created questions visible in Exam and render equation spans with MathJax,
   not empty MathLive custom fields. Scoped only to Exam question/options. */
body.portal-theme.exam-portal .exam-question-card .mathjson-render,
body.portal-theme.exam-portal .nta-option-copy .mathjson-render,
body.portal-theme.student-portal .exam-question-card .mathjson-render,
body.portal-theme.student-portal .nta-option-copy .mathjson-render,
body.portal-theme.exam-portal .exam-question-card .inline-equation,
body.portal-theme.exam-portal .nta-option-copy .inline-equation,
body.portal-theme.student-portal .exam-question-card .inline-equation,
body.portal-theme.student-portal .nta-option-copy .inline-equation{
  display:inline-block!important;
  opacity:1!important;
  visibility:visible!important;
  min-width:.25em!important;
  min-height:1em!important;
  height:auto!important;
  overflow:visible!important;
  white-space:nowrap!important;
  line-height:1.25!important;
  vertical-align:-0.12em!important;
  color:#fff4c7!important;
  -webkit-text-fill-color:#fff4c7!important;
}
body.portal-theme.exam-portal .exam-question-card mjx-container,
body.portal-theme.exam-portal .nta-option-copy mjx-container,
body.portal-theme.student-portal .exam-question-card mjx-container,
body.portal-theme.student-portal .nta-option-copy mjx-container{
  display:inline-block!important;
  visibility:visible!important;
  opacity:1!important;
  overflow:visible!important;
  font-size:1.18em!important;
  line-height:1.22!important;
  vertical-align:-0.12em!important;
  transform:none!important;
  zoom:1!important;
  color:#fff4c7!important;
  -webkit-text-fill-color:#fff4c7!important;
}
body.portal-theme.exam-portal .exam-question-card math-field.ad-astra-preview-mathfield,
body.portal-theme.exam-portal .nta-option-copy math-field.ad-astra-preview-mathfield,
body.portal-theme.student-portal .exam-question-card math-field.ad-astra-preview-mathfield,
body.portal-theme.student-portal .nta-option-copy math-field.ad-astra-preview-mathfield{display:none!important;}

/* AD ASTRA blank-question hard fix: keep saved question/option text visible before/after MathJax. */
body.portal-theme .exam-question-card .ad-astra-latex-fallback,
body.portal-theme .nta-option-copy .ad-astra-latex-fallback{
  display:inline!important;
  visibility:visible!important;
  opacity:1!important;
  color:#fff4c7!important;
  -webkit-text-fill-color:#fff4c7!important;
  font-family:"Cambria Math","STIX Two Math","Latin Modern Math","Times New Roman",serif!important;
  font-size:1em!important;
  line-height:1.25!important;
}
body.portal-theme .exam-question-card .question-block:empty::before,
body.portal-theme .nta-option-copy:empty::before{
  content:"";
}


/* AD ASTRA REAL FINAL: Exam equations use the exact same MathLive preview renderer
   as the Visual Equation Editor Question Preview. This final block only touches
   equation rendering inside Exam question/options and overrides older emergency
   MathJax visibility patches that were making Exam equations look different. */
body.portal-theme.student-portal .exam-question-card .ad-astra-latex-fallback,
body.portal-theme.student-portal .nta-option-copy .ad-astra-latex-fallback,
body.portal-theme.exam-portal .exam-question-card .ad-astra-latex-fallback,
body.portal-theme.exam-portal .nta-option-copy .ad-astra-latex-fallback{
  display:none!important;
}
body.portal-theme.student-portal .exam-question-card .inline-equation,
body.portal-theme.student-portal .nta-option-copy .inline-equation,
body.portal-theme.exam-portal .exam-question-card .inline-equation,
body.portal-theme.exam-portal .nta-option-copy .inline-equation{
  display:inline-block!important;
  vertical-align:0.18em!important;
  position:relative!important;
  top:0!important;
  transform:none!important;
  margin:0 .12em!important;
  padding:0!important;
  line-height:0!important;
  min-height:0!important;
  white-space:nowrap!important;
  overflow:visible!important;
}
body.portal-theme.student-portal .exam-question-card math-field.ad-astra-preview-mathfield,
body.portal-theme.student-portal .nta-option-copy math-field.ad-astra-preview-mathfield,
body.portal-theme.exam-portal .exam-question-card math-field.ad-astra-preview-mathfield,
body.portal-theme.exam-portal .nta-option-copy math-field.ad-astra-preview-mathfield{
  display:inline-block!important;
  width:auto!important;
  min-width:0!important;
  min-height:0!important;
  max-width:100%!important;
  vertical-align:0.18em!important;
  position:relative!important;
  top:0!important;
  transform:none!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:transparent!important;
  color:#fff4c7!important;
  -webkit-text-fill-color:#fff4c7!important;
  font-size:1em!important;
  line-height:1!important;
  overflow:visible!important;
  contain:none!important;
  --contains-highlight-background-color:transparent;
  --selection-background-color:transparent;
  --caret-color:transparent;
}
body.portal-theme.student-portal .exam-question-card math-field.ad-astra-preview-mathfield::part(content),
body.portal-theme.student-portal .nta-option-copy math-field.ad-astra-preview-mathfield::part(content),
body.portal-theme.exam-portal .exam-question-card math-field.ad-astra-preview-mathfield::part(content),
body.portal-theme.exam-portal .nta-option-copy math-field.ad-astra-preview-mathfield::part(content){
  padding:0!important;
  margin:0!important;
  color:#fff4c7!important;
  -webkit-text-fill-color:#fff4c7!important;
}
body.portal-theme.student-portal .exam-question-card math-field.ad-astra-preview-mathfield::part(virtual-keyboard-toggle),
body.portal-theme.student-portal .exam-question-card math-field.ad-astra-preview-mathfield::part(menu-toggle),
body.portal-theme.student-portal .nta-option-copy math-field.ad-astra-preview-mathfield::part(virtual-keyboard-toggle),
body.portal-theme.student-portal .nta-option-copy math-field.ad-astra-preview-mathfield::part(menu-toggle),
body.portal-theme.exam-portal .exam-question-card math-field.ad-astra-preview-mathfield::part(virtual-keyboard-toggle),
body.portal-theme.exam-portal .exam-question-card math-field.ad-astra-preview-mathfield::part(menu-toggle),
body.portal-theme.exam-portal .nta-option-copy math-field.ad-astra-preview-mathfield::part(virtual-keyboard-toggle),
body.portal-theme.exam-portal .nta-option-copy math-field.ad-astra-preview-mathfield::part(menu-toggle){
  display:none!important;
}
body.portal-theme.student-portal .exam-question-card .question-text-block,
body.portal-theme.student-portal .nta-option-copy .question-text-block,
body.portal-theme.exam-portal .exam-question-card .question-text-block,
body.portal-theme.exam-portal .nta-option-copy .question-text-block{
  line-height:1.58!important;
  overflow:visible!important;
}
/* End real final Exam/Preview equation parity fix. */


/* AD ASTRA FINAL EXAM EQUATION PARITY PATCH
   Exam equations must visually match the Visual Equation Editor Question Preview.
   Scope: only Exam question/options math rendering. */
body.portal-theme.student-portal .exam-question-card .inline-equation,
body.portal-theme.student-portal .nta-option-copy .inline-equation,
body.portal-theme.exam-portal .exam-question-card .inline-equation,
body.portal-theme.exam-portal .nta-option-copy .inline-equation{
  display:inline-block!important;
  vertical-align:middle!important;
  line-height:1.35!important;
  min-height:1.35em!important;
  overflow:visible!important;
  margin:0 .12em!important;
  transform:none!important;
  top:auto!important;
}
body.portal-theme.student-portal .exam-question-card mjx-container,
body.portal-theme.student-portal .nta-option-copy mjx-container,
body.portal-theme.exam-portal .exam-question-card mjx-container,
body.portal-theme.exam-portal .nta-option-copy mjx-container{
  display:inline-block!important;
  vertical-align:middle!important;
  font-size:1.22em!important;
  line-height:1.35!important;
  min-height:1.35em!important;
  overflow:visible!important;
  transform:none!important;
  zoom:1!important;
  margin:0!important;
  color:#f6e4a8!important;
  -webkit-text-fill-color:#f6e4a8!important;
}
body.portal-theme.student-portal .exam-question-card mjx-container svg,
body.portal-theme.student-portal .nta-option-copy mjx-container svg,
body.portal-theme.exam-portal .exam-question-card mjx-container svg,
body.portal-theme.exam-portal .nta-option-copy mjx-container svg{
  overflow:visible!important;
  vertical-align:middle!important;
}
body.portal-theme.student-portal .exam-question-card math-field.ad-astra-preview-mathfield,
body.portal-theme.student-portal .nta-option-copy math-field.ad-astra-preview-mathfield,
body.portal-theme.exam-portal .exam-question-card math-field.ad-astra-preview-mathfield,
body.portal-theme.exam-portal .nta-option-copy math-field.ad-astra-preview-mathfield{
  display:inline-block!important;
  vertical-align:middle!important;
  font-size:1.16em!important;
  line-height:1.25!important;
  min-height:1.25em!important;
  width:auto!important;
  max-width:none!important;
  overflow:visible!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  color:#f6e4a8!important;
  -webkit-text-fill-color:#f6e4a8!important;
}


/* AD ASTRA hotfix: final Exam equation baseline parity.
   Lowers imported/MathJax/MathLive equation boxes very slightly so they sit on
   the same text baseline as Visual Equation Editor preview output. */
body.portal-theme.student-portal .exam-question-card .inline-equation,
body.portal-theme.student-portal .nta-option-copy .inline-equation,
body.portal-theme.exam-portal .exam-question-card .inline-equation,
body.portal-theme.exam-portal .nta-option-copy .inline-equation{
  vertical-align:-0.08em!important;
  line-height:1.25!important;
  min-height:1.15em!important;
}
body.portal-theme.student-portal .exam-question-card mjx-container,
body.portal-theme.student-portal .nta-option-copy mjx-container,
body.portal-theme.exam-portal .exam-question-card mjx-container,
body.portal-theme.exam-portal .nta-option-copy mjx-container,
body.portal-theme.student-portal .exam-question-card math-field.ad-astra-preview-mathfield,
body.portal-theme.student-portal .nta-option-copy math-field.ad-astra-preview-mathfield,
body.portal-theme.exam-portal .exam-question-card math-field.ad-astra-preview-mathfield,
body.portal-theme.exam-portal .nta-option-copy math-field.ad-astra-preview-mathfield{
  vertical-align:-0.08em!important;
  top:0!important;
  transform:none!important;
}
/* =========================================================
   AD ASTRA desktop heading scale fix
   Scope: Desktop typography only. No layout, color, spacing,
   button, tab, equation, or functional changes.
   ========================================================= */
@media (min-width:981px){
  h1,
  h2,
  .hero-h1,
  .hero-h1-one-line,
  .page-hero h1,
  .page-hero h2,
  .section-header h2,
  .dashboard-banner h1,
  .dashboard-banner h2,
  .admin-intro-title,
  .page-title,
  .section-title,
  .question-title,
  .panel > h1:first-child,
  .panel > h2:first-child,
  .auth-card h1,
  .auth-card h2,
  .login-card h1,
  .login-card h2,
  .public-shell h1:first-child,
  .public-shell h2:first-child,
  .admin-shell h1,
  .student-shell h1,
  .app-shell h1{
    font-size:clamp(34px,3vw,42px)!important;
    line-height:1.08!important;
  }

  .panel h1,
  .panel h2,
  .card-title,
  .course-title,
  .sidebar-title,
  .math-editor-panel h2,
  .math-system-shell h2,
  .math-builder h2,
  .math-card h2,
  .editor-card h2,
  .q-modal-card h1,
  .q-modal-card h2{
    font-size:clamp(30px,2.6vw,38px)!important;
    line-height:1.1!important;
  }

  h3,
  .section-header h3,
  .panel h3,
  .card h3,
  .course-card h3,
  .hero-card-head h3{
    font-size:clamp(22px,1.8vw,28px)!important;
    line-height:1.14!important;
  }
}
/* =========================================================
   AD ASTRA final precise heading correction
   Scope: Desktop only. Corrects remaining oversized section headings,
   restores original hero line scale, and restores compact reset panel width.
   ========================================================= */
@media (min-width:981px){
  body.portal-theme .app-shell > .panel[style*="max-width:760px"]{
    max-width:760px!important;
    width:calc(100% - 48px)!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  #hero .hero-h1{
    font-size:clamp(48px,6.2vw,88px)!important;
    line-height:1.02!important;
  }
  section .section-header h2,
  #scholarship .section-header h2,
  #testimonials .section-header h2,
  #why .section-header h2,
  #results .section-header h2,
  #faculty .section-header h2,
  #tests .section-header h2,
  #contact-section .section-header h2,
  #cta h2,
  .toppers-title{
    font-size:clamp(34px,3vw,42px)!important;
    line-height:1.08!important;
    white-space:normal!important;
  }
}

/* =========================================================
   AD ASTRA final two-item typography correction
   Scope: only Home hero heading and Forgot Password reset heading/button.
   No layout, color, spacing, responsiveness, or functional changes elsewhere.
   ========================================================= */
@media (min-width:981px){
  body:has(#hero) #hero .hero-h1{
    font-size:clamp(44px,5.45vw,78px)!important;
    line-height:1.02!important;
  }
  body.portal-theme .app-shell > .panel[style*="max-width:760px"] > h2:first-of-type{
    font-size:26px!important;
    line-height:1.12!important;
  }
  body.portal-theme .app-shell > .panel[style*="max-width:760px"] .form-actions .btn[type="submit"]{
    font-size:14px!important;
    padding:11px 18px!important;
    min-height:42px!important;
  }
}

/* AD ASTRA targeted fix: reduce Student/Admin sidebar tab lengths on Tablet and Mobile only. */
@media (max-width:1024px){
  body.portal-theme .app-shell.admin-shell > .app-sidebar > a{
    width:min(88%, 780px)!important;
    max-width:780px!important;
    margin-left:auto!important;
    margin-right:auto!important;
    box-sizing:border-box!important;
  }
  body.portal-theme .app-sidebar.sidebar-menu-open > a{
    width:100%!important;
    max-width:100%!important;
  }
}
@media (max-width:640px){
  body.portal-theme .app-shell.admin-shell > .app-sidebar > a{
    width:88%!important;
    max-width:390px!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  body.portal-theme .app-sidebar.sidebar-menu-open > a{
    width:100%!important;
    max-width:100%!important;
  }
}
@media (max-width:420px){
  body.portal-theme .app-shell.admin-shell > .app-sidebar > a{
    width:90%!important;
    max-width:340px!important;
  }
}
/* End AD ASTRA targeted tab length fix. */

/* AD ASTRA precise fix: true content-width Student/Admin sidebar tabs on Tablet and Mobile only. */
@media (max-width:1180px){
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:10px!important;
    grid-template-columns:none!important;
  }
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open > .sidebar-head-row,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open > .tag{
    width:100%!important;
    align-self:stretch!important;
    grid-column:auto!important;
  }
  body.portal-theme .app-shell.admin-shell > .app-sidebar > a,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open > a{
    width:fit-content!important;
    width:-moz-fit-content!important;
    min-width:0!important;
    max-width:calc(100% - 36px)!important;
    margin:0 auto!important;
    padding:10px 24px!important;
    min-height:42px!important;
    height:auto!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    white-space:nowrap!important;
    box-sizing:border-box!important;
  }
  body.portal-theme .app-shell.admin-shell > .app-sidebar:not(.sidebar-menu-open) > a{
    display:none!important;
  }
}
@media (max-width:640px){
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open{
    gap:9px!important;
  }
  body.portal-theme .app-shell.admin-shell > .app-sidebar > a,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open > a{
    max-width:calc(100% - 28px)!important;
    padding:9px 20px!important;
    min-height:40px!important;
    font-size:.86rem!important;
    line-height:1.15!important;
  }
}
@media (max-width:420px){
  body.portal-theme .app-shell.admin-shell > .app-sidebar > a,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open > a{
    padding-left:18px!important;
    padding-right:18px!important;
  }
}
/* End AD ASTRA precise content-width tab fix. */

/* AD ASTRA final correction: equal premium sidebar tab width on Tablet and Mobile only.
   Scope: Student/Admin sidebar menu tabs only. Desktop layout remains unchanged. */
@media (max-width:1280px){
  body.portal-theme .app-shell.admin-shell > .app-sidebar,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:flex-start!important;
    grid-template-columns:none!important;
  }
  body.portal-theme .app-shell.admin-shell > .app-sidebar > .sidebar-head-row,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open > .sidebar-head-row{
    width:100%!important;
    align-self:stretch!important;
  }
  body.portal-theme .app-shell.admin-shell > .app-sidebar > a,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open > a{
    width:280px!important;
    min-width:280px!important;
    max-width:280px!important;
    margin-left:auto!important;
    margin-right:auto!important;
    padding-left:18px!important;
    padding-right:18px!important;
    min-height:44px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    white-space:nowrap!important;
    box-sizing:border-box!important;
  }
}
@media (max-width:640px){
  body.portal-theme .app-shell.admin-shell > .app-sidebar > a,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open > a{
    width:260px!important;
    min-width:260px!important;
    max-width:260px!important;
    min-height:42px!important;
    padding-left:16px!important;
    padding-right:16px!important;
  }
}
@media (max-width:320px){
  body.portal-theme .app-shell.admin-shell > .app-sidebar > a,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open > a{
    width:calc(100% - 32px)!important;
    min-width:0!important;
    max-width:calc(100% - 32px)!important;
  }
}
/* End AD ASTRA final equal-width tab correction. */


/* AD ASTRA option 3: premium dashboard-card sidebar layout on Tablet/Mobile only.
   Scope: Student/Admin sidebar navigation cards only. No functional changes. */
@media (max-width:1280px){
  body.portal-theme .app-shell.admin-shell > .app-sidebar,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    align-items:stretch!important;
    justify-content:stretch!important;
    gap:14px!important;
    padding:18px 20px 22px!important;
    grid-auto-flow:row!important;
  }
  body.portal-theme .app-shell.admin-shell > .app-sidebar > .sidebar-head-row,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open > .sidebar-head-row,
  body.portal-theme .app-shell.admin-shell > .app-sidebar > .tag,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open > .tag{
    grid-column:1/-1!important;
    width:100%!important;
    align-self:stretch!important;
    margin-bottom:6px!important;
  }
  body.portal-theme .app-shell.admin-shell > .app-sidebar:not(.sidebar-menu-open) > a{
    display:none!important;
  }
  body.portal-theme .app-shell.admin-shell > .app-sidebar > a,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open > a{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    min-height:96px!important;
    height:auto!important;
    margin:0!important;
    padding:14px 10px 13px!important;
    box-sizing:border-box!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:9px!important;
    text-align:center!important;
    white-space:normal!important;
    border-radius:20px!important;
    font-size:.92rem!important;
    line-height:1.18!important;
    background:linear-gradient(180deg,rgba(25,29,36,.98),rgba(14,18,25,.98))!important;
    border:1px solid rgba(240,192,64,.30)!important;
    box-shadow:0 14px 30px rgba(0,0,0,.23), inset 0 0 0 1px rgba(255,255,255,.025)!important;
    transform:none!important;
  }
  body.portal-theme .app-shell.admin-shell > .app-sidebar > a::before,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open > a::before{
    content:'✦';
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    border-radius:13px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    font-size:17px!important;
    line-height:1!important;
    color:#f8dc78!important;
    -webkit-text-fill-color:#f8dc78!important;
    background:linear-gradient(180deg,rgba(240,192,64,.16),rgba(240,192,64,.055))!important;
    border:1px solid rgba(240,192,64,.28)!important;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.03),0 8px 16px rgba(0,0,0,.18)!important;
  }
  body.portal-theme .app-shell.admin-shell > .app-sidebar > a.active,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open > a.active{
    background:linear-gradient(135deg,#d19b16 0%,#f2c43c 58%,#ffe27a 100%)!important;
    color:#050b14!important;
    -webkit-text-fill-color:#050b14!important;
    border-color:rgba(255,226,122,.78)!important;
    box-shadow:0 16px 34px rgba(202,150,26,.24), inset 0 0 0 1px rgba(255,255,255,.18)!important;
  }
  body.portal-theme .app-shell.admin-shell > .app-sidebar > a.active::before,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open > a.active::before{
    color:#050b14!important;
    -webkit-text-fill-color:#050b14!important;
    background:rgba(5,11,20,.10)!important;
    border-color:rgba(5,11,20,.18)!important;
  }
  body.portal-theme .app-sidebar > a:nth-of-type(1)::before{content:'⌂';}
  body.portal-theme .app-sidebar > a:nth-of-type(2)::before{content:'◉';}
  body.portal-theme .app-sidebar > a:nth-of-type(3)::before{content:'₹';}
  body.portal-theme .app-sidebar > a:nth-of-type(4)::before{content:'▦';}
  body.portal-theme .app-sidebar > a:nth-of-type(5)::before{content:'⇩';}
  body.portal-theme .app-sidebar > a:nth-of-type(6)::before{content:'✓';}
  body.portal-theme .app-sidebar > a:nth-of-type(7)::before{content:'▤';}
  body.portal-theme .app-sidebar > a:nth-of-type(8)::before{content:'🔒';font-size:15px!important;}
}
@media (min-width:641px) and (max-width:1280px){
  body.portal-theme .app-shell.admin-shell > .app-sidebar,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open{
    grid-template-columns:repeat(3,minmax(150px,1fr))!important;
    gap:15px!important;
  }
  body.portal-theme.student-portal .app-shell.admin-shell > .app-sidebar,
  body.portal-theme.student-portal .app-shell.admin-shell > .app-sidebar.sidebar-menu-open{
    grid-template-columns:repeat(4,minmax(135px,1fr))!important;
  }
}
@media (max-width:640px){
  body.portal-theme .app-shell.admin-shell > .app-sidebar,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:11px!important;
    padding:14px 16px 18px!important;
  }
  body.portal-theme .app-shell.admin-shell > .app-sidebar > a,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open > a{
    min-height:86px!important;
    padding:12px 8px 11px!important;
    border-radius:18px!important;
    font-size:.84rem!important;
    gap:8px!important;
  }
  body.portal-theme .app-shell.admin-shell > .app-sidebar > a::before,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open > a::before{
    width:30px!important;
    height:30px!important;
    min-width:30px!important;
    border-radius:11px!important;
    font-size:15px!important;
  }
}
@media (max-width:360px){
  body.portal-theme .app-shell.admin-shell > .app-sidebar,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open{
    grid-template-columns:1fr!important;
  }
}
/* End AD ASTRA option 3 dashboard-card sidebar layout. */


/* AD ASTRA Option C final: text-only premium dashboard tiles (Tablet/Mobile only).
   Removes decorative icons and makes navigation tiles compact. */
@media (max-width:1280px){
  body.portal-theme .app-shell.admin-shell > .app-sidebar > a,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open > a{
    min-height:78px!important;
    height:78px!important;
    padding:10px 12px!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:center!important;
    gap:0!important;
    text-align:center!important;
    font-size:.94rem!important;
    font-weight:700!important;
    line-height:1.18!important;
    border-radius:18px!important;
    white-space:normal!important;
  }
  body.portal-theme .app-shell.admin-shell > .app-sidebar > a::before,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open > a::before{
    content:none!important;
    display:none!important;
    width:0!important;
    height:0!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    box-shadow:none!important;
    background:none!important;
  }
}
@media (max-width:640px){
  body.portal-theme .app-shell.admin-shell > .app-sidebar > a,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open > a{
    min-height:72px!important;
    height:72px!important;
    padding:9px 10px!important;
    border-radius:17px!important;
    font-size:.86rem!important;
  }
}
/* End AD ASTRA Option C final text-only tiles. */

/* AD ASTRA compact text-only dashboard tiles: reduced height/width only. */
@media (min-width:641px) and (max-width:1280px){
  body.portal-theme .app-shell.admin-shell > .app-sidebar,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open{
    grid-template-columns:repeat(3, minmax(0, 280px))!important;
    justify-content:center!important;
    gap:16px 18px!important;
  }
  body.portal-theme.student-portal .app-shell.admin-shell > .app-sidebar,
  body.portal-theme.student-portal .app-shell.admin-shell > .app-sidebar.sidebar-menu-open{
    grid-template-columns:repeat(3, minmax(0, 260px))!important;
    justify-content:center!important;
    gap:16px 18px!important;
  }
  body.portal-theme .app-shell.admin-shell > .app-sidebar > a,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open > a{
    min-height:68px!important;
    height:68px!important;
    padding:10px 16px!important;
    border-radius:17px!important;
    font-size:.92rem!important;
    line-height:1.18!important;
  }
}
@media (max-width:640px){
  body.portal-theme .app-shell.admin-shell > .app-sidebar,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open{
    grid-template-columns:repeat(2, minmax(0, min(190px, calc((100vw - 76px)/2))))!important;
    justify-content:center!important;
    gap:10px 14px!important;
    padding-left:14px!important;
    padding-right:14px!important;
  }
  body.portal-theme .app-shell.admin-shell > .app-sidebar > a,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open > a{
    min-height:60px!important;
    height:60px!important;
    padding:8px 10px!important;
    border-radius:16px!important;
    font-size:.82rem!important;
    line-height:1.16!important;
  }
}
@media (max-width:360px){
  body.portal-theme .app-shell.admin-shell > .app-sidebar,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open{
    grid-template-columns:1fr!important;
  }
}
/* End AD ASTRA compact text-only dashboard tiles. */


/* AD ASTRA targeted final: match Student/Admin dashboard cards to Admin wide-view width only. */
@media (min-width:641px) and (max-width:1280px){
  body.portal-theme .app-shell.admin-shell > .app-sidebar,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open,
  body.portal-theme.student-portal .app-shell.admin-shell > .app-sidebar,
  body.portal-theme.student-portal .app-shell.admin-shell > .app-sidebar.sidebar-menu-open{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    justify-content:stretch!important;
    align-items:stretch!important;
    gap:16px 22px!important;
    padding-left:40px!important;
    padding-right:40px!important;
  }
  body.portal-theme .app-shell.admin-shell > .app-sidebar > a,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open > a,
  body.portal-theme.student-portal .app-shell.admin-shell > .app-sidebar > a,
  body.portal-theme.student-portal .app-shell.admin-shell > .app-sidebar.sidebar-menu-open > a{
    width:100%!important;
    min-width:0!important;
    min-height:68px!important;
    height:68px!important;
    padding:10px 16px!important;
  }
}
@media (max-width:640px){
  body.portal-theme .app-shell.admin-shell > .app-sidebar,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open,
  body.portal-theme.student-portal .app-shell.admin-shell > .app-sidebar,
  body.portal-theme.student-portal .app-shell.admin-shell > .app-sidebar.sidebar-menu-open{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    justify-content:stretch!important;
    gap:10px 14px!important;
    padding-left:18px!important;
    padding-right:18px!important;
  }
  body.portal-theme .app-shell.admin-shell > .app-sidebar > a,
  body.portal-theme .app-shell.admin-shell > .app-sidebar.sidebar-menu-open > a,
  body.portal-theme.student-portal .app-shell.admin-shell > .app-sidebar > a,
  body.portal-theme.student-portal .app-shell.admin-shell > .app-sidebar.sidebar-menu-open > a{
    width:100%!important;
    min-width:0!important;
    min-height:60px!important;
    height:60px!important;
    padding:8px 10px!important;
  }
}
/* End AD ASTRA targeted final: Admin wide-view matched cards. */


/* Final deployment fix: Admin > Admissions > Open Public Form uses the same dark Home theme on both cards. */
body .admission-page-stack{
  width:100% !important;
}
body .admission-page-stack .grid-2{
  gap:24px !important;
  align-items:stretch !important;
}
body .admission-page-stack .panel,
body .admission-page-stack .panel:first-child,
body .admission-page-stack .panel:last-child{
  background:linear-gradient(180deg,rgba(8,15,30,.97),rgba(12,24,48,.92)) !important;
  background-color:#081223 !important;
  border:1px solid rgba(240,192,64,.32) !important;
  color:#f7e8b8 !important;
  box-shadow:0 22px 58px rgba(0,0,0,.42) !important;
}
body .admission-page-stack .panel h1,
body .admission-page-stack .panel h2,
body .admission-page-stack .panel h3{
  color:#fff7db !important;
}
body .admission-page-stack .panel p{
  color:#e8d5a3 !important;
  opacity:1 !important;
}
body .admission-page-stack .form-field label{
  color:#fff2c6 !important;
}
body .admission-page-stack input,
body .admission-page-stack textarea,
body .admission-page-stack select{
  background:#06101f !important;
  border:1px solid rgba(240,192,64,.34) !important;
  color:#fff7db !important;
}
body .admission-page-stack input::placeholder,
body .admission-page-stack textarea::placeholder{
  color:rgba(232,213,163,.68) !important;
}
body .admission-page-stack .btn-gold{
  background:linear-gradient(135deg,#c9961a,#f0c040) !important;
  color:#04080f !important;
}


/* === AD ASTRA VERIFIED FINAL PUBLIC PAGE GAP + FORM FIX (2026-07-02) ===
   Fixes the excessive blank space on Contact/About/Faculty/Test Series pages opened from Admin links,
   keeps the public admission card on the same dark premium theme, and prevents mobile CTA text overflow. */
main.page-main{
  padding-top:86px!important;
  min-height:auto!important;
}
main.page-main>.page-hero{
  padding:54px 6% 34px!important;
  min-height:0!important;
  margin:0!important;
  border-radius:0!important;
  background:linear-gradient(180deg,#050a13 0%,#071020 100%)!important;
}
main.page-main>.content-wrap{
  padding:34px 6% 64px!important;
  margin:0!important;
}
main.page-main section+section{margin-top:0!important;}
main.page-main .faculty-grid,
main.page-main .tests-grid,
main.page-main .card-grid-3,
main.page-main .stats-band{
  margin-top:0!important;
}
.public-shell{
  padding-top:108px!important;
  background:linear-gradient(180deg,#04080f,#080f1e 58%,#04080f)!important;
}
.public-shell .grid-2{align-items:stretch!important;}
.public-shell .panel,
.public-shell .form-card,
.public-shell .glass-card{
  background:linear-gradient(180deg,rgba(12,24,48,.88),rgba(8,15,30,.96))!important;
  border-color:rgba(226,180,87,.34)!important;
  color:var(--star)!important;
  box-shadow:0 24px 70px rgba(0,0,0,.28)!important;
}
.public-shell .panel h1,
.public-shell .panel h2,
.public-shell .panel h3,
.public-shell .form-card h3,
.public-shell .glass-card h3{color:var(--star)!important;}
.public-shell .panel p,
.public-shell .small-muted,
.public-shell .glass-card p{color:var(--muted)!important;}
.public-shell input,
.public-shell select,
.public-shell textarea,
.page-main input,
.page-main select,
.page-main textarea{
  background:#050c18!important;
  border-color:rgba(226,180,87,.45)!important;
  color:var(--star)!important;
}
.public-shell input::placeholder,
.public-shell textarea::placeholder,
.page-main input::placeholder,
.page-main textarea::placeholder{color:rgba(235,216,164,.56)!important;}
@media (max-width:700px){
  main.page-main{padding-top:78px!important;}
  main.page-main>.page-hero{padding:34px 20px 22px!important;}
  main.page-main>.content-wrap{padding:22px 16px 48px!important;}
  .public-shell{padding:92px 12px 30px!important;}
}
@media (max-width:560px){
  .btn.btn-gold.btn-lg,
  .hero-card .btn-gold,
  .modal-box .btn-gold,
  #contact-section .btn-gold,
  .page-main .btn-gold,
  .public-shell .btn-gold{
    font-size:clamp(14px,3.65vw,16px)!important;
    line-height:1.16!important;
    padding:15px 18px!important;
    white-space:normal!important;
    text-align:center!important;
    min-height:0!important;
  }
}


/* === AD ASTRA FINAL TARGETED PUBLIC PAGE POLISH (2026-07-04) ===
   Scope: public pages opened from Admin > Enquiries > Open Contact Page only.
   1) Removes the remaining mobile/tablet gap between sticky header and page content.
   2) Restores proper About-page spacing between the upper two cards and lower four stat cards.
   3) Improves footer phone/mail icons and copyright visibility.
   4) Keeps the footer brand description readable and complete on mobile. */
@media (max-width:900px){
  body > main.page-main{
    padding-top:0!important;
    margin-top:0!important;
  }
  body > main.page-main > .page-hero{
    padding-top:16px!important;
    padding-bottom:18px!important;
  }
  body > main.page-main > .content-wrap{
    padding-top:18px!important;
  }
}
@media (max-width:560px){
  body > main.page-main > .page-hero{
    padding-top:12px!important;
    padding-left:20px!important;
    padding-right:20px!important;
  }
  body > main.page-main > .content-wrap{
    padding-top:16px!important;
  }
}
body > main.page-main .two-col + .stats-band{
  margin-top:34px!important;
}
@media (max-width:700px){
  body > main.page-main .two-col + .stats-band{
    margin-top:26px!important;
  }
}
#footer .footer-brand-col p,
.public-footer .footer-brand-col p{
  color:rgba(255,242,205,.92)!important;
  opacity:1!important;
  max-width:420px!important;
  width:100%!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
#footer .footer-bottom,
#footer .footer-bottom span,
.public-footer .footer-bottom,
.public-footer .footer-bottom span{
  color:rgba(255,242,205,.95)!important;
  opacity:1!important;
  -webkit-text-fill-color:rgba(255,242,205,.95)!important;
}
#footer .footer-bottom b,
.public-footer .footer-bottom b{
  color:#ffe58a!important;
  opacity:1!important;
  -webkit-text-fill-color:#ffe58a!important;
}
#footer .footer-bottom span:last-child,
.public-footer .footer-bottom span:last-child{
  color:#fff3bd!important;
  text-shadow:0 0 10px rgba(240,192,64,.24)!important;
}
@media (max-width:700px){
  #footer .footer-brand-col p,
  .public-footer .footer-brand-col p{
    max-width:100%!important;
    font-size:13.5px!important;
    line-height:1.62!important;
    margin-top:10px!important;
  }
  #footer .footer-bottom,
  .public-footer .footer-bottom{
    gap:8px!important;
    font-size:12.5px!important;
    line-height:1.55!important;
  }
}


/* ===== FINAL TARGETED MOBILE FOOTER COPY FIT FIX =====
@media (max-width: 768px){
  html, body{
    overflow-x:hidden !important;
  }
  #footer,
  .public-footer{
    overflow-x:hidden !important;
  }
  #footer .footer-grid,
  .public-footer .footer-grid{
    width:100% !important;
    max-width:100% !important;
    grid-template-columns:minmax(0,1fr) !important;
  }
  #footer .footer-brand-col,
  .public-footer .footer-brand-col{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow:hidden !important;
  }
  #footer .footer-logo-wrap,
  .public-footer .footer-logo-wrap{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow:hidden !important;
  }
  #footer .brand-footer-logo,
  .public-footer .brand-footer-logo{
    width:min(100%, 390px) !important;
    max-width:100% !important;
    min-width:0 !important;
    height:auto !important;
  }
  #footer .footer-brand-col p,
  .public-footer .footer-brand-col p{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
    overflow-wrap:break-word !important;
    word-break:normal !important;
    hyphens:auto !important;
    box-sizing:border-box !important;
    padding-right:0 !important;
    font-size:15.5px !important;
    line-height:1.85 !important;
  }
}

@media (max-width: 420px){
  #footer .footer-brand-col p,
  .public-footer .footer-brand-col p{
    font-size:14.5px !important;
    line-height:1.78 !important;
  }
  #footer .brand-footer-logo,
  .public-footer .brand-footer-logo{
    width:min(100%, 340px) !important;
  }
}

/* === AD ASTRA TARGETED MOBILE FOOTER DESCRIPTION FIT - FINAL OVERRIDE === */
@media (max-width: 768px){
  html, body{
    max-width:100% !important;
    overflow-x:hidden !important;
  }
  #footer,
  .public-footer{
    width:100% !important;
    max-width:100vw !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
    padding-left:24px !important;
    padding-right:24px !important;
  }
  #footer .footer-grid,
  .public-footer .footer-grid{
    display:grid !important;
    grid-template-columns:minmax(0, 1fr) !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
  }
  #footer .footer-brand-col,
  .public-footer .footer-brand-col{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow:visible !important;
    box-sizing:border-box !important;
  }
  #footer .footer-logo-wrap,
  .public-footer .footer-logo-wrap{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    margin-left:0 !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
  }
  #footer .brand-footer-logo,
  .public-footer .brand-footer-logo{
    display:block !important;
    width:min(100%, 390px) !important;
    max-width:100% !important;
    min-width:0 !important;
    height:auto !important;
    object-fit:contain !important;
  }
  #footer .footer-brand-col p,
  .public-footer .footer-brand-col p{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    margin:12px 0 0 0 !important;
    padding:0 !important;
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
    overflow-wrap:anywhere !important;
    word-break:normal !important;
    box-sizing:border-box !important;
    font-size:15px !important;
    line-height:1.75 !important;
  }
}
@media (max-width: 420px){
  #footer,
  .public-footer{
    padding-left:20px !important;
    padding-right:20px !important;
  }
  #footer .brand-footer-logo,
  .public-footer .brand-footer-logo{
    width:min(100%, 335px) !important;
  }
  #footer .footer-brand-col p,
  .public-footer .footer-brand-col p{
    font-size:14px !important;
    line-height:1.72 !important;
  }
}
/* === AD ASTRA RESULT MOBILE/TABLET COMPACT REVIEW FIX ===
   Targeted only to Result/Report question review cards.
   Removes mobile question-card vertical stretching, makes answer containers
   shorter/wider, reduces inner text/badge sizes, and makes rank tiles uniform. */
body.portal-theme .question-review-card .result-exam-question-card{
  min-height:0!important;
  height:auto!important;
  max-height:none!important;
  align-self:stretch!important;
  display:block!important;
}
body.portal-theme .question-review-card .result-exam-question-card .question-block,
body.portal-theme .question-review-card .result-exam-question-card .question-part,
body.portal-theme .question-review-card .result-exam-question-card .question-text-block,
body.portal-theme .question-review-card .result-exam-question-card .math-content{
  min-height:0!important;
  height:auto!important;
  max-height:none!important;
}
body.portal-theme .question-review-card .result-question-review-main{
  width:100%!important;
  flex:1 1 100%!important;
  min-width:0!important;
}
body.portal-theme .question-review-card .result-review-option-parity{
  width:100%!important;
  max-width:100%!important;
  min-height:0!important;
}
body.portal-theme .question-review-card .result-review-option-layout{
  min-height:58px!important;
  padding:12px 15px!important;
  grid-template-columns:18px 38px minmax(0,1fr)!important;
  gap:12px!important;
}
body.portal-theme .question-review-card .result-review-radio{
  width:16px!important;
  height:16px!important;
}
body.portal-theme .question-review-card .result-review-option-parity .nta-option-badge{
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  font-size:.96rem!important;
}
body.portal-theme .question-review-card .result-review-option-parity .nta-option-copy,
body.portal-theme .question-review-card .result-review-option-parity .nta-option-copy .question-part,
body.portal-theme .question-review-card .result-review-option-parity .nta-option-copy .question-text-block{
  min-height:0!important;
  height:auto!important;
}
body.portal-theme .question-review-card .result-review-option-parity .nta-option-copy .question-text-block{
  font-size:13.5px!important;
  line-height:1.42!important;
}
body.portal-theme .question-review-card .stats-strip{
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr))!important;
  gap:10px!important;
  margin:12px 0 6px!important;
}
body.portal-theme .question-review-card .stats-tile,
body.portal-theme .question-review-card .question-preview-card{
  min-height:0!important;
  height:auto!important;
  padding:12px 14px!important;
  border-radius:16px!important;
}
body.portal-theme .question-review-card .stats-tile strong{
  font-size:19px!important;
  line-height:1.15!important;
  margin-bottom:5px!important;
}
body.portal-theme .question-review-card .stats-tile .muted,
body.portal-theme .question-review-card .question-preview-card,
body.portal-theme .question-review-card .question-preview-card *{
  font-size:13px!important;
  line-height:1.45!important;
}

@media (max-width:900px){
  body.portal-theme .question-review-card{
    padding:16px!important;
    margin-top:14px!important;
    margin-bottom:14px!important;
    border-radius:22px!important;
  }
  body.portal-theme .question-review-head{
    gap:10px!important;
    margin-bottom:12px!important;
  }
  body.portal-theme .question-review-card .result-exam-question-card{
    padding:18px 20px!important;
    border-radius:24px!important;
    width:100%!important;
  }
  body.portal-theme .question-review-card .result-exam-question-card .question-block{
    gap:8px!important;
  }
  body.portal-theme .question-review-card .result-exam-question-card .question-part-question_text .question-text-block,
  body.portal-theme .question-review-card .result-exam-question-card .question-text-block{
    font-size:15px!important;
    line-height:1.48!important;
  }
  body.portal-theme .question-review-card .review-options{
    gap:10px!important;
    margin-top:12px!important;
  }
  body.portal-theme .question-review-card .review-option{
    border-radius:18px!important;
  }
  body.portal-theme .stats-strip{
    grid-template-columns:1fr!important;
    gap:10px!important;
  }
  body.portal-theme .stats-strip > .stats-tile{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
    padding:14px 16px!important;
    border-radius:18px!important;
  }
}
@media (max-width:600px){
  body.portal-theme .panel{
    padding-left:14px!important;
    padding-right:14px!important;
  }
  body.portal-theme .question-review-card{
    padding:12px!important;
    border-radius:20px!important;
  }
  body.portal-theme .question-review-card .result-question-meta{
    margin-bottom:7px!important;
    font-size:12px!important;
  }
  body.portal-theme .question-review-card .review-status{
    padding:7px 11px!important;
    font-size:12px!important;
  }
  body.portal-theme .question-review-card .result-exam-question-card{
    padding:15px 18px!important;
    border-radius:22px!important;
  }
  body.portal-theme .question-review-card .result-exam-question-card .question-part-question_text .question-text-block,
  body.portal-theme .question-review-card .result-exam-question-card .question-text-block{
    font-size:14px!important;
    line-height:1.42!important;
  }
  body.portal-theme .question-review-card .result-review-option-layout{
    min-height:50px!important;
    padding:10px 12px!important;
    grid-template-columns:16px 34px minmax(0,1fr)!important;
    gap:10px!important;
  }
  body.portal-theme .question-review-card .result-review-radio{
    width:15px!important;
    height:15px!important;
  }
  body.portal-theme .question-review-card .result-review-option-parity .nta-option-badge{
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    font-size:.88rem!important;
  }
  body.portal-theme .question-review-card .result-review-option-parity .nta-option-copy .question-text-block{
    font-size:12.8px!important;
    line-height:1.34!important;
  }
  body.portal-theme .question-review-card .stats-strip{
    grid-template-columns:1fr!important;
  }
  body.portal-theme .question-review-card .stats-tile,
  body.portal-theme .question-review-card .question-preview-card{
    padding:11px 13px!important;
    border-radius:15px!important;
  }
  body.portal-theme .question-review-card .stats-tile strong{
    font-size:18px!important;
  }
  body.portal-theme .question-review-card .stats-tile .muted,
  body.portal-theme .question-review-card .question-preview-card,
  body.portal-theme .question-review-card .question-preview-card *{
    font-size:12.5px!important;
  }
}


/* AD ASTRA targeted fix: result explanation containment + mobile review compact parity */
body.portal-theme.student-portal .question-review-card .question-preview-card,
body.portal-theme.student-portal .question-review-card .question-preview-card *{
  max-width:100%!important;
  box-sizing:border-box!important;
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
  white-space:normal!important;
}
body.portal-theme.student-portal .question-review-card .question-preview-card{
  overflow:hidden!important;
}
body.portal-theme.student-portal .question-review-card .question-preview-card .question-block,
body.portal-theme.student-portal .question-review-card .question-preview-card .question-part,
body.portal-theme.student-portal .question-review-card .question-preview-card .question-text-block,
body.portal-theme.student-portal .question-review-card .question-preview-card .math-content{
  display:block!important;
  width:100%!important;
  min-width:0!important;
}
body.portal-theme.student-portal .question-review-card .question-preview-card mjx-container,
body.portal-theme.student-portal .question-review-card .question-preview-card svg,
body.portal-theme.student-portal .question-review-card .question-preview-card img{
  max-width:100%!important;
  height:auto!important;
}
@media (max-width:900px){
  body.portal-theme.student-portal .question-review-card .question-preview-card{
    padding:14px 16px!important;
    border-radius:18px!important;
  }
  body.portal-theme.student-portal .question-review-card .question-preview-card .question-text-block{
    font-size:13px!important;
    line-height:1.45!important;
  }
}
@media (max-width:700px){
  body.portal-theme.student-portal .question-review-card > .stats-strip,
  body.portal-theme.student-portal .panel > .stats-strip:first-of-type{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
  }
  body.portal-theme.student-portal .question-review-card > .stats-strip .stats-tile,
  body.portal-theme.student-portal .panel > .stats-strip:first-of-type .stats-tile{
    width:100%!important;
    max-width:none!important;
    min-height:0!important;
    padding:14px 16px!important;
    border-radius:18px!important;
  }
  body.portal-theme.student-portal .question-review-card > .stats-strip .stats-tile strong,
  body.portal-theme.student-portal .panel > .stats-strip:first-of-type .stats-tile strong{
    font-size:18px!important;
    line-height:1.15!important;
  }
  body.portal-theme.student-portal .question-review-card > .stats-strip .stats-tile .muted,
  body.portal-theme.student-portal .panel > .stats-strip:first-of-type .stats-tile .muted{
    font-size:13px!important;
    line-height:1.35!important;
  }
}

/* =====================================================
   AD ASTRA targeted mobile exam/result containment fix
   Scope: Exam + Exam Result only; mobile sizes; tablet option circles.
   ===================================================== */
@media (max-width:700px){
  body.portal-theme.student-portal .nta-question-surface,
  body.portal-theme.student-portal .nta-question-card,
  body.portal-theme.student-portal .exam-question-card,
  body.portal-theme.student-portal .question-review-card,
  body.portal-theme.student-portal .question-review-head,
  body.portal-theme.student-portal .result-question-review-main,
  body.portal-theme.student-portal .review-options,
  body.portal-theme.student-portal .review-option,
  body.portal-theme.student-portal .result-review-option-layout{
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }

  body.portal-theme.student-portal .nta-question-card,
  body.portal-theme.student-portal .exam-question-card,
  body.portal-theme.student-portal .result-exam-question-card{
    padding:13px 14px!important;
    border-radius:16px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch!important;
  }

  body.portal-theme.student-portal .nta-question-card .question-block,
  body.portal-theme.student-portal .exam-question-card .question-block,
  body.portal-theme.student-portal .result-exam-question-card .question-block,
  body.portal-theme.student-portal .nta-question-card .question-part,
  body.portal-theme.student-portal .exam-question-card .question-part,
  body.portal-theme.student-portal .result-exam-question-card .question-part,
  body.portal-theme.student-portal .nta-question-card .question-text-block,
  body.portal-theme.student-portal .exam-question-card .question-text-block,
  body.portal-theme.student-portal .result-exam-question-card .question-text-block{
    max-width:100%!important;
    min-width:0!important;
    width:100%!important;
    box-sizing:border-box!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
  }

  body.portal-theme.student-portal .nta-question-card .question-part-question_text .question-text-block,
  body.portal-theme.student-portal .exam-question-card .question-part-question_text .question-text-block,
  body.portal-theme.student-portal .result-exam-question-card .question-part-question_text .question-text-block,
  body.portal-theme.student-portal .question-review-card .result-exam-question-card .question-part-question_text .question-text-block{
    display:block!important;
    font-size:13.5px!important;
    line-height:1.48!important;
    font-weight:600!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch!important;
  }

  body.portal-theme.student-portal .nta-option-list{gap:9px!important;}
  body.portal-theme.student-portal .nta-option-item{
    grid-template-columns:16px 32px minmax(0,1fr)!important;
    column-gap:8px!important;
    padding:9px 10px!important;
    border-radius:14px!important;
    min-height:48px!important;
    max-width:100%!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }
  body.portal-theme.student-portal .nta-option-item input{
    inline-size:12px!important;
    block-size:12px!important;
    min-width:12px!important;
  }
  body.portal-theme.student-portal .nta-option-badge{
    width:32px!important;
    height:32px!important;
    min-width:32px!important;
    min-height:32px!important;
    font-size:.78rem!important;
    line-height:1!important;
  }
  body.portal-theme.student-portal .nta-option-copy,
  body.portal-theme.student-portal .nta-option-copy .question-part,
  body.portal-theme.student-portal .nta-option-copy .question-text-block{
    min-width:0!important;
    max-width:100%!important;
    min-height:32px!important;
    box-sizing:border-box!important;
  }
  body.portal-theme.student-portal .nta-option-copy{
    overflow-x:auto!important;
    overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch!important;
  }
  body.portal-theme.student-portal .nta-option-copy .question-text-block,
  body.portal-theme.student-portal .question-review-card .result-review-option-parity .nta-option-copy .question-text-block{
    display:block!important;
    font-size:13px!important;
    line-height:1.42!important;
    font-weight:600!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch!important;
  }

  body.portal-theme.student-portal .question-review-card .result-review-option-layout{
    grid-template-columns:16px 32px minmax(0,1fr)!important;
    gap:8px!important;
    padding:9px 10px!important;
    min-height:48px!important;
  }
  body.portal-theme.student-portal .question-review-card .result-review-radio{
    width:12px!important;
    height:12px!important;
    min-width:12px!important;
  }
  body.portal-theme.student-portal .question-review-card .result-review-option-parity .nta-option-badge{
    width:32px!important;
    height:32px!important;
    min-width:32px!important;
    min-height:32px!important;
    font-size:.78rem!important;
  }
  body.portal-theme.student-portal .question-review-card .result-review-option-parity .nta-option-copy,
  body.portal-theme.student-portal .question-review-card .result-review-option-parity .nta-option-copy .question-part{
    min-height:32px!important;
    min-width:0!important;
    max-width:100%!important;
  }

  /* Exact mobile equation parity: questions and options use the same equation size. */
  body.portal-theme.student-portal .exam-question-card.nta-question-card mjx-container,
  body.portal-theme.student-portal .nta-option-copy mjx-container,
  body.portal-theme.student-portal .result-exam-question-card mjx-container,
  body.portal-theme.student-portal .question-review-card .result-review-option-parity .nta-option-copy mjx-container,
  body.portal-theme.student-portal .exam-question-card.nta-question-card mjx-container[jax="CHTML"],
  body.portal-theme.student-portal .nta-option-copy mjx-container[jax="CHTML"],
  body.portal-theme.student-portal .result-exam-question-card mjx-container[jax="CHTML"],
  body.portal-theme.student-portal .question-review-card .result-review-option-parity .nta-option-copy mjx-container[jax="CHTML"]{
    font-size:1em!important;
    line-height:1.22!important;
    vertical-align:-0.16em!important;
    max-width:none!important;
  }
  body.portal-theme.student-portal .exam-question-card.nta-question-card mjx-container[jax="SVG"] > svg,
  body.portal-theme.student-portal .nta-option-copy mjx-container[jax="SVG"] > svg,
  body.portal-theme.student-portal .result-exam-question-card mjx-container[jax="SVG"] > svg,
  body.portal-theme.student-portal .question-review-card .result-review-option-parity .nta-option-copy mjx-container[jax="SVG"] > svg{
    height:1.04em!important;
    width:auto!important;
    max-width:none!important;
  }
  body.portal-theme.student-portal .exam-question-card.nta-question-card .mathtype-equation-inline img,
  body.portal-theme.student-portal .exam-question-card.nta-question-card .astra-inline-math-img,
  body.portal-theme.student-portal .nta-option-copy .mathtype-equation-inline img,
  body.portal-theme.student-portal .nta-option-copy .astra-inline-math-img,
  body.portal-theme.student-portal .result-exam-question-card .mathtype-equation-inline img,
  body.portal-theme.student-portal .result-exam-question-card .astra-inline-math-img,
  body.portal-theme.student-portal .question-review-card .result-review-option-parity .nta-option-copy .mathtype-equation-inline img,
  body.portal-theme.student-portal .question-review-card .result-review-option-parity .nta-option-copy .astra-inline-math-img{
    height:1.04em!important;
    max-height:1.04em!important;
    max-width:none!important;
    vertical-align:-0.16em!important;
  }

  body.portal-theme.student-portal .exam-question-card.nta-question-card .inline-equation,
  body.portal-theme.student-portal .nta-option-copy .inline-equation,
  body.portal-theme.student-portal .result-exam-question-card .inline-equation{
    white-space:nowrap!important;
    display:inline-block!important;
    max-width:none!important;
  }

  body.portal-theme.student-portal .badge-soft{
    white-space:nowrap!important;
    word-break:keep-all!important;
    overflow-wrap:normal!important;
    min-width:max-content!important;
    padding-left:12px!important;
    padding-right:12px!important;
  }
}

@media (min-width:701px) and (max-width:1024px){
  body.portal-theme.student-portal .nta-option-badge,
  body.portal-theme.student-portal .question-review-card .result-review-option-parity .nta-option-badge{
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    min-height:38px!important;
    font-size:.96rem!important;
  }
  body.portal-theme.student-portal .nta-option-item{
    grid-template-columns:22px 38px minmax(0,1fr)!important;
  }
  body.portal-theme.student-portal .question-review-card .result-review-option-layout{
    grid-template-columns:20px 38px minmax(0,1fr)!important;
  }
}


/* =====================================================
   AD ASTRA final targeted mobile option vertical alignment fix
   Scope: Exam + Exam Result mobile option rows only.
   ===================================================== */
@media (max-width:700px){
  body.portal-theme.student-portal .nta-option-item,
  body.portal-theme.student-portal .question-review-card .result-review-option-layout{
    align-items:center!important;
  }

  body.portal-theme.student-portal .nta-option-copy,
  body.portal-theme.student-portal .question-review-card .result-review-option-parity .nta-option-copy{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    min-height:32px!important;
    height:auto!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch!important;
  }

  body.portal-theme.student-portal .nta-option-copy .question-part,
  body.portal-theme.student-portal .nta-option-copy .question-text-block,
  body.portal-theme.student-portal .question-review-card .result-review-option-parity .nta-option-copy .question-part,
  body.portal-theme.student-portal .question-review-card .result-review-option-parity .nta-option-copy .question-text-block{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    min-height:32px!important;
    height:auto!important;
    width:auto!important;
    max-width:none!important;
    line-height:1.42!important;
    white-space:nowrap!important;
    overflow:visible!important;
  }

  body.portal-theme.student-portal .nta-option-copy .question-part > *,
  body.portal-theme.student-portal .nta-option-copy .question-text-block > *,
  body.portal-theme.student-portal .question-review-card .result-review-option-parity .nta-option-copy .question-part > *,
  body.portal-theme.student-portal .question-review-card .result-review-option-parity .nta-option-copy .question-text-block > *{
    flex:0 0 auto!important;
  }
}
