/* ==========================================================================
   Apex Rankers Academy - Core Design System & Stylesheet
   ========================================================================== */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette - Modern Dark Theme */
    --bg-base: #0b0f19;
    --bg-surface: #151b2c;
    --bg-surface-hover: #1e263e;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(16, 185, 129, 0.2);
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dimmed: #6b7280;
    --text-heading: #ffffff;
    
    --bg-navbar: rgba(21, 27, 44, 0.8);
    --bg-navbar-mobile: rgba(12, 16, 29, 0.98);
    --btn-primary-text: #000000;
    --bg-option-key: rgba(255, 255, 255, 0.1);
    --bg-modal-overlay: rgba(11, 15, 25, 0.95);
    
    --success: hsl(162, 84%, 45%);
    --correct-key-text: #000000;
    
    --primary-glow: rgba(16, 185, 129, 0.4);
    --card-shadow-glow: rgba(16, 185, 129, 0.05);
    
    /* Accents (HSL for easy opacity adjustments) */
    --primary-h: 162;
    --primary-s: 84%;
    --primary-l: 45%;
    --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l)); /* Emerald Green */
    
    --secondary-h: 217;
    --secondary-s: 91%;
    --secondary-l: 60%;
    --secondary: hsl(var(--secondary-h), var(--secondary-s), var(--secondary-l)); /* Royal Blue */
    
    --danger-h: 350;
    --danger-s: 84%;
    --danger-l: 55%;
    --danger: hsl(var(--danger-h), var(--danger-s), var(--danger-l)); /* Crimson */
    
    --warning-h: 38;
    --warning-s: 92%;
    --warning-l: 50%;
    --warning: hsl(var(--warning-h), var(--warning-s), var(--warning-l)); /* Amber */
    
    /* Layout & Spacing */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --max-width: 1200px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;

    /* Scrollbars & Panel Borders */
    --scrollbar-thumb: rgba(255, 255, 255, 0.28);
    --scrollbar-thumb-hover: rgba(255, 255, 255, 0.48);
    --scrollbar-track: rgba(255, 255, 255, 0.04);
    --panel-border: rgba(255, 255, 255, 0.12);
    --panel-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

/* Light Theme Variables - Matches Company Logo (Dark Navy Blue, Light Teal Blue, Gold/Mustard Yellow) */
.light-theme {
    --bg-base: #f4f6f9; /* Soft cool light blue-gray tint */
    --bg-surface: #ffffff;
    --bg-surface-hover: #e2e8f0; /* Slate 200 */
    --border-color: rgba(25, 63, 102, 0.08); /* Navy Blue border */
    --border-glow: rgba(20, 184, 166, 0.15); /* Teal glow */
    
    --text-main: #334155; /* Slate 700 */
    --text-muted: #64748b; /* Slate 500 */
    --text-dimmed: #94a3b8; /* Slate 400 */
    --text-heading: #193f66; /* Logo Dark Navy Blue */
    
    --bg-navbar: rgba(255, 255, 255, 0.85);
    --bg-navbar-mobile: rgba(255, 255, 255, 0.98);
    --btn-primary-text: #ffffff;
    --bg-option-key: rgba(25, 63, 102, 0.08);
    --bg-modal-overlay: rgba(244, 246, 249, 0.95);
    --correct-key-text: #ffffff;
    
    /* Accessibility contrast adjustments for primary/secondary */
    --primary-h: 185; /* Light Teal Blue */
    --primary-s: 85%;
    --primary-l: 38%; /* Adjusted for high accessibility on white */
    
    --secondary-h: 42; /* Gold / Mustard Yellow */
    --secondary-s: 85%;
    --secondary-l: 40%;
    
    --success: hsl(162, 84%, 35%);
    --correct-key-text: #ffffff;
    
    --primary-glow: rgba(20, 184, 166, 0.35);
    --card-shadow-glow: rgba(20, 184, 166, 0.05);

    /* Enhanced Light Mode Borders, Shadows & Visible Scrollbars */
    --border-color: rgba(25, 63, 102, 0.16);
    --panel-border: rgba(25, 63, 102, 0.18);
    --panel-shadow: 0 4px 18px rgba(25, 63, 102, 0.08);
    --scrollbar-thumb: rgba(25, 63, 102, 0.38);
    --scrollbar-thumb-hover: rgba(25, 63, 102, 0.6);
    --scrollbar-track: rgba(25, 63, 102, 0.07);
}

/* Theme Toggle Button Styling */
.theme-toggle-btn {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
    color: var(--text-main);
}
.theme-toggle-btn:hover {
    background-color: var(--bg-surface-hover);
    transform: scale(1.1);
}

/* Base Resets */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--text-heading);
    line-height: 1.25;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: hsl(var(--primary-h), var(--primary-s), calc(var(--primary-l) + 10%));
}

button, .btn {
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
}

/* ==========================================================================
   Layout Containers & Grid System
   ========================================================================== */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.main-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 40px 0;
}

/* Navigation Header */
.navbar {
    background-color: var(--bg-navbar);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 70px;
    display: flex;
    align-items: center;
}

.navbar-inner {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-heading);
    display: flex;
    align-items: center;
    gap: 8px;
}
.navbar-brand span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
}
.nav-links a {
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--text-heading);
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Hamburger Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: var(--text-heading);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* On screens under 992px (tablets & mobiles) */
@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .navbar-inner nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--bg-navbar-mobile);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--border-color);
        padding: 24px;
        display: none; /* Controlled by active class */
        z-index: 99;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }
    
    .navbar-inner nav.active {
        display: block;
    }
    
    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .nav-links li {
        width: 100%;
    }
    
    .nav-links a {
        display: block;
        padding: 10px 0;
        font-size: 16px;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
    }
    
    .nav-auth span {
        display: none !important; /* hide Hello username to avoid crowding */
    }
    
    .navbar-inner {
        padding: 0 16px;
    }
}

/* Hamburger animations */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 480px) {
    .navbar-brand {
        font-size: 15px;
    }
    .navbar-brand img {
        height: 28px !important;
    }
    .nav-auth {
        gap: 8px;
    }
    .nav-auth a {
        padding: 6px 12px !important;
        font-size: 12px !important;
    }
}

/* ========================================================================== */

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all var(--transition-fast);
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--btn-primary-text);
    font-weight: 600;
}
.btn-primary:hover {
    background-color: hsl(var(--primary-h), var(--primary-s), calc(var(--primary-l) + 5%));
    box-shadow: 0 0 16px var(--primary-glow);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.btn-secondary:hover {
    background-color: var(--bg-surface-hover);
    border-color: var(--text-muted);
}

.btn-danger {
    background-color: var(--danger);
    color: #ffffff;
    font-weight: 600;
}
.btn-danger:hover {
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.4);
}

/* ==========================================================================
   Cards & Grids
   ========================================================================== */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}
.card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    box-shadow: 0 8px 30px var(--card-shadow-glow);
}

.card-title {
    font-size: 18px;
    margin-bottom: 8px;
}

.card-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
    min-height: 44px;
}

/* ==========================================================================
   Homepage / Landing Sections
   ========================================================================== */

.hero {
    text-align: center;
    padding: 60px 0;
    max-width: 800px;
    margin: 0 auto;
}
.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-heading) 50%, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.section-title {
    font-size: 28px;
    margin: 40px 0 20px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}
.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--border-color);
}

/* Academic level cards */
.academic-row {
    background: rgba(255,255,255,0.01);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}
.academic-row h3 {
    margin-bottom: 20px;
    font-size: 20px;
    color: var(--secondary);
}

.subject-badge-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.subject-badge {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.subject-badge:hover {
    border-color: var(--primary);
    background: var(--bg-surface-hover);
    color: var(--text-heading);
}

/* ==========================================================================
   Practice Client Interface
   ========================================================================== */

.practice-workspace {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.passage-panel {
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    max-height: 250px;
    overflow-y: auto;
    font-size: 15px;
    line-height: 1.8;
}

.question-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.question-body h2 {
    font-size: 20px;
    color: var(--text-heading);
    margin-bottom: 24px;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.option-btn {
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    text-align: left;
    font-size: 15px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all var(--transition-fast);
}
.option-btn:hover:not(:disabled) {
    background: hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.08);
    border-color: var(--primary);
}
.option-btn .option-key {
    background: var(--bg-option-key);
    color: var(--text-main);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
}

/* Feedback states */
.option-btn.correct {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: var(--success) !important;
    color: var(--success) !important;
}
.option-btn.correct .option-key {
    background: var(--success) !important;
    color: var(--correct-key-text) !important;
}

.option-btn.incorrect {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: var(--danger) !important;
    color: var(--danger) !important;
}
.option-btn.incorrect .option-key {
    background: var(--danger) !important;
    color: #ffffff !important;
}

/* Match the Columns UI */
.match-columns-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.match-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.match-item {
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-fast);
}
.match-item:hover:not(.matched) {
    border-color: var(--text-muted);
}
.match-item.selected {
    border-color: var(--secondary);
    background: rgba(59, 130, 246, 0.1);
}
.match-item.matched {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    cursor: default;
}

/* Rationale panel */
.rationale-panel {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-top: 24px;
}
.rationale-panel h4 {
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 15px;
}

/* ==========================================================================
   Mock Test Attempt Client - Responsive Split Scroll & High-Contrast Themes
   ========================================================================== */

/* Overall Desktop Layout: 2 Columns with fixed full-height view */
.mock-test-layout {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 20px;
    height: calc(100vh - 110px);
    max-height: calc(100vh - 110px);
    min-height: 520px;
    overflow: hidden;
    margin-top: 10px;
}

/* Desktop Left Control Panel */
.test-control-panel {
    background: var(--bg-surface);
    border: 1.5px solid var(--panel-border, var(--border-color));
    border-radius: var(--radius-md);
    box-shadow: var(--panel-shadow, 0 4px 20px rgba(0, 0, 0, 0.15));
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.panel-fixed-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.palette-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-heading);
    padding: 10px 0 6px 0;
    border-bottom: 1.5px solid var(--panel-border, var(--border-color));
    margin-top: 8px;
    flex-shrink: 0;
}

/* Question Sheet buttons scrollable vertically on desktop */
.questions-nav-scroll-container {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    margin: 10px 0;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

.questions-nav-scroll-container::-webkit-scrollbar {
    width: 6px;
}
.questions-nav-scroll-container::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 4px;
}
.questions-nav-scroll-container::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}
.questions-nav-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

.questions-nav-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 7px;
}

.panel-fixed-footer {
    flex-shrink: 0;
    padding-top: 10px;
    border-top: 1.5px solid var(--panel-border, var(--border-color));
}

/* Right Question Area */
.test-question-area {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
}

.question-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    background: var(--bg-surface);
    border: 1.5px solid var(--panel-border, var(--border-color));
    border-radius: var(--radius-md);
    box-shadow: var(--panel-shadow, 0 4px 20px rgba(0, 0, 0, 0.15));
    overflow: hidden;
    box-sizing: border-box;
}

.question-header {
    padding: 14px 20px;
    border-bottom: 1.5px solid var(--panel-border, var(--border-color));
    background: var(--bg-surface);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

/* Question body is scrollable separately */
.question-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

.question-body::-webkit-scrollbar {
    width: 7px;
}
.question-body::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 4px;
}
.question-body::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}
.question-body::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

