:root {
            /* Enhanced Color Palette */
            --primary: #6366f1;
            --primary-light: #818cf8;
            --primary-dark: #4f46e5;
            --secondary: #8b5cf6;
            --secondary-light: #a78bfa;
            --secondary-dark: #7c3aed;
            --success: #10b981;
            --success-light: #34d399;
            --warning: #f59e0b;
            --warning-light: #fbbf24;
            --danger: #ef4444;
            --danger-light: #f87171;

            /* Neutral Colors - WCAG AA compliant (4.5:1 contrast ratio) */
            --text-primary: #1f2937;
            --text-secondary: #6b7280;
            --text-tertiary: #6b7280; /* Updated from #9ca3af for WCAG AA compliance */
            --bg-primary: #ffffff;
            --bg-secondary: #f9fafb;
            --bg-tertiary: #f3f4f6;
            --border: #e5e7eb;
            --border-light: #f3f4f6;

            /* Shadows - Layered Depth System */
            --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
            --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.03);
            --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
            --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
            --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
            --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.15);
            --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.06);

            /* Border Radius Scale */
            --radius-sm: 6px;
            --radius-md: 10px;
            --radius-lg: 14px;
            --radius-xl: 18px;
            --radius-2xl: 24px;
            --radius-full: 9999px;

            /* Spacing Scale */
            --space-xs: 4px;
            --space-sm: 8px;
            --space-md: 16px;
            --space-lg: 24px;
            --space-xl: 32px;
            --space-2xl: 48px;
            --space-3xl: 64px;

            /* Typography Scale */
            --font-xs: 0.75rem;
            --font-sm: 0.875rem;
            --font-base: 1rem;
            --font-lg: 1.125rem;
            --font-xl: 1.25rem;
            --font-2xl: 1.5rem;
            --font-3xl: 1.875rem;
            --font-4xl: 2.25rem;
            --font-5xl: 3rem;

            /* Transitions */
            --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
            --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
            --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
            --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

            /* Z-Index Layers - Simplified 5-Level System */
            --z-base: 1;          /* Normal content */
            --z-dropdown: 10;     /* Dropdowns, tooltips, popovers */
            --z-sticky: 50;       /* Sticky elements (breadcrumbs, floating buttons) */
            --z-header: 100;      /* Main header navigation */
            --z-modal: 1000;      /* Modals, overlays, dialogs */

            /* Dynamic Layout Variables */
            --header-height: 80px;  /* Default, calculated by JS */
}

/* Final theory accordion styles (scoped) */
.theory-accordion {
    display: grid;
    gap: 12px;
}

.theory-accordion .accordion-item {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    margin-bottom: 0;
}

.theory-accordion .accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    border: 0;
    background: #f8fafc;
    color: #1f2937;
    border-bottom: 1px solid #e5e7eb;
    border-left: 4px solid #6366f1;
    font-weight: 700;
    box-shadow: none;
    margin: 0;
}

.theory-accordion .accordion-title {
    text-align: left;
}

.theory-accordion .accordion-body {
    display: none;
    padding: 16px;
    background: #fff;
    margin: 0;
    box-shadow: none;
}

.theory-accordion .accordion-body.open,
.theory-accordion .accordion-body.is-open {
    display: block;
}

.theory-accordion .accordion-chevron {
    font-size: 0.95rem;
    opacity: 0.9;
}

