:root{font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;font-size:1.3rem;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:block;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media(prefers-color-scheme:light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}#root{max-width:1280px;margin:0 auto;padding:2rem;text-align:center}.logo{height:6em;padding:1.5em;will-change:filter;transition:filter .3s}.logo:hover{filter:drop-shadow(0 0 2em #646cffaa)}.logo.react:hover{filter:drop-shadow(0 0 2em #61dafbaa)}@keyframes logo-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media(prefers-reduced-motion:no-preference){a:nth-of-type(2) .logo{animation:logo-spin infinite 20s linear}}.card{padding:2em}.read-the-docs{color:#888}.chat-page{min-height:100vh;display:flex;flex-direction:column;gap:0}.chat-header{position:sticky;top:0;z-index:10;background:linear-gradient(180deg,#00000026,#0000),var(--header-bg, transparent);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);padding:1.25rem .5rem .75rem}.app-title{font-size:1.25rem;font-weight:700}.subtitle{opacity:.7;font-size:.95rem}.chat-main{flex:1;display:flex;flex-direction:column;padding:1rem .5rem .5rem}.empty-state{text-align:center;opacity:.85;margin:2rem 0 1rem}.empty-title{font-size:1.25rem;font-weight:600;margin-bottom:.25rem}.empty-tips{font-size:.95rem;opacity:.8}.messages{width:100%;max-width:900px;margin:0 auto;display:flex;flex-direction:column;gap:.75rem}.message{display:flex;align-items:flex-start;gap:.5rem}.message.user{flex-direction:row-reverse}.avatar{flex:0 0 auto;width:36px;height:36px;border-radius:50%;background:#646cff26;display:grid;place-items:center;font-size:18px}.message.user .avatar{background:#52c41a33}.bubble{max-width:80ch;padding:.75rem 1rem;border-radius:14px;line-height:1.4;white-space:pre-wrap;word-wrap:break-word}.message.assistant .bubble{background:#ffffff0f;border:1px solid rgba(255,255,255,.08)}.message.user .bubble{background:linear-gradient(180deg,#646cff40,#646cff26);border:1px solid rgba(100,108,255,.35)}.typing{display:inline-flex;gap:6px}.dot{width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.5;animation:blink 1.4s infinite ease-in-out}.dot:nth-child(2){animation-delay:.2s}.dot:nth-child(3){animation-delay:.4s}@keyframes blink{0%,80%,to{opacity:.2}40%{opacity:1}}.chat-input{position:sticky;bottom:0;z-index:10;background:linear-gradient(0deg,#00000026,#0000),var(--footer-bg, transparent);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);padding:.75rem .5rem 1rem}.error{max-width:900px;margin:0 auto .5rem;color:#ff6b6b;background:#ff6b6b1a;border:1px solid rgba(255,107,107,.25);padding:.5rem .75rem;border-radius:10px}.input-row{width:100%;max-width:900px;margin:0 auto;display:grid;grid-template-columns:1fr auto;gap:.5rem;align-items:center}.input-row textarea{width:100%;min-height:44px;max-height:160px;padding:.75rem .9rem;border-radius:12px;resize:vertical;background:#ffffff0f;border:1px solid rgba(255,255,255,.12);color:inherit;box-sizing:border-box;display:block;line-height:1.3;overflow:auto}.input-row button{height:44px;padding:0 1rem;border-radius:12px;background:linear-gradient(180deg,#646cff,#545bff);border:1px solid rgba(84,91,255,.6);color:#fff;align-self:end}.input-row button:disabled{opacity:.6;cursor:not-allowed}.note{max-width:900px;margin:.4rem auto 0;opacity:.65;font-size:.85rem;text-align:center}@media(max-width:600px){.input-row{grid-template-columns:1fr}.input-row button{width:100%;align-self:stretch}}@media(prefers-color-scheme:light){.message.assistant .bubble{background:#00000008;border:1px solid rgba(0,0,0,.08)}.message.user .bubble{background:linear-gradient(180deg,#545bff1a,#545bff0f);border:1px solid rgba(84,91,255,.25)}.avatar{background:#545bff1f}.message.user .avatar{background:#52c41a1f}.chat-header,.chat-input{background:#ffffffb3}}.sources{flex-basis:100%;align-self:stretch;margin:.25rem 0;margin-left:52px}.message.user .sources{margin-left:0;margin-right:52px}.sources-toggle{background:transparent;border:1px solid rgba(255,255,255,.18);color:inherit;padding:.35rem .6rem;font-size:.9rem;border-radius:10px}.sources-list{margin:.5rem 0 0;padding-left:1.2rem;display:grid;gap:.35rem}.sources-list li{background:#ffffff0f;border:1px solid rgba(255,255,255,.1);padding:.5rem .6rem;border-radius:8px;list-style:disc}@media(prefers-color-scheme:light){.sources-toggle{border-color:#0000001f}.sources-list li{background:#00000008;border-color:#00000014}}.top-nav{margin:.5rem auto 0;display:flex;gap:.5rem;justify-content:center}.nav-btn{padding:.5rem 1rem;border-radius:999px;border:1px solid rgba(255,255,255,.15);background:#ffffff0a;color:inherit;font-size:.9rem}.nav-btn.active{background:linear-gradient(180deg,#646cff,#545bff);border-color:#545bffb3;color:#fff}.books-page{max-width:960px;margin:0 auto;text-align:left;display:flex;flex-direction:column;gap:1.25rem}.books-header{display:flex;justify-content:space-between;align-items:center;gap:1rem}.books-title{font-size:1.35rem;font-weight:600}.books-subtitle{font-size:.95rem;opacity:.8}.books-stats{display:flex;gap:.5rem}.stat-pill{padding:.25rem .75rem;border-radius:999px;font-size:.85rem;background:#ffffff0f;border:1px solid rgba(255,255,255,.12)}.books-error{margin-top:0}.books-layout{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1.4fr);gap:1rem;align-items:flex-start}@media(max-width:800px){.books-layout{grid-template-columns:minmax(0,1fr)}}.book-card{background:#ffffff0a;border-radius:14px;padding:1rem 1.1rem 1.1rem;border:1px solid rgba(255,255,255,.1);box-shadow:0 18px 40px #00000059}@media(prefers-color-scheme:light){.book-card{background:#ffffffe6;border-color:#0000000f;box-shadow:0 10px 24px #0f172a1f}}.book-form{display:flex;flex-direction:column;gap:.75rem}.book-form-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:.75rem}@media(max-width:640px){.book-form-grid{grid-template-columns:minmax(0,1fr)}}.book-form input[type=text],.book-form input[type=number]{width:100%;padding:.55rem .7rem;border-radius:10px;border:1px solid rgba(255,255,255,.16);background:#0000004d;color:inherit}@media(prefers-color-scheme:light){.book-form input[type=text],.book-form input[type=number]{background:#ffffffe6;border-color:#00000014}}.books-empty{padding:.6rem .4rem;font-size:.9rem;opacity:.8}.books-table{width:100%;border-collapse:collapse;font-size:.9rem}.books-table thead{background:#0f172abf}.books-table th,.books-table td{padding:.55rem .7rem;text-align:left}.books-table tbody tr:nth-child(odd){background:#ffffff05}.books-table tbody tr:nth-child(2n){background:#0f172a66}.books-table .actions-col{text-align:right;white-space:nowrap}@media(prefers-color-scheme:light){.table-wrapper{border-color:#00000014}.books-table thead{background:#0f172ae6;color:#f9fafb}.books-table tbody tr:nth-child(odd){background:#f9fafb}.books-table tbody tr:nth-child(2n){background:#eef2ff}}.chapters-page{max-width:960px;margin:0 auto;text-align:left;display:flex;flex-direction:column;gap:1.25rem}.chapters-header{display:flex;justify-content:space-between;align-items:center;gap:1rem}.chapters-title{font-size:1.35rem;font-weight:600}.chapters-subtitle{font-size:.95rem;opacity:.8}.chapters-stats{display:flex;gap:.5rem}.chapters-error{margin-top:0}.chapters-layout{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1.4fr);gap:1rem;align-items:flex-start}@media(max-width:800px){.chapters-layout{grid-template-columns:minmax(0,1fr)}}.chapter-card{background:#ffffff0a;border-radius:14px;padding:1rem 1.1rem 1.1rem;border:1px solid rgba(255,255,255,.1);box-shadow:0 18px 40px #00000059}@media(prefers-color-scheme:light){.chapter-card{background:#ffffffe6;border-color:#0000000f;box-shadow:0 10px 24px #0f172a1f}}.chapter-form{display:flex;flex-direction:column;gap:.75rem}.chapter-form-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1.5fr);gap:.75rem}@media(max-width:640px){.chapter-form-grid{grid-template-columns:minmax(0,1fr)}}.chapter-form input[type=text],.chapter-form select{width:100%;padding:.55rem .7rem;border-radius:10px;border:1px solid rgba(255,255,255,.16);background:#0000004d;color:inherit}@media(prefers-color-scheme:light){.chapter-form input[type=text],.chapter-form select{background:#ffffffe6;border-color:#00000014}}.chapters-empty{padding:.6rem .4rem;font-size:.9rem;opacity:.8}.chapters-table{width:100%;border-collapse:collapse;font-size:.9rem}.chapters-table thead{background:#0f172abf}.chapters-table th,.chapters-table td{padding:.55rem .7rem;text-align:left}.chapters-table tbody tr:nth-child(odd){background:#ffffff05}.chapters-table tbody tr:nth-child(2n){background:#0f172a66}.chapters-table .actions-col{text-align:right;white-space:nowrap}@media(prefers-color-scheme:light){.table-wrapper{border-color:#00000014}.chapters-table thead{background:#0f172ae6;color:#f9fafb}.chapters-table tbody tr:nth-child(odd){background:#f9fafb}.chapters-table tbody tr:nth-child(2n){background:#eef2ff}}.questions-page{max-width:960px;margin:0 auto;text-align:right;display:flex;flex-direction:column;gap:1.25rem}.questions-header{display:flex;justify-content:space-between;align-items:center;gap:1rem}.questions-title{font-size:1.35rem;font-weight:600}.questions-subtitle{font-size:.95rem;opacity:.8}.questions-stats{display:flex;gap:.5rem}.questions-error{margin-top:0}.questions-layout{display:flex;flex-direction:column;gap:1rem;align-items:stretch}@media(max-width:800px){.questions-layout{flex-direction:column}}.question-card{background:#ffffff0a;border-radius:14px;padding:1rem 1.1rem 1.1rem;border:1px solid rgba(255,255,255,.1);box-shadow:0 18px 40px #00000059}@media(prefers-color-scheme:light){.question-card{background:#ffffffe6;border-color:#0000000f;box-shadow:0 10px 24px #0f172a1f}}.question-form{display:flex;flex-direction:column;gap:.9rem}.question-form-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,2fr);gap:.75rem}@media(max-width:640px){.question-form-grid{grid-template-columns:minmax(0,1fr)}}.question-form .form-field{display:flex;flex-direction:column;gap:.3rem;padding:.55rem .7rem;border-radius:12px;border:1px solid rgba(255,255,255,.06);background:#3b82f60f}.question-form .form-field+.form-field{margin-top:.3rem}.question-form textarea,.question-form input[type=number],.question-form select{width:100%;max-width:100%;padding:.55rem .7rem;border-radius:10px;border:1px solid rgba(255,255,255,.16);background:#0000004d;color:inherit;box-sizing:border-box;font-size:1rem}.rich-text-input{width:100%;max-width:95%;min-height:120px;padding:.55rem .7rem;border-radius:10px;border:1px solid rgba(255,255,255,.16);background:#fff;color:inherit;line-height:1.5;overflow:auto;direction:rtl;text-align:right}.rich-text-toolbar{display:flex;gap:.25rem;margin-bottom:.35rem}@media(prefers-color-scheme:light){.question-form textarea,.question-form input[type=number],.question-form select,.rich-text-input{background:#ffffffe6;border-color:#00000014}}.question-meta-grid{display:flex;flex-wrap:wrap;gap:.5rem}.question-meta-grid>div{flex:1 1 20px}.questions-empty{padding:.6rem .4rem;font-size:.9rem;opacity:.8}.table-wrapper{margin-top:.5rem;border-radius:10px;border:1px solid rgba(255,255,255,.12);overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.questions-table{width:100%;min-width:600px;border-collapse:collapse;font-size:.9rem}@media(max-width:768px){.questions-table{min-width:900px}}.questions-table thead{background:#0f172abf}.questions-table th,.questions-table td{padding:.55rem .7rem;text-align:right}.questions-table tbody tr:nth-child(odd){background:#ffffff05}.questions-table tbody tr:nth-child(2n){background:#0f172a66}.questions-table .actions-col{text-align:left;white-space:nowrap}.current-images-list{margin-top:.35rem;display:flex;flex-wrap:wrap;gap:.35rem}.current-image-thumb{width:72px;height:72px;object-fit:cover;border-radius:6px;border:1px solid rgba(0,0,0,.15);background:#fff}.current-image-item{display:flex;flex-direction:column;align-items:center;gap:.2rem}.current-image-remove{padding-inline:.4rem}@media(prefers-color-scheme:light){.table-wrapper{border-color:#00000014}.questions-table thead{background:#0f172ae6;color:#f9fafb}.questions-table tbody tr:nth-child(odd){background:#f9fafb}.questions-table tbody tr:nth-child(2n){background:#eef2ff}}.subjects-page{max-width:960px;margin:0 auto;text-align:left;display:flex;flex-direction:column;gap:1.25rem}.subjects-header{display:flex;justify-content:space-between;align-items:center;gap:1rem}.subjects-title{font-size:1.35rem;font-weight:600}.subjects-subtitle{font-size:.95rem;opacity:.8}.subjects-stats{display:flex;gap:.5rem}.subjects-error{margin-top:0}.subjects-layout{display:flex;flex-direction:column;gap:1rem;align-items:stretch}.subject-card{background:#ffffff0a;border-radius:14px;padding:1rem 1.1rem 1.1rem;border:1px solid rgba(255,255,255,.1);box-shadow:0 18px 40px #00000059}@media(prefers-color-scheme:light){.subject-card{background:#ffffffe6;border-color:#0000000f;box-shadow:0 10px 24px #0f172a1f}}.subject-form{display:flex;flex-direction:column;gap:.75rem}.subject-form-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,2fr);gap:.75rem}@media(max-width:640px){.subject-form-grid{grid-template-columns:minmax(0,1fr)}}.field-label{font-size:.85rem;opacity:.8}.subject-form input[type=text],.subject-form select{width:100%;padding:.55rem .7rem;border-radius:10px;border:1px solid rgba(255,255,255,.16);background:#0000004d;color:inherit}@media(prefers-color-scheme:light){.subject-form input[type=text],.subject-form select{background:#ffffffe6;border-color:#00000014}}.subjects-empty{padding:.6rem .4rem;font-size:.9rem;opacity:.8}.subjects-table{width:100%;border-collapse:collapse;font-size:.9rem}.subjects-table thead{background:#0f172abf}.subjects-table th,.subjects-table td{padding:.55rem .7rem;text-align:left}.subjects-table tbody tr:nth-child(odd){background:#ffffff05}.subjects-table tbody tr:nth-child(2n){background:#0f172a66}.subjects-table .actions-col{text-align:right;white-space:nowrap}@media(prefers-color-scheme:light){.table-wrapper{border-color:#00000014}.subjects-table thead{background:#0f172ae6;color:#f9fafb}.subjects-table tbody tr:nth-child(odd){background:#f9fafb}.subjects-table tbody tr:nth-child(2n){background:#eef2ff}}.students-page{max-width:960px;margin:0 auto;text-align:left;display:flex;flex-direction:column;gap:1.25rem;font-size:1.05rem}[dir=rtl] .students-page{text-align:right}.students-header{display:flex;justify-content:space-between;align-items:center;gap:1rem}.students-title{font-size:1.35rem;font-weight:600}.students-subtitle{font-size:.95rem;opacity:.8}.students-stats{display:flex;gap:.5rem}.students-error{margin-top:0}.students-layout{display:flex;flex-direction:column;gap:1rem}.student-card{background:#ffffff0a;border-radius:14px;padding:1rem 1.1rem 1.1rem;border:1px solid rgba(255,255,255,.1);box-shadow:0 18px 40px #00000059}@media(prefers-color-scheme:light){.student-card{background:#ffffffe6;border-color:#0000000f;box-shadow:0 10px 24px #0f172a1f}}.section-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.5rem}.section-title{font-size:1rem;font-weight:600}[dir=rtl] .section-title{display:block;text-align:right}.student-form{display:flex;flex-direction:column;gap:.75rem}[dir=rtl] .student-form{text-align:right}.student-form-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:.75rem}@media(max-width:640px){.student-form-grid{grid-template-columns:minmax(0,1fr)}}.form-field{display:flex;flex-direction:column;gap:.25rem}.field-label{font-size:1rem;opacity:.9}.student-form input[type=text],.student-form input[type=password]{width:100%;padding:.55rem .7rem;border-radius:10px;border:1px solid rgba(255,255,255,.16);background:#0000004d;color:inherit}.student-form select{width:100%;padding:.55rem .7rem;border-radius:10px;border:1px solid rgba(255,255,255,.16);background:#0000004d;color:inherit;font-size:1rem}.answer-input textarea{font-size:1.1rem}@media(prefers-color-scheme:light){.student-form select{background:#ffffffe6;border-color:#00000014}}@media(prefers-color-scheme:light){.student-form input[type=text],.student-form input[type=password]{background:#ffffffe6;border-color:#00000014}}.form-actions{margin-top:.5rem;display:flex;gap:.5rem}.btn{border-radius:999px;padding:.45rem .9rem;border:1px solid transparent;font-size:.9rem}.btn.primary{background:linear-gradient(180deg,#646cff,#545bff);border-color:#545bffb3;color:#fff}.btn.ghost{background:transparent;border-color:#fff3}.btn.danger{background:#f8717129;border-color:#f8717180}.btn.small{padding:.3rem .7rem;font-size:.8rem}@media(prefers-color-scheme:light){.btn.ghost{border-color:#00000024}.btn.danger{background:#f8717114;border-color:#f8717199}}.students-empty{padding:.6rem .4rem;font-size:.9rem;opacity:.8}[dir=rtl] .students-empty{text-align:right}.table-wrapper{margin-top:.5rem;border-radius:10px;border:1px solid rgba(255,255,255,.12);overflow:hidden}.students-table{width:100%;border-collapse:collapse;font-size:.9rem}.students-table thead{background:#0f172abf}.students-table th,.students-table td{padding:.55rem .7rem;text-align:left}[dir=rtl] .students-table th,[dir=rtl] .students-table td{text-align:right}.students-table tbody tr:nth-child(odd){background:#ffffff05}.students-table tbody tr:nth-child(2n){background:#0f172a66}.students-table .actions-col{text-align:right;white-space:nowrap}.student-question-flow{margin-top:.75rem;display:flex;flex-direction:column;gap:.9rem}[dir=rtl] .student-question-flow{text-align:right}.current-question h3{font-size:1rem;font-weight:600;margin-bottom:.25rem}.current-question p{margin:0;line-height:1.6}.answer-input{display:flex;flex-direction:column;gap:.4rem}.answer-input label{font-size:.9rem;opacity:.85}.answer-input textarea{width:100%;max-width:100%;min-height:120px;padding:.6rem .75rem;border-radius:10px;border:1px solid rgba(255,255,255,.16);background:#0000004d;color:inherit;resize:vertical;line-height:1.5;box-sizing:border-box}@media(prefers-color-scheme:light){.answer-input textarea{background:#fffffff2;border-color:#00000014}}[dir=rtl] .answer-input textarea{direction:rtl;text-align:right}.answer-input button{align-self:flex-start;border-radius:999px;padding:.4rem 1rem}.student-images-row{margin-top:.5rem;display:flex;flex-wrap:wrap;gap:.4rem}.student-image-thumb{width:120px;height:120px;object-fit:cover;border-radius:6px;border:1px solid rgba(0,0,0,.15);cursor:pointer;background:#fff}.student-lightbox{position:fixed;inset:0;background:#000000b3;display:flex;align-items:center;justify-content:center;z-index:50}.student-lightbox-image{max-width:90vw;max-height:90vh;border-radius:8px;box-shadow:0 20px 50px #00000080}[dir=rtl] .answer-input button{align-self:flex-end}.answer-feedback{margin-top:.4rem;padding:.7rem .8rem;border-radius:10px;background:#22c55e14;border:1px solid rgba(34,197,94,.35);font-size:.9rem}@media(prefers-color-scheme:light){.answer-feedback{background:#16a34a0f;border-color:#16a34a59}}.answer-feedback h4{margin:0 0 .35rem;font-size:.95rem;font-weight:600}.answer-feedback ul{margin:.4rem 1.1rem 0;padding:0}.answer-feedback li{margin-bottom:.2rem}.model-answer{margin-top:.5rem;padding-top:.5rem;border-top:1px dashed rgba(255,255,255,.2)}.model-answer h5{margin:0 0 .25rem;font-size:.9rem;font-weight:600}@media(prefers-color-scheme:light){.table-wrapper{border-color:#00000014}.students-table thead{background:#0f172ae6;color:#f9fafb}.students-table tbody tr:nth-child(odd){background:#f9fafb}.students-table tbody tr:nth-child(2n){background:#eef2ff}}
