/* V0.4 desktop tokens. Supplied portrait, local assets; no third-party calls. */
:root{--bg:#f5f7fc;--ink:#1d2b50;--muted:#637292;--line:#e3e8f4;--purple:#5866e9;--purple-soft:#eef0ff;--surface:#fff;--radius:16px;font-family:Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;color-scheme:light}
body{background:var(--bg);font-size:15px;line-height:1.65;color:var(--ink);min-width:820px}button,input,textarea,select{font:inherit}button,a,input,textarea,select{outline-offset:3px}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #5866e9}p,.small-text{color:#637292}h1,h2,h3{color:#1d2b50}h1{font-size:28px;letter-spacing:-.025em}h2{font-size:19px}h3{font-size:16px}.small-text{font-size:13px}.eyebrow{color:#6673ac;font-size:12px;letter-spacing:.12em}.pill{font-size:12px}.btn{border-radius:10px;min-height:40px;font-size:14px}.btn.small{font-size:13px;min-height:34px}.btn.primary{background:#5866e9;border-color:#5866e9;box-shadow:0 4px 14px #5866e922}.btn.primary:hover{background:#4654d1}.card{border:1px solid var(--line);border-radius:16px;box-shadow:0 6px 22px #25386704;padding:24px}.notice{font-size:14px}.hero{position:relative;background:#edf1fd;border:1px solid #dee5f7;overflow:hidden;padding:32px;min-height:280px}.hero:after{content:"";position:absolute;inset:0 0 0 62%;background:url('/static/assets/mentor.png') center 18%/cover no-repeat;opacity:.19;pointer-events:none}.hero h1,.hero p,.hero form,.hero .row{position:relative;z-index:1}.hero h1{font-size:32px}.hero .lead{max-width:700px}.stats{gap:16px}.stat{background:#fff;border:1px solid var(--line);border-radius:14px;padding:20px}.stat strong{color:#293b71}.desktop-shell{display:grid;grid-template-columns:76px minmax(0,1fr);min-height:100vh}.desktop-rail{background:#f1f4fc;border-right:1px solid #dfe6f6;padding:14px 5px;width:76px;height:100vh;position:sticky;top:0;display:flex;flex-direction:column;color:#64739a}.rail-brand{display:grid;place-items:center;width:43px;height:43px;margin:0 auto 18px;border-radius:13px;color:white;background:#5866e9;font-size:24px;font-weight:700}.desktop-rail .nav{display:flex;flex-direction:column;gap:5px;flex:1;overflow-y:auto}.desktop-rail .nav button{display:flex;flex-direction:column;justify-content:center;gap:3px;min-height:62px;padding:7px 2px;border-radius:12px;font-size:12px;color:#617099;background:transparent;border:0;white-space:nowrap}.desktop-rail .nav button svg{width:21px;height:21px}.desktop-rail .nav button.active{background:#fff;color:#5262e5;box-shadow:0 3px 12px #5665d110}.desktop-rail .nav button:hover{background:#e8edfc}.rail-user{margin:10px auto 0;background:#dce4f9;border-radius:50%;width:32px;height:32px;text-align:center;line-height:32px;color:#51629a}.surface{min-width:0}.topbar{height:64px;padding:0 26px;background:#f8faff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:3}.product-wordmark{font-size:22px;font-weight:750;letter-spacing:-.025em;white-space:nowrap}.product-wordmark span{font-weight:450}.product-wordmark small{margin-left:18px;font-size:12px;font-weight:400;letter-spacing:.04em;color:#6a7797}.topbar-actions{gap:12px;font-size:13px}#main{max-width:1560px;margin:auto;padding:30px 36px 60px}.chat-mode #main{max-width:none;padding:0;height:calc(100vh - 64px);overflow:hidden}.chat-mode{overflow:hidden}.chat-mode #jobbar:empty{display:none}.chat-mode .job-bar{position:fixed;top:66px;right:12px;z-index:10;max-width:400px}.chat-workspace{height:100%;display:grid;grid-template-columns:260px minmax(0,1fr) 286px;gap:0;min-height:0}.conversation-panel{background:#f8faff;border-right:1px solid var(--line);padding:18px 12px;display:flex;flex-direction:column;min-height:0;gap:13px}.new-thread{width:100%;min-height:43px}.conversation-panel .text{font-size:13px;min-height:38px;background:#eff3fb;border:1px solid #e5eafa;border-radius:9px;padding:9px 10px}.thread-list-label{display:flex;justify-content:space-between;align-items:center;padding:1px 5px;font-size:13px;color:#69789a}.thread-list-label button,.chat-head-actions button,.message-meta button{background:none;border:0;color:#66789e;cursor:pointer}.thread-list-label button:hover,.message-meta button:hover{color:#4457d7}.thread-list{flex:1;overflow-y:auto;min-height:0}.thread-item{display:flex;align-items:flex-start;gap:9px;max-width:100%;width:100%;text-align:left;border:0;border-radius:11px;background:transparent;padding:13px 10px;margin-bottom:4px;cursor:pointer;color:var(--ink)}.thread-item:hover{background:#edf1fb}.thread-item.selected{background:#e9edff}.thread-avatar{width:30px;height:34px;border-radius:8px;overflow:hidden;flex:none}.thread-avatar img{width:100%;height:100%;object-fit:cover;object-position:center 16%}.thread-copy{display:flex;flex-direction:column;overflow:hidden;min-width:0;flex:1}.thread-copy strong{font-size:14px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.thread-copy small{font-size:13px;color:#73819f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:3px}.thread-copy time{font-size:12px;color:#8590aa;margin-top:5px}.conversation-foot{font-size:17px;color:#6a78a5;border-top:1px solid var(--line);padding:16px 8px 4px}.conversation-foot small{font-size:13px}.conversation-main{position:relative;display:flex;flex-direction:column;background:#fdfdff;min-width:0;min-height:0;border-right:1px solid var(--line)}.conversation-head{min-height:80px;display:flex;align-items:center;gap:12px;padding:14px 22px;border-bottom:1px solid #e9edf7;flex:none;background:#fff}.conversation-head>img{width:44px;height:46px;border-radius:50%;object-fit:cover;object-position:center 16%}.conversation-head h1{font-size:18px;margin:0;max-width:330px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-head p{font-size:12px;margin:2px 0 0;line-height:1.5}.chat-head-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px;margin-left:auto;max-width:200px}.chat-head-actions button{font-size:12px;min-height:30px;padding:3px 5px;border-radius:6px}.chat-head-actions button:hover{background:#eef1fc}.chat-scroll{flex:1;overflow:auto;min-height:0;overscroll-behavior:contain;padding:22px 22px 10px;scrollbar-gutter:stable}.chat-message{display:flex;gap:10px;align-items:flex-start;margin:0 0 25px;animation:message-in .18s ease-out}.message-face{width:34px;height:36px;border-radius:10px;overflow:hidden;flex:none;background:#dde6fa;color:#5368a8;display:grid;place-items:center;font-size:15px}.message-face img{width:100%;height:100%;object-fit:cover;object-position:center 16%}.message-main{min-width:0;max-width:min(760px,calc(100% - 50px))}.message-bubble{padding:15px 18px;border:1px solid #e4e9f5;background:#fff;border-radius:3px 14px 14px 14px;box-shadow:0 3px 10px #25396d04;font-size:15px;line-height:1.75;overflow-wrap:anywhere;min-width:80px}.outgoing{flex-direction:row-reverse}.outgoing .message-bubble{background:#ebefff;border-color:#e0e6ff;border-radius:14px 3px 14px 14px}.message-meta{font-size:12px;color:#7a87a1;display:flex;gap:9px;align-items:center;margin-top:5px;flex-wrap:wrap}.outgoing .message-meta{justify-content:flex-end}.message-meta button{font-size:12px;padding:0;min-height:24px}.message-sources{font-size:12px;border-top:1px solid var(--line);padding-top:7px;margin-top:12px}.message-sources summary,details summary{cursor:pointer;color:#5666a5}.chat-code{background:#f3f5fb;border:1px solid #e0e6f2;border-radius:9px;overflow:auto;padding:13px;font:13px/1.7 ui-monospace,SFMono-Regular,Consolas,monospace;max-width:100%;white-space:pre;tab-size:4}.message-bubble .katex-display{overflow-x:auto;overflow-y:hidden;max-width:100%}.file-card{display:block;border:1px solid #d6dff4;border-radius:9px;padding:12px;margin-top:10px;color:#435bd0;background:#f6f8ff;font-size:13px}.chat-composer{margin:0 18px 15px;padding:12px 15px 6px;border:1px solid #dce3f6;border-radius:14px;background:#fff;box-shadow:0 5px 18px #576dc409;flex:none}.chat-composer textarea{border:none;outline:none!important;resize:none;width:100%;height:76px;max-height:160px;background:transparent;font-size:15px;color:#25385e;padding:5px 0;line-height:1.65}.chat-composer:focus-within{border-color:#a8b4f0;box-shadow:0 0 0 2px #697aec12}.chat-composer textarea::placeholder{color:#8591ad}.composer-toolbar{display:flex;align-items:center;gap:8px}.composer-toolbar small{font-size:12px;color:#8290ab;margin-left:auto}.composer-toolbar .primary{min-width:80px}.chat-save{font-size:12px;min-height:22px;margin-top:4px;color:#6d7d99;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.chat-generation{font-size:13px;padding:5px 24px;color:#5a6ba4;display:flex;justify-content:space-between}.chat-generation button{background:none;color:#6272a2;border:0}.chat-partial{white-space:pre-wrap;font-size:15px;line-height:1.75;padding:14px 18px;border-left:3px solid #6574e9;background:#f4f6fd;margin:0 0 20px 44px}.chat-jump{position:absolute;bottom:194px;left:50%;transform:translateX(-50%);z-index:2;background:#eef2ff;color:#4358ce;box-shadow:0 3px 12px #637ad222}.chat-context{padding:20px 17px;overflow-y:auto;min-height:0;background:#f8faff}.mentor-identity{display:flex;gap:13px;align-items:center;padding-bottom:18px;border-bottom:1px solid var(--line)}.mentor-identity>img{height:96px;width:78px;object-fit:cover;object-position:center 16%;border-radius:12px}.mentor-identity h2{font-size:20px;margin:0}.mentor-identity p{font-size:12px;margin-top:7px}.context-section{padding:20px 0;border-bottom:1px solid var(--line)}.context-section h3{margin:0 0 12px;font-size:15px}.context-section p{font-size:13px}.context-action{display:block;width:100%;background:#edf2ff;border:1px solid #e2e8f9;border-radius:9px;padding:10px 12px;margin:8px 0;text-align:left;font-size:13px;color:#4d629e}.context-action:hover{background:#e4eaff}.memory-preview{background:#f0f4fc;border-radius:9px;padding:12px;font-size:13px;line-height:1.7;margin:8px 0;color:#5a6a91}.memory-preview small{display:block;font-size:12px;color:#8591aa;margin-top:7px}.teaching-card{border:1px solid #dce4f6;padding:14px;border-radius:12px;background:#fff;margin:18px 0;font-size:13px;overflow:hidden}.teaching-card h3{font-size:16px}.teaching-card .katex-display{overflow:auto;font-size:14px}.teaching-card .btn{margin-top:15px}.context-hidden{grid-template-columns:260px minmax(0,1fr)}.context-hidden .chat-context{display:none}.chat-welcome{text-align:center;margin:60px auto 30px;max-width:540px}.chat-welcome>img{width:74px;height:86px;object-fit:cover;object-position:center 17%;border-radius:20px}.chat-welcome h1{font-size:27px;margin:20px 0 12px}.chat-welcome p{font-size:15px;line-height:1.9}.chat-welcome button{margin:16px 6px}.chat-empty{color:#7c88a3;text-align:center;padding:55px 20px}.chat-empty h2{font-size:21px}.older-messages{display:block;margin:0 auto 24px}.attachment-chip{display:inline-flex;align-items:center;gap:10px;padding:5px 9px;border-radius:7px;background:#edf2ff;font-size:12px;margin-right:8px}.attachment-chip button{border:0;background:none}.teacher-portrait{width:48px;height:52px;object-fit:cover;object-position:center 17%;border-radius:12px}.lesson-layout{grid-template-columns:minmax(0,1fr) 320px;align-items:start;gap:20px}.board{border:1px solid var(--line);border-radius:16px;box-shadow:none}.board-body{padding:30px}.board-body .prose{font-size:16px;line-height:1.85}.tutor-panel{background:#fff;border:1px solid var(--line);border-radius:16px}.teacher-header{background:#f8faff}.bubble{font-size:14px;line-height:1.75}.board-footer{padding:18px 24px}.note-editor{font-size:16px;line-height:1.85}.desktop-shell .mobile-menu{display:none!important}[hidden]{display:none!important}@keyframes message-in{from{opacity:.3;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:1280px){.chat-workspace{grid-template-columns:245px minmax(0,1fr) 260px}.context-hidden{grid-template-columns:245px minmax(0,1fr)}.conversation-head{padding:12px 16px}.chat-scroll{padding:20px 16px}.product-wordmark small{display:none}#main{padding:25px}.lesson-layout{grid-template-columns:minmax(0,1fr) 290px;gap:16px}.board-body{padding:24px}}
/* Narrow desktop windows / browser zoom, not a phone-specific UI. */
@media(max-width:1050px){.chat-workspace{grid-template-columns:225px minmax(0,1fr)}.chat-context{display:none}.conversation-head{flex-wrap:wrap;gap:8px}.chat-head-actions{max-width:none}.conversation-head p{font-size:12px}.desktop-shell{grid-template-columns:68px minmax(0,1fr)}.desktop-rail{width:68px}.lesson-layout{grid-template-columns:minmax(0,1fr) 270px}.topbar{padding:0 18px}.card{padding:20px}.chat-composer{margin:0 12px 10px}.composer-toolbar small{font-size:11px}.message-bubble{padding:12px 14px}.chat-welcome{margin-top:35px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}.reduce-motion *{animation:none!important;transition:none!important}
.ai-label{display:block;color:#74819f;font-size:12px;margin-bottom:7px}.inline-teaching-card{background:#f6f8ff;border:1px solid #dae3fa;border-radius:12px;padding:17px;margin-bottom:12px}.inline-teaching-card h3{font-size:18px;margin:10px 0}.inline-teaching-card .btn{margin-top:14px}

/* A narrow desktop may reveal the context as a bounded overlay, never hide the toggle target. */
@media(max-width:1050px){.chat-workspace{position:relative}.chat-workspace:not(.context-hidden) .chat-context{display:block;position:absolute;right:0;top:0;bottom:0;width:280px;z-index:5;box-shadow:-12px 0 24px #25386718}.chat-head-actions{position:relative;z-index:6}.context-hidden .chat-context{display:none}}
@media(max-width:1050px){.chat-workspace:not(.context-hidden) .chat-context{top:90px;border-top:1px solid var(--line);border-radius:12px 0 0 0}}