.question-footer {
    padding: 14px 20px;
    border-top: 1.5px solid var(--panel-border, var(--border-color));
    background: var(--bg-surface);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

/* Timer Widget */
.timer-widget {
    background: var(--bg-surface-hover);
    border: 1.5px solid var(--panel-border, var(--border-color));
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
}
.timer-widget .label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}
.timer-widget .time {
    font-size: 26px;
    font-weight: 700;
    font-family: monospace;
    color: var(--warning);
}
.timer-widget.low-time .time {
    color: var(--danger);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Warning strikes indicator */
.warnings-widget {
    background: rgba(239, 68, 68, 0.08);
    border: 1.5px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    padding: 10px;
    text-align: center;
    color: var(--danger);
    font-weight: 600;
    font-size: 13px;
}

/* Nav Buttons */
.nav-btn {
    background: var(--bg-surface-hover);
    border: 1.5px solid var(--border-color);
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    transition: all var(--transition-fast);
    cursor: pointer;
    user-select: none;
}
.nav-btn:hover {
    color: var(--text-heading);
    border-color: var(--secondary);
    background: var(--bg-surface);
}
.nav-btn.active {
    border-color: var(--secondary);
    color: var(--text-heading);
    background: rgba(59, 130, 246, 0.22);
    box-shadow: 0 0 0 1.5px var(--secondary);
    font-weight: 700;
}
.nav-btn.answered {
    background: rgba(16, 185, 129, 0.22);
    border-color: var(--success);
    color: var(--success);
    font-weight: 700;
}
.nav-btn.review {
    background: rgba(245, 158, 11, 0.28);
    border-color: var(--warning);
    color: var(--warning);
    font-weight: 700;
}

/* Light Mode specific overrides for perfect contrast */
.light-theme .nav-btn {
    background: #eef2f7;
    border-color: rgba(25, 63, 102, 0.22);
    color: #1e293b;
}
.light-theme .nav-btn:hover {
    background: #ffffff;
    border-color: var(--secondary);
    color: #0f172a;
}
.light-theme .nav-btn.active {
    background: rgba(43, 114, 186, 0.18);
    border-color: #2b72ba;
    color: #193f66;
    box-shadow: 0 0 0 1.5px #2b72ba;
}
.light-theme .nav-btn.answered {
    background: rgba(16, 185, 129, 0.18);
    border-color: #059669;
    color: #047857;
}
.light-theme .nav-btn.review {
    background: rgba(245, 158, 11, 0.22);
    border-color: #d97706;
    color: #b45309;
}
.light-theme .question-header {
    background: #f8fafc;
    border-bottom: 1.5px solid rgba(25, 63, 102, 0.15);
}
.light-theme .question-footer {
    background: #f8fafc;
    border-top: 1.5px solid rgba(25, 63, 102, 0.15);
}
.light-theme .mobile-horizontal-palette {
    background: #f1f5f9;
    border-top: 1.5px solid rgba(25, 63, 102, 0.2);
}
.light-theme .option-btn {
    background: #f8fafc;
    border: 1.5px solid rgba(25, 63, 102, 0.16);
    color: #1e293b;
}
.light-theme .option-btn:hover {
    background: #ffffff;
    border-color: rgba(25, 63, 102, 0.35);
}
.light-theme .option-btn.correct {
    background: rgba(16, 185, 129, 0.16);
    border-color: #059669;
}

/* Responsive Visibility Helpers */
.mobile-only {
    display: none !important;
}
.desktop-only {
    display: block;
}
.palette-header.desktop-only {
    display: flex;
}

/* ==========================================================================
   Mobile Screens Layout (< 900px): Fixed Top Timer/Strikes, Middle Scrollable
   Questions, Fixed Prev/Next, Bottom Horizontal Scrolling Question Palette
   ========================================================================== */
@media (max-width: 900px) {
    .desktop-only {
        display: none !important;
    }
    .mobile-only {
        display: block !important;
    }

    .mock-test-layout {
        display: flex;
        flex-direction: column;
        height: calc(100dvh - 70px);
        max-height: calc(100dvh - 70px);
        min-height: 0;
        gap: 6px;
        margin-top: 2px;
        overflow: hidden;
    }

    /* Fixed top bar for mobile */
    .test-control-panel {
        position: sticky;
        top: 0;
        z-index: 50;
        height: auto !important;
        max-height: none !important;
        padding: 6px 10px !important;
        margin-bottom: 0 !important;
        border-radius: var(--radius-sm) !important;
        background: var(--bg-surface) !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25) !important;
        border: 1.5px solid var(--panel-border, var(--border-color)) !important;
        flex-shrink: 0 !important;
    }

    .panel-fixed-header {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .timer-widget {
        padding: 6px 10px !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        background: var(--bg-surface-hover) !important;
        border-radius: var(--radius-sm) !important;
        flex: 1 !important;
        justify-content: center !important;
    }

    .timer-widget .label {
        font-size: 10px !important;
        margin-bottom: 0 !important;
    }

    .timer-widget .time {
        font-size: 17px !important;
    }

    .warnings-widget {
        padding: 6px 10px !important;
        font-size: 11px !important;
        white-space: nowrap !important;
        border-radius: var(--radius-sm) !important;
    }

    .mobile-top-submit-btn {
        display: inline-block !important;
        padding: 6px 12px !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
    }

    /* Middle Question Area */
    .test-question-area {
        flex: 1 !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    .question-card {
        flex: 1 !important;
        min-height: 0 !important;
        border-radius: var(--radius-sm) !important;
    }

    .question-header {
        padding: 8px 12px !important;
        font-size: 13px !important;
    }

    .question-body {
        padding: 12px !important;
    }

    .question-body h2 {
        font-size: 16px !important;
        margin-bottom: 14px !important;
    }

    .option-btn {
        padding: 12px 14px !important;
        font-size: 14px !important;
    }

    /* Fixed Navigation Controls */
    .question-footer {
        padding: 8px 12px !important;
        background: var(--bg-surface) !important;
    }

    .question-footer .btn {
        padding: 8px 16px !important;
        font-size: 13px !important;
    }

    /* Horizontal Question Strip below prev/next */
    .mobile-horizontal-palette {
        background: var(--bg-surface-hover);
        border-top: 1.5px solid var(--panel-border, var(--border-color));
        padding: 6px 8px 8px 8px;
        flex-shrink: 0;
    }

    .questions-horizontal-strip {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
        padding: 2px;
        scrollbar-width: thin;
        scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    }

    .questions-horizontal-strip::-webkit-scrollbar {
        height: 5px;
    }
    .questions-horizontal-strip::-webkit-scrollbar-track {
        background: var(--scrollbar-track);
        border-radius: 4px;
    }
    .questions-horizontal-strip::-webkit-scrollbar-thumb {
        background: var(--scrollbar-thumb);
        border-radius: 4px;
    }
    .questions-horizontal-strip::-webkit-scrollbar-thumb:hover {
        background: var(--scrollbar-thumb-hover);
    }

    .questions-horizontal-strip .nav-btn {
        flex: 0 0 38px !important;
        width: 38px !important;
        height: 36px !important;
        min-width: 38px !important;
        font-size: 13px !important;
        border-radius: 6px !important;
    }
}

/* Modal proctoring overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-modal-overlay);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--danger);
    border-radius: var(--radius-md);
    padding: 40px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.15);
}
.modal-content h3 {
    color: var(--danger);
    font-size: 24px;
    margin-bottom: 16px;
}
.modal-content p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ==========================================================================
   Paper print & Header Styles
   ========================================================================== */

.paper-actions-bar {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Standard Academic Print Out Style (For Screen preview) */
.printable-sheet {
    background: #ffffff;
    color: #000000;
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Times New Roman', Times, serif;
    line-height: 1.4;
}

.printable-sheet h1, 
.printable-sheet h2, 
.printable-sheet h3, 
.printable-sheet h4, 
.printable-sheet h5, 
.printable-sheet h6 {
    color: #000000;
    font-family: 'Times New Roman', Times, serif;
}

.print-header {
    text-align: center;
    border-bottom: 2px solid #000000;
    padding-bottom: 16px;
    margin-bottom: 24px;
}
.print-header .inst-name {
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
}
.print-header .exam-name {
    font-size: 16px;
    font-weight: 600;
}

.print-meta-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

.student-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}
.student-info-table td {
    padding: 6px;
    font-size: 14px;
    border: 1px solid #ddd;
}

.print-section {
    margin-bottom: 20px;
    page-break-inside: auto;
    break-inside: auto;
}
.print-section-title {
    font-weight: 700;
    font-size: 15px;
    border-bottom: 1px solid #000000;
    padding-bottom: 4px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    page-break-after: avoid;
    break-after: avoid;
}

.print-q-item {
    font-size: 14px;
    margin-bottom: 12px;
    page-break-inside: avoid;
    break-inside: avoid;
}

.print-options-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 6px;
    font-size: 13px;
    padding-left: 20px;
}

/* Double column styling override */
.printable-sheet.double-column-mode .print-questions-body {
    column-count: 2;
    column-gap: 30px;
    column-rule: 1px solid #ccc;
}
.printable-sheet.double-column-mode .print-section {
    break-inside: auto;
    -webkit-column-break-inside: auto;
}

/* Bubble sheet grid */
.bubble-sheet-container {
    margin-top: 40px;
    border-top: 2px dashed #000000;
    padding-top: 24px;
    page-break-before: always;
}
.bubble-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.bubble-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-family: monospace;
}
.bubble-circles {
    display: flex;
    gap: 6px;
}
.bubble-circle {
    width: 18px;
    height: 18px;
    border: 1px solid #000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
}

/* ==========================================================================
   Navbar Controls, User Dropdown & Light Theme Overrides
   ========================================================================== */

.navbar-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-dropdown-container {
    position: relative;
    display: inline-block;
}

.dropdown-trigger-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.dropdown-trigger-btn:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-heading);
}

.dropdown-menu-list {
    display: none;
    position: absolute;
    right: 0;
    top: 48px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    min-width: 240px;
    padding: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    z-index: 105;
    animation: dropdownFadeIn 0.2s ease;
}

.dropdown-menu-list.active {
    display: block;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-user-info {
    font-size: 13px;
    color: var(--text-main);
    padding: 8px 12px;
    word-break: break-word;
    line-height: 1.45;
}

.dropdown-divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 6px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-main);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    text-align: left;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
    box-sizing: border-box;
    text-decoration: none !important;
}

.dropdown-item:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-heading);
}

.dropdown-item.logout-link {
    color: var(--danger);
}
.dropdown-item.logout-link:hover {
    background-color: rgba(239, 68, 68, 0.08);
    color: var(--danger);
}

/* Universal Form & Select Dropdown Overrides for Light Theme */
.light-theme input, 
.light-theme select, 
.light-theme textarea,
.light-theme option {
    background-color: var(--bg-surface-hover) !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
}