.theory-accordion .theory-content-enhanced .theory-box,
.theory-accordion .theory-content-enhanced .example-box {
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    margin: 10px 0;
}

        /* Dark Mode Color Scheme */
        [data-theme="dark"] {
            --primary: #818cf8;
            --primary-light: #a5b4fc;
            --primary-dark: #6366f1;
            --secondary: #a78bfa;
            --secondary-light: #c4b5fd;
            --secondary-dark: #8b5cf6;
            --success: #34d399;
            --success-light: #6ee7b7;
            --warning: #fbbf24;
            --warning-light: #fcd34d;
            --danger: #f87171;
            --danger-light: #fca5a5;

            --text-primary: #f3f4f6;
            --text-secondary: #d1d5db;
            --text-tertiary: #9ca3af;
            --bg-primary: #1f2937;
            --bg-secondary: #111827;
            --bg-tertiary: #0f172a;
            --border: #374151;
            --border-light: #4b5563;

            --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
            --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
            --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
            --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.6);
            --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.7);
            --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.8);
        }

        [data-theme="dark"] body {
            background: #111827;
            color: #f3f4f6;
        }

        [data-theme="dark"] .content-section {
            background: #1f2937;
        }

        [data-theme="dark"] .joke-card {
            background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
        }

        [data-theme="dark"] .activity-card {
            background: #1f2937;
            border-color: #6366f1;
        }

        [data-theme="dark"] .code-example {
            background: #0f172a;
            border-color: #1f2937;
        }

        /* Dark Mode Toggle Button */
        .theme-toggle {
            position: fixed;
            bottom: 24px;
            right: 24px;
            width: 56px;
            height: 56px;
            border-radius: 50%;
            background: linear-gradient(135deg, #6366f1, #8b5cf6);
            border: none;
            color: white;
            font-size: 1.5rem;
            cursor: pointer;
            box-shadow: var(--shadow-lg);
            transition: all var(--transition-base);
            z-index: var(--z-sticky);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .theme-toggle:hover {
            transform: scale(1.1);
            box-shadow: var(--shadow-xl);
        }

        .theme-toggle:active {
            transform: scale(0.95);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Poppins', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            font-size: var(--font-base);
            line-height: 1.8;
            color: #334155;
            background: #f8fafc;
            min-height: 100vh;
            font-weight: 400;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            overflow-x: hidden;
        }

        p {
            line-height: 1.8;
            color: #334155;
            max-width: 65ch;
        }

        :focus-visible {
            outline: 3px solid var(--secondary);
            outline-offset: 3px;
        }

        .visually-hidden {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            border: 0;
            white-space: nowrap;
        }


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

        /* Fixed Sticky Header */
        header {
            position: sticky;
            top: 0;
            left: 0;
            right: 0;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border-bottom: 1px solid #e2e8f0;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
            z-index: var(--z-header);
            padding: 16px 0;
        }

        .header-inner {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 24px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 32px;
        }

        .header-top {
            display: flex;
            align-items: center;
            gap: 1.5rem;
            flex: 1;
            min-width: 0;
        }

        .header-branding {
            display: flex;
            flex-direction: column;
            gap: 0.125rem;
            min-width: 0;
        }

        /* Main content - header handles its own space */
        #main-content {
            padding-top: 0;
        }

        /* Account for sticky header and breadcrumbs when scrolling to anchors */
        .content-section {
            scroll-margin-top: calc(var(--header-height) + 60px);
        }

        /* Unified Navigation Bar - Replaces Breadcrumb */
        .breadcrumb-container {
            background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
            border-bottom: 2px solid #e5e7eb;
            padding: 16px 0;
            position: sticky;
            top: var(--header-height);
            z-index: var(--z-sticky);
            transition: top 0.2s ease, all var(--transition-base);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        }

        .breadcrumb-inner {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 24px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 24px;
            flex-wrap: wrap;
        }

        /* Navigation context area */
        .nav-context {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }

        .module-badge {
            background: linear-gradient(135deg, #6366f1, #8b5cf6);
            color: white;
            padding: 8px 16px;
            border-radius: 20px;
            font-weight: 600;
            font-size: 0.9rem;
            box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .step-indicator-text {
            color: var(--text-primary);
            font-weight: 500;
            font-size: 0.9rem;
            background: #eef2ff;
            padding: 8px 16px;
            border-radius: 20px;
            border: 2px solid #c7d2fe;
        }

        /* Progress dots area */
        .nav-progress {
            display: flex;
            align-items: center;
        }

        .progress-dots {
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 0.85rem;
            color: var(--text-secondary);
        }

        .progress-dots .step-completed {
            color: var(--success);
            font-weight: 600;
        }

        .progress-dots .step-current {
            color: var(--primary);
            font-weight: 600;
        }

        .progress-dots .step-pending {
            color: var(--text-tertiary);
        }

        /* Hide unified nav on home page */
        .breadcrumb-container.hidden {
            display: none;
        }

        /* Breadcrumb fallback for non-module pages */
        .breadcrumb-item {
            color: #6b7280;
            text-decoration: none;
            transition: color var(--transition-base);
            font-size: 0.9rem;
        }

        .breadcrumb-item:hover:not(.active) {
            color: #4f46e5;
            cursor: pointer;
        }

        .breadcrumb-item.active {
            color: #6366f1;
            font-weight: 600;
        }

        .breadcrumb-separator {
            color: #d1d5db;
            user-select: none;
        }

        h1 {
            font-family: 'Merriweather', 'Georgia', serif;
            color: var(--primary);
            font-size: 1.25rem;
            margin: 0;
            line-height: 1.3;
            font-weight: 700;
            letter-spacing: -0.01em;
            background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .subtitle {
            color: #6b7280;
            font-size: 0.75rem;
            font-weight: 400;
            letter-spacing: 0.01em;
            margin: 0;
            opacity: 0.9;
        }

        nav {
            display: flex;
            gap: var(--space-sm);
            flex-wrap: wrap;
        }

        /* Modern Ghost Button Navigation */
        .nav-btn {
            background: transparent;
            color: #64748b;
            border: 1px solid transparent;
            padding: var(--space-sm) var(--space-lg);
            min-height: 44px;
            min-width: 44px;
            border-radius: var(--radius-md);
            cursor: pointer;
            font-size: var(--font-sm);
            font-weight: 600;
            transition: all var(--transition-base);
            line-height: 1.5;
            box-shadow: none;
            letter-spacing: 0.01em;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .nav-btn:hover {
            background: #f1f5f9;
            color: #334155;
            transform: none;
        }

        /* Remove outline only for mouse clicks, not keyboard navigation */
        .nav-btn:focus:not(:focus-visible) {
            outline: none;
        }

        .nav-btn:focus {
            background: #f1f5f9;
            color: #334155;
        }

        .nav-btn:active {
            background: #e2e8f0;
        }

        .nav-btn:focus-visible,
        .accordion-header:focus-visible,
        .quiz-option:focus-visible,
        .modal button:focus-visible {
            outline: 3px solid var(--secondary);
            outline-offset: 2px;
        }

        .nav-btn.active {
            background: #eef2ff;
            color: #6366f1;
            border: 1px solid #c7d2fe;
        }

        /* Disabled button state with tooltip */
        .nav-btn:disabled {
            background: #f3f4f6;
            color: #9ca3af;
            cursor: not-allowed;
            opacity: 0.6;
            position: relative;
        }

        .nav-btn:disabled:hover {
            transform: none;
            background: #f3f4f6;
        }

        /* Tooltip container */
        .nav-btn-tooltip-wrapper {
            position: relative;
            display: inline-block;
        }

        /* Tooltip bubble */
        .nav-btn-tooltip {
            visibility: hidden;
            opacity: 0;
            position: absolute;
            bottom: calc(100% + 12px);
            right: 0;
            background: #1f2937;
            color: white;
            padding: 12px 16px;
            border-radius: var(--radius-md);
            font-size: 0.875rem;
            font-weight: 500;
            line-height: 1.5;
            white-space: nowrap;
            max-width: 280px;
            white-space: normal;
            box-shadow: var(--shadow-lg);
            z-index: var(--z-dropdown);
            transition: opacity 0.2s ease, visibility 0.2s ease;
            pointer-events: none;
        }

        /* Tooltip arrow */
        .nav-btn-tooltip::after {
            content: '';
            position: absolute;
            top: 100%;
            right: 20px;
            border: 6px solid transparent;
            border-top-color: #1f2937;
        }

        /* Show tooltip on hover of disabled button */
        .nav-btn-tooltip-wrapper:hover .nav-btn-tooltip,
        .nav-btn:disabled:hover + .nav-btn-tooltip {
            visibility: visible;
            opacity: 1;
        }

        /* Alternative: Show tooltip when button is focused (keyboard accessibility) */
        .nav-btn:disabled:focus + .nav-btn-tooltip {
            visibility: visible;
            opacity: 1;
        }

        /* Primary navigation buttons - keep ghost style */
        .nav-btn-primary {
            padding: var(--space-sm) var(--space-lg);
            font-size: var(--font-sm);
            font-weight: 600;
        }

        /* Secondary navigation buttons - subdued ghost style */
        .nav-btn-secondary {
            padding: var(--space-sm) var(--space-md);
            font-size: 0.8rem;
            font-weight: 500;
            color: #94a3b8;
        }

        .nav-btn-secondary:hover {
            background: #f8fafc;
            color: #475569;
        }

        .nav-btn-secondary.active {
            background: #f1f5f9;
            color: #475569;
            border: 1px solid #e2e8f0;
        }

        /* Settings button - subtle icon button */
        .nav-btn-settings {
            padding: var(--space-sm) var(--space-md);
            font-size: var(--font-sm);
            color: #94a3b8;
        }

        .nav-btn-settings:hover {
            background: #fef3c7;
            color: #f59e0b;
        }

        /* Teacher button - hidden by default */
        .nav-btn-teacher {
            padding: var(--space-sm) var(--space-md);
            font-size: var(--font-sm);
            color: #f59e0b;
        }

        .nav-btn-teacher:hover {
            background: #fef3c7;
        }

        .secondary-btn {
            background: var(--bg-tertiary);
            color: var(--text-primary);
            border: 1px solid var(--border);
            box-shadow: var(--shadow-xs);
        }

        .secondary-btn:hover,
        .secondary-btn:focus-visible {
            background: var(--bg-secondary);
            color: var(--text-primary);
            box-shadow: var(--shadow-sm);
        }

        /* Simplified Navigation */
        .primary-nav {
            display: flex;
            align-items: center;
            gap: var(--space-sm);
            flex: 1;
            justify-content: center;
        }

        .nav-link {
            background: transparent;
            color: #64748b;
            border: 1px solid transparent;
            padding: var(--space-sm) var(--space-lg);
            min-height: 44px;
            min-width: 44px;
            border-radius: var(--radius-md);
            cursor: pointer;
            font-size: var(--font-sm);
            font-weight: 600;
            transition: all var(--transition-base);
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .nav-link:hover {
            background: #f1f5f9;
            color: #334155;
        }

        .nav-link:focus-visible {
            outline: 3px solid var(--secondary);
            outline-offset: 2px;
        }

        .nav-link.active {
            background: #eef2ff;
            color: #6366f1;
            border: 1px solid #c7d2fe;
        }

        .nav-actions {
            display: flex;
            gap: var(--space-sm);
            align-items: center;
        }

        #placement-btn {
            padding: var(--space-sm) var(--space-lg);
            font-size: var(--font-sm);
        }

        /* Resource Tabs */
        .resource-tabs {
            display: flex;
            gap: var(--space-sm);
            border-bottom: 2px solid var(--border);
            margin-bottom: var(--space-xl);
            overflow-x: auto;
            scrollbar-width: thin;
            -webkit-overflow-scrolling: touch;
            max-width: 100%;
            box-sizing: border-box;
        }

        .resource-tabs::-webkit-scrollbar {
            height: 4px;
        }

        .resource-tabs::-webkit-scrollbar-track {
            background: var(--bg-secondary);
        }

        .resource-tabs::-webkit-scrollbar-thumb {
            background: var(--border);
            border-radius: 2px;
        }

        .resource-tab {
            background: transparent;
            border: none;
            padding: var(--space-md) var(--space-lg);
            font-size: var(--font-base);
            font-weight: 600;
            color: var(--text-secondary);
            cursor: pointer;
            border-bottom: 3px solid transparent;
            margin-bottom: -2px;
            transition: all var(--transition-base);
            min-height: 44px;
            min-width: 44px;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .resource-tab:hover {
            color: var(--text-primary);
            background: var(--bg-secondary);
        }

        .resource-tab.active {
            color: var(--primary);
            border-bottom-color: var(--primary);
        }

        .resource-tab:focus-visible {
            outline: 3px solid var(--secondary);
            outline-offset: 2px;
        }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
        }

        /* Floating Help Button */
        .help-button {
            position: fixed;
            bottom: 24px;
            right: 24px;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: linear-gradient(135deg, #6366f1, #8b5cf6);
            color: white;
            border: none;
            font-size: 28px;
            box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
            cursor: pointer;
            z-index: var(--z-sticky);
            transition: all var(--transition-base);
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
        }

        .help-button:hover {
            transform: scale(1.1) rotate(10deg);
            box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
        }

        .help-button:active {
            transform: scale(0.95);
        }

        /* Help Modal */
        .help-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.6);
            z-index: var(--z-modal);
            align-items: center;
            justify-content: center;
            padding: 20px;
            backdrop-filter: blur(4px);
        }

        .help-modal.show {
            display: flex;
        }

        .help-modal-content {
            background: white;
            border-radius: var(--radius-2xl);
            padding: 32px;
            max-width: 800px;
            width: 100%;
            max-width: min(800px, calc(100% - 24px));
            max-height: 85vh;
            box-shadow: var(--shadow-2xl);
            position: relative;
            animation: slideUp 0.3s ease;
            overflow-y: auto;
            overflow-x: hidden;
            box-sizing: border-box;
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .help-modal-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 20px;
        }

        .help-modal-icon {
            font-size: 2rem;
        }

        .help-modal-title {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--text-primary);
            margin: 0;
        }

        .help-modal-body {
            color: var(--text-secondary);
            line-height: 1.7;
            margin-bottom: 24px;
        }

        .help-modal-close {
            position: absolute;
            top: 16px;
            right: 16px;
            background: none;
            border: none;
            font-size: 24px;
            color: var(--text-tertiary);
            cursor: pointer;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: all var(--transition-fast);
        }

        .help-modal-close:hover {
            background: var(--bg-secondary);
            color: var(--text-primary);
        }

        /* Home / Welcome */
        #home.content-section:not(.active) {
            display: none;
        }

        .home-hero {
            background: linear-gradient(135deg, #eef2ff, #e0f2fe);
            border-radius: var(--radius-2xl);
            padding: var(--space-2xl);
            box-shadow: var(--shadow-xl);
            border: 1px solid rgba(255, 255, 255, 0.6);
        }

        .welcome-steps {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: var(--space-lg);
            margin-top: var(--space-xl);
        }

        .step-card {
            background: var(--bg-primary);
            border-radius: var(--radius-xl);
            padding: var(--space-xl);
            box-shadow: var(--shadow-md);
            border: 1px solid var(--border);
        }

        .cta-primary {
            padding: var(--space-md) var(--space-xl);
            min-height: 48px;
            min-width: 48px;
            border-radius: var(--radius-full);
            border: none;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            color: white;
            font-weight: 700;
            font-size: var(--font-base);
            cursor: pointer;
            box-shadow: var(--shadow-md);
            transition: transform var(--transition-base), box-shadow var(--transition-base);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .cta-primary:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-lg);
        }

        .cta-secondary {
            background: transparent;
            border: 1px solid var(--border);
            color: var(--text-primary);
            padding: var(--space-sm) var(--space-lg);
            min-height: 44px;
            min-width: 44px;
            border-radius: var(--radius-full);
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .cta-pulse {
            position: relative;
        }

        .cta-pulse::after {
            content: '';
            position: absolute;
            inset: -6px;
            border-radius: var(--radius-full);
            border: 2px solid rgba(99, 102, 241, 0.4);
            animation: pulse 1.6s ease-out infinite;
        }

        /* Next Step Guidance Component */
        .next-step-container {
            background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
            border: 2px solid #c7d2fe;
            border-radius: var(--radius-xl);
            padding: 2rem;
            margin: 2rem 0;
            text-align: center;
            box-shadow: var(--shadow-lg);
        }

        .next-step-header {
            font-size: 1.5rem;
            font-weight: 700;
            color: #312e81;
            margin-bottom: 0.75rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.75rem;
        }

        .next-step-description {
            color: #4c1d95;
            font-size: 1rem;
            margin-bottom: 1.5rem;
            line-height: 1.6;
        }

        .next-step-actions {
            display: flex;
            gap: 1rem;
            justify-content: center;
            flex-wrap: wrap;
        }

        .next-step-button {
            display: inline-flex;
            align-items: center;
            gap: 0.75rem;
            padding: 1rem 2rem;
            border-radius: var(--radius-lg);
            font-weight: 700;
            font-size: 1.125rem;
            cursor: pointer;
            transition: all var(--transition-base);
            border: none;
            box-shadow: var(--shadow-md);
        }

        .next-step-button.primary {
            background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
            color: white;
        }

        .next-step-button.primary:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-xl);
        }

        .next-step-button.secondary {
            background: white;
            color: #6366f1;
            border: 2px solid #c7d2fe;
        }

        .next-step-button.secondary:hover {
            background: #f5f3ff;
            border-color: #a78bfa;
        }

        .module-modal-start-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
        }

        /* Time Estimate Badge */
        .time-estimate {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            border: 2px solid #fbbf24;
            border-radius: var(--radius-full);
            padding: 0.5rem 1rem;
            font-size: 0.875rem;
            font-weight: 600;
            color: #78350f;
            box-shadow: var(--shadow-sm);
        }

        .time-estimate-icon {
            font-size: 1.125rem;
        }

        .time-estimate.small {
            font-size: 0.75rem;
            padding: 0.375rem 0.75rem;
        }

        .time-estimate.large {
            font-size: 1rem;
            padding: 0.75rem 1.25rem;
        }

        @keyframes pulse {
            0% { transform: scale(0.95); opacity: 0.7; }
            100% { transform: scale(1.15); opacity: 0; }
        }

        @keyframes bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-20px); }
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateX(-20px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        /* Module progress bar - shows at bottom of module box */
        .module-progress {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 6px;
            background: rgba(255, 255, 255, 0.3);
            border-radius: 0 0 12px 12px;
            overflow: hidden;
        }

        .module-progress-bar-fill {
            height: 100%;
            background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
            transition: width 0.5s ease;
            border-radius: 0 0 12px 12px;
        }

        /* Module Progress Timeline Container - Clean Subheader */
        .module-progress-subheader {
            background: #ffffff;
            border: 1px solid #e5e7eb;
            border-radius: var(--radius-lg);
            padding: 1.5rem;
            margin-bottom: 2rem;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
            position: relative;
        }

        .module-progress-header {
            text-align: center;
            margin-bottom: 1.25rem;
        }

        /* Enhanced Progress Indicator Bar */
        .enhanced-progress-bar {
            background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
            border: 2px solid #c7d2fe;
            border-radius: var(--radius-lg);
            padding: 1rem 1.25rem;
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 1rem;
            flex-wrap: wrap;
            box-shadow: 0 2px 4px rgba(99, 102, 241, 0.1);
        }

        .progress-text-info {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            font-size: 0.875rem;
            font-weight: 600;
            color: #312e81;
            flex-wrap: wrap;
        }

        .progress-step-indicator {
            background: white;
            padding: 0.375rem 0.75rem;
            border-radius: var(--radius-md);
            color: #4f46e5;
            border: 1px solid #c7d2fe;
            white-space: nowrap;
        }

        .progress-time-remaining {
            display: flex;
            align-items: center;
            gap: 0.375rem;
            color: #6366f1;
            white-space: nowrap;
        }

        .progress-visual-bar {
            flex: 1;
            min-width: 200px;
            height: 32px;
            background: white;
            border-radius: var(--radius-full);
            overflow: hidden;
            position: relative;
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
            border: 1px solid #e0e7ff;
        }

        .progress-visual-fill {
            height: 100%;
            background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
            transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            align-items: center;
            justify-content: flex-end;
            padding-right: 0.75rem;
            position: relative;
            overflow: hidden;
        }

        .progress-visual-fill::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            animation: shimmer 2s infinite;
        }

        .progress-percentage-text {
            font-size: 0.875rem;
            font-weight: 700;
            color: white;
            position: relative;
            z-index: 1;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
        }

        .progress-percentage-outside {
            position: absolute;
            right: 0.75rem;
            top: 50%;
            transform: translateY(-50%);
            font-size: 0.875rem;
            font-weight: 700;
            color: #6b7280;
        }

        .module-step-label {
            font-size: 0.75rem;
            color: #6366f1;
            font-weight: 600;
            letter-spacing: 0.1em;
            text-transform: uppercase;
        }

        .module-step-name {
            font-size: 1rem;
            color: #1f2937;
            font-weight: 600;
            margin-top: 0.25rem;
        }

        #module-steps {
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 1rem;
            position: relative;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
        }

        /* Module learning step indicator */
        .step-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            min-width: 70px;
            padding: 10px;
            transition: all 0.3s ease;
        }

        .step-number {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: #f3f4f6;
            color: #9ca3af;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 0.875rem;
            border: 2px solid #e5e7eb;
            transition: all 0.3s ease;
        }

        .step-item.active .step-number {
            background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
            color: white;
            border-color: #6366f1;
            box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
            transform: scale(1.1);
        }

        .step-item.completed .step-number {
            background: #10b981;
            color: white;
            border-color: #10b981;
        }

        .step-icon {
            font-size: 1.25rem;
            opacity: 0.5;
            transition: opacity 0.3s ease;
        }

        .step-item.active .step-icon,
        .step-item.completed .step-icon {
            opacity: 1;
        }

        .step-label {
            font-size: 0.7rem;
            color: #9ca3af;
            font-weight: 500;
            text-align: center;
            transition: color 0.3s ease;
        }

        .step-item.active .step-label {
            color: #6366f1;
            font-weight: 600;
        }

        .step-item.completed .step-label {
            color: #10b981;
            font-weight: 600;
        }

        .step-connector {
            flex: 1;
            height: 2px;
            background: #e5e7eb;
            min-width: 30px;
            max-width: 80px;
            position: relative;
            top: -20px;
            z-index: 1;
            transition: background 0.3s ease;
        }

        .step-connector.completed {
            background: #10b981;
        }

        @media (max-width: 768px) {
            .module-progress-subheader {
                padding: 1rem;
                position: relative;
                top: 0;
            }

            .module-progress-header {
                margin-bottom: 1rem;
            }

            .module-step-label {
                font-size: 0.7rem;
            }

            .module-step-name {
                font-size: 0.9rem;
            }

            #module-steps {
                max-width: 100%;
            }

            .step-label {
                display: none;
            }
            .step-item {
                min-width: 40px;
                padding: 5px;
            }
            .step-number {
                width: 32px;
                height: 32px;
                font-size: 0.75rem;
            }
            .step-icon {
                font-size: 1rem;
            }
        }

        .progress-ring {
            width: 62px;
            height: 62px;
            border-radius: 50%;
            background: conic-gradient(var(--primary) var(--progress), var(--bg-tertiary) 0);
            display: grid;
            place-items: center;
            color: var(--text-primary);
            font-weight: 700;
            box-shadow: var(--shadow-md);
        }

        /* Module Progress Cards (Dashboard) */
        .module-progress-card {
            background: white;
            border-radius: 12px;
            padding: 20px;
            text-align: center;
            border: 2px solid #e5e7eb;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .module-progress-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
            border-color: #c7d2fe;
        }

        .module-progress-card.completed {
            border-color: #10b981;
            background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
        }

        .module-progress-card.in-progress {
            border-color: #6366f1;
            background: linear-gradient(135deg, #eef2ff 0%, #dbeafe 100%);
        }

        .module-progress-icon {
            width: 48px;
            height: 48px;
            margin: 0 auto 12px;
            border-radius: 50%;
            background: #f3f4f6;
            color: #9ca3af;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 1.25rem;
            border: 2px solid #e5e7eb;
            transition: all 0.3s ease;
        }

        .module-progress-card.completed .module-progress-icon {
            background: #10b981;
            color: white;
            border-color: #10b981;
        }

        .module-progress-card.in-progress .module-progress-icon {
            background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
            color: white;
            border-color: #6366f1;
        }

        .module-progress-card.completed .module-progress-icon::after {
            content: '✓';
            font-size: 1.5rem;
        }

        .module-progress-title {
            font-weight: 600;
            color: #1f2937;
            margin-bottom: 4px;
            font-size: 0.875rem;
        }

        .module-progress-status {
            font-size: 0.75rem;
            color: #6b7280;
            margin-bottom: 8px;
        }

        .module-progress-card.completed .module-progress-status {
            color: #10b981;
            font-weight: 600;
        }

        .module-progress-card.in-progress .module-progress-status {
            color: #6366f1;
            font-weight: 600;
        }

        .module-progress-bar-mini {
            height: 4px;
            background: #e5e7eb;
            border-radius: 999px;
            overflow: hidden;
        }

        .module-progress-fill-mini {
            height: 100%;
            background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
            transition: width 0.5s ease;
        }

        .module-progress-card.completed .module-progress-fill-mini {
            background: #10b981;
        }

        #main-nav {
            position: sticky;
            top: 0;
            z-index: var(--z-sticky);
            background: var(--bg-primary);
            padding: var(--space-sm);
            margin: 0 calc(var(--space-sm) * -1) var(--space-xl);
            border-radius: var(--radius-xl);
            box-shadow: var(--shadow-sm);
            display: flex;
            flex-wrap: wrap;
            gap: var(--space-sm);
        }

        /* In-section anchor links */
        .section-anchor {
            margin-left: 8px;
            font-size: 0.9rem;
            color: var(--text-tertiary);
            text-decoration: none;
            opacity: 0;
            transition: opacity var(--transition-fast);
        }

        h2:hover .section-anchor,
        h2:focus-within .section-anchor {
            opacity: 1;
        }

        /* Form elements */
        .search-input,
        input[type="text"],
        input[type="search"],
        textarea {
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            padding: var(--space-md);
            font-family: inherit;
            font-size: 16px;
            transition: box-shadow var(--transition-base), border-color var(--transition-base);
        }

        .search-input:focus-visible,
        input[type="text"]:focus-visible,
        input[type="search"]:focus-visible,
        textarea:focus-visible {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
        }

        .notes-textarea {
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            padding: var(--space-md);
            min-height: 140px;
        }

        /* Mobile spacing */
        @media (max-width: 768px) {
            .container {
                padding: var(--space-md);
            }
            header {
                padding: 0.5rem 1rem;
            }
            .header-inner {
                gap: 0.75rem;
                flex-direction: column;
                align-items: stretch;
            }
            .header-top {
                justify-content: space-between;
            }
            .header-branding h1 {
                font-size: 1rem;
            }
            .header-branding .subtitle {
                font-size: 0.7rem;
            }
            .primary-nav {
                width: 100%;
                justify-content: center;
                gap: var(--space-xs);
            }
            .nav-link {
                padding: var(--space-xs) var(--space-sm);
                font-size: 0.7rem;
                border-radius: var(--radius-sm);
            }
            .nav-actions {
                width: 100%;
                justify-content: center;
            }
            #placement-btn {
                width: 100%;
                font-size: 0.75rem;
                padding: var(--space-sm) var(--space-md);
            }
            .breadcrumb-container {
                padding: 12px 0;
                top: var(--header-height);
            }
            .breadcrumb-inner {
                padding: 0 16px;
                flex-direction: column;
                gap: 12px;
            }
            .module-badge {
                font-size: 0.8rem;
                padding: 6px 12px;
            }
            .step-indicator-text {
                font-size: 0.8rem;
                padding: 6px 12px;
            }
            .progress-dots {
                font-size: 0.75rem;
                gap: 8px;
                flex-wrap: wrap;
            }
            .content-section {
                padding: var(--space-lg);
                box-shadow: var(--shadow-sm);
            }
            body {
                background: #f4f5fb;
            }
            /* Mobile tooltip adjustments */
            .nav-btn-tooltip {
                max-width: 220px;
                font-size: 0.8rem;
                padding: 10px 14px;
                right: 0;
                left: auto;
            }
            .nav-btn-tooltip::after {
                right: 16px;
            }
        }

        /* Small phones - Extra compact */
        @media (max-width: 374px) {
            .header-branding h1 {
                font-size: 0.9rem;
                line-height: 1.3;
            }
            .header-branding .subtitle {
                font-size: 0.65rem;
                display: none; /* Hide subtitle on very small screens */
            }
            .primary-nav {
                gap: 4px;
            }
            .nav-link {
                padding: 6px 8px;
                font-size: 0.65rem;
            }
            .module-badge {
                font-size: 0.7rem;
                padding: 4px 10px;
            }
            .step-indicator-text {
                font-size: 0.7rem;
                padding: 4px 10px;
            }
            .model-box, .module-card, .activity-card {
                padding: 12px;
                margin-bottom: 12px;
            }
            .content-section {
                padding: var(--space-md);
            }
            .nav-btn-tooltip {
                max-width: 180px;
                font-size: 0.75rem;
            }
        }

        /* Tablets - Optimized 2-column layout */
        @media (min-width: 768px) and (max-width: 1024px) {
            #learning-path {
                grid-template-columns: repeat(2, 1fr) !important;
                gap: 20px !important;
            }
            .model-box {
                max-width: 100%;
                min-height: 160px;
            }
            .module-card {
                padding: 20px;
            }
            .activity-card {
                padding: 18px;
            }
            .header-inner {
                flex-direction: row;
                align-items: center;
            }
            .primary-nav {
                width: auto;
            }
            .nav-actions {
                width: auto;
            }
            .container {
                padding: var(--space-xl);
            }
            .content-section {
                padding: var(--space-xl);
            }
            /* Tablet-friendly modal sizing */
            .modal-content {
                max-width: 90%;
                padding: 28px;
            }
        }

        /* Landscape mobile - Prevent overflow */
        @media (max-width: 896px) and (orientation: landscape) {
            .modal {
                padding: 10px;
                overflow-y: auto;
            }
            .modal-content {
                max-height: 90vh;
                overflow-y: auto;
                margin: 10px auto;
            }
            .activity-card {
                padding: 14px;
            }
            .quiz-container {
                padding: 14px;
                margin-bottom: 16px;
            }
            .theory-box {
                padding: 14px;
                margin-bottom: 14px;
            }
            header {
                padding: 8px 16px;
            }
            .header-inner {
                gap: 12px;
            }
        }

        .content-section {
            display: none;
            background: #ffffff;
            padding: clamp(20px, 3vw, 24px);
            border-radius: var(--radius-2xl);
            margin-bottom: var(--space-xl);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            border: 1px solid #e2e8f0;
            min-height: 300px;
        }

        .value-props {
            background: #ffffff;
            border: 1px solid #e5e7eb;
            border-radius: 16px;
            padding: 24px;
            margin-top: 24px;
            box-shadow: var(--shadow-sm);
        }

        .value-props h3 {
            color: #1f2937;
        }

        .section-header {
            margin-bottom: 32px;
        }

        .section-header p {
            color: #475467;
        }

        .compact-step {
            background: #f8fafc;
            color: #1f2937;
            padding: 8px 12px;
            border-radius: 8px;
            font-size: 0.85rem;
            font-weight: 600;
            border: 1px solid #e5e7eb;
            transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base);
        }

        .compact-step.current-step {
            background: #eef2ff;
            color: #312e81;
            border-color: #c7d2fe;
        }

        .compact-step.completed-step {
            background: #e0e7ff;
            color: #1e293b;
            border-color: #c7d2fe;
        }

        .content-section.active {
            display: block;
            animation: fadeInSlide 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        }

        @keyframes fadeInSlide {
            from {
                opacity: 0;
                transform: translateY(24px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        h2 {
            font-family: 'Merriweather', 'Georgia', serif;
            color: var(--primary);
            margin-bottom: var(--space-xl);
            border-bottom: 3px solid var(--primary);
            padding-bottom: var(--space-md);
            font-size: var(--font-2xl);
            font-weight: 700;
            letter-spacing: -0.01em;
            position: relative;
        }

        h2::after {
            content: '';
            position: absolute;
            bottom: -3px;
            left: 0;
            width: 80px;
            height: 3px;
            background: linear-gradient(90deg, var(--secondary), transparent);
        }

        h3 {
            font-family: 'Merriweather', 'Georgia', serif;
            color: var(--text-primary);
            margin-top: var(--space-xl);
            margin-bottom: var(--space-md);
            font-size: var(--font-xl);
            font-weight: 600;
            letter-spacing: -0.01em;
            position: relative;
            padding-left: var(--space-md);
        }

        h3::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0.4em;
            width: 4px;
            height: 1.2em;
            background: linear-gradient(180deg, var(--primary), var(--primary-light));
            border-radius: 2px;
        }

        h4 {
            margin-top: var(--space-lg);
            margin-bottom: var(--space-md);
            color: var(--text-primary);
            font-size: var(--font-lg);
            font-weight: 600;
            position: relative;
            padding-left: 0;
        }

        h4::before {
            content: none;
        }

        h5 {
            margin-top: var(--space-md);
            margin-bottom: var(--space-sm);
            color: var(--text-secondary);
            font-size: var(--font-base);
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            font-size: 0.9rem;
        }

        /* Theory section special heading styles */
        .theory-content-enhanced h3 {
            background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
            padding: var(--space-md) var(--space-lg);
            border-radius: var(--radius-md);
            border-left: 4px solid #0ea5e9;
            margin-top: var(--space-2xl);
        }

        .theory-content-enhanced h3::before {
            display: none;
        }

        .theory-content-enhanced h4 {
            color: #0369a1;
            border-bottom: 2px solid #e0f2fe;
            padding-bottom: var(--space-xs);
        }

        .joke-card {
            background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
            padding: var(--space-2xl);
            border-radius: var(--radius-xl);
            margin: var(--space-xl) 0;
            box-shadow: var(--shadow-lg);
            border-left: 4px solid var(--warning);
            position: relative;
            transition: transform var(--transition-base), box-shadow var(--transition-base);
            overflow: hidden;
        }

        .joke-card::before {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            width: 150px;
            height: 150px;
            background: radial-gradient(circle, rgba(251, 191, 36, 0.15) 0%, transparent 70%);
            border-radius: 50%;
            transform: translate(30%, -30%);
        }

        .joke-card:hover {
            transform: translateY(-4px);
            box-shadow: var(--shadow-xl);
        }

        .joke-text {
            font-size: var(--font-lg);
            line-height: 1.8;
            color: var(--text-primary);
            font-style: italic;
            font-weight: 500;
            position: relative;
            z-index: 1;
        }

        .joke-explanation {
            margin-top: var(--space-xl);
            padding: var(--space-lg);
            background: #ffffff;
            border-radius: var(--radius-lg);
            border: 1px solid #e2e8f0;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
            position: relative;
            z-index: 1;
        }

        /* Enhanced Joke/Humor Example Cards with Clear Visual Hierarchy */
        .joke-example-card {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            border-radius: var(--radius-xl);
            padding: var(--space-xl);
            margin: var(--space-xl) 0;
            box-shadow: var(--shadow-md);
            border-left: 5px solid #f59e0b;
            overflow: hidden;
            position: relative;
        }

        .joke-example-card::before {
            content: '😄';
            position: absolute;
            top: 12px;
            right: 12px;
            font-size: 2rem;
            opacity: 0.3;
        }

        .joke-setup {
            background: #ffffff;
            padding: var(--space-lg);
            border-radius: var(--radius-md);
            margin-bottom: var(--space-md);
            border-left: 3px solid #8b5cf6;
            font-size: var(--font-lg);
            line-height: 1.7;
            color: var(--text-primary);
            font-weight: 500;
            position: relative;
        }

        .joke-setup::before {
            content: '👤 Setup:';
            display: block;
            font-size: var(--font-sm);
            color: #8b5cf6;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: var(--space-sm);
        }

        .joke-punchline {
            background: #f3f4f6;
            padding: var(--space-lg);
            border-radius: var(--radius-md);
            margin-bottom: var(--space-md);
            border-left: 3px solid #10b981;
            font-size: var(--font-lg);
            line-height: 1.7;
            color: var(--text-primary);
            font-weight: 600;
            font-style: italic;
            position: relative;
        }

        .joke-punchline::before {
            content: '💥 Punchline:';
            display: block;
            font-size: var(--font-sm);
            color: #10b981;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: var(--space-sm);
            font-style: normal;
        }

        .joke-explanation-box {
            background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
            padding: var(--space-lg);
            border-radius: var(--radius-md);
            border: 2px solid #60a5fa;
            position: relative;
        }

        .joke-explanation-box::before {
            content: '💡 Pragmatic Analysis:';
            display: block;
            font-size: var(--font-sm);
            color: #2563eb;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: var(--space-sm);
        }

        .joke-explanation-box p {
            color: #1e3a8a;
            line-height: 1.8;
            margin: 0;
        }

        /* Code Examples with Syntax Highlighting */
        .code-example {
            background: #1e293b;
            color: #e2e8f0;
            padding: var(--space-lg);
            border-radius: var(--radius-md);
            margin: var(--space-lg) 0;
            font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
            font-size: 0.9rem;
            line-height: 1.6;
            overflow-x: auto;
            border: 1px solid #334155;
            box-shadow: var(--shadow-md);
            position: relative;
            max-width: 100%;
            box-sizing: border-box;
        }

        .code-example::before {
            content: '💻 Code Example';
            display: block;
            font-size: var(--font-xs);
            color: #94a3b8;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            margin-bottom: var(--space-md);
            padding-bottom: var(--space-sm);
            border-bottom: 1px solid #334155;
            font-family: 'Poppins', sans-serif;
        }

        .code-keyword {
            color: #c792ea;
            font-weight: 600;
        }

        .code-string {
            color: #c3e88d;
        }

        .code-comment {
            color: #546e7a;
            font-style: italic;
        }

        .code-function {
            color: #82aaff;
        }

        /* Visual Section Separators */
        .section-divider {
            height: 2px;
            background: linear-gradient(90deg, transparent 0%, #e5e7eb 20%, #e5e7eb 80%, transparent 100%);
            margin: var(--space-3xl) 0;
            position: relative;
        }

        .section-divider::before {
            content: '';
            position: absolute;
            top: -1px;
            left: 50%;
            transform: translateX(-50%);
            width: 60px;
            height: 4px;
            background: linear-gradient(90deg, #6366f1, #8b5cf6);
            border-radius: 2px;
        }

        .section-divider-subtle {
            height: 1px;
            background: linear-gradient(90deg, transparent 0%, #f3f4f6 15%, #f3f4f6 85%, transparent 100%);
            margin: var(--space-2xl) 0;
        }

        /* Icon-based visual markers */
        .objective-marker::before {
            content: '🎯 ';
            font-size: 1.2em;
            margin-right: 8px;
        }

        .warning-marker::before {
            content: '⚠️ ';
            font-size: 1.2em;
            margin-right: 8px;
        }

        .tip-marker::before {
            content: '💡 ';
            font-size: 1.2em;
            margin-right: 8px;
        }

        .success-marker::before {
            content: '✅ ';
            font-size: 1.2em;
            margin-right: 8px;
        }

        .activity-card {
            background: var(--bg-primary);
            padding: var(--space-xl);
            border-radius: var(--radius-xl);
            margin: var(--space-xl) 0;
            box-shadow: var(--shadow-md);
            border-left: 4px solid var(--primary);
            position: relative;
            transition: all var(--transition-base);
        }

        .activity-card:hover {
            box-shadow: var(--shadow-lg);
            transform: translateX(4px);
        }

        .level-badge {
            display: inline-block;
            padding: var(--space-xs) var(--space-md);
            border-radius: var(--radius-full);
            color: white;
            font-weight: 600;
            margin-bottom: var(--space-md);
            font-size: var(--font-xs);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            box-shadow: var(--shadow-sm);
            transition: transform var(--transition-fast);
        }

        .level-badge:hover {
            transform: scale(1.05);
        }

        .level-a1 { background: linear-gradient(135deg, #10b981, #059669); }
        .level-a2 { background: linear-gradient(135deg, #34d399, #10b981); }
        .level-b1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: var(--text-primary); }
        .level-b2 { background: linear-gradient(135deg, #fb923c, #f97316); }
        .level-c1 { background: linear-gradient(135deg, #f87171, #ef4444); }

        /* Category Badges */
        .category-badge {
            display: inline-block;
            padding: var(--space-xs) var(--space-md);
            border-radius: var(--radius-full);
            color: white;
            font-weight: 600;
            margin-bottom: var(--space-md);
            font-size: var(--font-xs);
            text-transform: capitalize;
            letter-spacing: 0.05em;
            box-shadow: var(--shadow-sm);
            transition: transform var(--transition-fast);
        }

        .category-badge:hover {
            transform: scale(1.05);
        }

        .category-riddle { background: linear-gradient(135deg, #a78bfa, #8b5cf6); }
        .category-pun { background: linear-gradient(135deg, #60a5fa, #3b82f6); }
        .category-dialogue { background: linear-gradient(135deg, #2dd4bf, #14b8a6); }
        .category-anecdote { background: linear-gradient(135deg, #f472b6, #ec4899); }
        .category-cultural { background: linear-gradient(135deg, #818cf8, #6366f1); }

        /* Badge Container */
        .badge-container {
            display: flex;
            gap: var(--space-sm);
            flex-wrap: wrap;
            margin: var(--space-md) 0;
            align-items: center;
        }

        /* Focus Badge for Pragmatic Focus Tags */
        .focus-badge {
            background: linear-gradient(135deg, #a78bfa, #7c3aed);
            color: white;
            padding: var(--space-xs) var(--space-md);
            border-radius: var(--radius-full);
            font-size: var(--font-xs);
            font-weight: 600;
            text-transform: capitalize;
            letter-spacing: 0.05em;
            box-shadow: var(--shadow-sm);
            transition: transform var(--transition-fast);
            display: inline-block;
        }

        .focus-badge:hover {
            transform: scale(1.05);
        }

        .theory-box {
            background: #ffffff;
            padding: 20px;
            border-radius: var(--radius-lg);
            margin: var(--space-lg) 0;
            border: 1px solid #e5e7eb;
            border-left: 4px solid #6366f1;
            box-shadow: var(--shadow-xs);
            transition: box-shadow var(--transition-base), border-color var(--transition-base);
        }

        .theory-box:hover {
            box-shadow: var(--shadow-md);
            border-color: #c7d2fe;
        }

        /* Enhanced Theory Content Styles */
        .theory-content-enhanced .simple-explanation {
            background: #f8fafc;
            border: 1px solid #e5e7eb;
            border-left: 4px solid #6366f1;
            border-radius: 12px;
            padding: 16px;
            margin-bottom: 20px;
            font-size: 1.05rem;
            line-height: 1.65;
            color: #1f2937;
        }

        .theory-content-enhanced .example-box {
            background: #ffffff;
            border: 1px solid #e5e7eb;
            border-left: 4px solid #6366f1;
            border-radius: 12px;
            padding: 20px;
            margin: 20px 0;
            box-shadow: var(--shadow-sm);
        }

        .theory-content-enhanced .example-box strong {
            color: #1f2937;
            font-size: 1.1rem;
            display: block;
            margin-bottom: 12px;
        }

        .theory-content-enhanced .example-box .explanation {
            background: #f8fafc;
            padding: 12px;
            border-radius: 8px;
            margin-top: 12px;
            border-left: 4px solid #c7d2fe;
            font-style: italic;
            color: #1e3a8a;
        }

        /* Key Concept Box - Chunked, Scannable Content */
        .key-concept-box {
            background: linear-gradient(135deg, #fef9c3 0%, #fef08a 100%);
            border: 3px solid #fbbf24;
            border-radius: var(--radius-lg);
            padding: 1.5rem;
            margin: 2rem 0;
            box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
        }

        .key-concept-box h5 {
            color: #78350f;
            font-size: 1.25rem;
            font-weight: 700;
            margin: 0 0 1rem 0;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            border-bottom: 2px solid #fbbf24;
            padding-bottom: 0.75rem;
        }

        .key-concept-box .simple {
            font-size: 1.125rem;
            line-height: 1.7;
            color: #78350f;
            margin: 0 0 1rem 0;
            font-weight: 500;
        }

        .key-concept-box .example {
            background: white;
            border-left: 4px solid #f59e0b;
            border-radius: var(--radius-md);
            padding: 1rem;
            margin-top: 1rem;
            color: #92400e;
        }

        .key-concept-box .example strong {
            color: #78350f;
            display: block;
            margin-bottom: 0.5rem;
            font-size: 0.875rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        /* Section Headings for Theory */
        .theory-content-enhanced h3 {
            color: #1f2937;
            font-size: 1.5rem;
            font-weight: 700;
            margin: 2.5rem 0 1rem 0;
            padding-bottom: 0.5rem;
            border-bottom: 3px solid #e5e7eb;
        }

        .theory-content-enhanced h4 {
            color: #374151;
            font-size: 1.25rem;
            font-weight: 600;
            margin: 2rem 0 0.75rem 0;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .theory-content-enhanced h5 {
            color: #4b5563;
            font-size: 1.125rem;
            font-weight: 600;
            margin: 1.5rem 0 0.5rem 0;
        }

        /* Summary Box */
        .summary-box {
            background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
            border: 2px solid #c084fc;
            border-radius: var(--radius-lg);
            padding: 1.5rem;
            margin: 2rem 0;
        }

        .summary-box h5 {
            color: #581c87;
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .summary-box ul {
            margin: 0;
            padding-left: 1.5rem;
        }

        .summary-box li {
            color: #6b21a8;
            margin-bottom: 0.5rem;
            line-height: 1.6;
        }

        /* Tip Box */
        .tip-box {
            background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
            border: 2px solid #6ee7b7;
            border-radius: var(--radius-lg);
            padding: 1rem 1.25rem;
            margin: 1.5rem 0;
            display: flex;
            gap: 1rem;
            align-items: start;
        }

        .tip-box-icon {
            font-size: 1.5rem;
            flex-shrink: 0;
        }

        .tip-box-content {
            color: #065f46;
            line-height: 1.6;
        }

        .tip-box-content strong {
            color: #047857;
            display: block;
            margin-bottom: 0.25rem;
        }

        /* Skip/Already Know Options */
        .skip-option-container {
            background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
            border: 2px solid #c4b5fd;
            border-radius: var(--radius-lg);
            padding: 1.25rem;
            margin: 1.5rem 0;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            flex-wrap: wrap;
        }

        .skip-option-text {
            color: #5b21b6;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .skip-option-text-icon {
            font-size: 1.25rem;
        }

        .skip-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.625rem 1.25rem;
            background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
            color: white;
            border: none;
            border-radius: var(--radius-md);
            font-weight: 600;
            font-size: 0.9rem;
            cursor: pointer;
            transition: all var(--transition-base);
            box-shadow: var(--shadow-sm);
        }

        .skip-btn:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        .skip-btn:active {
            transform: translateY(0);
        }

        .skip-btn.secondary {
            background: white;
            color: #7c3aed;
            border: 2px solid #c4b5fd;
        }

        .skip-btn.secondary:hover {
            background: #faf5ff;
            border-color: #a78bfa;
        }

        /* Skip Confirmation Banner */
        .skip-confirmation {
            background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
            border: 2px solid #60a5fa;
            border-radius: var(--radius-md);
            padding: 1rem;
            margin: 1rem 0;
            display: none;
            align-items: center;
            gap: 0.75rem;
        }

        .skip-confirmation.show {
            display: flex;
            animation: slideDown 0.3s ease-out;
        }

        .skip-confirmation-icon {
            font-size: 1.5rem;
        }

        .skip-confirmation-text {
            flex: 1;
            color: #1e40af;
            font-weight: 500;
        }

        /* Spaced Repetition Review Reminders */
        .review-reminder-container {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            border: 3px solid #f59e0b;
            border-radius: var(--radius-xl);
            padding: 1.5rem;
            margin: 1.5rem 0;
            box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25);
            animation: gentle-pulse 3s ease-in-out infinite;
        }

        @keyframes gentle-pulse {
            0%, 100% { transform: scale(1); box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25); }
            50% { transform: scale(1.01); box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35); }
        }

        .review-reminder-header {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 1rem;
        }

        .review-reminder-icon {
            font-size: 2rem;
        }

        .review-reminder-title {
            flex: 1;
            color: #78350f;
            font-size: 1.25rem;
            font-weight: 700;
        }

        .review-reminder-badge {
            background: white;
            color: #d97706;
            padding: 0.375rem 0.75rem;
            border-radius: var(--radius-full);
            font-size: 0.75rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            border: 2px solid #f59e0b;
        }

        .review-reminder-content {
            color: #92400e;
            margin-bottom: 1rem;
            line-height: 1.6;
        }

        .review-reminder-content strong {
            color: #78350f;
        }

        .review-reminder-stats {
            display: flex;
            gap: 1rem;
            margin-bottom: 1rem;
            flex-wrap: wrap;
        }

        .review-stat {
            background: white;
            padding: 0.75rem 1rem;
            border-radius: var(--radius-md);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.25rem;
            flex: 1;
            min-width: 100px;
        }

        .review-stat-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: #d97706;
        }

        .review-stat-label {
            font-size: 0.75rem;
            color: #92400e;
            text-align: center;
        }

        .review-reminder-actions {
            display: flex;
            gap: 0.75rem;
            flex-wrap: wrap;
        }

        .review-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem 1.5rem;
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            color: white;
            border: none;
            border-radius: var(--radius-lg);
            font-weight: 700;
            font-size: 1rem;
            cursor: pointer;
            transition: all var(--transition-base);
            box-shadow: var(--shadow-md);
        }

        .review-btn:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-xl);
        }

        .review-btn.secondary {
            background: white;
            color: #d97706;
            border: 2px solid #f59e0b;
        }

        .review-btn.secondary:hover {
            background: #fef3c7;
        }

        /* Quick Review Modal */
        .quick-review-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.75);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: var(--z-modal);
            padding: 1rem;
        }

        .quick-review-modal.show {
            display: flex;
            animation: fadeIn 0.3s ease;
        }

        .quick-review-content {
            background: white;
            border-radius: var(--radius-xl);
            max-width: 600px;
            width: 100%;
            max-width: min(600px, calc(100% - 24px));
            max-height: 80vh;
            overflow-y: auto;
            box-shadow: var(--shadow-2xl);
            overflow-x: hidden;
            box-sizing: border-box;
        }

        .quick-review-header {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            padding: 1.5rem;
            border-radius: var(--radius-xl) var(--radius-xl) 0 0;
            border-bottom: 2px solid #f59e0b;
            position: relative;
        }

        .quick-review-header h3 {
            color: #78350f;
            margin: 0;
            font-size: 1.5rem;
        }

        .quick-review-body {
            padding: 1.5rem;
        }

        .review-keypoint {
            background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
            border-left: 4px solid #10b981;
            border-radius: var(--radius-md);
            padding: 1rem;
            margin-bottom: 1rem;
            display: flex;
            gap: 1rem;
            align-items: flex-start;
        }

        .review-keypoint-number {
            background: #10b981;
            color: white;
            width: 2rem;
            height: 2rem;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            flex-shrink: 0;
        }

        .review-keypoint-content {
            flex: 1;
        }

        .review-keypoint-title {
            color: #065f46;
            font-weight: 700;
            font-size: 1rem;
            margin-bottom: 0.5rem;
        }

        .review-keypoint-description {
            color: #047857;
            line-height: 1.6;
        }

        .review-keypoint h5 {
            color: #065f46;
            margin: 0 0 0.5rem 0;
            font-size: 1rem;
        }

        .review-keypoint p {
            color: #047857;
            margin: 0;
            line-height: 1.6;
        }

        .quick-review-intro {
            padding: 1.5rem;
            background: #fef9c3;
            border-bottom: 2px solid #fde68a;
        }

        .quick-review-intro p {
            margin: 0;
            color: #78350f;
            font-size: 1rem;
        }

        .quick-review-keypoints {
            padding: 1.5rem;
        }

        .quick-review-actions {
            padding: 1.5rem;
            background: #f9fafb;
            border-top: 2px solid #e5e7eb;
            display: flex;
            gap: 0.75rem;
            flex-wrap: wrap;
        }

        .quick-review-close {
            position: absolute;
            top: 1rem;
            right: 1rem;
            background: white;
            color: #78350f;
            border: 2px solid #f59e0b;
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 50%;
            font-size: 1.5rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all var(--transition-base);
        }

        .quick-review-close:hover {
            background: #fef3c7;
            transform: rotate(90deg);
        }

        .review-action-btn {
            flex: 1;
            padding: 0.875rem 1.5rem;
            border: none;
            border-radius: var(--radius-lg);
            font-weight: 700;
            font-size: 1rem;
            cursor: pointer;
            transition: all var(--transition-base);
            min-width: 200px;
        }

        .review-action-btn.primary {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: white;
            box-shadow: var(--shadow-md);
        }

        .review-action-btn.primary:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-xl);
        }

        .review-action-btn.secondary {
            background: white;
            color: #6366f1;
            border: 2px solid #6366f1;
        }

        .review-action-btn.secondary:hover {
            background: #eef2ff;
        }

        .review-reminder-message {
            color: #92400e;
            font-size: 1.05rem;
            line-height: 1.6;
            margin-bottom: 1rem;
        }

        .review-stat-item {
            background: white;
            padding: 0.75rem 1rem;
            border-radius: var(--radius-md);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.25rem;
            flex: 1;
            min-width: 100px;
        }

        .review-btn.primary {
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex: 1;
        }

        .theory-content-enhanced .expandable-detail {
            background: #f9fafb;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            padding: 16px;
            margin-top: 12px;
            display: none;
        }

        .theory-content-enhanced .expandable-detail.open {
            display: block;
            animation: fadeIn 0.3s ease;
        }

        .theory-content-enhanced .expand-btn {
            background: #6366f1;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            font-size: 0.9rem;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            margin: 12px 0;
        }

        .theory-content-enhanced .expand-btn:hover {
            background: #4f46e5;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
        }

        .theory-content-enhanced blockquote {
            background: #fefce8;
            border-left: 4px solid #eab308;
            padding: 16px;
            margin: 16px 0;
            border-radius: 8px;
            font-style: italic;
            color: #713f12;
        }

        .theory-content-enhanced ul, .theory-content-enhanced ol {
            line-height: 1.8;
            margin: 12px 0;
        }

        .theory-content-enhanced ul li, .theory-content-enhanced ol li {
            margin-bottom: 8px;
        }

        /* Cognitive Load Reduction Styles */
        .theory-content-enhanced p {
            margin-bottom: 1rem;
            line-height: 1.8;
            max-width: 65ch; /* Optimal reading line length */
        }

        .theory-content-enhanced .short-paragraph {
            margin-bottom: 1.25rem;
            font-size: 1.05rem;
            line-height: 1.7;
        }

        .theory-content-enhanced .breathing-space {
            height: 2rem;
            display: block;
        }

        .theory-content-enhanced .visual-break {
            width: 100%;
            height: 2px;
            background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
            margin: 2rem 0;
        }

        /* Comprehension Check Component */
        .comprehension-check {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            border: 2px solid #f59e0b;
            border-radius: var(--radius-lg);
            padding: 1.5rem;
            margin: 2rem 0;
            box-shadow: var(--shadow-md);
        }

        .comprehension-check-header {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 1rem;
            font-weight: 700;
            font-size: 1.1rem;
            color: #78350f;
        }

        .comprehension-check-icon {
            font-size: 1.5rem;
        }

        .comprehension-check-question {
            background: white;
            padding: 1rem;
            border-radius: var(--radius-md);
            margin-bottom: 1rem;
            color: #374151;
            font-weight: 500;
        }

        .comprehension-check-options {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }

        .comprehension-check-option {
            background: white;
            border: 2px solid #e5e7eb;
            border-radius: var(--radius-md);
            padding: 0.875rem 1rem;
            cursor: pointer;
            transition: all var(--transition-base);
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .comprehension-check-option:hover {
            border-color: #f59e0b;
            background: #fefce8;
            transform: translateX(4px);
        }

        .comprehension-check-option input[type="radio"] {
            width: 20px;
            height: 20px;
            cursor: pointer;
            accent-color: #f59e0b;
        }

        .comprehension-check-option.selected {
            border-color: #f59e0b;
            background: #fef3c7;
        }

        .comprehension-check-option.correct {
            border-color: #10b981;
            background: #d1fae5;
        }

        .comprehension-check-option.incorrect {
            border-color: #ef4444;
            background: #fee2e2;
        }

        .comprehension-check-feedback {
            background: white;
            border-radius: var(--radius-md);
            padding: 1rem;
            margin-top: 1rem;
            display: none;
        }

        .comprehension-check-feedback.show {
            display: block;
            animation: slideDown 0.3s ease-out;
        }

        .comprehension-check-feedback.correct {
            border-left: 4px solid #10b981;
            color: #065f46;
        }

        .comprehension-check-feedback.incorrect {
            border-left: 4px solid #f59e0b;
            color: #78350f;
        }

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

        .filter-buttons {
            display: flex;
            gap: var(--space-sm);
            margin: var(--space-xl) 0;
            flex-wrap: wrap;
        }

        .filter-btn {
            padding: var(--space-sm) var(--space-lg);
            border: 2px solid var(--primary);
            background: var(--bg-primary);
            color: var(--primary);
            border-radius: var(--radius-full);
            cursor: pointer;
            transition: all var(--transition-base);
            font-size: var(--font-sm);
            font-weight: 500;
            box-shadow: var(--shadow-xs);
        }

        .filter-btn:hover {
            background: var(--primary-light);
            border-color: var(--primary-light);
            color: white;
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        .filter-btn:focus {
            outline: 3px solid rgba(99, 102, 241, 0.3);
            outline-offset: 2px;
        }

        .filter-btn.active {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
            box-shadow: var(--shadow-sm);
        }

        ul, ol {
            margin-left: var(--space-xl);
            margin-top: var(--space-md);
        }

        li {
            margin-bottom: var(--space-md);
            line-height: 1.7;
            color: var(--text-secondary);
        }

        strong {
            color: var(--text-primary);
            font-weight: 600;
        }

        .quiz-container {
            background: var(--bg-primary);
            padding: var(--space-xl);
            border-radius: var(--radius-xl);
            margin: var(--space-xl) 0;
            box-shadow: var(--shadow-md);
            border: 1px solid var(--border);
            transition: box-shadow var(--transition-base);
        }

        .quiz-container:hover {
            box-shadow: var(--shadow-lg);
        }

        .quiz-question {
            font-size: var(--font-lg);
            margin-bottom: var(--space-xl);
            font-weight: 600;
            color: var(--text-primary);
            line-height: 1.6;
        }

        .quiz-options {
            display: flex;
            flex-direction: column;
            gap: var(--space-md);
            margin: var(--space-lg) 0;
        }

        .quiz-option {
            background: var(--bg-secondary);
            padding: var(--space-lg);
            min-height: 64px;
            border-radius: var(--radius-xl);
            cursor: pointer;
            border: 2px solid transparent;
            transition: all var(--transition-base);
            font-size: var(--font-base);
            line-height: 1.6;
            display: flex;
            align-items: center;
            width: 100%;
            box-shadow: var(--shadow-xs);
        }

        .quiz-option input {
            display: none;
        }

        .quiz-option span {
            display: block;
            width: 100%;
        }

        .quiz-option:hover {
            background: var(--bg-tertiary);
            border-color: var(--primary);
            transform: translateY(-2px);
            box-shadow: var(--shadow-sm);
        }

        .quiz-option.selected {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
            box-shadow: var(--shadow-md);
        }

        /* Placement quiz cards - enforce large tappable boxes */
        /* Placement test: boxed clickable options */
        .placement-options {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-top: 16px;
        }

        .placement-option {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            padding: 16px 18px;
            border: 2px solid #e5e7eb;
            border-radius: 14px;
            background: #f9fafb;
            cursor: pointer;
            transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
            width: 100%;
        }

        .placement-option:hover {
            background: #f3f4f6;
            border-color: #6366f1;
            transform: translateY(-1px);
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
        }

        .placement-option input[type="radio"] {
            width: 20px;
            height: 20px;
            margin-top: 2px;
            flex: 0 0 auto;
            accent-color: #6366f1;
        }

        .placement-option span {
            display: block;
            line-height: 1.6;
            font-size: 16px;
            color: #111827;
            flex: 1;
        }

        .placement-option.selected {
            background: #eef2ff;
            border-color: #6366f1;
            box-shadow: 0 10px 24px rgba(99, 102, 241, 0.18);
        }

        .quiz-option.correct {
            background: var(--success);
            color: white;
            border-color: var(--success);
            box-shadow: var(--shadow-md);
        }

        .quiz-option.incorrect {
            background: var(--danger);
            color: white;
            border-color: var(--danger);
            box-shadow: var(--shadow-md);
        }

        .quiz-feedback {
            margin-top: var(--space-lg);
            padding: var(--space-lg);
            border-radius: var(--radius-lg);
            background: #dbeafe;
            display: none;
            border-left: 4px solid #3b82f6;
            animation: slideDown 0.3s ease-out;
        }

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

        .quiz-feedback.show { display: block; }

        /* Enhanced Quiz Feedback Elements */
        .feedback-correct-answer {
            background: white;
            padding: 1rem;
            border-radius: var(--radius-md);
            margin-top: 0.75rem;
            border-left: 4px solid #10b981;
        }

        .feedback-correct-answer-label {
            font-weight: 700;
            color: #059669;
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .feedback-correct-answer-text {
            color: #065f46;
            line-height: 1.6;
        }

        .feedback-key-concept {
            background: #fef3c7;
            padding: 1rem;
            border-radius: var(--radius-md);
            margin-top: 0.75rem;
            border-left: 4px solid #f59e0b;
        }

        .feedback-key-concept-label {
            font-weight: 700;
            color: #d97706;
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .feedback-key-concept-text {
            color: #78350f;
            line-height: 1.6;
        }

        .feedback-review-link {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
            color: white;
            padding: 0.625rem 1.25rem;
            border-radius: var(--radius-md);
            text-decoration: none;
            font-weight: 600;
            font-size: 0.875rem;
            margin-top: 0.75rem;
            transition: all var(--transition-base);
            box-shadow: var(--shadow-sm);
            border: none;
            cursor: pointer;
        }

        .feedback-review-link:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        .feedback-review-link:active {
            transform: translateY(0);
        }

        .quiz-result-box {
            background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
            border-radius: var(--radius-lg);
            padding: var(--space-xl);
            margin-top: var(--space-xl);
            font-weight: 600;
            text-align: center;
            box-shadow: var(--shadow-sm);
            border: 1px solid #93c5fd;
        }

        .progress-bar {
            width: 100%;
            height: 12px;
            background: var(--bg-tertiary);
            border-radius: var(--radius-full);
            overflow: hidden;
            margin: var(--space-lg) 0;
            box-shadow: var(--shadow-inner);
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--primary), var(--secondary));
            transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            align-items: center;
            justify-content: flex-end;
            padding-right: var(--space-sm);
            color: white;
            font-weight: 600;
            font-size: var(--font-xs);
            position: relative;
            box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
        }

        .progress-fill::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            animation: shimmer 2s infinite;
        }

        @keyframes shimmer {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: var(--space-xl);
            margin: var(--space-xl) 0;
        }

        .stat-card {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            color: white;
            padding: var(--space-xl);
            border-radius: var(--radius-xl);
            text-align: center;
            box-shadow: var(--shadow-lg);
            transition: transform var(--transition-base), box-shadow var(--transition-base);
            position: relative;
            overflow: hidden;
        }

        .stat-card::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
            transition: transform var(--transition-slow);
        }

        .stat-card:hover {
            transform: translateY(-4px);
            box-shadow: var(--shadow-xl);
        }

        .stat-card:hover::before {
            transform: translate(-25%, -25%);
        }

        .stat-number {
            font-size: var(--font-4xl);
            font-weight: 700;
            margin: var(--space-md) 0;
            position: relative;
            z-index: 1;
        }

        .stat-label {
            font-size: var(--font-sm);
            opacity: 0.95;
            font-weight: 500;
            letter-spacing: 0.02em;
            position: relative;
            z-index: 1;
        }

        .achievement-badge {
            display: inline-block;
            background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
            color: var(--text-primary);
            padding: var(--space-md) var(--space-xl);
            border-radius: var(--radius-full);
            margin: var(--space-md);
            font-weight: 700;
            box-shadow: var(--shadow-lg), 0 0 20px rgba(251, 191, 36, 0.4);
            transition: all var(--transition-bounce);
            font-size: var(--font-sm);
            border: 2px solid rgba(255, 255, 255, 0.5);
        }

        .achievement-badge:hover {
            transform: scale(1.1) rotate(5deg);
            box-shadow: var(--shadow-xl), 0 0 30px rgba(251, 191, 36, 0.6);
        }

        /* Benchmarking Feature Styles */
        .benchmark-container {
            background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
            border: 2px solid #7dd3fc;
            border-radius: var(--radius-lg);
            padding: var(--space-xl);
            margin: var(--space-xl) 0;
            box-shadow: var(--shadow-md);
        }

        .benchmark-header {
            text-align: center;
            margin-bottom: var(--space-lg);
        }

        .benchmark-title {
            font-size: var(--font-2xl);
            font-weight: 700;
            color: #0c4a6e;
            margin-bottom: var(--space-sm);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: var(--space-sm);
        }

        .benchmark-subtitle {
            font-size: var(--font-base);
            color: #0369a1;
        }

        .benchmark-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: var(--space-lg);
            margin: var(--space-lg) 0;
        }

        .benchmark-stat {
            background: white;
            border-radius: var(--radius-md);
            padding: var(--space-lg);
            text-align: center;
            box-shadow: var(--shadow-sm);
            transition: transform var(--transition-base);
        }

        .benchmark-stat:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        .benchmark-stat-value {
            font-size: var(--font-4xl);
            font-weight: 700;
            color: var(--primary);
            margin: var(--space-sm) 0;
        }

        .benchmark-stat-label {
            font-size: var(--font-sm);
            color: var(--text-secondary);
            font-weight: 500;
        }

        .benchmark-message {
            background: white;
            border-left: 4px solid var(--success);
            border-radius: var(--radius-md);
            padding: var(--space-lg);
            margin-top: var(--space-lg);
        }

        .benchmark-message strong {
            color: var(--success);
            font-size: var(--font-lg);
        }

        /* Enhanced Reflection Section Styles */
        .reflection-section {
            max-width: 700px;
            margin: 0 auto;
        }

        .reflection-intro {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            border: 2px solid #fbbf24;
            border-radius: var(--radius-lg);
            padding: var(--space-lg);
            margin-bottom: var(--space-xl);
            display: flex;
            gap: var(--space-md);
            align-items: start;
        }

        .reflection-intro-icon {
            font-size: 2.5rem;
        }

        .reflection-intro-content {
            flex: 1;
        }

        .reflection-intro-content h4 {
            color: #78350f;
            margin-bottom: var(--space-sm);
        }

        .reflection-intro-content p {
            color: #78350f;
            font-size: var(--font-sm);
            line-height: 1.6;
        }

        .reflection-prompt {
            background: white;
            border: 2px solid #e0e7ff;
            border-radius: var(--radius-lg);
            padding: var(--space-xl);
            margin-bottom: var(--space-lg);
            box-shadow: var(--shadow-sm);
            transition: all var(--transition-base);
        }

        .reflection-prompt:focus-within {
            border-color: var(--primary);
            box-shadow: var(--shadow-md), 0 0 0 3px rgba(99, 102, 241, 0.1);
        }

        .reflection-prompt h4 {
            color: var(--text-primary);
            font-size: var(--font-lg);
            margin-bottom: var(--space-md);
            display: flex;
            align-items: center;
            gap: var(--space-sm);
        }

        .reflection-prompt textarea {
            width: 100%;
            min-height: 120px;
            padding: var(--space-md);
            border: 2px solid #e5e7eb;
            border-radius: var(--radius-md);
            font-family: inherit;
            font-size: var(--font-base);
            line-height: 1.6;
            resize: vertical;
            transition: all var(--transition-base);
        }

        .reflection-prompt textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
        }

        .reflection-prompt textarea::placeholder {
            color: #9ca3af;
            font-style: italic;
        }

        .reflection-checkboxes {
            display: flex;
            flex-direction: column;
            gap: var(--space-md);
        }

        .reflection-checkboxes label {
            display: flex;
            align-items: center;
            gap: var(--space-sm);
            padding: var(--space-md);
            background: #f9fafb;
            border: 2px solid #e5e7eb;
            border-radius: var(--radius-md);
            cursor: pointer;
            transition: all var(--transition-base);
            font-size: var(--font-base);
        }

        .reflection-checkboxes label:hover {
            background: #f3f4f6;
            border-color: var(--primary-light);
        }

        .reflection-checkboxes input[type="checkbox"] {
            width: 20px;
            height: 20px;
            cursor: pointer;
            accent-color: var(--primary);
        }

        .reflection-checkboxes input[type="checkbox"]:checked + label {
            background: #eef2ff;
            border-color: var(--primary);
        }

        .action-plan {
            background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
            border: 2px solid #86efac;
            border-radius: var(--radius-lg);
            padding: var(--space-xl);
            margin-top: var(--space-xl);
        }

        .action-plan h4 {
            color: #065f46;
            margin-bottom: var(--space-md);
            font-size: var(--font-xl);
        }

        .action-plan input[type="text"] {
            width: 100%;
            padding: var(--space-md);
            border: 2px solid #86efac;
            border-radius: var(--radius-md);
            font-family: inherit;
            font-size: var(--font-base);
            margin-bottom: var(--space-md);
            transition: all var(--transition-base);
        }

        .action-plan input[type="text"]:focus {
            outline: none;
            border-color: var(--success);
            box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
        }

        .action-plan button {
            background: linear-gradient(135deg, var(--success), #059669);
            color: white;
            border: none;
            padding: var(--space-md) var(--space-xl);
            border-radius: var(--radius-md);
            font-size: var(--font-base);
            font-weight: 600;
            cursor: pointer;
            transition: all var(--transition-base);
            box-shadow: var(--shadow-sm);
        }

        .action-plan button:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        .action-plan button:active {
            transform: translateY(0);
        }

        .audio-btn, .print-btn {
            color: white;
            border: none;
            padding: var(--space-sm) var(--space-lg);
            border-radius: var(--radius-full);
            cursor: pointer;
            font-size: var(--font-sm);
            margin: var(--space-md) var(--space-md) 0 0;
            transition: all var(--transition-base);
            font-weight: 500;
            box-shadow: var(--shadow-sm);
        }

        .audio-btn {
            background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
        }

        .print-btn {
            background: linear-gradient(135deg, var(--success), #059669);
            padding: var(--space-md) var(--space-xl);
            font-size: var(--font-base);
        }

        .audio-btn:hover {
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        .print-btn:hover {
            background: linear-gradient(135deg, var(--success-light), var(--success));
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        .audio-btn:active,
        .print-btn:active {
            transform: translateY(0);
            box-shadow: var(--shadow-xs);
        }

        .checkbox-container {
            margin: var(--space-lg) 0;
            display: flex;
            align-items: center;
        }

        .checkbox-container input[type="checkbox"] {
            width: 20px;
            height: 20px;
            margin-right: var(--space-md);
            cursor: pointer;
            accent-color: var(--primary);
            transition: transform var(--transition-fast);
        }

        .checkbox-container input[type="checkbox"]:hover {
            transform: scale(1.1);
        }

        .checkbox-container label {
            cursor: pointer;
            font-size: var(--font-base);
            color: var(--text-secondary);
            transition: color var(--transition-fast);
            user-select: none;
        }

        .checkbox-container:hover label {
            color: var(--text-primary);
        }

        .completed-activity {
            opacity: 0.85;
            position: relative;
            background: var(--bg-secondary);
        }

        .completed-activity::after {
            content: "✓ Completed";
            position: absolute;
            top: var(--space-md);
            right: var(--space-md);
            background: linear-gradient(135deg, var(--success), #059669);
            color: white;
            padding: var(--space-xs) var(--space-md);
            border-radius: var(--radius-full);
            font-size: var(--font-xs);
            font-weight: 600;
            box-shadow: var(--shadow-sm);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .search-container {
            margin: var(--space-xl) 0;
        }

        .search-input {
            width: 100%;
            padding: var(--space-lg);
            border: 2px solid var(--border);
            border-radius: var(--radius-full);
            font-size: var(--font-base);
            transition: all var(--transition-base);
            background: var(--bg-primary);
            color: var(--text-primary);
            font-family: inherit;
        }

        /* Remove outline only for mouse clicks, not keyboard navigation */
        .search-input:focus:not(:focus-visible) {
            outline: none;
        }

        .search-input:hover {
            border-color: var(--primary-light);
        }

        .search-input:focus {
            box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
            border-color: var(--primary);
        }

        .search-input::placeholder {
            color: var(--text-tertiary);
        }

        .difficulty-stars {
            color: var(--warning);
            margin: var(--space-md) 0;
            font-size: var(--font-lg);
        }

        .notes-section {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            padding: var(--space-lg);
            border-radius: var(--radius-lg);
            margin-top: var(--space-lg);
            border-left: 4px solid var(--warning);
            box-shadow: var(--shadow-sm);
        }

        .notes-textarea {
            width: 100%;
            min-height: 100px;
            padding: var(--space-md);
            border: 2px solid var(--border);
            border-radius: var(--radius-md);
            font-family: inherit;
            font-size: var(--font-base);
            resize: vertical;
            transition: all var(--transition-base);
            background: var(--bg-primary);
            color: var(--text-primary);
            line-height: 1.6;
        }

        .notes-textarea:hover {
            border-color: var(--primary-light);
        }

        /* Remove outline only for mouse clicks, not keyboard navigation */
        .notes-textarea:focus:not(:focus-visible) {
            outline: none;
        }

        .notes-textarea:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
        }

        .notes-textarea::placeholder {
            color: var(--text-tertiary);
        }

        .favorite-btn {
            background: transparent;
            border: 2px solid var(--danger);
            color: var(--danger);
            padding: var(--space-sm) var(--space-lg);
            border-radius: var(--radius-full);
            cursor: pointer;
            transition: all var(--transition-base);
            margin-left: var(--space-md);
            font-weight: 500;
            font-size: var(--font-sm);
        }

        .favorite-btn:hover {
            background: var(--danger-light);
            border-color: var(--danger-light);
            color: white;
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        .favorite-btn.favorited {
            background: var(--danger);
            color: white;
            border-color: var(--danger);
        }

        .favorite-btn:active {
            transform: translateY(0);
        }

        .filter-tags {
            display: flex;
            gap: var(--space-sm);
            flex-wrap: wrap;
            margin: var(--space-md) 0;
        }

        .tag {
            background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
            color: #1e40af;
            padding: var(--space-xs) var(--space-md);
            border-radius: var(--radius-full);
            font-size: var(--font-xs);
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            box-shadow: var(--shadow-xs);
            transition: transform var(--transition-fast);
        }

        .tag:hover {
            transform: translateY(-2px);
        }

        .joke-favorite {
            position: absolute;
            top: var(--space-lg);
            right: var(--space-lg);
            font-size: var(--font-3xl);
            cursor: pointer;
            transition: all var(--transition-base);
            background: #ffffff;
            border: 1px solid #e2e8f0;
            padding: var(--space-sm);
            border-radius: var(--radius-full);
            width: 48px;
            height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
            z-index: var(--z-dropdown);
        }

        .joke-favorite:hover {
            transform: scale(1.15) rotate(15deg);
            box-shadow: var(--shadow-lg);
        }

        .joke-favorite:active {
            transform: scale(1.05);
        }

        .no-results {
            text-align: center;
            padding: var(--space-3xl);
            color: var(--text-secondary);
            font-size: var(--font-lg);
            font-weight: 500;
        }

        .teacher-block {
            background: var(--bg-primary);
            border-radius: var(--radius-xl);
            border-left: 4px solid var(--secondary);
            box-shadow: var(--shadow-md);
            padding: var(--space-xl);
            margin-bottom: var(--space-xl);
            transition: all var(--transition-base);
        }

        .teacher-block:hover {
            box-shadow: var(--shadow-lg);
            transform: translateY(-2px);
        }

        .teacher-block h3 {
            margin-top: 0;
            color: var(--secondary);
        }

        .rubric-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: var(--space-md);
            font-size: var(--font-sm);
            border-radius: var(--radius-lg);
            overflow: hidden;
            box-shadow: var(--shadow-sm);
        }

        .rubric-table th {
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            color: white;
            padding: var(--space-md);
            text-align: left;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            font-size: var(--font-xs);
        }

        .rubric-table td {
            background: var(--bg-secondary);
            border-bottom: 2px solid white;
            padding: var(--space-md);
            color: var(--text-secondary);
            line-height: 1.6;
        }

        .rubric-table tr:last-child td {
            border-bottom: none;
        }

        .rubric-table tr:hover td {
            background: var(--bg-tertiary);
        }

        .accordion-item {
            border: 2px solid var(--border);
            border-radius: var(--radius-lg);
            margin-bottom: var(--space-md);
            background: var(--bg-primary);
            overflow: hidden;
            transition: all var(--transition-base);
            box-shadow: var(--shadow-xs);
        }

        .accordion-item:hover {
            border-color: var(--primary-light);
            box-shadow: var(--shadow-sm);
        }

        .accordion-header {
            width: 100%;
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: white;
            border: none;
            text-align: left;
            padding: var(--space-md) var(--space-lg);
            font-size: var(--font-base);
            font-weight: 600;
            display: flex;
            justify-content: space-between;
            cursor: pointer;
            transition: all var(--transition-base);
        }

        .accordion-header:hover {
            background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
        }

        .accordion-body {
            display: none;
            padding: var(--space-lg);
            font-size: var(--font-sm);
            color: var(--text-secondary);
            line-height: 1.7;
            background: var(--bg-secondary);
        }

        .accordion-body.open {
            display: block;
            animation: accordionSlide 0.3s ease-out;
        }

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

        /* Onboarding Modal */
        .modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            z-index: var(--z-modal);
            justify-content: center;
            align-items: center;
            padding: var(--space-lg);
        }

        .modal-overlay.show {
            display: flex;
            animation: fadeIn 0.3s ease-out;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .modal {
            background: var(--bg-primary);
            padding: var(--space-3xl);
            border-radius: var(--radius-2xl);
            max-width: 600px;
            width: 100%;
            max-width: min(600px, calc(100% - 24px));
            max-height: 85vh;
            overflow-y: auto;
            overflow-x: hidden;
            box-shadow: var(--shadow-2xl);
            animation: modalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            border: 1px solid rgba(255, 255, 255, 0.18);
            box-sizing: border-box;
        }

        @keyframes modalSlideUp {
            from {
                transform: translateY(50px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        .modal h2 {
            margin-bottom: var(--space-xl);
            color: var(--primary);
        }

        .modal-step {
            display: none;
        }

        .modal-step.active {
            display: block;
            animation: fadeInSlide 0.4s ease-out;
        }

        .step-indicator {
            display: flex;
            justify-content: center;
            gap: var(--space-md);
            margin: var(--space-xl) 0;
        }

        .step-dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: var(--border);
            transition: all var(--transition-base);
            cursor: pointer;
        }

        .step-dot:hover {
            background: var(--primary-light);
        }

        .step-dot.active {
            background: var(--primary);
            transform: scale(1.4);
            box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
        }

        .pathway-card {
            background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
            padding: var(--space-xl);
            border-radius: var(--radius-xl);
            margin: var(--space-lg) 0;
            border-left: 4px solid var(--primary);
            cursor: pointer;
            transition: all var(--transition-base);
            box-shadow: var(--shadow-sm);
        }

        .pathway-card:hover {
            transform: translateX(8px);
            box-shadow: var(--shadow-lg);
            border-left-width: 6px;
        }

        .pathway-card h3,
        .pathway-card h4 {
            color: var(--primary);
            margin-bottom: var(--space-sm);
        }

        .pathway-card p {
            color: var(--text-secondary);
            line-height: 1.6;
        }

        /* Onboarding Modal Content Styles */
        .modal-skip-btn {
            position: absolute;
            top: 20px;
            right: 20px;
            background: transparent;
            border: none;
            color: #999;
            cursor: pointer;
            font-size: 14px;
            padding: 8px 16px;
            border-radius: 20px;
            transition: all 0.2s;
        }

        .modal-skip-btn:hover {
            background: #f3f4f6;
            color: #333;
        }

        .modal-header {
            text-align: center;
            margin-bottom: 24px;
        }

        .modal-emoji-large {
            font-size: 64px;
            margin-bottom: 16px;
        }

        .modal-emoji-medium {
            font-size: 48px;
            margin-bottom: 12px;
        }

        .modal-emoji-small {
            font-size: 40px;
            flex-shrink: 0;
        }

        .modal-emoji-icon {
            font-size: 32px;
            margin-bottom: 8px;
        }

        .modal-emoji-feature {
            font-size: 24px;
        }

        .modal-emoji-tour {
            background: white;
            padding: 8px;
            border-radius: 8px;
            font-size: 20px;
            display: inline-block;
        }

        .modal-title {
            margin-bottom: 12px;
        }

        .modal-subtitle {
            font-size: 16px;
            color: #6b7280;
            max-width: 480px;
            margin: 0 auto;
        }

        .modal-subtitle-small {
            font-size: 15px;
            color: #6b7280;
        }

        .modal-example-box {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            padding: 24px;
            border-radius: 16px;
            margin: 24px 0;
            border-left: 4px solid #f59e0b;
        }

        .modal-example-title {
            margin: 0 0 12px 0;
            color: #92400e;
        }

        .modal-example-joke {
            font-style: italic;
            color: #1f2937;
            margin-bottom: 12px;
        }

        .modal-example-explanation {
            font-size: 14px;
            color: #6b7280;
            line-height: 1.6;
        }

        .modal-features-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 16px;
            margin: 24px 0;
        }

        .modal-feature-card {
            background: #f9fafb;
            padding: 20px;
            border-radius: 12px;
            text-align: center;
        }

        .modal-feature-title {
            font-weight: 600;
            margin-bottom: 4px;
            color: #1f2937;
        }

        .modal-feature-desc {
            font-size: 13px;
            color: #6b7280;
        }

        .modal-footer {
            text-align: center;
            margin-top: 32px;
        }

        .modal-footer-compact {
            text-align: center;
            margin-top: 24px;
            display: flex;
            gap: 12px;
            justify-content: center;
        }

        .modal-btn-large {
            padding: 14px 32px;
            font-size: 16px;
        }

        .modal-btn-xl {
            padding: 14px 40px;
            font-size: 16px;
            background: linear-gradient(135deg, #10b981, #059669);
        }

        .modal-btn-back {
            background: #e5e7eb;
            color: #374151;
        }

        .modal-caption {
            margin-top: 12px;
            font-size: 13px;
            color: #9ca3af;
        }

        .modal-step-indicator {
            margin: 8px 0;
            font-size: 13px;
            color: #9ca3af;
            align-self: center;
        }

        .modal-path-content {
            display: flex;
            align-items: start;
            gap: 16px;
        }

        .modal-path-text {
            flex: 1;
        }

        .modal-path-title {
            margin: 0 0 8px 0;
            font-size: 20px;
        }

        .modal-path-desc {
            margin: 0 0 12px 0;
            color: #6b7280;
            font-size: 14px;
        }

        .modal-tags {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            margin-top: 12px;
        }

        .modal-tag-blue {
            background: #dbeafe;
            color: #1e40af;
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 12px;
        }

        .modal-tag-yellow {
            background: #fef3c7;
            color: #92400e;
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 12px;
        }

        .modal-tag-pink {
            background: #fce7f3;
            color: #9f1239;
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 12px;
        }

        .modal-recommended-badge {
            position: absolute;
            top: 12px;
            right: 12px;
            background: #10b981;
            color: white;
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
        }

        .modal-path-card {
            cursor: pointer;
            position: relative;
            overflow: visible;
        }

        .modal-path-card-simple {
            cursor: pointer;
        }

        .modal-tour-box {
            background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
            padding: 24px;
            border-radius: 16px;
            margin: 24px 0;
            border-left: 4px solid #3b82f6;
        }

        .modal-tour-title {
            margin: 0 0 16px 0;
            color: #1e40af;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .modal-tour-content {
            display: grid;
            gap: 12px;
        }

        .modal-tour-item {
            display: flex;
            align-items: start;
            gap: 12px;
        }

        .modal-tour-item-title {
            color: #1f2937;
        }

        .modal-tour-item-desc {
            color: #6b7280;
            font-size: 14px;
        }

        .modal-tips-box {
            background: #f9fafb;
            padding: 20px;
            border-radius: 12px;
            margin: 20px 0;
        }

        .modal-tips-title {
            margin: 0 0 12px 0;
            color: #1f2937;
            font-size: 15px;
        }

        .modal-tips-list {
            margin: 0;
            padding-left: 20px;
            color: #6b7280;
            font-size: 14px;
            line-height: 1.8;
        }

        .recommendation-box {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            border-left: 4px solid var(--warning);
            padding: var(--space-xl);
            border-radius: var(--radius-xl);
            margin: var(--space-xl) 0;
            box-shadow: var(--shadow-sm);
        }

        .recommendation-box h3 {
            color: var(--warning);
            margin-bottom: var(--space-md);
        }

        .visual-model {
            background: var(--bg-primary);
            padding: var(--space-2xl);
            border-radius: var(--radius-xl);
            margin: var(--space-xl) 0;
            box-shadow: var(--shadow-md);
            text-align: center;
            border: 1px solid var(--border);
        }

        .model-diagram {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 20px;
            justify-items: center;
            align-items: stretch;
            margin: var(--space-xl) 0;
        }

        .model-box {
            background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
            color: #fff;
            padding: 18px 20px;
            border-radius: 18px;
            min-height: 140px;
            width: 100%;
            max-width: 320px;
            box-shadow: 0 12px 24px rgba(79, 70, 229, 0.2);
            transition: all var(--transition-base);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            position: relative;
            cursor: pointer;
        }

        .model-box:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        /* Details/Summary (Collapsible sections) */
        details summary::-webkit-details-marker {
            display: none;
        }

        details[open] summary span:last-child {
            transform: rotate(180deg);
        }

        details summary span:last-child {
            transition: transform 0.3s ease;
        }

        /* Enhanced pathway card hover effects for new design */
        .pathway-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
        }

        /* Pathway card selected state */
        .pathway-card.selected {
            transform: translateY(-4px) scale(1.02);
            box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
            border-width: 3px;
        }

        /* Responsive Design - Tablet (768px and below) */
        @media (max-width: 768px) {
            :root {
                --space-2xl: 40px;
                --space-3xl: 56px;
            }

            .container {
                padding: var(--space-md);
            }

            .header-branding h1 {
                font-size: 1.1rem;
            }

            h2 {
                font-size: var(--font-xl);
            }

            h3 {
                font-size: var(--font-lg);
            }

            .content-section {
                padding: var(--space-xl);
                border-radius: var(--radius-xl);
            }

            nav {
                gap: var(--space-xs);
            }

            .nav-btn {
                font-size: var(--font-xs);
                padding: var(--space-xs) var(--space-md);
                white-space: nowrap;
            }

            .model-diagram {
                flex-direction: column;
            }

            .model-arrow {
                transform: rotate(90deg);
                margin: var(--space-md) 0;
            }

            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: var(--space-md);
            }

            .filter-buttons {
                gap: var(--space-xs);
            }

            .filter-btn {
                font-size: var(--font-xs);
                padding: var(--space-xs) var(--space-sm);
            }

            .joke-card,
            .activity-card,
            .quiz-container {
                padding: var(--space-lg);
            }

            .pathway-card {
                padding: var(--space-lg);
            }

            .modal {
                max-width: 90vw;
                padding: var(--space-xl);
            }
        }

        /* Responsive Design - Mobile (480px and below) */
        @media (max-width: 480px) {
            :root {
                --space-lg: 20px;
                --space-xl: 28px;
                --space-2xl: 36px;
                --space-3xl: 48px;
                --font-3xl: 1.75rem;
                --font-4xl: 2rem;
            }

            body {
                font-size: 16px;
            }

            .container {
                padding: var(--space-sm);
            }

            header {
                padding: 0.5rem 0.75rem;
            }

            .header-branding h1 {
                font-size: 0.9rem;
                letter-spacing: -0.01em;
            }

            .header-branding .subtitle {
                font-size: 0.65rem;
            }

            h2 {
                font-size: var(--font-xl);
                margin-bottom: var(--space-lg);
                padding-bottom: var(--space-sm);
            }

            h2::after {
                width: 60px;
            }

            h3 {
                font-size: var(--font-lg);
                margin-top: var(--space-lg);
            }

            h4 {
                font-size: var(--font-base);
            }

            nav {
                gap: 6px;
                margin-top: var(--space-lg);
            }

            .nav-btn {
                font-size: 11px;
                padding: 8px 12px;
                min-height: 44px;
                display: inline-flex;
                align-items: center;
                justify-content: center;
            }

            .nav-btn::before {
                display: none;
            }

            .content-section {
                padding: var(--space-lg);
                border-radius: var(--radius-lg);
                margin-bottom: var(--space-lg);
            }

            .joke-card,
            .activity-card {
                padding: var(--space-lg);
                margin: var(--space-lg) 0;
                border-radius: var(--radius-lg);
            }

            .joke-card::before {
                width: 100px;
                height: 100px;
            }

            .joke-card:hover,
            .activity-card:hover {
                transform: none;
            }

            .joke-text {
                font-size: var(--font-base);
                line-height: 1.7;
            }

            .joke-explanation {
                padding: var(--space-md);
                margin-top: var(--space-lg);
            }

            .joke-favorite {
                top: var(--space-md);
                right: var(--space-md);
                width: 40px;
                height: 40px;
                font-size: var(--font-2xl);
            }

            .audio-btn,
            .print-btn,
            .favorite-btn {
                min-height: 44px;
                padding: var(--space-md) var(--space-lg);
                font-size: var(--font-sm);
            }

            .filter-buttons {
                gap: 6px;
                margin: var(--space-md) 0;
            }

            .filter-btn {
                font-size: 11px;
                padding: 8px 12px;
                min-height: 36px;
            }

            .level-badge {
                font-size: 10px;
                padding: 4px 10px;
            }

            .tag {
                font-size: 10px;
                padding: 4px 10px;
            }

            .quiz-container {
                padding: var(--space-md);
                margin: var(--space-md) 0;
            }

            .quiz-question {
                font-size: var(--font-base);
                margin-bottom: var(--space-md);
            }

            .quiz-option {
                padding: var(--space-md);
                margin: var(--space-sm) 0;
                font-size: var(--font-sm);
                min-height: 44px;
            }

            .quiz-option:hover {
                transform: none;
            }

            .quiz-feedback {
                padding: var(--space-md);
                font-size: var(--font-sm);
            }

            .stats-grid {
                grid-template-columns: 1fr;
                gap: var(--space-md);
            }

            .stat-card {
                padding: var(--space-lg);
            }

            .stat-card:hover {
                transform: none;
            }

            .stat-number {
                font-size: var(--font-3xl);
            }

            .stat-label {
                font-size: var(--font-xs);
            }

            .progress-bar {
                height: 10px;
            }

            .progress-fill {
                font-size: 10px;
            }

            .achievement-badge {
                padding: var(--space-sm) var(--space-md);
                margin: var(--space-sm);
                font-size: var(--font-xs);
            }

            .achievement-badge:hover {
                transform: scale(1.05);
            }

            .search-input {
                padding: var(--space-md);
                font-size: var(--font-base);
            }

            .notes-textarea {
                padding: var(--space-sm);
                font-size: var(--font-sm);
                min-height: 80px;
            }

            .checkbox-container {
                margin: var(--space-md) 0;
            }

            .checkbox-container input[type="checkbox"] {
                width: 18px;
                height: 18px;
            }

            .checkbox-container label {
                font-size: var(--font-sm);
            }

            .modal-overlay {
                padding: 8px;
                overflow-y: auto;
            }

            .modal {
                max-width: 100%;
                max-height: 92vh;
                padding: var(--space-md);
                border-radius: var(--radius-md);
                margin: 10px auto;
                overflow-y: auto;
            }

            .modal h2 {
                font-size: var(--font-lg);
                margin-bottom: var(--space-md);
                line-height: 1.3;
            }

            /* Ensure close button is accessible on small screens */
            .modal button[aria-label*="Close"],
            .modal button[aria-label*="close"] {
                min-width: 44px;
                min-height: 44px;
            }

            .step-indicator {
                margin: var(--space-lg) 0;
                gap: var(--space-sm);
            }

            .step-dot {
                width: 10px;
                height: 10px;
            }

            .pathway-card {
                padding: var(--space-md);
                margin: var(--space-md) 0;
            }

            .pathway-card:hover {
                transform: translateX(4px);
            }

            .recommendation-box {
                padding: var(--space-md);
                margin: var(--space-md) 0;
            }

            .theory-box {
                padding: var(--space-md);
                margin: var(--space-md) 0;
            }

            .teacher-block {
                padding: var(--space-md);
                margin-bottom: var(--space-md);
            }

            .teacher-block:hover {
                transform: none;
            }

            .accordion-item {
                margin-bottom: var(--space-sm);
            }

            .accordion-header {
                padding: var(--space-sm) var(--space-md);
                font-size: var(--font-sm);
            }

            .accordion-body {
                padding: var(--space-md);
                font-size: var(--font-sm);
            }

            .rubric-table {
                font-size: 12px;
                display: block;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                max-width: 100%;
                box-sizing: border-box;
            }

            .rubric-table th,
            .rubric-table td {
                padding: var(--space-sm);
                white-space: nowrap;
            }

            .visual-model {
                padding: var(--space-lg);
            }

            .model-box {
                padding: var(--space-md);
                margin: var(--space-sm);
                min-width: 120px;
                font-size: var(--font-sm);
            }

            .model-box:hover {
                transform: none;
            }

            .model-arrow {
                font-size: var(--font-3xl);
            }

            ul, ol {
                margin-left: var(--space-lg);
            }

            li {
                font-size: var(--font-sm);
                margin-bottom: var(--space-sm);
            }

            .completed-activity::after {
                top: var(--space-sm);
                right: var(--space-sm);
                font-size: 10px;
                padding: 4px 8px;
            }

            .notes-section {
                padding: var(--space-md);
                margin-top: var(--space-md);
            }

            .notes-section h4 {
                font-size: var(--font-sm);
            }

            .no-results {
                padding: var(--space-xl);
                font-size: var(--font-base);
            }

            .difficulty-stars {
                font-size: var(--font-base);
                margin: var(--space-sm) 0;
            }
        }

        /* Extra small devices (360px and below) */
        @media (max-width: 360px) {
            h1 {
                font-size: 1.5rem;
            }

            .nav-btn {
                font-size: 10px;
                padding: 6px 10px;
            }

            .stats-grid {
                grid-template-columns: 1fr;
            }

            .modal {
                padding: var(--space-md);
            }
        }

        /* Landscape mobile optimization */
        @media (max-width: 768px) and (orientation: landscape) {
            .modal {
                max-height: 90vh;
                overflow-y: auto;
            }

            header {
                padding: 0.5rem 1rem;
            }

            .header-inner {
                gap: 0.5rem;
            }

            .content-section {
                padding: var(--space-md);
            }
        }

        /* Touch device optimizations */
        @media (hover: none) and (pointer: coarse) {
            .nav-btn:hover::before,
            .filter-btn:hover,
            .quiz-option:hover,
            .activity-card:hover,
            .joke-card:hover,
            .stat-card:hover,
            .teacher-block:hover,
            .model-box:hover {
                transform: none;
            }

            button,
            .nav-btn,
            .filter-btn,
            .quiz-option,
            input[type="checkbox"] {
                min-height: 44px;
            }

            button:active,
            .nav-btn:active,
            .filter-btn:active {
                opacity: 0.7;
            }
        }

        @media print {
            .no-print {
                display: none !important;
            }

            body {
                background: white;
            }

            .content-section {
                box-shadow: none;
                border: 1px solid var(--border);
            }

            header {
                box-shadow: none;
            }
        }

        /* Reduced Motion for Accessibility - Respects User OS Preferences */
        @media (prefers-reduced-motion: reduce) {
            *,
            *::before,
            *::after {
                animation: none !important;
                transition: none !important;
                scroll-behavior: auto !important;
            }

            /* Allow only instant focus indicators for accessibility */
            button:focus-visible,
            a:focus-visible,
            .nav-btn:focus-visible,
            .accordion-header:focus-visible,
            .quiz-option:focus-visible,
            input:focus-visible,
            select:focus-visible,
            textarea:focus-visible {
                transition: none !important;
            }
        }

        /* Header Streak Counter Styles */
        .header-streak-counter {
            background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
            color: white;
            padding: 10px 20px;
            border-radius: var(--radius-full);
            font-weight: 700;
            font-size: var(--font-base);
            box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
            display: inline-flex;
            align-items: center;
            gap: 6px;
            transition: all var(--transition-base);
            white-space: nowrap;
            animation: pulseStreak 2s ease-in-out infinite;
        }

        .header-streak-counter:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
        }

        @keyframes pulseStreak {
            0%, 100% {
                transform: scale(1);
            }
            50% {
                transform: scale(1.05);
            }
        }

        @media (max-width: 768px) {
            .header-streak-counter {
                font-size: var(--font-sm);
                padding: 8px 16px;
            }
        }

        /* Alert Banner Styles */
        .alert-banner {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            border: 2px solid #f59e0b;
            border-radius: var(--radius-md);
            padding: var(--space-lg);
            margin-bottom: var(--space-lg);
            display: flex;
            align-items: start;
            gap: var(--space-md);
            box-shadow: var(--shadow-md);
            position: relative;
            animation: slideDown 0.3s ease-out;
        }

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

        .alert-banner-icon {
            font-size: var(--font-2xl);
            flex-shrink: 0;
        }

        .alert-banner-content {
            flex: 1;
            color: var(--text-primary);
            line-height: 1.6;
        }

        .alert-banner-content strong {
            color: #92400e;
        }

        .alert-banner-dismiss {
            background: transparent;
            border: none;
            color: #92400e;
            font-size: var(--font-xl);
            cursor: pointer;
            padding: var(--space-xs);
            border-radius: var(--radius-sm);
            transition: all var(--transition-fast);
            flex-shrink: 0;
            line-height: 1;
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .alert-banner-dismiss:hover {
            background: rgba(146, 64, 14, 0.1);
            transform: scale(1.1);
        }

        .alert-banner-dismiss:active {
            transform: scale(0.95);
        }

        .alert-banner.hidden {
            display: none;
        }

        /* Prominent Export Button */
        .export-btn-prominent {
            background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
            color: white !important;
            padding: var(--space-lg) var(--space-2xl) !important;
            font-size: var(--font-lg) !important;
            font-weight: 700 !important;
            border-radius: var(--radius-full) !important;
            box-shadow: var(--shadow-lg) !important;
            border: none !important;
            min-height: 56px !important;
            transition: all var(--transition-base) !important;
            cursor: pointer !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 10px !important;
        }

        .export-btn-prominent:hover {
            transform: translateY(-3px) !important;
            box-shadow: var(--shadow-xl) !important;
            background: linear-gradient(135deg, var(--primary-light), var(--secondary-light)) !important;
        }

        .export-btn-prominent:active {
            transform: translateY(-1px) !important;
            box-shadow: var(--shadow-md) !important;
        }

        @media (max-width: 768px) {
            .alert-banner {
                padding: var(--space-md);
                flex-direction: column;
            }

            .alert-banner-dismiss {
                position: absolute;
                top: var(--space-sm);
                right: var(--space-sm);
            }

            .export-btn-prominent {
                padding: var(--space-md) var(--space-xl) !important;
                font-size: var(--font-base) !important;
                width: 100%;
            }
        }

        /* ===== NEW UX IMPROVEMENTS ===== */

        /* Short Paragraph Styling - Max 2-3 sentences */
        .theory-box p,
        .accordion-body p {
            max-width: 65ch;
            margin-bottom: var(--space-md);
        }

        .theory-box p:last-child,
        .accordion-body p:last-child {
            margin-bottom: 0;
        }

        /* Key Concept Boxes */
        .key-concept-box {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            border-left: 5px solid #f59e0b;
            border-radius: var(--radius-lg);
            padding: var(--space-lg);
            margin: var(--space-lg) 0;
            box-shadow: var(--shadow-md);
        }

        .key-concept-box h5 {
            color: #92400e;
            font-size: var(--font-lg);
            font-weight: 700;
            margin: 0 0 var(--space-sm) 0;
            display: flex;
            align-items: center;
            gap: var(--space-sm);
        }

        .key-concept-box .simple {
            font-size: var(--font-base);
            color: #78350f;
            font-weight: 600;
            margin: var(--space-sm) 0;
            line-height: 1.6;
        }

        .key-concept-box .example {
            background: white;
            padding: var(--space-md);
            border-radius: var(--radius-md);
            margin-top: var(--space-md);
            color: #1f2937;
            border: 1px solid #fbbf24;
        }

        .key-concept-box .example strong {
            color: #92400e;
        }

        /* Learn More Expandable Sections */
        .learn-more-section {
            margin: var(--space-lg) 0;
            border: 1px solid var(--border);
            border-radius: var(--radius-md);
            overflow: hidden;
        }

        .learn-more-toggle {
            width: 100%;
            background: #f3f4f6;
            border: none;
            padding: var(--space-md) var(--space-lg);
            font-size: var(--font-base);
            font-weight: 600;
            color: var(--primary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: space-between;
            transition: all var(--transition-base);
        }

        .learn-more-toggle:hover {
            background: #e5e7eb;
        }

        .learn-more-toggle .arrow {
            font-size: var(--font-xl);
            transition: transform var(--transition-base);
        }

        .learn-more-toggle[aria-expanded="true"] .arrow {
            transform: rotate(180deg);
        }

        .learn-more-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height var(--transition-slow);
            background: white;
        }

        .learn-more-content.expanded {
            max-height: 2000px;
            padding: var(--space-lg);
        }

        /* Comprehension Check Boxes */
        .comprehension-check {
            background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
            border: 2px solid #3b82f6;
            border-radius: var(--radius-lg);
            padding: var(--space-lg);
            margin: var(--space-xl) 0;
            box-shadow: var(--shadow-md);
        }

        .comprehension-check h4 {
            color: #1e40af;
            font-size: var(--font-lg);
            font-weight: 700;
            margin: 0 0 var(--space-md) 0;
            display: flex;
            align-items: center;
            gap: var(--space-sm);
        }

        .comprehension-check-question {
            background: white;
            padding: var(--space-md);
            border-radius: var(--radius-md);
            margin: var(--space-sm) 0;
            color: #1f2937;
            font-weight: 500;
        }

        .comprehension-check-answer {
            background: #f0f9ff;
            padding: var(--space-md);
            border-radius: var(--radius-md);
            margin-top: var(--space-sm);
            color: #1e40af;
            display: none;
        }

        .comprehension-check-answer.revealed {
            display: block;
            animation: slideDown var(--transition-base);
        }

        .comprehension-reveal-btn {
            background: var(--primary);
            color: white;
            border: none;
            padding: var(--space-sm) var(--space-lg);
            border-radius: var(--radius-md);
            cursor: pointer;
            font-weight: 600;
            margin-top: var(--space-sm);
            transition: all var(--transition-base);
        }

        .comprehension-reveal-btn:hover {
            background: var(--primary-dark);
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        /* Time Estimate Badges */
        .time-estimate {
            display: inline-flex;
            align-items: center;
            gap: var(--space-xs);
            background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
            color: white;
            -webkit-text-fill-color: currentColor;
            padding: var(--space-xs) var(--space-md);
            border-radius: var(--radius-full);
            font-size: var(--font-sm);
            font-weight: 600;
            box-shadow: var(--shadow-sm);
            margin-left: var(--space-md);
        }

        .section-time-estimate {
            display: inline-flex;
            align-items: center;
            gap: var(--space-xs);
            background: #f3f4f6;
            color: #6b7280;
            padding: 4px var(--space-sm);
            border-radius: var(--radius-md);
            font-size: var(--font-xs);
            font-weight: 600;
            margin-left: var(--space-sm);
        }

        /* Skip/Already Know Buttons */
        .skip-section {
            background: #f9fafb;
            border: 1px dashed var(--border);
            border-radius: var(--radius-md);
            padding: var(--space-md);
            margin: var(--space-lg) 0;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: var(--space-md);
        }

        .skip-section-text {
            color: var(--text-secondary);
            font-size: var(--font-sm);
            flex: 1;
        }

        .skip-btn {
            background: white;
            border: 1px solid var(--border);
            color: var(--text-secondary);
            padding: var(--space-sm) var(--space-lg);
            border-radius: var(--radius-md);
            cursor: pointer;
            font-weight: 600;
            font-size: var(--font-sm);
            transition: all var(--transition-base);
        }

        .skip-btn:hover {
            background: var(--bg-secondary);
            border-color: var(--primary);
            color: var(--primary);
        }

        /* Real-World Application Boxes */
        .real-world-box {
            background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
            border-left: 5px solid #10b981;
            border-radius: var(--radius-lg);
            padding: var(--space-lg);
            margin: var(--space-xl) 0;
            box-shadow: var(--shadow-md);
        }

        .real-world-box h4 {
            color: #065f46;
            font-size: var(--font-lg);
            font-weight: 700;
            margin: 0 0 var(--space-md) 0;
            display: flex;
            align-items: center;
            gap: var(--space-sm);
        }

        .real-world-box ul {
            margin: 0;
            padding-left: var(--space-lg);
        }

        .real-world-box li {
            color: #047857;
            margin: var(--space-sm) 0;
            line-height: 1.6;
        }

        /* Peer Learning / Common Struggles Boxes */
        .peer-learning-box {
            background: #fef2f2;
            border: 1px solid #fecaca;
            border-radius: var(--radius-lg);
            padding: var(--space-lg);
            margin: var(--space-lg) 0;
            box-shadow: var(--shadow-sm);
        }

        .peer-learning-box h5 {
            color: #991b1b;
            font-size: var(--font-base);
            font-weight: 700;
            margin: 0 0 var(--space-sm) 0;
            display: flex;
            align-items: center;
            gap: var(--space-sm);
        }

        .peer-learning-box p {
            color: #7f1d1d;
            font-size: var(--font-sm);
            margin: 0;
            line-height: 1.6;
        }

        /* Spaced Repetition Reminder */
        .spaced-repetition-reminder {
            background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
            border: 2px solid #6366f1;
            border-radius: var(--radius-lg);
            padding: var(--space-lg);
            margin: var(--space-xl) 0;
            box-shadow: var(--shadow-lg);
            position: relative;
            overflow: hidden;
        }

        .spaced-repetition-reminder::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, #6366f1, #8b5cf6, #6366f1);
            background-size: 200% 100%;
            animation: shimmer 2s linear infinite;
        }

        @keyframes shimmer {
            0% { background-position: -200% 0; }
            100% { background-position: 200% 0; }
        }

        .spaced-repetition-reminder h4 {
            color: #3730a3;
            font-size: var(--font-lg);
            font-weight: 700;
            margin: 0 0 var(--space-md) 0;
            display: flex;
            align-items: center;
            gap: var(--space-sm);
        }

        .spaced-repetition-reminder p {
            color: #4338ca;
            margin: 0 0 var(--space-md) 0;
            font-weight: 500;
        }

        .spaced-repetition-actions {
            display: flex;
            gap: var(--space-md);
            flex-wrap: wrap;
        }

        .spaced-repetition-btn {
            background: white;
            border: 2px solid #6366f1;
            color: #4f46e5;
            padding: var(--space-sm) var(--space-lg);
            border-radius: var(--radius-md);
            cursor: pointer;
            font-weight: 600;
            transition: all var(--transition-base);
        }

        .spaced-repetition-btn:hover {
            background: #6366f1;
            color: white;
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        .spaced-repetition-dismiss {
            background: transparent;
            border: 1px solid #c7d2fe;
            color: #6b7280;
            padding: var(--space-sm) var(--space-md);
            border-radius: var(--radius-md);
            cursor: pointer;
            font-size: var(--font-sm);
            transition: all var(--transition-base);
        }

        .spaced-repetition-dismiss:hover {
            background: #f3f4f6;
        }

        /* Enhanced Next Step Guidance */
        .next-step-guidance {
            background: white;
            border: 2px solid #10b981;
            border-radius: var(--radius-xl);
            padding: var(--space-xl);
            margin: var(--space-xl) 0;
            box-shadow: var(--shadow-lg);
            text-align: center;
        }

        .next-step-guidance h3 {
            color: #065f46;
            font-size: var(--font-2xl);
            font-weight: 700;
            margin: 0 0 var(--space-md) 0;
        }

        .next-step-guidance p {
            color: #047857;
            margin: 0 0 var(--space-lg) 0;
            font-size: var(--font-base);
        }

        .next-step-guidance .nav-btn {
            font-size: var(--font-lg);
            padding: var(--space-md) var(--space-2xl);
            min-width: 200px;
        }

        @media (max-width: 768px) {
            .key-concept-box,
            .real-world-box,
            .peer-learning-box,
            .spaced-repetition-reminder {
                padding: var(--space-md);
            }

            .time-estimate {
                font-size: var(--font-xs);
                padding: 4px var(--space-sm);
            }

            .skip-section {
                flex-direction: column;
                align-items: stretch;
            }

            .skip-btn {
                width: 100%;
            }

            .spaced-repetition-actions {
                flex-direction: column;
            }

            .spaced-repetition-btn {
                width: 100%;
            }
        }

        /* ===== CONTEXTUAL HELP & PERSONALIZATION ===== */

        /* Inline Glossary Tooltips */
        .tooltip {
            position: relative;
            display: inline-block;
            color: var(--primary);
            font-weight: 600;
            cursor: help;
            border-bottom: 2px dotted var(--primary);
            transition: all var(--transition-fast);
        }

        .tooltip:hover {
            color: var(--primary-dark);
            border-bottom-color: var(--primary-dark);
        }

        .tooltip-text {
            visibility: hidden;
            opacity: 0;
            position: absolute;
            bottom: 125%;
            left: 50%;
            transform: translateX(-50%) translateY(10px);
            background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
            color: white;
            padding: var(--space-md);
            border-radius: var(--radius-lg);
            width: 280px;
            max-width: 90vw;
            box-shadow: var(--shadow-xl);
            z-index: var(--z-modal);
            font-weight: 400;
            font-size: var(--font-sm);
            line-height: 1.6;
            transition: all var(--transition-base);
            pointer-events: none;
        }

        .tooltip-text::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            margin-left: -8px;
            border-width: 8px;
            border-style: solid;
            border-color: #374151 transparent transparent transparent;
        }

        .tooltip:hover .tooltip-text,
        .tooltip:focus .tooltip-text {
            visibility: visible;
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }

        .tooltip-emoji {
            font-size: var(--font-lg);
            margin-right: var(--space-xs);
        }

        .tooltip-example {
            background: rgba(255, 255, 255, 0.1);
            padding: var(--space-sm);
            border-radius: var(--radius-sm);
            margin-top: var(--space-sm);
            font-style: italic;
            border-left: 3px solid var(--primary-light);
        }

        /* Learning Preferences Panel */
        .learning-preferences {
            background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
            border: 2px solid #3b82f6;
            border-radius: var(--radius-xl);
            padding: var(--space-xl);
            margin: var(--space-xl) 0;
            box-shadow: var(--shadow-lg);
        }

        .learning-preferences h3 {
            color: #1e40af;
            font-size: var(--font-xl);
            font-weight: 700;
            margin: 0 0 var(--space-sm) 0;
            display: flex;
            align-items: center;
            gap: var(--space-sm);
        }

        .learning-preferences p {
            color: #1e3a8a;
            margin: 0 0 var(--space-lg) 0;
            font-size: var(--font-base);
        }

        .preference-options {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: var(--space-md);
        }

        .preference-option {
            background: white;
            border: 2px solid #bfdbfe;
            border-radius: var(--radius-lg);
            padding: var(--space-lg);
            cursor: pointer;
            transition: all var(--transition-base);
            text-align: left;
        }

        .preference-option:hover {
            border-color: var(--primary);
            box-shadow: var(--shadow-md);
            transform: translateY(-2px);
        }

        .preference-option.selected {
            background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
            border-color: var(--primary);
            box-shadow: var(--shadow-md);
        }

        .preference-option-icon {
            font-size: 2rem;
            margin-bottom: var(--space-sm);
            display: block;
        }

        .preference-option-title {
            font-weight: 700;
            color: var(--text-primary);
            font-size: var(--font-base);
            margin-bottom: var(--space-xs);
        }

        .preference-option-desc {
            font-size: var(--font-sm);
            color: var(--text-secondary);
            line-height: 1.5;
        }

        /* Mobile-Optimized Touch Interactions */
        @media (max-width: 768px) {
            /* Larger tap targets for thumbs */
            .quiz-option {
                min-height: 56px !important;
                font-size: 16px !important; /* Prevent zoom on iOS */
                padding: var(--space-md) var(--space-lg) !important;
                display: flex;
                align-items: center;
            }

            .nav-btn,
            .filter-btn,
            button {
                min-height: 48px;
                font-size: 16px !important; /* Prevent zoom on iOS */
                padding: var(--space-md) var(--space-lg);
            }

            .accordion-header {
                min-height: 56px;
                font-size: 16px !important;
                padding: var(--space-md) var(--space-lg);
            }

            /* Increase touch target spacing */
            .preference-options {
                gap: var(--space-lg);
            }

            .preference-option {
                min-height: 80px;
                padding: var(--space-lg);
            }

            /* Tooltip adjustments for mobile */
            .tooltip-text {
                position: fixed;
                bottom: auto;
                top: 50%;
                left: 20px;
                right: 20px;
                width: auto;
                margin: 0 auto;
                transform: translateY(-50%);
                max-width: 320px;
                box-sizing: border-box;
            }

            .tooltip-text::after {
                display: none;
            }

            /* Make tooltips tappable on mobile */
            .tooltip {
                -webkit-tap-highlight-color: rgba(99, 102, 241, 0.2);
            }
        }

        /* Touch-friendly improvements for all devices */
        .interactive-element {
            -webkit-tap-highlight-color: rgba(99, 102, 241, 0.2);
            touch-action: manipulation; /* Prevents double-tap zoom */
        }

        /* Prevent text selection on buttons (better for touch) */
        button,
        .nav-btn,
        .filter-btn,
        .accordion-header,
        .quiz-option {
            -webkit-user-select: none;
            user-select: none;
            touch-action: manipulation;
        }

        /* Graduation Page Animations */
        @keyframes bounce {
            0%, 100% {
                transform: translateY(0);
            }
            50% {
                transform: translateY(-20px);
            }
        }

        @keyframes fadeInScale {
            from {
                opacity: 0;
                transform: scale(0.9);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }
