/* ============================================================
   Courseware Studio — LMS-Embedded AI Learning Assistant Widget Styling
   ----------------------------------------------------------------
   Brand palette (matches coursewarestudio.ai):
     navy:   #0b1d3f
     gold:   #c9a55c
     ink:    #1a1a1a
     subtle: #6b7280
     paper:  #ffffff
     surface:#f7f7f5

   All selectors prefixed with cs-tutor- to avoid course-content
   collisions. No global tag selectors. No !important except on
   the FAB z-index (it MUST sit above arbitrary LMS chrome).

   Responsive: slide-out panel becomes full-width on screens < 640px.
   ============================================================ */

.cs-tutor-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2147483600 !important;  /* above arbitrary LMS chrome */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 12px 18px 12px 14px;
  border: none;
  border-radius: 999px;
  background: #0b1d3f;
  color: #ffffff;
  font: 600 14px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(11, 29, 63, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cs-tutor-fab:hover  { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(11, 29, 63, 0.4); }
.cs-tutor-fab:focus-visible  { outline: 3px solid #c9a55c; outline-offset: 3px; }

.cs-tutor-fab-icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #c9a55c;
  color: #0b1d3f;
  text-align: center;
  line-height: 22px;
  font-size: 14px;
  font-weight: bold;
}

/* Modal overlay — prevents pointer interaction with course content while open. */
.cs-tutor-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 29, 63, 0.35);
  z-index: 2147483610;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.cs-tutor-overlay--open {
  opacity: 1;
  pointer-events: auto;
}

/* Slide-out panel */
.cs-tutor-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  height: 100dvh;
  width: 420px;
  max-width: 100vw;
  background: #ffffff;
  color: #1a1a1a;
  z-index: 2147483620;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(11, 29, 63, 0.18);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  pointer-events: none;
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.cs-tutor-panel--open { transform: translateX(0); pointer-events: auto; }

/* Tab switcher in header */
.cs-tutor-tabs {
  display: flex;
  background: #08152e;
  border-bottom: 1px solid #1a2b4c;
}
.cs-tutor-tab {
  flex: 1;
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font: 600 13px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}
.cs-tutor-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}
.cs-tutor-tab--active {
  color: #c9a55c;
  border-bottom-color: #c9a55c;
  background: rgba(201, 165, 92, 0.08);
}

/* Glossary View in Widget */
.cs-tutor-glossary-view {
  flex: 1;
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
}
.cs-tutor-glossary-search-box {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.cs-tutor-glossary-search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  color: #0f172a;
  box-sizing: border-box;
}
.cs-tutor-glossary-search-input:focus {
  outline: 2px solid #0b1d3f;
  border-color: #0b1d3f;
}
.cs-tutor-glossary-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cs-tutor-glossary-card {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.12s ease;
  text-align: left;
}
.cs-tutor-glossary-card:hover {
  border-color: #c9a55c;
  background: #fdfbf7;
}
.cs-tutor-glossary-card strong {
  display: block;
  font-size: 13px;
  color: #0f172a;
  margin-bottom: 3px;
}
.cs-tutor-glossary-card p {
  font-size: 12px;
  color: #475569;
  line-height: 1.4;
  margin: 0;
}

.cs-tutor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e6e6e1;
  background: #0b1d3f;
  color: #ffffff;
}
.cs-tutor-title { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: 0.2px; line-height: 1.25; }

