:root{--brand:#1a73e8;--brand-soft:#eef5ff;--brand-border:#cfe0f7;--ink:#172033;--muted:#697386}

/* One shared, restrained cursor system for all six scenes. */
.demo-cursor{width:18px;height:22px;filter:drop-shadow(0 1px 1px rgba(25,34,48,.18));transition:transform var(--move,560ms) cubic-bezier(.22,.68,.22,1),opacity .18s;transform:translate3d(var(--cx,18px),var(--cy,18px),0);transform-origin:0 0}
.demo-cursor.is-arrow{background:no-repeat left top/18px 22px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='22' viewBox='0 0 18 22'%3E%3Cpath d='M2 1.5v16.2l4.5-4.1 3.1 6.1 3-1.55-3.05-5.95 6.25-.3z' fill='%23fff' stroke='%2318212f' stroke-width='1.35' stroke-linejoin='round'/%3E%3C/svg%3E")}
.demo-cursor.is-text{width:10px;height:24px;background:none;filter:drop-shadow(0 1px 1px rgba(25,34,48,.12))}
.demo-cursor.is-text:before{content:"";position:absolute;left:0;top:-10px;width:2px;height:20px;border-radius:1px;background:#172033}
.demo-cursor.is-text:after{content:"";position:absolute;left:-4px;top:-10px;width:10px;height:18px;border-top:2px solid #172033;border-bottom:2px solid #172033}
.demo-cursor.is-pressed{transform:translate3d(var(--cx),var(--cy),0) scale(.9)}
.demo-cursor.is-dragging:before{background:var(--brand)}

.button.primary,.chat-send,.progress-bar,.selection-toolbar,.copy-tool{background:var(--brand)}
.button.primary,.upload-button,.file-choice,.mode-selector,.mode-option,.tool-btn,.flash-card,.quiz-option{cursor:pointer}
.badge,.source-chip,.source-tag{color:var(--brand);background:var(--brand-soft)}
.title-icon,.upload-symbol,.pdf,.doc-mark{color:var(--brand);background:var(--brand-soft);border-color:var(--brand-border)}
.result-block,.mode-context,.guide-section{border-color:var(--brand-border)}
.result-block>b,.eyebrow,.mode-context .eyebrow,.flash-definition,.guide-content h4{color:var(--brand)}

/* Lecture: action causes transcript, selection, question and answer. */
.select-term{background:linear-gradient(#bcd8ff,#bcd8ff) no-repeat;background-size:0 100%;border-radius:2px;transition:background-size .72s linear}
body[data-scene="lecture"][data-phase="5"] .select-term,body[data-scene="lecture"][data-phase="6"] .select-term,body[data-scene="lecture"][data-phase="7"] .select-term,body[data-scene="lecture"][data-phase="8"] .select-term,body[data-scene="lecture"][data-phase="9"] .select-term{background-size:100% 100%}
body[data-scene="lecture"][data-phase="4"] .transcript-row,body[data-scene="lecture"][data-phase="5"] .transcript-row,body[data-scene="lecture"][data-phase="6"] .transcript-row,body[data-scene="lecture"][data-phase="7"] .transcript-row,body[data-scene="lecture"][data-phase="8"] .transcript-row,body[data-scene="lecture"][data-phase="9"] .transcript-row{opacity:1;visibility:visible;transform:none}
body[data-scene="lecture"][data-phase="6"] .selection-toolbar{display:flex}
body[data-scene="lecture"] .typing,body[data-scene="lecture"] .lecture-question,body[data-scene="lecture"] .lecture-answer{display:none;opacity:0}
body[data-scene="lecture"][data-phase="7"] .typing{display:flex;opacity:1}
body[data-scene="lecture"][data-phase="8"] .lecture-question,body[data-scene="lecture"][data-phase="9"] .lecture-question{display:block;opacity:1}
body[data-scene="lecture"][data-phase="9"] .lecture-answer{display:block;opacity:1}
.selection-toolbar{z-index:6}

/* Reading: stable file card and one brand-blue hierarchy. */
.file-row{display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:9px}
.file-meta{min-width:0}.file-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-status{display:flex;align-items:center;white-space:nowrap;gap:2px;color:var(--brand)}.progress-track{overflow:hidden}
.reading-result{gap:8px}.result-block{border-radius:9px;border-left:3px solid var(--brand);box-shadow:none}.reading-loading{color:var(--brand)}

/* Seminar and Essay share one bottom mode component and workspace geometry. */
.mode-workspace{display:grid;grid-template-columns:220px minmax(0,1fr);gap:10px;height:100%}
.source-panel{min-width:0}.source-list{padding:10px;display:grid;gap:8px}.source-file{min-width:0;display:grid;grid-template-columns:34px minmax(0,1fr);gap:8px;align-items:center;padding:9px;border:1px solid #e1e6ee;border-radius:9px;background:#fff}.source-file>span:last-child{min-width:0}.source-file b,.source-file small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.source-file small{margin-top:3px;color:var(--muted)}.doc-mark{width:30px;height:30px;border:1px solid var(--brand-border);border-radius:7px;display:grid;place-items:center;font-weight:800}
.mode-context{display:none;margin:0 10px;padding:10px;border:1px solid var(--brand-border);border-radius:9px;background:var(--brand-soft);line-height:1.42}.mode-context b{display:block;margin:5px 0 7px}.mode-chat-panel{display:flex;flex-direction:column;min-width:0}.mode-chat-scroll{flex:1;min-height:0;padding:10px 12px 8px;display:flex;flex-direction:column;gap:7px;overflow:hidden}.mode-chat-scroll .message{margin:0;max-width:94%;line-height:1.38}.mode-chat-scroll .message.user{align-self:flex-end}.staged{display:none!important;opacity:0;transform:translateY(4px)}
.mode-compose{position:relative;margin:0 12px 10px;height:44px;display:grid;grid-template-columns:132px minmax(0,1fr) 32px;gap:8px;align-items:center;padding:0 7px;border:1px solid #dfe5ed;border-radius:10px;background:#fff;box-shadow:0 3px 10px rgba(27,39,58,.05)}.mode-control{position:relative}.mode-selector{width:100%;height:30px;border:1px solid var(--brand-border);border-radius:8px;background:var(--brand-soft);color:var(--brand);font:700 11px/1.2 inherit;display:flex;align-items:center;justify-content:space-between;padding:0 9px}.mode-menu{display:none;position:absolute;left:0;bottom:36px;width:170px;padding:5px;border:1px solid #dce3ec;border-radius:10px;background:#fff;box-shadow:0 10px 24px rgba(23,32,51,.14);z-index:8}.mode-option{display:block;width:100%;height:32px;border:0;border-radius:7px;background:#fff;text-align:left;padding:0 9px;font:600 11px/1.2 inherit;color:#263248}.mode-option:hover,.mode-option.demo-hover{background:var(--brand-soft);color:var(--brand)}.mode-input{min-width:0;color:#9099a8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mode-compose .chat-send{position:static;width:28px;height:28px}
body[data-scene="seminar"][data-phase="1"] .mode-menu,body[data-scene="essay"][data-phase="1"] .mode-menu{display:block}
body[data-scene="seminar"][data-phase="2"] .seminar-context,body[data-scene="seminar"][data-phase="3"] .seminar-context,body[data-scene="seminar"][data-phase="4"] .seminar-context,body[data-scene="seminar"][data-phase="5"] .seminar-context,body[data-scene="seminar"][data-phase="6"] .seminar-context,body[data-scene="essay"][data-phase="2"] .essay-context,body[data-scene="essay"][data-phase="3"] .essay-context,body[data-scene="essay"][data-phase="4"] .essay-context,body[data-scene="essay"][data-phase="5"] .essay-context,body[data-scene="essay"][data-phase="6"] .essay-context{display:block}
body[data-scene="seminar"][data-phase="3"] .seminar-idea,body[data-scene="seminar"][data-phase="4"] .seminar-idea,body[data-scene="seminar"][data-phase="5"] .seminar-idea,body[data-scene="seminar"][data-phase="6"] .seminar-idea{display:block!important;opacity:1;transform:none}
body[data-scene="seminar"][data-phase="4"] .seminar-evidence,body[data-scene="seminar"][data-phase="5"] .seminar-evidence,body[data-scene="seminar"][data-phase="6"] .seminar-evidence{display:block!important;opacity:1;transform:none}
body[data-scene="seminar"][data-phase="5"] .seminar-follow,body[data-scene="seminar"][data-phase="6"] .seminar-follow{display:block!important;opacity:1;transform:none}
body[data-scene="seminar"][data-phase="6"] .seminar-response{display:block!important;opacity:1;transform:none}
body[data-scene="essay"][data-phase="3"] .essay-thesis,body[data-scene="essay"][data-phase="4"] .essay-thesis,body[data-scene="essay"][data-phase="5"] .essay-thesis,body[data-scene="essay"][data-phase="6"] .essay-thesis{display:block!important;opacity:1;transform:none}
body[data-scene="essay"][data-phase="4"] .essay-argument,body[data-scene="essay"][data-phase="5"] .essay-argument,body[data-scene="essay"][data-phase="6"] .essay-argument{display:block!important;opacity:1;transform:none}
body[data-scene="essay"][data-phase="5"] .essay-outline,body[data-scene="essay"][data-phase="6"] .essay-outline{display:block!important;opacity:1;transform:none}
body[data-scene="essay"][data-phase="6"] .essay-source{display:block!important;opacity:1;transform:none}

/* Notes: two contiguous drag selections, nearby copy tool, then paste. */
.selection{background:linear-gradient(#bcd8ff,#bcd8ff) no-repeat;background-size:0 100%;transition:background-size .72s linear;border-radius:2px}
body[data-scene="notes"][data-phase="1"] .select-a,body[data-scene="notes"][data-phase="2"] .select-a,body[data-scene="notes"][data-phase="3"] .select-a,body[data-scene="notes"][data-phase="4"] .select-a,body[data-scene="notes"][data-phase="5"] .select-a,body[data-scene="notes"][data-phase="6"] .select-a{background-size:100% 100%}
body[data-scene="notes"][data-phase="2"] .select-b,body[data-scene="notes"][data-phase="3"] .select-b,body[data-scene="notes"][data-phase="4"] .select-b,body[data-scene="notes"][data-phase="5"] .select-b,body[data-scene="notes"][data-phase="6"] .select-b{background-size:100% 100%}
body[data-scene="notes"][data-phase="6"] .paste-hint,body[data-scene="notes"][data-phase="6"] .paste-loading{display:none}body[data-scene="notes"][data-phase="6"] .structured-note{display:block}

.tool-icon img{width:17px;height:17px;display:block}.tool-btn.active,.tool-btn.demo-hover{border-color:var(--brand);background:var(--brand-soft)}.quiz-option.correct.demo-hover{border-color:var(--brand);background:var(--brand-soft)}
.upload-symbol svg{width:19px;height:19px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.mode-input{cursor:text}.editor-caret-line{height:74px;margin-top:12px;border:1px solid #e4e9f0;border-radius:8px;background:#fff;position:relative}.editor-caret-line i{position:absolute;left:12px;top:11px;width:1.5px;height:17px;background:var(--brand);animation:caret-blink .9s steps(1,end) infinite}body[data-scene="notes"][data-phase="5"] .editor-caret-line,body[data-scene="notes"][data-phase="6"] .editor-caret-line{display:none}@keyframes caret-blink{0%,48%{opacity:1}49%,100%{opacity:.18}}

@media(prefers-reduced-motion:reduce){.demo-cursor,.selection,.select-term{transition-duration:.01ms!important}.flash-inner{transition-duration:.01ms!important}.editor-caret-line i{animation:none}}
