:root{--bg: #eef9fb;--panel: #ffffff;--line: #cfe7ef;--text: #123047;--muted: #5f7f90;--primary: #0891b2;--primary-dark: #0369a1;--green: #22b66e;--amber: #f5a524;--red: #f05261;--blue: #2f6bea;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.68}.theme-dark{--bg: #071923;--panel: #0f2733;--line: #244858;--text: #effbff;--muted: #a8cbd8;--primary: #22b8d4;--primary-dark: #0891b2;background:#071923;color:var(--text)}.app-shell.theme-dark{background:radial-gradient(circle at 16% 12%,rgba(31,154,181,.22),transparent 32%),linear-gradient(180deg,#071923,#0a202b 52%,#071923)}.theme-dark input,.theme-dark select{background:#101827;border-color:var(--line);color:var(--text)}.theme-dark .sidebar,.theme-dark .workspace,.theme-dark .top-tabs,.theme-dark .panel,.theme-dark .chat-panel,.theme-dark .insight-card,.theme-dark .feature-card,.theme-dark .feature-page-header,.theme-dark .message-bubble{background:var(--panel);border-color:var(--line);color:var(--text);box-shadow:0 14px 36px #0000002e}.theme-dark .top-tabs button,.theme-dark .header-actions button,.theme-dark .prompt-chips button,.theme-dark .outline-btn,.theme-dark .chat-input button,.theme-dark .action-line,.theme-dark .document-list button,.theme-dark .suggestion-row button,.theme-dark .detail-list button{background:#101827;border-color:var(--line);color:var(--text)}.theme-dark .top-tabs button.selected,.theme-dark .chat-input button:last-child,.theme-dark .new-session,.theme-dark .primary-btn,.theme-dark .upgrade-card button{background:var(--primary);color:#fff;border-color:var(--primary)}.theme-dark .nav-block button{color:var(--text)}.theme-dark .nav-block button.active,.theme-dark .nav-block button:hover,.theme-dark .document-list button.active{background:#113746;border-color:#1f9ab5;color:#c9f5ff}.theme-dark .upgrade-card,.theme-dark .tip-bar,.theme-dark .retention-card,.theme-dark .suggestions-card{background:#171d31;border-color:var(--line)}.theme-dark .drop-zone{border-color:#53607f;color:var(--muted)}.theme-dark .drop-zone strong,.theme-dark .stat-line,.theme-dark .action-line,.theme-dark .teacher-bubble,.theme-dark .message-bubble p,.theme-dark .detail-list strong,.theme-dark .retention-list span{color:var(--text)}.theme-dark .message.user .message-bubble{background:#123747;border-color:#1f9ab5}.theme-dark .confusion-box{background:#311923;border-color:#7f2b3d}.theme-dark .topic-pill-row span,.theme-dark .topic-stack span{background:#113747;border-color:#1f9ab5;color:#c9f5ff}.theme-dark .result-box{background:#151a27;border:1px solid var(--line);color:var(--text);box-shadow:none}.auth-page{min-height:100vh;display:grid;place-items:center;padding:28px;background:radial-gradient(circle at 18% 14%,rgba(141,220,236,.42),transparent 32%),linear-gradient(180deg,#eaf9ff,#f7fcff 46%,#eef9fb)}.auth-shell{width:min(980px,100%);display:grid;grid-template-columns:1.1fr .9fr;background:#ffffffdb;border:1px solid rgba(122,197,216,.42);border-radius:8px;box-shadow:0 22px 70px #22748e29;overflow:hidden;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}.auth-copy{padding:56px;background:linear-gradient(160deg,#cff3faf2,#eafbffd1),#e8faff;color:#10354a}.auth-page .brand-mark{background:linear-gradient(135deg,#0ea5c6,#0369a1);box-shadow:0 14px 34px #0e74903d}.auth-copy h1{margin:18px 0 10px;font-size:44px;color:#0f3d56}.auth-copy p{max-width:520px;color:#42697b;line-height:1.7}.auth-points{display:flex;flex-direction:column;gap:12px;margin-top:30px}.auth-points span{color:#15506c}.auth-points span,.logo-row,.stat-line,.action-line,.feature-card h3,.tip-bar,.link-line{display:flex;align-items:center;gap:10px}.auth-card{padding:44px;display:flex;flex-direction:column;gap:18px;background:#fffffff0;color:#182033}.auth-card h2{margin:0 0 4px;color:#123a51}.auth-card input{border-color:#c6e6ef;background:#fbfeff}.auth-card input:focus{border-color:#0ea5c6;box-shadow:0 0 0 3px #0ea5c624}.auth-card .primary-btn{background:linear-gradient(135deg,#0891b2,#0369a1);box-shadow:0 12px 26px #0891b22e}.auth-card .text-btn{color:#04748f}label{display:flex;flex-direction:column;gap:8px;color:var(--muted);font-size:14px}input,select{width:100%;border:1px solid var(--line);border-radius:8px;padding:12px 14px;color:var(--text);background:#fff;outline:none}input:focus,select:focus{border-color:var(--primary);box-shadow:0 0 0 3px #6648f01f}.primary-btn,.new-session,.feature-card button,.upgrade-card button{border:0;border-radius:8px;background:var(--primary);color:#fff;padding:12px 16px;font-weight:700}.text-btn{border:0;background:transparent;color:var(--primary)}.error-text,.alert{color:#b42331;background:#fff1f3;border:1px solid #ffd2d8;padding:10px 12px;border-radius:8px}.app-shell{min-height:100vh;display:grid;grid-template-columns:270px 1fr;gap:14px;padding:10px;background:radial-gradient(circle at 15% 10%,rgba(141,220,236,.34),transparent 30%),linear-gradient(180deg,#eaf9ff,#f7fcff 48%,#eef9fb)}.sidebar{background:#ffffffe6;border:1px solid var(--line);border-radius:8px;padding:18px 14px;display:flex;flex-direction:column;gap:16px;min-height:calc(100vh - 20px);position:sticky;top:10px}.brand-mark{width:46px;height:46px;border-radius:8px;display:grid;place-items:center;background:linear-gradient(135deg,#0ea5c6,#0369a1);color:#fff;flex:0 0 auto}.brand-mark.large{width:62px;height:62px}.logo-row strong,.profile-row strong{display:block}.logo-row span,.profile-row span,.nav-block small,.panel small,.feature-card p,.feature-card span,.insight-card p,.suggestion-row span,.session-header p{color:var(--muted);font-size:13px}.new-session{display:flex;align-items:center;justify-content:center;gap:8px}.nav-block{display:flex;flex-direction:column;gap:5px}.nav-block small{text-transform:uppercase;font-weight:800;margin:8px}.nav-block button{border:1px solid transparent;background:transparent;color:#22304d;padding:10px;border-radius:8px;display:flex;align-items:center;gap:10px;text-align:left}.nav-block button.active,.nav-block button:hover{border-color:#9bd7e5;color:var(--primary);background:#eaf9ff}.bottom-settings{margin-top:auto}.upgrade-card{border:1px solid #bde8f0;background:#f6fcfe;border-radius:8px;padding:14px;display:flex;flex-direction:column;gap:8px}.upgrade-card span{color:#51617f;font-size:12px}.profile-row{display:grid;grid-template-columns:42px 1fr 18px;gap:10px;align-items:center}.avatar{width:42px;height:42px;border-radius:8px;background:#22304d;color:#fff;display:grid;place-items:center;font-weight:800}.workspace{background:#ffffffdb;border:1px solid var(--line);border-radius:8px;padding:26px;min-width:0}.session-header{display:flex;justify-content:space-between;align-items:center;gap:18px;position:relative}.session-header h1{margin:0 0 8px;display:flex;align-items:center;gap:8px;font-size:25px}.export-menu{position:relative;flex:0 0 auto}.export-trigger{width:auto;display:inline-flex;align-items:center;gap:8px}.export-options{position:absolute;right:0;top:calc(100% + 8px);width:220px;background:var(--panel);border:1px solid var(--line);border-radius:8px;box-shadow:0 18px 50px #2e385a29;padding:8px;z-index:20}.export-options button{width:100%;border:0;background:transparent;color:var(--text);text-align:left;padding:10px 11px;border-radius:7px}.export-options button:hover{background:#e7f8fc;color:var(--primary)}.theme-dark .export-options button:hover{background:#113747}.top-tabs{margin:18px 0 14px;display:flex;align-items:center;justify-content:space-between;gap:14px;border:1px solid var(--line);border-radius:8px;padding:12px;background:#ffffffbd}.tab-list,.header-actions,.prompt-chips,.inline-control{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.top-tabs button,.header-actions button,.prompt-chips button,.outline-btn,.chat-input button{border:1px solid var(--line);background:#fff;border-radius:8px;color:#33405d;padding:10px 14px;display:flex;align-items:center;gap:8px}.top-tabs button.selected{background:var(--primary);color:#fff;border-color:var(--primary)}.content-grid{display:grid;grid-template-columns:minmax(0,1fr) 400px;gap:14px}.main-column{display:flex;flex-direction:column;gap:14px;min-width:0}.overview-grid{display:grid;grid-template-columns:1.1fr .95fr .85fr;gap:14px}.panel,.chat-panel,.insight-card,.feature-card{background:#fff;border:1px solid var(--line);border-radius:8px;padding:18px;box-shadow:0 12px 32px #3040700f}.panel h3,.feature-card h3,.insight-card h3{margin:0 0 12px;font-size:16px}.upload-panel h3{color:var(--primary)}.drop-zone{border:1px dashed #aeb8cf;border-radius:8px;min-height:180px;align-items:center;justify-content:center;text-align:center;color:var(--muted)}.drop-zone input{display:none}.drop-zone strong{color:var(--text);font-size:17px}.file-icons{display:flex;gap:24px}.file-icons span{width:44px;height:54px;border-radius:4px;display:grid;place-items:center;color:#fff;font-weight:800;font-size:12px}.pdf{background:#e63746}.doc{background:#2f6bea}.txt{background:#6c7897}.stat-line{margin:13px 0;color:#33405d}.outline-btn{color:var(--primary);border-color:#9bd7e5;width:100%;justify-content:center}.action-line{width:100%;border:1px solid var(--line);background:#fff;border-radius:8px;padding:11px 12px;margin-top:9px;color:#24304b}.document-list{border-top:1px solid var(--line);margin-top:14px;padding-top:12px;display:flex;flex-direction:column;gap:8px}.document-list.roomy{border:1px solid var(--line);border-radius:8px;padding:12px;margin:0 0 12px}.document-list strong{font-size:13px;color:var(--text)}.document-list>span{color:var(--muted);font-size:13px}.document-list button{border:1px solid var(--line);background:#fff;border-radius:8px;padding:9px 10px;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px;color:#263553;text-align:left}.document-list button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.document-list button.active{border-color:#9bd7e5;background:#eaf9ff;color:var(--primary)}.feature-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.feature-card{min-height:170px;display:flex;flex-direction:column;gap:9px}.feature-card button{margin-top:auto}.feature-card.exam{background:snow;border-color:#ffd5d9}.feature-card.path{background:#f8fffb;border-color:#bfead3}.feature-card.teacher{background:#f8fbff;border-color:#c9dafd}.feature-card.exam h3{color:#ef354b}.feature-card.path h3{color:#15985a}.feature-card.teacher h3{color:#245dda}.inline-control{flex-wrap:nowrap}.inline-control input{padding:9px 10px}.inline-control button{padding:10px 14px;background:#ef354b}.teacher-bubble{border:1px solid var(--line);border-radius:8px;padding:12px;font-size:13px;color:#263553}.chat-panel{order:-1}.messages{min-height:360px;max-height:520px;overflow:auto;display:flex;flex-direction:column;gap:14px;padding:2px}.message{display:flex;gap:14px;align-items:flex-start}.message.user{justify-content:flex-end}.message-bubble{width:min(760px,100%);border:1px solid var(--line);border-radius:8px;padding:16px 18px;background:#fff}.message.user .message-bubble{width:min(650px,82%);background:#e7f8fc;border-color:#bde8f0}.message-bubble p{white-space:pre-wrap;line-height:1.65;margin:0 0 10px}.bot-orb{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:var(--primary);color:#fff}.confusion-box{border:1px solid #ffd6d9;background:#fff8f8;border-radius:8px;padding:14px;color:#b42331;margin-top:12px}.confusion-box strong{display:flex;align-items:center;gap:8px;margin-bottom:10px}.confusion-box span{display:inline-flex;border:1px solid #ffc2c8;background:#fff0f2;color:#b42331;padding:7px 10px;border-radius:7px;margin:4px 6px 0 0;font-size:12px}.chat-input{display:grid;grid-template-columns:1fr auto auto;gap:8px;margin-top:12px}.chat-input button:last-child{background:var(--primary);color:#fff;border-color:var(--primary)}.prompt-chips{margin-top:14px}.prompt-chips button{padding:9px 13px;font-size:12px}.insights-column{display:flex;flex-direction:column;gap:14px}.suggestions-card{background:#f6fcfe;border-color:#bde8f0}.quiz-needed-card{background:#f8fbff;border-color:#c9dafd}.quiz-needed-card .primary-btn{width:100%;margin-top:10px}.suggestions-card h3{color:var(--primary)}.suggestion-row{display:grid;grid-template-columns:1fr auto;align-items:center;gap:12px;padding:11px 0}.suggestion-row div{display:flex;flex-direction:column;gap:4px}.suggestion-row button{border:1px solid #9bd7e5;background:#fff;color:var(--primary);border-radius:8px;padding:8px 14px}.link-line{border:0;background:transparent;color:var(--primary);padding:8px 0 0}.heatmap-labels,.heatmap-row{display:grid;grid-template-columns:100px repeat(3,1fr);gap:9px;align-items:center;font-size:13px}.heatmap-labels{color:var(--muted);margin-bottom:8px}.heatmap-row{margin:7px 0}.heatmap-row div{height:17px;border-radius:4px;opacity:.45}.heatmap-row div.active{opacity:1}.hot{background:var(--red)}.warm{background:var(--amber)}.cool{background:var(--green)}.retention-card{background:#f6fcfe}.retention-card strong{display:block;color:var(--primary);font-size:34px}.retention-card svg{width:100%;height:64px}.confusion-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 0;font-size:14px}.confusion-row b{border-radius:7px;padding:6px 10px;font-size:12px}.confusion-row .high{background:#ffe5e8;color:#c82437}.confusion-row .medium{background:#fff0d1;color:#9a5c00}.result-box{max-height:300px;overflow:auto;white-space:pre-wrap;background:#fff;color:var(--text);border:1px solid var(--line);border-radius:8px;padding:18px;line-height:1.65;font-family:inherit;font-size:15px;box-shadow:0 14px 40px #52608c14}.tip-bar{justify-content:center;border:1px solid #bde8f0;background:#f6fcfe;color:var(--primary);border-radius:8px;padding:12px;font-size:14px}.feature-page{display:flex;flex-direction:column;gap:14px}.feature-page-header{background:#fff;border:1px solid var(--line);border-radius:8px;padding:20px;display:grid;grid-template-columns:54px 1fr;align-items:center;gap:14px}.feature-page-icon{width:54px;height:54px;border-radius:8px;display:grid;place-items:center;background:#e7f8fc;color:var(--primary)}.feature-page-header h2{margin:0 0 5px;font-size:22px}.feature-page-header p,.feature-workbench p,.teacher-script p{margin:0;color:var(--muted);line-height:1.6}.feature-detail-grid{display:grid;grid-template-columns:1fr;gap:14px}.feature-detail-grid.two{grid-template-columns:minmax(0,1fr) minmax(280px,.75fr)}.drop-zone.compact{min-height:160px}.feature-workbench{display:flex;flex-direction:column;gap:16px}.topic-pill-row,.topic-stack{display:flex;flex-wrap:wrap;gap:8px}.topic-pill-row span,.topic-stack span{border:1px solid #cfc7ff;background:#eaf9ff;color:var(--primary);border-radius:8px;padding:8px 11px;font-size:13px;font-weight:700}.topic-stack{flex-direction:column}.topic-stack span{color:#24304b;background:#fff}.checklist-panel{display:flex;flex-direction:column;gap:12px}.checklist-panel span{display:flex;align-items:center;gap:10px;color:#1d7f50;font-weight:700}.teacher-script{background:#f8fbff}.detail-list,.retention-list{display:flex;flex-direction:column;gap:10px}.detail-list>div,.retention-list>div{border:1px solid var(--line);border-radius:8px;padding:13px;display:grid;grid-template-columns:1fr auto;gap:6px 12px;align-items:center}.detail-list strong,.retention-list span{font-weight:800}.detail-list span{color:var(--muted);font-size:13px}.detail-list button{grid-row:span 2;border:1px solid #9bd7e5;background:#fff;color:var(--primary);border-radius:8px;padding:8px 13px}.retention-list>div{grid-template-columns:minmax(120px,1fr) 2fr 54px}.retention-list meter{width:100%;height:18px}.feature-output{margin:0;width:100%}.readable-output{display:grid;gap:14px}.readable-section{border:1px solid #e2ddff;background:#f6fcfe;border-radius:8px;padding:15px}.readable-section h3{margin:0 0 10px;color:var(--primary);font-size:17px}.readable-section p{margin:0 0 10px;line-height:1.7}.readable-section p:last-child{margin-bottom:0}.readable-section ul{margin:0;padding-left:20px;display:grid;gap:8px}.readable-section li{line-height:1.6}.flashcard-output-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.flashcard-output-card{border:1px solid #bde8f0;background:#fff;border-radius:8px;padding:14px}.flashcard-output-card strong{display:block;margin-bottom:8px;color:var(--text)}.flashcard-output-card p{color:var(--muted)}.theme-dark .readable-section{background:#101827;border-color:var(--line)}.theme-dark .flashcard-output-card{background:#151a27;border-color:var(--line)}.learning-path-output{max-height:none;display:flex;flex-direction:column;gap:16px}.path-output-header{border-bottom:1px solid var(--line);padding-bottom:14px}.path-output-header span{color:var(--primary);font-weight:900;font-size:13px}.path-output-header h3{margin:4px 0 5px;font-size:22px}.path-output-header p{margin:0;color:var(--muted);font-weight:700}.path-step-list{display:grid;gap:12px}.path-step-card{display:grid;grid-template-columns:92px 1fr;gap:14px;border:1px solid #ded8ff;background:#f6fcfe;border-radius:8px;padding:14px}.path-step-number{display:grid;place-items:center;min-height:58px;border-radius:8px;background:#eeeaff;color:var(--primary);font-weight:900}.path-step-card h4{margin:0 0 6px;font-size:16px}.path-step-card p{margin:0;color:var(--text)}.path-step-meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.path-step-meta span{border:1px solid var(--line);border-radius:8px;padding:6px 9px;color:var(--muted);background:#fff;font-size:13px;font-weight:700}.theme-dark .path-step-card{background:#101827;border-color:var(--line)}.theme-dark .path-step-number{background:#113747;color:#c9f5ff}.theme-dark .path-step-meta span{background:#151a27}.refresh-action{align-self:flex-start;width:auto}.quiz-player{display:flex;flex-direction:column;gap:16px}.quiz-setup-grid{display:grid;grid-template-columns:minmax(160px,220px) minmax(160px,220px);gap:14px}.quiz-meta{color:var(--muted);margin:0 0 12px;font-size:14px}.quiz-progress{display:flex;justify-content:space-between;gap:12px;color:var(--muted);font-size:14px}.quiz-options{display:grid;gap:10px}.quiz-options button{border:1px solid var(--line);background:#fff;color:var(--text);border-radius:8px;padding:13px 14px;text-align:left}.quiz-options button.selected{border-color:var(--primary);background:#eaf9ff}.quiz-options button.correct{border-color:#8fdcb7;background:#edfff5;color:#126c41}.quiz-options button.wrong{border-color:#ffc4ca;background:#fff1f3;color:#b42331}.answer-feedback{border-radius:8px;padding:12px 14px;font-weight:800}.answer-feedback p{margin:7px 0 0;font-weight:500;color:var(--muted)}.answer-feedback.correct{border:1px solid #a4e4c2;background:#f0fff7;color:#126c41}.answer-feedback.wrong{border:1px solid #ffc4ca;background:#fff1f3;color:#b42331}.quiz-actions{display:flex;justify-content:flex-end}.exam-plan-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.exam-plan-grid .exam-mini-test{grid-column:1 / -1}.exam-list{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:10px}.exam-list li{line-height:1.55}.exam-list li span{display:block;color:var(--muted);margin-top:3px}.score-card{border:1px solid #cfc7ff;background:#eaf9ff;border-radius:8px;padding:22px;display:flex;flex-direction:column;gap:5px;align-items:center}.score-card strong{color:var(--primary);font-size:42px}.score-card span{color:var(--muted);font-weight:800}.theme-dark .quiz-options button{background:#101827;border-color:var(--line);color:var(--text)}.theme-dark .quiz-options button.selected,.theme-dark .score-card{background:#113747;border-color:#1f9ab5}.theme-dark .quiz-options button.correct,.theme-dark .answer-feedback.correct{background:#123022;border-color:#287a51;color:#9ee7bf}.theme-dark .quiz-options button.wrong,.theme-dark .answer-feedback.wrong{background:#311923;border-color:#7f2b3d;color:#ffadb8}@media(max-width:1280px){.app-shell{grid-template-columns:230px 1fr}.content-grid{grid-template-columns:1fr}.insights-column{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:960px){.app-shell,.auth-shell{grid-template-columns:1fr}.session-header{align-items:flex-start;flex-direction:column}.export-menu,.export-trigger{width:100%}.export-options{left:0;right:auto;width:100%}.sidebar{position:static;min-height:auto}.overview-grid,.feature-grid,.feature-detail-grid.two,.exam-plan-grid,.flashcard-output-grid,.insights-column{grid-template-columns:1fr}.workspace{padding:16px}}@media(max-width:640px){.app-shell{padding:0}.workspace,.sidebar,.auth-shell{border-radius:0}.auth-copy,.auth-card{padding:28px}.auth-copy h1{font-size:34px}.top-tabs{align-items:flex-start;flex-direction:column}.message.user .message-bubble{width:100%}.chat-input{grid-template-columns:1fr}}