.cs-tutor-close {
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  padding: 4px 8px;
  border-radius: 4px;
}
.cs-tutor-close:hover { background: rgba(255, 255, 255, 0.12); }
.cs-tutor-close:focus-visible { outline: 3px solid #c9a55c; outline-offset: 2px; }

.cs-tutor-log {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cs-tutor-msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 90%;
}
.cs-tutor-msg--user      { align-self: flex-end; }
.cs-tutor-msg--assistant { align-self: flex-start; }

.cs-tutor-msg-body {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.cs-tutor-msg--user      .cs-tutor-msg-body { background: #0b1d3f; color: #ffffff; border-bottom-right-radius: 4px; }
.cs-tutor-msg--assistant .cs-tutor-msg-body { background: #f3f1ea; color: #1a1a1a; border-bottom-left-radius: 4px; }

.cs-tutor-msg-cite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 14px 0 14px;
}

.cs-tutor-msg-cite {
  font-size: 12px;
  color: #6b7280;
  font-style: italic;
  flex: 1;
}

.cs-tutor-nano-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.cs-tutor-typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  height: 20px;
}

.cs-tutor-typing-dot {
  width: 7px;
  height: 7px;
  background-color: #6b7280;
  border-radius: 50%;
  display: inline-block;
  animation: cs-tutor-blink 1.4s infinite ease-in-out both;
}
.cs-tutor-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.cs-tutor-typing-dot:nth-child(2) { animation-delay: -0.16s; }
.cs-tutor-typing-dot:nth-child(3) { animation-delay: 0s; }

@keyframes cs-tutor-blink {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.cs-tutor-jump-btn {
  background: transparent;
  border: 1px solid #d4d4cf;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  color: #0b1d3f;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.cs-tutor-jump-btn:hover {
  background: #0b1d3f;
  color: #ffffff;
  border-color: #0b1d3f;
}
.cs-tutor-jump-btn:focus-visible {
  outline: 2px solid #c9a55c;
  outline-offset: 1px;
}

/* Target highlight in lesson content when jumped to */
.cs-tutor-highlight-target {
  outline: 3px solid #c9a55c !important;
  outline-offset: 4px;
  background-color: rgba(201, 165, 92, 0.18) !important;
  transition: background-color 0.4s ease, outline 0.4s ease;
  border-radius: 4px;
}

/* Recent Questions Collapsible Drawer */
.cs-tutor-drawer {
  border-bottom: 1px solid #e6e6e1;
  background: #fcfbf9;
  font-size: 12px;
}
.cs-tutor-drawer-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #4b5563;
  font: 500 12px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
}
.cs-tutor-drawer-btn:hover {
  background: #f3f1ea;
  color: #0b1d3f;
}
.cs-tutor-drawer-btn:focus-visible {
  outline: 2px solid #0b1d3f;
  outline-offset: -2px;
}
.cs-tutor-drawer-arrow {
  font-size: 11px;
  transition: transform 0.2s ease;
}
.cs-tutor-drawer-btn[aria-expanded="true"] .cs-tutor-drawer-arrow {
  transform: rotate(180deg);
}
.cs-tutor-drawer-menu {
  max-height: 180px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 12px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #ffffff;
  border-top: 1px solid #ecebe5;
}
.cs-tutor-drawer-item {
  width: 100%;
  flex-shrink: 0;
  min-height: 36px;
  text-align: left;
  background: #f7f7f5;
  border: 1px solid #e6e6e1;
  border-radius: 6px;
  padding: 8px 12px;
  font: 12px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1a1a1a;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-tutor-drawer-item:hover {
  background: #edebe2;
  color: #0b1d3f;
  border-color: #c9a55c;
}
.cs-tutor-drawer-item:focus-visible {
  outline: 2px solid #0b1d3f;
  outline-offset: 1px;
}
.cs-tutor-drawer-empty {
  padding: 8px 12px;
  color: #9ca3af;
  font-style: italic;
  font-size: 12px;
}

.cs-tutor-status {
  padding: 6px 20px;
  font-size: 12px;
  color: #6b7280;
  min-height: 18px;
}

.cs-tutor-fatal {
  padding: 12px 14px;
  background: #fef3c7;
  color: #6b4f00;
  border: 1px solid #f0d97a;
  border-radius: 8px;
  font-size: 13px;
}

.cs-tutor-form {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid #e6e6e1;
  background: #ffffff;
}
.cs-tutor-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d4d4cf;
  border-radius: 8px;
  font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1a1a1a;
  background: #ffffff;
}
.cs-tutor-input:focus-visible { outline: 2px solid #0b1d3f; outline-offset: 1px; border-color: #0b1d3f; box-shadow: 0 0 0 3px rgba(11, 29, 63, 0.12); }
.cs-tutor-input:disabled { background: #f3f1ea; color: #9ca3af; cursor: not-allowed; }

.cs-tutor-submit {
  min-height: 44px;
  min-width: 44px;
  padding: 10px 18px;
  background: #c9a55c;
  color: #0b1d3f;
  border: none;
  border-radius: 8px;
  font: 600 14px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
  transition: background 0.15s ease;
}
.cs-tutor-submit:hover    { background: #b58f3f; }
.cs-tutor-submit:focus-visible    { outline: 3px solid #0b1d3f; outline-offset: 2px; }
.cs-tutor-submit:disabled { background: #d4d4cf; color: #9ca3af; cursor: not-allowed; }

.cs-tutor-footer {
  padding: 10px 20px;
  border-top: 1px solid #e6e6e1;
  font-size: 11px;
  color: #6b7280;
  text-align: center;
  background: #f7f7f5;
}

/* Welcome card */
.cs-tutor-welcome {
  background: #fff8e7;
  border: 1px solid #f0d97a;
  border-radius: 12px;
  padding: 16px;
  align-self: stretch;
}
.cs-tutor-welcome-title { margin: 0 0 8px 0; font-size: 15px; color: #0b1d3f; }
.cs-tutor-welcome-body  { margin: 0 0 12px 0; font-size: 13px; line-height: 1.5; color: #4a4a4a; }
.cs-tutor-welcome-ok {
  min-height: 44px;
  padding: 6px 14px;
  background: #0b1d3f;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font: 600 13px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}
.cs-tutor-welcome-ok:hover { background: #1a3055; }
.cs-tutor-welcome-ok:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }

/* Instructor Referral Card (Informs student to contact their instructor) */
.cs-tutor-escalation-card {
  padding: 12px 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cs-tutor-escalation-text {
  font-size: 13px;
  color: #1e3a8a;
  line-height: 1.45;
  margin: 0;
}

/* Outside Course Notice */
.cs-tutor-outside-card {
  padding: 10px 14px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.4;
}

/* Mobile breakpoint — panel becomes full-screen */
@media (max-width: 640px) {
  .cs-tutor-panel {
    width: 100vw;
    box-shadow: none;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .cs-tutor-fab {
    bottom: max(16px, env(safe-area-inset-bottom));
    right: max(16px, env(safe-area-inset-right));
    padding: 10px 14px;
    font-size: 13px;
  }
  .cs-tutor-fab-label {
    display: none;  /* icon-only on mobile to save space */
  }
}

/* Header Actions & Mode Switcher Pill */
.cs-tutor-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cs-tutor-mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.cs-tutor-mode-pill:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
}
.cs-tutor-mode-pill--nano {
  background: rgba(99, 102, 241, 0.35);
  border-color: rgba(165, 180, 252, 0.6);
  color: #e0e7ff;
}
.cs-tutor-mode-pill--standard {
  background: rgba(201, 165, 92, 0.25);
  border-color: rgba(201, 165, 92, 0.5);
  color: #fef3c7;
}

/* In-Widget Onboarding Selection Card */
.cs-tutor-onboarding-card {
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cs-tutor-onboarding-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.cs-tutor-onboarding-icon {
  font-size: 28px;
  line-height: 1;
}
.cs-tutor-onboarding-top h3 {
  margin: 0 0 4px 0;
  font-size: 15px;
  font-weight: 600;
  color: #0b1d3f;
}
.cs-tutor-onboarding-top p {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
}
.cs-tutor-onboarding-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cs-tutor-onboarding-opt {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.15s ease;
}
.cs-tutor-onboarding-opt--nano {
  border-color: #c7d2fe;
  background: #eef2ff;
}
.cs-tutor-onboarding-badge {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  background: #4f46e5;
  color: #ffffff;
}
.cs-tutor-onboarding-badge--std {
  background: #0284c7;
}
.cs-tutor-onboarding-opt strong {
  font-size: 13px;
  color: #0f172a;
}
.cs-tutor-onboarding-opt p {
  margin: 0;
  font-size: 12px;
  color: #475569;
  line-height: 1.4;
}
.cs-tutor-onboarding-spec {
  font-size: 11px;
  color: #6366f1;
  font-weight: 500;
}
.cs-tutor-onboarding-opt--standard .cs-tutor-onboarding-spec {
  color: #0284c7;
}

/* Action Buttons */
.cs-tutor-btn-primary {
  align-self: flex-start;
  background: #0b1d3f;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
  margin-top: 4px;
}
.cs-tutor-btn-primary:hover {
  background: #1e3a8a;
}
.cs-tutor-btn-secondary {
  align-self: flex-start;
  background: #ffffff;
  color: #0b1d3f;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 4px;
}
.cs-tutor-btn-secondary:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

/* Progress & Download UI */
.cs-tutor-download-box {
  padding: 14px;
  background: #ffffff;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cs-tutor-download-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cs-tutor-download-top strong {
  font-size: 13px;
  color: #1e1b4b;
}
.cs-tutor-download-pct {
  font-size: 12px;
  font-weight: 700;
  color: #4f46e5;
}
.cs-tutor-progress-track {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.cs-tutor-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #4f46e5);
  transition: width 0.3s ease;
}
.cs-tutor-download-detail {
  font-size: 11px;
  color: #64748b;
}
.cs-tutor-download-error {
  padding: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
  font-size: 12px;
  line-height: 1.45;
}
.cs-tutor-download-error strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}
.cs-tutor-download-error p {
  margin: 0 0 8px 0;
}
.cs-tutor-download-error code {
  background: rgba(0,0,0,0.06);
  padding: 1px 4px;
  border-radius: 3px;
  font-family: monospace;
}

/* User-Friendly Device Notice Cards */
.cs-tutor-device-notice {
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  color: #1e293b;
  font-size: 12px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cs-tutor-device-notice-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.cs-tutor-device-notice strong {
  font-size: 13px;
  color: #0f172a;
}
.cs-tutor-device-notice p {
  margin: 0;
  color: #334155;
}
.cs-tutor-device-notice ol {
  margin: 4px 0 6px 18px;
  padding: 0;
  color: #334155;
}
.cs-tutor-device-notice ol li {
  margin-bottom: 2px;
}
.cs-tutor-device-notice code {
  background: #e2e8f0;
  padding: 1px 4px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 11px;
}

/* Mode Switcher Dialog Modal */
.cs-tutor-mode-dialog {
  position: absolute;
  top: 60px;
  left: 16px;
  right: 16px;
  z-index: 100;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: cs-tutor-slide-down 0.2s ease-out;
}
@keyframes cs-tutor-slide-down {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.cs-tutor-mode-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #0b1d3f;
  color: #ffffff;
}
.cs-tutor-mode-dialog-header strong { font-size: 14px; }
.cs-tutor-mode-dialog-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}
.cs-tutor-mode-dialog-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cs-tutor-mode-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.15s ease;
}
.cs-tutor-mode-opt:hover { background: #f8fafc; }
.cs-tutor-mode-opt--active {
  border-color: #6366f1;
  background: #eef2ff;
}
.cs-tutor-mode-opt input {
  margin-top: 3px;
  accent-color: #4f46e5;
}
.cs-tutor-mode-opt-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cs-tutor-mode-opt-title {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cs-tutor-mode-opt-title strong { font-size: 13px; color: #0f172a; }
.cs-tutor-badge-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: #e0e7ff;
  color: #4338ca;
}
.cs-tutor-badge-tag--muted {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}
.cs-tutor-mode-opt p {
  margin: 0;
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
}
.cs-tutor-mode-dialog-footer {
  padding: 10px 16px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
}

/* System Notice in Chat */
.cs-tutor-system-notice {
  align-self: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 11px;
  color: #475569;
  text-align: center;
  margin: 4px 0;
}

/* Print — hide tutor when learner prints the course */
@media print {
  .cs-tutor-fab,
  .cs-tutor-panel,
  .cs-tutor-overlay { display: none !important; }
}

/* Reduced motion — respect OS-level preference */
@media (prefers-reduced-motion: reduce) {
  .cs-tutor-fab,
  .cs-tutor-panel,
  .cs-tutor-overlay { transition: none; }
}
