/* Warm ivory / champagne desktop theme. The supplied portrait stays unmodified.
   Kept separate from the learning-workspace rules so behavior and data stay intact. */
:root {
 --bg:#faf9f6; --card:#fffefa; --surface:#fffefa; --sidebar:#f5f3ed;
 --ink:#3f382b; --muted:#776e5e; --line:#e7e0d3;
 --brand:#96702c; --brand-dark:#765321; --brand-light:#f5eddc;
 --purple:var(--brand); --purple-soft:var(--brand-light); --green:#376d53;
 --gold-border:#d8c59e; --gold-soft:#f7f0e2;
 --shadow:0 8px 28px #58421906; --rail-width:216px; --header-height:64px;
 color-scheme:light;
}
body { background:var(--bg); color:var(--ink); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; line-height:1.7; -webkit-font-smoothing:antialiased; }
h1,h2,h3 { color:var(--ink); letter-spacing:-.025em; }
h1 { font-size:30px; line-height:1.4; font-weight:650; }
h2 { font-size:20px; line-height:1.5; }
p,.small-text,.prose,.board-body .prose { color:var(--muted); }
::selection { background:#ead8ad; color:#3b3020; }
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible { outline:2px solid #947039; outline-offset:3px; }
button,input,textarea,select { accent-color:var(--brand); }
.eyebrow { color:#8e733c; font-size:12px; letter-spacing:.14em; font-weight:600; }
.btn { border-radius:11px; min-height:40px; padding:10px 17px; transition:background .16s,border-color .16s,box-shadow .16s; }
.btn:hover { background:var(--gold-soft); border-color:var(--gold-border); }
.btn.primary,.new-thread { background:linear-gradient(125deg,#f1e3bf,#deca9b); border:1px solid #cbb17a; color:#4a391c; box-shadow:0 3px 8px #9470390b; font-weight:600; }
.btn.primary:hover,.new-thread:hover { background:linear-gradient(125deg,#eedbb0,#d5bb85); border-color:#b89961; }
.btn.ghost { color:var(--muted); }
.btn.ghost:hover { color:var(--ink); background:#f2ecdf; }
.btn.danger { color:#994334; border-color:#e7cfc6; background:#fff7f3; }
.pill,.tag { background:var(--brand-light); color:#7d5c24; }
.pill.gray { background:#f0ede6; color:var(--muted); }
.card { border-color:var(--line); background:var(--card); border-radius:16px; padding:26px; box-shadow:var(--shadow); }
.card.soft,.file-drop,.memory-state { background:#f5f2ea; }
.notice { background:var(--gold-soft); border-color:var(--line); color:#755f36; }
.notice.warn { background:#fff7e7; border-color:#e5d3a5; color:#7c5d23; }
.field label { color:var(--muted); font-size:13px; }
.field input,.field textarea,.field select,input.text,textarea.text,select.text,.ask-area textarea { background:#fffefa; border-color:var(--line); border-radius:10px; }
input[type=file]::file-selector-button { font:inherit; color:var(--ink); background:#fffefa; border:1px solid var(--gold-border); border-radius:9px; padding:9px 14px; margin-right:12px; cursor:pointer; }
.empty { background:#fffdf8; border-color:var(--gold-border); }
.list-item.active,.option:has(input:checked) { background:var(--gold-soft); border-color:var(--gold-border); }
.feedback { background:#f6f0e3; border-color:#b69554; color:var(--ink); }
.toast { background:#4c4230; box-shadow:0 8px 24px #4a382522; }
.overlay { background:#302a2059; }
.modal { background:#fffefa; border:1px solid var(--gold-border); border-radius:20px; padding:30px; }
details summary,.message-sources summary { color:var(--muted); }
.divider { background:var(--line); }
th { background:#f5f2ea; color:var(--muted); }
.stat strong { color:#6d552e; }
.job-bar { background:#f5ecd8; border-color:var(--line); color:#75582e; }

/* A readable desktop rail with the existing product destinations. */
.desktop-shell { grid-template-columns:var(--rail-width) minmax(0,1fr); }
.desktop-rail { display:flex; position:sticky; inset:auto; top:0; width:var(--rail-width); padding:24px 16px 12px; background:var(--sidebar); border-right:1px solid var(--line); color:var(--muted); height:100dvh; }
.rail-brand { width:100%; height:auto; margin:0 0 26px; padding:0 8px; display:flex; align-items:center; gap:10px; background:none; color:var(--ink); border-radius:0; }
.rail-monogram,.logo { display:grid; place-items:center; width:40px; height:40px; flex:none; border:1px solid #d4bd87; border-radius:12px; background:linear-gradient(140deg,#f9f1df,#ddc58e); color:#745523; font-size:23px; font-weight:650; box-shadow:0 3px 10px #91723a0c; }
.rail-wordmark { font-size:18px; font-weight:650; letter-spacing:-.03em; }
.rail-wordmark b { color:#947137; font-size:14px; font-weight:500; }
.rail-wordmark small { display:block; margin-top:1px; color:var(--muted); font-size:10px; font-weight:400; letter-spacing:.06em; }
.rail-section-label { margin:0 14px 9px; font-size:11px; letter-spacing:.1em; color:#8a8171; }
.desktop-rail .nav { flex:none; gap:5px; margin:0; overflow:visible; }
.desktop-rail .nav button { width:100%; flex-direction:row; justify-content:flex-start; gap:13px; min-height:46px; padding:11px 14px; color:#776d5a; border:1px solid transparent; border-radius:11px; font-size:14px; font-weight:500; }
.desktop-rail .nav button svg { width:20px; height:20px; }
.desktop-rail .nav button.active { background:linear-gradient(120deg,#f4e8c9,#e9d7ac); color:#624c27; border-color:#d8bf86; box-shadow:0 3px 8px #aa854518; }
.desktop-rail .nav button:hover { background:#eee8da; color:#54432a; }
.rail-divider { margin-top:22px; padding-top:19px; border-top:1px solid var(--line); }
.desktop-rail .rail-secondary button { min-height:40px; font-size:13px; }
.rail-mentor { margin:24px 6px 16px; margin-top:auto; padding-top:18px; text-align:center; min-height:0; }
.rail-mentor>img { display:block; width:108px; height:108px; margin:0 auto 10px; object-fit:cover; object-position:50% 28%; border-radius:50%; border:1px solid #e6d8bb; }
.rail-mentor strong { display:block; font-size:12px; color:#6d5c3e; font-weight:500; }
.rail-mentor small { display:block; font-size:10px; color:#8b816f; margin-top:3px; }
.account-menu { flex:none; margin:0; padding-top:10px; border-top:1px solid var(--line); }
.account-menu>summary { display:flex; align-items:center; gap:10px; margin:0; padding:7px; border-radius:10px; }
.account-menu>summary:hover { background:#ede6d8; }
.rail-user { margin:0; width:34px; height:34px; flex:none; background:#e9dfc9; color:#705b31; font-size:14px; border:1px solid #ddd0b3; }
.rail-account-copy { min-width:0; flex:1; }
.rail-account-copy strong { display:block; margin:0; padding:0; border:0; font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--ink); }
.rail-account-copy small { display:block; color:var(--muted); font-size:11px; }
.account-menu>summary svg { width:16px; height:16px; flex:none; }
.account-menu>div { left:calc(var(--rail-width) - 24px); bottom:0; border-color:var(--line); box-shadow:0 10px 32px #51402318; }
.account-menu button:hover { background:var(--gold-soft); }
.topbar { height:var(--header-height); padding:0 32px; background:#fbfaf7; border-color:var(--line); }
.product-wordmark { font-size:16px; color:#695b43; font-weight:600; }
.product-wordmark span { color:#a48449; }
.product-wordmark small { display:inline; color:#8a8070; font-size:12px; margin-left:22px; }
.topbar>.small-text { font-size:12px; color:#877c67; }
#main { max-width:1350px; padding:40px 44px 56px; }
.chat-mode #main { max-width:none; height:calc(100dvh - var(--header-height)); padding:0; }
.chat-mode .job-bar { top:calc(var(--header-height) + 8px); }

/* Shared conversation canvas: quiet margins, bounded reading width. */
.chat-workspace,.chat-workspace.adviser-only,.chat-workspace.course-room:not(.lesson-open),
.conversation-main,.adviser-only .conversation-main,.course-room:not(.lesson-open) .conversation-main { background:var(--bg); }
.conversation-head { min-height:78px; background:#fffefbcc; border-color:var(--line); padding:14px 32px; }
.conversation-head h1 { font-size:16px; }
.conversation-head p { color:var(--muted); font-size:12px; margin-top:3px; }
.mentor-profile { width:43px; height:43px; border:1px solid #dcc89d; background:#fffaf0; }
.mentor-profile img,.message-face img,.thread-avatar img,.teacher-portrait,.teacher-toggle img { object-fit:cover; object-position:50% 27%; }
.mentor-profile img,.message-face img,.thread-avatar img { transform:scale(1.58); transform-origin:50% 35%; }
.chat-head-actions button { color:#776b55; border-radius:8px; }
.chat-head-actions button:hover { background:var(--gold-soft); }
.adviser-only .chat-scroll,.course-room:not(.lesson-open) .chat-scroll { padding:22px max(32px,calc((100% - 980px)/2)) 12px; }
.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:max(32px,calc((100% - 980px)/2)); margin-right:max(32px,calc((100% - 980px)/2)); }
.message-main,.adviser-only .incoming .message-main,.course-room:not(.lesson-open) .incoming .message-main { max-width:min(780px,calc(100% - 52px)); }
.message-face { background:#eadfc5; color:#725b2e; width:36px; height:36px; border-radius:12px; border:1px solid #e4d6b8; }
.message-bubble { background:#fffefa; border-color:var(--line); padding:15px 19px; line-height:1.8; border-radius:4px 16px 16px 16px; box-shadow:0 2px 8px #6b4d2003; }
.outgoing .message-bubble { background:#f1e7cd; border-color:#e3d4b0; border-radius:16px 4px 16px 16px; }
.message-meta,.message-meta button,.ai-label { color:#8a7b63; }
.message-meta button:hover { color:#74511f; }
.chat-code { background:#f5f2eb; border-color:#e5ddcd; color:#50452f; }
.chat-composer { border-color:#d9c8a5; border-radius:19px; background:#fffefa; padding:15px 20px 8px; box-shadow:0 8px 24px #6e51240a; margin-bottom:24px; }
.chat-composer:focus-within { border-color:#b29357; box-shadow:0 0 0 3px #b99a5710,0 8px 24px #6e51240a; }
.chat-composer textarea { height:68px; color:var(--ink); font-size:15px; }
.chat-composer textarea::placeholder { color:#9a8e78; }
.composer-toolbar small,.chat-save { color:#8c8069; font-size:11px; }
.composer-toolbar .primary { border-radius:10px; min-width:80px; }
.chat-save { min-height:18px; }
.notice>button:not(.btn) { font:inherit; font-size:12px; color:#624b25; background:#fffdf7; border:1px solid var(--gold-border); border-radius:8px; padding:6px 10px; margin:3px; cursor:pointer; }
.teacher-current-task,.teacher-next-action { background:#f5f0e5; border:1px solid #e6d9bd; color:var(--ink); border-radius:13px; }
.teacher-next-action { padding:14px 18px; margin-bottom:10px; }
.teacher-next-action strong { font-size:13px; }
.teacher-next-action p,.teacher-current-task span { color:var(--muted); font-size:12px; }
.chat-partial { background:#f5f0e5; border-color:#bea064; }
.chat-generation,.chat-generation button { color:#856a38; }
.chat-jump { background:#f2e4be; color:#725220; box-shadow:0 3px 12px #80602718; }
.attachment-chip,.file-card,.inline-teaching-card,.teaching-card,.context-action,.memory-preview { background:#f8f3e8; border-color:var(--line); color:var(--ink); }
.conversation-panel,.chat-context { background:#f5f2ea; }
.conversation-panel .text { background:#fffefa; border-color:var(--line); }
.thread-item:hover,.thread-item.selected,.context-action:hover { background:#eee3ca; }
.thread-copy small,.thread-copy time,.thread-list-label,.thread-list-label button,.memory-preview small { color:var(--muted); }

/* The actual supplied illustration, not a recreated image or artificial backdrop. */
.chat-welcome { display:grid; grid-template-columns:minmax(0,1fr) 260px; gap:20px; align-items:center; text-align:left; max-width:980px; margin:16px auto 24px; padding:0; }
.welcome-copy { padding:12px 0; }
.welcome-copy h1 { font-size:clamp(28px,2.6vw,40px); font-weight:650; letter-spacing:-.04em; margin:14px 0 16px; line-height:1.4; }
.welcome-copy>p:not(.eyebrow) { font-size:14px; line-height:1.9; white-space:pre-line; }
.chat-welcome>img.welcome-portrait { width:260px; height:310px; border-radius:30px; object-fit:cover; object-position:center; border:1px solid #eee3cd; }
.welcome-prompts { justify-content:flex-start; gap:8px; margin-top:25px; }
.welcome-prompts button { background:#fffdf7; color:#7c6741; border:1px solid #decfad; border-radius:10px; padding:10px 13px; font-size:12px; margin:0; transition:background .15s,border-color .15s; }
.welcome-prompts button:hover { background:#f2e6c9; border-color:#b99a5a; }
.lesson-open .chat-welcome { grid-template-columns:1fr; gap:0; margin:16px 0; }
.lesson-open .welcome-copy h1 { font-size:23px; }
.lesson-open .chat-welcome>img.welcome-portrait { width:120px; height:150px; justify-self:center; object-fit:contain; object-position:center; order:-1; border-radius:16px; }
.lesson-open .welcome-prompts { gap:6px; margin-top:14px; }
.lesson-open .welcome-prompts button { font-size:12px; padding:7px 10px; }

/* Courses: real progress, compact actions, and room for long titles. */
.courses-page { max-width:none; }
.page-intro { margin-bottom:30px; }
.page-intro h1 { margin-bottom:12px; }
.page-intro p { font-size:14px; }
.courses-intro { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:0 0 28px; border-bottom:1px solid var(--line); }
.courses-intro>.btn { flex:none; }
.course-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; }
.course-grid>.empty { grid-column:1/-1; }
.course-card { display:flex; flex-direction:column; padding:26px; border-radius:18px; border-color:var(--line); background:#fffefa; box-shadow:0 5px 20px #68512404; }
.course-card-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:22px; }
.course-number { font-size:26px; font-weight:300; line-height:1; color:#b29762; font-variant-numeric:tabular-nums; }
.course-card h2 { font-size:21px; line-height:1.5; margin-bottom:12px; overflow-wrap:anywhere; }
.course-description { font-size:13px; line-height:1.9; flex:1; }
.course-progress { margin:22px 0 18px; }
.course-progress .row { font-size:12px; color:var(--muted); }
.course-progress strong { font-weight:500; color:#836a39; }
.course-progress progress { display:block; appearance:none; width:100%; height:5px; margin:10px 0; border:0; border-radius:6px; background:#eee8da; overflow:hidden; }
.course-progress progress::-webkit-progress-bar { background:#eee8da; border-radius:6px; }
.course-progress progress::-webkit-progress-value { background:linear-gradient(90deg,#d6bb7d,#aa8542); border-radius:6px; }
.course-progress progress::-moz-progress-bar { background:#b99a58; border-radius:6px; }
.course-progress .small-text { font-size:11px; margin:0; }
.course-card-actions { padding-top:18px; border-top:1px solid var(--line); justify-content:space-between; }
.course-card-actions .ghost { font-size:11px; }
.learning-subject { color:#84662f; background:#f2e8d0; }
.learning-row { padding:24px; }
.schedule-strip { border-color:#cbb17b; }
.syllabus-preview li::marker { color:#997739; }
.framework-courses button,.framework-index button { color:var(--ink); background:#fffefa; }
.framework-courses button.active { color:#5d4520; background:#eee0bd; border-color:#ccb37b; }
.framework-legend { color:var(--muted); }
.framework-sheet { flex:none; }
.learn-path { list-style:none; margin:8px 0 0; padding:0; max-width:760px; }
.learn-step { display:grid; grid-template-columns:36px minmax(0,1fr); gap:14px; }
.learn-rail { display:flex; flex-direction:column; align-items:center; }
.learn-rail span { width:28px; height:28px; border-radius:50%; display:grid; place-items:center; flex:none; font-size:12px; border:1px solid var(--gold-border); background:#fffefa; color:#7a6233; }
.learn-rail::after { content:""; width:1px; flex:1; background:#e5dccb; min-height:14px; }
.learn-step:last-child .learn-rail::after { display:none; }
.learn-card { background:#fffefa; border:1px solid var(--line); border-radius:14px; margin:0 0 12px; overflow:hidden; }
.learn-lesson { width:100%; display:flex; align-items:center; justify-content:space-between; gap:16px; text-align:left; background:transparent; border:0; padding:14px 16px; color:var(--ink); min-height:52px; }
.learn-lesson strong { font-size:15px; font-weight:620; line-height:1.45; }
.learn-lesson em { flex:none; font-style:normal; font-size:12px; color:var(--muted); }
.learn-lesson:hover { background:#fbf6ea; }
.learn-lesson.is-later:hover { background:transparent; }
.learn-prereq { margin:0; padding:0 16px 12px; font-size:12px; color:var(--muted); }
.learn-notes { display:flex; flex-direction:column; border-top:1px solid var(--line); background:#fbf8f1; }
.learn-notes button,.path-note { display:flex; flex-direction:column; align-items:flex-start; gap:2px; width:100%; text-align:left; background:transparent; border:0; border-bottom:1px solid #efe8da; padding:9px 16px; color:#6d5730; font-size:13px; line-height:1.45; }
.learn-notes button:last-child { border-bottom:0; }
.learn-notes button:hover { background:#f6efe2; }
.learn-notes small { color:var(--muted); font-size:12px; }
.learn-loose { max-width:760px; margin-top:8px; }
.learn-loose h2 { font-size:15px; margin:0 0 8px; }
.learn-step.is-ready .learn-card,.learn-step.is-learning .learn-card { border-color:#ccb37b; background:#fffaf0; }
.learn-step.is-learning .learn-rail span,.learn-step.is-ready .learn-rail span { background:#96702c; color:#fff; border-color:#96702c; }
.learn-step.is-taught .learn-rail span { background:#a6987a; color:#fff; border-color:#a6987a; }
.learn-step.is-passed .learn-rail span { background:#2f6f4e; color:#fff; border-color:#2f6f4e; }
.learn-step.is-failed .learn-rail span { background:#9a4d4d; color:#fff; border-color:#9a4d4d; }
.learn-step.is-planned .learn-rail span { color:#b3a890; }
.path-swatch { background:#d5d0c4; }
.path-swatch.is-ready { background:#c6ad77; }
.path-swatch.is-learning { background:#96702c; }
.path-swatch.is-taught { background:#a6987a; }
.path-swatch.is-passed { background:#2f6f4e; }
.path-swatch.is-failed { background:#9a4d4d; }
.path-swatch.is-note { background:#a17a52; }

/* Preserve real board, experiments, Python inputs and the teacher drawer. */
.teacher-classroom { background:#f3f0e8; }
.course-room.lesson-open .teacher-classroom { padding:20px 58px 20px 24px; }
.course-room.lesson-open.teacher-shown .teacher-classroom { padding-right:20px; }
.course-room.lesson-open .classroom-heading { gap:12px; padding-bottom:18px; flex-wrap:wrap; }
.course-room.lesson-open .course-heading-copy { flex:1 1 100%; }
.course-room.lesson-open .course-heading-meta { flex-wrap:wrap; }
.course-room.lesson-open .classroom-heading h2 { font-size:19px; line-height:1.45; }
.course-room.lesson-open .classroom-tools { flex:0 1 100%; min-width:0; max-width:100%; gap:6px; }
.course-room.lesson-open .classroom-tools .btn { white-space:nowrap; }
.course-room.lesson-open .lesson-layout { gap:12px; }
.board { border-color:#dfd5c1; border-radius:16px; min-width:0; }
.board-header { padding:14px 24px; background:#fdfbf5; border-color:var(--line); gap:10px; }
.board-header small { font-size:12px; }
.lesson-open .board-body { padding:28px 34px; }
.board-body .prose { max-width:900px; line-height:1.9; color:#5f5748; }
.lesson-open .board-body .prose { line-height:1.85; }
.lesson-open .board-footer { background:#fffefa; padding:14px 22px; gap:12px; flex-wrap:wrap; }
.step-dots i { background:#e7deca; }
.question { border-color:#e3d6b9; background:#fbf8ef; }
.widget { border-color:var(--line); background:#faf8f1; }
.teacher-header { background:#f7f2e8; }
.bubble { background:#f4eddd; }
.bubble.user { background:#f1efe9; }
.course-room.lesson-open .teacher-toggle { top:22px; width:40px; border-color:var(--gold-border); background:#fbf4e3; color:#7e622e; box-shadow:-4px 0 14px #7458200a; }
.course-room.lesson-open.teacher-shown .conversation-main { background:var(--bg); box-shadow:-5px 0 20px #4c3c2210; }
.lesson-open .chat-composer { margin:8px 14px 16px; border-radius:14px; padding:11px 13px 6px; }
.lesson-open .chat-composer textarea { font-size:14px; height:68px; }
.lesson-open .conversation-head { min-height:74px; padding:12px 16px; }
.lesson-open .teacher-next-action { padding:12px; }
.lesson-open .teacher-next-action .btn { white-space:normal; }
.course-room.lesson-open.teacher-shown .teacher-drawer-close { background:#fbf5e6; border-color:var(--line); }

/* Existing sign-in and secondary tools follow the same palette. */
.auth { display:grid; grid-template-columns:1.15fr 1fr; min-height:100dvh; max-width:none; margin:0; padding:0; }
.auth-story { background:#f4efe4; color:var(--ink); position:relative; padding:50px; }
.auth-story::after { content:""; display:block; height:250px; margin-top:16px; background:url('/static/assets/mentor-gold.png') center 30%/contain no-repeat; pointer-events:none; }
.auth-story h1,.auth-story .brand strong { color:var(--ink); }
.auth-story p { color:var(--muted); }
.auth-story .brand { padding:0; }
.auth-panel { width:100%; max-width:520px; padding:60px 44px; margin:auto; }
.hero { background:#f5efdf; border-color:var(--line); }
.hero::after { background-image:url('/static/assets/mentor-gold.png'); border:0; opacity:.22; }
.startbox,.canvas-node { border-color:var(--gold-border); }
.progress-track { background:#eee7d7; }
.graph,.canvas-board { background-color:#faf8f2; }
.rail-section-label,.rail-mentor small,.product-wordmark small,.topbar>.small-text,
.composer-toolbar small,.chat-save,.message-meta,.message-meta button,.ai-label { color:#7b705d; }
.chat-composer textarea::placeholder { color:#897b64; }

/* Smaller desktop windows keep controls reachable; no separate mobile flow. */
@media(min-width:1700px) { .chat-workspace:not(.lesson-open) .chat-scroll { padding-left:max(40px,calc((100% - 980px)/2)); padding-right:max(40px,calc((100% - 980px)/2)); } }
@media(max-width:1200px) {
 :root { --rail-width:190px; }
 .desktop-rail { padding-left:12px; padding-right:12px; }
 .rail-wordmark { font-size:16px; }
 .product-wordmark small { display:none; }
 #main { padding:32px 28px 44px; }
 .chat-welcome { grid-template-columns:minmax(0,1fr) 210px; gap:16px; }
 .chat-welcome>img.welcome-portrait { width:210px; height:275px; }
 .welcome-copy h1 { font-size:29px; }
 .welcome-prompts { gap:6px; }
 .courses-intro { align-items:flex-start; flex-direction:column; gap:12px; }
 .course-card { padding:22px; }
 .chat-workspace.course-room.lesson-open.teacher-shown { grid-template-columns:minmax(0,1fr) 320px; }
 .course-room.lesson-open .teacher-classroom { padding-left:18px; }
 .lesson-open .board-body { padding:24px; }
}
@media(max-width:980px) {
 :root { --rail-width:168px; }
 .rail-wordmark small,.rail-mentor small { display:none; }
 .rail-brand { gap:7px; padding:0 4px; }
 .rail-wordmark { font-size:14px; }
 .rail-monogram { width:33px; height:35px; font-size:21px; }
 .desktop-rail .nav button { padding:10px; gap:9px; font-size:13px; }
 .rail-mentor>img { width:80px; height:80px; }
 .topbar { padding:0 24px; }
 .adviser-only .chat-scroll,.course-room:not(.lesson-open) .chat-scroll { padding-left:24px; padding-right:24px; }
 .adviser-only .chat-composer,.adviser-only .teacher-next-action,.course-room:not(.lesson-open) .chat-composer,.course-room:not(.lesson-open) .teacher-next-action { margin-left:24px; margin-right:24px; }
 .chat-welcome { grid-template-columns:minmax(0,1fr) 155px; }
 .chat-welcome>img.welcome-portrait { width:155px; height:230px; }
 .welcome-copy h1 { font-size:26px; }
 .course-grid { grid-template-columns:1fr; }
 .chat-workspace.course-room.lesson-open.teacher-shown { grid-template-columns:minmax(0,1fr) 285px; }
 .lesson-open .board-body { padding:18px; }
 .lesson-open .board-footer { padding:12px; }
 .lesson-open .step-dots { display:none; }
 .conversation-head { flex-wrap:nowrap; padding:14px 24px; }
}
@media(max-height:760px) {
 .desktop-rail { padding-top:18px; }
 .rail-brand { margin-bottom:20px; }
 .rail-divider { margin-top:14px; padding-top:14px; }
 .rail-mentor>img { width:78px; height:78px; margin-bottom:8px; }
 .rail-mentor { margin-bottom:14px; padding-top:14px; }
 .chat-welcome { margin:4px auto 14px; }
 .chat-welcome>img.welcome-portrait { height:240px; width:220px; }
 .chat-composer { margin-bottom:16px; }
 .chat-composer textarea { height:58px; }
}
@media(max-height:640px) { .rail-mentor { display:none; } .account-menu { margin-top:auto; } .desktop-rail { overflow-y:auto; } }
@media(prefers-reduced-motion:reduce) { .btn,.welcome-prompts button { transition:none; } }
@media print { .desktop-shell { display:block; } }

/* A dedicated, navigation-free desktop surface for focused assessments. */
.exam-hub { max-width:1120px; margin:0 auto; }
.assessment-heading { display:flex; justify-content:space-between; align-items:center; gap:28px; margin-bottom:36px; }
.assessment-heading h1 { margin:2px 0 9px; }
.assessment-heading .eyebrow { color:#957543; font-size:11px; letter-spacing:.1em; }
.assessment-heading>.row { flex:none; }
.assessment-section { margin-top:32px; }
.assessment-section-head { margin-bottom:15px; }
.assessment-section-head h2 { display:flex; align-items:center; gap:10px; font-size:18px; margin:0 0 5px; }
.assessment-section-head h2>span { padding:2px 8px; border-radius:7px; background:#eee5d1; color:#816333; font-size:12px; font-weight:500; }
.assessment-section-head p { margin:0; color:var(--muted); font-size:12px; }
.assessment-list { display:grid; gap:12px; }
.assessment-row { display:grid; grid-template-columns:44px minmax(0,1fr) 116px auto; gap:20px; align-items:center; padding:23px 24px; background:#fffefa; border:1px solid var(--line); border-radius:16px; box-shadow:0 4px 16px #51402304; }
.assessment-mark { display:grid; place-items:center; width:44px; height:48px; border:1px solid #e4d5b5; border-radius:12px; color:#a48449; background:#f8f2e5; }
.assessment-mark svg { width:23px; height:23px; }
.assessment-copy { min-width:0; }
.assessment-meta { display:flex; flex-wrap:wrap; align-items:center; gap:9px; font-size:11px; color:var(--muted); }
.assessment-meta .pill { font-size:10px; padding:2px 7px; }
.assessment-copy h3 { margin:8px 0 5px; font-size:17px; line-height:1.5; overflow-wrap:anywhere; }
.assessment-copy p { margin:0; font-size:12px; color:var(--muted); line-height:1.65; }
.assessment-progress { display:grid; gap:3px; }
.assessment-progress strong { font-size:20px; color:#745d34; font-variant-numeric:tabular-nums; }
.assessment-progress strong>span { color:var(--muted); font-size:12px; font-weight:400; }
.assessment-progress small { color:var(--muted); font-size:11px; }
.assessment-progress progress { width:100%; height:4px; margin-top:5px; accent-color:#b29357; }
.assessment-row>.btn { white-space:nowrap; }
.assessment-empty { padding:30px 24px; border:1px dashed #ded4c0; border-radius:15px; background:#faf7f0; color:var(--muted); font-size:13px; line-height:1.8; }
@media(max-width:1100px) {
 .assessment-heading { align-items:flex-start; flex-direction:column; gap:18px; }
 .assessment-row { grid-template-columns:minmax(0,1fr) 100px auto; gap:16px; padding:20px; }
 .assessment-mark { display:none; }
}
@media(max-width:820px) {
 .assessment-row { grid-template-columns:minmax(0,1fr) auto; }
 .assessment-copy { grid-column:1/-1; }
 .assessment-progress { max-width:150px; }
}
.exam-mode { overflow:hidden; background:#faf9f6; }
.exam-mode .desktop-shell { display:block; min-height:100dvh; height:100dvh; }
.exam-mode .desktop-rail,.exam-mode .topbar,.exam-mode #jobbar { display:none!important; }
.exam-mode .surface { height:100dvh; min-height:0; }
.exam-mode #main { width:100%; max-width:none; height:100dvh; margin:0; padding:0 28px 52px; overflow:auto; overscroll-behavior:contain; }
.exam-resume[hidden] { display:none!important; }
.exam-resume:not([hidden]) { position:fixed; top:calc(var(--header-height) + 10px); right:24px; z-index:15; display:flex; align-items:center; gap:18px; max-width:min(540px,calc(100vw - 32px)); padding:12px 14px 12px 17px; border:1px solid var(--gold-border); border-radius:14px; background:#fffdf7; box-shadow:0 10px 34px #51402318; }
.exam-resume>div { min-width:0; display:grid; gap:2px; }
.exam-resume strong { color:var(--ink); font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.exam-resume span { color:var(--muted); font-size:12px; }
.exam-page { max-width:1220px; margin:0 auto; padding:0 0 48px; }
.exam-focus-head { position:sticky; top:0; z-index:8; display:grid; grid-template-columns:minmax(170px,1fr) minmax(240px,1.5fr) auto auto; align-items:center; gap:26px; min-height:86px; margin:0 -28px 30px; padding:12px clamp(22px,4vw,60px); border-bottom:1px solid var(--line); background:#faf9f5f2; backdrop-filter:blur(14px); }
.exam-leave { display:inline-flex; align-items:center; gap:8px; justify-self:start; min-height:40px; padding:8px 12px; border:1px solid var(--line); border-radius:10px; background:#fffefa; color:#6c604b; font:inherit; cursor:pointer; }
.exam-leave:hover { border-color:var(--gold-border); background:var(--gold-soft); }
.exam-focus-brand { display:flex; align-items:center; gap:12px; min-width:0; }
.exam-brand-mark { display:grid; place-items:center; flex:none; width:40px; height:40px; border:1px solid #d4bd87; border-radius:12px; background:linear-gradient(140deg,#f9f1df,#ddc58e); color:#745523; font-size:22px; font-weight:650; }
.exam-focus-brand>div { min-width:0; display:grid; }
.exam-focus-brand small { color:#8e7952; font-size:11px; }
.exam-focus-brand strong { color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }
.exam-focus-state { display:grid; grid-template-columns:9px auto; align-items:center; column-gap:8px; color:#715b34; font-size:13px; white-space:nowrap; }
.exam-focus-state small { grid-column:2; color:var(--muted); font-size:11px; }
.exam-state-dot { width:8px; height:8px; border-radius:50%; background:#aaa18f; }
.exam-state-dot.live { background:#7e9a59; box-shadow:0 0 0 3px #7e9a5920; }
.exam-clock-box { display:grid; justify-items:end; gap:1px; min-width:164px; padding-left:22px; border-left:1px solid var(--line); }
.exam-clock-box small { color:var(--muted); font-size:11px; }
.exam-clock-box strong { color:#624b25; font-size:14px; font-variant-numeric:tabular-nums; }
.exam-clock-box strong.is-late { color:#876e43; font-size:12px; text-align:right; }
.exam-focus-layout { display:grid; grid-template-columns:230px minmax(0,820px); justify-content:center; gap:42px; align-items:start; }
.exam-outline { position:sticky; top:116px; padding:22px 18px; border:1px solid var(--line); border-radius:16px; background:#fffefa; box-shadow:var(--shadow); }
.exam-outline-title { display:flex; justify-content:space-between; align-items:end; gap:10px; }
.exam-outline-title .eyebrow { font-size:10px; }
.exam-outline-title h2 { margin:3px 0 0; font-size:17px; }
.exam-outline-title>strong { color:#755b2d; font-size:17px; font-variant-numeric:tabular-nums; }
.exam-outline>p { margin:5px 0 18px; font-size:12px; }
.exam-question-nav { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; }
.exam-question-link { position:relative; display:grid; place-items:center; aspect-ratio:1; min-width:0; padding:0; border:1px solid #e7e1d6; border-radius:9px; background:#fffefa; color:#746b5d; font-size:12px; font-variant-numeric:tabular-nums; cursor:pointer; transition:background .16s,border-color .16s,transform .16s; }
.exam-question-link:hover { transform:translateY(-1px); border-color:var(--gold-border); }
.exam-question-link.is-answered { border-color:#c8ad72; background:#f3e7c8; color:#654d23; }
.exam-question-link>i { position:absolute; right:4px; bottom:4px; width:5px; height:5px; border-radius:50%; background:transparent; }
.exam-question-link.is-answered>i { background:#9b773b; }
.exam-outline-key { display:grid; gap:7px; margin-top:19px; padding-top:15px; border-top:1px solid var(--line); color:var(--muted); font-size:11px; }
.exam-outline-key span { display:flex; align-items:center; gap:8px; }
.exam-outline-key i { width:9px; height:9px; border:1px solid #d9d1c2; border-radius:3px; background:#fffefa; }
.exam-outline-key i.answered { border-color:#c8ad72; background:#f3e7c8; }
.exam-honesty-note { margin-top:17px; padding:12px; border-radius:10px; background:#f6f1e6; color:#786747; font-size:11px; line-height:1.7; }
.exam-paper { min-width:0; }
.exam-paper-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 16px; }
.exam-paper-heading .eyebrow { font-size:10px; }
.exam-paper-heading h1 { margin:2px 0 0; font-size:25px; }
.exam-paper-heading .pill { flex:none; }
.exam-notice { margin:0 0 18px; padding:13px 16px; font-size:12px; line-height:1.7; }
.exam-form { display:grid; gap:16px; }
.exam-card { scroll-margin-top:106px; padding:22px 24px; border-radius:15px; transition:border-color .18s,box-shadow .18s; }
.exam-card.is-answered { border-color:#e4d5b2; }
.exam-card h2 { margin:0; font-size:16px; }
.exam-card h2:focus { outline:2px solid #b29357; outline-offset:4px; }
.exam-prompt { margin:15px 0 17px; color:var(--ink); font-size:16px; line-height:1.85; }
.exam-answer { display:grid; gap:8px; }
.exam-answer .option { display:flex; align-items:flex-start; gap:10px; margin:0; padding:11px 13px; border:1px solid var(--line); border-radius:10px; background:#fffefa; color:var(--ink); cursor:pointer; line-height:1.65; }
.exam-answer .option:has(input:checked) { border-color:var(--gold-border); background:var(--gold-soft); }
.exam-answer .option input { margin-top:5px; flex:none; }
.exam-answer textarea { min-height:116px; padding:13px 14px; resize:vertical; line-height:1.7; }
.exam-card>[data-action="clear-exam-answer"] { margin-top:10px; }
.exam-draft-status { min-height:0; }
.exam-draft-status:empty { display:none; }
.exam-draft-status .draft-status { margin:0; padding:8px 12px; border-radius:9px; background:#f6f1e6; font-size:12px; }
.exam-submit-dock { position:sticky; bottom:0; z-index:6; display:flex; align-items:center; justify-content:space-between; gap:16px; margin:2px -12px 0; padding:13px 12px; border:1px solid #e6ddcb; border-radius:14px; background:#fffdf7ed; box-shadow:0 -6px 24px #5d4b2410; backdrop-filter:blur(12px); }
.exam-submit-dock>.exam-save-status { max-width:370px; margin:0; font-size:11px; line-height:1.6; }
.exam-submit-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; }
.exam-abandon { color:#8c665b!important; font-size:12px; }
.exam-submit { min-width:146px; }
.exam-preparing,.exam-empty { max-width:760px; margin:12vh auto; padding:42px; border:1px solid var(--line); border-radius:20px; background:#fffefa; text-align:center; box-shadow:var(--shadow); }
.exam-preparing h1,.exam-empty h1 { margin:10px 0; font-size:25px; }
.exam-preparing p,.exam-empty p { max-width:500px; margin:0 auto 22px; }
.exam-preparing .row { justify-content:center; }
.exam-loader { width:30px; height:30px; margin:0 auto 16px; border:3px solid #ece3d1; border-top-color:#a68443; border-radius:50%; animation:exam-spin .8s linear infinite; }
@keyframes exam-spin { to { transform:rotate(360deg); } }
@media(max-width:1100px) {
 .exam-mode #main { padding-right:20px; padding-left:20px; }
 .exam-focus-head { grid-template-columns:auto minmax(180px,1fr) auto; gap:14px; margin-right:-20px; margin-left:-20px; padding-right:24px; padding-left:24px; }
 .exam-focus-state { display:none; }
 .exam-focus-layout { grid-template-columns:190px minmax(0,760px); gap:22px; }
 .exam-outline { padding:18px 14px; }
}
@media(max-width:820px) {
 .exam-mode #main { padding:0 14px 36px; }
 .exam-focus-head { grid-template-columns:auto minmax(0,1fr) auto; min-height:72px; gap:10px; margin:0 -14px 20px; padding:10px 14px; }
 .exam-leave { min-height:36px; padding:6px 9px; font-size:12px; }
 .exam-focus-brand .exam-brand-mark { width:34px; height:34px; }
 .exam-focus-brand small { font-size:9px; }
 .exam-focus-brand strong { max-width:190px; font-size:12px; }
 .exam-clock-box { min-width:0; padding-left:10px; }
 .exam-clock-box strong { font-size:12px; }
 .exam-focus-layout { grid-template-columns:minmax(0,1fr); gap:18px; }
 .exam-outline { position:static; padding:14px; }
 .exam-question-nav { grid-template-columns:repeat(10,minmax(0,1fr)); }
 .exam-outline-key,.exam-honesty-note { display:none; }
 .exam-paper-heading h1 { font-size:21px; }
 .exam-card { padding:18px; }
 .exam-prompt { font-size:15px; }
 .exam-submit-dock { align-items:stretch; flex-direction:column; }
 .exam-submit-actions { flex-wrap:wrap; }
 .exam-submit { flex:1; }
}
@media(prefers-reduced-motion:reduce) { .exam-loader { animation:none; } .exam-question-link { transition:none; } }
