/* Student workspace. Administrative surfaces retain their existing styles. */
.microscope-brand {
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  object-fit: contain;
}
body:has(.app-shell.is-student) {
  background: #eceff2;
}
.app-shell.is-student {
  --blue: #246ce5;
  --blue-soft: #edf3fd;
  --muted: #626b77;
  --line: #dce1e7;
  --student-green: #247658;
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-size: 13px;
  letter-spacing: 0;
}
.app-shell.is-student * { min-width: 0; letter-spacing: 0; }
.app-shell.is-student .topbar {
  flex: none;
  position: static;
  background: rgba(255,255,255,.68);
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
  border-bottom: 1px solid rgba(255,255,255,.8);
}
.app-shell.is-student .topbar-inner { width: 100%; min-height: 64px; padding: 0 28px; }
.app-shell.is-student .brand-title { font-size: 15px; font-weight: 650; }
.app-shell.is-student .brand-subtitle { font-size: 11px; color: var(--muted); }
.app-shell.is-student .brand-mark { width: 32px; height: 32px; border-radius: 8px; }
.app-shell.is-student .main { width: 100%; max-width: none; margin: 0; padding: 20px 24px 24px; flex: 1; min-height: 0; display: flex; }
.student-desk {
  width: min(1440px, 100%); margin: 0 auto; min-height: 0;
  display: grid; grid-template-columns: 252px minmax(0,1fr);
  border: 1px solid rgba(255,255,255,.96); border-radius: 8px; overflow: hidden;
  box-shadow: 0 12px 40px #28364a0d, 0 2px 8px #28364a06;
}
.training-sidebar {
  background: rgba(248,250,252,.78);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--line); padding: 28px 24px 0;
  display: flex; flex-direction: column; overflow: auto;
}
.section-kicker { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.sidebar-heading h1 { font-size: 22px; font-weight: 650; margin: 8px 0 10px; }
.sidebar-heading p { font-size: 12px; line-height: 1.7; color: var(--muted); margin: 0; }
.overall-progress { margin: 20px 0 22px; }
.overall-progress > div { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.overall-progress strong { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.overall-progress small { font-size: 13px; color: var(--muted); font-weight: 400; }
.overall-progress span { font-size: 11px; color: var(--muted); }
.overall-progress progress { width: 100%; height: 4px; border: 0; border-radius: 3px; overflow: hidden; background: #e2e7ed; accent-color: var(--blue); }
.overall-progress progress::-webkit-progress-bar { background: #e2e7ed; }
.overall-progress progress::-webkit-progress-value { background: var(--blue); border-radius: 3px; }
.training-steps { list-style: none; margin: 0; padding: 0; }
.training-steps li { display: flex; position: relative; gap: 12px; padding: 0 0 27px; }
.training-steps li:not(:last-child)::after { content: ""; position: absolute; width: 1px; background: var(--line); top: 30px; bottom: 5px; left: 13px; }
.step-number { width: 27px; height: 27px; flex: none; display: grid; place-items: center; font-size: 11px; border-radius: 50%; border: 1px solid var(--line); color: var(--muted); background: #f8fafb; }
.training-steps strong { display: block; font-weight: 600; font-size: 13px; line-height: 1.5; }
.training-steps small { display: block; font-size: 11px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.training-steps .complete .step-number { background: #e5f2ec; color: var(--student-green); border-color: #d1e8dc; }
.training-steps .current .step-number { background: var(--blue); color: #fff; border-color: var(--blue); box-shadow: 0 0 0 4px #246ce50b; }
.training-steps .current strong { color: var(--blue); }
.training-appointment { margin-top: auto; border-top: 1px solid var(--line); padding: 20px 0; }
.training-appointment strong { display: block; font-weight: 600; margin-top: 9px; font-size: 12px; }
.training-appointment p { margin: 7px 0 0; line-height: 1.65; font-size: 11px; color: var(--muted); }
.appointment-status { font-size: 11px; color: var(--blue); margin: 9px 0 20px; }
.learner-identity { border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; padding: 16px 0; }
.learner-avatar { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: #e4e9ef; font-size: 11px; color: #475467; }
.learner-identity strong { display: block; font-size: 12px; }
.learner-identity small { display: block; margin-top: 3px; font-size: 10px; color: var(--muted); }
.text-action { background: transparent; color: var(--muted); cursor: pointer; padding: 10px 0 10px 8px; margin-left: auto; font-size: 11px; }
.learning-workspace { display: flex; flex-direction: column; min-height: 0; background: #fff; }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 32px 22px; flex: none; }
.workspace-heading h2 { font-size: 20px; font-weight: 650; line-height: 1.5; margin: 6px 0 0; overflow-wrap: anywhere; }
.workspace-batch { font-size: 11px; color: var(--muted); white-space: nowrap; }
.workspace-tabs { display: flex; gap: 28px; padding: 0 32px; flex: none; border-bottom: 1px solid #e9edf1; }
.workspace-tabs button { background: transparent; color: var(--muted); min-height: 44px; padding: 8px 0 12px; position: relative; font-size: 12px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.workspace-tabs button[aria-current="page"] { color: var(--blue); font-weight: 600; }
.workspace-tabs button[aria-current="page"]::after { position: absolute; content: ""; height: 2px; background: var(--blue); bottom: -1px; left: 0; right: 0; border-radius: 2px; }
.workspace-tabs button:disabled { color: #79818c; cursor: not-allowed; }
.tab-lock { font-size: 9px; padding: 2px 4px; background: #f0f2f5; border-radius: 3px; }
.workspace-scroll { padding: 24px 32px; overflow: auto; overscroll-behavior: contain; min-height: 0; flex: 1; scrollbar-width: thin; scrollbar-color: #c9cfd7 transparent; }
.content-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.content-caption h3 { font-size: 16px; font-weight: 600; margin: 6px 0 0; line-height: 1.5; overflow-wrap: anywhere; }
.app-shell.is-student .pill { font-size: 10px; padding: 5px 9px; white-space: nowrap; font-weight: 500; }
.app-shell.is-student .pill.green { color: var(--student-green); background: #eaf5ef; }
.app-shell.is-student .pill.amber { color: #855d18; background: #faf2e3; }
.media-stage { width: 100%; height: clamp(160px, 37vh, 480px); background: #16191d; border-radius: 6px; overflow: hidden; }
.media-stage video { display: block; width: 100%; height: 100%; object-fit: contain; background: #16191d; }
.media-empty { display: flex; flex-direction: column; justify-content: center; align-items: center; color: #e7eaef; height: 100%; padding: 24px; text-align: center; }
.media-empty-symbol { font-size: 32px; margin-bottom: 14px; }
.media-empty strong { font-size: 14px; font-weight: 500; }
.media-empty p { color: #afb7c3; font-size: 12px; line-height: 1.6; }
.video-description { margin: 14px 0 18px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.lesson-list { border-top: 1px solid var(--line); }
.lesson-row { width: 100%; padding: 12px; min-height: 48px; display: flex; align-items: center; gap: 14px; background: #fff; border-bottom: 1px solid #ecf0f4; text-align: left; cursor: pointer; border-radius: 0; color: var(--ink); }
.lesson-row.selected { background: #f1f6fe; color: var(--blue); }
.lesson-number { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.lesson-title { flex: 1; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.lesson-row small, .lesson-state { font-size: 10px; white-space: nowrap; }
.lesson-row small { color: var(--muted); }
.workspace-footer { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 32px; border-top: 1px solid #e9edf1; background: #fafbfd; }
.workspace-footer > span { color: var(--muted); font-size: 11px; line-height: 1.5; }
.app-shell.is-student .btn { min-height: 38px; border-radius: 6px; font-size: 12px; padding: 9px 16px; box-shadow: 0 1px 2px #16223306; white-space: normal; }
.app-shell.is-student .btn.primary { background: var(--blue); color: white; border-color: transparent; box-shadow: 0 2px 4px #246ce51a, inset 0 1px 0 #ffffff20; }
.app-shell.is-student .btn:disabled { background: #ecf0f5; color: #6f7986; border-color: #e5e9ef; box-shadow: none; opacity: 1; cursor: not-allowed; }
.app-shell.is-student button { transition: background-color .16s, box-shadow .16s; }
.app-shell.is-student button:not(:disabled):hover { filter: brightness(.97); }
.app-shell.is-student :focus-visible { outline: 3px solid #246ce560; outline-offset: 3px; }
.notice-content .usage-notice-body { border: none; background: none; padding: 0; font-size: 13px; line-height: 1.9; max-width: 860px; }
.notice-content .usage-notice-body p { margin: 12px 0; }
.notice-content .notice-version { font-size: 11px; color: var(--muted); margin: -4px 0 24px; }
.workspace-exam { min-height: 0; display: flex; flex-direction: column; flex: 1; }
.exam-counter { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); }
.exam-meta { color: var(--muted); font-size: 12px; margin-bottom: 20px; }
.question-pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.question-pagination button { width: 36px; height: 36px; background: #f1f3f6; color: var(--muted); border-radius: 6px; cursor: pointer; font-size: 12px; }
.question-pagination button.answered { color: var(--student-green); background: #eaf5ef; }
.question-pagination button[aria-current="step"] { background: var(--blue); color: white; }
.workspace-exam .question { border: 0; padding: 0; background: none; }
.workspace-exam .question-title { font-size: 16px; line-height: 1.8; font-weight: 550; margin: 0 0 20px; }
.workspace-exam .question-title span { font-size: 11px; font-weight: 400; }
.workspace-exam .option-list { gap: 12px; }
.workspace-exam .option { border: 1px solid #e1e6ed; border-radius: 6px; padding: 15px 16px; min-height: 50px; background: #fff; cursor: pointer; font-size: 13px; }
.workspace-exam .option:has(input:checked) { background: #f0f5ff; border-color: #8db4f4; }
.workspace-exam input { accent-color: var(--blue); }
.exam-feedback { color: #ad372e; font-size: 12px; }
.result-content { padding-top: 36px; }
.result-mark { width: 48px; height: 48px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-size: 24px; margin-bottom: 20px; }
.result-mark.passed { color: var(--student-green); background: #eaf5ef; }
.result-content h3 { font-size: 22px; margin: 8px 0 12px; font-weight: 600; }
.result-content > p, .permission-summary p { font-size: 12px; line-height: 1.9; color: var(--muted); }
.result-details { margin: 28px 0; border-top: 1px solid var(--line); }
.result-details > div { display: flex; gap: 24px; padding: 14px 0; border-bottom: 1px solid #edf0f3; font-size: 12px; }
.result-details dt { color: var(--muted); width: 84px; flex: none; }
.result-details dd { margin: 0; overflow-wrap: anywhere; }
.permission-summary h4 { font-size: 13px; font-weight: 600; margin: 0; }
.app-shell.is-student .student-gate { width: min(820px,100%); margin: auto; overflow: auto; max-height: 100%; padding: 12px; }
.app-shell.is-student .gate-card { padding: 32px; background: rgba(255,255,255,.88); backdrop-filter: blur(20px); border-radius: 8px; border: 1px solid white; box-shadow: 0 12px 40px #28364a0d; }
.app-shell.is-student .gate-copy h1 { font-size: 22px; line-height: 1.6; }
.app-shell.is-student .gate-copy p { font-size: 12px; }
.app-shell.is-student .gate-mini-flow { display: none; }
.app-shell.is-student .field input, .app-shell.is-student .lookup-form input { min-height: 42px; border-radius: 6px; }
.app-shell.is-student .continue-card { border-radius: 0; background: transparent; border: 0; border-top: 1px solid var(--line); padding: 22px 0 0; }
.app-shell.is-student .toast { bottom: 104px; right: 40px; max-width: min(360px, calc(100% - 32px)); font-size: 12px; border-radius: 8px; pointer-events: none; }
@media (max-height: 740px) and (min-width: 761px) {
  .training-sidebar { padding-top: 20px; }
  .overall-progress { margin: 12px 0 18px; }
  .training-steps li { padding-bottom: 18px; }
  .training-appointment { padding: 12px 0; }
  .appointment-status { margin-bottom: 12px; }
  .workspace-heading { padding-top: 20px; padding-bottom: 16px; }
}
@media (max-width: 1024px) {
  .student-desk { grid-template-columns: 224px minmax(0,1fr); }
  .training-sidebar { padding-left: 18px; padding-right: 18px; }
  .workspace-heading, .workspace-scroll { padding-left: 24px; padding-right: 24px; }
  .workspace-tabs { padding: 0 24px; gap: 18px; }
  .workspace-footer { padding: 14px 24px; }
}
@media (max-width: 760px) {
  .app-shell.is-student .main { padding: 8px; }
  .app-shell.is-student .topbar-inner { min-height: 52px; padding: 0 16px; }
  .app-shell.is-student .brand-subtitle { display: none; }
  .student-desk { grid-template-columns: 1fr; grid-template-rows: auto minmax(0,1fr); }
  .training-sidebar { display: grid; grid-template-columns: 1fr auto; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; gap: 8px 12px; }
  .sidebar-heading, .overall-progress, .training-appointment .section-kicker, .training-appointment .appointment-status { display: none; }
  .learner-identity { grid-column: 2; grid-row: 2; border: 0; padding: 0; }
  .learner-identity > div, .learner-avatar { display: none; }
  .text-action { padding: 0 6px; min-height: 44px; margin: -8px 0; }
  .training-steps { display: flex; grid-column: 1 / -1; justify-content: space-between; gap: 8px; }
  .training-steps li { padding: 0; gap: 6px; align-items: center; }
  .training-steps li::after, .training-steps small { display: none; }
  .training-steps strong { font-size: 10px; white-space: nowrap; }
  .step-number { width: 21px; height: 21px; font-size: 10px; }
  .training-appointment { grid-column: 1; border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; }
  .training-appointment strong, .training-appointment p { font-size: 10px; margin: 0; line-height: 1.5; }
  .training-appointment p:last-child { display: none; }
  .workspace-heading { padding: 16px 16px 10px; }
  .workspace-heading h2 { font-size: 16px; }
  .workspace-heading .section-kicker { display: none; }
  .workspace-batch { font-size: 9px; }
  .workspace-tabs { gap: 0; justify-content: space-between; padding: 0 16px; }
  .workspace-tabs button { font-size: 11px; gap: 3px; }
  .tab-lock { font-size: 8px; padding: 2px; }
  .workspace-scroll { padding: 20px 16px; }
  .content-caption h3 { font-size: 14px; }
  .media-stage { height: auto; aspect-ratio: 16 / 10; min-height: 160px; }
  .lesson-row { padding: 10px 6px; gap: 8px; }
  .lesson-row small { display: none; }
  .workspace-footer { padding: 12px 16px; }
  .workspace-footer > span { max-width: 50%; font-size: 10px; }
  .app-shell.is-student .btn { min-height: 44px; padding: 10px 14px; }
  .workspace-exam .question-title { font-size: 14px; }
  .question-pagination button { width: 44px; height: 44px; }
  .app-shell.is-student .student-gate { padding: 0; }
  .app-shell.is-student .gate-card { padding: 24px 18px; }
  .app-shell.is-student .gate-copy h1 { font-size: 18px; }
  .app-shell.is-student .form-row.two { grid-template-columns: 1fr; }
  .app-shell.is-student .lookup-form { display: flex; flex-wrap: wrap; }
  .app-shell.is-student .lookup-form input { width: 100%; }
  .app-shell.is-student .toast { bottom: 88px; right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .app-shell.is-student * { transition: none !important; animation: none !important; }
}
