@import url('mobile-app.css');

/* ==========================================================================
   PERMANENT DARK THEME SYSTEM — DAY MODE PERMANENTLY DISABLED
   ========================================================================== */
#themeToggleBtn,
.topbar-theme-toggle,
.floating-theme-toggle-btn,
.theme-toggle-track,
#settingsThemeSwitch,
.settings-theme-card,
.settings-theme-row,
.settings-row:has(#settingsThemeSwitch) {
    display: none !important;
}

/* --------------------------------------------------------------------------
   1. GLOBAL BACKGROUND ARTWORK UNIFICATION
   -------------------------------------------------------------------------- */

/* NIGHT / DARK MODE (الوضع الليلي) */
html[data-theme="dark"] body,
html:not([data-theme="light"]) body {
    background-color: #070b14 !important;
    background-image: url('assets/math-dark-bg.jpg'), url('math-dark-bg.jpg') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    color: #f8fafc;
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* DAY / LIGHT MODE (الوضع النهاري) */
html[data-theme="light"] body {
    background-color: #e0f2fe !important;
    background-image: url('assets/math-light-bg.png'), url('math-light-bg.png') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    color: #0f172a !important;
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* Suppress dark ambient grids & dark body::before pseudo-elements in Light Mode */
html[data-theme="light"] body::before,
html[data-theme="light"] .ambient-grid,
html[data-theme="light"] #ambientGrid {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* --------------------------------------------------------------------------
   2. UNIFIED CSS DESIGN TOKENS FOR LIGHT MODE
   -------------------------------------------------------------------------- */
html[data-theme="light"] {
    --bg-base: #e0f2fe;
    --background: #e0f2fe;
    --bg: #e0f2fe;

    --surface: #ffffff;
    --surface-card: #ffffff;
    --surface-secondary: #f8fafc;
    --surface-muted: #f1f5f9;
    --sidebar-bg: #ffffff;

    --border: rgba(14, 116, 144, 0.28);
    --border-light: rgba(14, 116, 144, 0.16);
    --border-card: rgba(14, 116, 144, 0.25);
    --border-glow: rgba(2, 132, 199, 0.35);
    --border-focus: #0284c7;

    --text-primary: #0f172a;
    --text-secondary: #1e293b;
    --text-muted: #475569;
    --text-main: #0f172a;
    --text: #0f172a;

    --glass-card: rgba(255, 255, 255, 0.96);
    --glass-card-hover: #ffffff;
    --glass-border: rgba(14, 116, 144, 0.28);

    --primary: #0284c7;
    --primary-hover: #0369a1;
    --primary-50: #e0f2fe;
    --primary-100: #bae6fd;

    /* Chapter System Tokens */
    --ch-bg-dark: #e0f2fe;
    --ch-surface: #ffffff;
    --ch-surface-card: #ffffff;
    --ch-surface-hover: #f1f5f9;
    --ch-border: rgba(14, 116, 144, 0.25);
    --ch-border-glow: rgba(2, 132, 199, 0.35);
    --ch-primary: #0284c7;
    --ch-primary-dark: #0369a1;
    --ch-text-main: #0f172a;
    --ch-text-muted: #475569;
}

/* --------------------------------------------------------------------------
   3. DAY MODE: TYPOGRAPHY CONTRAST (منع النصوص البيضاء والبهتان نهائياً)
   -------------------------------------------------------------------------- */
/* All Headings across all pages in Day Mode */
html[data-theme="light"] h1:not(.hero-banner h1):not(#hero-banner h1),
html[data-theme="light"] h2:not(.hero-banner h2):not(#hero-banner h2),
html[data-theme="light"] h3:not(.hero-banner h3):not(#hero-banner h3),
html[data-theme="light"] h4:not(.hero-banner h4):not(#hero-banner h4),
html[data-theme="light"] h5,
html[data-theme="light"] h6,
html[data-theme="light"] .page-title,
html[data-theme="light"] .section-title,
html[data-theme="light"] .brand-title,
html[data-theme="light"] .lesson-title,
html[data-theme="light"] .chapter-title,
html[data-theme="light"] .card-title,
html[data-theme="light"] .dashboard-chapters-header-title,
html[data-theme="light"] .node-title,
html[data-theme="light"] .topic-title,
html[data-theme="light"] .q-title,
html[data-theme="light"] .stat-pillar-info h4,
html[data-theme="light"] .math-ch-quiz-slide-prompt,
html[data-theme="light"] .math-ch-rule-title,
html[data-theme="light"] .worked-example-title {
    color: #0f172a !important;
    text-shadow: none !important;
}

/* All Body, Descriptions, Labels and Content in Day Mode */
html[data-theme="light"] p:not(.hero-banner p):not(#hero-banner p),
html[data-theme="light"] .page-subtitle,
html[data-theme="light"] .header-subtitle,
html[data-theme="light"] .brand-subtitle,
html[data-theme="light"] .lesson-desc,
html[data-theme="light"] .card-desc,
html[data-theme="light"] .node-desc,
html[data-theme="light"] .topic-desc,
html[data-theme="light"] .dashboard-chapters-header p,
html[data-theme="light"] .stat-pillar-info p,
html[data-theme="light"] .q-body,
html[data-theme="light"] .q-explanation,
html[data-theme="light"] .solution-step,
html[data-theme="light"] .concept-hook p,
html[data-theme="light"] .concept-hook ul,
html[data-theme="light"] .concept-hook li,
html[data-theme="light"] .worked-example p,
html[data-theme="light"] .worked-example li,
html[data-theme="light"] .quote-content,
html[data-theme="light"] .hero-stats-grid p,
html[data-theme="light"] label,
html[data-theme="light"] dd,
html[data-theme="light"] dt,
html[data-theme="light"] .math-ch-choice-text {
    color: #1e293b !important;
}

/* Muted / Secondary Labels */
html[data-theme="light"] .text-muted,
html[data-theme="light"] .muted,
html[data-theme="light"] small,
html[data-theme="light"] .sidebar-live-date,
html[data-theme="light"] .search-category-title,
html[data-theme="light"] .search-result-desc,
html[data-theme="light"] .results-bar,
html[data-theme="light"] .q-meta {
    color: #475569 !important;
}

/* --------------------------------------------------------------------------
   4. DAY MODE: MENUS, SIDEBARS, HEADERS & NAVIGATIONS (إطارات وظلال محددة)
   -------------------------------------------------------------------------- */
/* Topbars, Headers & Roadmaps */
html[data-theme="light"] .app-header,
html[data-theme="light"] .header,
html[data-theme="light"] .roadmap-header,
html[data-theme="light"] .page-header,
html[data-theme="light"] .main-header {
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1.5px solid rgba(14, 116, 144, 0.28) !important;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04) !important;
    color: #0f172a !important;
}

/* Sidebars (Right / Left) */
html[data-theme="light"] .sidebar,
html[data-theme="light"] .sidebar-right,
html[data-theme="light"] .drawer {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1.5px solid rgba(14, 116, 144, 0.28) !important;
    box-shadow: 0 10px 35px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.06) !important;
    color: #0f172a !important;
}

html[data-theme="light"] .sidebar-header,
html[data-theme="light"] .sidebar-profile {
    background: transparent !important;
    border-color: rgba(14, 116, 144, 0.18) !important;
}

html[data-theme="light"] .sidebar .brand,
html[data-theme="light"] .sidebar-right .brand-title {
    color: #0f172a !important;
    text-shadow: none !important;
}

html[data-theme="light"] .nav-section-title {
    color: #475569 !important;
    font-weight: 800 !important;
}

html[data-theme="light"] .sidebar-datetime-box {
    background: #f1f5f9 !important;
    border: 1.5px solid rgba(14, 116, 144, 0.22) !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05) !important;
}

html[data-theme="light"] .sidebar-datetime-icon {
    background: #e0f2fe !important;
    color: #0284c7 !important;
    border: 1px solid rgba(2, 132, 199, 0.35) !important;
}

html[data-theme="light"] .sidebar-live-time {
    color: #0f172a !important;
    font-weight: 800 !important;
}

/* --------------------------------------------------------------------------
   5. DAY MODE: MENU ITEMS, BUTTONS, TABS & PILLS (عناصر القوائم والتنقل)
   -------------------------------------------------------------------------- */
/* Inactive Menu Items & Tabs */
html[data-theme="light"] .nav-item:not(.active),
html[data-theme="light"] .nav-tab:not(.active),
html[data-theme="light"] .tab-btn:not(.active),
html[data-theme="light"] .chapter-pill:not(.active),
html[data-theme="light"] .filter-btn:not(.active),
html[data-theme="light"] .btn-link,
html[data-theme="light"] .btn-nav-glass,
html[data-theme="light"] .toggle-all-btn,
html[data-theme="light"] .stat-pill,
html[data-theme="light"] .metric-badge-box,
html[data-theme="light"] .back-btn {
    background: #f8fafc !important;
    border: 1.5px solid rgba(148, 163, 184, 0.4) !important;
    color: #1e293b !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05) !important;
    font-weight: 700 !important;
}

html[data-theme="light"] .nav-item:not(.active) i,
html[data-theme="light"] .tab-btn:not(.active) i,
html[data-theme="light"] .chapter-pill:not(.active) i,
html[data-theme="light"] .btn-link i {
    color: #0284c7 !important;
}

/* Hover on Menu Items */
html[data-theme="light"] .nav-item:hover:not(.active),
html[data-theme="light"] .nav-tab:hover:not(.active),
html[data-theme="light"] .tab-btn:hover:not(.active),
html[data-theme="light"] .chapter-pill:hover:not(.active),
html[data-theme="light"] .filter-btn:hover:not(.active),
html[data-theme="light"] .btn-link:hover,
html[data-theme="light"] .btn-nav-glass:hover,
html[data-theme="light"] .toggle-all-btn:hover,
html[data-theme="light"] .back-btn:hover {
    background: #e0f2fe !important;
    border-color: #0284c7 !important;
    color: #0284c7 !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.18) !important;
}

/* Active State for Menu Items */
html[data-theme="light"] .nav-item.active,
html[data-theme="light"] .nav-tab.active,
html[data-theme="light"] .tab-btn.active,
html[data-theme="light"] .chapter-pill.active,
html[data-theme="light"] .filter-btn.active {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35) !important;
    font-weight: 800 !important;
}

html[data-theme="light"] .nav-item.active i,
html[data-theme="light"] .tab-btn.active i,
html[data-theme="light"] .chapter-pill.active i {
    color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   6. DAY MODE: DROPDOWNS, SELECTS & AUTOCOMPLETE (القوائم المنسدلة بدقة)
   -------------------------------------------------------------------------- */
html[data-theme="light"] select,
html[data-theme="light"] .search-dropdown,
html[data-theme="light"] .dropdown-menu,
html[data-theme="light"] .menu,
html[data-theme="light"] .context-menu,
html[data-theme="light"] .user-dropdown {
    background: #ffffff !important;
    border: 1.5px solid rgba(2, 132, 199, 0.35) !important;
    color: #0f172a !important;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.16), 0 2px 8px rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .select-filter {
    background-color: #ffffff !important;
    border: 1.5px solid rgba(2, 132, 199, 0.35) !important;
    color: #0f172a !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] select option {
    background: #ffffff !important;
    color: #0f172a !important;
    font-weight: 600 !important;
    padding: 10px 14px !important;
}

html[data-theme="light"] select option:checked,
html[data-theme="light"] select option:hover {
    background: #e0f2fe !important;
    color: #0284c7 !important;
}

html[data-theme="light"] .search-dropdown .search-result-item {
    color: #0f172a !important;
}

html[data-theme="light"] .search-dropdown .search-result-item:hover,
html[data-theme="light"] .search-dropdown .search-result-item.selected {
    background: #e0f2fe !important;
    color: #0284c7 !important;
}

html[data-theme="light"] .search-dropdown .search-result-title {
    color: #0f172a !important;
}

html[data-theme="light"] .search-dropdown .search-result-desc {
    color: #475569 !important;
}

/* Search inputs and form controls */
html[data-theme="light"] input[type="text"],
html[data-theme="light"] input[type="search"],
html[data-theme="light"] input[type="password"],
html[data-theme="light"] textarea,
html[data-theme="light"] .search-input,
html[data-theme="light"] .search-wrapper input,
html[data-theme="light"] .topbar-search-input {
    background: #ffffff !important;
    border: 1.5px solid rgba(148, 163, 184, 0.45) !important;
    color: #0f172a !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder,
html[data-theme="light"] .search-input::placeholder,
html[data-theme="light"] .topbar-search-input::placeholder {
    color: #64748b !important;
}

html[data-theme="light"] input:focus,
html[data-theme="light"] textarea:focus,
html[data-theme="light"] .search-input:focus,
html[data-theme="light"] .topbar-search-input:focus {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2) !important;
}

/* --------------------------------------------------------------------------
   7. DAY MODE: CARDS, CONTAINERS & QUIZ SURFACES (البطاقات غير باهتة)
   -------------------------------------------------------------------------- */
html[data-theme="light"] .card,
html[data-theme="light"] .goal-card,
html[data-theme="light"] .adaptive-card,
html[data-theme="light"] .continue-card,
html[data-theme="light"] .chart-card,
html[data-theme="light"] .activity-card,
html[data-theme="light"] .achievement-card,
html[data-theme="light"] .profile-card,
html[data-theme="light"] .settings-card,
html[data-theme="light"] .badge-card,
html[data-theme="light"] .ai-card,
html[data-theme="light"] .overview-card,
html[data-theme="light"] .stats-card,
html[data-theme="light"] .glass-card,
html[data-theme="light"] .content-card,
html[data-theme="light"] .container-box,
html[data-theme="light"] .controls-card,
html[data-theme="light"] .dashboard-chapters-section,
html[data-theme="light"] .node-card,
html[data-theme="light"] .topic-card,
html[data-theme="light"] .topic-node-card,
html[data-theme="light"] .lesson-node-card,
html[data-theme="light"] .lesson-card,
html[data-theme="light"] .q-card,
html[data-theme="light"] .question-box,
html[data-theme="light"] .worked-example,
html[data-theme="light"] .concept-hook,
html[data-theme="light"] .quote-ticker-card,
html[data-theme="light"] .stat-pillar,
html[data-theme="light"] .math-ch-quiz-slide-top,
html[data-theme="light"] .math-ch-quiz-slide-card,
html[data-theme="light"] .math-ch-quiz-nav-strip,
html[data-theme="light"] .math-ch-theory-container,
html[data-theme="light"] .math-ch-slide-card {
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1.5px solid rgba(14, 116, 144, 0.25) !important;
    box-shadow: 0 8px 24px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04) !important;
    color: #0f172a !important;
}

/* Card Hovers */
html[data-theme="light"] .card:hover,
html[data-theme="light"] .node-card:hover,
html[data-theme="light"] .topic-card:hover,
html[data-theme="light"] .q-card:hover,
html[data-theme="light"] .stat-pillar:hover {
    border-color: #0284c7 !important;
    box-shadow: 0 14px 34px -4px rgba(2, 132, 199, 0.16), 0 4px 12px rgba(15, 23, 42, 0.06) !important;
}

/* Specific Card Texts & Subtitles Inside Cards */
html[data-theme="light"] .card h1,
html[data-theme="light"] .card h2,
html[data-theme="light"] .card h3,
html[data-theme="light"] .card h4,
html[data-theme="light"] .card strong,
html[data-theme="light"] .goal-card h1,
html[data-theme="light"] .goal-card h2,
html[data-theme="light"] .goal-card h3,
html[data-theme="light"] .adaptive-card h1,
html[data-theme="light"] .adaptive-card h2,
html[data-theme="light"] .adaptive-card h3,
html[data-theme="light"] .chart-card h1,
html[data-theme="light"] .chart-card h2,
html[data-theme="light"] .chart-card h3,
html[data-theme="light"] .activity-card h1,
html[data-theme="light"] .activity-card h2,
html[data-theme="light"] .activity-card h3,
html[data-theme="light"] .badge-card h1,
html[data-theme="light"] .badge-card h2,
html[data-theme="light"] .continue-card h1,
html[data-theme="light"] .continue-card h2 {
    color: #0f172a !important;
}

html[data-theme="light"] .card p,
html[data-theme="light"] .goal-card p,
html[data-theme="light"] .adaptive-card p,
html[data-theme="light"] .chart-card p,
html[data-theme="light"] .activity-card p,
html[data-theme="light"] .badge-card p,
html[data-theme="light"] .continue-card p {
    color: #1e293b !important;
}

/* SVG Paths */
html[data-theme="light"] .node-path-svg line,
html[data-theme="light"] .node-path-svg path {
    stroke: rgba(2, 132, 199, 0.4) !important;
}

/* --------------------------------------------------------------------------
   8. DAY MODE: HERO BANNERS (تصميم فخم عالي التباين)
   -------------------------------------------------------------------------- */
html[data-theme="light"] .hero-banner,
html[data-theme="light"] #hero-banner {
    background: linear-gradient(135deg, #1e3a8a 0%, #0369a1 50%, #0284c7 100%) !important;
    border: 2px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 14px 36px rgba(2, 132, 199, 0.25) !important;
    color: #ffffff !important;
}

html[data-theme="light"] .hero-banner h1,
html[data-theme="light"] .hero-banner h2,
html[data-theme="light"] .hero-banner h3,
html[data-theme="light"] .hero-banner .hero-title,
html[data-theme="light"] #hero-banner h1,
html[data-theme="light"] #hero-banner h2,
html[data-theme="light"] #hero-banner h3,
html[data-theme="light"] #hero-banner strong {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="light"] .hero-banner p,
html[data-theme="light"] .hero-banner span:not(.badge):not(.badge *):not(.badge-kicker):not(.hero-tag),
html[data-theme="light"] .hero-banner .hero-desc,
html[data-theme="light"] #hero-banner p,
html[data-theme="light"] #hero-banner span {
    color: #e0f2fe !important;
}

/* --------------------------------------------------------------------------
   9. DAY MODE: FORMULAS & KATEX (معادلات واضحة دون بهتان)
   -------------------------------------------------------------------------- */
html[data-theme="light"] .q-body-math,
html[data-theme="light"] .math-box,
html[data-theme="light"] .math-formula {
    background: #f8fafc !important;
    border: 1.5px solid rgba(14, 116, 144, 0.28) !important;
    color: #0f172a !important;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

html[data-theme="light"] .katex,
html[data-theme="light"] .katex-display,
html[data-theme="light"] .katex * {
    color: #0f172a !important;
}

html[data-theme="light"] .katex .mbin,
html[data-theme="light"] .katex .mrel,
html[data-theme="light"] .katex .math-op-accent {
    color: #d97706 !important;
}

html[data-theme="light"] .katex .frac-line {
    border-bottom-color: #0284c7 !important;
}

/* --------------------------------------------------------------------------
   10. NIGHT MODE DEFINITIONS & SOLID CONTRAST (الوضع الليلي المتناسق)
   -------------------------------------------------------------------------- */
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .sidebar-right,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .roadmap-header,
html[data-theme="dark"] .app-header,
html[data-theme="dark"] .header,
html[data-theme="dark"] .controls-card,
html[data-theme="dark"] .card,
html[data-theme="dark"] .q-card,
html[data-theme="dark"] .lesson-card {
    border-color: rgba(99, 102, 241, 0.28) !important;
    color: #f8fafc;
}

html[data-theme="dark"] select,
html[data-theme="dark"] .select-filter,
html[data-theme="dark"] .search-dropdown,
html[data-theme="dark"] .dropdown-menu {
    background: #0d1527 !important;
    border: 1.5px solid rgba(99, 102, 241, 0.35) !important;
    color: #ffffff !important;
}

html[data-theme="dark"] select option {
    background: #0d1527 !important;
    color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   11. UNIVERSAL THEME TOGGLE BUTTON COMPONENT
   -------------------------------------------------------------------------- */
.topbar-theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.16);
    color: #f8fafc;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
}

.topbar-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(56, 189, 248, 0.45);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25);
}