/* Universal Text & Heading Defaults for Light Theme */
.light-theme h1, 
.light-theme h2, 
.light-theme h3, 
.light-theme h4, 
.light-theme h5, 
.light-theme h6,
.light-theme label,
.light-theme legend,
.light-theme .dropdown-user-info {
    color: var(--text-heading);
}

.light-theme td,
.light-theme th {
    color: var(--text-main);
}

/* ==========================================================================
   Print Media Stylesheets
   ========================================================================== */

@media print {
    /* Hide all browser components */
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    
    .navbar, .footer, .paper-actions-bar, .no-print {
        display: none !important;
    }
    
    .main-content {
        padding: 0 !important;
    }
    
    .printable-sheet {
        box-shadow: none !important;
        padding: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }
    
    /* Double column rendering in print */
    .printable-sheet.double-column-mode .print-questions-body {
        column-count: 2 !important;
        column-gap: 30px !important;
        column-rule: 1px solid #000000 !important;
    }
    
    /* Force page breaks cleanly */
    .page-break {
        page-break-before: always !important;
    }

    .print-page-footer {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background: transparent !important;
        border-top: 1px dashed #999999 !important;
        padding-top: 4px !important;
        margin-top: 0 !important;
        text-align: center !important;
        font-size: 9.5px !important;
        color: #444444 !important;
        font-weight: 500 !important;
        z-index: 99999 !important;
    }
}

/* ==========================================================================
   Responsive Layout Overrides
   ========================================================================== */

/* Responsive grids utility */
.responsive-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.responsive-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.responsive-grid-sidebar {
    display: grid;
    grid-template-columns: 1fr 380px;
}

.responsive-grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
}

.mock-test-list-card {
    display: grid;
    grid-template-columns: 1fr 350px;
}

@media (max-width: 992px) {
    .responsive-grid-sidebar {
        grid-template-columns: 1fr !important;
    }
    .responsive-grid-2-1 {
        grid-template-columns: 1fr !important;
    }
    .responsive-grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .mock-test-list-card {
        grid-template-columns: 1fr !important;
    }
    .stats-bar {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 10px !important;
    }
    
    .main-content {
        padding: 16px 0 32px 0 !important;
    }
    
    .card {
        padding: 16px 12px !important;
        border-radius: var(--radius-sm) !important;
    }

    .navbar {
        height: 60px;
    }

    .navbar-inner nav {
        top: 60px !important;
    }

    .navbar-brand img {
        height: 32px !important;
    }

    .hero {
        padding: 28px 8px !important;
    }
    .hero h1 {
        font-size: 26px !important;
        line-height: 1.25 !important;
    }
    .hero p {
        font-size: 14.5px !important;
        margin-bottom: 18px !important;
    }
    .section-title {
        font-size: 20px !important;
        margin: 24px 0 14px 0 !important;
    }

    .responsive-grid-2 {
        grid-template-columns: 1fr !important;
    }
    
    .responsive-grid-4 {
        grid-template-columns: 1fr !important;
    }
    
    .stats-bar {
        grid-template-columns: 1fr !important;
        padding: 0 !important;
        gap: 12px !important;
    }
    
    /* Summary items border swap in mock test results */
    .summary-item {
        border-right: none !important;
        border-bottom: 1px solid var(--border-color);
    }
    .summary-item:last-child {
        border-bottom: none !important;
    }

    /* Collapse all matching inline layouts in educator dashboard and panels */
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns: 1fr 1fr 1fr"],
    [style*="grid-template-columns: 1.5fr 1fr 1fr"],
    [style*="grid-template-columns: 1.2fr 1fr 1fr"],
    [style*="grid-template-columns: 1.2fr 1fr"],
    [style*="grid-template-columns: 1.5fr 1fr"],
    [style*="grid-template-columns: 1fr 2.5fr"],
    [style*="grid-template-columns: 1fr 380px"],
    [style*="grid-template-columns: 1fr 1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Allow flex rows to wrap on mobile */
    .flex-row-wrap,
    [style*="display: flex"][style*="gap:"] {
        flex-wrap: wrap !important;
    }

    /* Note cards and list page mobile optimization */
    .notes-filter-form {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    .notes-filter-form button {
        width: 100% !important;
        padding: 10px 0 !important;
    }
    .note-card-flex {
        flex-direction: row !important;
        gap: 12px !important;
    }
    .note-card-cover {
        width: 85px !important;
        min-width: 85px !important;
        height: 120px !important;
        min-height: 120px !important;
    }
    .note-card-title {
        font-size: 14.5px !important;
        line-height: 1.35 !important;
    }

    /* Practice and Mock Test Question Cards on Mobile */
    .question-card {
        padding: 16px 12px !important;
    }
    .question-body h2 {
        font-size: 16px !important;
        margin-bottom: 16px !important;
    }
    .option-btn {
        padding: 12px 14px !important;
        font-size: 14px !important;
    }
    .passage-panel {
        padding: 14px 12px !important;
        font-size: 13.5px !important;
    }
    .modal-content {
        padding: 24px 16px !important;
    }

    /* MathJax font scaling on mobile */
    mjx-container {
        font-size: 96% !important;
    }
}

/* Universal MathJax & LaTeX Equation Responsiveness */
mjx-container:not([display="true"]) {
    display: inline-block !important;
    max-width: 100% !important;
    overflow: visible !important;
    vertical-align: middle !important;
}
mjx-container[jax="CHTML"][display="true"],
mjx-container[display="true"] {
    display: block !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    text-align: center;
    margin: 12px 0 !important;
    padding: 4px 0 !important;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
mjx-container[display="true"]::-webkit-scrollbar,
.latex-scrollable-line::-webkit-scrollbar {
    height: 4px;
}
mjx-container[display="true"]::-webkit-scrollbar-track,
.latex-scrollable-line::-webkit-scrollbar-track {
    background: transparent;
}
mjx-container[display="true"]::-webkit-scrollbar-thumb,
.latex-scrollable-line::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.4);
    border-radius: 4px;
}



/* ===== Past Paper MCQ Component Classes ===== */
.past-q-card {
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface-hover);
    border-radius: 8px;
    transition: border-color 0.2s;
}
.past-q-card.past-q-hidden {
    display: none;
}
.past-q-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.past-q-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.badge-session {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-size: 11.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}
.badge-subject {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}
.past-q-counter {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}
.past-q-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 14px;
    line-height: 1.6;
}
.past-q-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}
.mcq-option-box {
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    font-size: 13.5px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}
.mcq-option-key {
    font-weight: 800;
    color: var(--primary);
    font-size: 12.5px;
    min-width: 22px;
}
.btn-reveal-solution {
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--primary);
    border-color: rgba(var(--primary-rgb, 59, 130, 246), 0.4);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.arrow-indicator {
    transition: transform 0.2s;
}
.solution-panel {
    display: none;
    margin-top: 12px;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.06);
}
.solution-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.badge-correct {
    background: #10b981;
    color: white;
    font-size: 11.5px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
}
.solution-correct-text {
    font-size: 13.5px;
    font-weight: 700;
    color: #10b981;
}
.solution-explanation {
    font-size: 13.5px;
    color: var(--text-main);
    line-height: 1.65;
    white-space: pre-line;
}

/* ==========================================================================
   GLOBAL LAYOUT, HEADER & FOOTER COMPONENTS (Extracted from base.html)
   ========================================================================== */
