/* V0.4.1: desktop reading workspace, reusing the supplied mentor and brand. */
:root { --ink:#202c46; --muted:#586783; --line:#e1e6f0; --radius:12px; }
body { font-family:Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif; line-height:1.7; }
button { cursor:pointer; } p,.small-text { color:var(--muted); }
h1 { font-size:28px; font-weight:650; } h2 { font-weight:650; }
.desktop-rail { background:#eef2fa; padding-top:20px; }
.desktop-rail .nav { gap:12px; flex:none; margin-top:18px; }
.desktop-rail .nav button { font-size:14px; min-height:68px; }
.desktop-rail .nav button.active { box-shadow:0 3px 12px #30458e0b; }
.topbar { height:56px; background:#fafbfe; padding:0 28px; }
.product-wordmark { font-size:20px; }
.topbar .small-text { color:#5c6a86; }
.account-menu { margin-top:auto; position:relative; }
.account-menu>summary { list-style:none; cursor:pointer; padding:14px 10px; }
.account-menu>summary::-webkit-details-marker,.conversation-menu>summary::-webkit-details-marker { display:none; }
.rail-user { display:grid; place-items:center; margin:0 auto; width:38px; height:38px; font-size:15px; }
.account-menu>div { position:absolute; left:64px; bottom:12px; width:235px; padding:14px; background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:0 12px 36px #21325a20; z-index:20; }
.account-menu strong { display:block; padding:4px 8px 12px; border-bottom:1px solid var(--line); margin-bottom:6px; }
.account-menu button { display:block; width:100%; text-align:left; background:none; border:0; padding:10px; color:var(--ink); border-radius:6px; font-size:14px; }
.account-menu button:hover { background:#eef1fc; }
#main { padding:32px 40px 64px; max-width:1480px; }
.workspace-heading { margin-bottom:20px; } .workspace-heading h1 { margin:0; } .workspace-heading p { margin:6px 0 0; }
.workspace-tabs { margin-bottom:28px; gap:24px; border-bottom:1px solid var(--line); }
.workspace-tabs button { padding:12px 4px; font-size:15px; border-radius:0; }
.workspace-tabs button.active { border-bottom:2px solid var(--purple); background:transparent; }
.learning-list { background:#fff; border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.learning-row { display:grid; grid-template-columns:90px 1fr auto; gap:22px; padding:26px; align-items:center; border-bottom:1px solid var(--line); }
.learning-row:last-child { border-bottom:0; }
.learning-subject { font-size:13px; color:#5266b4; padding:8px 10px; background:#eff2ff; text-align:center; border-radius:8px; }
.learning-detail h3 { margin:0 0 5px; font-size:18px; } .learning-detail p { margin:4px 0; font-size:14px; }
.learning-actions { display:flex; align-items:center; gap:8px; }
.history-lessons { margin-top:30px; padding:18px 0; } .history-lessons>summary { font-size:16px; font-weight:600; }
.schedule-strip { margin-top:28px; border-left:3px solid #a5aff5; padding-left:22px; }
.learning-content>.eyebrow,.learning-content>h1 { display:none; }
.card { box-shadow:none; border-radius:12px; padding:24px; }
.knowledge-heading { margin-bottom:22px; } .knowledge-heading h1 { margin:0; }
.file-drop { border:none; background:#f6f8fd; border-radius:10px; padding:20px; text-align:left; }
.file-drop h3 { margin-top:0; } .note-editor { line-height:1.9; min-height:360px; }
.split { grid-template-columns:260px minmax(0,1fr); }
.card.soft { background:#f6f8fd; }
.chat-mode #main { height:calc(100dvh - 56px); }
.chat-workspace { position:relative; grid-template-columns:240px minmax(0,1fr) var(--context-width,300px); }
.chat-workspace.context-hidden { grid-template-columns:240px minmax(0,1fr); }
.conversation-panel { background:#f7f9fd; padding:18px 12px; }
.new-thread { background:white; border:1px solid #dbe2f1; color:#4358b9; box-shadow:none; }
.conversation-main { background:#fcfcfe; }
.conversation-head { min-height:78px; padding:14px 24px; gap:12px; }
.mentor-profile { flex:none; width:44px; height:46px; padding:0; background:none; border:0; border-radius:50%; overflow:hidden; }
.mentor-profile img { width:100%; height:100%; object-fit:cover; object-position:center 16%; }
.conversation-heading-text { min-width:0; flex:1; }
.conversation-head h1 { max-width:none; font-size:17px; }
.conversation-head p { font-size:13px; color:#65718a; }
.chat-head-actions { max-width:none; flex:none; gap:8px; align-items:center; }
.chat-head-actions button,.conversation-menu>summary { font-size:13px; color:#53617e; padding:6px; }
.conversation-menu { position:relative; }
.conversation-menu>summary { list-style:none; cursor:pointer; border-radius:6px; }
.conversation-menu>div { position:absolute; right:0; top:35px; width:145px; padding:8px; background:white; border:1px solid var(--line); border-radius:9px; box-shadow:0 8px 24px #2637581a; z-index:12; }
.conversation-menu button { width:100%; text-align:left; }
.chat-head-actions>[data-chat=history] { display:none; }
.chat-scroll { padding:26px clamp(20px,4vw,64px) 16px; }
.message-bubble { font-size:15px; line-height:1.55; box-shadow:none; padding:12px 16px; }
.message-bubble .para { display:block; height:.35em; }
.message-main { max-width:min(780px,calc(100% - 48px)); }
.message-meta { color:#66748d; }
.ai-label { color:#626f8c; }
.chat-code { font-size:14px; line-height:1.8; }
.chat-composer { margin:4px clamp(20px,4vw,64px) 18px; border-radius:12px; box-shadow:0 3px 14px #3b4e8308; padding:12px 16px 7px; }
.chat-composer textarea { height:72px; font-size:16px; }
.chat-composer textarea::placeholder { color:#697892; }
.composer-toolbar small { color:#69758d; }
.chat-save { color:#586986; }
.chat-welcome { margin-top:clamp(32px,9vh,110px); }
.chat-welcome>img { width:64px; height:72px; border-radius:16px; }
.chat-welcome h1 { font-size:28px; } .chat-welcome p { font-size:15px; }
.welcome-prompts { display:flex; flex-wrap:wrap; justify-content:center; gap:10px; margin-top:22px; }
.welcome-prompts button { margin:0; border:1px solid #dce3f0; background:white; color:#485a80; border-radius:9px; padding:10px 14px; font-size:14px; }
.teacher-current-task { margin:0 20px; padding:10px 12px; background:#eff2fd; border-radius:0 0 10px 10px; display:flex; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; gap:10px; font-size:13px; }
.teacher-current-task>div { flex:1 1 160px; min-width:0; } .teacher-current-task strong { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.teacher-current-task span { color:#596d98; } .teacher-current-task p { margin:4px 0 0; } .teacher-current-task button { flex:none; margin-left:auto; }
.teacher-next-action { margin:6px clamp(20px,4vw,64px); padding:13px 16px; background:#f0f3ff; border:1px solid #dce3ff; border-radius:10px; display:flex; align-items:center; gap:14px; }
.teacher-next-action>div { flex:1; min-width:0; } .teacher-next-action strong { font-size:14px; }
.teacher-next-action p { margin:3px 0 0; font-size:13px; } .teacher-next-action button { flex:none; }
.chat-context { background:#f8faff; padding:18px; }
.context-toolbar { display:flex; justify-content:space-between; align-items:center; } .context-toolbar h2 { font-size:17px; }
.context-resize { display:flex; align-items:center; gap:10px; font-size:12px; color:#64718d; } .context-resize input { width:110px; }
.context-section { padding:18px 0; } .context-section:first-child { padding-top:12px; }
.context-action { background:white; margin:8px 0; font-size:14px; color:#425b91; }
.chat-workspace.lesson-open { grid-template-columns:216px minmax(290px,1fr) minmax(440px,calc(var(--lesson-share,56%) - 100px)); }
.teacher-classroom { min-width:0; overflow:auto; overscroll-behavior:contain; background:#f5f7fc; border-left:1px solid var(--line); padding:22px; }
.classroom-heading { display:flex; justify-content:space-between; align-items:start; gap:12px; }
.classroom-heading h2 { margin:4px 0; font-size:21px; line-height:1.5; }
.classroom-context-state { font-size:13px; margin:2px 0 12px; }
.classroom-tools { display:flex; flex-wrap:wrap; align-items:center; gap:5px; margin:0 0 16px; }
.lesson-open .conversation-head { padding:12px 16px; flex-wrap:nowrap; min-height:64px; }
.lesson-open .conversation-heading-text { min-width:0; flex:1; }
.lesson-open .conversation-head h1 { max-width:none; }
.lesson-open .chat-head-actions { margin-left:auto; width:auto; flex:none; max-width:none; flex-wrap:nowrap; }
.lesson-open .chat-scroll { padding:20px 16px 12px; }
.lesson-open .chat-composer { margin:4px 14px 14px; }
.lesson-open .message-face { width:28px; height:30px; }
.lesson-open .message-main { max-width:calc(100% - 36px); }
.lesson-open .message-bubble { font-size:15px; padding:12px 14px; }
.lesson-open .teacher-current-task { display:none; }
.lesson-open .teacher-next-action { margin:6px 14px; }
.lesson-open .composer-toolbar small { display:none; } .lesson-open .composer-toolbar .primary { margin-left:auto; }
.lesson-open .teacher-classroom { display:flex; flex-direction:column; overflow:hidden; padding:16px 18px 12px; }
.lesson-open .classroom-heading,.lesson-open .classroom-tools,.lesson-open .teacher-classroom>.notice { flex:none; }
.lesson-open .lesson-layout { display:flex; flex-direction:column; gap:10px; flex:1; min-height:0; overflow:hidden; }
.lesson-open .lesson-layout>.board,.lesson-open .lesson-layout>.stack { width:100%; min-width:0; }
.lesson-open .lesson-layout>.board { flex:1; min-height:0; display:flex; flex-direction:column; overflow:hidden; }
.lesson-open .lesson-layout>.stack { flex:none; max-height:168px; overflow:auto; }
.lesson-open .board-header { flex:none; }
.lesson-open .board-body { flex:1; min-height:0; overflow:auto; padding:20px 24px; } .lesson-open .board-body h2 { font-size:22px; margin-top:0; }
.lesson-open .board-body .prose { font-size:16px; line-height:1.6; }
.lesson-open .question { padding:18px; margin-top:24px; }
.lesson-open .board-footer { position:static; bottom:auto; flex:none; background:#fff; padding:12px 16px; z-index:1; border-top:1px solid var(--line); }
.lesson-open .board>.draft-status { flex:none; margin:0; padding:0 16px 10px; }
.lesson-open .board-footer .btn { flex:none; }
.lesson-open .chat-context { position:absolute; right:0; top:0; bottom:0; width:var(--context-width,300px); z-index:10; box-shadow:-8px 0 32px #25385920; border-left:1px solid var(--line); }
.lesson-open .context-hidden .chat-context { display:none; }
.teacher-classroom .widget svg { max-width:100%; } .teacher-classroom textarea.code { min-height:160px; line-height:1.7; }
.teacher-classroom .notice { overflow-wrap:anywhere; }
.lesson-open #lab-result:empty { display:none; }
.board .formula { overflow:auto; }
.settings-sections { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); gap:24px; }
.btn { transition:background-color .12s ease,border-color .12s ease; }
.btn:active { transform:translateY(1px); }
@media(min-width:1700px){ .chat-workspace:not(.lesson-open) .chat-scroll,.chat-workspace:not(.lesson-open) .chat-composer { padding-left:26px; padding-right:26px; } .teacher-classroom { padding:28px 34px; } }
@media(max-width:1440px){ .lesson-open .conversation-panel { padding:16px 10px; } .lesson-open .thread-avatar { display:none; } .teacher-classroom { padding:18px; } .lesson-open .board-body { padding:22px; } }
@media(max-width:1200px){
 .chat-workspace.lesson-open { grid-template-columns:minmax(260px,1fr) minmax(400px,var(--lesson-share,56%)); }
 .lesson-open .conversation-panel { display:none; } .lesson-open .chat-head-actions>[data-chat=history] { display:block; }
 .lesson-open.history-shown .conversation-panel { display:flex; position:absolute; top:0; bottom:0; left:0; width:245px; z-index:11; box-shadow:8px 0 28px #24396620; }
 .lesson-open.history-shown .chat-head-actions>[data-chat=history] { position:relative; z-index:12; }
 .learning-row { grid-template-columns:70px 1fr auto; gap:14px; padding:22px; } .learning-actions { flex-direction:column; }
}
@media(max-width:1050px){
 #main { padding:26px 24px 50px; } .chat-mode #main { padding:0; }
 .chat-workspace,.chat-workspace.context-hidden { grid-template-columns:210px minmax(0,1fr); }
 .chat-workspace:not(.context-hidden) .chat-context { position:absolute; display:block; top:0; right:0; bottom:0; width:var(--context-width,300px); border-radius:0; z-index:10; }
 .chat-workspace.lesson-open { grid-template-columns:minmax(260px,1fr) minmax(390px,var(--lesson-share,56%)); }
 .teacher-classroom { padding:14px; } .lesson-open .board-body { padding:18px; }
 .chat-head-actions { flex-wrap:wrap; gap:3px; } .conversation-head { padding:12px 16px; }
 .classroom-heading h2 { font-size:19px; } .chat-scroll { padding:20px; } .chat-composer { margin:4px 18px 14px; }
 .settings-sections { grid-template-columns:1fr; }
}
@media(prefers-reduced-motion:reduce){ .btn,.chat-message { animation:none!important; transition:none!important; } }
/* V0.4.2: review the complete syllabus before starting a personal course. */
.syllabus-preview { padding-left:26px; margin:20px 0; }
.syllabus-preview li { padding:14px 10px; border-bottom:1px solid var(--line); }
.syllabus-preview li::marker { color:#536aa4; }
.syllabus-preview p { margin:6px 0; font-size:14px; }
.syllabus-preview .row span { flex:none; color:var(--muted); font-size:13px; }
.memory-state { background:#f5f7ff; margin-top:20px; }
.memory-state h2 { margin-top:0; }
.page-intro h1 { margin:0 0 8px; } .page-intro p { max-width:640px; }
.courses-page { max-width:880px; }
.course-grid { display:grid; gap:14px; }
.course-card { background:#fff; border:1px solid var(--line); border-radius:16px; padding:22px 24px; }
.course-card h2 { margin:0 0 8px; font-size:20px; } .course-card p { margin:0 0 8px; }
.course-back { margin-right:4px; }
.chat-workspace.adviser-only, .chat-workspace.course-room:not(.lesson-open) { grid-template-columns:minmax(0,1fr); background:#fcfcfe; }
.adviser-only .conversation-panel, .adviser-only .chat-context, .adviser-only .teacher-classroom, .course-room .conversation-panel { display:none !important; }
.adviser-only .conversation-main, .course-room:not(.lesson-open) .conversation-main { max-width:none; margin:0; width:100%; border-right:0; background:#fcfcfe; }
.adviser-only .chat-scroll, .course-room:not(.lesson-open) .chat-scroll { padding:20px 24px 12px; }
.adviser-only .incoming .message-face, .course-room:not(.lesson-open) .incoming .message-face { margin-right:2px; }
.adviser-only .incoming .message-main, .course-room:not(.lesson-open) .incoming .message-main { max-width:calc(100% - 52px); }
.adviser-only .chat-composer, .adviser-only .teacher-next-action, .adviser-only .teacher-current-task, .adviser-only .chat-generation,
.course-room:not(.lesson-open) .chat-composer, .course-room:not(.lesson-open) .teacher-next-action, .course-room:not(.lesson-open) .teacher-current-task, .course-room:not(.lesson-open) .chat-generation { width:auto; margin-left:24px; margin-right:24px; }
.adviser-only .chat-head-actions > [data-chat=history],
.adviser-only .chat-head-actions > [data-chat=context],
.course-room .chat-head-actions > [data-chat=history] { display:none; }
.chat-workspace.course-room.lesson-open { grid-template-columns:minmax(0,1fr); }
.course-room.lesson-open .teacher-classroom { order:1; position:relative; border-left:0; padding:8px 52px 8px 16px; }
.course-room.lesson-open .classroom-heading { align-items:center; gap:16px; margin:0; }
.course-room.lesson-open .course-heading-copy { min-width:0; flex:1; }
.course-room.lesson-open .course-heading-meta { display:flex; align-items:center; gap:8px; min-height:0; }
.course-room.lesson-open .classroom-heading h2 { margin:0; font-size:20px; line-height:1.3; }
.course-room.lesson-open .classroom-context-state { margin:0; color:var(--ink); font-weight:650; }
.course-room.lesson-open .classroom-heading .course-back { margin:0; }
.course-room.lesson-open .classroom-tools { margin:0; flex:none; }
.course-room.lesson-open .classroom-tools .btn.small,
.course-room.lesson-open .stack .btn.small,
.course-room.lesson-open .lesson-ended .btn.small { min-height:30px; padding:4px 10px; }
.lesson-ended { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:0; padding:6px 12px; line-height:1.4; }
.course-room.lesson-open .lesson-layout { display:flex; flex-direction:column; gap:6px; }
.course-room.lesson-open .lesson-layout>.board { flex:1; height:auto; min-height:0; max-height:none; }
.course-room.lesson-open .lesson-layout>.stack { display:none; }
.course-room.lesson-open .stack { gap:0; }
.course-room.lesson-open .stack .card.soft { display:flex; align-items:center; gap:6px 12px; flex-wrap:wrap; margin:0; padding:6px 12px; }
.course-room.lesson-open .stack .kicker { margin:0; }
.course-room.lesson-open .stack h3 { margin:0; font-size:14px; }
.course-room.lesson-open .stack .small-text { margin:0; flex:1 1 180px; line-height:1.4; }
.course-room.lesson-open .stack .row { margin:0 0 0 auto; }
.course-room.lesson-open .board-body { flex:1 1 auto; }
.course-room.lesson-open .conversation-main { order:2; display:none; }
.course-room.lesson-open .conversation-head .course-back { display:none; }
.classroom-heading .course-back { display:inline-flex; margin:0 0 6px; }
.course-room.lesson-open .teacher-toggle { position:absolute; top:10px; right:0; z-index:6; display:flex; flex-direction:column; align-items:center; gap:8px; width:40px; margin:0; padding:12px 0 14px; border:1px solid var(--line); border-right:0; border-radius:12px 0 0 12px; background:#fff; color:#31456f; box-shadow:-6px 0 18px #24396610; font-size:13px; line-height:1; }
.course-room.lesson-open .teacher-toggle img { width:22px; height:22px; border-radius:50%; object-fit:cover; object-position:center 16%; }
.course-room.lesson-open .teacher-toggle span { writing-mode:vertical-rl; letter-spacing:.18em; }
.chat-workspace.course-room.lesson-open.teacher-shown { grid-template-columns:minmax(0,1fr) minmax(320px,400px); }
.course-room.lesson-open.teacher-shown .conversation-main { display:flex; background:#fcfcfe; border-left:1px solid var(--line); box-shadow:-10px 0 28px #24396612; }
.course-room.lesson-open.teacher-shown .teacher-classroom { padding-right:18px; }
.course-room.lesson-open.teacher-shown .teacher-toggle { display:none; }
.teacher-drawer-close { display:none; }
.course-room.lesson-open.teacher-shown .teacher-drawer-close { display:inline-flex; align-items:center; min-height:30px; padding:4px 8px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.course-room.lesson-open.teacher-shown .conversation-head p { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
@media(max-width:1100px){ .chat-workspace.course-room.lesson-open.teacher-shown { grid-template-columns:minmax(0,1fr) minmax(280px,340px); } }
.framework-page { display:flex; flex-direction:column; min-height:calc(100dvh - 140px); }
.framework-courses { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 14px; }
.framework-courses button { border:1px solid var(--line); background:#fff; color:#1d2b50; border-radius:999px; padding:8px 14px; }
.framework-courses button.active { background:#1d2b50; color:#fff; border-color:#1d2b50; }
.framework-sheet { display:flex; flex-direction:column; flex:1; min-height:0; }
#framework-graph { flex:1; min-height:460px; background:#fff; border:1px solid var(--line); border-radius:16px; }
.framework-legend { display:flex; flex-wrap:wrap; gap:14px; margin:12px 0 16px; font-size:13px; color:#42516f; }
.framework-legend i { display:inline-block; width:9px; height:9px; border-radius:50%; margin-right:6px; }
.framework-index { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.framework-index button { display:flex; flex-direction:column; align-items:flex-start; gap:2px; background:#fff; border:1px solid var(--line); border-radius:10px; padding:8px 12px; color:#1d2b50; }
.framework-index small { color:#6b7894; font-size:12px; }
.teaching-feedback{display:inline-flex;align-items:center;flex-wrap:wrap;gap:.35rem;margin:.4rem 0;color:var(--muted,#675f54);font-size:.8rem}
.teaching-feedback .btn{padding:.2rem .45rem}
.teaching-evidence .record-block{margin:.6rem 0}
.teaching-context p{margin:.35rem 0}