/* Light Mode: Elegant Royal Blue Theme Toggle matching user profile and badges */
html[data-theme="light"] .topbar-theme-toggle {
    background: linear-gradient(145deg, #1e3a68 0%, #15294a 100%) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.45) !important;
    box-shadow: 0 4px 15px rgba(18, 32, 54, 0.25) !important;
    color: #ffffff !important;
    padding: 8px 18px !important;
    gap: 10px !important;
}

html[data-theme="light"] .topbar-theme-toggle:hover {
    background: linear-gradient(145deg, #254a85 0%, #1a335c 100%) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 6px 18px rgba(18, 32, 54, 0.35) !important;
}

html[data-theme="light"] .topbar-theme-toggle .theme-toggle-label,
html[data-theme="light"] .topbar-theme-toggle #themeToggleLabel,
html[data-theme="light"] .theme-toggle-label {
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 13px !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="light"] .topbar-theme-toggle .theme-icon-sun {
    display: block !important;
    color: #fbbf24 !important;
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.8)) !important;
}

.topbar-theme-toggle .theme-icon {
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Floating Theme Toggle (for pages without explicit topbar container) */
.floating-theme-toggle-btn {
    position: fixed;
    top: 18px;
    left: 20px;
    z-index: 99998;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid rgba(56, 189, 248, 0.35);
    color: #f8fafc;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 15px rgba(56, 189, 248, 0.2);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-theme-toggle-btn:hover {
    transform: translateY(-2px);
    border-color: #38bdf8;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 22px rgba(56, 189, 248, 0.4);
}

html[data-theme="light"] .floating-theme-toggle-btn {
    background: #ffffff !important;
    border-color: rgba(2, 132, 199, 0.35) !important;
    color: #0284c7 !important;
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.2) !important;
}