.navbar-brand-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    line-height: 1.15;
    font-size: 13.5px;
}
.navbar-brand img,
.navbar-brand-logo {
    height: 38px !important;
    max-height: 38px !important;
    width: auto !important;
    object-fit: contain !important;
    display: inline-block !important;
}
.navbar-brand-text {
    display: flex;
    flex-direction: column;
}
.navbar-brand-bold {
    font-weight: 700;
}
.navbar-brand-accent {
    color: var(--primary);
    font-weight: 700;
}
.nav-educator-btn {
    padding: 6px 12px;
    border-radius: 4px;
    color: var(--btn-primary-text);
}
.verification-banner {
    background: rgba(245, 158, 11, 0.12);
    border-bottom: 1px solid rgba(245, 158, 11, 0.3);
    color: #facc15;
    padding: 10px 16px;
    font-size: 13.5px;
    text-align: center;
}
.verification-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.verification-form {
    display: inline;
    margin: 0;
}
.verification-btn {
    background: var(--warning);
    color: #000;
    border: none;
    padding: 3px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.messages-container {
    margin-top: 18px;
    margin-bottom: -10px;
}
.site-alert {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.site-alert-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid var(--danger);
    color: var(--danger);
}
.site-alert-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid var(--primary);
    color: var(--primary);
}
.site-alert-warning {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid var(--warning);
    color: var(--warning);
}
.site-alert-info {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid var(--secondary);
    color: var(--secondary);
}
.site-alert-close {
    background: none;
    border: none;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    color: inherit;
    padding: 0 4px;
}
.site-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 48px 0 28px;
    font-size: 13.5px;
    color: var(--text-dimmed);
    margin-top: 60px;
}
.site-footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 36px;
    margin-bottom: 36px;
    text-align: left;
}
.footer-brand-col {
    grid-column: span 1;
}
.footer-brand-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.footer-brand-logo {
    height: 30px !important;
    width: 30px !important;
    max-height: 30px !important;
    object-fit: contain !important;
    display: inline-block !important;
}
.footer-brand-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.3px;
}
.footer-brand-desc {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.65;
    margin: 0 0 16px 0;
}
.footer-contact-info {
    font-size: 12.5px;
    color: var(--text-dimmed);
    line-height: 1.6;
}
.footer-contact-link {
    color: var(--primary);
    text-decoration: none;
}
.footer-heading {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-heading);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 14px 0;
}
.footer-nav-list,
ul.footer-nav-list {
    list-style: none !important;
    list-style-type: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 9px !important;
    font-size: 13.5px !important;
}
.footer-nav-list li,
ul.footer-nav-list li {
    list-style: none !important;
    list-style-type: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.footer-nav-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-nav-link:hover {
    color: var(--primary);
}
.footer-nav-link-strong {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.footer-nav-link-strong:hover {
    color: var(--primary);
}
.footer-nav-link-active {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}
.footer-bottom-bar {
    border-top: 1px solid var(--border-color);
    padding-top: 22px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    font-size: 12.5px;
    color: var(--text-dimmed);
}
.footer-legal-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.footer-legal-link {
    color: var(--text-dimmed);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-legal-link:hover {
    color: var(--primary);
}

/* ==========================================================================
   JOB & EXAM DETAIL PAGE STYLES (Extracted from job_exam_details.html)
   ========================================================================== */
.details-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 24px 16px;
}
.breadcrumb-nav {
    margin-bottom: 20px;
    font-size: 13.5px;
    color: var(--text-muted);
}
.breadcrumb-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.breadcrumb-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumb-link:hover {
    color: var(--primary);
}
.breadcrumb-active {
    color: var(--primary);
    font-weight: 600;
}
.detail-header-block {
    margin-bottom: 28px;
}
.detail-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.detail-title {
    font-size: clamp(22px, 3.5vw, 28px);
    color: var(--text-heading);
    margin: 0;
    line-height: 1.35;
    font-weight: 700;
}
.badge-active-prep {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #10b981;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-scale {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #818cf8;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}
.badge-case {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}
.badge-ad {
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(14, 165, 233, 0.3);
    color: #38bdf8;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}
.detail-lead-desc {
    color: var(--text-muted);
    font-size: 14.5px;
    margin: 0;
    line-height: 1.65;
    word-break: break-word;
}
.phase-banner {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}
.phase-banner-content {
    flex: 1;
    min-width: 260px;
}
.phase-banner-title {
    font-size: 12px;
    font-weight: 800;
    color: #818cf8;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.phase-banner-text {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.55;
}
.phase-banner-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
}
.specs-card {
    padding: 24px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.specs-card-title {
    font-size: 15px;
    color: var(--primary);
    margin: 0 0 16px 0;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.spec-item {
    display: flex;
    flex-direction: column;
}
.spec-item-span2 {
    grid-column: span 2;
}
.spec-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.spec-val {
    color: var(--text-heading);
    font-size: 13.5px;
    line-height: 1.4;
}
.spec-val-primary {
    color: var(--primary);
    font-size: 13.5px;
    font-weight: 700;
    word-break: break-all;
}
.spec-val-success {
    color: #10b981;
    font-size: 14px;
    font-weight: 700;
}
.spec-val-danger {
    color: var(--danger);
    font-size: 13.5px;
    font-weight: 700;
}
.spec-quota-box {
    margin-top: 18px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}
.content-card {
    padding: 24px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.content-card-title {
    font-size: 15px;
    color: var(--primary);
    margin: 0 0 14px 0;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.content-card-body {
    line-height: 1.75;
    color: var(--text-main);
    font-size: 14.5px;
}
.syllabus-card {
    padding: 24px;
    border: 1px solid rgba(99, 102, 241, 0.25);
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.06);
}
.syllabus-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}
.badge-scheme {
    font-size: 12px;
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.25);
}
.syllabus-table-wrap {
    overflow-x: auto;
}
.syllabus-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 580px;
}
.syllabus-table-th {
    padding: 12px 16px;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-surface-hover);
    text-align: left;
}
.syllabus-table-td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}
.mapping-row {
    transition: background-color 0.2s;
}
.mapping-row:hover {
    background-color: var(--bg-surface-hover);
}
.mapping-pct-badge {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: var(--warning);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
}
.mapping-count {
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
}
.actions-header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 14px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}
.btn-action-primary {
    padding: 10px 18px;
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    border-radius: var(--radius-sm);
}
.btn-email-apply {
    background: #2563eb;
    border: 1px solid #3b82f6;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.btn-postal-apply {
    background: #d97706;
    border: 1px solid #f59e0b;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
}
.btn-walkin-apply {
    background: #7c3aed;
    border: 1px solid #8b5cf6;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}
.btn-online-apply {
    background: #059669;
    border: 1px solid #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}
.btn-prepare-link {
    padding: 10px 18px;
    font-size: 13.5px;
    font-weight: 700;
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-practice-full {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 700;
    color: var(--btn-primary-text);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.btn-mock-link {
    padding: 10px 18px;
    font-size: 13.5px;
    font-weight: 700;
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.apply-channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 14px;
}
.apply-channel-box {
    padding: 16px;
    border-radius: 8px;
}
.apply-channel-email {
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.2);
}
.apply-channel-postal {
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.apply-channel-online {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.apply-checklist-box {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--bg-surface-hover);
    border-left: 3px solid var(--primary);
    border-radius: 4px;
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.6;
}
.job-aggregator-disclaimer {
    padding: 18px 22px;
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-left: 4px solid #f59e0b;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}
.rel-jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.rel-job-card {
    border: 1px solid var(--border-color);
    background: var(--bg-surface-hover);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
}
.rel-job-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-surface-hover);
}
.faq-trigger {
    width: 100%;
    text-align: left;
    padding: 14px 18px;
    background: transparent;
    border: none;
    color: var(--text-heading);
    font-size: 14.5px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    gap: 10px;
}
.faq-icon {
    font-size: 16px;
    color: var(--primary);
    transition: transform 0.2s;
}
.faq-answer {
    display: none;
    padding: 0 18px 16px 18px;
    color: var(--text-main);
    font-size: 13.5px;
    line-height: 1.65;
    border-top: 1px dashed var(--border-color);
    padding-top: 12px;
}
.past-filter-btn:hover {
    opacity: 0.9;
}
.active-past-btn {
    border-color: var(--primary) !important;
    background: var(--primary) !important;
    color: var(--btn-primary-text) !important;
}
.mock-test-card {
    padding: 24px;
    border: 1px solid rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(16, 185, 129, 0.08));
    border-radius: var(--radius-md);
    margin-top: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12);
}

@media (max-width: 640px) {
    .details-container {
        padding: 16px 12px !important;
    }
    .card {
        padding: 18px 14px !important;
    }
    .responsive-specs-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px !important;
    }
    .top-action-buttons {
        width: 100%;
        flex-direction: column;
    }
    .top-action-buttons a {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    .mock-test-footer-actions {
        flex-direction: column;
        align-items: stretch !important;
    }
    .mock-test-footer-actions .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}
@media (max-width: 420px) {
    .responsive-specs-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   HOMEPAGE & LANDING COMPONENTS (Extracted from landing.html)
   ========================================================================== */
.hero-section {
    text-align: center;
    padding: 48px 16px 36px 16px;
}
.hero-title {
    font-size: clamp(24px, 4vw, 38px);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 16px;
    color: var(--text-heading);
}
.hero-desc {
    font-size: clamp(14px, 1.8vw, 17px);
    color: var(--text-muted);
    max-width: 860px;
    margin: 0 auto 24px auto;
    line-height: 1.6;
}
.hero-cta-group {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}
.hero-btn {
    padding: 12px 24px;
    font-weight: 600;
    font-size: 14.5px;
}
.trending-hub {
    margin-bottom: 35px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
}
.trending-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.trending-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.trending-tag {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 20px;
    background: var(--bg-surface-hover);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-block;
}
.trending-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.stats-bar {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 16px !important;
    margin-bottom: 45px !important;
    text-align: center !important;
}
.stat-card {
    padding: 20px;
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.stat-val-primary {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}
.stat-val-secondary {
    font-size: 32px;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 4px;
}
.stat-val-warning {
    font-size: 32px;
    font-weight: 800;
    color: var(--warning);
    margin-bottom: 4px;
}
.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.features-section {
    margin-bottom: 50px;
}
.features-header {
    text-align: center;
    margin-bottom: 24px;
}
.features-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 6px;
}
.features-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    max-width: 720px;
    margin: 0 auto;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}
.feature-card {
    padding: 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}
.feature-icon {
    font-size: 24px;
    margin-bottom: 10px;
}
.feature-heading {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 8px;
}
.feature-text {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}
.home-card-flex {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.home-badge-tag {
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
}
.home-badge-primary {
    color: var(--primary) !important;
    font-weight: 700 !important;
}
.home-badge-secondary {
    color: var(--secondary) !important;
    font-weight: 600 !important;
}
.tab-switcher-wrap {
    display: inline-flex;
    background: var(--bg-surface-hover);
    padding: 4px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    gap: 4px;
}
.tab-pill-btn {
    padding: 7px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    background: transparent;
    color: var(--text-muted);
    transition: all 0.2s;
}
.tab-pill-btn.active {
    background: var(--primary) !important;
    color: var(--btn-primary-text) !important;
}
.tab-pane {
    display: none;
}
.tab-pane.active {
    display: block;
}
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}
.board-badge {
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 12px;
}
.home-card-btn-primary {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 13px;
    padding: 9px 12px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 6px;
    box-sizing: border-box;
    white-space: nowrap;
    color: black;
}
.home-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.academic-row-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: var(--radius-md);
}
.academic-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}
.academic-class-title {
    font-size: 17px;
    color: var(--text-heading);
    margin: 0;
}
.academic-subj-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 16px;
}
.academic-subj-card {
    padding: 16px;
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.academic-subj-title {
    font-weight: bold;
    color: var(--primary);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.landing-faq-wrap {
    margin-bottom: 40px;
    padding: 30px 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}
.landing-faq-item {
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    cursor: pointer;
}
.landing-faq-summary {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-heading);
    outline: none;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.landing-faq-body {
    margin-top: 12px;
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.6;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
}

/* ==========================================================================
   ACADEMIC NOTES & CHAPTER HUBS (Extracted from notes_list.html & note_detail.html)
   ========================================================================== */
.notes-page-container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 16px;
}
.notes-hero-card {
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.12) 0%, rgba(16, 185, 129, 0.08) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 28px 20px;
}
.notes-filter-card {
    margin-bottom: 30px;
    padding: 20px;
}
.notes-filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) 110px;
    gap: 12px;
    align-items: end;
}
.notes-filter-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.notes-filter-input {
    width: 100%;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-surface-hover);
    color: var(--text-main);
    font-size: 13.5px;
}
.notes-group-card {
    padding: 22px;
}
.notes-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 18px;
}
.note-card-item {
    padding: 18px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s;
}
.note-card-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}
.note-card-inner {
    display: flex;
    gap: 16px;
    align-items: stretch;
    margin-bottom: 14px;
    flex: 1;
}
.note-card-cover-wrapper {
    flex-shrink: 0;
    width: 130px;
    min-width: 130px;
    min-height: 175px;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #0b132b;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.note-card-cover-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 6px;
}
.note-badge-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.badge-chapter {
    font-size: 11px;
    font-weight: 700;
    background: rgba(79, 70, 229, 0.15);
    color: var(--primary);
    padding: 3px 8px;
    border-radius: 4px;
}
.badge-book {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--primary);
    background: rgba(16, 185, 129, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
}
.badge-board {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-dimmed);
    background: rgba(255,255,255,0.04);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.06);
}
.note-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0 0 6px;
    line-height: 1.35;
}
.note-card-title a {
    color: var(--text-heading);
    text-decoration: none;
}
.note-card-title a:hover {
    color: var(--primary);
}
.note-card-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}
.note-card-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}
.note-card-actions.two-col {
    grid-template-columns: repeat(2, 1fr);
}
.note-card-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    padding: 8px 6px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    box-sizing: border-box;
    white-space: nowrap;
}
.btn-note-read {
    font-size: 12px;
    font-weight: 600;
}
.btn-note-practice {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    border-color: rgba(99, 102, 241, 0.35);
}
.btn-note-mock {
    font-size: 12px;
    font-weight: 700;
    color: black !important;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.25);
}
.pill-filter-btn {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border-color);
    background: var(--bg-surface-hover);
    color: var(--text-main);
    transition: all 0.2s;
    display: inline-block;
}
.pill-filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.pill-filter-btn.active {
    background: var(--primary);
    color: black;
    border-color: var(--primary);
}
.pill-filter-btn-green.active {
    background: #10b981;
    color: black;
    border-color: #10b981;
}

