/* Student-facing refinement of the existing shared workspace. */
:root { --muted: #76695e; --shadow: 0 14px 38px rgba(50,36,25,.08); }
button, input, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, [role="slider"]:focus-visible, [role="separator"]:focus-visible {
  outline: 2px solid var(--accent-dark); outline-offset: 3px;
}
textarea { font-family: inherit; }
.page { width: calc(100vw - 32px); padding: 16px 0 12px; row-gap: 12px; }
.topbar { gap: 30px; }
.topbar .brand-wordmark { height: 48px; }
.lesson-meta { min-width: 0; overflow-wrap: anywhere; }
.lesson-meta strong { font-size: 15px; line-height: 1.35; font-weight: 650; }
.lesson-meta span { font-size: 12px; }
.lesson-meta .lesson-title { margin-top: 4px; color: #5c493a; font-size: 13px; line-height: 1.45; font-weight: 500; }
.lesson-meta .instructor-credit { font-size: 12px; }
.workspace-header .account-bar { margin-top: 11px; font-size: 11px; gap: 10px 18px; flex-wrap: wrap; }
.account-save { display: inline-flex; align-items: center; gap: 7px; line-height: 1.45; }
.workspace-header .account-save { min-width: 0; max-width: none; }
.saved-dot { width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: #8b9b78; }
.account-actions { gap: 10px; min-width: 0; max-width: 100%; margin-left: auto; justify-content: flex-end; flex-wrap: wrap; }
.account-notes { display: inline-flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; }
.account-name { min-width: 0; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #4b382a; font-size: 12px; line-height: 1.4; font-weight: 600; }
.account-notes .review-notes-link { flex-shrink: 0; white-space: nowrap; }
.signout-button { min-height: 30px; background: rgba(255,253,249,.72); padding: 5px 11px; }
.shell, .shell.paused, .shell.resuming { border-radius: 20px; border-color: #ded5ca; }
.course-sidebar { box-shadow: 0 8px 25px rgba(50,36,25,.04); border-color: #ded5ca; }
.student-initials { background: #e9ded0; color: #74553d; font-weight: 650; }
.course-summary { background: #f2ece3; border-color: #e4d9cb; }
.course-summary strong { font-size: 13px; line-height: 1.45; }
.module-toggle { text-transform: none; letter-spacing: 0; font-size: 11.5px; line-height: 1.4; padding: 10px 8px; }
.module-chevron { flex-shrink: 0; }
.lecture-copy strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; font-size: 12px; line-height: 1.45; }
.lecture-copy small { font-size: 10px; }
.course-tree { scrollbar-width: thin; scrollbar-color: #cdbfae transparent; }
.panel-toolbar { padding: 13px 14px; background: #faf7f1; }
.panel-tabs { display: flex; width: 100%; padding: 3px; gap: 3px; background: #f0e8de; border-color: #e2d7c9; }
.panel-tab { flex: 1; min-height: 36px; font-size: 12px; font-weight: 600; }
.panel-tab.active { background: #fffdf9; box-shadow: 0 2px 6px rgba(50,36,25,.06); }
.history-bar { min-height: 33px; padding: 8px 16px; color: #847669; font-size: 10.5px; }
.history-more, .retry-question-button { min-height: 29px; font-size: 11px; }
.conversation-scroll { padding: 16px 16px 14px; scrollbar-gutter: stable; }
.ask-empty { display: flex; flex-direction: column; align-items: flex-start; padding: 16px 2px 22px; max-width: 360px; margin: 0 auto; }
.empty-symbol { width: 42px; height: 42px; display: grid; place-items: center; color: #896a50; background: #f0e6d8; border: 1px solid #e6d6c3; border-radius: 13px; }
.empty-symbol svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.ask-empty h3 { margin: 18px 0 8px; color: #49362a; font-size: 21px; font-weight: 600; letter-spacing: -.035em; }
.ask-empty > p { margin: 0; color: #7b6b5e; font-size: 12.5px; line-height: 1.8; max-width: 30ch; }
.question-starters { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 26px; }
.starter-label { margin-bottom: 3px; font-size: 10px; letter-spacing: .09em; color: #91806f; text-transform: uppercase; }
.question-starter { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; border: 1px solid #e3d9cd; border-radius: 10px; background: #fffdf8; padding: 11px 10px; color: #6e5643; font-size: 11.75px; line-height: 1.45; text-align: left; transition: border-color 150ms ease, background 150ms ease; }
.question-starter span { color: #a58b73; font-size: 15px; flex-shrink: 0; }
.question-starter:hover { border-color: #c3ab94; background: #f8f1e6; }
.composer-context { display: flex; justify-content: space-between; align-items: center; flex: 0 0 auto; gap: 8px; min-height: 31px; padding: 8px 15px 0; border-top: 1px solid var(--line); background: #fffdf9; }
.question-context { color: #816043; font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; }
.composer-label { color: #948271; font-size: 10px; }
.ask-form { align-items: end; gap: 8px; padding: 8px 14px; border-top: 0; background: #fffdf9; }
.question-input { min-height: 64px; max-height: 132px; resize: none; overflow-y: auto; padding: 10px 11px; border-radius: 10px; background: #fffefa; color: #24211d; font-size: 15.6px; line-height: 1.55; }
.question-input::placeholder, .note-input::placeholder { color: #756657; }
.question-input:focus, .note-input:focus { border-color: #a58b73; background: #fff; box-shadow: 0 0 0 3px rgba(138,107,82,.1); }
.ask-button { min-width: 54px; min-height: 42px; padding: 0 12px; align-self: end; background: #896a50; border-radius: 10px; font-weight: 600; font-size: 12px; }
.ask-button:hover { background: #73513a; }
.panel-foot { min-height: 25px; padding: 0 15px 11px; background: #fffdf9; }
.question-hint { color: #9b8979; font-size: 9.5px; line-height: 1.45; }
.request-notice { font-size: 11.5px; line-height: 1.6; padding: 7px 14px; margin: 0; background: #f5eadb; color: #856443; }
.answer-copy { color: #24211d; font-size: 16.2px; line-height: 1.78; white-space: normal; overflow-wrap: anywhere; }
.answer-copy.is-streaming { white-space: pre-wrap; }
.answer-copy p { margin: 0 0 .8em; }
.answer-copy > :first-child { margin-top: 0; }
.answer-copy > :last-child { margin-bottom: 0; }
.answer-copy h4 { margin: 1.2em 0 .4em; font-size: 1em; font-weight: 650; }
.answer-copy ol, .answer-copy ul { padding-left: 1.6em; margin: .7em 0; }
.answer-copy li { padding-left: .12em; margin: .38em 0; }
.answer-copy code { border-radius: 4px; background: #eee5d9; padding: 1px 4px; font-family: ui-monospace, monospace; font-size: .87em; }
.answer-copy pre { padding: 12px; border: 1px solid var(--line); background: #f3ede3; border-radius: 9px; overflow-x: auto; }
.answer-copy pre code { padding: 0; background: transparent; white-space: pre; }
.answer-copy .katex { font-size: 1.06em; }
.display-math { display: block; max-width: 100%; }
.answer-copy .katex-display { margin: .8em 0; max-width: 100%; overflow-x: auto; overflow-y: hidden; padding: 4px 2px 8px; text-align: left; }
.answer-copy .katex-display > .katex { text-align: left; }
.answer-equation { max-width: 100%; overflow: hidden; }
.answer-question { color: #24211d; font-size: 15.6px; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-wrap; }
.answer-actions { align-items: center; gap: 9px; }
.sources-toggle, .save-note-button { min-height: 30px; font-size: 10.75px; }
.source-details { padding: 9px; }
button.source { border: 1px solid #d9c4a9; cursor: pointer; min-height: 30px; text-align: left; line-height: 1.5; }
button.source:hover { background: #e8d9c4; border-color: #bda280; }
.exchange-status { font-size: 11px; line-height: 1.6; }
.notes-empty { display: flex; flex-direction: column; justify-content: center; gap: 11px; min-height: 215px; padding: 25px 18px; border-style: solid; border-color: #e4d7c5; background: #fcf8f0; }
.notes-empty strong { color: #73563f; font-size: 16px; font-weight: 600; line-height: 1.4; }
.notes-empty span { color: #8a7766; font-size: 12px; line-height: 1.75; }
.note-text { font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; }
.note-time { min-height: 28px; }
.note-delete { width: 30px; height: 30px; }
.note-input { background: #fffefa; border-radius: 10px; }
.notes-foot { font-size: 10px; line-height: 1.7; color: #8c7968; }
#notesSaveStatus { margin: 4px 0 7px; font-size: 11px; color: #665841; }
#notesSaveStatus.is-error { color: #964331; }
.caption-overlay { font-weight: 450; }
.controls .progress:focus-visible { outline-color: #fff2da; }
.controls .icon-button:focus-visible { outline-color: #fff2da; }
.pause-screen { background: transparent; }
.pause-screen .pause-icon { display: none; }
.media-start { background: rgba(63,47,35,.87); border: 1px solid rgba(255,241,220,.36); font-weight: 550; backdrop-filter: blur(12px); }
.media-start:hover { background: rgba(92,65,43,.95); }
.login-page { background: radial-gradient(ellipse at 20% 0%, #eae0d2 0, transparent 43%), radial-gradient(ellipse at 92% 90%, #ece2d6 0, transparent 38%), #f5f1e9; padding: 38px 20px; }
.login-layout { width: min(460px, 100%); }
.login-brand { margin-bottom: 30px; gap: 12px; }
.login-brand .brand-wordmark { height: 64px; max-width: 100%; }
.login-card { padding: 34px 34px 28px; border-radius: 22px; background: rgba(255,253,248,.9); border: 1px solid #dfd1bf; box-shadow: 0 24px 55px rgba(74,51,29,.075); }
.login-eyebrow { color: #a38261; letter-spacing: .13em; font-size: 10px; font-weight: 600; }
.login-card h1 { font-size: 29px; font-weight: 600; letter-spacing: -.035em; color: #443125; margin: 0 0 13px; }
.login-intro { font-size: 13.5px; line-height: 1.8; color: #8a715a; margin-bottom: 25px; }
.login-card label { font-size: 14px; font-weight: 600; color: #6e503b; margin-top: 18px; }
.login-card input { min-height: 47px; font-size: 14px; border-color: #ddd0c0; border-radius: 10px; }
.login-card input::placeholder { color: #b3a390; }
.login-card input:focus { outline: none; border-color: #a98969; box-shadow: 0 0 0 3px rgba(151,116,80,.11); }
.password-field { position: relative; }
.password-field input { padding-right: 62px; }
.password-toggle { position: absolute; top: 6px; right: 6px; height: 35px; border: 0; border-radius: 6px; padding: 0 9px; background: transparent; color: #8a7057; font-size: 11px; }
.password-toggle:hover { background: #f0e7da; }
.login-button { min-height: 47px; margin-top: 25px; border-radius: 10px; font-size: 13px; background: #866449; }
.login-button:hover { background: #74543b; }
.login-notice { margin-top: 26px; padding-top: 20px; border-color: #e4d8c9; font-size: 10.5px; line-height: 1.8; }
.login-notice strong { color: #795d47; font-size: 11px; font-weight: 550; }
.login-footer { margin-top: 24px; font-size: 10px; line-height: 1.9; color: #9a816b; }
@media (min-width: 841px) and (max-width: 1180px) {
  .page { width: calc(100vw - 20px); padding: 12px 0 10px; }
  .workspace { --course-nav-width: 224px; }
  .lesson-meta strong { font-size: 13.5px; }
  .lesson-meta .lesson-title { font-size: 12px; }
  .topbar .brand-wordmark { height: 44px; }
}
@media (max-width: 840px) {
  .page { width: calc(100% - 20px); padding: 14px 0 20px; }
  .topbar { align-items: center; gap: 16px; padding: 0 3px; }
  .topbar .brand { flex-direction: row; gap: 0; flex-shrink: 0; }
  .topbar .brand-wordmark { height: 40px; }
  .lesson-meta strong { font-size: 12px; line-height: 1.45; }
  .lesson-meta { display: block; flex: 1; }
  .lesson-meta span, .lesson-meta .instructor-credit { font-size: 10px; }
  .lesson-meta .lesson-title { font-size: 11px; }
  .instructor-row { gap: 6px; }
  .instructor-avatar { width: 25px !important; height: 25px !important; min-width: 25px !important; max-width: 25px !important; min-height: 25px !important; max-height: 25px !important; flex-basis: 25px !important; }
  .workspace-header .account-bar { margin: 10px 3px; font-size: 9.5px; align-items: center; }
  .account-bar > span { max-width: 61%; }
  .signout-button { padding: 5px 9px; }
  .test-mode-notice { line-height: 1.55; font-size: 11px; }
  .workspace-header .test-mode-notice { margin: 10px 0; }
  .shell, .shell.paused, .shell.resuming { border-radius: 16px; grid-template-rows: auto 540px; }
  .below-video { height: 540px; }
  .panel-toolbar { padding: 10px 12px; }
  .panel-tab { min-height: 34px; }
  .ask-empty { padding-top: 5px; max-width: 450px; }
  .ask-empty h3 { margin-top: 13px; font-size: 20px; }
  .ask-empty > p { max-width: 45ch; }
  .question-starters { margin-top: 18px; gap: 6px; }
  .question-starter { padding: 9px 11px; font-size: 12px; }
  .question-hint { font-size: 9px; }
  .notes-empty { min-height: 175px; }
  .login-page { padding: 28px 18px; }
  .login-card { padding: 28px 25px; }
  .login-card h1 { font-size: 26px; }
}
@media (max-width: 480px) {
  .controls { padding-left: 12px; padding-right: 12px; padding-bottom: 11px; }
  .control-row { gap: 8px; }
  .volume-control { min-width: 0; gap: 0; }
  .volume-slider { display: none; }
  .controls .icon-button { width: 32px; height: 32px; flex: 0 0 32px; }
  .time { white-space: nowrap; font-size: 10px; }
}

/* Approved shared sand navigation; the v0.1.2 course card is retained. */
.workspace { --course-nav-width: 284px; }
.course-sidebar { background: #faf6ef; border-color: #d4c2ac; }
.course-summary {
  margin: 12px 11px 11px;
  padding: 14px 13px;
  border: 1px solid #bda58b;
  border-left: 4px solid #8a674b;
  border-radius: 12px;
  background: #ebdfd0;
  box-shadow: 0 2px 7px rgba(81, 58, 36, .05);
  overflow-wrap: anywhere;
}
.course-summary .course-eyebrow { color: #80624b; font-size: 9px; }
.course-summary strong { color: #503a29; font-size: 14px; line-height: 1.5; }
.course-summary > span:last-of-type { color: #765f4c; font-size: 11px; }
.course-tree { padding: 2px 10px 14px; }
.course-module {
  min-width: 0;
  border: 1px solid #cfbea9;
  border-radius: 12px;
  background: #f9f5ee;
  box-shadow: none;
}
.course-module + .course-module { margin-top: 11px; }
.module-toggle {
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  padding: 11px 12px;
  border-radius: 11px;
  background: #e6d8c6;
  color: #503a29;
  font-size: 11.5px;
  line-height: 1.5;
  font-weight: 650;
}
.module-toggle .module-title { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.module-label { display: block; color: #6f5844; font-size: 11px; font-weight: 500; line-height: 1.3; }
.module-name { display: block; margin-top: 3px; color: #503a29; font-size: 12.5px; font-weight: 650; line-height: 1.45; }
.module-toggle:hover { background: #ddccb6; }
.course-module.open > .module-toggle {
  border-bottom: 1px solid #cfbea9;
  border-radius: 11px 11px 0 0;
  background: #e6d8c6;
}
.course-module.open > .module-toggle:hover { background: #ddccb6; }
.module-lessons { gap: 8px; margin: 0; padding: 9px; }
.lecture-item {
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 9px;
  min-height: 58px;
  padding: 10px 9px;
  border: 1px solid #e2d6c6;
  border-radius: 9px;
  background: #fffdf9;
  box-shadow: none;
}
.lecture-item:hover { border-color: #bba082; background: #f7f1e8; }
.lecture-index { width: 24px; height: 26px; border-color: transparent; background: transparent; color: #725b47; font-size: 11px; font-weight: 600; }
.lecture-copy strong {
  display: block;
  -webkit-line-clamp: unset;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 12.25px;
  font-weight: 500;
  line-height: 1.5;
  color: #44382d;
}
.lecture-copy small { margin-top: 4px; color: #6f5844; font-size: 11px; white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
.lecture-item.active {
  border-color: #bba082;
  background: #f4eee5;
  box-shadow: inset 3px 0 0 #8a674b;
}
.lecture-item.active:hover { border-color: #bba082; background: #ede2d4; }
.lecture-item.active .lecture-copy strong { color: #37291f; font-weight: 650; }
.lecture-item.active .lecture-copy small { color: #6f5844; }
.lecture-item.active .lecture-index { border-color: #8a674b; background: #8a674b; color: #fff; }
.lecture-item.pending {
  border-style: dashed;
  border-color: #d8cbb9;
  background: #f8f3eb;
  color: #827160;
  box-shadow: none;
}
.lecture-item.pending:hover { border-color: #c9b79f; background: #f3ece0; }
.lecture-item.pending .lecture-copy strong { color: #7c6c5d; font-weight: 500; }
.lecture-item.pending .lecture-copy small { color: #8a7968; }
.lecture-item.pending .lecture-index { border-color: #d5c8b5; background: #f4eee5; color: #897969; }
.login-card form > label:first-child { margin-top: 0; }
.login-notice { color: #7c6754; font-size: 11px; line-height: 1.85; }
.login-notice p { margin: 0; }
@media (min-width: 841px) and (max-width: 1180px) {
  .workspace { --course-nav-width: 250px; }
  .course-tree { padding-right: 8px; padding-left: 8px; }
  .module-lessons { padding: 7px; }
}
@media (max-width: 840px) {
  .course-sidebar,
  .workspace.sidebar-collapsed .course-sidebar { width: min(90vw, 348px); }
  .course-summary strong { font-size: 14px; }
  .module-toggle { min-height: 46px; font-size: 12px; }
  .lecture-copy strong { font-size: 12.25px; }
  .question-input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