/* --------------------------------------------------------------------------
   12. TOPBAR SPACING, MARGINS & FLOATING BADGES (تنسيق شريط الأدوات العلوي)
   -------------------------------------------------------------------------- */
.topbar,
html[data-theme="light"] .topbar,
html[data-theme="dark"] .topbar {
    min-height: 76px !important;
    height: auto !important;
    padding: 16px 28px !important;
    margin-bottom: 16px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    z-index: 1000 !important;
}

html[data-theme="light"] .topbar {
    background: transparent !important;
    border-bottom: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.topbar-inner {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;
    flex-wrap: wrap !important;
}

.topbar-section-right {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}

.topbar-section-left {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

/* Light Mode Badges */
html[data-theme="light"] .user-profile-pill,
html[data-theme="light"] .topbar-badge-level,
html[data-theme="light"] .topbar-badge-xp,
html[data-theme="light"] .topbar-badge-streak,
html[data-theme="light"] .topbar-badge-challenge,
html[data-theme="light"] .topbar-notification-btn {
    background: linear-gradient(145deg, #1e3a68 0%, #15294a 100%) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 4px 14px rgba(18, 32, 54, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.35) !important;
    color: #ffffff !important;
}

html[data-theme="light"] .topbar-badge-level,
html[data-theme="light"] .topbar-badge-xp,
html[data-theme="light"] .topbar-badge-streak,
html[data-theme="light"] .topbar-badge-challenge {
    padding: 8px 16px !important;
    border-radius: 14px !important;
    gap: 8px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
}

html[data-theme="light"] .user-profile-pill {
    padding: 6px 14px 6px 8px !important;
    border-radius: 16px !important;
    gap: 10px !important;
}

/* --------------------------------------------------------------------------
   13. UPPER STATISTICAL CARDS: 100% SOLID & HIGH-CONTRAST (البطاقات الإحصائية العلوية)
   -------------------------------------------------------------------------- */
#masterLearningLoopCard article,
#dashboardSkillsMapCard article,
html[data-theme="light"] #masterLearningLoopCard article,
html[data-theme="light"] #dashboardSkillsMapCard article,
html[data-theme="dark"] #masterLearningLoopCard article,
html[data-theme="dark"] #dashboardSkillsMapCard article {
    background: radial-gradient(120% 120% at 50% 0%, #0d1b33 0%, #081022 100%) !important;
    border: 1.5px solid rgba(59, 130, 246, 0.45) !important;
    box-shadow: 0 0 25px rgba(37, 99, 235, 0.22), 0 8px 24px rgba(0, 0, 0, 0.35) !important;
    opacity: 1 !important;
    z-index: 2 !important;
}

#masterLearningLoopCard h3,
#dashboardSkillsMapCard h3,
html[data-theme="light"] #masterLearningLoopCard h3,
html[data-theme="light"] #dashboardSkillsMapCard h3,
html[data-theme="dark"] #masterLearningLoopCard h3,
html[data-theme="dark"] #dashboardSkillsMapCard h3 {
    color: #ffffff !important;
    font-weight: 800 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
}

#masterLearningLoopCard * {
    opacity: 1 !important;
}

/* 4 Stat Sub-Cards 100% Solid & High-Contrast */
.stat-card-critical,
html[data-theme="light"] .stat-card-critical,
html[data-theme="dark"] .stat-card-critical {
    background: #240e15 !important;
    border: 1.5px solid #ef4444 !important;
    opacity: 1 !important;
    border-radius: 14px !important;
}
.stat-card-critical span:first-child,
html[data-theme="light"] .stat-card-critical span:first-child,
html[data-theme="dark"] .stat-card-critical span:first-child {
    color: #fca5a5 !important;
    font-weight: 800 !important;
}
.stat-card-critical #metricCriticalSkills,
html[data-theme="light"] .stat-card-critical #metricCriticalSkills,
html[data-theme="dark"] .stat-card-critical #metricCriticalSkills {
    color: #ffffff !important;
    font-weight: 900 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
}
.stat-card-critical div:last-child,
html[data-theme="light"] .stat-card-critical div:last-child,
html[data-theme="dark"] .stat-card-critical div:last-child {
    color: #fee2e2 !important;
    font-weight: 700 !important;
}