@media (max-width: 520px) {
    .note-card-actions {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    .note-card-actions .btn-note-mock {
        grid-column: span 2;
    }
}
@media (max-width: 768px) {
    .notes-page-container {
        margin: 12px auto !important;
        padding: 0 6px !important;
    }
    .notes-hero-card {
        padding: 16px 14px !important;
        margin-bottom: 16px !important;
    }
    .notes-hero-card h1 {
        font-size: 22px !important;
    }
    .notes-filter-card {
        padding: 14px 12px !important;
        margin-bottom: 18px !important;
    }
    .notes-group-card {
        padding: 14px 10px !important;
    }
    .notes-group-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
    .note-card-item {
        padding: 12px !important;
    }
    .note-card-inner {
        flex-direction: row !important;
        gap: 10px !important;
        margin-bottom: 10px !important;
    }
    .note-card-cover-wrapper {
        width: 85px !important;
        min-width: 85px !important;
        height: 120px !important;
        min-height: 120px !important;
    }
    .note-card-title {
        font-size: 14px !important;
        line-height: 1.35 !important;
        margin: 0 0 4px 0 !important;
    }
    .note-badge-row {
        gap: 4px !important;
    }
}


/* ==========================================================================
   CHAPTER NOTE DETAIL & CONTENT PROTECTION (Extracted from note_detail.html)
   ========================================================================== */
/* -------------------------------------------------------------
       Content Protection: Disable text selection on note content
       ------------------------------------------------------------- */
    .note-container,
    .note-container * {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    /* Allow text selection in input fields for usability */
    .note-container input,
    .note-container textarea,
    .note-container [contenteditable] {
        -webkit-user-select: auto;
        -moz-user-select: auto;
        -ms-user-select: auto;
        user-select: auto;
    }
    /* Hide content when printing */
    @media print {
        .note-container {
            display: none !important;
        }
        body::after {
            content: "This content is protected and cannot be printed. Visit apexrankers.com to study notes online.";
            display: block;
            text-align: center;
            padding: 60px 20px;
            font-size: 18px;
            color: #666;
        }
    }

    /* -------------------------------------------------------------
       Note Container & Core Typography
       ------------------------------------------------------------- */
    .note-container,
    .note-page-container,
    .note-content-card,
    .note-main-content,
    .solved-exercises,
    .exercise-question-box,
    .exercise-sol-box,
    .note-content-body {
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    .note-container {
        color: var(--text-main);
        font-family: system-ui, -apple-system, sans-serif;
        line-height: 1.75;
    }
    .note-content-body h1 {
        font-size: 24px;
        color: var(--text-heading);
        margin: 24px 0 12px 0;
        font-weight: 700;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 8px;
    }
    .note-content-body h2 {
        font-size: 20px;
        color: var(--secondary);
        margin: 22px 0 10px 0;
        font-weight: 700;
    }
    .note-content-body h3 {
        font-size: 17px;
        color: var(--primary);
        margin: 18px 0 8px 0;
        font-weight: 600;
    }
    .note-content-body {
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
    .note-content-body p {
        color: var(--text-main);
        margin: 0 0 16px 0;
        line-height: 1.8;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
    .note-content-body ul, .note-content-body ol {
        margin: 0 0 16px 24px;
        color: var(--text-main);
        line-height: 1.75;
    }
    .note-content-body li {
        margin-bottom: 6px;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
    .note-content-body table {
        width: 100%;
        border-collapse: collapse;
        margin: 20px 0;
        background: var(--bg-surface-hover);
        border-radius: var(--radius-sm);
        overflow: hidden;
    }
    .note-content-body th, .note-content-body td {
        border: 1px solid var(--border-color);
        padding: 10px 14px;
        color: var(--text-main);
    }
    .note-content-body th {
        background: rgba(255, 255, 255, 0.06);
        font-weight: 700;
        color: var(--text-heading);
    }
    .note-content-body img {
        max-width: 100%;
        height: auto;
        border-radius: var(--radius-sm);
        margin: 18px auto;
        display: block;
        border: 1px solid var(--border-color);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

    /* -------------------------------------------------------------
       MathJax Mathematical Formulas (Theme Adaptive & Responsive)
       ------------------------------------------------------------- */
    .note-content-body mjx-container {
        color: #38bdf8 !important; /* Bright cyan in dark mode */
        margin: 2px 0 !important;
        font-size: 105% !important;
        vertical-align: middle !important;
    }
    .note-content-body mjx-container:not([display="true"]) {
        display: inline-block !important;
        max-width: 100% !important;
        overflow: visible !important;
    }
    .light-theme .note-content-body mjx-container {
        color: #1e40af !important; /* Deep Royal Navy Blue in light mode for maximum contrast */
    }
    /* Guarantee white formulas and text inside dark hero banners in light mode */
    .ara-hero-banner mjx-container,
    .hero-banner mjx-container,
    .note-content-body .ara-hero-banner mjx-container,
    .light-theme .note-content-body .ara-hero-banner mjx-container,
    .note-content-body [style*="color: #ffffff"] mjx-container,
    .note-content-body [style*="color:#ffffff"] mjx-container,
    .light-theme .note-content-body [style*="color: #ffffff"] mjx-container,
    .light-theme .note-content-body [style*="color:#ffffff"] mjx-container {
        color: #ffffff !important;
    }

    .note-content-body .ara-hero-banner h1,
    .note-content-body .ara-hero-banner h2,
    .note-content-body .ara-hero-banner h3,
    .note-content-body .ara-hero-banner p,
    .note-content-body .ara-hero-banner span,
    .light-theme .note-content-body .ara-hero-banner h1,
    .light-theme .note-content-body .ara-hero-banner h2,
    .light-theme .note-content-body .ara-hero-banner h3,
    .light-theme .note-content-body .ara-hero-banner p,
    .light-theme .note-content-body .ara-hero-banner span {
        color: #ffffff !important;
    }
    .note-content-body mjx-container[jax="CHTML"][display="true"],
    .note-content-body mjx-container[display="true"] {
        margin: 16px 0 !important;
        display: block !important;
        text-align: center;
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    /* Prevent grid items, cards and boxes from blowing out beyond column bounds while preserving flex wrapping */
    .note-content-body [style*="grid"] > div {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }
    .note-content-body [style*="flex"] {
        flex-wrap: wrap;
        box-sizing: border-box;
    }
    .note-content-body [style*="flex"] > div {
        box-sizing: border-box;
    }
    .note-content-body .card,
    .note-content-body .exercise-sol-box,
    .note-content-body .exercise-question-box {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* -------------------------------------------------------------
       Teacher Roadmap Box
       ------------------------------------------------------------- */
    .teacher-roadmap {
        background: var(--bg-surface-hover) !important;
        border: 1px solid var(--border-color) !important;
        border-left: 5px solid var(--secondary) !important;
        border-radius: var(--radius-md) !important;
        padding: 22px !important;
        margin-bottom: 28px !important;
    }
    .light-theme .teacher-roadmap {
        background: #f8fafc !important;
        border-color: #cbd5e1 !important;
        border-left-color: #2563eb !important;
    }

    /* -------------------------------------------------------------
       Study Cues & Inquiries (Top Banner & Cards Grid)
       ------------------------------------------------------------- */
    .study-cues-banner {
        background: var(--bg-surface-hover) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: var(--radius-md) !important;
        padding: 20px 24px !important;
        margin-bottom: 28px !important;
    }
    .light-theme .study-cues-banner {
        background: #f8fafc !important;
        border-color: #e2e8f0 !important;
    }
    .study-cues-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
        gap: 14px !important;
        margin-top: 12px !important;
    }
    .cue-card {
        background: var(--bg-surface) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: var(--radius-sm) !important;
        padding: 14px 16px !important;
    }
    .light-theme .cue-card {
        background: #ffffff !important;
        border-color: #e2e8f0 !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
    }

    /* -------------------------------------------------------------
       Main Note Core (100% Full Width)
       ------------------------------------------------------------- */
    .note-main-content {
        background: var(--bg-surface) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: var(--radius-md) !important;
        padding: 28px !important;
        margin-bottom: 28px !important;
        width: 100% !important;
    }
    .light-theme .note-main-content {
        background: #ffffff !important;
        border-color: #e2e8f0 !important;
    }

    /* -------------------------------------------------------------
       Complete Solved Exercises Section
       ------------------------------------------------------------- */
    .solved-exercises {
        background: var(--bg-surface-hover) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: var(--radius-md) !important;
        padding: 24px !important;
        margin-top: 30px !important;
        width: 100% !important;
    }
    .light-theme .solved-exercises {
        background: #f8fafc !important;
        border-color: #cbd5e1 !important;
    }
    .exercise-group-title {
        color: var(--text-heading) !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        margin: 0 0 12px 0 !important;
        background: var(--bg-surface) !important;
        padding: 10px 14px !important;
        border-radius: var(--radius-sm) !important;
        border: 1px solid var(--border-color) !important;
    }
    .light-theme .exercise-group-title {
        background: #e2e8f0 !important;
        color: #1e3a8a !important;
        border-color: #cbd5e1 !important;
    }
    .exercise-question-box {
        background: var(--bg-surface) !important;
        border-left: 4px solid var(--primary) !important;
        border-radius: var(--radius-sm) !important;
        padding: 14px 18px !important;
        margin-bottom: 14px !important;
        border: 1px solid var(--border-color) !important;
        border-left-width: 4px !important;
    }
    .light-theme .exercise-question-box {
        background: #ffffff !important;
        border-color: #e2e8f0 !important;
        border-left-color: #059669 !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.03) !important;
    }
    .exercise-sol-box {
        color: var(--text-main) !important;
        font-size: 13.5px !important;
        margin-top: 8px !important;
        border-top: 1px solid var(--border-color) !important;
        padding-top: 8px !important;
        line-height: 1.7 !important;
    }

    /* -------------------------------------------------------------
       Synthesis Summary Box
       ------------------------------------------------------------- */
    .synthesis-summary-box {
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(99, 102, 241, 0.12) 100%) !important;
        border: 2px solid var(--primary) !important;
        border-radius: var(--radius-md) !important;
        padding: 20px !important;
        margin-top: 25px !important;
    }
    .light-theme .synthesis-summary-box {
        background: #ecfdf5 !important;
        border-color: #10b981 !important;
    }

    /* -------------------------------------------------------------
       Mobile Responsive Refinements (Maximize Reading Area & Equations)
       ------------------------------------------------------------- */
    @media (max-width: 768px) {
        .note-page-container {
            margin: 10px auto !important;
            padding: 0 4px !important;
        }
        .note-header-card {
            padding: 16px 12px !important;
            margin-bottom: 14px !important;
        }
        .note-header-card h1 {
            font-size: 20px !important;
            line-height: 1.3 !important;
        }
        .note-content-card {
            padding: 14px 10px !important;
            margin-bottom: 18px !important;
            border-radius: 8px !important;
        }
        .note-content-body {
            font-size: 14.5px !important;
            line-height: 1.65 !important;
        }
        .note-content-body h1 {
            font-size: 19px !important;
            margin: 18px 0 8px 0 !important;
        }
        .note-content-body h2 {
            font-size: 17px !important;
            margin: 16px 0 8px 0 !important;
        }
        .note-content-body h3 {
            font-size: 15px !important;
            margin: 14px 0 6px 0 !important;
        }
        .note-content-body ul, .note-content-body ol {
            margin: 0 0 12px 18px !important;
        }
        .note-content-body table {
            display: block !important;
            overflow-x: auto !important;
            width: 100% !important;
        }
        .note-content-body th, .note-content-body td {
            padding: 8px 10px !important;
            font-size: 13px !important;
        }
        .teacher-roadmap,
        .study-cues-banner,
        .note-main-content,
        .solved-exercises,
        .synthesis-summary-box {
            padding: 12px 10px !important;
            margin: 14px 0 !important;
            border-radius: 8px !important;
        }
        .exercise-question-box {
            padding: 12px 10px !important;
            margin-bottom: 12px !important;
            border-left-width: 3px !important;
        }
        .exercise-group-title {
            padding: 8px 10px !important;
            font-size: 14px !important;
        }
        .study-cues-grid {
            grid-template-columns: 1fr !important;
            gap: 10px !important;
        }
        .cue-card {
            padding: 10px 8px !important;
        }
        .active-recall-box {
            padding: 12px 10px !important;
        }
        .active-recall-item {
            padding: 8px 10px !important;
        }
        .note-content-body mjx-container {
            font-size: 96% !important;
        }
        .note-content-body [style*="display: flex"],
        .note-content-body [style*="display:flex"] {
            flex-wrap: wrap !important;
        }
        .note-content-body [style*="display: flex"] > div,
        .note-content-body [style*="display:flex"] > div {
            min-width: 140px;
        }
    }

    @media (max-width: 480px) {
        .note-content-body [style*="display: flex"] > div,
        .note-content-body [style*="display:flex"] > div {
            min-width: 100% !important;
        }
    }

    /* Floating Desktop Share Sidebar */
    @media (min-width: 1260px) {
        .note-floating-share {
            position: fixed;
            top: 240px;
            left: calc((100vw - 1050px) / 2 - 68px);
            display: flex;
            flex-direction: column;
            gap: 10px;
            background: var(--bg-surface);
            border: 1px solid var(--border-color);
            padding: 12px 8px;
            border-radius: 28px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.25);
            z-index: 90;
            align-items: center;
        }
        .note-floating-share .social-share-buttons {
            display: flex !important;
            flex-direction: column !important;
            gap: 8px !important;
            align-items: center !important;
            justify-content: center !important;
        }
        .note-floating-share .social-share-btn {
            width: 36px !important;
            height: 36px !important;
            min-width: 36px !important;
            min-height: 36px !important;
            border-radius: 50% !important;
            padding: 0 !important;
            margin: 0 !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 0 !important;
            font-size: 0 !important;
            line-height: 0 !important;
            box-sizing: border-box !important;
        }
        .note-floating-share .social-share-btn svg {
            margin: 0 auto !important;
            display: block !important;
            flex-shrink: 0 !important;
        }
        .note-floating-share .copy-label {
            display: none !important;
        }
    }
    @media (max-width: 1259px) {
        .note-floating-share {
            display: none !important;
        }
    }

/* Extra note detail components */
.note-cover-box {
    flex-shrink: 0;
    width: 140px;
    min-height: 190px;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
    background: #0b132b;
}
.note-badge-class {
    background: var(--primary);
    color: black;
    font-weight: 800;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
}
.note-badge-subj {
    background: rgba(79, 70, 229, 0.15);
    color: var(--primary);
    font-weight: 700;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
}
.note-badge-board-pill {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-dimmed);
    font-weight: 600;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.note-badge-book-pill {
    background: rgba(16, 185, 129, 0.15);
    color: var(--primary);
    font-weight: 600;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.inter-chapter-btn {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    text-decoration: none;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    transition: all 0.2s;
}
.inter-chapter-btn:hover {
    border-color: var(--primary);
}
.inter-chapter-all-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    text-decoration: none;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--primary);
    font-weight: 700;
    font-size: 13.5px;
    transition: all 0.2s;
}
.inter-chapter-all-btn:hover {
    border-color: var(--primary);
}

/* Directory card interactions */
.subject-card:hover,
.type-card:hover,
.topic-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.15);
}
@media (max-width: 480px) {
    .job-card-actions {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   CONTACT PAGE & UNIVERSAL FORM CONTROLS (Extracted from contact.html)
   ========================================================================== */
.contact-page-container {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 16px;
}
.contact-header {
    text-align: center;
    margin-bottom: 40px;
}
.contact-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-heading);
    margin: 0 0 12px 0;
}
.contact-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}
.contact-channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.contact-channel-card {
    padding: 24px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    transition: transform 0.2s;
}
.contact-channel-card:hover {
    transform: translateY(-3px);
}
.contact-channel-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 14px;
}
.contact-channel-title {
    font-size: 18px;
    color: var(--text-heading);
    margin: 0 0 8px 0;
    font-weight: 700;
}
.contact-channel-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 16px 0;
}
.contact-channel-link {
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
}
.contact-form-card {
    max-width: 750px;
    margin: 0 auto;
    padding: 36px 32px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 25px rgba(0,0,0,0.15);
}
.contact-form-title {
    font-size: 22px;
    color: var(--text-heading);
    margin: 0 0 8px 0;
    font-weight: 700;
}
.contact-form-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 24px 0;
}
.form-row-2col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.form-field-group {
    margin-bottom: 16px;
}
.form-label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}
.form-control-input {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-surface-hover);
    color: var(--text-main);
    font-size: 14px;
    box-sizing: border-box;
}
.form-control-textarea {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-surface-hover);
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
    resize: vertical;
}
.captcha-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    margin-bottom: 24px;
}
.captcha-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.captcha-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-heading);
    display: flex;
    align-items: center;
    gap: 6px;
}
.captcha-refresh-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 12.5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}
.captcha-grid {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 12px;
    align-items: center;
}
.captcha-display {
    background: var(--bg-surface-hover);
    border: 1px dashed rgba(255,255,255,0.25);
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    font-size: 14.5px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.3px;
    user-select: none;
    text-align: center;
}
.captcha-input-field {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-surface-hover);
    color: var(--text-main);
    font-size: 14px;
    text-align: center;
    font-weight: 600;
    box-sizing: border-box;
}
.captcha-footnote {
    font-size: 11.5px;
    color: var(--text-dimmed);
    margin-top: 8px;
}
.form-submit-btn {
    padding: 13px 32px;
    font-size: 15px;
    font-weight: 700;
    width: 100%;
}

