:root {
            /* ============================================================
               ExamOrbit design tokens — Cognito-style white + blue
               (2026-10-10, supersedes the warm-paper direction)
               White canvas, bright blue brand, deep navy text.
               Semantic colours kept for Save My Exams style callouts.
               ============================================================ */
            --canvas:       #FFFFFF;   /* page canvas — pure white         */
            --surface:      #FFFFFF;   /* card / panel surface             */
            --surface-alt:  #F8FBFF;   /* sidebar / secondary surface      */
            --text-main:    #0B2545;   /* deep navy — headings + body      */
            --heading:      #123E7C;   /* blue — page / card titles        */
            --text-muted:   #5A7396;   /* blue-slate — secondary copy      */
            --border-line:  #E4EBF5;   /* cool hairline                    */
            --bg-hover:     #F3F7FD;

            --accent:       #1B6EF3;   /* brand blue — links / active      */
            --accent-soft:  #E8F1FE;
            --accent-tint:  #F2F7FE;
            --ok:           #12A150;   /* green — correct / mark scheme    */
            --trap:         #E5484D;   /* red   — loss / exam trap         */
            --tip:          #C77700;   /* amber — exam tip / formula       */

            /* legacy aliases kept so existing rules keep working */
            --paper: var(--canvas);
            --epic-theme-blue: var(--accent);
            --epic-theme-glow: rgba(27, 110, 243, 0.15);
            --map-vault-width: 1500px;
            --bg-outer-void: var(--canvas);
            --danger-red: var(--trap);
            --success-green: var(--ok);
            --trap-warn-orange: #D97706;
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }

        html, body {
            margin: 0; padding: 0; 
            width: 100%; 
            background-color: var(--paper);
            font-family: 'Inter', system-ui, -apple-system, sans-serif;
            color: var(--text-main);
            user-select: auto; -webkit-user-select: auto;
        }
        body::before {
            display: none;
        }

        h1, h2, h3, h4, h5, h6, .site-brand, .tab-btn, .back-map-btn, .subject-badge {
            font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
        }

        /*  */
        ::-webkit-scrollbar { width: 6px; height: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: #C7D7EC; border-radius: 10px; }
        ::-webkit-scrollbar-thumb:hover { background: #7C93B4; }

        /* ==================== 👑  (Row 1) ==================== */
        .lab-top-navbar {
            width: 100%; height: 80px; background-color: #ffffff;
            border-bottom: 1px solid var(--border-line); padding: 0 60px;
            box-sizing: border-box; display: flex; justify-content: space-between; align-items: center;
            position: relative; z-index: 110;
        }
        .site-brand { font-size: 15px; font-weight: 800; letter-spacing: -0.5px; text-transform: uppercase; cursor: pointer; color: var(--text-main); }
        .site-brand span { color: var(--epic-theme-blue); }
        .right-user-settings { display: flex; align-items: center; gap: 12px; cursor: pointer; }
        .avatar-circle { width: 36px; height: 36px; background-color: #F3F7FD; border: 1px solid var(--border-line); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #42597A; }
        
        /*  XP  */
        .xp-badge {
            background: linear-gradient(135deg, #C77700 0%, #A85F00 100%);
            color: #ffffff;
            font-size: 11px;
            font-weight: 800;
            padding: 5px 12px;
            border-radius: 20px;
            box-shadow: 0 4px 10px rgba(224, 135, 0, 0.25);
            display: flex;
            align-items: center;
            gap: 4px;
            transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }
              /* ==================== 🏡 ： (Plan B) ==================== */
        #home-view {
            width: 100%; min-height: calc(100vh - 80px); background-color: #ffffff;
            display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; box-sizing: border-box;
        }
        .welcome-hero { text-align: center; margin-bottom: 30px; }
        .welcome-hero h1 { font-size: 40px; font-weight: 850; letter-spacing: -0.8px; margin-bottom: 12px; color: #0B2545; font-family: 'Outfit', sans-serif; }
        .welcome-hero p { color: var(--text-muted); font-size: 17px; margin: 0; font-weight: 500; }
        
        .subject-grid { 
            display: flex; 
            justify-content: center; 
            gap: 28px; 
            flex-wrap: wrap; 
            max-width: 1050px; 
            width: 100%;
            margin: 20px auto 40px; 
        }
        .subject-card { 
            flex: 1;
            min-width: 290px;
            max-width: 340px;
            background-color: rgba(255, 255, 255, 0.65);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.4); 
            border-radius: 18px; 
            padding: 24px; 
            box-shadow: 0 8px 32px rgba(11, 37, 69, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.3); 
            transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
            display: flex; 
            flex-direction: column; 
            box-sizing: border-box;
            position: relative;
        }

        .subject-card:hover { 
            border-color: rgba(255, 255, 255, 0.8);
            box-shadow: 0 20px 40px rgba(11, 37, 69, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.5); 
            transform: translateY(-8px) scale(1.03);
            z-index: 10 !important;
        }
        
        /* 懸停抬起加鄰位讓位效果 (Sibling hover effect) */
        .subject-grid:has(.subject-card:hover) .subject-card:not(:hover) {
            transform: scale(0.96);
            opacity: 0.6;
            filter: grayscale(40%);
        }
        /* Quarter-circle Watermark element */
        .subject-card::after,
        .system-block-card::after {
            content: '';
            position: absolute;
            bottom: 0;
            right: 0;
            width: 70px;
            height: 70px;
            background-color: rgba(27, 110, 243, 0.05);
            border-top-left-radius: 100%;
            z-index: 0;
            pointer-events: none;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .subject-card:hover::after,
        .system-block-card:hover::after {
            width: 90px;
            height: 90px;
            background-color: rgba(27, 110, 243, 0.09);
        }

        .subject-card-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }
        .subject-icon-box { 
            font-size: 22px; 
            width: 40px; 
            height: 40px; 
            background: #F2F7FE; /* subtle blue tint by default */
            border: 1px solid rgba(0,0,0,0.04);
            border-radius: 10px; 
            display: flex; 
            align-items: center; 
            justify-content: center; 
        }
        .spec-pill-badge {
            font-size: 11.5px;
            font-weight: 750;
            background: #FFFFFF;
            border: 1px solid var(--border-line);
            color: #42597A;
            padding: 4px 12px;
            border-radius: 20px;
            letter-spacing: 0.3px;
            font-family: 'Outfit', sans-serif;
        }
        .subject-card-title { 
            font-size: 17px; 
            font-weight: 700; 
            margin: 0 0 4px 0; 
            letter-spacing: -0.2px; 
            color: var(--text-main); 
            font-family: 'Outfit', sans-serif;
        }
        .subject-card-sub { 
            font-size: 13px;
            color: var(--text-muted);
            margin: 0 0 22px 0;
            font-weight: 500;
        }
        
        /* Plan B: Segmented Control Switch */
        .card-segmented-switch {
            display: flex;
            background: #FFFFFF;
            padding: 3px;
            border-radius: 8px;
            border: 1px solid rgba(0,0,0,0.06);
            margin-bottom: 18px;
            gap: 2px;
        }
        .seg-tab-btn {
            flex: 1;
            border: none;
            background: transparent;
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 600;
            color: var(--text-muted);
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            font-family: 'Outfit', sans-serif;
        }
        .seg-tab-btn.active {
            background: #ffffff;
            color: var(--text-main);
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
            font-weight: 700;
        }

        /* Plan B: Unified Launch CTA Button */
        .subject-launch-cta {
            width: 100%;
            border: 1px solid rgba(0,0,0,0.08);
            background: #ffffff;
            color: var(--text-main);
            padding: 12px 18px;
            border-radius: 12px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            display: flex;
            align-items: center;
            justify-content: space-between; /* push arrow to the right */
            font-family: 'Outfit', sans-serif;
            box-shadow: 0 1px 3px rgba(0,0,0,0.02);
        }
        .subject-launch-cta:hover:not(.locked) {
            border-color: #1B6EF3;
            color: #1B6EF3;
            background: #FFFFFF;
            box-shadow: 0 4px 12px rgba(27, 110, 243, 0.1);
        }
        .subject-launch-cta.locked {
            background: #F3F7FD;
            color: #7C93B4;
            border: 1px solid var(--border-line);
            box-shadow: none;
            cursor: pointer;
        }
        .subject-launch-cta.locked:hover {
            background: #E4EBF5;
            color: #5A7396;
        }
        .cta-arrow {
            transition: transform 0.2s;
        }
        .subject-launch-cta:hover .cta-arrow {
            transform: translateX(3px);
        }

        /* Premium Access Toggle Switch styles */
        .premium-toggle-container {
            display: flex;
            align-items: center;
            gap: 14px;
            margin-bottom: 30px;
            background: #ffffff;
            border: 1px solid var(--border-line);
            padding: 9px 22px;
            border-radius: 9999px;
            box-shadow: 0 2px 8px rgba(11, 37, 69,0.02);
            transition: border-color 0.2s;
        }
        .premium-toggle-container:hover {
            border-color: rgba(124, 92, 224, 0.4);
        }
        .toggle-label {
            font-size: 12px;
            font-weight: 750;
            color: var(--text-main);
            display: flex;
            align-items: center;
            gap: 5px;
        }
        .switch {
            position: relative;
            display: inline-block;
            width: 44px;
            height: 22px;
        }
        .switch input { 
            opacity: 0;
            width: 0;
            height: 0;
        }
        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #E4EBF5;
            transition: .2s ease;
        }
        .slider:before {
            position: absolute;
            content: "";
            height: 16px;
            width: 16px;
            left: 3px;
            bottom: 3px;
            background-color: white;
            transition: .2s ease;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        input:checked + .slider {
            background-color: var(--epic-theme-blue);
        }
        input:checked + .slider:before {
            transform: translateX(22px);
        }
        .slider.round {
            border-radius: 22px;
        }
        .slider.round:before {
            border-radius: 50%;
        }

        /* Level Buttons inside cards */
        .level-btn-group {
            display: flex;
            flex-direction: column;
            gap: 10px;
            width: 100%;
            margin-top: 10px;
        }
        .level-btn {
            width: 100%;
            background: #ffffff;
            border: 1.5px solid var(--border-line);
            border-radius: 12px;
            padding: 11px 16px;
            font-size: 13px;
            font-weight: 800;
            color: var(--text-main);
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            font-family: 'Outfit', sans-serif;
        }
        .level-btn:hover:not(.locked-btn) {
            background: var(--epic-theme-blue);
            border-color: var(--epic-theme-blue);
            color: #ffffff;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(27, 110, 243, 0.2);
        }
        .level-btn.locked-btn {
            background: #FFFFFF;
            color: var(--text-muted);
            border-color: var(--border-line);
            cursor: not-allowed;
        }
        .level-btn.locked-btn .lock-indicator {
            font-size: 11px;
            filter: opacity(70%);
        }

        /* ==================== 🎮 ： (Row 2 + Row 3) ==================== */
        #map-view { display: none; background-color: var(--bg-outer-void); }
        
        /* Row 2:  Deck */
        .upper-curriculum-deck { 
            width: 100%; background-color: #ffffff; 
            border-bottom: 1px solid var(--border-line); 
            padding: 35px 60px; box-sizing: border-box; 
        }
        .giant-title { font-size: 34px; font-weight: 800; margin: 0; color: var(--text-main); letter-spacing: -0.8px; }
        .sub-tier-tag { font-size: 13px; color: var(--text-muted); font-weight: 600; margin-top: 6px; text-transform: uppercase; letter-spacing: 0.5px; }

        /* Row 3:  viewport */
        .lower-map-outer-void { 
            width: 100%; background-color: var(--bg-outer-void); 
            padding: 40px 20px; display: flex; justify-content: center; 
        }
        .map-stage-box {
            position: relative;
            width: min(95vw, var(--map-vault-width));
            aspect-ratio: 1536/1024;
            background: url("../map.png") center center no-repeat;
            background-size: contain;
            box-shadow: 0 25px 50px -12px rgba(11, 37, 69, 0.08);
            border-radius: 24px;
            overflow: visible; 
            border: 1px solid var(--border-line);
            background-color: #ffffff;
        }

        /*  -  */
        .map-shield-overlay {
            position: absolute;
            top: 0; left: 0;
            width: 100%; height: 100%;
            z-index: 2;
            background: transparent;
            user-select: auto;
            -webkit-user-drag: none;
        }

        /* ==================== 💎 NATURE + COGNITO + ENGINEERING DASHBOARD STYLES ==================== */

/* Key Nature Callout Boxes (Save My Exams Style) */
.callout-box {
    border-radius: 12px;
    padding: 16px 20px;
    margin: 18px 0;
    font-size: 13.5px;
    line-height: 1.6;
    box-sizing: border-box;
    position: relative;
    box-shadow: 0 2px 8px rgba(11, 37, 69, 0.02);
}

.callout-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Key Definition ( - Nature Style) */
.callout-definition {
    background: #F2F7FE;
    border-left: 4px solid #1B6EF3;
    color: #0A2F73;
    border-top: 1px solid #E8F1FE;
    border-right: 1px solid #E8F1FE;
    border-bottom: 1px solid #E8F1FE;
}
.callout-definition .callout-title { color: #1148A8; }

/* Exam Tip ( - /) */
.callout-exam-tip {
    background: #FFFAF0;
    border-left: 4px solid #E08700;
    color: #7A3E06;
    border-top: 1px solid #FFF6E5;
    border-right: 1px solid #FFF6E5;
    border-bottom: 1px solid #FFF6E5;
}
.callout-exam-tip .callout-title { color: #9A4A08; }

/* Worked Example ( - ) */
.callout-worked-example {
    background: #F2FAF5;
    border-left: 4px solid #12A150;
    color: #085C2E;
    border-top: 1px solid #E3F7EA;
    border-right: 1px solid #E3F7EA;
    border-bottom: 1px solid #E3F7EA;
}
.callout-worked-example .callout-title { color: #0B7A3C; }

/* Project Engineering Status Pills */
.status-pill {
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.status-pill.mastered { background: #E3F7EA; color: #0E8F46; border: 1px solid #C9EFD9; }
.status-pill.in-progress { background: #F2F7FE; color: #1148A8; border: 1px solid #CFE0FA; }
.status-pill.review { background: #FFF7EE; color: #B03A0A; border: 1px solid #FFEED6; }
.status-pill.locked { background: #F3F7FD; color: #5A7396; border: 1px solid #E4EBF5; }

/* Accordion Directory Styling (Cognito Style) */
.cognito-accordion-item {
    background: #ffffff;
    border: 1px solid var(--border-line);
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: all 0.2s ease;
}
.cognito-accordion-item:hover {
    border-color: #C7D7EC;
    box-shadow: 0 4px 12px rgba(11, 37, 69, 0.03);
}
.cognito-accordion-header {
    padding: 14px 18px;
    background: #ffffff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: auto;
}
.cognito-accordion-header h4 {
    margin: 0;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}
.cognito-accordion-body {
    padding: 10px 18px 16px 18px;
    border-top: 1px solid #F3F7FD;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cognito-subtopic-row {
    padding: 8px 12px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #E4EBF5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 12px;
    font-weight: 700;
    color: #42597A;
}
.cognito-subtopic-row:hover {
    border-color: var(--epic-theme-blue);
    color: var(--epic-theme-blue);
    background: #F2F7FE;
    transform: translateX(3px);
}
.cognito-subtopic-row.active {
    background: #F2F7FE;
    border-color: var(--epic-theme-blue);
    color: var(--epic-theme-blue);
}

        /*  -  RWD  */
        .level-fortress {
            position: absolute;
            width: 5.5%; 
            aspect-ratio: 1;
            cursor: pointer;
            z-index: 10;
            display: flex;
            justify-content: center;
            align-items: center;
            transform: translate(-50%, -50%); 
            transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }
        .fortress-core { 
            font-size: clamp(20px, 3vw, 54px); 
            line-height: 1; 
            transition: all 0.2s; 
        }
        .level-fortress:hover {
            transform: translate(-50%, -50%) scale(1.15); 
        }

        /*  */
        .locked { filter: grayscale(100%) brightness(0.6) contrast(0.9); }
        .locked::after { 
            content: "🔒"; 
            position: absolute; 
            top: -10%; right: -10%; 
            font-size: clamp(10px, 1.2vw, 18px); 
            z-index: 15; 
            text-shadow: 0 2px 4px rgba(0,0,0,0.4); 
            background: rgba(255,255,255,0.9);
            border: 1px solid #C7D7EC;
            border-radius: 50%;
            width: 22px; height: 22px;
            display: flex; align-items: center; justify-content: center;
        }
        .unlocked { filter: drop-shadow(0 0 12px rgba(224, 135, 0, 0.55)); }
        .unlocked::before { content: "✨"; position: absolute; top: -25%; left: 50%; transform: translateX(-50%); font-size: clamp(10px, 1.2vw, 18px); animation: sparkPulse 1.5s infinite alternate; }

        @keyframes sparkPulse { from { opacity: 0.5; transform: translateX(-50%) scale(0.9); } to { opacity: 1; transform: translateX(-50%) scale(1.2); } }

        /*  (Colorbar) */
        .fortress-colorbar {
            position: absolute;
            bottom: 105%;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 2px;
            background: rgba(255, 255, 255, 0.95);
            padding: 2px 4px;
            border-radius: 4px;
            border: 1px solid #C7D7EC;
            box-shadow: 0 2px 4px rgba(0,0,0,0.04);
            white-space: nowrap;
        }
        .bar-dot {
            width: 7px;
            height: 4px;
            background: #C7D7EC;
            border-radius: 1px;
        }
        .bar-dot.active {
            background: #12A150;
        }

        /*  (Floating Symbol) */
        .fortress-float-symbol {
            position: absolute;
            bottom: 155%;
            left: 50%;
            transform: translateX(-50%);
            font-size: clamp(18px, 2.2vw, 34px);
            font-weight: 700;
            line-height: 1;
            animation: floatIcon 2.2s ease-in-out infinite;
            text-shadow: 0 3px 6px rgba(0,0,0,0.1);
            z-index: 12;
        }
        @keyframes floatIcon {
            0%, 100% { bottom: 155%; }
            50% { bottom: 164%; } 
        }

        /*  (Topic Title) */
        .fortress-title {
            position: absolute;
            top: 105%;
            left: 50%;
            transform: translateX(-50%);
            white-space: nowrap;
            font-size: clamp(9px, 0.9vw, 11px);
            font-weight: 800;
            color: #0B2545;
            background: rgba(255, 255, 255, 0.92);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            border: 1px solid #C7D7EC;
            padding: 4px 10px;
            border-radius: 6px;
            box-shadow: 0 4px 6px -1px rgba(11, 37, 69, 0.05);
            pointer-events: none;
            transition: all 0.2s ease;
        }
        .level-fortress:hover .fortress-title {
            border-color: var(--epic-theme-blue);
            background: #ffffff;
            transform: translateX(-50%) translateY(-2px); 
            box-shadow: 0 10px 15px -3px rgba(27, 110, 243, 0.15);
        }

        /* 8  */
        .l1  { left: 19.5%; top: 22.5%; } 
        .l2  { left: 31.0%; top: 29.5%; } 
        .l3  { left: 45.0%; top: 25.0%; } 
        .l4  { left: 63.5%; top: 28.5%; } 
        .l5  { left: 20.0%; top: 56.5%; } 
        .l6  { left: 36.0%; top: 52.5%; } 
        .l7  { left: 62.0%; top: 50.5%; } 
        .l8  { left: 46.5%; top: 72.5%; }

        /*  Token */
        .player-avatar-token {
            position: absolute;
            width: 44px;
            height: 44px;
            background: linear-gradient(135deg, #1B6EF3 0%, #1B6EF3 100%);
            border: 2.5px solid #ffffff;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: 850;
            color: #ffffff;
            box-shadow: 0 0 20px rgba(27, 110, 243, 0.6), 0 4px 10px rgba(0,0,0,0.15);
            z-index: 99;
            /*  */
            left: 9.5%;
            top: 11%;
            transition: left 0.8s cubic-bezier(0.25, 1, 0.5, 1), top 0.8s cubic-bezier(0.25, 1, 0.5, 1);
            animation: floatAvatar 1.5s ease-in-out infinite alternate;
            pointer-events: none; /*  */
        }
        .player-avatar-token::after {
            content: '';
            position: absolute;
            bottom: -6px;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 0;
            border-left: 6px solid transparent;
            border-right: 6px solid transparent;
            border-top: 6px solid #1B6EF3;
        }

        @keyframes floatAvatar {
            from { transform: translateY(0); }
            to { transform: translateY(-8px); }
        }

        /*  */
        .hl-yellow, .hl-blue, .hl-green, .hl-orange, .hl-pink, .hl-purple, .hl-teal, .hl-red {
            background: transparent;
            padding: 2px 5px;
            border-radius: 4px;
            color: inherit;
            font-weight: 700;
            transition: background 0.2s ease, color 0.2s ease;
        }
        
        /* Unified premium indigo-slate highlight (removes rainbow visual noise) */
        .read-completed .hl-yellow,
        .read-completed .hl-blue,
        .read-completed .hl-green,
        .read-completed .hl-orange,
        .read-completed .hl-pink,
        .read-completed .hl-purple,
        .read-completed .hl-teal,
        .read-completed .hl-red { 
            background: rgba(124, 92, 224, 0.08); 
            color: #1B6EF3; 
        }

        /* Premium Tactile Study Cards for Spec Checklist */
        #specPointsList li {
            cursor: pointer;
            margin-bottom: 12px;
            list-style: none;
            display: flex;
            align-items: start;
            gap: 12px;
            padding: 14px 18px;
            background: #ffffff;
            border: 1px solid #E4EBF5;
            border-radius: 12px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            box-sizing: border-box;
        }

        #specPointsList li:hover {
            transform: translateY(-2px);
            border-color: #C7D7EC;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
        }

        /* Checked state - premium soft green */
        #specPointsList li.read-completed {
            background: linear-gradient(to right, rgba(18, 161, 80, 0.01), rgba(18, 161, 80, 0.04)) !important;
            border-color: rgba(18, 161, 80, 0.25) !important;
            box-shadow: 0 2px 6px rgba(18, 161, 80, 0.02);
        }

        #specPointsList li.read-completed:hover {
            border-color: rgba(18, 161, 80, 0.4) !important;
        }

        #specPointsList li.read-completed .point-title {
            color: #0A6B35;
        }

        #specPointsList li.read-completed .point-desc-text {
            color: #42597A;
            text-decoration: none;
        }

        /* Must Memorise Badge - Permanently Visible & Restrained */
        .must-memorize-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            background: #FFFAF0;
            border: 1px solid #FFF6E5;
            color: #9A4A08; /* warm bronze */
            font-size: 10px;
            font-weight: 800;
            padding: 2px 6px;
            border-radius: 6px;
            margin-right: 6px;
            margin-bottom: 4px;
            box-shadow: 0 1px 2px rgba(154, 74, 8, 0.02);
            vertical-align: middle;
            letter-spacing: 0.3px;
            animation: pulseBadge 1.8s infinite alternate;
        }

        .must-memorize-badge::before {
            content: "⭐";
            font-size: 9px;
        }

        @keyframes pulseBadge {
            from { transform: scale(0.97); }
            to { transform: scale(1.03); }
        }
        
        .read-completed {
            background: rgba(18, 161, 80, 0.04) !important;
        }
        .read-completed .point-desc-text {
            text-decoration: underline;
        }
        
        .reveal-content-box {
            animation: revealSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
            transform-origin: top;
        }
        .already-read .reveal-content-box,
        .reveal-content-box.already-read {
            animation: none !important;
            opacity: 1 !important;
            transform: translateY(0) scaleY(1) !important;
        }
        @keyframes revealSlideDown {
            from { opacity: 0; transform: translateY(-8px) scaleY(0.95); }
            to { opacity: 1; transform: translateY(0) scaleY(1); }
        }
        
        /*  */
        #sideCalloutPanel::before {
            content: '';
            position: absolute;
            top: 20px;
            left: -12px;
            width: 0;
            height: 0;
            border-top: 8px solid transparent;
            border-bottom: 8px solid transparent;
            border-right: 12px solid #ffffff;
        }
        
        .hl-seq {
            opacity: 0;
            display: inline-block;
            animation: seqFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }
        .already-read .hl-seq,
        .reveal-content-box.already-read .hl-seq {
            animation: none !important;
            opacity: 1 !important;
            transform: none !important;
        }
        @keyframes seqFadeIn {
            from { opacity: 0; transform: translateY(4px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /*  */
        .monster { 
            position: absolute; 
            pointer-events: auto; 
            font-size: clamp(20px, 3vw, 48px); 
            z-index: 5; 
            cursor: help;
            transition: transform 0.2s;
        }
        .monster:hover { transform: scale(1.2) rotate(5deg); }
        
        .bat { left: 19%; top: 9%; animation: batFly 2s ease-in-out infinite; }
        @keyframes batFly { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
        
        .slime { left: 9%; top: 23%; animation: bounce 1s infinite alternate; }
        @keyframes bounce { from { transform: translateY(0); } to { transform: translateY(-10px); } }
        
        .bee { left: 52%; top: 27%; font-size: clamp(16px, 2.5vw, 38px); animation: beeMove 3s ease-in-out infinite alternate; }
        @keyframes beeMove { from { transform: translateX(-20px); } to { transform: translateX(20px); } }
        
        .dragon { left: 54%; top: 9%; font-size: clamp(30px, 4.5vw, 64px); }
        .fire { position: absolute; left: 48%; top: 13%; width: 50px; height: 20px; border-radius: 50%; background: radial-gradient(circle, #F5C24A, #E08700, #E5484D); animation: flame 1.8s infinite; transform-origin: right center; z-index: 4; }
        @keyframes flame { 0% { opacity: 0; transform: translateX(0) scaleX(0.4); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateX(-110px) scale(1.6); } }
        
        .piranha { left: 76%; top: 12%; font-size: clamp(16px, 2.5vw, 38px); }
        .skeleton { left: 86%; top: 47%; font-size: clamp(22px, 3.2vw, 50px); animation: patrol 2.5s infinite alternate; }
        @keyframes patrol { from { transform: translateX(-8px); } to { transform: translateX(8px); } }

        /*  */
        .grid-panel { position: absolute; z-index: 105; display: none; pointer-events: none; width: 760px; }
        .panel-left-wing { width: 560px; background: rgba(255, 255, 255, 0.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(27, 110, 243, 0.25); border-radius: 16px; padding: 22px; box-shadow: 0 30px 60px -15px rgba(11, 37, 69, 0.12); box-sizing: border-box; pointer-events: auto; }
        .panel-header { border-bottom: 1px solid rgba(11, 37, 69,0.06); padding-bottom: 10px; margin-bottom: 14px; }
        .panel-header h4 { margin: 0; font-size: 16px; font-weight: 700; color: var(--text-main); }
        .grid-layout { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
        
        .unit-card { background: rgba(248, 251, 255, 0.6); padding: 15px; border-radius: 10px; border: 1px solid var(--border-line); font-size: 13px; text-align: left; cursor: pointer; transition: transform 0.2s, border-color 0.2s, background 0.2s; position: relative; }
        .unit-card:hover { transform: translateY(-2px); border-color: var(--epic-theme-blue); background: #ffffff; box-shadow: 0 10px 20px -5px rgba(27, 110, 243, 0.08); z-index: 120; }
        .unit-card h5 { margin: 0 0 6px 0; font-size: 14.5px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; color: var(--text-main); }
        .unit-card p { margin: 0; color: var(--text-muted); font-size: 12.5px; line-height: 1.4; }

        .panel-right-drawer { position: absolute; left: 100%; top: -1px; margin-left: 14px; width: 170px; background: #ffffff; border: 1px solid rgba(27, 110, 243, 0.2); border-radius: 14px; padding: 10px; box-shadow: 15px 20px 40px -10px rgba(11, 37, 69, 0.1); display: none; flex-direction: column; gap: 8px; box-sizing: border-box; z-index: 100; pointer-events: auto; }
        .panel-right-drawer::before { content: ''; position: absolute; left: -16px; top: -10px; width: 16px; height: calc(100% + 20px); background: transparent; pointer-events: auto; }
        .unit-card:hover .panel-right-drawer { display: flex; animation: drawerSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
        @keyframes drawerSlideIn { from { transform: translateX(-8px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

        .drawer-option-btn { width: 100%; padding: 10px 14px; font-size: 12.5px; font-weight: 700; text-align: left; border: 1px solid var(--border-line); border-radius: 8px; background: #ffffff; color: #42597A; cursor: pointer; transition: all 0.15s ease; display: flex; align-items: center; justify-content: space-between; }
        .drawer-option-btn:hover { background: var(--epic-theme-blue); color: #ffffff; border-color: var(--epic-theme-blue); transform: translateX(4px); box-shadow: 0 4px 12px rgba(27, 110, 243, 0.2); }

        /* ==================== 🏛️ ： (Unit Workspace) ==================== */
        #lesson-view { display: none; background-color: var(--bg-outer-void); min-height: calc(100vh - 80px); }
        .lesson-control-bar { width: 100%; background: #ffffff; border-bottom: 1px solid var(--border-line); padding: 20px 60px; display: flex; align-items: center; justify-content: space-between; }
                .back-map-btn { background: #ffffff; border: 1px solid var(--border-line); padding: 11px 20px; border-radius: 10px; font-size: 14.5px; font-weight: 600; color: #42597A; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; gap: 8px; letter-spacing: 0.1px; }
        .back-map-btn:hover { background: #FFFFFF; border-color: #C7D7EC; color: var(--text-main); transform: translateX(-2px); }

        /* ： (Single Column Centered Layout) -  */
        .lesson-main-workspace { 
            max-width: 1300px; 
            margin: 0 auto; 
            padding: 40px 20px; 
            display: flex; 
            flex-direction: column; 
            gap: 25px; 
            box-sizing: border-box; 
        }
        .lesson-right-syllabus { 
            background: #ffffff; 
            border: 1px solid var(--border-line); 
            border-radius: 24px; 
            padding: 50px 60px; 
            box-shadow: 0 12px 40px -10px rgba(11, 37, 69, 0.04); 
            width: 100%;
        }
        
        .workspace-tab-bar {
            display: flex;
            gap: 12px;
            margin-bottom: 40px;
        }
        .tab-btn {
            background: transparent;
            border: 1px solid transparent;
            padding: 10px 20px;
            font-size: 14px;
            font-weight: 600;
            color: var(--text-muted);
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 6px;
            letter-spacing: 0.2px;
        }
        .tab-btn:hover {
            background: var(--bg-hover);
            color: var(--text-main);
        }
        .tab-btn.active {
            background: var(--epic-theme-blue);
            color: #ffffff;
            box-shadow: 0 4px 12px rgba(27, 110, 243, 0.2);
        }

        .workspace-tab-content {
            display: none;
            animation: fadeInTab 0.3s ease forwards;
        }
        .workspace-tab-content.active {
            display: block;
        }
        @keyframes fadeInTab {
            from { opacity: 0; transform: translateY(6px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .syllabus-title-block { margin-bottom: 35px; }
                .syllabus-title-block h2 { margin: 0 0 8px 0; font-size: 32px; font-weight: 600; letter-spacing: -0.2px; color: #0B2545; line-height: 1.3; }
        .syllabus-title-block p { margin: 0; font-size: 11px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.8px; }

        /*  -  */
        .chat-feed-box {
            display: flex;
            flex-direction: column;
            gap: 16px;
            max-height: 350px;
            overflow-y: auto;
            padding: 10px 4px;
            margin-bottom: 20px;
            scrollbar-width: thin;
        }
                .chat-bubble {
            max-width: 80%;
            padding: 16px 22px;
            border-radius: 18px;
            font-size: 16.5px;
            line-height: 1.6;
            box-shadow: 0 2px 6px rgba(0,0,0,0.02);
            animation: bubblePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
        }
        @keyframes bubblePop {
            from { opacity: 0; transform: scale(0.9) translateY(10px); }
            to { opacity: 1; transform: scale(1) translateY(0); }
        }
        .chat-bubble.tutor {
            background: #F3F7FD;
            color: var(--text-main);
            align-self: flex-start;
            border-top-left-radius: 4px;
            border: 1px solid var(--border-line);
        }
        .chat-bubble.student {
            background: var(--epic-theme-blue);
            color: #ffffff;
            align-self: flex-end;
            border-top-right-radius: 4px;
            box-shadow: 0 5px 15px rgba(27, 110, 243, 0.15);
        }

        .chat-action-control {
            background: #FFFFFF;
            border: 1px solid var(--border-line);
            border-radius: 16px;
            padding: 18px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .chat-option-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 10px;
        }
                .chat-option-btn {
            background: #ffffff;
            border: 1px solid var(--border-line);
            padding: 14px 24px;
            border-radius: 10px;
            font-size: 16px;
            font-weight: 800;
            text-align: left;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .chat-option-btn:hover {
            border-color: var(--epic-theme-blue);
            background: #F2F7FE;
            color: var(--epic-theme-blue);
            transform: translateX(2px);
        }

        /* ==================== ⚔️  ==================== */
        .sandbox-container { max-width: 100%; background: #ffffff; position: relative; }
        .sandbox-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; margin-bottom: 18px; border-bottom: 1px solid var(--border-line); }
        .sandbox-header h2 { margin: 0; font-size: 18px; font-weight: 800; }
        .tag-indicator { background: #F2F7FE; color: var(--epic-theme-blue); font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 6px; }
        
                .battle-question-box { font-size: 19px; line-height: 1.7; color: #0B2545; margin-bottom: 22px; padding: 24px; background: #FFFFFF; border-radius: 14px; border-left: 4px solid var(--epic-theme-blue); }
        .trap-highlight-unit { display: inline-block; position: relative; padding: 0 2px; font-weight: 700; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
        .trap-highlight-unit.activated { color: var(--trap-warn-orange); transform: scale(1.1); text-shadow: 0 0 10px rgba(224, 135, 0, 0.15); }
        .trap-highlight-unit.activated::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 100%; height: 3px; background: var(--trap-warn-orange); border-radius: 1px; animation: handWrite 0.4s ease-out forwards; }
        @keyframes handWrite { from { width: 0; } to { width: 100%; } }

        @keyframes scalePulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.15); }
            100% { transform: scale(1); }
        }
        .pulse-active {
            animation: scalePulse 0.4s ease;
        }

        .input-action-bar { display: flex; gap: 12px; margin-bottom: 22px; }
        .answer-input { flex-grow: 1; border: 2px solid var(--border-line); border-radius: 12px; padding: 14px 18px; font-size: 18px; font-weight: 700; outline: none; transition: border-color 0.2s; }
        .answer-input:focus { border-color: var(--epic-theme-blue); }
        .submit-btn { background: var(--epic-theme-blue); color: white; border: none; padding: 0 28px; border-radius: 12px; font-size: 15.5px; font-weight: 700; cursor: pointer; transition: background 0.2s, transform 0.1s; }
        .submit-btn:hover { background: #1557C7; }
        .submit-btn:active { transform: scale(0.97); }

        .smart-hint-panel { background: #FFF7EE; border: 1px dashed #FFEED6; border-radius: 18px; padding: 18px; display: none; flex-direction: column; gap: 10px; }
        .hint-badge { align-self: flex-start; background: #FDEEF4; color: var(--trap-warn-orange); font-size: 10px; font-weight: 800; padding: 4px 10px; border-radius: 6px; }
        .hint-text { font-size: 16px; color: #7A3308; line-height: 1.6; }

        .focus-mode-active .reveal-content-box {
            display: none !important;
        }

        /* ==================== 📇 3D Flip Flashcards ==================== */
        .flashcard-card {
            perspective: 1000px;
            height: 180px;
            cursor: pointer;
            position: relative;
        }
        .flashcard-inner {
            position: relative;
            width: 100%;
            height: 100%;
            text-align: center;
            transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
            transform-style: preserve-3d;
            box-shadow: 0 4px 15px rgba(11, 37, 69,0.03);
            border-radius: 16px;
        }
        .flashcard-card.flipped .flashcard-inner {
            transform: rotateY(180deg);
        }
        .flashcard-front, .flashcard-back {
            position: absolute;
            width: 100%;
            height: 100%;
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
            border-radius: 16px;
            border: 1px solid var(--border-line);
            padding: 20px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            background: #ffffff;
            box-sizing: border-box;
        }
        .flashcard-front {
            color: #0B2545;
        }
        .flashcard-back {
            background: #FFFFFF;
            color: #42597A;
            transform: rotateY(180deg);
            font-size: 14px;
            line-height: 1.6;
        }
        .flashcard-star {
            position: absolute;
            top: 12px;
            right: 12px;
            font-size: 16px;
            cursor: pointer;
            z-index: 10;
            color: #C7D7EC;
            transition: color 0.2s, transform 0.1s;
        }
        .flashcard-star:hover {
            transform: scale(1.2);
        }
        .flashcard-star.starred {
            color: #E8A317;
            text-shadow: 0 0 8px rgba(232, 163, 23, 0.4);
        }

        /* ===  Segmented Tab Control === */
        .view-mode-selector {
            display: inline-flex;
            background: #F3F7FD;
            border-radius: 9999px;
            padding: 4px;
            margin: 10px auto 25px auto;
            border: 1px solid var(--border-line);
            box-shadow: 0 4px 6px -1px rgba(11, 37, 69, 0.03);
            justify-content: center;
        }
        .mode-tab-btn {
            background: transparent;
            border: none;
            border-radius: 9999px;
            padding: 8px 20px;
            font-size: 13.5px;
            font-weight: 700;
            color: #5A7396;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .mode-tab-btn:hover {
            color: var(--text-main);
        }
        .mode-tab-btn.active {
            background: #ffffff;
            color: var(--epic-theme-blue);
            box-shadow: 0 4px 10px rgba(11, 37, 69, 0.05);
        }

        /* === Constellation Tree Styles (Horizontal Mind-Map Style) === */

        
        /* 🎛️ Draggable Splitter Divider Style */
        .split-resizer {
            width: 6px;
            cursor: col-resize;
            background: rgba(228, 235, 245, 0.8);
            height: 100%;
            z-index: 99;
            position: relative;
            transition: background-color 0.2s, box-shadow 0.2s;
        }
        .split-resizer:hover, .split-resizer.dragging {
            background: var(--epic-theme-blue);
            box-shadow: 0 0 8px rgba(27, 110, 243, 0.4);
        }



        .orb-inner {
            font-family: 'Outfit', sans-serif;
            font-size: 20px;
            font-weight: 800;
        }
        .orb-label {
            position: absolute;
            left: 78px;
            top: 12px;
            width: 220px;
            font-size: 15px;
            font-weight: 700;
            color: var(--text-main);
            text-align: left;
            pointer-events: none;
            transition: color 0.2s;
        }

        .orb-progress {
            position: absolute;
            left: 78px;
            top: 36px;
            width: 220px;
            font-size: 12px;
            font-weight: 600;
            color: var(--text-muted);
            text-align: left;
            pointer-events: none;
        }
        
        /* 💊 Clean Compact Subtopic Capsule Card (Glassmorphism White Theme) */







        
        /* Progress Status Dot with breathing glow */
        .capsule-progress-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #C7D7EC;
            display: inline-block;
            margin-right: 8px;
            flex-shrink: 0;
            position: relative;
        }


        
        @keyframes dot-pulse-gold {
            0% { box-shadow: 0 0 0 0 rgba(224, 135, 0, 0.7); }
            70% { box-shadow: 0 0 0 6px rgba(224, 135, 0, 0); }
            100% { box-shadow: 0 0 0 0 rgba(224, 135, 0, 0); }
        }
        @keyframes dot-pulse-green {
            0% { box-shadow: 0 0 0 0 rgba(18, 161, 80, 0.7); }
            70% { box-shadow: 0 0 0 6px rgba(18, 161, 80, 0); }
            100% { box-shadow: 0 0 0 0 rgba(18, 161, 80, 0); }
        }

        .capsule-label {
            font-size: 12.5px;
            font-weight: 750;
            color: #42597A;
            text-align: left;
            width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            pointer-events: none;
            transition: color 0.2s;
        }

        
        /* 📊 Compact Colormap Progress Bar beneath the capsule */
        .colormap-bar {
            width: 100%;
            height: 3px;
            border-radius: 9999px;
            background: #F3F7FD;
            margin-top: 5px;
            overflow: hidden;
            pointer-events: none;
        }

        
        /* 📊 Compact Colormap Progress Bar beneath the capsule */
        .colormap-bar {
            width: 100%;
            height: 3px;
            border-radius: 9999px;
            background: #E4EBF5;
            margin-top: 5px;
            overflow: hidden;
            pointer-events: none;
        }
        .colormap-fill {
            height: 100%;
            border-radius: 9999px;
            transition: width 0.3s;
        }



        /* 🚪 Sliding Detail Sidebar Drawer */


        .drawer-header {
            border-bottom: 1px solid var(--border-line);
            padding-bottom: 16px;
        }
        .drawer-title-row {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 10px;
        }
        .drawer-header h3 {
            font-size: 16px;
            margin: 0;
            font-weight: 800;
            color: var(--text-main);
            line-height: 1.3;
        }
        .spec-badge {
            background: #F2F7FE;
            color: var(--epic-theme-blue);
            padding: 3px 8px;
            border-radius: 6px;
            font-size: 10px;
            font-weight: 800;
            letter-spacing: 0.5px;
            white-space: nowrap;
        }
        .drawer-body {
            flex: 1;
            overflow-y: auto;
            margin: 20px 0;
            padding-right: 4px;
        }
        .drawer-body::-webkit-scrollbar {
            width: 4px;
        }
        .drawer-body::-webkit-scrollbar-thumb {
            background: #C7D7EC;
            border-radius: 4px;
        }
        .drawer-section {
            margin-bottom: 20px;
        }
        .drawer-section h4 {
            font-size: 11px;
            text-transform: uppercase;
            color: var(--text-muted);
            font-weight: 800;
            margin: 0 0 8px 0;
            letter-spacing: 0.8px;
        }
        /* Interactive Learning Pathway List */










        /* ==================== 📊 GCSE Physics Dashboard Styles ==================== */
        .topic-card {
            background: #ffffff;
            border: 1px solid var(--border-line);
            border-radius: 16px;
            padding: 20px;
            box-shadow: 0 4px 15px rgba(11, 37, 69,0.02);
            cursor: pointer;
            transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            min-height: 190px;
            position: relative;
            box-sizing: border-box;
        }
        .topic-card:hover {
            transform: translateY(-5px) scale(1.03);
            border-color: var(--epic-theme-blue);
            box-shadow: 0 12px 30px rgba(27, 110, 243, 0.12);
        }
        .topic-card-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 14px;
        }
        .topic-card-icon {
            font-size: 24px;
            background: #F3F7FD;
            width: 48px;
            height: 48px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background-color 0.2s;
        }
        .topic-card:hover .topic-card-icon {
            background: #F2F7FE;
        }
        .topic-card-weight {
            background: #F3F7FD;
            color: var(--text-muted);
            font-size: 10px;
            font-weight: 800;
            padding: 4px 10px;
            border-radius: 6px;
            letter-spacing: 0.5px;
            text-transform: uppercase;
            transition: all 0.2s;
        }
        .topic-card:hover .topic-card-weight {
            background: #F2F7FE;
            color: var(--epic-theme-blue);
        }
        .topic-card-title {
            font-size: 15px;
            font-weight: 850;
            color: var(--text-main);
            margin: 0 0 6px 0;
            line-height: 1.3;
        }
        .topic-card-units {
            font-size: 12px;
            color: var(--text-muted);
            font-weight: 700;
            margin-bottom: 14px;
        }
        .topic-card-progress-bar {
            width: 100%;
            height: 6px;
            background: #E4EBF5;
            border-radius: 9999px;
            overflow: hidden;
            margin-bottom: 12px;
        }
        .topic-card-progress-fill {
            height: 100%;
            background: var(--epic-theme-blue);
            border-radius: 9999px;
            transition: width 0.3s;
        }
        .topic-card-action {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 11px;
            font-weight: 750;
            color: var(--text-muted);
            transition: color 0.2s;
        }
        .topic-card:hover .topic-card-action {
            color: var(--epic-theme-blue);
        }
        /*  (Engineering Status Colors) */
        .topic-card[data-status="mastered"] { border-color: #C9EFD9; }
        .topic-card[data-status="mastered"] .topic-card-progress-fill {
            background: linear-gradient(90deg, #12A150, #3FCB8A);
        }
        .topic-card[data-status="mastered"] .topic-card-action { color: #0E8F46; }
        .topic-card[data-status="in-progress"] { border-color: #CFE0FA; }
        .topic-card[data-status="in-progress"] .topic-card-progress-fill {
            background: linear-gradient(90deg, #1B6EF3, #5C93F0);
        }
        .topic-card[data-status="locked"] .topic-card-progress-fill {
            background: #C7D7EC;
        }

        /* ==================== 🎮  (Topic Card v2)  ==================== */
        .topic-card-level-body {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin-top: 6px;
        }
        .topic-mode-row {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 3px 0;
        }
        .topic-mode-icon {
            font-size: 13px;
            width: 20px;
            text-align: center;
            flex-shrink: 0;
        }
        .topic-mode-label {
            font-size: 10.5px;
            font-weight: 700;
            color: var(--text-muted);
            width: 92px;
            flex-shrink: 0;
            white-space: nowrap;
        }
        /*  */
        .topic-detailed-modes {
            max-height: 0;
            opacity: 0;
            overflow: hidden;
            transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
            margin-top: 0;
            display: flex;
            flex-direction: column;
            gap: 5px;
        }
        /* 「」， */
        .topic-total-row:hover ~ .topic-detailed-modes,
        .topic-detailed-modes:hover {
            max-height: 160px;
            opacity: 1;
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px dashed var(--border-line);
        }

        /*  (Segmented HP Bar Container) */
        .topic-mode-bar.segmented-bar {
            flex: 1;
            height: 10px; /*  */
            background: #0B2545; /*  */
            border: 1px solid #42597A; /*  */
            border-radius: 4px;
            overflow: hidden;
            display: flex;
            gap: 1.5px; /*  */
            padding: 1.5px;
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
            box-sizing: border-box;
        }
        
        /*  (、) */
        .topic-total-row .topic-mode-bar.segmented-bar.total-bar {
            height: 14px;
            border: 1.5px solid #42597A;
            border-radius: 5px;
            padding: 2px;
            gap: 2px;
        }

        /*  (Segment Blocks) */
        .bar-segment {
            flex: 1;
            height: 100%;
            background: #0B2545; /*  */
            border-radius: 1px;
            transition: background 0.3s ease, box-shadow 0.3s ease;
        }

        /*  */
        .bar-segment.active {
            background: linear-gradient(180deg, #5C93F0 0%, #1B6EF3 50%, #1148A8 100%);
            box-shadow: 0 0 5px rgba(27, 110, 243, 0.6);
        }

        /*  */
        .bar-segment.active.total {
            background: linear-gradient(180deg, #3FCB8A 0%, #0E8F46 50%, #085C2E 100%);
            box-shadow: 0 0 8px rgba(63, 203, 138, 0.7);
            animation: led-pulse 2s infinite ease-in-out;
        }

        /*  */
        @keyframes led-pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.85; }
        }

        .topic-mode-pct {
            font-size: 10.5px;
            font-weight: 800;
            color: var(--text-main);
            width: 30px;
            text-align: right;
            flex-shrink: 0;
            font-variant-numeric: tabular-nums;
        }
        /*  ()：、 */
        .topic-mode-row.reserved {
            opacity: 0.55;
        }
        .topic-mode-row.reserved .topic-mode-fill {
            background: linear-gradient(180deg, #C7D7EC 0%, #7C93B4 50%, #5A7396 100%);
            box-shadow: none;
        }
        .topic-mode-row.reserved .topic-mode-fill::after {
            display: none;
        }
        .topic-mode-row.reserved .topic-mode-pct {
            color: #7C93B4;
            font-weight: 600;
        }
        /*  (、) */
        .topic-total-row {
            border-top: none;
            margin-top: 2px;
            padding-top: 0;
            margin-bottom: 2px;
        }
        .topic-total-row .topic-mode-bar {
            height: 12px;
            border: 1.5px solid #42597A;
            border-radius: 6px;
            padding: 1.5px;
        }
        .topic-total-row .topic-mode-label {
            color: var(--text-main);
            font-size: 11px;
        }
        .topic-card-units {
            font-size: 11px;
            color: var(--text-muted);
            font-weight: 700;
            margin-top: 7px;
        }
        .topic-card-action {
            margin-top: 4px;
        }
        .back-home-btn:hover {
            border-color: var(--text-main) !important;
            color: var(--text-main) !important;
            background: #FFFFFF;
        }
        #dashResumeBtn:hover {
            background: #1557C7 !important;
            box-shadow: 0 4px 12px rgba(27, 110, 243, 0.2);
        }

        /* ==================== 📋 Kanban Study Board Split Pane Styles ==================== */
        .tree-kanban-split-container {
            display: flex;
            width: 100%;
            height: 100%;
            position: relative;
            background: #ffffff;
            box-sizing: border-box;
            border-radius: 24px;
            overflow: hidden;
        }










        /* Specific column color encodings */



        






        /* Border encoding by state */






        



        /* Responsive styling: hide study board on screens smaller than 900px */
        @media (max-width: 900px) {

        }

        /* ⚡ Flowing SVG Laser Line Animation */
        .flowing-laser {
            animation: flowing-laser-animation 15s linear infinite;
        }
        @keyframes flowing-laser-animation {
            to {
                stroke-dashoffset: -400;
            }
        }

        /* 🌌 Visual Entry Gateway Cards */
        .gateway-card {
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
            position: relative;
        }
        .gateway-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.8), transparent);
            opacity: 0.6;
            pointer-events: none;
            z-index: 1;
        }
        .gateway-card:hover {
            transform: translateY(-4px) scale(1.01);
            box-shadow: 0 10px 25px rgba(11, 37, 69, 0.05) !important;
        }
        .campaign-gateway:hover {
            border-color: #1B6EF3 !important;
            background: linear-gradient(135deg, #ffffff, #E8F1FE) !important;
        }
        .tree-gateway:hover {
            border-color: #12A150 !important;
            background: linear-gradient(135deg, #ffffff, #DCF5E6) !important;
        }

        /* 🗂️ Styled Collapsible Details Accordions */
        .styled-details {
            border: 1px solid var(--border-line);
            border-radius: 16px;
            overflow: hidden;
            background: #ffffff;
            transition: box-shadow 0.2s;
            margin-bottom: 20px;
        }
        .styled-details[open] {
            box-shadow: 0 4px 15px rgba(11, 37, 69,0.02);
        }
        .styled-details summary {
            padding: 16px 20px;
            background: #FFFFFF;
            cursor: pointer;
            list-style: none;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 13.5px;
            font-weight: 800;
            color: var(--text-main);
            outline: none;
            user-select: auto;
            border-bottom: 1px solid transparent;
            transition: background-color 0.2s, border-color 0.2s;
        }
        .styled-details[open] summary {
            border-color: var(--border-line);
            background: #ffffff;
        }
        .styled-details summary:hover {
            background: #F3F7FD;
        }
          /* ==================== 🗂️ Systems Engineering Split-Pane Directory & Workspace ==================== */
        .transit-map-wrapper {
            position: relative;
        }
        
        /* Left list topics */
        .directory-topics-list {
            padding: 15px;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .directory-topic-card {
            background: #ffffff;
            border: 1px solid #C7D7EC;
            border-radius: 12px;
            padding: 14px 18px;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            display: flex;
            flex-direction: column;
            gap: 6px;
            box-shadow: 0 2px 4px rgba(11, 37, 69, 0.01);
            position: relative;
            overflow: hidden;
            font-family: 'Outfit', sans-serif;
        }
        .directory-topic-card:hover {
            border-color: #1B6EF3;
            background: #FFFFFF;
            transform: translateY(-2px) scale(1.02);
            box-shadow: 0 6px 16px rgba(11, 37, 69, 0.05);
        }
        .directory-topic-card.active {
            border-color: transparent;
            background: #E8F1FE; /* 淡淺藍色 */
            box-shadow: 0 2px 8px rgba(27, 110, 243, 0.1);
        }
        
        .directory-topic-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
        }
        .directory-topic-card-title {
            font-size: 13px;
            font-weight: 800;
            color: #0B2545;
        }
        .directory-topic-card.active .directory-topic-card-title {
            color: #0A2F73;
        }
        .directory-topic-card-progress {
            font-size: 11px;
            font-weight: 700;
            color: #5A7396;
        }
        .directory-topic-card.active .directory-topic-card-progress {
            color: #1557C7;
        }
        
        /* Directory left sidebar default */
        .directory-left-sidebar {
            width: 320px;
            min-width: 320px;
            background: #ffffff;
            border-right: 1px solid #E4EBF5;
            display: flex;
            flex-direction: column;
            height: 100%;
            transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
            z-index: 100;
        }

        /* In Lesson Mode, left sidebar transforms into an on-demand drawer and right sidebar is hidden */
        .map-three-column-container.lesson-view-mode .directory-left-sidebar {
            position: absolute;
            top: 0;
            left: 0;
            bottom: 0;
            width: 340px !important;
            min-width: 340px !important;
            max-width: 340px !important;
            box-shadow: 10px 0 35px rgba(11, 37, 69, 0.16);
            border-radius: 20px 0 0 20px;
            transform: translateX(-105%);
            opacity: 0;
            pointer-events: none;
            background: #ffffff;
        }

        .map-three-column-container.lesson-view-mode .directory-left-sidebar.drawer-open {
            transform: translateX(0);
            opacity: 1;
            pointer-events: auto;
        }

        .map-three-column-container.lesson-view-mode .right-info-sidebar,
        .map-three-column-container.lesson-view-mode + .right-info-sidebar {
            display: none !important;
        }
        .map-three-column-container.lesson-view-mode .center-workspace-panel {
            border-right: none !important;
            width: 100% !important;
            flex: 1 1 100% !important;
        }

        #map-view .upper-curriculum-deck {
            display: none !important;
        }
        .directory-right-content-inner {
            max-width: 900px;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            gap: 20px;
            padding: 24px 20px;
            box-sizing: border-box;
        }
        
        .directory-workspace-header {
            background: #ffffff;
            border: 1px solid #E4EBF5;
            border-radius: 16px;
            padding: 20px;
            box-shadow: 0 4px 12px rgba(11, 37, 69, 0.02);
            display: flex;
            flex-direction: column;
            gap: 12px;
            font-family: 'Outfit', sans-serif;
        }
        
        /* CAD I/O Flow schematic banner */
        .cad-flow-banner {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: #FFFFFF;
            border: 1px solid #F3F7FD;
            padding: 12px 18px;
            border-radius: 10px;
            gap: 12px;
        }
        .cad-flow-box {
            display: flex;
            flex-direction: column;
            gap: 4px;
            flex: 1;
        }
        .cad-flow-box.in {
            align-items: flex-start;
        }
        .cad-flow-box.out {
            align-items: flex-end;
        }
        .cad-flow-label {
            font-size: 9px;
            font-weight: 850;
            color: #7C93B4;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .cad-flow-value {
            font-size: 11.5px;
            font-weight: 800;
            color: #42597A;
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }
        
        .cad-flow-arrow-container {
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            padding: 0 10px;
        }
        .cad-flow-arrow-line {
            width: 80px;
            height: 2px;
            background: #C7D7EC;
            position: relative;
        }
        .cad-flow-arrow-line::after {
            content: '';
            position: absolute;
            right: 0;
            top: -3px;
            width: 0;
            height: 0;
            border-top: 4px solid transparent;
            border-bottom: 4px solid transparent;
            border-left: 6px solid #C7D7EC;
        }
        .cad-flow-arrow-line.active {
            background: #1B6EF3;
            box-shadow: 0 0 8px rgba(27, 110, 243, 0.4);
        }
        .cad-flow-arrow-line.active::after {
            border-left-color: #1B6EF3;
        }

        .system-block-card {
            background: #ffffff;
            border: 1px solid var(--border-line);
            border-radius: 16px;
            padding: 20px;
            box-shadow: 0 4px 15px rgba(11, 37, 69,0.02);
            position: relative;
            box-sizing: border-box;
        }
        .system-block-title {
            margin: 0;
            font-size: 16px;
            font-weight: 700;
            color: #0B2545;
            letter-spacing: -0.2px;
            line-height: 1.3;
        }
        .system-flow-arrow {
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }
        
        /* Subtopic horizontal workspace card */
        .directory-subtopic-card {
            background: #ffffff;
            border: 1px solid #E4EBF5;
            border-radius: 16px;
            padding: 16px 20px;
            display: flex;
            align-items: center;
            gap: 18px;
            box-shadow: 0 2px 6px rgba(11, 37, 69, 0.01);
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            font-family: 'Outfit', sans-serif;
        }
        .directory-subtopic-card:hover {
            border-color: #C7D7EC;
            box-shadow: 0 12px 28px rgba(11, 37, 69, 0.06);
            transform: translateY(-3px) scale(1.02);
        }
        .directory-subtopic-card.completed {
            border-color: rgba(18, 161, 80, 0.2);
            background: rgba(18, 161, 80, 0.01);
        }
        
        .subtopic-card-checkbox {
            width: 22px;
            height: 22px;
            border-radius: 6px;
            border: 2px solid #C7D7EC;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 13px;
            color: #ffffff;
            flex-shrink: 0;
            transition: all 0.2s;
            background: #ffffff;
        }
        .subtopic-card-checkbox:hover {
            border-color: #7C93B4;
        }
        .directory-subtopic-card.completed .subtopic-card-checkbox {
            background: #12A150;
            border-color: #12A150;
        }
        
        .subtopic-card-thumb {
            width: 38px;
            height: 38px;
            border-radius: 10px;
            background: #FFFFFF;
            border: 1px solid #E4EBF5;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            flex-shrink: 0;
        }
        .directory-subtopic-card.completed .subtopic-card-thumb {
            background: #EEF9F3;
            border-color: #B6EBCE;
        }
        
        .subtopic-card-info {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 4px;
            min-width: 0;
        }
        .subtopic-card-title {
            font-size: 14.5px;
            font-weight: 800;
            color: #0B2545;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .directory-subtopic-card.completed .subtopic-card-title {
            color: #5A7396;
            text-decoration: line-through;
        }
        .subtopic-card-desc {
            font-size: 12px;
            color: #5A7396;
            line-height: 1.4;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .subtopic-card-progress-bar {
            width: 130px;
            height: 5px;
            background: #E4EBF5;
            border-radius: 3px;
            overflow: hidden;
            position: relative;
        }
        .subtopic-card-progress-fill {
            height: 100%;
            background: #12A150;
            transition: width 0.3s ease;
        }
        
        .subtopic-card-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }
        .subtopic-action-btn {
            background: #ffffff;
            border: 1px solid #C7D7EC;
            padding: 8px 14px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 700;
            color: #42597A;
            cursor: pointer;
            transition: all 0.15s ease;
            display: flex;
            align-items: center;
            gap: 4px;
        }
        .subtopic-action-btn:hover {
            border-color: #1B6EF3;
            background: #F2F7FE;
            color: #1557C7;
        }
        .subtopic-action-btn.challenge:hover {
            border-color: #D97706;
            background: #FFF7EE;
            color: #B03A0A;
        }

        @media (max-width: 768px) {
            .banner-separator { display: none; }
        }

        /* Split-Pane Study Workspace */
        .split-pane-workspace {
            display: flex;
            gap: 30px;
            align-items: flex-start;
            width: 100%;
            box-sizing: border-box;
        }
        .left-simulator-pane {
            flex: 1.2;
            min-width: 320px;
            max-width: 640px;
            background: #ffffff;
            border: 1px solid #E4EBF5;
            border-radius: 20px;
            padding: 24px;
            box-shadow: 0 10px 40px -10px rgba(11, 37, 69, 0.03);
            position: sticky;
            top: 20px;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .right-study-pane {
            flex: 1;
            min-width: 320px;
            background: #ffffff;
            border: 1px solid #E4EBF5;
            border-radius: 20px;
            padding: 24px;
            box-shadow: 0 10px 40px -10px rgba(11, 37, 69, 0.03);
            box-sizing: border-box;
        }
        @media (max-width: 1024px) {
            .split-pane-workspace {
                flex-direction: column;
                align-items: center;
                gap: 20px;
            }
            .left-simulator-pane {
                position: static;
                max-width: 100%;
                width: 100%;
            }
            .right-study-pane {
                width: 100%;
            }
        }

        /* ==================== 💎 COGNITO + SAVE MY EXAMS DESIGN SYSTEM ==================== */
        
        /* 1. Cognito Sticky Lesson Header */
        .cognito-lesson-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 0;
            margin: 0 auto 20px auto;
            background: transparent;
            border: none;
            width: 100%;
            box-shadow: none;
            flex-wrap: nowrap; /* Force one row */
            gap: 12px;
            font-family: 'Outfit', 'Inter', sans-serif;
            position: sticky;
            top: 16px;
            z-index: 100;
            width: 100%;
        }
        .lesson-header-left {
            display: flex;
            align-items: center;
            gap: 14px;
            flex-wrap: wrap;
        }
        .back-nav-btn {
            background: #FFFFFF;
            border: 1px solid #C7D7EC;
            color: #42597A;
            padding: 7px 14px;
            border-radius: 10px;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .back-nav-btn:hover {
            background: #E4EBF5;
            color: #0B2545;
            transform: translateX(-2px);
        }
        .lesson-breadcrumbs {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 13px;
            font-weight: 600;
            color: #5A7396;
            white-space: nowrap;
            flex-wrap: nowrap;
        }
        .crumb-link {
            cursor: pointer;
            transition: color 0.15s ease;
            max-width: 150px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: inline-block;
            vertical-align: middle;
        }
        .crumb-link:hover {
            color: #1557C7;
            text-decoration: underline;
        }
        .crumb-separator {
            color: #C7D7EC;
            font-size: 12px;
        }
        .crumb-current {
            color: #0B2545;
            font-weight: 800;
            max-width: 200px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: inline-block;
            vertical-align: middle;
        }
        .lesson-header-right {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .header-util-btn {
            background: #F2F7FE;
            border: 1px solid #CFE0FA;
            color: #1557C7;
            padding: 7px 14px;
            border-radius: 10px;
            font-size: 12px;
            font-weight: 750;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .header-util-btn:hover {
            background: #E8F1FE;
            color: #1148A8;
            transform: translateY(-1px);
        }
        .lesson-prev-next-group {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .lesson-nav-btn {
            background: #ffffff;
            border: 1px solid #C7D7EC;
            color: #42597A;
            padding: 7px 14px;
            border-radius: 10px;
            font-size: 12px;
            font-weight: 750;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .lesson-nav-btn:hover {
            background: #F3F7FD;
            border-color: #7C93B4;
        }
        .lesson-nav-btn.primary {
            background: #1B6EF3;
            border-color: #1B6EF3;
            color: #ffffff;
        }
        .lesson-nav-btn.primary:hover {
            background: #1557C7;
            box-shadow: 0 4px 12px rgba(27, 110, 243, 0.25);
            transform: translateX(2px);
        }

        /* 2. Unit Title & Metadata Banner */
        .cognito-study-console {
            display: flex;
            flex-direction: column;
            width: 100%;
            margin: 0 auto;
            gap: 20px;
        }
        .lesson-title-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 15px;
        }
        .title-meta {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        .spec-tier-pill {
            font-size: 11px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.6px;
            background: #F2F7FE;
            color: #1B6EF3;
            padding: 3px 8px;
            border-radius: 6px;
            width: fit-content;
        }
        .lesson-title-row h1 {
            font-size: 26px;
            font-weight: 850;
            color: #0B2545;
            margin: 0;
            letter-spacing: -0.5px;
            font-family: 'Outfit', sans-serif;
        }
        .action-pill-btn {
            background: #FFFFFF;
            border: 1.5px solid #C7D7EC;
            padding: 8px 16px;
            border-radius: 12px;
            font-size: 12.5px;
            font-weight: 750;
            color: #42597A;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            font-family: 'Outfit', sans-serif;
        }
        .action-pill-btn:hover {
            background: #EEF9F3;
            border-color: #12A150;
            color: #0A6B35;
        }
        .action-pill-btn.completed {
            background: #EEF9F3;
            border-color: #12A150;
            color: #0B7A3C;
            font-weight: 800;
        }

        /* 3. Cognito 4-Segmented Tabs Bar */
        .cognito-tabs-bar {
            display: flex;
            gap: 8px;
            background: #F3F7FD;
            padding: 6px;
            border-radius: 16px;
            border: 1px solid #E4EBF5;
            width: 100%;
            box-sizing: border-box;
            overflow-x: auto;
        }
        .cognito-tab-item {
            flex: 1;
            min-width: 140px;
            background: transparent;
            border: none;
            border-radius: 11px;
            padding: 11px 16px;
            font-size: 13.5px;
            font-weight: 750;
            color: #5A7396;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            font-family: 'Outfit', sans-serif;
            white-space: nowrap;
        }
        .cognito-tab-item:hover:not(.active) {
            background: rgba(255, 255, 255, 0.6);
            color: #0B2545;
        }
        .cognito-tab-item.active {
            background: #ffffff;
            color: #0B2545;
            box-shadow: 0 4px 12px rgba(11, 37, 69, 0.06);
            font-weight: 850;
        }
        .tab-badge {
            font-size: 10px;
            font-weight: 800;
            background: #E8F1FE;
            color: #0D3B8F;
            padding: 2px 6px;
            border-radius: 6px;
        }
        .tab-badge-score {
            font-size: 10px;
            font-weight: 800;
            background: #FFF6E5;
            color: #8A4408;
            padding: 2px 6px;
            border-radius: 6px;
        }

        /* 4. Tab Panels */
        .study-tab-panel {
            width: 100%;
            animation: fadeIn 0.25s ease-out;
        }

        /* 5. Save My Exams Revision Notes Layout with TOC & Zoom Engine */
        .map-three-column-container {
            display: flex;
            min-height: 750px;
            height: auto;
            background: #FFFFFF;
            border: 1px solid var(--border-line);
            border-radius: 24px;
            margin: 20px;
            box-shadow: 0 10px 45px rgba(11, 37, 69,0.04);
            position: relative;
            transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        }

        /* Responsive full-width stage when in lesson mode */
        .map-three-column-container.lesson-view-mode {
            border-radius: 20px;
            margin: 15px auto;
            max-width: 1440px;
            min-height: calc(100vh - 110px);
            border-color: #E4EBF5;
        }

        .chapters-drawer-backdrop {
            display: none;
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(11, 37, 69, 0.35);
            backdrop-filter: blur(2px);
            z-index: 95;
            border-radius: 20px;
            opacity: 0;
            transition: opacity 0.2s ease;
        }
        .chapters-drawer-backdrop.active {
            display: block;
            opacity: 1;
        }

        .sidebar-close-x-btn {
            background: transparent;
            border: 1px solid #E4EBF5;
            border-radius: 8px;
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 13px;
            font-weight: 700;
            color: #5A7396;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .sidebar-close-x-btn:hover {
            background: #FDE4E4;
            color: #E5484D;
            border-color: #F5A8A8;
        }

        /* Hide close button when in normal directory mode */
        .map-three-column-container:not(.lesson-view-mode) .sidebar-close-x-btn {
            display: none;
        }

        /* Right info sidebar hidden by default in lesson mode */
        .map-three-column-container.lesson-view-mode .right-info-sidebar {
            display: none !important;
        }

        .map-three-column-container.lesson-view-mode .center-workspace-panel {
            border-right: none;
            border-radius: 20px;
            background: transparent;
        }

        /* Font Zoom Controller */
        .font-zoom-control-group {
            display: flex;
            align-items: center;
            background: #F3F7FD;
            border: 1px solid #E4EBF5;
            border-radius: 8px;
            padding: 2px 4px;
            gap: 4px;
        }
        .font-zoom-btn {
            background: transparent;
            border: none;
            padding: 3px 8px;
            border-radius: 6px;
            font-size: 11.5px;
            font-weight: 800;
            color: #42597A;
            cursor: pointer;
            font-family: 'Outfit', sans-serif;
            transition: all 0.15s ease;
        }
        .font-zoom-btn:hover {
            background: #ffffff;
            color: #0B2545;
            box-shadow: 0 1px 3px rgba(0,0,0,0.08);
        }
        .font-zoom-label {
            font-size: 11px;
            font-weight: 800;
            color: #1557C7;
            font-family: 'Outfit', sans-serif;
            min-width: 36px;
            text-align: center;
        }

        .focus-mode-btn {
            background: transparent;
            border: 1px solid #E4EBF5;
            border-radius: 8px;
            padding: 6px 12px;
            font-size: 12px;
            font-weight: 750;
            color: #42597A;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            font-family: 'Outfit', sans-serif;
            transition: all 0.2s ease;
        }
        .focus-mode-btn:hover {
            background: #F2F7FE;
            color: #1557C7;
            border-color: #CFE0FA;
        }
        .focus-mode-btn.active {
            background: #1557C7;
            color: #ffffff;
            border-color: #1557C7;
            box-shadow: 0 2px 8px rgba(27, 110, 243, 0.25);
        }

        /* Flowing Lines Animation */
        @keyframes flow-marching-ants {
            from { stroke-dashoffset: 20; }
            to { stroke-dashoffset: 0; }
        }
        .flow-line {
            stroke-dasharray: 6 4;
            animation: flow-marching-ants 0.8s linear infinite;
        }
        .flow-glow {
            filter: drop-shadow(0 0 3px rgba(27, 110, 243,0.5));
        }

        .sidebar-toggle-btn {
            background: #FFFFFF;
            border: 1px solid #E4EBF5;
            border-radius: 8px;
            padding: 6px 12px;
            font-size: 12px;
            font-weight: 750;
            color: #42597A;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            font-family: 'Outfit', sans-serif;
            transition: all 0.15s ease;
        }
        .sidebar-toggle-btn:hover {
            background: #F2F7FE;
            color: #1557C7;
            border-color: #CFE0FA;
        }

        /* 100% Distraction-Free Focus Mode */
        .map-three-column-container.focus-mode-active {
            margin: 0 auto;
            max-width: 100%;
            border-radius: 0;
            border: none;
            box-shadow: none;
        }
        .map-three-column-container.focus-mode-active .sme-toc-sidebar {
            display: none;
        }
        .map-three-column-container.focus-mode-active .sme-notes-main {
            max-width: none;
        }

        /* 6. Save My Exams Rich Content Components */
        .sme-exam-tip-box {
            background: #FFFAF0;
            border: 1px solid #FBDCA6;
            border-left: 5px solid #E08700;
            border-radius: 14px;
            padding: 20px 24px;
            margin: 22px 0;
            color: #7A3E06;
            box-shadow: 0 2px 8px rgba(224, 135, 0, 0.05);
            font-size: 0.96em;
            line-height: 1.75;
        }
        .sme-exam-tip-header {
            font-size: 12px;
            font-weight: 850;
            color: #9A4A08;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            margin-bottom: 6px;
            display: flex;
            align-items: center;
            gap: 6px;
            font-family: 'Outfit', sans-serif;
        }
        
        .sme-trap-box {
            background: #FEF1F2;
            border: 1px solid #FBD5DA;
            border-left: 5px solid #E5484D;
            border-radius: 14px;
            padding: 20px 24px;
            margin: 22px 0;
            color: #8A2438;
            box-shadow: 0 2px 8px rgba(229, 72, 77, 0.05);
            font-size: 0.96em;
            line-height: 1.75;
        }
        .sme-trap-header {
            font-size: 12px;
            font-weight: 850;
            color: #B32840;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            margin-bottom: 6px;
            display: flex;
            align-items: center;
            gap: 6px;
            font-family: 'Outfit', sans-serif;
        }

        .sme-definition-box {
            background: #F2F7FE;
            border: 1px solid #CFE0FA;
            border-left: 5px solid #1B6EF3;
            border-radius: 14px;
            padding: 20px 24px;
            margin: 22px 0;
            color: #0A2F73;
            box-shadow: 0 2px 8px rgba(27, 110, 243, 0.05);
            font-size: 0.96em;
            line-height: 1.75;
        }
        .sme-definition-header {
            font-size: 12px;
            font-weight: 850;
            color: #1148A8;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            margin-bottom: 6px;
            display: flex;
            align-items: center;
            gap: 6px;
            font-family: 'Outfit', sans-serif;
        }

        /* 7. Save My Exams Worked Example Card with 5-Step Solution */
        .sme-worked-example {
            background: #ffffff;
            border: 1.5px solid #E3F7EA;
            border-left: 5px solid #12A150;
            border-radius: 16px;
            padding: 22px 26px;
            margin: 24px 0;
            box-shadow: 0 4px 15px rgba(18, 161, 80, 0.04);
            font-size: 0.96em;
            line-height: 1.75;
        }
        .sme-worked-header {
            font-size: 13px;
            font-weight: 850;
            color: #0B7A3C;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-family: 'Outfit', sans-serif;
        }
        .sme-worked-question {
            font-size: 15px;
            font-weight: 600;
            color: #0B2545;
            line-height: 1.6;
            margin-bottom: 14px;
            background: #FFFFFF;
            padding: 14px 18px;
            border-radius: 10px;
            border: 1px solid #E4EBF5;
        }
        .sme-solution-toggle-btn {
            background: #12A150;
            color: #ffffff;
            border: none;
            border-radius: 8px;
            padding: 8px 16px;
            font-size: 12.5px;
            font-weight: 750;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            font-family: 'Outfit', sans-serif;
        }
        .sme-solution-toggle-btn:hover {
            background: #0E8F46;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(18, 161, 80, 0.25);
        }
        .sme-solution-body {
            margin-top: 16px;
            padding: 18px 20px;
            background: #F2FAF5;
            border-radius: 12px;
            border: 1px solid #C9EFD9;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .sme-step-row {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            font-size: 14.5px;
            line-height: 1.6;
            color: #085C2E;
        }
        .sme-step-badge {
            background: #12A150;
            color: #ffffff;
            font-size: 11px;
            font-weight: 850;
            padding: 2px 8px;
            border-radius: 6px;
            white-space: nowrap;
            font-family: 'Outfit', sans-serif;
        }

        /* 8. Save My Exams Beautiful Markdown Tables */
        .sme-table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
            font-size: 14px;
            border-radius: 12px;
            overflow: hidden;
            border: 1px solid #E4EBF5;
        }
        .sme-table th {
            background: #FFFFFF;
            color: #0B2545;
            font-weight: 800;
            text-align: left;
            padding: 12px 16px;
            border-bottom: 1.5px solid #C7D7EC;
            font-family: 'Outfit', sans-serif;
        }
        .sme-table td {
            padding: 12px 16px;
            border-bottom: 1px solid #E4EBF5;
            color: #42597A;
        }
        .sme-table tr:nth-child(even) {
            background: #FFFFFF;
        }
        .sme-table tr:last-child td {
            border-bottom: none;
        }

        /* 9. Cognito Interactive Quiz Container */
        .cognito-quiz-container {
            background: #ffffff;
            border: 1px solid #E4EBF5;
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 4px 20px -2px rgba(11, 37, 69, 0.03);
            display: flex;
            flex-direction: column;
            gap: 20px;
            width: 100%;
            margin: 0 auto;
        }
        .quiz-toolbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 12px;
            padding-bottom: 16px;
            border-bottom: 1px solid #E4EBF5;
        }
        .difficulty-tier-pills {
            display: flex;
            gap: 6px;
            background: #F3F7FD;
            padding: 4px;
            border-radius: 10px;
        }
        .tier-pill {
            background: transparent;
            border: none;
            padding: 6px 14px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 750;
            color: #5A7396;
            cursor: pointer;
            transition: all 0.15s ease;
            font-family: 'Outfit', sans-serif;
        }
        .tier-pill.active {
            background: #ffffff;
            color: #0B2545;
            box-shadow: 0 2px 4px rgba(11, 37, 69, 0.06);
        }
        .question-carousel-bar {
            display: flex;
            align-items: center;
            gap: 8px;
            overflow-x: auto;
            padding: 4px 0;
        }
        .q-carousel-dot {
            width: 38px;
            height: 38px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 13px;
            font-weight: 800;
            cursor: pointer;
            transition: all 0.2s ease;
            font-family: 'Outfit', sans-serif;
            background: #FFFFFF;
            border: 1.5px solid #C7D7EC;
            color: #42597A;
        }
        .q-carousel-dot:hover {
            border-color: #1B6EF3;
            color: #1557C7;
        }
        .q-carousel-dot.active {
            background: #F2F7FE;
            border-color: #1B6EF3;
            color: #1148A8;
            transform: scale(1.08);
            box-shadow: 0 4px 10px rgba(27, 110, 243, 0.2);
        }
        .q-carousel-dot.correct {
            background: #EEF9F3;
            border-color: #12A150;
            color: #0B7A3C;
        }
        .q-carousel-dot.wrong {
            background: #FEF1F2;
            border-color: #E5484D;
            color: #B32840;
        }

        /* 10. Slide-Over Official Formula Sheet Drawer */
        .formula-drawer-overlay {
            position: fixed;
            top: 0; left: 0;
            width: 100vw; height: 100vh;
            background: rgba(11, 37, 69, 0.4);
            backdrop-filter: blur(4px);
            z-index: 1000;
            display: none;
            opacity: 0;
            transition: opacity 0.25s ease;
        }
        .formula-drawer-overlay.open {
            display: block;
            opacity: 1;
        }
        .formula-drawer {
            position: fixed;
            top: 0; right: -480px;
            width: 460px;
            max-width: 90vw;
            height: 100vh;
            background: #ffffff;
            box-shadow: -10px 0 30px rgba(11, 37, 69, 0.15);
            z-index: 1001;
            display: flex;
            flex-direction: column;
            transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .formula-drawer.open {
            right: 0;
        }
        .formula-drawer-header {
            padding: 24px;
            border-bottom: 1px solid #E4EBF5;
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: #FFFFFF;
        }
        .drawer-close-btn {
            background: none;
            border: none;
            font-size: 24px;
            font-weight: 700;
            color: #7C93B4;
            cursor: pointer;
            padding: 4px 8px;
            line-height: 1;
            border-radius: 6px;
            transition: all 0.15s ease;
        }
        .drawer-close-btn:hover {
            color: #E5484D;
            background: #FEF1F2;
        }
        .formula-drawer-search {
            padding: 16px 24px;
            border-bottom: 1px solid #E4EBF5;
        }
        .formula-drawer-search input {
            width: 100%;
            padding: 10px 14px;
            border-radius: 10px;
            border: 1.5px solid #C7D7EC;
            font-size: 13.5px;
            font-family: inherit;
            outline: none;
            transition: border-color 0.15s ease;
            box-sizing: border-box;
        }
        .formula-drawer-search input:focus {
            border-color: #1B6EF3;
            box-shadow: 0 0 0 3px rgba(27, 110, 243, 0.12);
        }
        .formula-drawer-tabs {
            display: flex;
            gap: 6px;
            padding: 10px 24px;
            background: #FFFFFF;
            border-bottom: 1px solid #E4EBF5;
            overflow-x: auto;
        }
        .f-tab {
            background: transparent;
            border: none;
            padding: 6px 12px;
            border-radius: 6px;
            font-size: 11.5px;
            font-weight: 750;
            color: #5A7396;
            cursor: pointer;
            white-space: nowrap;
            font-family: 'Outfit', sans-serif;
        }
        .f-tab.active {
            background: #ffffff;
            color: #0B2545;
            box-shadow: 0 1px 3px rgba(11, 37, 69, 0.08);
        }
        .formula-drawer-body {
            flex: 1;
            overflow-y: auto;
            padding: 20px 24px;
            display: flex;
            flex-direction: column;
            gap: 14px;
        }
        /* Dim unselected nodes when a flowchart node is active */
        .system-blocks-flow-wrap:has(.active-expanded) .system-block-card:not(.active-expanded) {
            opacity: 0.5;
            transform: scale(0.98);
        }
        
        .chapter-subtopics-panel {
            background: #ffffff;
            border: 1px solid #E4EBF5;
            border-top: 3px solid #1B6EF3; /* Connects to active node */
            border-radius: 12px;
            padding: 20px;
            margin-top: 16px;
            box-shadow: 0 10px 25px -5px rgba(11, 37, 69, 0.05);
            display: none;
            animation: slideDownFade 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
            position: relative;
        }

        /* Unit Row Card Styling */
        .unit-row-card {
            background: #FFFFFF;
            border: 1px solid rgba(0,0,0,0.04);
            border-radius: 12px;
            padding: 12px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            position: relative;
        }
        /* Vertical Flowchart Timeline */
        .unit-row-card:not(:last-child)::after {
            content: '';
            position: absolute;
            top: 48px; /* Starts right below the 36px badge */
            left: 33px; /* Centers under badge: 16px padding + 18px half-width - 1px half-border */
            width: 2px;
            height: calc(100% - 28px); /* Extends through bottom padding + 8px gap + top padding */
            background: repeating-linear-gradient(to bottom, #7C93B4 0, #7C93B4 6px, transparent 6px, transparent 10px);
            background-size: 100% 20px;
            animation: flow-marching-ants-vert 1s linear infinite;
            z-index: 10;
        }
        @keyframes flow-marching-ants-vert {
            from { background-position: 0 0; }
            to { background-position: 0 20px; }
        }
        .unit-row-card:hover {
            background: #ffffff;
            border-color: #1B6EF3;
            box-shadow: 0 4px 12px rgba(27, 110, 243,0.1);
            transform: translateX(4px);
        }
        .unit-row-left {
            display: flex;
            align-items: center;
            gap: 16px;
        }
        .unit-index-badge {
            width: 36px;
            height: 36px;
            border-radius: 18px;
            background: #F2F7FE;
            color: #1B6EF3;
            font-size: 14px;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'Outfit', sans-serif;
        }
        .unit-index-badge.done {
            background: #DCF5E6;
            color: #12A150;
        }
        .unit-title {
            font-size: 15px;
            font-weight: 600;
            color: #0B2545;
            font-family: 'Inter', sans-serif;
        }
        .unit-play-btn {
            width: 36px;
            height: 36px;
            border-radius: 18px;
            border: none;
            background: #ffffff;
            color: #1B6EF3;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 5px rgba(0,0,0,0.05);
            cursor: pointer;
            transition: all 0.2s;
        }
        .unit-row-card:hover .unit-play-btn {
            background: #1B6EF3;
            color: #ffffff;
            transform: scale(1.1);
        }

        /* Practice Module Grid */
        .practice-module-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 16px;
            margin-top: 24px;
            padding-top: 24px;
            border-top: 1px dashed #E4EBF5;
        }
        .practice-card {
            background: #ffffff;
            border: 1px solid #E4EBF5;
            border-radius: 12px;
            padding: 16px;
            display: flex;
            align-items: center;
            gap: 16px;
            cursor: pointer;
            transition: all 0.2s;
            position: relative;
            overflow: hidden;
        }
        .practice-card:hover {
            box-shadow: 0 6px 16px rgba(0,0,0,0.06);
            transform: translateY(-2px);
        }
        .practice-card.top-border-blue { border-top: 4px solid #1B6EF3; }
        .practice-card.top-border-amber { border-top: 4px solid #E08700; }
        
        .practice-icon-box {
            width: 44px;
            height: 44px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            font-weight: 700;
        }
        .practice-icon-box.blue { background: #F2F7FE; color: #1B6EF3; }
        .practice-icon-box.amber { background: #FFF6E5; color: #E08700; }
        
        .practice-content h4 {
            margin: 0 0 4px 0;
            font-size: 15px;
            font-family: 'Outfit', sans-serif;
            color: #0B2545;
        }
        .practice-content p {
            margin: 0;
            font-size: 12px;
            color: #5A7396;
        }
        .practice-pill {
            margin-left: auto;
            background: #F3F7FD;
            color: #42597A;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 700;
        }
        .formula-card-sme {
            background: #ffffff;
            border: 1px solid #E4EBF5;
            border-radius: 12px;
            padding: 16px;
            box-shadow: 0 2px 6px rgba(11, 37, 69, 0.02);
            transition: all 0.2s ease;
        }
        .formula-card-sme:hover {
            border-color: #A9C7F8;
            box-shadow: 0 4px 12px rgba(27, 110, 243, 0.06);
        }
        .formula-card-title {
            font-size: 12px;
            font-weight: 800;
            color: #5A7396;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 8px;
            font-family: 'Outfit', sans-serif;
        }
        .formula-math-display {
            font-size: 20px;
            font-weight: 800;
            color: #1557C7;
            text-align: center;
            padding: 10px;
            background: #FFFFFF;
            border-radius: 8px;
            border: 1px solid #E4EBF5;
            margin-bottom: 8px;
            font-family: 'Times New Roman', Times, serif;
            letter-spacing: 1px;
        }
        .formula-vars-list {
            font-size: 12px;
            color: #42597A;
            line-height: 1.5;
        }

        /* 11. Progress Dashboard & Topic Accordion Component Styles */
        .dash-metric-card {
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .dash-metric-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 24px -4px rgba(11, 37, 69, 0.06) !important;
            border-color: #C7D7EC !important;
        }

        .paper-filter-btn {
            border: none;
            background: transparent;
            padding: 8px 16px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 750;
            color: #5A7396;
            cursor: pointer;
            transition: all 0.15s ease;
            display: flex;
            align-items: center;
            gap: 6px;
            font-family: 'Outfit', sans-serif;
            white-space: nowrap;
        }
        .paper-filter-btn:hover:not(.active) {
            background: rgba(255, 255, 255, 0.6);
            color: #0B2545;
        }
        .paper-filter-btn.active {
            background: #ffffff;
            color: #0B2545;
            font-weight: 850;
            box-shadow: 0 2px 6px rgba(11, 37, 69, 0.06);
        }

        /* Topic Accordion Card */
        .topic-accordion-card {
            background: #ffffff;
            border: 1px solid #E4EBF5;
            border-radius: 16px;
            box-shadow: 0 2px 6px rgba(11, 37, 69, 0.02);
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            overflow: hidden;
        }
        .topic-accordion-card:hover {
            border-color: #A9C7F8;
            box-shadow: 0 6px 20px rgba(27, 110, 243, 0.05);
        }
        .topic-accordion-card.expanded {
            border-color: #1B6EF3;
            box-shadow: 0 8px 25px rgba(27, 110, 243, 0.08);
        }

        .topic-accordion-header {
            padding: 16px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            cursor: pointer;
            user-select: auto;
            background: #ffffff;
            transition: background 0.15s ease;
        }
        .topic-accordion-header:hover {
            background: #F8FBFF;
        }

        .topic-acc-icon-title {
            display: flex;
            align-items: center;
            gap: 14px;
            flex: 1.5;
            min-width: 240px;
        }
        .topic-acc-icon {
            font-size: 20px;
            width: 42px;
            height: 42px;
            background: #FFFFFF;
            border: 1px solid #E4EBF5;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .topic-acc-title {
            margin: 0;
            font-size: 15px;
            font-weight: 850;
            color: #0B2545;
            font-family: 'Outfit', sans-serif;
            line-height: 1.3;
        }
        .topic-acc-meta {
            font-size: 11.5px;
            color: #5A7396;
            font-weight: 600;
            margin-top: 2px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .topic-acc-progress-wrap {
            display: flex;
            align-items: center;
            gap: 12px;
            flex: 1;
            min-width: 180px;
        }
        .topic-acc-progress-bar {
            flex: 1;
            height: 6px;
            background: #F3F7FD;
            border-radius: 9999px;
            overflow: hidden;
        }
        .topic-acc-progress-fill {
            height: 100%;
            background: #1B6EF3;
            border-radius: 9999px;
            transition: width 0.4s ease;
        }
        .topic-acc-progress-fill.complete {
            background: #12A150;
        }
        .topic-acc-pct-text {
            font-size: 12.5px;
            font-weight: 850;
            color: #0B2545;
            font-family: 'Outfit', sans-serif;
            min-width: 42px;
            text-align: right;
        }

        .topic-acc-action-area {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-shrink: 0;
        }
        .topic-acc-chevron {
            font-size: 12px;
            font-weight: 800;
            color: #7C93B4;
            transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
            width: 28px;
            height: 28px;
            background: #FFFFFF;
            border-radius: 8px;
            border: 1px solid #E4EBF5;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .topic-accordion-card.expanded .topic-acc-chevron {
            transform: rotate(180deg);
            background: #F2F7FE;
            color: #1557C7;
            border-color: #CFE0FA;
        }

        /* Sub-units list inside accordion */
        .topic-accordion-body {
            display: none;
            padding: 0 20px 16px 20px;
            background: #F8FBFF;
            border-top: 1px solid #F3F7FD;
            flex-direction: column;
            gap: 8px;
        }
        .topic-accordion-card.expanded .topic-accordion-body {
            display: flex;
        }

        .sub-unit-row {
            background: #ffffff;
            border: 1px solid #E4EBF5;
            border-radius: 12px;
            padding: 11px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            transition: all 0.15s ease;
        }
        .sub-unit-row:hover {
            border-color: #A9C7F8;
            box-shadow: 0 2px 8px rgba(27, 110, 243, 0.04);
            transform: translateX(2px);
        }

        .sub-unit-info {
            display: flex;
            align-items: center;
            gap: 10px;
            flex: 1;
            min-width: 220px;
        }
        .sub-unit-dot {
            width: 9px;
            height: 9px;
            border-radius: 50%;
            flex-shrink: 0;
        }
        .sub-unit-dot.verified { background: #12A150; box-shadow: 0 0 0 2px #DCF5E6; }
        .sub-unit-dot.active   { background: #1B6EF3; box-shadow: 0 0 0 2px #E8F1FE; }
        .sub-unit-dot.planning { background: #C7D7EC; }

        .sub-unit-key-badge {
            font-size: 10.5px;
            font-weight: 800;
            background: #F3F7FD;
            color: #42597A;
            padding: 2px 6px;
            border-radius: 5px;
            font-family: 'Outfit', sans-serif;
            flex-shrink: 0;
        }
        .sub-unit-title {
            font-size: 13.5px;
            font-weight: 750;
            color: #0B2545;
            font-family: 'Outfit', sans-serif;
            line-height: 1.35;
        }

        .sub-unit-actions-group {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-shrink: 0;
        }
        .sub-unit-action-btn {
            background: #FFFFFF;
            border: 1px solid #E4EBF5;
            border-radius: 8px;
            padding: 5px 10px;
            font-size: 11.5px;
            font-weight: 750;
            color: #42597A;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 4px;
            transition: all 0.15s ease;
            font-family: 'Outfit', sans-serif;
            text-decoration: none;
        }
        .sub-unit-action-btn:hover {
            background: #F2F7FE;
            color: #1557C7;
            border-color: #A9C7F8;
        }
        .sub-unit-action-btn.primary {
            background: #1557C7;
            color: #ffffff;
            border-color: #1557C7;
        }
        .sub-unit-action-btn.primary:hover {
            background: #1148A8;
            box-shadow: 0 2px 6px rgba(27, 110, 243, 0.25);
        }

        /* Pulse highlight for jump-to-topic */
        @keyframes pulseHighlight {
            0% { box-shadow: 0 0 0 0 rgba(27, 110, 243, 0.4); border-color: #1B6EF3; }
            50% { box-shadow: 0 0 0 10px rgba(27, 110, 243, 0.15); border-color: #1557C7; }
            100% { box-shadow: 0 0 0 0 rgba(27, 110, 243, 0); }
        }
        .pulse-highlight {
            animation: pulseHighlight 1.5s ease-out;
        }

        /* ==================== 🎮 RPG CHARACTER EXP HUD STATUS PANEL & 5X EXTENDED PIPELINE ==================== */
        
        /* 4-Stat RPG Character EXP Energy Bar List (Frameless 2x2 Grid) */
        .rpg-stat-hud-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px 16px;
        }
        .rpg-stat-row {
            display: flex;
            align-items: center;
            background: transparent;
            border: none;
            padding: 2px 0;
            transition: all 0.15s ease;
        }
        .rpg-stat-label {
            font-size: 10.5px;
            font-weight: 850;
            color: #42597A;
            font-family: 'Outfit', sans-serif;
            letter-spacing: 0.5px;
            min-width: 44px;
        }
        .rpg-exp-bar-track {
            flex: 1;
            height: 7.5px;
            background: #E4EBF5;
            border-radius: 4px;
            overflow: hidden;
            margin: 0 8px;
            position: relative;
            box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
        }
        .rpg-exp-fill {
            height: 100%;
            border-radius: 4px;
            transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s;
            background: linear-gradient(90deg, #1557C7, #5C93F0);
        }
        .rpg-exp-fill.empty {
            width: 0% !important;
        }
        .rpg-exp-fill.stage-amber {
            background: linear-gradient(90deg, #E08700, #E8A317);
        }
        .rpg-exp-fill.stage-blue {
            background: linear-gradient(90deg, #1557C7, #5C93F0);
        }
        .rpg-exp-fill.stage-cyan {
            background: linear-gradient(90deg, #1557C7, #1B6EF3);
        }
        .rpg-exp-fill.stage-green {
            background: linear-gradient(90deg, #0E8F46, #12A150);
            box-shadow: 0 0 8px rgba(18, 161, 80,0.5);
        }
        .rpg-stat-val {
            font-size: 10.5px;
            font-weight: 850;
            color: #0B2545;
            font-family: 'Outfit', sans-serif;
            min-width: 32px;
            text-align: right;
        }
        .rpg-stat-val.zero {
            color: #E5484D;
        }
        .rpg-stat-val.full {
            color: #12A150;
        }

        /* 5-Bar Signal Strength Meter (For System Block Cards) */
        .signal-bars-meter.mini {
            display: inline-flex;
            align-items: flex-end;
            gap: 1.5px;
            height: 12px;
        }
        .signal-bars-meter.mini .s-bar {
            width: 2.5px;
            background: #C7D7EC;
            border-radius: 1px;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .signal-bars-meter.mini .s-bar.b1 { height: 2.5px; }
        .signal-bars-meter.mini .s-bar.b2 { height: 4.5px; }
        .signal-bars-meter.mini .s-bar.b3 { height: 6.5px; }
        .signal-bars-meter.mini .s-bar.b4 { height: 8.5px; }
        .signal-bars-meter.mini .s-bar.b5 { height: 11px; }

        /* Signal States (5-Step Progression) */
        .signal-bars-meter.state-0 .s-bar {
            background: #E4EBF5;
        }
        .signal-bars-meter.state-0 .s-bar.b1 {
            background: #E5484D; /* Red indicator for zero */
        }
        .signal-bars-meter.state-1 .s-bar.b1 {
            background: #E08700;
        }
        .signal-bars-meter.state-2 .s-bar.b1,
        .signal-bars-meter.state-2 .s-bar.b2 {
            background: #1B6EF3;
        }
        .signal-bars-meter.state-3 .s-bar.b1,
        .signal-bars-meter.state-3 .s-bar.b2,
        .signal-bars-meter.state-3 .s-bar.b3 {
            background: #0E7FA8;
        }
        .signal-bars-meter.state-4 .s-bar.b1,
        .signal-bars-meter.state-4 .s-bar.b2,
        .signal-bars-meter.state-4 .s-bar.b3,
        .signal-bars-meter.state-4 .s-bar.b4 {
            background: #1557C7;
        }
        .signal-bars-meter.state-5 .s-bar {
            background: #12A150; /* Pure green for 100% */
        }

        /* System Tracks & Flow Row */
        .system-track-card {
            background: #ffffff;
            border: 1px solid #E4EBF5;
            border-radius: 14px;
            padding: 12px 16px;
            box-shadow: 0 2px 8px rgba(11, 37, 69, 0.02);
        }
        .system-track-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
            flex-wrap: wrap;
            gap: 6px;
        }
        .system-track-title {
            margin: 0;
            font-size: 12.5px;
            font-weight: 850;
            color: #0B2545;
            font-family: 'Outfit', sans-serif;
        }

        /* 5X Extended Pipeline Conduit Layout */
        .system-blocks-flow-wrap {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            position: relative;
            width: 100%;
        }
        @media (max-width: 1024px) {
            .system-blocks-flow-wrap {
                display: grid;
                grid-template-columns: repeat(2, 1fr);
            }
            .system-flow-arrow {
                display: none !important;
            }
        }
        @media (max-width: 600px) {
            .system-blocks-flow-wrap {
                grid-template-columns: 1fr;
            }
        }

        /* 5x Length Pipeline Conduit Arrow */
        .system-flow-arrow {
            flex: 0 0 80px; /* Extended length for roadmap feel */
            display: flex;
            align-items: center;
            justify-content: center;
            user-select: auto;
            padding: 0 4px;
        }
        .system-flow-arrow svg {
            width: 100%;
            height: 10px;
            display: block;
        }

        /* System Block Card (Premium Blueprint Style) */
        .system-block-card {
            background-color: #ffffff;
            border: 1px solid #E4EBF5;
            border-top: 4px solid #1B6EF3; /* Accent Top Border */
            border-radius: 12px;
            padding: 16px 20px;
            min-height: 100px;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            gap: 6px;
            position: relative;
            box-shadow: 0 4px 10px rgba(11, 37, 69,0.04);
            user-select: auto;
            flex: 1 1 0;
            min-width: 0;
            overflow: hidden;
        }
        
        /* Flowchart Node Hover */
        .system-block-card:hover {
            border-color: #1B6EF3;
            transform: translateY(-4px) scale(1.02);
            box-shadow: 0 10px 20px rgba(27, 110, 243, 0.12);
        }
        /* Flowchart Active Connection */
        .system-block-card.active-expanded {
            border-color: #1B6EF3;
            box-shadow: 0 0 0 2px rgba(27, 110, 243,0.3);
            background: #FFFFFF;
        }
        .system-block-card.active-expanded::after {
            content: "";
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            border-width: 10px 10px 0;
            border-style: solid;
            border-color: #1B6EF3 transparent transparent transparent;
            z-index: 10;
        }
        .system-block-card.mastered-topic {
            border-color: #12A150;
        }

        .system-block-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 4px;
        }
        .system-block-code {
            font-size: 9.5px;
            font-weight: 850;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .system-block-code.p1 { color: #1557C7; }
        .system-block-code.p2 { color: #D32F2F; }
        
        .system-block-title {
            margin: 1px 0;
            font-size: 12.5px;
            font-weight: 850;
            color: #0B2545;
            font-family: 'Outfit', sans-serif;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .system-block-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 10px;
            font-weight: 800;
            color: #5A7396;
        }
        .system-block-pct {
            font-size: 9.5px;
            font-weight: 850;
            color: #5A7396;
        }
        .system-block-pct.zero { color: #E5484D; }
        /* Sub-topic Accordion Inspection Panel */
        .chapter-subtopics-panel {
            background: #ffffff;
            border: 1.5px solid #E4EBF5;
            border-radius: 14px;
            padding: 16px 20px;
            box-shadow: 0 4px 18px rgba(11, 37, 69, 0.04);
            display: flex;
            flex-direction: column;
            gap: 14px;
            animation: fadeInSubtopics 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        }
        @keyframes fadeInSubtopics {
            from { opacity: 0; transform: translateY(-6px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .subtopics-panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #F3F7FD;
            padding-bottom: 12px;
            flex-wrap: wrap;
            gap: 10px;
        }
        .subtopics-panel-title {
            margin: 0;
            font-size: 16px;
            font-weight: 850;
            color: #0B2545;
            font-family: 'Outfit', sans-serif;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .subtopics-panel-close-btn {
            background: #F3F7FD;
            border: 1px solid #E4EBF5;
            border-radius: 8px;
            padding: 5px 12px;
            font-size: 11px;
            font-weight: 750;
            color: #5A7396;
            cursor: pointer;
            transition: all 0.15s ease;
            font-family: 'Outfit', sans-serif;
        }
        .subtopics-panel-close-btn:hover {
            background: #E4EBF5;
            color: #0B2545;
        }

        .subtopics-rows-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .subtopic-item-row {
            background: #FFFFFF;
            border: 1px solid #E4EBF5;
            border-radius: 10px;
            padding: 10px 14px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            transition: all 0.15s ease;
        }
        .subtopic-item-row:hover {
            background: #ffffff;
            border-color: #C7D7EC;
            box-shadow: 0 2px 6px rgba(11, 37, 69, 0.02);
        }

        .deliverables-chips-wrap {
            display: flex;
            align-items: center;
            gap: 5px;
            flex-wrap: wrap;
        }
        .deliverable-btn-chip {
            padding: 3px 8px;
            border-radius: 5px;
            font-size: 11px;
            font-weight: 750;
            cursor: pointer;
            border: 1px solid #C7D7EC;
            background: #ffffff;
            color: #42597A;
            display: inline-flex;
            align-items: center;
            gap: 3px;
            transition: all 0.15s ease;
            font-family: 'Outfit', sans-serif;
        }
        .deliverable-btn-chip:hover {
            border-color: #1557C7;
            background: #F2F7FE;
            color: #1557C7;
        }
        .deliverable-btn-chip.done {
            background: #EEF9F3;
            color: #0E8F46;
            border-color: #B6EBCE;
        }

        /* ==================== 📖 SME INTERACTIVE NOTES & TOC LAYOUT ==================== */
        .sme-notes-layout {
            display: flex;
            gap: 24px;
            align-items: flex-start;
            position: relative;
            width: 100%;
        }
        .sme-notes-main {
            flex: 1;
            min-width: 0;
        }
        .sme-toc-sidebar {
            width: 240px;
            flex-shrink: 0;
            position: sticky;
            top: 20px;
        }
        .sme-toc-sticky-box {
            background: #ffffff;
            border: 1px solid #E4EBF5;
            border-radius: 14px;
            padding: 16px;
            box-shadow: 0 2px 8px rgba(11, 37, 69,0.02);
        }
        .sme-toc-title {
            font-size: 11px;
            font-weight: 850;
            color: #42597A;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin: 0 0 10px 0;
            font-family: 'Outfit', sans-serif;
            border-bottom: 1px solid #F3F7FD;
            padding-bottom: 6px;
        }
        .sme-toc-list {
            display: flex;
            flex-direction: column;
            gap: 4px;
            max-height: calc(100vh - 260px);
            overflow-y: auto;
        }
        .sme-toc-item {
            font-size: 12px;
            font-weight: 600;
            color: #5A7396;
            text-decoration: none;
            padding: 5px 8px;
            border-radius: 6px;
            transition: all 0.15s ease;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            display: block;
        }
        .sme-toc-item:hover {
            background: #F3F7FD;
            color: #1557C7;
        }
        .sme-toc-item.active {
            background: #F2F7FE;
            color: #1557C7;
            font-weight: 800;
        }
        .sme-toc-footer {
            margin-top: 12px;
            padding-top: 10px;
            border-top: 1px solid #F3F7FD;
        }
        .sme-print-btn {
            width: 100%;
            background: #FFFFFF;
            border: 1px solid #E4EBF5;
            border-radius: 8px;
            padding: 6px 10px;
            font-size: 11px;
            font-weight: 700;
            color: #42597A;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            transition: all 0.15s ease;
        }
        .sme-print-btn:hover {
            background: #ffffff;
            border-color: #C7D7EC;
            color: #0B2545;
        }

        /* 12. Responsive Overrides */
        @media (max-width: 900px) {
            .sme-notes-layout {
                flex-direction: column;
            }
            .sme-toc-sidebar {
                width: 100%;
                position: static;
            }
            .sme-notes-main {
                padding: 20px;
            }
            .topic-accordion-header {
                flex-wrap: wrap;
            }
            .sub-unit-row {
                flex-wrap: wrap;
            }
        }
/* --- EXTRACTED INLINE STYLES (WP REFACTOR) --- */
.wp-subject-dashboard-view-1 {
    display: none;
    padding: 25px 30px;
    max-width: 1280px;
    margin: 0 auto;
    box-sizing: border-box;
    flex-direction: column;
    gap: 20px;
}

.wp-div-2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 2px;
}

.wp-div-3 {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wp-button-4 {
    background: #ffffff;
    border: 1px solid #E4EBF5;
    padding: 5px 10px;
    border-radius: 8px;
    font-weight: 750;
    color: #5A7396;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: 'Outfit', sans-serif;
}

.wp-dashSyllabusTitle-5 {
    font-size: 18px;
    margin: 0;
    font-weight: 850;
    color: #0B2545;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.3px;
}

.wp-div-6 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wp-dashQuickJumpSelect-7 {
    background: #ffffff;
    border: 1.5px solid #C7D7EC;
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 11.5px;
    font-weight: 750;
    color: #0B2545;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    outline: none;
    box-shadow: 0 1px 3px rgba(11, 37, 69,0.05);
}

.wp-div-8 {
    display: grid;
    grid-template-columns: 1fr minmax(250px, 330px);
    gap: 14px;
}

.wp-dashTelemetryCard-9 {
    background: #ffffff;
    border: 1px solid #E4EBF5;
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: 0 2px 8px rgba(11, 37, 69,0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
}

.wp-div-10 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #F3F7FD;
    padding-bottom: 6px;
}

.wp-span-11 {
    font-size: 11px;
    font-weight: 850;
    color: #0B2545;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Outfit', sans-serif;
}

.wp-dashTelemetryScopeTag-12 {
    font-size: 9.5px;
    font-weight: 800;
    padding: 1px 7px;
    transition: all 0.2s;
}

.wp-div-13 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 18px;
    padding: 2px 0;
}

.wp-div-14 {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wp-meterNotesFill-15 {
    width: 0%;
}

.wp-div-16 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.wp-span-17 {
    font-size: 10px;
    font-weight: 850;
    color: #1557C7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Outfit', sans-serif;
}

.wp-span-18 {
    font-size: 9px;
    padding: 1px 6px;
}

.wp-dashHeroResumeTitle-19 {
    font-size: 13px;
    font-weight: 850;
    color: #0B2545;
    font-family: 'Outfit', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.wp-p-20 {
    margin: 2px 0 0 0;
    font-size: 10.5px;
    color: #5A7396;
    font-weight: 600;
}

.wp-div-21 {
    display: flex;
    gap: 8px;
}

.wp-dashHeroResumeBtn-22 {
    flex: 1;
    background: #1557C7;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 11.5px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Outfit', sans-serif;
    transition: all 0.15s ease;
    box-shadow: 0 2px 6px rgba(27, 110, 243,0.2);
}

.wp-div-23 {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 4px;
}

.wp-div-24 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.wp-div-25 {
    font-size: 12.5px;
    font-weight: 850;
    color: #0B2545;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wp-span-26 {
    font-size: 11px;
    font-weight: 700;
    color: #5A7396;
    font-family: 'Outfit', sans-serif;
}

.wp-div-27 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wp-chapterSubtopicsAccordionPanel-28 {
    display: none;
    margin-bottom: 30px;
}

.wp-map-view-29 {
    display: none;
}

.wp-div-30 {
    position: relative;
    padding: 20px 40px;
    border-bottom: 1px solid var(--border-line);
    background: #ffffff;
}

.wp-button-31 {
    position: absolute;
    right: 40px;
    top: 25px;
    background: transparent;
    border: 1px solid var(--border-line);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 750;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 11px;
}

.wp-h1-32 {
    font-size: 22px;
    margin: 0;
}

.wp-div-33 {
    font-size: 11px;
    margin-top: 3px;
}

.wp-div-34 {
    padding: 16px 20px;
    border-bottom: 1px solid #E4EBF5;
    background: #FFFFFF;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wp-h4-35 {
    margin: 0;
    font-size: 13.5px;
    font-weight: 800;
    color: #0B2545;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Outfit', sans-serif;
}

.wp-p-36 {
    margin: 2px 0 0 0;
    font-size: 11px;
    color: #5A7396;
    font-weight: 600;
}

.wp-directoryTopicsList-37 {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wp-centerWorkspacePanel-38 {
    flex: 1;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-right: 1px solid #E4EBF5;
}











.wp-button-44 {
    background: none;
    border: none;
    font-size: 20px;
    font-weight: bold;
    color: #7C93B4;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}



.wp-div-46 {
    flex: 1;
    overflow-y: auto;
    padding: 15px 0;
}



.wp-h4-48 {
    font-size:12px;
    margin-top:0;
    color:#42597A;
}





.wp-directoryRightContent-51 {
    display: none;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.wp-lessonViewport-52 {
    display: none;
    flex: 1;
    flex-direction: column;
    overflow-y: auto;
    padding: 25px 30px;
    background: #ffffff;
    position: relative;
}

.wp-span-53 {
    background:#E8F1FE;
    color:#1148A8;
    font-weight:800;
    padding:2px 6px;
    border-radius:6px;
    font-size:10px;
}

.wp-inlineSimulationSection-54 {
    background: #ffffff;
    border: 1.5px solid #E4EBF5;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 18px rgba(11, 37, 69,0.03);
}

.wp-div-55 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid #F3F7FD;
    padding-bottom: 8px;
}

.wp-span-56 {
    font-size: 16px;
}

.wp-h4-57 {
    margin: 0;
    font-size: 13.5px;
    font-weight: 850;
    color: #0B2545;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wp-span-58 {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    background: #F2F7FE;
    color: #1557C7;
    border: 1px solid #CFE0FA;
}

.wp-div-59 {
    text-align: center;
    min-height: 28px;
    margin-bottom: 8px;
}

.wp-simulatorHeaderTitle-60 {
    color: #42597A;
    margin:0;
    font-size:12.5px;
    font-weight:800;
    letter-spacing:0.5px;
    line-height:1.4;
    font-family:'Outfit',sans-serif;
}

.wp-unit11ModeSelector-61 {
    display:none;
    justify-content:center;
    margin-bottom: 8px;
}

.wp-div-62 {
    display:flex;
    background:#F3F7FD;
    padding:3px;
    border-radius:8px;
    gap:4px;
    margin: 0 auto;
    width: fit-content;
    border: 1px solid #E4EBF5;
    font-family:'Outfit',sans-serif;
}

.wp-btn-mode-transfer-63 {
    border:none;
    padding:5px 14px;
    font-size:11.5px;
    font-weight:bold;
    border-radius:6px;
    cursor:pointer;
    transition:all 0.2s;
    display:flex;
    align-items:center;
    gap:6px;
    background:#ffffff;
    color:#0B2545;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.wp-btn-mode-stores-64 {
    border:none;
    padding:5px 14px;
    font-size:11.5px;
    font-weight:normal;
    border-radius:6px;
    cursor:pointer;
    transition:all 0.2s;
    display:flex;
    align-items:center;
    gap:6px;
    background:transparent;
    color:#5A7396;
}

.wp-div-65 {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
}

.wp-physicsParticleCanvas-66 {
    display:block;
    background:#ffffff;
    border:1.5px solid #C7D7EC;
    border-radius:14px;
    width:100%;
    aspect-ratio:16/9;
    height:auto;
    cursor:pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    box-sizing: border-box;
}

.wp-tempDisplayContainer-67 {
    text-align: center;
    margin-top: 8px;
    font-family: monospace;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: none;
}

.wp-energyValueDisplay-68 {
    color: #1557C7;
    transition: color 0.2s;
}

.wp-autoProgressBar-69 {
    display:none;
}

.wp-manualControlSection-70 {
    margin-top: 12px;
    border-top: 1px dashed #E4EBF5;
    padding-top: 12px;
    display:none;
    flex-direction:column;
    gap:10px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.wp-div-71 {
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.wp-manualLockBadge-72 {
    font-size:11.5px;
    font-weight:700;
    color:#5A7396;
}

.wp-tempRangeSlider-73 {
    width:60%;
    accent-color:#1557C7;
    cursor:not-allowed;
}

.wp-div-74 {
    display:flex;
    gap:10px;
}

.wp-heatBtn-75 {
    flex:1;
    padding:8px 0;
    font-size:11.5px;
    background:#E5484D;
    border:none;
    border-radius:8px;
    cursor:not-allowed;
    opacity:0.5;
    color:white;
    font-weight:800;
}

.wp-coolBtn-76 {
    flex:1;
    padding:8px 0;
    font-size:11.5px;
    background:#1557C7;
    border:none;
    border-radius:8px;
    cursor:not-allowed;
    opacity:0.5;
    color:white;
    font-weight:800;
}

.wp-inlineVideosSection-77 {
    background: #ffffff;
    border: 1.5px solid #E4EBF5;
    border-radius: 14px;
    padding: 18px 20px;
    margin-top: 24px;
}

.wp-div-78 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.wp-h4-79 {
    margin: 0;
    font-size: 13px;
    font-weight: 850;
    color: #0B2545;
    font-family: 'Outfit', sans-serif;
}

.wp-youtubeVideosGrid-80 {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.wp-div-81 {
    margin-top: 28px;
    text-align: center;
}

.wp-button-82 {
    background: #1557C7;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 4px 14px rgba(27, 110, 243,0.25);
    transition: all 0.2s;
}

.wp-div-83 {
    font-size:13px;
    font-weight:800;
    color:#D32F45;
    display:flex;
    align-items:center;
    gap:6px;
    background:#FEF1F2;
    padding:6px 14px;
    border-radius:20px;
    border:1px solid #FBD5DA;
}

.wp-div-84 {
    background:#ffffff;
    border:1px solid #E4EBF5;
    border-radius:16px;
    padding:24px;
    box-shadow:0 2px 10px rgba(11, 37, 69,0.02);
}

.wp-div-85 {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:12px;
}

.wp-quizActiveTagBadge-86 {
    font-size: 11px;
    background: #F2F7FE;
    color: #1148A8;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 800;
    text-transform:uppercase;
}

.wp-quizQuestionNumBadge-87 {
    font-size:12px;
    font-weight:800;
    color:#5A7396;
    font-family:'Outfit',sans-serif;
}

.wp-quizQuestionText-88 {
    font-size: 16px;
    font-weight:600;
    line-height: 1.6;
    color: #0B2545;
    margin-bottom: 20px;
}

.wp-quizInputContainer-89 {
    margin-bottom: 20px;
}

.wp-div-90 {
    display:flex;
    gap:10px;
    align-items:center;
}

.wp-quizStudentInput-91 {
    flex:1;
    padding:12px 16px;
    font-size:15px;
    border:1.5px solid #C7D7EC;
    border-radius:10px;
    font-family:inherit;
    outline:none;
}

.wp-quizUnitDisplay-92 {
    font-size:16px;
    font-weight:800;
    color:#42597A;
}

.wp-div-93 {
    display:flex;
    gap:12px;
}

.wp-btnQuizCheckAnswer-94 {
    flex:1;
    padding:12px 20px;
    font-size:14px;
    font-weight:800;
    background:var(--epic-theme-blue);
    color:white;
    border:none;
    border-radius:10px;
    cursor:pointer;
    font-family:'Outfit',sans-serif;
    transition:all 0.2s;
}

.wp-btnQuizNextQuestion-95 {
    display:none;
    flex:1;
    padding:12px 20px;
    font-size:14px;
    font-weight:800;
    background:#12A150;
    color:white;
    border:none;
    border-radius:10px;
    cursor:pointer;
    font-family:'Outfit',sans-serif;
    transition:all 0.2s;
}

.wp-quizMarkSchemePanel-96 {
    display:none;
    margin-top:20px;
    padding:18px;
    border-radius:12px;
    background:#FFFFFF;
    border:1px solid #E4EBF5;
}

.wp-quizResultStatusBanner-97 {
    font-size:15px;
    font-weight:850;
    margin-bottom:10px;
}

.wp-quizMarkSchemeDetails-98 {
    font-size:13.5px;
    line-height:1.6;
    color:#42597A;
}

.wp-div-99 {
    max-width:800px;
    margin:0 auto;
    background:#ffffff;
    border:1px solid #E4EBF5;
    border-radius:20px;
    padding:30px;
    box-shadow:0 4px 20px -2px rgba(11, 37, 69,0.03);
}

.wp-div-100 {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
}

.wp-h3-101 {
    font-size:18px;
    font-weight:800;
    margin:0 0 4px 0;
    font-family:'Outfit',sans-serif;
}

.wp-p-102 {
    font-size:12px;
    color:#5A7396;
    margin:0;
}

.wp-div-103 {
    display:flex;
    gap:8px;
}

.wp-fc-filter-all-panel-104 {
    background:var(--epic-theme-blue);
    font-size:11px;
    padding:6px 12px;
    border:none;
    border-radius:6px;
    color:white;
    cursor:pointer;
    font-weight:750;
}

.wp-fc-filter-starred-panel-105 {
    background:transparent;
    border:1px solid var(--border-line);
    color:var(--text-muted);
    font-size:11px;
    padding:6px 12px;
    border-radius:6px;
    cursor:pointer;
    font-weight:750;
}

.wp-flashcardsGridPanel-106 {
    display:grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap:16px;
}

.wp-rightInfoSidebar-107 {
    width: 340px;
    min-width: 340px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.wp-defaultSidebarViewport-108 {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.wp-div-109 {
    padding: 20px;
    border-bottom: 1px solid #E4EBF5;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wp-h4-110 {
    margin: 0;
    font-size: 11px;
    font-weight: 800;
    color: #5A7396;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.wp-div-111 {
    display: flex;
    gap: 4px;
    background: #F3F7FD;
    padding: 4px;
    border-radius: 10px;
    border: 1px solid #C7D7EC;
}

.wp-btnTransitMode-112 {
    flex: 1;
    border: none;
    padding: 8px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 750;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: #ffffff;
    color: #0B2545;
    box-shadow: 0 2px 4px rgba(11, 37, 69,0.05);
}

.wp-btnTreeMode-113 {
    flex: 1;
    border: none;
    padding: 8px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 750;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: transparent;
    color: #5A7396;
}

.wp-sidebarContextBody-114 {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.wp-lessonToolsViewport-115 {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.wp-div-116 {
    padding: 20px;
    border-bottom: 1px solid #E4EBF5;
    background: #FFFFFF;
}

.wp-h4-117 {
    margin: 0;
    font-size: 11px;
    font-weight: 800;
    color: #5A7396;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
}

.wp-tab-btn-match-118 {
    flex: 1;
    border: none;
    padding: 8px;
    border-radius: 8px;
    font-size: 10.5px;
    font-weight: 750;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    background: #ffffff;
    color: #0B2545;
    box-shadow: 0 2px 4px rgba(11, 37, 69,0.05);
    font-family: 'Outfit', sans-serif;
}

.wp-tab-btn-challenge-119 {
    flex: 1;
    border: none;
    padding: 8px;
    border-radius: 8px;
    font-size: 10.5px;
    font-weight: 750;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    background: transparent;
    color: #5A7396;
    font-family: 'Outfit', sans-serif;
}

.wp-toolsContextBody-120 {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    position: relative;
}

.wp-sideCalloutPanel-121 {
    display: none;
    background: #F2F7FE;
    border-left: 4px solid #1B6EF3;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #0D3B8F;
    line-height: 1.5;
}

.wp-h5-122 {
    margin: 0 0 6px 0;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
    font-family:'Outfit',sans-serif;
}

.wp-sideCalloutText-123 {
    font-size: 12.5px;
    line-height: 1.5;
}

.wp-div-124 {
    border-bottom:none;
    margin-bottom:15px;
    padding-bottom:0;
}

.wp-h3-125 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px 0;
    font-family:'Outfit',sans-serif;
}

.wp-p-126 {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
    text-transform: uppercase;
}

.wp-div-127 {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.wp-div-128 {
    display: flex;
    justify-content: space-between;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0 5px;
}

.wp-div-129 {
    display: flex;
    gap: 15px;
}

.wp-matchTermsCol-130 {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wp-matchSuccessPanel-131 {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: #EEF9F3;
    border: 1px solid #B6EBCE;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    margin-top: 10px;
    animation: scalePulse 0.4s ease;
}

.wp-span-132 {
    font-size: 20px;
}

.wp-h4-133 {
    font-size: 15px;
    font-weight: 700;
    color: #0A6B35;
    margin: 0;
}

.wp-p-134 {
    font-size: 12px;
    color: #0B7A3C;
    margin: 0;
    line-height: 1.4;
}

.wp-button-135 {
    background: #12A150;
    font-size: 12px;
    padding: 6px 12px;
    border:none;
    border-radius:6px;
    color:white;
    cursor:pointer;
    font-weight:700;
    margin-top:5px;
}

.wp-div-136 {
    background:#ffffff;
    border:none;
    padding:0;
    box-shadow:none;
}

.wp-div-137 {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:15px;
}

.wp-h3-138 {
    font-size:16px;
    font-weight:700;
    margin:0;
    font-family:'Outfit',sans-serif;
}

.wp-streakBadgeContainer-139 {
    display: none;
    align-items: center;
    gap: 4px;
    background: #FEF1F2;
    border: 1px solid #FBD5DA;
    border-radius: 15px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #D32F45;
}

.wp-currentTagBadge-140 {
    font-size: 10px;
    background: #F3F7FD;
    color: #42597A;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 700;
}

.wp-questionTextArea-141 {
    font-size: 13.5px;
    padding: 12px;
    background: #FFFFFF;
    border: 1px solid #E4EBF5;
    border-radius: 10px;
    margin: 12px 0;
    line-height: 1.5;
    color: #42597A;
}

.wp-studentInputField-142 {
    flex:1;
    padding:8px 12px;
    font-size: 13.5px;
    border:1px solid #C7D7EC;
    border-radius:8px;
    font-family:inherit;
}

.wp-unitIndicator-143 {
    align-self:center;
    font-weight:700;
    color:var(--text-muted);
}

.wp-challengeSubmitBtn-144 {
    padding: 0 14px;
    font-size:12.5px;
    font-weight:700;
    background:var(--epic-theme-blue);
    color:white;
    border:none;
    border-radius:8px;
    cursor:pointer;
}

.wp-intelHintPanel-145 {
    margin-top: 15px;
    padding: 10px 14px;
    background: #FFFAF0;
    border: 1px solid #FBDCA6;
    border-radius: 8px;
}

.wp-hintLevelBadge-146 {
    font-size: 9.5px;
    font-weight: 800;
    color: #9A4A08;
    text-transform: uppercase;
}

.wp-hintContentText-147 {
    font-size: 12.5px;
    color: #7A3E06;
    margin-top: 4px;
    line-height: 1.4;
}

.wp-div-148 {
    display:flex;
    gap:8px;
    margin-bottom:15px;
    justify-content:center;
}

.wp-fc-filter-all-149 {
    background:var(--epic-theme-blue);
    font-size:11px;
    padding:5px 10px;
    border:none;
    border-radius:6px;
    color:white;
    cursor:pointer;
}

.wp-fc-filter-starred-150 {
    background:transparent;
    border:1px solid var(--border-line);
    color:var(--text-muted);
    font-size:11px;
    padding:5px 10px;
    border-radius:6px;
    cursor:pointer;
}

.wp-flashcardsGrid-151 {
    display:grid;
    grid-template-columns: 1fr;
    gap:15px;
    margin-top:10px;
}

.wp-div-152 {
    display:flex;
    align-items:center;
    gap:10px;
}

.wp-span-153 {
    font-size:24px;
}

.wp-h3-154 {
    margin:0;
    font-size:16px;
    font-weight:850;
    color:#0B2545;
    font-family:'Outfit',sans-serif;
}

.wp-p-155 {
    margin:0;
    font-size:11.5px;
    color:#5A7396;
    font-weight:600;
}

        /* Monospace / Data Text */
        .data-mono {
            font-family: 'JetBrains Mono', 'Fira Code', monospace;
        }

        /* Status Colors */
        :root {
            --status-todo-bg: #FFFFFF;
            --status-todo-text: #7C93B4;
            --status-todo-border: #E4EBF5;
            --status-doing-bg: #F2F7FE;
            --status-doing-text: #1B6EF3;
            --status-doing-border: #CFE0FA;
            --status-done-bg: #F2FAF5;
            --status-done-text: #12A150;
            --status-done-border: #C9EFD9;
        }

        /* PM Pill */
        .pm-pill {
            padding: 4px 10px;
            border-radius: 4px;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.5px;
            border: 1px solid;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        .pm-pill.todo { background-color: var(--status-todo-bg); color: var(--status-todo-text); border-color: var(--status-todo-border); }
        .pm-pill.doing { background-color: var(--status-doing-bg); color: var(--status-doing-text); border-color: var(--status-doing-border); }
        .pm-pill.done { background-color: var(--status-done-bg); color: var(--status-done-text); border-color: var(--status-done-border); }

        /* PM Ticket Row */
        .pm-ticket-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 20px;
            background-color: #ffffff;
            border: 1px solid #E4EBF5;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            margin-bottom: 8px;
            position: relative;
            padding-left: 28px; /* space for flow line */
        }
        .pm-ticket-row:hover {
            border-color: var(--epic-theme-blue);
            box-shadow: 0 4px 12px rgba(27, 110, 243, 0.1);
            transform: translateY(-1px);
        }
        .pm-flow-line {
            position: absolute;
            left: 10px;
            top: -8px; /* connects to previous */
            bottom: -8px; /* connects to next */
            width: 2px;
            background-color: #E4EBF5;
            z-index: 1;
        }
        .pm-ticket-row:first-child .pm-flow-line { top: 14px; }
        .pm-ticket-row:last-child .pm-flow-line { bottom: 14px; }
        
        /* Node dot on the flow line */
        .pm-flow-line::after {
            content: '';
            position: absolute;
            left: -4px;
            top: 50%;
            transform: translateY(-50%);
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background-color: #C7D7EC;
            border: 2px solid #ffffff;
            z-index: 2;
        }
        
        .pm-flow-line.doing { background-color: var(--epic-theme-blue); }
        .pm-flow-line.doing::after { background-color: var(--epic-theme-blue); box-shadow: 0 0 0 2px rgba(27, 110, 243,0.2); }
        .pm-flow-line.done { background-color: #12A150; }
        .pm-flow-line.done::after { background-color: #12A150; }

        .ticket-left {
            display: flex;
            align-items: center;
            gap: 16px;
            z-index: 3; /* above flow line */
        }
        .ticket-id {
            color: #7C93B4;
            font-size: 13px;
            letter-spacing: 0.5px;
        }
        .ticket-title {
            font-size: 15.5px;
            font-weight: 600;
            color: #0B2545;
        }
        .ticket-right {
            display: flex;
            align-items: center;
            gap: 16px;
        }
        .ticket-arrow {
            color: #C7D7EC;
            font-size: 18px;
            transition: color 0.2s;
        }
        .pm-ticket-row:hover .ticket-arrow {
            color: var(--epic-theme-blue);
        }

        /* Circular Progress Rings */
        .progress-ring {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: conic-gradient(var(--epic-theme-blue) calc(var(--progress) * 1%), #E4EBF5 0);
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }
        .progress-ring::before {
            content: '';
            position: absolute;
            width: 32px;
            height: 32px;
            background: #ffffff;
            border-radius: 50%;
        }
        .progress-ring-val {
            position: relative;
            font-size: 11px;
            font-weight: 700;
            color: #0B2545;
            font-family: 'JetBrains Mono', monospace;
        }

/* --- Option C: Minimalist Pill UI (Cognito + Williams) --- */
.minimalist-unit-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 2px solid #E4EBF5;
    border-radius: 100px; /* Pill shape container */
    padding: 12px 24px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.minimalist-unit-card:hover {
    border-color: #1557C7;
    box-shadow: 0 4px 12px rgba(27, 110, 243, 0.1);
    transform: translateY(-1px);
}
.ticket-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.unit-pill-icon {
    width: 36px;
    height: 36px;
    background: #F3F7FD;
    color: #42597A;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
}
.minimalist-unit-card:hover .unit-pill-icon {
    background: #F2F7FE;
    color: #1557C7;
}
.ticket-right {
    display: flex;
    align-items: center;
}
.pill-btn-blue {
    background: #1557C7;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 100px; /* Pill button */
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}
.pill-btn-blue:hover {
    background: #1148A8;
}
.minimalist-topic-card {
    background: #ffffff !important;
    border: 2px solid #E4EBF5 !important;
    border-radius: 16px !important;
    padding: 20px !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}
.minimalist-topic-card:hover {
    border-color: #1557C7 !important;
}
.pill-badge-blue {
    background: #F2F7FE;
    color: #1557C7;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 800;
}
.topic-headers {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
/* Override system flow arrows to hide them for a cleaner look */
.system-flow-arrow {
    display: none !important;
}
/* Subtopics panel cleaner background */
#chapterSubtopicsAccordionPanel {
    background: #ffffff;
    border: 2px solid #1557C7;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(27, 110, 243, 0.1);
}

/* Toast Container for Coming Soon messages */
.toast-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10000;
    pointer-events: none;
}

.sme-login-toast {
    background: rgba(11, 37, 69, 0.95);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
    font-family: 'Inter', sans-serif;
}

.sme-login-toast.show {
    opacity: 1;
    transform: translateY(0);
}


/* === PREMIUM LAYOUT STYLES === */

        /* Hero Section */
        .hero {
            text-align: left;
            padding: 10px 0px 20px 0px;
            width: 100%;
            background: transparent;
        }

        .hero h1 {
            font-size: 2.2rem;
            font-weight: 700;
            letter-spacing: -0.02em;
            margin: 0;
            background: linear-gradient(90deg, #0B2545, #42597A);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .hero p {
            font-size: 1.0rem;
            color: #7C93B4;
            margin-top: 6px;
            margin-bottom: 16px;
            font-weight: 400;
        }

        /* Quick Summary Banner */
        .quick-summary {
            background: #ffffff;
            border: 1px solid #E4EBF5;
            border-left: 5px solid #1B6EF3;
            padding: 25px 30px;
            border-radius: 12px;
            margin: 25px auto 0 auto;
            text-align: left;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .quick-summary h3 {
            margin: 0 0 15px 0;
            font-size: 1.15rem;
            color: #0B2545;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            font-weight: 700;
            border-bottom: 2px solid #F3F7FD;
            padding-bottom: 12px;
        }

        .quick-summary ul {
            margin: 0;
            padding-left: 20px;
            font-size: 1.05rem;
            color: #42597A;
            line-height: 1.6;
        }
        
        .quick-summary ul li {
            margin-bottom: 6px;
        }
        .quick-summary ul li:last-child {
            margin-bottom: 0;
        }

        /* Segmented Control (Tab Navigation) */
        .tab-nav {
            display: flex;
            justify-content: flex-start;
            margin-top: 15px;
            padding-left: 0px;
        }

        .tab-container {
            display: flex;
            background: #E4EBF5;
            padding: 4px;
            border-radius: 12px;
            width: 100%;
        }

        .tab-btn {
            flex: 1;
            text-align: center;
            background: transparent;
            border: none;
            padding: 8px 24px;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 600;
            color: #42597A;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .tab-btn.active {
            background: #ffffff;
            color: #0B2545;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        }

        /* Content Area */
        .content-area {
            width: 100%;
            padding: 0px 0px 40px 0px;
            box-sizing: border-box;
            background: transparent;
        }

        .tab-panel {
            display: none;
            animation: fadeIn 0.4s ease;
        }

        .tab-panel.active {
            display: block;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* =========================================
           1. LESSONS TAB (Inline Expanding Grid)
           ========================================= */
        
        .scenarios-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
            margin-bottom: 20px;
        }

        /* The Small Thumbnail Card */
        .thumb-card {
            background: rgba(255, 255, 255, 0.7);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.5);
            border-radius: 16px;
            overflow: hidden;
            cursor: pointer;
            box-shadow: 0 4px 15px rgba(0,0,0,0.03);
            transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s ease, border-color 0.3s ease, opacity 0.35s ease;
            position: relative;
        }

        /* Top indicator line (grows when active) */
        .thumb-card::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0;
            height: 3px;
            background: linear-gradient(90deg, #1B6EF3, #5C93F0);
            transform: scaleX(0);
            transform-origin: left;
            transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
            z-index: 3;
        }

        /* Hover: lift + focus glow */
        .thumb-card:hover {
            transform: translateY(-6px) scale(1.04);
            box-shadow: 0 0 0 3px rgba(27, 110, 243, 0.18), 0 20px 40px rgba(11, 37, 69, 0.12);
            border-color: #CFE0FA;
            z-index: 10;
        }
        .thumb-card:hover::before {
            transform: scaleX(1);
        }

        .thumb-card.selected {
            border: 2px solid #1B6EF3;
            transform: translateY(-4px) scale(1.02);
            box-shadow: 0 0 0 3px rgba(27, 110, 243, 0.20), 0 16px 34px rgba(21, 87, 199, 0.16);
        }
        .thumb-card.selected::before {
            transform: scaleX(1);
        }

        /* Focus effect: dim the other cards when one is hovered */
        .scenarios-grid:has(.thumb-card:hover) .thumb-card:not(:hover):not(.selected) {
            opacity: 0.5;
            transform: scale(0.98);
        }

        .thumb-visual {
            background: #F8FBFF;
            height: 140px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-bottom: 1px solid #E4EBF5;
            position: relative;
        }

        .thumb-visual canvas {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        /* Make all Core Fundamentals thumbnails larger and consistent */
        .fundamentals-section .thumb-visual {
            height: 260px;
        }

        /* ==================== Notion-like Block System ==================== */
        .nb-block {
            display: flex;
            gap: 14px;
            padding: 18px 20px 18px 24px;
            margin-bottom: 14px;
            background: #F8FBFF;
            border: 1px solid #E4EBF5;
            border-radius: 14px;
            position: relative;
            transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
        }
        .nb-block:hover {
            box-shadow: 0 8px 22px rgba(11, 37, 69, 0.07);
            border-color: #C7D7EC;
            transform: translateY(-2px);
            background: #ffffff;
        }
        .nb-block-icon {
            font-size: 18px;
            line-height: 1;
            flex-shrink: 0;
        }
        .nb-block-body { flex: 1; min-width: 0; }
        .nb-block-title {
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: 800;
            font-size: 15.5px;
            margin: 0 0 8px 0;
            color: #0B2545;
            font-family: 'Outfit', sans-serif;
        }
        .nb-block-title .nb-block-title-text { flex: 1; min-width: 0; }
        .nb-block-title .read-check-bullet {
            flex-shrink: 0;
            font-size: 0.9rem;
            opacity: 0.9;
        }
        .nb-block-desc {
            font-size: 14px;
            color: #42597A;
            line-height: 1.65;
            margin: 0;
        }
        .nb-block--concept { background: #F8FBFF; border-color: #CFE0FA; }
        .nb-block--concept::before { background: #1B6EF3; }
        .nb-block--concept:hover { background: #ffffff; }
        .nb-callout {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 12px 16px;
            border-radius: 12px;
            font-size: 13.5px;
            line-height: 1.6;
            color: #42597A;
        }
        .nb-callout-icon {
            flex-shrink: 0;
            width: 24px;
            height: 24px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.8);
            font-size: 13px;
            line-height: 1;
            box-shadow: 0 1px 2px rgba(11, 37, 69, 0.06);
        }
        .nb-callout--note { background: #F2F7FE; border-left: 3px solid #1B6EF3; }
        .nb-callout--tip { background: #FFFAF0; border-left: 3px solid #E08700; }
        .nb-callout--trap { background: #fef2f2; border-left: 3px solid #E5484D; }
        .nb-diagram-canvas {
            display: block;
            max-width: 100%;
            height: auto;
            border-radius: 10px;
            background: #ffffff;
            border: 1px solid #EDF3FB;
            margin-top: 8px;
        }
        .nb-diagram-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            margin-top: 12px;
        }
        /* Diagram shown on the right side — always visible, enlarges 2x when the block is expanded */
        .nb-block-diagram {
            flex-shrink: 0;
            width: 170px;
            align-self: center;
            transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .nb-block.read-completed .nb-block-diagram {
            width: 425px;
        }
        .nb-block-diagram .nb-diagram-canvas {
            display: block;
            width: 100%;
            height: auto;
            margin: 0;
            border-radius: 10px;
            background: #ffffff;
            border: 1px solid #EDF3FB;
        }
        @media (max-width: 640px) {
            .nb-block-diagram { width: 110px; }
            .nb-block.read-completed .nb-block-diagram { width: 275px; }
        }

        .thumb-info {
            padding: 15px;
            text-align: center;
        }

        .tag {
            background: #E8F1FE;
            color: #1B6EF3;
            font-size: 0.7rem;
            font-weight: 700;
            padding: 3px 8px;
            border-radius: 20px;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            display: inline-block;
            margin-bottom: 6px;
        }

        .thumb-info h3 {
            margin: 0;
            font-size: 1.05rem;
            color: #0B2545;
            font-weight: 600;
        }

        /* --- Fundamentals Section (Basic Content) --- */
        .fundamentals-section {
            margin-bottom: 50px;
        }

        .section-title {
            font-size: 1.8rem;
            color: #0B2545;
            margin: 0 0 5px 0;
            letter-spacing: -0.01em;
        }

        .section-subtitle {
            color: #7C93B4;
            font-size: 1.1rem;
            margin-top: 0;
            margin-bottom: 25px;
        }

        .fund-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
        }

        .fund-card {
            background: #ffffff;
            border: 1px solid #E4EBF5;
            border-radius: 16px;
            padding: 24px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.02);
            position: relative;
        }

        .fund-card .card-icon {
            font-size: 2rem;
            margin-bottom: 15px;
        }

        .fund-card h3 {
            margin-top: 0;
            color: #0B2545;
            font-size: 1.2rem;
            border-bottom: 2px solid #F3F7FD;
            padding-bottom: 10px;
            margin-bottom: 15px;
        }

        .fund-card p {
            font-size: 1.05rem;
            color: #42597A;
            line-height: 1.5;
            margin: 0;
        }

        .visual-list {
            padding: 0;
            list-style: none;
            margin: 15px 0 0 0;
        }

        .visual-list li {
            margin-bottom: 12px;
            display: flex;
            align-items: flex-start;
            gap: 10px;
            font-size: 1.05rem;
            color: #42597A;
            line-height: 1.4;
        }

        .visual-list .icon {
            font-size: 1.2rem;
        }

        .tag-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 15px;
        }

        .tag .emoji {
            margin-right: 4px;
        }

        /* The Full Expanded Detail Panel */
        .expanded-detail {
            grid-column: 1 / -1; /* Spans across all 3 columns */
            background: rgba(255, 255, 255, 0.72);
            backdrop-filter: blur(20px) saturate(140%);
            -webkit-backdrop-filter: blur(20px) saturate(140%);
            border-radius: 20px;
            box-shadow: 0 20px 50px rgba(11, 37, 69, 0.10);
            border: 1px solid rgba(228, 235, 245, 0.85);
            overflow: hidden;
            display: none; /* Hidden by default */
            flex-direction: row;
            padding: 40px;
            animation: slideDown 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        @keyframes slideDown {
            from { opacity: 0; transform: translateY(-10px) scaleY(0.96); transform-origin: top; }
            to { opacity: 1; transform: translateY(0) scaleY(1); transform-origin: top; }
        }

        .expanded-detail.show {
            display: flex;
        }

        /* Staggered content reveal inside the panel */
        .expanded-detail .detail-text > * {
            animation: contentReveal 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
        }
        .expanded-detail .detail-text > *:nth-child(1) { animation-delay: 0.06s; }
        .expanded-detail .detail-text > *:nth-child(2) { animation-delay: 0.14s; }
        .expanded-detail .detail-text > *:nth-child(3) { animation-delay: 0.22s; }
        .expanded-detail .detail-text > *:nth-child(4) { animation-delay: 0.30s; }

        @keyframes contentReveal {
            from { opacity: 0; transform: translateY(8px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .detail-text {
            flex: 0 0 40%;
            padding-right: 40px;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .detail-text h2 {
            margin-top: 0;
            font-size: 1.5rem;
        }

        .detail-text p {
            font-size: 1.1rem;
            line-height: 1.6;
            color: #42597A;
        }

        .model-answer {
            background: #F3F7FD;
            padding: 16px 20px;
            border-radius: 12px;
            font-size: 1.05rem;
            line-height: 1.5;
            color: #0B2545;
            font-weight: 500;
            margin-top: 10px;
            border-left: 4px solid #1B6EF3;
        }

        .detail-visual {
            flex: 0 0 60%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #F8FBFF;
            border-radius: 16px;
            border: 1px solid #E4EBF5;
            box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
            overflow: hidden;
        }

        /* =========================================
           2. FLASHCARDS TAB
           ========================================= */
        .flashcards-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 24px;
            perspective: 1000px;
        }
        
        .flip-card {
            background-color: transparent;
            height: 200px;
            perspective: 1000px;
            cursor: pointer;
        }

        .flip-card-inner {
            position: relative;
            width: 100%;
            height: 100%;
            text-align: center;
            transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            transform-style: preserve-3d;
        }

        .flip-card.flipped .flip-card-inner {
            transform: rotateY(180deg);
        }

        .flip-card-front, .flip-card-back {
            position: absolute;
            width: 100%;
            height: 100%;
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
            border-radius: 16px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 24px;
            box-sizing: border-box;
            border: 1px solid #E4EBF5;
            box-shadow: 0 4px 15px rgba(0,0,0,0.03);
        }

        .flip-card-front { background: #ffffff; color: #0B2545; }
        .flip-card-front .icon { font-size: 2.5rem; margin-bottom: 15px; }
        .flip-card-front h4 { margin: 0; font-size: 1.1rem; font-weight: 600; }
        .flip-card-back {
            background: #1B6EF3; color: white; transform: rotateY(180deg); border: none;
        }
        .flip-card-back p { margin: 0; font-size: 1.1rem; font-weight: 500; line-height: 1.5; }

        /* =========================================
           3. PAST PAPERS TAB
           ========================================= */
        .exam-card {
            background: #ffffff;
            border-radius: 20px;
            padding: 40px;
            box-sizing: border-box;
            box-shadow: 0 4px 20px rgba(0,0,0,0.03);
            border: 1px solid #E4EBF5;
        }

        .exam-badge {
            background: #E8F1FE;
            color: #1B6EF3;
            padding: 6px 12px;
            border-radius: 8px;
            font-weight: 700;
            font-size: 0.85rem;
            display: inline-block;
            margin-bottom: 20px;
            text-transform: uppercase;
        }

        .exam-question {
            font-size: 1.25rem;
            font-weight: 500;
            color: #0B2545;
            line-height: 1.6;
            margin-bottom: 30px;
        }

        .reveal-btn {
            background: #0B2545;
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 24px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.2s;
        }
        .reveal-btn:hover { transform: scale(1.03); }

        .exam-answer {
            margin-top: 30px;
            padding-top: 30px;
            border-top: 1px solid #E4EBF5;
            display: none;
        }
        
        .exam-answer.show {
            display: block;
            animation: fadeIn 0.5s;
        }

        .mark-scheme-list {
            padding-left: 20px;
            color: #12A150;
            font-weight: 700;
            font-size: 1.1rem;
            margin: 0;
        }
        .mark-scheme-list li { margin-bottom: 12px; }
        .mark-scheme-list span { color: #42597A; font-weight: 400; }
/* Smart Breadcrumb Dropdowns */
.crumb-dropdown-container { position: relative; display: inline-block; }
.crumb-dropdown-container:hover .crumb-dropdown-menu { display: block; animation: fadeInDown 0.2s ease-out; }
.dropdown-trigger { padding: 4px 8px; border-radius: 6px; transition: background 0.2s; cursor: pointer; }
.dropdown-trigger:hover { background: rgba(0,0,0,0.05); }
.crumb-dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: white; min-width: 220px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); border: 1px solid #E4EBF5; border-radius: 8px; padding: 8px; z-index: 1000; margin-top: 4px; }
.crumb-dropdown-item { padding: 8px 12px; font-size: 0.9rem; color: #0B2545; border-radius: 6px; cursor: pointer; white-space: nowrap; margin-bottom: 2px; }
.crumb-dropdown-item:last-child { margin-bottom: 0; }
.crumb-dropdown-item:hover { background: #F3F7FD; }
.crumb-dropdown-item.active { background: #E8F1FE; color: #1B6EF3; font-weight: 600; }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================================
   ExamOrbit — visual alignment layer v1.1                      2026-10-10
   ----------------------------------------------------------------------------
   Cognito-style white + blue: pure white canvas, bright blue brand accent and
   deep navy text. Semantic colours are retained so Save My Exams style callouts
   (exam tip / trap / mark scheme) and Maths Genie style topic tables keep
   working. Appended last so it wins over the accumulated legacy rules above.
   Palette tokens live in :root.
   Scope: colour, surface treatment, motion. No layout restructuring.
   ============================================================================ */

/* 1 — Flat surfaces. Glassmorphism (backdrop blur) removed app-wide. */
body * {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

/* 2 — White canvas for the home + dashboard views, and the top bar. */
#home-view,
#subject-dashboard-view {
    background-color: var(--canvas) !important;
}
.lab-top-navbar {
    background-color: var(--canvas) !important;
    border-bottom: 1px solid var(--border-line) !important;
    height: 64px !important;
    padding: 0 40px !important;
}
/* keep the home view filling the viewport after the slimmer bar */
#home-view { min-height: calc(100vh - 64px) !important; }

/* 3 — Subject cards: white, hairline border, soft lift, blue hover ring. */
.subject-card {
    background-color: var(--surface) !important;
    border: 1px solid var(--border-line) !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 2px rgba(11, 37, 69, .04), 0 8px 24px rgba(11, 37, 69, .05) !important;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease !important;
}
.subject-card:hover {
    border-color: var(--accent) !important;
    box-shadow: 0 2px 4px rgba(27, 110, 243, .08), 0 12px 32px rgba(27, 110, 243, .14) !important;
    transform: translateY(-3px) !important;
}
/* retire the sibling-grayscale hover gimmick and the decorative watermark */
.subject-grid:has(.subject-card:hover) .subject-card:not(:hover) {
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
}
.subject-card::after,
.system-block-card::after { display: none !important; }

/* 4 — Course-pipeline cards: flat white with the same soft lift. */
.glass-card {
    background: var(--surface) !important;
    border: 1px solid var(--border-line) !important;
    box-shadow: 0 1px 2px rgba(11, 37, 69, .04), 0 8px 24px rgba(11, 37, 69, .05) !important;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease !important;
}
.glass-card:hover {
    border-color: var(--accent) !important;
    box-shadow: 0 2px 4px rgba(27, 110, 243, .08), 0 12px 32px rgba(27, 110, 243, .14) !important;
    transform: translateY(-3px) !important;
}

/* 5 — Serif for headings / definitions / formulae (VISION: Georgia or Times). */
.scenarios-grid .thumb-card .thumb-info h3,
.scenarios-grid .expanded-detail h2,
.glass-card h3 {
    font-family: Georgia, 'Times New Roman', serif !important;
}

/* 6 — Segmented control, spec pills and the CTA all follow the blue accent. */
.seg-tab-btn.active {
    background: var(--accent-soft) !important;
    color: var(--accent) !important;
    border: 1px solid #CFE0FA !important;
    box-shadow: none !important;
}
.spec-pill-badge {
    background: var(--accent-tint) !important;
    color: var(--accent) !important;
    border: 1px solid #CFE0FA !important;
}
/* the primary CTA is a filled Cognito-blue button */
.subject-launch-cta:not(.locked) {
    background: var(--accent) !important;
    border: 1px solid var(--accent) !important;
    color: #FFFFFF !important;
}
.subject-launch-cta:not(.locked):hover {
    background: #1557C7 !important;
    border-color: #1557C7 !important;
    color: #FFFFFF !important;
}
.subject-launch-cta.locked { box-shadow: none !important; }

/* 6b — Page and card titles read as blue (Cognito heading treatment). */
.welcome-hero h1,
.subject-card-title,
#dashSyllabusTitle {
    color: var(--heading) !important;
}

/* 7 — Calmer scrollbars. */
::-webkit-scrollbar-thumb { background: #C7D7EC !important; }
::-webkit-scrollbar-thumb:hover { background: #A9BFDA !important; }

/* 8 — Visible keyboard focus (accessibility). */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* 9 — Respect the user's reduced-motion preference. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================================
   10 — Topic table (Maths Genie style row list)               2026-10-10
   Replaces the old .glass-grid card grid. Rows are generated by
   renderTopicTable() in js/app.js from the active topicUnits database, so
   GCSE / A-Level / Maths syllabi all render correctly.
   ============================================================================ */

.topic-table {
    background: var(--surface);
    border: 1px solid var(--border-line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(11, 37, 69, .04), 0 8px 24px rgba(11, 37, 69, .05);
}

.topic-table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: var(--surface-alt);
    border-bottom: 1px solid var(--border-line);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.topic-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 130px 90px 18px;
    align-items: center;
    gap: 14px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--border-line);
    cursor: pointer;
    transition: background-color .15s ease, box-shadow .15s ease;
}
.topic-row:last-child { border-bottom: none; }
.topic-row:hover {
    background: var(--surface-alt);
    box-shadow: inset 3px 0 0 var(--accent);
}

.topic-num {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: var(--accent-tint);
    border: 1px solid #CFE0FA;
    color: var(--accent);
    font-weight: 800;
    font-size: .9rem;
    font-variant-numeric: tabular-nums;
}

.topic-name {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topic-meta {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.topic-progress {
    display: block;
    height: 6px;
    border-radius: 999px;
    background: var(--accent-soft);
    overflow: hidden;
}
.topic-progress > i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: var(--accent);
    transition: width .3s ease;
}

.topic-chevron {
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    text-align: right;
    transition: color .15s ease, transform .15s ease;
}
.topic-row:hover .topic-chevron { color: var(--accent); transform: translateX(2px); }

.topic-row.is-started .topic-num { background: var(--accent-soft); }
.topic-row.is-complete .topic-num {
    background: rgba(18, 161, 80, .1);
    border-color: rgba(18, 161, 80, .3);
    color: var(--ok);
}
.topic-row.is-complete .topic-progress > i { background: var(--ok); }

@media (max-width: 720px) {
    .topic-row { grid-template-columns: 30px minmax(0, 1fr) 18px; gap: 12px; }
    .topic-meta,
    .topic-progress { display: none; }
}