.stat-card-completed,
html[data-theme="light"] .stat-card-completed,
html[data-theme="dark"] .stat-card-completed {
    background: #0c1c38 !important;
    border: 1.5px solid #3b82f6 !important;
    opacity: 1 !important;
    border-radius: 14px !important;
}
.stat-card-completed span:first-child,
html[data-theme="light"] .stat-card-completed span:first-child,
html[data-theme="dark"] .stat-card-completed span:first-child {
    color: #93c5fd !important;
    font-weight: 800 !important;
}
.stat-card-completed #metricCompletedChapters,
.stat-card-completed #metricCompletedChapters span,
html[data-theme="light"] .stat-card-completed #metricCompletedChapters,
html[data-theme="light"] .stat-card-completed #metricCompletedChapters span,
html[data-theme="dark"] .stat-card-completed #metricCompletedChapters,
html[data-theme="dark"] .stat-card-completed #metricCompletedChapters span {
    color: #ffffff !important;
    font-weight: 900 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
}
.stat-card-completed div:last-child,
html[data-theme="light"] .stat-card-completed div:last-child,
html[data-theme="dark"] .stat-card-completed div:last-child {
    color: #e0e7ff !important;
    font-weight: 700 !important;
}

.stat-card-mastered,
html[data-theme="light"] .stat-card-mastered,
html[data-theme="dark"] .stat-card-mastered {
    background: #09241b !important;
    border: 1.5px solid #10b981 !important;
    opacity: 1 !important;
    border-radius: 14px !important;
}
.stat-card-mastered span:first-child,
html[data-theme="light"] .stat-card-mastered span:first-child,
html[data-theme="dark"] .stat-card-mastered span:first-child {
    color: #6ee7b7 !important;
    font-weight: 800 !important;
}
.stat-card-mastered #metricMasteredSkills,
.stat-card-mastered #metricMasteredSkills span,
html[data-theme="light"] .stat-card-mastered #metricMasteredSkills,
html[data-theme="light"] .stat-card-mastered #metricMasteredSkills span,
html[data-theme="dark"] .stat-card-mastered #metricMasteredSkills,
html[data-theme="dark"] .stat-card-mastered #metricMasteredSkills span {
    color: #ffffff !important;
    font-weight: 900 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
}
.stat-card-mastered div:last-child,
html[data-theme="light"] .stat-card-mastered div:last-child,
html[data-theme="dark"] .stat-card-mastered div:last-child {
    color: #d1fae5 !important;
    font-weight: 700 !important;
}