/* ==========================================================================
   STATIC LEGAL & TRUST PAGES (Disclaimer, About, Privacy, Terms, Help)
   ========================================================================== */
.legal-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 16px;
}
.legal-header-banner {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.1) 0%, rgba(30, 41, 59, 0.4) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px 28px;
    margin-bottom: 30px;
}
.legal-badge-pill {
    display: inline-block;
    background: rgba(234, 179, 8, 0.15);
    color: #fbbf24;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
}
.legal-title {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 800;
    color: var(--text-heading);
    margin: 0 0 10px 0;
    line-height: 1.25;
}
.legal-subtitle {
    color: var(--text-muted);
    font-size: 14.5px;
    margin: 0;
    line-height: 1.6;
}
.legal-content-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    color: var(--text-main);
    line-height: 1.75;
    font-size: 15px;
}
.legal-section-h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-heading);
    margin: 24px 0 12px 0;
}
.legal-section-h2:first-child {
    margin-top: 0;
}
.legal-divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 28px 0;
}

/* ==========================================================================
   HELP & KNOWLEDGE BASE COMPONENTS (Extracted from help.html)
   ========================================================================== */
.help-container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 16px;
}
.help-hero-card {
    margin-bottom: 28px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.12) 0%, rgba(16, 185, 129, 0.08) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 36px 24px;
    text-align: center;
}
.help-section {
    margin-bottom: 40px;
    scroll-margin-top: 80px;
}
.help-section-card {
    padding: 28px;
}
.help-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
}
.help-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.help-feature-box {
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 18px;
}
.help-feature-list {
    margin: 0;
    padding-left: 18px;
    color: var(--text-main);
    font-size: 13.5px;
    line-height: 1.6;
}
.help-step-box {
    margin-bottom: 24px;
}
.help-step-number {
    background: var(--primary);
    color: black;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}

/* ==========================================================================
   JOB DIRECTORY & LISTING CARDS (Extracted from jobs_list.html)
   ========================================================================== */
.jobs-list-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
}
.jobs-hero-card {
    padding: 30px;
    margin-bottom: 28px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.jobs-filter-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}
.jobs-filter-select {
    width: 100%;
    padding: 10px;
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 13.5px;
}
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
}
.jobs-grid,
.jobs-grid-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.job-directory-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    transition: transform 0.2s, border-color 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.job-directory-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}
.job-directory-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.job-card-heading {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0 0 8px 0;
    line-height: 1.4;
}
.job-card-heading a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}
.job-card-heading a:hover {
    color: var(--primary);
}
.job-card-dept {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 5px;
    line-height: 1.4;
}
.job-card-qual {
    font-size: 13px;
    color: var(--text-main);
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.job-card-quota {
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.02);
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 14px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.job-card-footer {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.job-card-btn-view {
    flex: 1;
    text-align: center;
    font-size: 13px;
    padding: 9px 12px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 6px;
    box-sizing: border-box;
    white-space: nowrap;
    color: black;
}

/* ==========================================================================
   PREPARE PAGE QUESTIONS & OPTIONS GRID (Extracted from prepare.html)
   ========================================================================== */
.prep-q-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease;
}
.prep-q-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}
.prep-q-badge-num {
    background: var(--primary);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 4px;
}
.prep-q-badge-type {
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}
.prep-q-text {
    font-size: 15.5px;
    font-weight: 600;
    color: var(--text-heading);
    line-height: 1.6;
    margin-bottom: 18px;
}
.prep-opt-item {
    border: 1px solid var(--border-color);
    background: var(--bg-surface-hover);
}
.prep-opt-item.is-correct {
    border: 1px solid rgba(16, 185, 129, 0.6);
    background: rgba(16, 185, 129, 0.08);
}
.prep-opt-badge {
    background: var(--border-color);
    color: var(--text-main);
}
.prep-opt-badge.is-correct {
    background: var(--primary);
    color: #ffffff;
}
.prep-opt-text {
    font-size: 14px;
    color: var(--text-main);
    font-weight: 400;
    line-height: 1.45;
    display: inline-block;
    width: 100%;
}
.prep-opt-text.is-correct {
    color: var(--text-heading);
    font-weight: 600;
}
.prep-sol-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(16, 185, 129, 0.04) 100%);
    border: 1px dashed rgba(59, 130, 246, 0.4);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
}


/* ==========================================================================
   PREPARE GUIDE & STUDY CURRICULUM (Extracted from prepare.html)
   ========================================================================== */
