/* education.css — extracted verbatim from education.html's original inline <style>; logic/behavior unchanged, only relocated */
/* ==========================================================================
           1. DESIGN SYSTEM & VARIABLES
           ========================================================================== */
        :root {
            --font-main: 'Plus Jakarta Sans', sans-serif;
            --transition-speed: 0.4s;
            --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
            
            --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
            --calc-bg: #ffffff;
            --calc-border: rgba(15, 23, 42, 0.06);
            --calc-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.04);
            --text-main: #0f172a;
            --text-secondary: #64748b;
            
            --input-bg: rgba(241, 245, 249, 0.8);
            --accent-color: #0d9488; /* Academic Teal Theme Accent */
            --accent-hover: #0f766e;
            --panel-bg: #ffffff;
            --scrollbar-thumb: rgba(15, 23, 42, 0.15);
        }

        body.dark-mode {
            --bg-gradient: linear-gradient(135deg, #020617 0%, #0f172a 100%);
            --calc-bg: rgba(15, 23, 42, 0.6);
            --calc-border: rgba(255, 255, 255, 0.06);
            --calc-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
            --text-main: #f8fafc;
            --text-secondary: #94a3b8;
            
            --input-bg: rgba(30, 41, 59, 0.5);
            --accent-color: #2dd4bf;
            --accent-hover: #0d9488;
            --panel-bg: rgba(15, 23, 42, 0.95);
            --scrollbar-thumb: rgba(255, 255, 255, 0.1);
        }

        /* ==========================================================================
           2. GLOBAL STYLES & RESET
           ========================================================================== */
        * { box-sizing: border-box; margin: 0; padding: 0; user-select: none; -webkit-user-select: none; }
        body {
            font-family: var(--font-main); background: var(--bg-gradient); min-height: 100vh;
            display: flex; justify-content: center; align-items: center; padding: 20px;
            color: var(--text-main); transition: background var(--transition-speed) ease, color var(--transition-speed) ease;
            overflow-x: hidden; position: relative;
        }
        body::before {
            content: ''; position: absolute; width: 400px; height: 400px; border-radius: 50%;
            filter: blur(150px); opacity: 0.12; z-index: -1; top: -10%; left: -10%; background: #0d9488;
        }

        /* ==========================================================================
           3. CONTAINER & FIXED HEIGHT SCROLL VIEWPORTS
           ========================================================================== */
        .calc-container {
            position: relative; width: 100%; max-width: 960px; 
            height: calc(100vh - 40px);
            background: var(--calc-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
            border: 1px solid var(--calc-border); border-radius: 28px; box-shadow: var(--calc-shadow);
            display: flex; flex-direction: column; overflow: hidden; transition: var(--transition-smooth);
        }
        .calc-header {
            display: flex; justify-content: space-between; align-items: center;
            padding: 20px 24px; z-index: 10; flex-shrink: 0; border-bottom: 1px solid var(--calc-border);
        }
        .calc-title { font-family: 'Space Grotesk', sans-serif; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.5px; }
        .header-controls { display: flex; gap: 10px; align-items: center; }
        
        .icon-btn {
            background: var(--input-bg); border: 1px solid var(--calc-border);
            width: 38px; height: 38px; border-radius: 12px; cursor: pointer;
            display: flex; justify-content: center; align-items: center;
            color: var(--text-main); transition: var(--transition-smooth);
        }
        .icon-btn:hover { transform: scale(1.05); border-color: var(--accent-color); }
        .icon-btn:active { transform: scale(0.95); }
        .icon-btn svg { width: 18px; height: 18px; fill: currentColor; }

        .theme-btn .sun-icon, body.dark-mode .theme-btn .moon-icon { display: none; }
        body.dark-mode .theme-btn .sun-icon { display: block; }

        /* ==========================================================================
           4. WORKSPACE LAYOUT
           ========================================================================== */
        .suite-workspace { display: flex; flex-grow: 1; overflow: hidden; position: relative; }
        
        .suite-sidebar {
            width: 250px; border-right: 1px solid var(--calc-border);
            padding: 20px 14px; display: flex; flex-direction: column; gap: 6px; flex-shrink: 0;
            overflow-y: auto; background: rgba(241, 245, 249, 0.2);
        }
        body.dark-mode .suite-sidebar { background: rgba(15, 23, 42, 0.1); }
        .sidebar-item {
            display: flex; align-items: center; gap: 12px; padding: 12px 14px;
            border-radius: 12px; cursor: pointer; font-size: 0.9rem; font-weight: 600;
            color: var(--text-secondary); transition: var(--transition-smooth);
        }
        .sidebar-item:hover { background: var(--input-bg); color: var(--text-main); }
        .sidebar-item.active {
            background: rgba(13, 148, 136, 0.1); color: var(--accent-color); font-weight: 700;
        }
        body.dark-mode .sidebar-item.active { background: rgba(45, 212, 191, 0.15); }

        .stage-pane { flex-grow: 1; padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 20px; }
        .stage-pane::-webkit-scrollbar { width: 5px; }
        .stage-pane::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 10px; }

        .module-grid-view { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
        .app-card-node {
            background: var(--input-bg); border: 1px solid var(--calc-border);
            padding: 18px; border-radius: 16px; cursor: pointer; display: flex;
            align-items: center; gap: 16px; transition: var(--transition-smooth);
        }
        .app-card-node:hover { transform: translateY(-2px); border-color: var(--accent-color); box-shadow: var(--calc-shadow); }
        .app-card-icon {
            width: 44px; height: 44px; border-radius: 12px; background: #ffffff;
            border: 1px solid var(--calc-border); display: flex; align-items: center; justify-content: center;
            color: var(--accent-color); font-size: 1.25rem;
        }
        body.dark-mode .app-card-icon { background: rgba(30, 41, 59, 0.8); }
        .app-card-meta { display: flex; flex-direction: column; gap: 2px; }
        .app-card-title { font-size: 0.95rem; font-weight: 700; }
        .app-card-desc { font-size: 0.8rem; color: var(--text-secondary); font-weight: 500; }

        .form-layout-split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; align-items: start; }
        .form-inputs-stack { display: flex; flex-direction: column; gap: 14px; }
        .form-group-item { display: flex; flex-direction: column; gap: 6px; }
        .dynamic-list-container { display: flex; flex-direction: column; gap: 10px; max-height: 280px; overflow-y: auto; padding-right: 4px; }
        .dynamic-row-item { display: grid; grid-template-columns: 2fr 1fr 1.2fr auto; gap: 8px; align-items: center; }
        
        label { font-size: 0.82rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.3px; }
        input[type="number"], input[type="text"], select {
            width: 100%; background: var(--input-bg); border: 1px solid var(--calc-border);
            padding: 12px 16px; border-radius: 12px; font-family: var(--font-main);
            font-size: 0.95rem; font-weight: 600; color: var(--text-main); outline: none;
            transition: var(--transition-smooth); -webkit-user-select: text; user-select: text;
        }
        input:focus, select:focus { border-color: var(--accent-color); }

        .output-summary-card {
            background: var(--input-bg); border: 1px solid var(--calc-border);
            padding: 20px; border-radius: 16px; display: flex; flex-direction: column; gap: 12px;
        }
        .metrics-row { display: flex; justify-content: space-between; align-items: center; padding-bottom: 8px; border-bottom: 1px dashed var(--calc-border); }
        .metrics-row:last-child { border: none; padding: 0; }
        .metric-lbl { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); }
        .metric-val { font-size: 1.15rem; font-weight: 700; font-family: 'Space Grotesk', sans-serif; }
        .metric-val.total-corpus { color: var(--accent-color); font-size: 1.5rem; }

        .table-viewport { width: 100%; overflow-x: auto; margin-top: 10px; border-radius: 12px; border: 1px solid var(--calc-border); }
        table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.85rem; }
        th { background: rgba(241, 245, 249, 0.6); font-weight: 700; color: var(--text-secondary); }
        th, td { padding: 12px 14px; border-bottom: 1px solid var(--calc-border); }
        body.dark-mode th { background: rgba(30, 41, 59, 0.4); }
        
        .progress-bar-track { width: 100%; height: 8px; background: rgba(15, 23, 42, 0.06); border-radius: 50px; overflow: hidden; margin-top: 4px; }
        body.dark-mode .progress-bar-track { background: rgba(255, 255, 255, 0.06); }
        .progress-bar-fill { height: 100%; background: var(--accent-color); border-radius: 50px; width: 0%; transition: width 0.5s ease; }

        .action-row { display: flex; gap: 10px; margin-top: 10px; }
        .btn-action {
            flex-grow: 1; padding: 12px; border-radius: 12px; border: none; font-family: var(--font-main);
            font-size: 0.9rem; font-weight: 700; cursor: pointer; display: flex; align-items: center;
            justify-content: center; gap: 8px; transition: var(--transition-smooth);
        }
        .btn-action-primary { background: var(--accent-color); color: #ffffff; }
        .btn-action-primary:hover { background: var(--accent-hover); }
        .btn-action-secondary { background: var(--input-bg); color: var(--text-main); border: 1px solid var(--calc-border); }

        /* History Side Slideout Panel */
        .history-panel {
            position: absolute; top: 0; right: -100%; width: 100%; max-width: 380px; height: 100%;
            background: var(--panel-bg); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
            z-index: 100; transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1); display: flex; flex-direction: column;
            border-left: 1px solid var(--calc-border);
        }
        .history-panel.open { right: 0; }
        .history-header { display: flex; justify-content: space-between; align-items: center; padding: 24px; border-bottom: 1px solid var(--calc-border); }
        .history-title { font-family: 'Space Grotesk', sans-serif; font-size: 1.2rem; font-weight: 700; }
        .history-list { flex-grow: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; }
        .history-item { text-align: left; padding: 12px; border-radius: 12px; background: var(--input-bg); border: 1px solid var(--calc-border); cursor: pointer; }
        .history-item-meta { font-size: 0.75rem; font-weight: 700; color: var(--accent-color); text-transform: uppercase; }
        .history-item-expr { font-size: 0.85rem; color: var(--text-secondary); margin: 2px 0; }
        .history-item-res { font-size: 1.1rem; font-weight: 700; }
        .history-footer { padding: 20px 24px; border-top: 1px solid var(--calc-border); display: flex; justify-content: flex-end; }
        .clear-hist-btn { background: transparent; border: none; color: var(--accent-color); font-size: 0.9rem; font-weight: 700; cursor: pointer; }

        /* FIXED TOAST NOTIFICATION CLASS STRUCTURE */
        .toast {
            position: fixed; 
            bottom: 35px; 
            left: 50%; 
            transform: translate(-50%, 40px); /* Pushes down out of view area initially */
            background: #0f172a; 
            color: #ffffff; 
            padding: 12px 24px; 
            border-radius: 50px;
            font-size: 0.85rem; 
            font-weight: 600; 
            opacity: 0; 
            pointer-events: none;
            transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease; 
            z-index: 9999; /* Higher priority stack viewports */
            box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3);
        }
        body.dark-mode .toast { background: #f8fafc; color: #0f172a; }
        .toast.show { transform: translate(-50%, 0); opacity: 1; }

        @media (max-width: 768px) {
            .suite-workspace { flex-direction: column; overflow: hidden; }
            .suite-sidebar { 
                width: 100%; height: auto; display: flex; flex-direction: row; 
                padding: 10px; border-right: none; border-bottom: 1px solid var(--calc-border);
                overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
            }
            .sidebar-item { padding: 8px 14px; white-space: nowrap; font-size: 0.85rem; }
            .form-layout-split { grid-template-columns: 1fr; gap: 16px; }
            .module-grid-view { grid-template-columns: 1fr; }
            .calc-container { height: 100vh; max-height: 100vh; border-radius: 0; border: none; }
            body { padding: 0; }
            .stage-pane { padding: 16px; overflow-y: auto; height: 100%; }
        }