.stat-card-practice,
html[data-theme="light"] .stat-card-practice,
html[data-theme="dark"] .stat-card-practice {
    background: #241a08 !important;
    border: 1.5px solid #f59e0b !important;
    opacity: 1 !important;
    border-radius: 14px !important;
}
.stat-card-practice span:first-child,
html[data-theme="light"] .stat-card-practice span:first-child,
html[data-theme="dark"] .stat-card-practice span:first-child {
    color: #fde047 !important;
    font-weight: 800 !important;
}
.stat-card-practice #metricPracticeSkills,
html[data-theme="light"] .stat-card-practice #metricPracticeSkills,
html[data-theme="dark"] .stat-card-practice #metricPracticeSkills {
    color: #ffffff !important;
    font-weight: 900 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
}
.stat-card-practice div:last-child,
html[data-theme="light"] .stat-card-practice div:last-child,
html[data-theme="dark"] .stat-card-practice div:last-child {
    color: #fef3c7 !important;
    font-weight: 700 !important;
}

/* --------------------------------------------------------------------------
   14. DASHBOARD CHAPTER CARDS: WCAG AAA HIGH-CONTRAST (بطاقات الفصول الدراسية)
   -------------------------------------------------------------------------- */
.dashboard-chapter-card,
html[data-theme="light"] .dashboard-chapter-card,
html[data-theme="dark"] .dashboard-chapter-card {
    border-radius: 16px !important;
    box-shadow: 0 10px 28px -4px rgba(15, 23, 42, 0.35) !important;
}

.dashboard-chapter-title,
html[data-theme="light"] .dashboard-chapter-title,
html[data-theme="dark"] .dashboard-chapter-title {
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 15px !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
}

.dashboard-chapter-subtitle,
html[data-theme="light"] .dashboard-chapter-subtitle,
html[data-theme="dark"] .dashboard-chapter-subtitle {
    color: #e0f2fe !important;
    font-weight: 700 !important;
    font-size: 12.5px !important;
    line-height: 1.4 !important;
    opacity: 1 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

.dashboard-chapter-progress-row,
html[data-theme="light"] .dashboard-chapter-progress-row,
html[data-theme="dark"] .dashboard-chapter-progress-row {
    font-size: 12px !important;
    font-weight: 700 !important;
}

.dashboard-chapter-progress-row span:last-child,
html[data-theme="light"] .dashboard-chapter-progress-row span:last-child,
html[data-theme="dark"] .dashboard-chapter-progress-row span:last-child {
    color: #ffffff !important;
    font-weight: 800 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

/* --------------------------------------------------------------------------
   15. MATHEMATICAL RADICAL SYSTEM — VINCULUM ROOF & MULTI-CHAR SCALING
   Connects √ checkmark to a horizontal overline roof covering the radicand.
   Scales up size for 2+ digits/letters. Prevents collisions with letters/digits.
   -------------------------------------------------------------------------- */
.math-radical {
    display: inline-flex !important;
    align-items: stretch !important;
    vertical-align: -0.06em !important;
    direction: ltr !important;
    unicode-bidi: isolate !important;
    margin: 0 0.25em !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    position: relative !important;
    font-style: normal !important;
}

.math-radical .rad-index {
    font-size: 0.62em !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    position: relative !important;
    top: -0.38em !important;
    margin-right: -0.22em !important;
    color: inherit !important;
}

.math-radical .rad-surd {
    font-family: 'KaTeX_Main', 'Cambria Math', 'STIX Two Math', 'DejaVu Sans', serif !important;
    font-size: 1.18em !important;
    line-height: 0.95 !important;
    margin-right: -0.5px !important;
    font-style: normal !important;
    color: inherit !important;
    user-select: none !important;
    display: inline-block !important;
    transform: translateY(1px) !important;
}

.math-radical .rad-radicand {
    border-top: 1.8px solid currentColor !important;
    padding-top: 1.5px !important;
    padding-left: 2px !important;
    padding-right: 3px !important;
    margin-left: -0.5px !important;
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1.15 !important;
    font-style: normal !important;
    font-family: inherit !important;
}

/* Enlarge root size when radicand has 2 or more characters (e.g. √14, √125, √28, √2ab) */
.math-radical.rad-large {
    margin: 0 0.35em !important;
    vertical-align: -0.10em !important;
}

.math-radical.rad-large .rad-surd {
    font-size: 1.40em !important;
    font-weight: 700 !important;
    line-height: 0.88 !important;
    transform: translateY(1.5px) !important;
}

.math-radical.rad-large .rad-radicand {
    border-top-width: 2.2px !important;
    padding-top: 2px !important;
    padding-left: 3px !important;
    padding-right: 4.5px !important;
    font-size: 1.05em !important;
}

/* KaTeX .sqrt: authentic LaTeX vinculum and clean SVG rendering */
.katex .sqrt {
    margin: 0 0.15em !important;
}

.katex .sqrt svg {
    overflow: visible !important;
}

/* Backwards-compatibility for .math-sqrt */
.math-sqrt {
    display: inline-flex !important;
    align-items: stretch !important;
    vertical-align: -0.06em !important;
    direction: ltr !important;
    unicode-bidi: isolate !important;
    margin: 0 0.25em !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

.math-rad-index {
    font-size: 0.62em !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    position: relative !important;
    top: -0.38em !important;
    margin-right: -0.22em !important;
    color: inherit !important;
}

.math-rad-surd {
    font-family: 'KaTeX_Main', 'Cambria Math', 'STIX Two Math', 'DejaVu Sans', serif !important;
    font-size: 1.18em !important;
    line-height: 0.95 !important;
    margin-right: -0.5px !important;
    color: inherit !important;
    display: inline-block !important;
    transform: translateY(1px) !important;
}

.math-rad-body {
    border-top: 1.8px solid currentColor !important;
    padding-top: 1.5px !important;
    padding-left: 2px !important;
    padding-right: 3px !important;
    margin-left: -0.5px !important;
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1.15 !important;
}

.math-sqrt.rad-large {
    margin: 0 0.35em !important;
}

.math-sqrt.rad-large .math-rad-surd {
    font-size: 1.40em !important;
    font-weight: 700 !important;
    transform: translateY(1.5px) !important;
}

.math-sqrt.rad-large .math-rad-body {
    border-top-width: 2.2px !important;
    padding-top: 2px !important;
    padding-left: 3px !important;
    padding-right: 4.5px !important;
    font-size: 1.05em !important;
}

/* ==========================================================================
   SECTION 16: QUIZ CHOICES VISIBILITY & FRACTION RADICAL CLEARANCE
   ========================================================================== */
/* 1. Ensure Quiz/Exam Options C & D are 100% fully visible and never clipped */
.math-ch-quiz-slide-card {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(56, 189, 248, 0.35) rgba(15, 23, 42, 0.3);
}

.math-ch-quiz-slide-card::-webkit-scrollbar {
    display: block !important;
    width: 5px !important;
}

.math-ch-quiz-slide-card::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.35) !important;
    border-radius: 10px !important;
}

.math-ch-quiz-slide-card .math-ch-slide-math-box {
    margin: 4px 0 10px !important;
    padding: 14px 22px !important;
    min-height: 58px !important;
    flex-shrink: 0 !important;
    overflow: visible !important;
}

.math-ch-quiz-slide-card .math-ch-slide-math-box .katex-display,
.math-ch-quiz-slide-card .math-ch-slide-math-box .math-display-wrapper {
    margin: 2px 0 !important;
    padding: 4px 8px !important;
    overflow-y: visible !important;
    overflow-x: auto !important;
}

.math-ch-quiz-slide-card .math-ch-choices-list {
    display: flex !important;
    flex-direction: column !important;
    flex-shrink: 0 !important;
    margin-top: 6px !important;
    gap: 10px !important;
    width: 100% !important;
}

.math-ch-quiz-slide-card .math-ch-choice-item {
    min-height: 52px !important;
    padding: 10px 16px !important;
    flex-shrink: 0 !important;
    overflow: visible !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-height: 820px) {
    .math-ch-quiz-slide-top {
        padding: 5px 12px !important;
        gap: 4px !important;
    }
    .math-ch-quiz-slide-layout {
        gap: 5px !important;
    }
    .math-ch-quiz-slide-card {
        padding: 8px 14px !important;
        gap: 5px !important;
    }
    .math-ch-quiz-slide-card .math-ch-slide-math-box {
        padding: 10px 16px !important;
        margin: 3px 0 6px !important;
        font-size: 18px !important;
        min-height: 50px !important;
        overflow: visible !important;
    }
    .math-ch-quiz-slide-card .math-ch-choice-item {
        min-height: 48px !important;
        padding: 8px 12px !important;
        overflow: visible !important;
    }
}

/* Authentic KaTeX fraction layout without vertical displacement hacks */
.katex .frac-line {
    border-bottom-color: currentColor !important;
}

.katex .mfrac {
    vertical-align: middle !important;
}

.katex .mfrac .vlist-t > .vlist-r:first-child .vlist,
.katex .mfrac .vlist-t2 > .vlist-r:first-child .vlist {
    padding-bottom: 2.5px !important;
}

.katex .mfrac .vlist-t > .vlist-r:last-child .vlist,
.katex .mfrac .vlist-t2 > .vlist-r:last-child .vlist {
    padding-top: 2.5px !important;
}

.katex .sqrt > .vlist-t > .vlist-r:first-child .vlist,
.katex .sqrt > .vlist-t2 > .vlist-r:first-child .vlist {
    padding-top: 2.5px !important;
}

.katex .sqrt .sqrt-sign {
    padding-top: 1px !important;
}

.math-frac-num {
    border-bottom: 1.5px solid currentColor !important;
    padding-bottom: 2px !important;
    margin-bottom: 1px !important;
}

.math-frac-den {
    padding-top: 2px !important;
    margin-top: 1px !important;
}

/* ==========================================================================
   ENHANCED QUIZ & EXAM CHOICES PALETTE (Day / Light Theme)
   ========================================================================== */
html[data-theme="light"] .math-ch-choice-item {
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-right: 5px solid #94a3b8 !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02) !important;
    color: #0f172a !important;
    border-radius: 12px !important;
    min-height: 52px !important;
    gap: 14px !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html[data-theme="light"] .math-ch-choice-item:hover {
    background: #f8fafc !important;
    border-color: #93c5fd !important;
    border-right-color: #2563eb !important;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.10) !important;
    transform: translateX(-4px) !important;
}

html[data-theme="light"] .math-ch-choice-item.selected {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
    border: 1.5px solid #3b82f6 !important;
    border-right: 6px solid #1d4ed8 !important;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.16) !important;
}

html[data-theme="light"] .math-ch-choice-badge {
    width: 32px !important;
    height: 32px !important;
    line-height: 30px !important;
    border-radius: 9px !important;
    border: 1.5px solid #cbd5e1 !important;
    background: #f1f5f9 !important;
    font-weight: 800 !important;
    font-size: 15px !important;
    color: #1e3a8a !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html[data-theme="light"] .math-ch-choice-item:hover .math-ch-choice-badge {
    border-color: #93c5fd !important;
    background: #e0f2fe !important;
    color: #0369a1 !important;
}

html[data-theme="light"] .math-ch-choice-item.selected .math-ch-choice-badge {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
    transform: scale(1.06) !important;
    box-shadow: 0 2px 8px rgba(29, 78, 216, 0.35) !important;
}

html[data-theme="light"] .math-ch-choice-text {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}

html[data-theme="light"] .math-ch-choice-item.correct {
    border: 2px solid #16a34a !important;
    border-right: 6px solid #15803d !important;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important;
    color: #14532d !important;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.18) !important;
}

html[data-theme="light"] .math-ch-choice-item.correct .math-ch-choice-badge {
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: #ffffff !important;
}

html[data-theme="light"] .math-ch-choice-item.correct .math-ch-choice-text {
    color: #14532d !important;
    font-weight: 800 !important;
}

html[data-theme="light"] .math-ch-choice-item.wrong {
    border: 2px solid #dc2626 !important;
    border-right: 6px solid #b91c1c !important;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%) !important;
    color: #7f1d1d !important;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.14) !important;
}

html[data-theme="light"] .math-ch-choice-item.wrong .math-ch-choice-badge {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}

html[data-theme="light"] .math-ch-choice-item.wrong .math-ch-choice-text {
    color: #7f1d1d !important;
    text-decoration: line-through !important;
}

/* ==========================================================================
   UNIFIED MATHEMATICAL STEP SPACING & EYE-COMFORT THEME RULES
   ========================================================================== */
.math-ch-steps-list {
    gap: 18px !important;
}

.math-ch-step-row {
    padding: 18px 22px !important;
    margin-bottom: 4px !important;
}

.math-ch-step-text {
    line-height: 1.85 !important;
}

.math-display-wrapper {
    margin: 14px 0 !important;
    padding: 6px 0 !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.math-display-wrapper::-webkit-scrollbar,
.katex-display::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.katex-display {
    margin: 14px 0 !important;
    padding: 6px 0 !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.katex .mtable .vertical-separator {
    min-height: 16px !important;
}

.nb-step-item {
    margin: 12px 0 !important;
    padding: 12px 18px !important;
    line-height: 2 !important;
}