@keyframes spin {
        to {
            transform: rotate(360deg);
        }
    }

    .prepare-container {
        width: 100%;
        max-width: 1260px;
        margin: 0 auto;
        padding-bottom: 60px;
        padding-left: 20px;
        padding-right: 20px;
        box-sizing: border-box;
    }

    /* Top Hero Study Card */
    .prepare-hero-card {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(16, 185, 129, 0.06) 100%);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-lg);
        padding: 26px 28px;
        margin-bottom: 28px;
        position: relative;
        overflow: hidden;
        display: flex;
        justify-content: space-between;
        align-items: stretch;
        gap: 28px;
        box-sizing: border-box;
    }

    .prepare-hero-info {
        flex: 1 1 0%;
        min-width: 0;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 16px;
    }

    .prepare-hero-title {
        font-size: clamp(20px, 2.3vw, 26px);
        font-weight: 800;
        color: var(--text-heading);
        margin: 0;
        line-height: 1.35;
    }

    .prepare-hero-metrics {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        font-size: 13px;
        color: var(--text-main);
    }

    .hero-metric-pill {
        background: var(--bg-surface);
        border: 1px solid var(--border-color);
        padding: 7px 14px;
        border-radius: var(--radius-sm);
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 12.5px;
        font-weight: 600;
        box-shadow: var(--shadow-sm);
    }

    .prepare-hero-actions {
        width: 280px;
        min-width: 260px;
        flex-shrink: 0;
        background: var(--bg-surface);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        padding: 20px;
        box-shadow: var(--shadow-sm);
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 10px;
        text-align: center;
        box-sizing: border-box;
    }

    .prepare-sticky-bar {
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .prepare-tab-panel .question-card {
        content-visibility: auto;
        contain-intrinsic-size: auto 180px;
        box-sizing: border-box;
        width: 100%;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .options-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin-bottom: 18px;
        width: 100%;
        box-sizing: border-box;
    }

    .option-card-item {
        border-radius: var(--radius-sm);
        padding: 12px 14px;
        display: flex;
        align-items: flex-start;
        gap: 10px;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
        transition: all 0.2s ease;
    }

    .option-key-badge {
        font-weight: 700;
        font-size: 12px;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        margin-top: 1px;
    }

    .option-text-wrap {
        flex: 1 1 auto;
        min-width: 0;
        max-width: 100%;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .option-correct-badge {
        font-size: 12px;
        font-weight: 700;
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        gap: 2px;
        white-space: nowrap;
    }

    .mathjax-content {
        word-break: break-word;
        overflow-wrap: anywhere;
        max-width: 100%;
        overflow-x: auto;
    }

    /* Topic / Chapter Buttons & Distinct Badges */
    .prepare-tab-btn {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        width: 100%;
        padding: 9px 12px;
        border-radius: var(--radius-sm);
        font-size: 12.5px;
        font-weight: 600;
        border: 1px solid var(--border-color);
        background: var(--bg-surface);
        color: var(--text-main);
        cursor: pointer;
        transition: all 0.2s ease;
        text-align: left;
        box-sizing: border-box;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    .prepare-tab-btn:hover {
        border-color: var(--primary);
        background: var(--bg-surface-hover);
        color: var(--text-heading);
    }

    .prepare-tab-btn.active {
        background: linear-gradient(135deg, var(--primary) 0%, #059669 100%) !important;
        color: #ffffff !important;
        border-color: var(--primary) !important;
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.28) !important;
    }

    .tab-btn-title {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        line-height: 1.35;
    }

    .tab-btn-badges {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }

    .tab-badge-weight {
        background: rgba(59, 130, 246, 0.12);
        color: var(--secondary);
        font-size: 11px;
        font-weight: 700;
        padding: 2px 7px;
        border-radius: 6px;
        border: 1px solid rgba(59, 130, 246, 0.25);
    }

    .prepare-tab-btn.active .tab-badge-weight {
        background: rgba(255, 255, 255, 0.25) !important;
        color: #ffffff !important;
        border-color: rgba(255, 255, 255, 0.4) !important;
    }

    .tab-badge-count {
        background: var(--bg-surface-hover);
        color: var(--text-muted);
        font-size: 11px;
        font-weight: 700;
        padding: 2px 7px;
        border-radius: 6px;
        border: 1px solid var(--border-color);
    }

    .prepare-tab-btn.active .tab-badge-count {
        background: rgba(0, 0, 0, 0.28) !important;
        color: #ffffff !important;
        border-color: rgba(255, 255, 255, 0.2) !important;
    }

    .passage-banner-card {
        box-sizing: border-box;
        width: 100%;
    }

    /* ========================================================= */
    /* DESKTOP / BIG SCREENS (>= 992px)                          */
    /* Vertical Sticky Sidebar on Left / Clean Content on Right  */
    /* ========================================================= */
    @media (min-width: 992px) {
        .prepare-main-layout {
            display: flex;
            gap: 28px;
            align-items: flex-start;
            width: 100%;
            position: relative;
        }

        .prepare-sidebar-wrapper {
            width: 320px;
            min-width: 300px;
            max-width: 340px;
            flex-shrink: 0;
            position: sticky;
            top: 80px;
            max-height: calc(100vh - 95px);
            overflow-y: auto;
            overflow-x: hidden;
            scrollbar-width: thin;
            display: flex;
            flex-direction: column;
            gap: 14px;
        }

        .prepare-sticky-bar {
            position: static !important;
            top: auto !important;
            background: transparent !important;
            box-shadow: none !important;
            border: none !important;
            padding: 0 !important;
            margin-bottom: 0 !important;
            width: 100%;
            display: flex;
            flex-direction: column;
            gap: 14px;
        }

        .topic-selector-wrapper {
            background: var(--bg-surface);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-md);
            padding: 14px;
            box-shadow: var(--shadow-sm);
            margin-bottom: 0 !important;
        }

        .topic-selector-heading {
            display: flex !important;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px !important;
        }

        .tabs-nav-scroller {
            display: flex !important;
            flex-direction: column !important;
            gap: 6px !important;
            max-height: 240px;
            overflow-y: auto !important;
            overflow-x: hidden !important;
            scrollbar-width: thin;
            padding-right: 4px;
        }

        /* Vertical Tab Sticky Header Card */
        .tab-sticky-header {
            background: var(--bg-surface);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-md) !important;
            padding: 16px !important;
            box-shadow: var(--shadow-sm);
            width: 100%;
            box-sizing: border-box;
        }

        .sticky-header-main-row {
            display: flex !important;
            flex-direction: column !important;
            align-items: stretch !important;
            gap: 10px !important;
        }

        .sticky-subject-title {
            font-size: 15.5px !important;
            white-space: normal !important;
            line-height: 1.35 !important;
            word-break: break-word;
        }

        .sticky-progress-subtext {
            font-size: 12px !important;
            margin-top: 3px;
        }

        .sticky-top-actions {
            width: 100%;
        }

        .desktop-only-btn {
            width: 100%;
            display: inline-flex !important;
            justify-content: center;
            padding: 8px 12px !important;
            font-weight: 700 !important;
        }

        .sticky-controls-drawer {
            display: flex !important;
            flex-direction: column !important;
            align-items: stretch !important;
            gap: 10px !important;
            margin-top: 6px;
        }

        .desktop-load-btn {
            width: 100%;
            display: inline-flex !important;
            justify-content: center;
            padding: 8px 14px !important;
            font-weight: 700 !important;
        }

        .sticky-secondary-controls {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            gap: 8px;
            width: 100%;
        }

        .sticky-secondary-controls select {
            width: 100%;
            padding: 5px 8px;
        }

        .prepare-content-area {
            flex: 1 1 0%;
            min-width: 0;
            width: 100%;
        }
    }

    /* ========================================================= */
    /* MOBILE & TABLETS (< 992px)                                */
    /* Horizontal Sticky Bar at Top of Viewport                  */
    /* ========================================================= */
    @media (max-width: 991px) {
        .prepare-hero-card {
            flex-direction: column;
            padding: 20px 18px;
            gap: 20px;
        }

        .prepare-hero-actions {
            width: 100%;
            min-width: 0;
        }

        .prepare-main-layout {
            display: block;
            width: 100%;
            position: relative;
        }

        .prepare-sidebar-wrapper {
            position: sticky !important;
            top: 60px !important;
            z-index: 90;
            width: 100%;
            background: var(--bg-base);
            padding: 6px 0 8px 0 !important;
            margin-bottom: 16px !important;
            border-bottom: 1px solid var(--border-color);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            max-height: none;
            overflow: visible;
        }

        .prepare-sticky-bar {
            position: static !important;
            top: auto !important;
            background: transparent !important;
            box-shadow: none !important;
            border: none !important;
            padding: 0 !important;
            margin-bottom: 0 !important;
            width: 100%;
        }

        .topic-selector-wrapper {
            margin-bottom: 4px !important;
        }

        .topic-selector-heading {
            display: none !important;
        }

        .tabs-nav-scroller {
            display: flex;
            gap: 6px;
            overflow-x: auto;
            padding-bottom: 2px !important;
            scrollbar-width: thin;
        }

        .prepare-tab-btn {
            padding: 5px 10px !important;
            font-size: 11.5px !important;
            border-radius: 14px !important;
            gap: 6px !important;
            white-space: nowrap !important;
            display: inline-flex !important;
            align-items: center !important;
            width: auto !important;
        }

        .tab-sticky-header {
            padding: 6px 10px !important;
            border-radius: 8px !important;
            background: var(--bg-surface);
            border: 1px solid var(--border-color);
            box-shadow: var(--shadow-sm);
        }

        .sticky-header-main-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
        }

        .desktop-only-badge,
        .desktop-only-btn,
        .desktop-load-btn {
            display: none !important;
        }

        .mobile-only-load-btn {
            display: inline-flex !important;
        }

        .mobile-only-drawer-btn {
            display: inline-flex !important;
        }

        .mobile-drawer-practice-btn {
            display: inline-flex !important;
        }

        .sticky-controls-drawer {
            display: none !important;
            padding-top: 8px;
            margin-top: 6px;
            border-top: 1px dashed var(--border-color);
            flex-direction: column;
            align-items: stretch !important;
            gap: 8px !important;
        }

        .sticky-controls-drawer.is-open {
            display: flex !important;
        }

        .sticky-secondary-controls {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .options-grid {
            grid-template-columns: minmax(0, 1fr) !important;
            gap: 10px;
        }

        .question-card {
            padding: 18px 14px !important;
        }

        .passage-banner-card {
            padding: 16px 14px !important;
        }

        .prepare-container {
            padding-left: 12px;
            padding-right: 12px;
        }
    }

    @media (max-width: 480px) {
        .option-card-item {
            padding: 10px 12px;
            gap: 8px;
        }

        .question-text {
            font-size: 14.5px !important;
        }
    }

/* ==========================================================================
   SOCIAL SHARE COMPONENT (Extracted from social_share.html)
   ========================================================================== */
.social-share-wrapper {
    margin: 20px 0;
}
.social-share-container {
    padding: 18px 20px;
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
}
.social-share-compact {
    padding: 10px 14px;
    background: transparent;
    border: none;
}
.social-share-buttons {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
}
.social-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: transform 0.15s, opacity 0.15s;
    border: none;
    cursor: pointer;
}
.social-share-compact .social-share-btn {
    padding: 5px 11px;
    font-size: 12px;
}
.social-share-icons-only .social-share-btn {
    padding: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    gap: 0;
}
.social-share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.92;
}
.share-whatsapp {
    background: #25D366;
    color: #ffffff !important;
}
.share-facebook {
    background: #1877F2;
    color: #ffffff !important;
}
.share-twitter {
    background: #000000;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.25);
}
.share-linkedin {
    background: #0A66C2;
    color: #ffffff !important;
}
.share-telegram {
    background: #229ED9;
    color: #ffffff !important;
}
.share-copy {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.native-share-btn {
    background: var(--primary);
    color: #000000 !important;
    font-weight: 700;
}

/* ==========================================================================
   BREADCRUMBS & BATCH LOADER (Extracted from prepare.html)
   ========================================================================== */
.breadcrumb-trail {
    margin-bottom: 20px;
    font-size: 13.5px;
    color: var(--text-muted);
}
.breadcrumb-trail ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
    align-items: center;
}
.breadcrumb-trail li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.batch-loader-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px 26px;
    margin-top: 24px;
    box-shadow: var(--shadow-sm);
}
.batch-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}
.batch-progress-bar-wrap {
    background: var(--bg-surface-hover);
    border-radius: 8px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 18px;
    border: 1px solid var(--border-color);
}
.theme-icon {
    display: inline-block;
    font-size: 14px;
}
.theme-text {
    display: inline-block;
    font-size: 13.5px;
}
.opt-A, .opt-B, .opt-C, .opt-D {
    display: inline-flex;
}
.questions-stream {
    display: block;
}
.solution-box {
    display: block;
}
.shown-num, .percent-num {
    font-weight: 700;
}
.tab-shown-counter {
    font-size: 12px;
}
.topic-heading-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-heading);
}
.topic-heading-sub {
    font-size: 13px;
    color: var(--text-muted);
}
.job-card {
    display: flex;
    flex-direction: column;
}
.modal-copy-lbl {
    font-size: 12px;
}


/* =========================================================================
   MOCK TESTS DIRECTORY & LIST STYLING (/mock-tests/)
   ========================================================================= */
.mock-breadcrumb-nav {
    margin-bottom: 20px;
    font-size: 13.5px;
    color: var(--text-muted);
}
.mock-breadcrumb-list {
    list-style: none !important;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.mock-breadcrumb-link {
    color: var(--text-muted);
    text-decoration: none;
}
.mock-breadcrumb-active {
    color: var(--primary);
    font-weight: 600;
}
.mock-tests-hero {
    margin-bottom: 24px;
}
.mock-hero-title {
    font-size: clamp(24px, 3.5vw, 30px);
    margin-bottom: 8px;
}
.mock-hero-desc {
    color: var(--text-muted);
    font-size: 14.5px;
    margin: 0;
    max-width: 800px;
    line-height: 1.5;
}
.mock-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.mock-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.mock-tab-btn {
    padding: 8px 16px;
    font-size: 13.5px;
    border-radius: 20px;
}
.mock-search-wrapper {
    min-width: 260px;
    max-width: 340px;
    flex: 1;
}
.mock-search-input {
    width: 100%;
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-main);
    font-size: 13.5px;
}
.mock-tests-grid {
    margin-top: 10px;
    grid-template-columns: 1fr;
    gap: 24px;
}
.mock-test-list-card {
    gap: 30px;
    align-items: start;
}
.mock-card-entity-wrap {
    margin-bottom: 10px;
}
.mock-pill-job,
.mock-pill-exam {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.25);
    text-decoration: none;
}
.mock-pill-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
    text-decoration: none;
}
.mock-card-title {
    font-size: 21px;
    color: var(--text-heading);
    margin-bottom: 8px;
}
.mock-card-title-link {
    color: var(--text-heading);
    text-decoration: none;
}
.mock-card-meta {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}
.mock-specs-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 13.5px;
    color: var(--text-main);
    margin-bottom: 20px;
}
.mock-spec-attempt-active {
    color: #38bdf8;
    font-weight: 600;
}
.mock-spec-attempt-zero {
    color: var(--text-muted);
}
.mock-actions-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.mock-btn-attempt {
    padding: 10px 20px;
    font-weight: 600;
}
.mock-btn-challenge {
    padding: 10px 16px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.mock-leaderboard-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--radius-sm);
}
.mock-leaderboard-header {
    font-size: 14px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mock-leaderboard-count {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: none;
    font-weight: 500;
}
.mock-leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mock-attempt-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 4px 0;
}
.mock-attempt-name {
    color: var(--text-heading);
    font-weight: 500;
}
.mock-attempt-score {
    color: var(--warning);
    font-weight: 600;
}
.mock-leaderboard-empty {
    color: var(--text-dimmed);
    font-size: 12px;
    text-align: center;
    padding: 10px 0;
}
.mock-empty-card {
    text-align: center;
    padding: 40px 0;
}
.mock-no-results-card {
    display: none;
    text-align: center;
    padding: 40px 0;
    margin-top: 20px;
}
.mock-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
.mock-modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    max-width: 540px;
    width: 100%;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
}
.mock-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}
.mock-modal-title {
    margin: 0;
    font-size: 17px;
    color: var(--text-heading);
    display: flex;
    align-items: center;
    gap: 8px;
}
.mock-modal-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}
.mock-modal-lead {
    color: var(--text-muted);
    font-size: 13.5px;
    margin-bottom: 16px;
    line-height: 1.5;
}
.mock-share-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.mock-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    color: var(--text-heading);
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.mock-share-btn-wa {
    background: #25D366;
}
.mock-share-btn-fb {
    background: #1877F2;
}
.mock-share-btn-x {
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.25);
}
.mock-share-btn-tg {
    background: #229ED9;
}
.mock-copy-row {
    display: flex;
    gap: 8px;
}
.mock-copy-input {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 4px;
    font-size: 13px;
}
.mock-copy-btn {
    font-size: 13px;
}

/* =========================================================================
   PRACTICE SETUP & COMPETITIVE EXAMS DIRECTORY (/competitive-exams/)
   ========================================================================= */
.practice-breadcrumb-nav {
    margin-bottom: 20px;
    font-size: 13.5px;
    color: var(--text-muted);
}
.practice-breadcrumb-list {
    list-style: none !important;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.practice-breadcrumb-link {
    color: var(--text-muted);
    text-decoration: none;
}
.practice-breadcrumb-active {
    color: var(--primary);
    font-weight: 600;
}
.practice-header {
    margin-bottom: 35px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 24px;
}
.practice-header-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.practice-header-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.practice-header-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.practice-header-desc {
    color: var(--text-muted);
    font-size: 14.5px;
    margin: 0;
}
.practice-header-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.practice-header-btn {
    padding: 10px 20px;
    font-size: 13.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.practice-directory-section {
    margin-bottom: 60px;
}
.practice-directory-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
}
.practice-directory-title {
    margin-bottom: 4px;
}
.practice-directory-desc {
    color: var(--text-muted);
    font-size: 13.5px;
    margin: 0;
}
.practice-search-wrapper {
    position: relative;
    min-width: 280px;
    max-width: 360px;
    width: 100%;
}
.practice-search-input {
    width: 100%;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-surface-hover);
    color: var(--text-main);
    font-size: 13.5px;
}
.practice-filter-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}
.practice-filter-pill {
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: var(--bg-surface-hover);
    color: var(--text-main);
    transition: all 0.2s;
}
.practice-filter-pill.active-pill {
    border: 1px solid var(--primary);
    background: var(--primary);
    color: var(--btn-primary-text);
}
.practice-family-group {
    margin-bottom: 45px;
}
.practice-family-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}
.practice-family-title {
    font-size: 19px;
    color: var(--text-heading);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.practice-family-spark {
    color: var(--primary);
}
.practice-family-badge {
    font-size: 11px;
    background: rgba(var(--primary-rgb, 59, 130, 246), 0.15);
    color: var(--primary);
    border: 1px solid rgba(var(--primary-rgb, 59, 130, 246), 0.3);
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
}
.practice-family-count {
    color: var(--text-muted);
    font-size: 13px;
}
.practice-family-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}
.practice-exam-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: transform 0.2s, border-color 0.2s;
}
.practice-exam-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}
.practice-exam-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0;
    line-height: 1.4;
}
.practice-exam-link {
    color: inherit;
    text-decoration: none;
}
.practice-badge-mock {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.35);
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    white-space: nowrap;
}
.practice-exam-desc {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 12px;
    line-height: 1.5;
    min-height: 38px;
}
.practice-past-mcq-wrapper {
    margin-bottom: 12px;
}
.practice-past-mcq-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 700;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    padding: 3px 8px;
    border-radius: 4px;
    text-decoration: none;
}
.practice-syllabus-section {
    margin-bottom: 18px;
}
.practice-syllabus-title {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.practice-syllabus-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.practice-syllabus-tag {
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 5px;
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.practice-syllabus-percent {
    color: var(--primary);
}
.practice-syllabus-empty {
    font-size: 11px;
    color: var(--text-muted);
}
.practice-exam-action {
    margin-top: 10px;
}
.practice-exam-btn {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 12.5px;
    padding: 8px 12px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 6px;
    box-sizing: border-box;
    white-space: nowrap;
    color: black;
}
.practice-no-exams-card {
    display: none;
    text-align: center;
    padding: 50px 20px;
    background: var(--bg-surface);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
}
.practice-no-exams-title {
    font-size: 16px;
    color: var(--text-heading);
    margin-bottom: 8px;
}
.practice-no-exams-desc {
    color: var(--text-muted);
    font-size: 13.5px;
    margin-bottom: 16px;
}
.practice-no-exams-btn {
    padding: 8px 20px;
    font-size: 13px;
}
.practice-builder-section {
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
    margin-bottom: 40px;
}
.practice-builder-header {
    margin-bottom: 25px;
}
.practice-builder-title {
    margin-bottom: 4px;
}
.practice-builder-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
}
.practice-builder-grid {
    gap: 30px;
}
.practice-builder-card-comp {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-top: 3px solid var(--primary);
}
.practice-builder-card-acad {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-top: 3px solid var(--secondary);
}
.practice-builder-card-title-comp {
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.practice-builder-card-title-acad {
    font-size: 20px;
    color: var(--secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.practice-builder-card-desc {
    color: var(--text-muted);
    font-size: 13.5px;
    margin-bottom: 24px;
}
.practice-builder-field {
    margin-bottom: 16px;
}
.practice-builder-field-last {
    margin-bottom: 24px;
}
.practice-builder-label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.practice-builder-select,
.practice-builder-input {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-surface-hover);
    color: var(--text-main);
    font-size: 14px;
}
.practice-builder-max-info {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}
.practice-builder-max-count-comp {
    color: var(--primary);
    font-weight: 600;
}
.practice-builder-max-count-acad {
    color: var(--secondary);
    font-weight: 600;
}
.practice-builder-submit-btn {
    width: 100%;
    padding: 12px;
    font-weight: 600;
}


/* =========================================================================
   LATEX TOOLBAR BUTTONS & EQUATION OVERFLOW STYLING
   ========================================================================= */
.latex-tool-btn {
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 3px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    margin: 2px;
}
.latex-tool-btn:hover {
    background: var(--primary);
    color: var(--btn-primary-text);
    border-color: var(--primary);
}
.latex-tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}
.latex-tab-btn.active {
    color: var(--primary) !important;
    border-bottom: 2px solid var(--primary);
}
.latex-tab-btn:hover {
    color: var(--text-heading);
}
.latex-scrollable-line {
    overflow-x: auto !important;
    max-width: 100% !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
    -webkit-overflow-scrolling: touch;
}
