/* ============================================================
   Braintrust Session Prototype — full stylesheet
   ============================================================ */

:root {
  /* Brand */
  --bt-blue: #3c01f7;
  --bt-blue-deep: #2800a6;
  --bt-blue-soft: #e9e5fe;
  --bt-blue-tile: #e6e0fb;   /* answer tile lavender */
  --bt-cyan: #0fb5f2;
  --bt-green: #009e51;
  --bt-green-bg: #defaeb;
  --bt-red: #ff2c23;
  --bt-red-bg: #ffe2e1;
  --bt-yellow: #feca13;
  --bt-orange: #fe6600;
  --bt-orange-bg: #fff0e0;
  --bt-pink: #fa86d1;

  /* Page */
  --page-bg: #f4f3fb;         /* lavender page background */
  --drawer-bg: #ffffff;
  --drawer-content-bg: #ffffff;
  --status-bar-bg: #0d0c1d;   /* the thin black bars top/bottom */

  /* Ink */
  --ink-0: #ffffff;
  --ink-50: #fafafa;
  --ink-100: #f3f3f6;
  --ink-150: #ececf2;
  --ink-200: #e4e4e7;
  --ink-300: #c9c9cf;
  --ink-400: #8a8a93;
  --ink-500: #5c5c64;
  --ink-700: #2a2a30;
  --ink-900: #121212;

  /* Lessonspace shell */
  --ls-shell-bg: #1f2024;
  --ls-tab-bar: #15161a;
  --ls-toolbar-bg: #1f2024;
  --ls-rail-bg: #1f2024;
  --ls-text: #d8d9e0;
  --ls-text-dim: #8a8b92;

  /* Shadows */
  --shadow-card: 0 1px 2px rgba(10,10,18,0.04), 0 1px 4px rgba(10,10,18,0.04);
  --shadow-pop: 0 8px 24px rgba(10,10,18,0.12), 0 2px 6px rgba(10,10,18,0.06);
  --shadow-pop-strong: 0 16px 40px rgba(10,10,18,0.15), 0 2px 8px rgba(10,10,18,0.08);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  color: var(--ink-900);
  /* Lavender surround (was #0d0c1d - the near-black device-bezel look).
     Change made when hosting the demo inside the Tutor Help Center: the
     dark surround read as an unrelated black frame around the canvas. */
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  height: 100vh; width: 100vw;
}
button {
  font-family: inherit; cursor: pointer; border: 0;
  background: none; padding: 0; color: inherit;
}
input { font-family: inherit; }

/* ============================================================
   STAGE — scale to viewport
   ============================================================ */
.app-stage {
  position: fixed; inset: 0;
  background: var(--page-bg);
  overflow: hidden;
}
.app-canvas {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1536px;
  height: 880px;
  background: var(--status-bar-bg);
  transform-origin: 0 0;
  box-shadow: 0 40px 120px rgba(0,0,0,0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   TOP & BOTTOM black status bars
   ============================================================ */
.app-statusbar {
  height: 32px;
  background: var(--status-bar-bg);
  flex-shrink: 0;
}
.app-statusbar.bottom { height: 36px; }

/* ============================================================
   HEADER (lavender — tutor session)
   ============================================================ */
.app-header {
  height: 50px;
  background: var(--page-bg);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}
.app-header-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-900);
  letter-spacing: -0.005em;
}
.leave-btn {
  padding: 9px 22px;
  border-radius: 999px;
  background: var(--bt-red);
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  transition: background 140ms var(--ease-out), transform 140ms var(--ease-out);
}
.leave-btn:hover { background: #e8251c; }
.leave-btn:active { transform: scale(0.98); }
.leave-btn.text {
  background: transparent;
  color: var(--bt-red);
  padding: 6px 12px;
  font-weight: 500;
}
.leave-btn.text:hover { background: rgba(255,44,35,0.05); }

/* ============================================================
   BODY — drawer + lessonspace side-by-side
   ============================================================ */
.app-body {
  flex: 1;
  display: flex;
  background: var(--page-bg);
  min-height: 0;
  position: relative;
}

/* ============================================================
   DRAWER
   ============================================================ */
.drawer-wrap {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 920px;
  z-index: 5;
  transition: transform 320ms var(--ease-out), opacity 240ms var(--ease-out);
  box-shadow: 4px 0 16px rgba(10,10,18,0.06);
}
.drawer-wrap.open  { transform: translateX(0); opacity: 1; }
.drawer-wrap.closed { transform: translateX(-100%); opacity: 0; pointer-events: none; }

.drawer {
  position: relative;
  flex: 1;
  background: var(--page-bg);
  display: flex; flex-direction: column;
  overflow: hidden;
}

/* Collapse handle (purple circle) */
.collapse-btn {
  position: absolute;
  z-index: 30;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bt-blue);
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(60,1,247,0.35);
  transition: background 180ms var(--ease-out), transform 220ms var(--ease-pop);
  border: 0;
}
.collapse-btn:hover { background: var(--bt-blue-deep); transform: scale(1.06); }
.collapse-btn:active { transform: scale(0.95); }

/* When drawer is open: sits at right edge of drawer */
.collapse-btn.collapse-open {
  top: 12px;
  right: -16px;
}
/* When drawer is closed: sits in the lavender gutter beside the lessonspace shell */
.collapse-btn.collapse-closed {
  top: 14px;
  left: 13px;
}
/* In the collapsed tutor state, inset the lessonspace shell so the handle sits
   BESIDE the whiteboard (in the lavender gutter) rather than on top of it. */
.app-body.gutter-left .ls {
  margin-left: 56px;
  border-radius: 8px;
}

/* ============================================================
   DRAWER TABS
   ============================================================ */
.drawer-tabs {
  display: flex;
  height: 44px;
  background: var(--page-bg);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  flex-shrink: 0;
  padding-left: 8px;
  padding-right: 8px;
  gap: 0;
}
.drawer-tab {
  padding: 0 16px;
  height: 44px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-400);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: all 140ms var(--ease-out);
  position: relative;
  display: inline-flex; align-items: center;
}
.drawer-tab:hover { color: var(--ink-700); }
.drawer-tab.active {
  color: var(--bt-blue);
  border-bottom-color: var(--bt-blue);
  font-weight: 600;
}
.drawer-tab.active .tab-students {
  color: var(--bt-blue);
}
.tab-students {
  font-weight: 400;
  color: var(--ink-500);
  margin-left: 4px;
}
.drawer-tab.active .tab-students { font-weight: 500; }

/* ============================================================
   DRAWER CONTENT
   ============================================================ */
.drawer-content {
  flex: 1;
  background: var(--page-bg);
  padding: 24px 28px 16px;
  display: flex; flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  min-height: 0;
  position: relative;
}

.drawer-content-head {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 30px;
}
.drawer-content-head h2 {
  margin: 0;
  font-weight: 600;
  font-size: 18px;
  line-height: 24px;
  color: var(--ink-900);
}
.drawer-subtext {
  font-size: 14px;
  line-height: 22px;
  color: var(--ink-900);
  margin: 0;
}

.tertiary-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--bt-blue);
  font-weight: 500;
  font-size: 14px;
  position: relative;
  cursor: pointer;
  background: transparent;
}
.tertiary-btn:hover,
.tertiary-btn:focus,
.tertiary-btn.active { background: transparent; color: var(--bt-blue); }

/* ============================================================
   AGENDA TAB — lesson card
   ============================================================ */
.lesson-card {
  background: #fff;
  border-radius: 10px;
  border: 0;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 28px;
  align-items: start;
}
.lesson-students {
  display: flex; flex-direction: column;
  gap: 4px;
}
.lesson-student {
  font-size: 14px;
  line-height: 22px;
  color: var(--ink-900);
}

.lesson-body {
  display: flex; flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.lesson-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 22px;
  color: var(--ink-900);
  margin-bottom: 4px;
}
.lesson-link {
  display: inline-flex; align-items: center;
  gap: 4px;
  font-size: 14px;
  line-height: 22px;
  color: var(--bt-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  width: max-content;
  transition: opacity 140ms var(--ease-out);
}
.lesson-link:hover { opacity: 0.7; }
.lesson-link svg { color: var(--bt-blue); }

.lesson-status {
  display: inline-flex; align-items: center;
  gap: 6px;
  font-size: 14px;
  white-space: nowrap;
}
.lesson-status .dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
}
.lesson-status.notstarted { color: var(--bt-red); }
.lesson-status.notstarted .dot { display: none; }
.lesson-status.inprogress { color: var(--ink-900); }
.lesson-status.inprogress .dot { background: var(--ink-900); }
.lesson-status.complete { color: var(--bt-green); }
.lesson-status.complete .dot { display: none; }

.edit-agenda-link {
  position: absolute;
  bottom: 16px; left: 28px;
  font-size: 14px;
  color: var(--bt-blue);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.edit-agenda-link:hover { text-decoration: underline; }

/* ============================================================
   ACTIVITIES TAB — step picker + table
   ============================================================ */
.step-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.select {
  position: relative;
  width: 240px;
}
.select-trigger {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--ink-300);
  border-radius: 8px;
  display: flex; align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-900);
  transition: all 140ms var(--ease-out);
  cursor: pointer;
  gap: 8px;
}
.select-trigger.placeholder { color: var(--ink-400); font-weight: 400; }
.select-trigger:hover { border-color: var(--ink-400); }
.select-trigger.open { border-color: var(--bt-blue); }
.select-trigger .chev { color: var(--ink-500); flex-shrink: 0; transition: transform 200ms var(--ease-out); }
.select-trigger.open .chev { transform: rotate(180deg); }
.select-trigger .step-icon { color: var(--bt-orange); display: inline-grid; place-items: center; flex-shrink: 0; }

.select-menu {
  position: absolute;
  top: calc(100% + 4px); left: 0;
  width: 100%;
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  box-shadow: var(--shadow-pop);
  z-index: 30;
  overflow: hidden;
  animation: pop-in 180ms var(--ease-out);
}
@keyframes pop-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.select-option {
  padding: 12px 14px;
  display: flex; align-items: center;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: background 120ms var(--ease-out);
  color: var(--ink-900);
}
.select-option:hover { background: var(--ink-100); }
.select-option.active {
  color: var(--bt-blue);
  font-weight: 600;
  background: var(--bt-blue-soft);
}
.select-option .step-icon { color: var(--bt-orange); display: inline-grid; place-items: center; }
.select-option .status-tag {
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  font-style: italic;
}
.select-option .status-tag.inprogress { color: var(--ink-900); }
.select-option .status-tag.completed { color: var(--bt-green); }
.select-option .status-tag.reteach { color: var(--bt-orange); }

/* Launch button */
.launch-btn {
  height: 44px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--bt-blue);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex; align-items: center;
  transition: all 160ms var(--ease-out);
  flex-shrink: 0;
}
.launch-btn:hover:not(:disabled) { background: var(--bt-blue-deep); }
.launch-btn:active:not(:disabled) { transform: scale(0.98); }
.launch-btn:disabled {
  background: var(--ink-150);
  color: var(--ink-400);
  cursor: not-allowed;
}
.launch-btn.launched {
  background: var(--ink-150);
  color: var(--ink-500);
  font-weight: 500;
  white-space: nowrap;
}

.activity-hint {
  font-size: 13px;
  color: var(--ink-500);
  margin: 0;
}

/* Results table */
.results-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 13.5px;
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  overflow: hidden;
}
.results-table th,
.results-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
  border-right: 1px solid var(--ink-200);
}
.results-table th:last-child,
.results-table td:last-child { border-right: 0; }
.results-table th {
  font-weight: 600;
  background: #fff;
  border-bottom: 2px solid var(--ink-700);
  color: var(--ink-900);
}
.results-table th.answer-key {
  width: 80px;
}
.results-table th.answer-key,
.results-table td.answer-key {
  border-left: 2px solid var(--ink-700);
  border-right: 2px solid var(--ink-700);
  text-align: center;
  font-weight: 600;
  background: #fff;
}
.results-table .score-row td {
  background: #1f1f24;
  color: #fff;
  font-style: italic;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
}
.results-table .score-row td:first-child {
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.results-table .score-row td.answer-key {
  background: #1f1f24;
  border-left-color: #1f1f24;
  border-right-color: #1f1f24;
}
.results-table .q-cell {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 18px;
  color: var(--ink-900);
  width: 230px;
}
.results-table .cell-pending {
  background: var(--ink-100);
  color: var(--ink-400);
  font-style: italic;
  text-align: center;
}
.results-table .cell-correct {
  background: var(--bt-green-bg);
  color: var(--ink-900);
  text-align: center;
  font-weight: 500;
}
.results-table .cell-retry {
  background: var(--bt-orange-bg);
  color: var(--ink-900);
  text-align: center;
  font-weight: 500;
}
.results-table .cell-wrong {
  background: var(--bt-red-bg);
  color: var(--ink-900);
  text-align: center;
  font-weight: 500;
}
.q-needs-review {
  display: inline-flex; align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.q-needs-review .nr-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--bt-red);
}
.q-needs-review .nr-icon {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bt-red);
  color: #fff;
  display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 700;
  font-family: 'Poppins', sans-serif;
}
.review-pill {
  display: inline-flex; align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--ink-150);
  border: 0;
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.review-pill:hover { background: var(--ink-200); }

/* Launched snackbar (unused now) */
.snackbar {
  display: inline-flex; align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--bt-green-bg);
  color: var(--bt-green);
  font-weight: 600;
  font-size: 14px;
  height: 38px;
  border: 1px solid #b8e9cd;
}

/* ============================================================
   DRAWER CONTROLS dropdown
   ============================================================ */
.dc-wrap { position: relative; }
.dc-menu {
  position: absolute;
  top: calc(100% + 8px); right: 0;
  width: 320px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-pop-strong);
  overflow: hidden;
  z-index: 50;
  padding: 8px 0;
  animation: pop-in 200ms var(--ease-out);
  border: 1px solid var(--ink-200);
}
.dc-row {
  height: 48px;
  background: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px;
}
.dc-row-name { font-size: 14px; color: var(--ink-900); }

/* iOS-style toggle */
.toggle {
  width: 44px; height: 26px;
  border-radius: 999px;
  position: relative;
  background: #d8d8de;
  transition: background 200ms var(--ease-out);
  cursor: pointer;
  flex-shrink: 0;
}
.toggle.on { background: var(--bt-green); }
.toggle .knob {
  position: absolute;
  top: 2px; left: 2px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform 220ms var(--ease-pop);
  display: grid; place-items: center;
  color: transparent;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.toggle.on .knob {
  transform: translateX(18px);
  color: var(--bt-green);
}

.dc-footer {
  padding: 12px 16px 4px;
  display: flex; gap: 12px;
}
.dc-action {
  flex: 1; height: 36px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  font-weight: 600; font-size: 13px;
  background: #fff;
  border: 1.5px solid;
  transition: all 140ms var(--ease-out);
}
.dc-action.open { color: var(--bt-green); border-color: var(--bt-green); }
.dc-action.close { color: var(--bt-red); border-color: var(--bt-red); }
.dc-action.open:hover { background: var(--bt-green-bg); }
.dc-action.close:hover { background: var(--bt-red-bg); }
.dc-action:active { transform: scale(0.98); }

/* ============================================================
   FOOTER (bottom row) — session-type dropdown + view toggle
   ============================================================ */
.app-footer {
  flex-shrink: 0;
  height: 56px;
  background: var(--page-bg);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}
.footer-left { display: flex; align-items: center; gap: 14px; }
.launched-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bt-green-bg);
  color: var(--bt-green);
  font-weight: 600; font-size: 13px;
  border: 1px solid #b8e9cd;
  white-space: nowrap;
  animation: pop-in 220ms var(--ease-out);
}
.session-type {
  position: relative;
  width: 200px;
}
.session-type-trigger {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--ink-300);
  border-radius: 8px;
  display: flex; align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-900);
  cursor: pointer;
  transition: all 140ms var(--ease-out);
}
.session-type-trigger:hover { border-color: var(--ink-400); }
.session-type-trigger.open { border-color: var(--bt-blue); }
.session-type-trigger .chev { color: var(--ink-500); transition: transform 200ms; }
.session-type-trigger.open .chev { transform: rotate(180deg); }

.session-type-menu {
  position: absolute;
  bottom: calc(100% + 4px); left: 0;
  width: 220px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--ink-200);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  z-index: 40;
  animation: pop-in 180ms var(--ease-out);
}
.session-type-option {
  padding: 12px 14px;
  font-size: 14px;
  color: var(--ink-900);
  cursor: pointer;
  transition: background 120ms;
}
.session-type-option:hover { background: var(--ink-100); }
.session-type-option.active {
  color: var(--bt-blue);
  font-weight: 600;
}

.view-toggle {
  height: 42px;
  padding: 0 22px;
  border-radius: 999px;
  background: #4a4a52;
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  display: inline-flex; align-items: center;
  gap: 8px;
  transition: all 140ms var(--ease-out);
}
.view-toggle:hover { background: #5c5c64; }
.view-toggle:active { transform: scale(0.98); }

/* ============================================================
   LESSONSPACE (right side)
   ============================================================ */
.ls {
  flex: 1;
  min-width: 0;
  background: var(--ls-shell-bg);
  display: flex; flex-direction: column;
  border-radius: 8px 0 0 8px;
  overflow: hidden;
  position: relative;
}

/* tab strip */
.ls-tabs {
  height: 44px;
  background: var(--ls-tab-bar);
  display: flex; align-items: center;
  gap: 2px;
  padding: 0 8px;
  color: var(--ls-text);
  flex-shrink: 0;
  border-bottom: 1px solid #000;
}
.ls-tab-add {
  width: 28px; height: 28px;
  border-radius: 4px;
  display: grid; place-items: center;
  color: var(--ls-text);
  transition: background 140ms;
}
.ls-tab-add:hover { background: rgba(255,255,255,0.06); }
.ls-tab {
  height: 32px;
  padding: 0 14px;
  display: flex; align-items: center; gap: 8px;
  border-radius: 6px 6px 0 0;
  font-size: 12.5px;
  font-weight: 500;
  color: #b8b9c0;
  background: transparent;
  position: relative;
}
.ls-tab.active {
  background: var(--ls-shell-bg);
  color: #fff;
}
.ls-tab-emoji { font-size: 14px; }
.ls-tab-close {
  width: 16px; height: 16px;
  border-radius: 3px;
  display: grid; place-items: center;
  color: #8a8b92;
  transition: all 140ms;
  margin-left: 2px;
}
.ls-tab-close:hover { background: rgba(255,255,255,0.08); color: #fff; }

.ls-tabs-spacer { flex: 1; }
.ls-end-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  margin: 0 4px;
}
.ls-avatar-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4a87a, #b8845a);
  display: grid; place-items: center;
  position: relative;
  flex-shrink: 0;
  margin: 0 2px;
  overflow: hidden;
}
.ls-avatar-icon img { width: 100%; height: 100%; object-fit: cover; }
.ls-crown {
  position: absolute; top: -7px; left: 50%; transform: translateX(-50%) rotate(-2deg);
  color: var(--bt-pink);
  font-size: 12px;
}
.ls-tabs-icon-btn {
  width: 32px; height: 32px;
  border-radius: 6px;
  display: grid; place-items: center;
  color: var(--ls-text);
  transition: background 140ms;
}
.ls-tabs-icon-btn:hover { background: rgba(255,255,255,0.06); }

/* whiteboard toolbar */
.ls-toolbar {
  height: 44px;
  background: var(--ls-toolbar-bg);
  display: flex; align-items: center;
  padding: 0 10px;
  gap: 2px;
  flex-shrink: 0;
  color: var(--ls-text);
  border-bottom: 1px solid #000;
}
.ls-tb-btn {
  width: 32px; height: 32px;
  border-radius: 6px;
  display: grid; place-items: center;
  color: var(--ls-text);
  transition: background 140ms;
}
.ls-tb-btn:hover { background: rgba(255,255,255,0.06); }
.ls-tb-divider {
  width: 1px; height: 22px;
  background: #4a4b54;
  margin: 0 4px;
}
.ls-tb-zoom {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--ls-text);
  font-size: 12px;
  font-weight: 500;
  transition: background 140ms;
}
.ls-tb-zoom:hover { background: rgba(255,255,255,0.06); }

/* body grid */
.ls-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 280px 44px;
  min-height: 0;
  background: var(--ls-shell-bg);
}
.ls-board {
  background: #fff;
  position: relative;
  overflow: hidden;
}
.ls-board-empty { background: #fff; }

/* video rail */
.ls-video-rail {
  background: var(--ls-shell-bg);
  display: flex; flex-direction: column;
  gap: 8px;
  padding: 12px 8px;
  overflow: hidden;
}
.ls-video {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 11;
  background: #2a2b34;
  flex-shrink: 0;
  isolation: isolate;
}
.ls-video img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.ls-video-crown {
  position: absolute; top: 6px; left: 6px;
  z-index: 2;
  color: var(--bt-pink);
  font-size: 16px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}
.ls-video-name {
  position: absolute;
  left: 10px; bottom: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
  z-index: 2;
}
.ls-video-more {
  position: absolute;
  right: 6px; bottom: 6px;
  width: 22px; height: 22px;
  border-radius: 4px;
  display: grid; place-items: center;
  color: #fff;
  background: rgba(0,0,0,0.0);
  z-index: 2;
  transition: background 140ms;
}
.ls-video-more:hover { background: rgba(0,0,0,0.4); }

/* side icon rail */
.ls-side-rail {
  background: var(--ls-rail-bg);
  display: flex; flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 0;
  border-left: 1px solid #000;
}
.ls-side-btn {
  width: 32px; height: 32px;
  border-radius: 6px;
  display: grid; place-items: center;
  color: #b8b9c0;
  transition: all 140ms;
}
.ls-side-btn:hover { background: rgba(255,255,255,0.06); color: #fff; }
.ls-side-btn.active { background: rgba(255,255,255,0.12); color: #fff; }

/* ============================================================
   STUDENT VIEW — question screen
   ============================================================ */
.student-content {
  flex: 1;
  background: var(--page-bg);
  padding: 0;
  display: flex; flex-direction: column;
  position: relative;
  overflow-y: auto;
}
.student-progress {
  height: 4px;
  background: var(--ink-150);
  position: relative;
  flex-shrink: 0;
}
.student-progress-fill {
  height: 100%;
  background: var(--bt-blue);
  transition: width 400ms var(--ease-out);
}

.student-inner {
  padding: 24px 32px 32px;
  flex: 1;
  display: flex; flex-direction: column;
  gap: 18px;
}

.student-q-label {
  font-size: 15px;
  color: var(--ink-900);
  font-weight: 500;
}
.student-instructions {
  display: flex; gap: 12px;
  align-items: flex-start;
  font-size: 16px;
  line-height: 22px;
  color: var(--ink-900);
}
.student-instructions b { font-weight: 700; }

/* speaker icon — small purple round */
.speaker {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bt-blue);
  color: #fff;
  display: inline-grid; place-items: center;
  flex-shrink: 0;
  transition: background 140ms var(--ease-out);
  cursor: pointer;
  border: 0;
}
.speaker:hover { background: var(--bt-blue-deep); }
.speaker.sm { width: 22px; height: 22px; }

.student-question-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
  flex: 1;
}

/* picture frame */
.q-picture-wrap {
  position: relative;
}
.q-picture-wrap > .speaker { position: absolute; top: -4px; left: -4px; z-index: 2; }
.q-picture {
  background: #fff;
  border: 2px solid var(--ink-900);
  border-radius: 12px;
  height: 320px;
  display: grid; place-items: center;
  padding: 24px;
  overflow: hidden;
}
.q-picture img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
}

/* answer grid */
.q-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px 32px;
  padding-top: 4px;
}
.q-answer {
  position: relative;
  display: flex; flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1;
}
/* An answer showing status text must stack above adjacent tiles. Class is added
   directly via JSX for reliability over the :has() selector. */
.q-answer.q-answer--status { z-index: 5; }
.q-answer-label {
  position: absolute;
  top: 8px; left: -22px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-900);
}
.q-tile {
  width: 100%;
  max-width: 130px;
  aspect-ratio: 1;
  border: 2px solid var(--ink-900);
  border-radius: 12px;
  background: var(--bt-blue-tile);
  display: grid; place-items: center;
  font-size: 88px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  color: var(--ink-900);
  position: relative;
  cursor: pointer;
  transition: all 140ms var(--ease-out);
  user-select: none;
}
.q-tile:hover:not(.disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(60,1,247,0.18);
}
.q-tile:active:not(.disabled) { transform: translateY(0); }
.q-tile.disabled { cursor: default; }
.q-tile .speaker {
  position: absolute;
  top: 6px; left: 6px;
}
.q-tile-dot {
  position: absolute;
  bottom: -12px; left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--ink-900);
  z-index: 2;
  display: grid; place-items: center;
  color: transparent;
  transition: all 200ms var(--ease-pop);
}
.q-tile.selected .q-tile-dot {
  background: var(--bt-blue);
  border-color: var(--bt-blue);
  color: #fff;
}
.q-tile.correct .q-tile-dot {
  background: var(--bt-green);
  border-color: var(--bt-green);
  color: #fff;
}
.q-tile.wrong .q-tile-dot {
  background: var(--bt-red);
  border-color: var(--bt-red);
  color: #fff;
}
.q-tile.reveal {
  background: #d4f5e0;
  border-color: var(--bt-green);
}
.q-answer-status {
  position: absolute;
  top: calc(100% + 16px);
  left: 0; right: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  z-index: 5;
}
.q-answer-status.correct { color: var(--bt-green); }
.q-answer-status.wrong { color: var(--bt-red); }

/* check answer / next button */
.student-actions {
  display: flex; justify-content: flex-end;
  padding-top: 20px;
}
.action-btn {
  height: 50px;
  padding: 0 36px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  display: inline-flex; align-items: center;
  gap: 10px;
  transition: all 140ms var(--ease-out);
}
.action-btn.primary {
  background: var(--bt-blue);
  color: #fff;
}
.action-btn.primary:hover { background: var(--bt-blue-deep); }
.action-btn.primary:active { transform: scale(0.98); }
.action-btn.disabled,
.action-btn:disabled {
  background: var(--ink-200);
  color: var(--ink-400);
  cursor: not-allowed;
}
.action-btn-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: grid; place-items: center;
}

/* completed card — styled like an agenda card (white on lavender) */
.completed-card-shell {
  background: #fff;
  border-radius: 10px;
  padding: 22px 24px;
  display: flex; flex-direction: column;
  gap: 12px;
  animation: pop-in 280ms var(--ease-out);
}
.completed-card-head {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 700;
  color: var(--ink-900);
}
.completed-badge.sm {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--bt-green-bg);
  color: var(--bt-green);
  display: grid; place-items: center;
}
.completed-card-text {
  font-size: 15px;
  line-height: 24px;
  color: var(--ink-700);
  margin: 0;
}

/* completed card (legacy centered variant, retained) */
.completed-card {
  flex: 1;
  display: grid; place-items: center;
  text-align: center;
}
.completed-inner {
  max-width: 480px;
  padding: 32px 24px;
  display: flex; flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: pop-in 280ms var(--ease-out);
}
.completed-badge {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--bt-green-bg);
  color: var(--bt-green);
  display: grid; place-items: center;
}
.completed-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink-900);
  margin: 0;
}
.completed-text {
  font-size: 15px;
  line-height: 22px;
  color: var(--ink-500);
  margin: 0;
}

/* ============================================================
   STUDENT PICTURE-IN-PICTURE PREVIEW (tutor stays in their seat)
   ============================================================ */
.student-pip {
  position: absolute;
  top: 92px; bottom: 86px; left: 916px;
  width: 596px;
  background: var(--page-bg);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(13, 12, 29, 0.34);
  border: 1px solid rgba(0, 0, 0, 0.06);
  z-index: 40;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: pip-in 240ms var(--ease-out);
}
@keyframes pip-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
.student-pip-bar {
  height: 46px; flex-shrink: 0;
  background: #fff;
  display: flex; align-items: center; gap: 9px;
  padding: 0 12px 0 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  font-size: 14px; font-weight: 600; color: var(--ink-900);
}
.student-pip-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bt-blue);
}
.student-pip-bar .pip-live {
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--bt-red);
  display: inline-flex; align-items: center; gap: 5px;
}
.student-pip-bar .pip-live::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--bt-red);
  animation: pip-blink 1.4s ease-in-out infinite;
}
@keyframes pip-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.student-pip-close {
  margin-left: auto;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink-500); background: transparent; border: 0;
  cursor: pointer;
  transition: all 140ms var(--ease-out);
}
.student-pip-close:hover { background: var(--ink-100); color: var(--ink-900); }
.student-pip-body {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
}
.student-pip-body .student-content { flex: 1; min-height: 0; }

/* ============================================================
   SIDE-BY-SIDE STUDENT PANE (tutor drawer left, student right)
   ============================================================ */
/* When the split is open the wrap becomes a two-column row and widens. */
.drawer-wrap.sbs {
  width: 1340px;
  min-width: 1340px;
  flex-direction: row;
  transition: transform 320ms var(--ease-out), opacity 240ms var(--ease-out),
              min-width 320ms var(--ease-out), width 320ms var(--ease-out);
}
.drawer-wrap.sbs .drawer {
  flex: 1 1 auto;
  min-width: 0;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}
.sbs-student {
  flex: 0 0 452px;
  width: 452px;
  min-height: 0;
  background: var(--page-bg);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: sbs-in 300ms var(--ease-out);
}
@keyframes sbs-in {
  from { transform: translateX(18px); }
  to   { transform: none; }
}
.sbs-student-bar,
.student-peek-bar {
  height: 46px; flex-shrink: 0;
  background: #fff;
  display: flex; align-items: center; gap: 9px;
  padding: 0 12px 0 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  font-size: 14px; font-weight: 600; color: var(--ink-900);
}
.sbs-student-body,
.student-peek-body {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
}
.sbs-student-body .student-content,
.student-peek-body .student-content { flex: 1; min-height: 0; }

/* ============================================================
   PEEK OVERLAY (hold the button to glimpse the student screen)
   ============================================================ */
.student-peek {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 920px;
  background: var(--page-bg);
  z-index: 42;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 4px 0 24px rgba(13, 12, 29, 0.18);
  animation: peek-in 160ms var(--ease-out);
}
@keyframes peek-in {
  from { transform: translateX(-14px); }
  to   { transform: none; }
}
.student-peek-bar .peek-hint {
  margin-left: auto;
  font-size: 12px; font-weight: 500; color: var(--ink-400);
  font-style: italic;
}
/* shared LIVE pip dot/badge reused by sbs + peek bars */
.sbs-student-bar .student-pip-dot,
.student-peek-bar .student-pip-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bt-blue); }
.sbs-student-bar .pip-live,
.student-peek-bar .pip-live {
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--bt-red);
  display: inline-flex; align-items: center; gap: 5px;
}
.sbs-student-bar .pip-live::before,
.student-peek-bar .pip-live::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--bt-red);
  animation: pip-blink 1.4s ease-in-out infinite;
}

/* ============================================================
   LEAVE SESSION MODAL
   ============================================================ */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13,12,29,0.55);
  z-index: 200;
  display: grid; place-items: center;
  animation: fade-in 200ms var(--ease-out);
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 420px;
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  box-shadow: var(--shadow-pop-strong);
  animation: pop-in 240ms var(--ease-pop);
}
.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink-900);
  margin: 0 0 8px;
}
.modal-text {
  font-size: 14px;
  line-height: 22px;
  color: var(--ink-500);
  margin: 0 0 24px;
}
.modal-actions {
  display: flex; gap: 12px;
  justify-content: flex-end;
}
.btn {
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 14px;
  display: inline-flex; align-items: center;
  transition: all 140ms var(--ease-out);
}
.btn.ghost { color: var(--ink-700); background: transparent; }
.btn.ghost:hover { background: var(--ink-100); }
.btn.danger { background: var(--bt-red); color: #fff; }
.btn.danger:hover { background: #e8251c; }

/* right-side wrapper in drawer-content-head (Tools + Drawer Controls) */
.drawer-head-right {
  display: flex; align-items: center; gap: 20px; flex-shrink: 0;
}

/* ============================================================
   TOOLS MODAL
   ============================================================ */
.tools-backdrop {
  position: absolute; inset: 0;
  background: rgba(18, 16, 40, 0.38);
  z-index: 80;
  display: grid; place-items: center;
  animation: fade-in 200ms var(--ease-out);
}
.tools-modal {
  width: 564px;
  background: #fff;
  border-radius: 18px;
  padding: 26px 26px 0;
  box-shadow: 0 24px 60px rgba(13, 12, 29, 0.24);
  animation: pop-in 240ms var(--ease-pop);
  overflow: hidden;
}
.tools-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.tools-modal-title {
  font-size: 20px; font-weight: 700; color: var(--ink-900);
}
.tools-close-btn {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink-500); background: transparent; border: 0;
  cursor: pointer; transition: all 140ms var(--ease-out);
}
.tools-close-btn:hover { background: var(--ink-100); color: var(--ink-900); }

.tools-cards {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-bottom: 24px;
}
.tool-card {
  border: 1.5px solid var(--ink-200);
  border-radius: 14px; overflow: hidden;
  cursor: pointer; background: #fff;
  transition: border-color 160ms var(--ease-out),
              background 160ms var(--ease-out),
              box-shadow 160ms var(--ease-out);
}
.tool-card:hover {
  border-color: var(--bt-blue);
  background: #f5f3ff;
  box-shadow: 0 2px 12px rgba(60, 1, 247, 0.10);
}
.tool-card.selected {
  border: 2px solid var(--bt-blue);
  background: #f5f3ff;
  box-shadow: 0 3px 16px rgba(60, 1, 247, 0.15);
}
.tool-card-thumb {
  width: 100%; height: 154px; overflow: hidden;
  background: #f2f2f8;
}
.tool-card-info {
  padding: 14px 16px 16px;
  display: flex; flex-direction: column; gap: 3px;
}
.tool-card-name {
  font-size: 15px; font-weight: 700; color: var(--ink-900);
}
.tool-card-desc {
  font-size: 13px; line-height: 18px; color: var(--ink-500);
}

/* preview thumbnails */
.tp-shell {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  font-family: 'Poppins', sans-serif; user-select: none;
}
.tp-topbar {
  height: 26px; flex-shrink: 0;
  display: flex; align-items: center; gap: 5px; padding: 0 8px;
}
.tp-topbar-blue  { background: #4338ca; }
.tp-topbar-light { background: #f4f4f8; border-bottom: 1px solid #e2e2ec; }
.tp-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.42); }
.tp-dot-gray { background: #ccc; }
.tp-urlbar  { flex: 1; height: 11px; background: rgba(255,255,255,0.18); border-radius: 4px; margin: 0 4px; }
.tp-btn-stub { width: 28px; height: 11px; background: rgba(255,255,255,0.22); border-radius: 4px; }
.tp-reader-brand   { flex: 1; font-size: 8.5px; font-weight: 600; color: #444; padding-left: 3px; }
.tp-reader-compare { font-size: 7.5px; font-weight: 600; color: #fff; background: #10b981; border-radius: 3px; padding: 1px 5px; }
.tp-body { flex: 1; padding: 6px 8px; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.tp-h1   { font-size: 9.5px; font-weight: 700; color: #1a1a2e; margin: 0; }
.tp-searchbar { height: 11px; background: #ececf5; border-radius: 4px; width: 88%; flex-shrink: 0; }
.tp-game-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.tp-gtile { border-radius: 7px; aspect-ratio: 1; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 3px; }
.tp-gtile span { font-size: 5.5px; font-weight: 600; color: #fff; }
/* reader */
.tp-reader-selects { display: flex; gap: 5px; flex-shrink: 0; }
.tp-rsel { height: 12px; background: #e8e8f2; border-radius: 4px; flex: 1; }
.tp-reader-img { height: 38px; background: #e0dff5; border-radius: 6px; flex-shrink: 0; display: grid; place-items: center; font-size: 18px; }
.tp-rlines { display: flex; flex-direction: column; gap: 3px; }
.tp-rl { height: 6.5px; background: #e2e2ec; border-radius: 3px; }

/* footer */
.tools-modal-foot { margin: 0 -26px; }
.tools-foot-rule  { height: 1px; background: var(--ink-150); }
.tools-foot-row {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding: 14px 26px;
}
.tools-cancel-btn {
  background: none; border: 0; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 500;
  color: var(--ink-700); padding: 4px 8px;
  transition: color 140ms var(--ease-out);
}
.tools-cancel-btn:hover { color: var(--ink-900); }
.tools-launch-btn {
  height: 40px; padding: 0 18px;
  border-radius: 999px; border: 0;
  font-family: inherit; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink-150); color: var(--ink-400);
  cursor: not-allowed; transition: all 140ms var(--ease-out);
}
.tools-launch-btn.active {
  background: var(--bt-blue); color: #fff; cursor: pointer;
  box-shadow: 0 2px 8px rgba(60, 1, 247, 0.25);
}
.tools-launch-btn.active:hover { background: var(--bt-blue-deep); }
.tools-launch-btn.active:active { transform: scale(0.98); }
.tools-launch-icon {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,0.20);
  display: grid; place-items: center;
}
.tools-launch-btn:not(.active) .tools-launch-icon { background: rgba(0,0,0,0.08); }

/* ============================================================
   TUTORIAL LAYER
   ============================================================ */
.tut-layer {
  position: absolute;
  inset: 0;
  z-index: 160;
  pointer-events: none;        /* only specific children capture clicks */
  animation: fade-in 220ms var(--ease-out);
}
/* tell-step blocker — invisible, swallows clicks on the UI underneath */
.tut-blocker { position: absolute; inset: 0; pointer-events: auto; }
/* full dim for centered (no-target) steps */
.tut-dim-full {
  position: absolute; inset: 0;
  background: rgba(var(--tut-dim-color, 18, 16, 40), var(--tut-dim, 0.55));
  pointer-events: auto;
}

/* spotlight = a hole punched in a giant box-shadow; pointer-events none so the
   highlighted element underneath stays clickable on "do" steps */
.tut-spotlight {
  position: absolute;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(var(--tut-dim-color, 18, 16, 40), var(--tut-dim, 0.55));
  pointer-events: none;
  transition: all 280ms var(--ease-out);
}
.tut-ring {
  position: absolute;
  border-radius: 12px;
  pointer-events: none;
  box-shadow: 0 0 0 2px var(--bt-blue), 0 0 0 5px rgba(60, 1, 247, 0.22);
  transition: all 280ms var(--ease-out);
}
.tut-ring.pulse { animation: tut-pulse 1.7s var(--ease-out) infinite; }
@keyframes tut-pulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--bt-blue), 0 0 0 4px rgba(60, 1, 247, 0.30); }
  55%      { box-shadow: 0 0 0 2px var(--bt-blue), 0 0 0 14px rgba(60, 1, 247, 0); }
}

/* coachmark card */
.tut-card {
  position: absolute;
  width: 344px;
  background: #fff;
  border-radius: 14px;
  padding: 18px 20px 16px;
  box-shadow: var(--shadow-pop-strong);
  pointer-events: auto;
  animation: tut-card-in 240ms var(--ease-out);
  z-index: 2;
}
@keyframes tut-card-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.tut-arrow {
  position: absolute;
  width: 14px; height: 14px;
  background: #fff;
  transform: rotate(45deg);
}
.tut-arrow.arrow-left   { left: -6px;  transform: translateY(-50%) rotate(45deg); box-shadow: -3px 3px 6px rgba(10,10,18,0.06); }
.tut-arrow.arrow-right  { right: -6px; transform: translateY(-50%) rotate(45deg); box-shadow: 3px -3px 6px rgba(10,10,18,0.06); }
.tut-arrow.arrow-top    { top: -6px;   transform: translateX(-50%) rotate(45deg); box-shadow: -3px -3px 6px rgba(10,10,18,0.05); }
.tut-arrow.arrow-bottom { bottom: -6px; transform: translateX(-50%) rotate(45deg); box-shadow: 3px 3px 6px rgba(10,10,18,0.06); }

.tut-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 10px;
}
.tut-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink-400);
  display: inline-flex; align-items: center; gap: 6px;
}
.tut-eyebrow-module { color: var(--bt-blue); }
.tut-eyebrow-sep { color: var(--ink-300); }
.tut-skip {
  background: none; border: 0; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 500;
  color: var(--ink-400); padding: 2px 0; flex-shrink: 0;
  transition: color 140ms var(--ease-out);
}
.tut-skip:hover { color: var(--ink-700); text-decoration: underline; }

.tut-progress {
  height: 3px; border-radius: 999px; background: var(--ink-150);
  overflow: hidden; margin-bottom: 14px;
}
.tut-progress-fill {
  height: 100%; background: var(--bt-blue);
  border-radius: 999px; transition: width 320ms var(--ease-out);
}

.tut-card-title {
  margin: 0 0 6px;
  font-size: 17px; font-weight: 700; line-height: 22px;
  letter-spacing: -0.01em; color: var(--ink-900);
}
.tut-card-body {
  margin: 0; font-size: 13.5px; line-height: 20px;
  color: var(--ink-500); text-wrap: pretty;
}
.tut-card-bullets {
  margin: 8px 0 0; padding: 0 0 0 16px;
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12.5px; line-height: 18px; color: var(--ink-500);
}
.tut-card-bullets li { padding-left: 2px; }
.tut-card-bullets {
  margin: 8px 0 0; padding: 0 0 0 16px;
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12.5px; line-height: 18px; color: var(--ink-500);
}
.tut-card-bullets li { padding-left: 2px; }

.tut-action {
  margin-top: 12px; padding: 9px 12px;
  background: rgba(0, 158, 81, 0.08);
  border-radius: 9px;
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 600; color: var(--bt-green);
}
.tut-action-dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--bt-green); flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(0, 158, 81, 0.5);
  animation: tut-dot 1.6s var(--ease-out) infinite;
}
@keyframes tut-dot {
  0%   { box-shadow: 0 0 0 0 rgba(0, 158, 81, 0.45); }
  70%  { box-shadow: 0 0 0 7px rgba(0, 158, 81, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 158, 81, 0); }
}

.tut-card-foot {
  margin-top: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.tut-btn {
  height: 36px; padding: 0 14px;
  border-radius: 999px; border: 0; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px;
  transition: all 140ms var(--ease-out);
}
.tut-btn.ghost { background: transparent; color: var(--ink-500); padding-left: 6px; }
.tut-btn.ghost:hover:not(:disabled) { color: var(--ink-900); }
.tut-btn.ghost:disabled { opacity: 0; pointer-events: none; }
.tut-btn.primary { background: var(--bt-blue); color: #fff; }
.tut-btn.primary:hover:not(:disabled) { background: var(--bt-blue-deep); }
.tut-btn.primary:disabled { background: var(--ink-200, #e2e2e6); color: var(--ink-400, #a0a0aa); cursor: not-allowed; }
.tut-btn.secondary {
  background: #fff; color: var(--ink-500);
  border: 1px solid var(--ink-200);
}
.tut-btn.secondary:hover { border-color: var(--ink-400); color: var(--ink-700); }

/* ============================================================
   TUTORIAL MODALS (welcome / completion)
   ============================================================ */
.tut-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(18, 16, 40, 0.5);
  backdrop-filter: blur(2px);
  z-index: 400;
  display: grid; place-items: center;
  animation: fade-in 240ms var(--ease-out);
}
.tut-modal {
  width: 480px; max-width: calc(100% - 48px);
  background: #fff; border-radius: 18px;
  padding: 32px 34px 28px;
  box-shadow: var(--shadow-pop-strong);
  animation: pop-in 280ms var(--ease-pop);
}
.tut-modal-badge {
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--bt-blue-soft); color: var(--bt-blue);
  display: grid; place-items: center; margin-bottom: 18px;
}
.tut-modal-badge.done { background: var(--bt-green-bg); color: var(--bt-green); border-radius: 50%; }
.tut-modal-eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--bt-blue);
}
.tut-modal-title {
  margin: 6px 0 12px;
  font-size: 24px; font-weight: 700; line-height: 28px;
  letter-spacing: -0.015em; color: var(--ink-900);
}
.tut-modal-text {
  margin: 0; font-size: 14px; line-height: 22px;
  color: var(--ink-500); text-wrap: pretty;
}
.tut-modal-list {
  list-style: none; margin: 20px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.tut-modal-list li {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; font-weight: 500; color: var(--ink-900);
  padding: 9px 0; border-top: 1px solid var(--ink-150);
}
.tut-modal-list li:last-child { border-bottom: 1px solid var(--ink-150); }
.tut-li-num {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: var(--bt-blue-soft); color: var(--bt-blue);
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}

.tut-modal-recap {
  list-style: none; margin: 16px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.tut-modal-recap li { display: flex; gap: 12px; align-items: flex-start; }
.tut-recap-check {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; margin-top: 1px;
  background: var(--bt-green); color: #fff;
  display: grid; place-items: center;
}
.tut-modal-recap li div { display: flex; flex-direction: column; gap: 1px; }
.tut-modal-recap li b { font-size: 14px; font-weight: 600; color: var(--ink-900); }
.tut-modal-recap li span:not(.tut-recap-check) { font-size: 13px; line-height: 18px; color: var(--ink-500); }

.tut-modal-actions {
  margin-top: 26px;
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
}
.tut-btn-lg {
  height: 44px; padding: 0 22px;
  border-radius: 999px; border: 0; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px;
  transition: all 150ms var(--ease-out);
}
.tut-btn-lg.ghost { background: transparent; color: var(--ink-500); }
.tut-btn-lg.ghost:hover { background: var(--ink-100); color: var(--ink-700); }
.tut-btn-lg.primary { background: var(--bt-blue); color: #fff; box-shadow: 0 2px 8px rgba(60,1,247,0.28); }
.tut-btn-lg.primary:hover { background: var(--bt-blue-deep); }
.tut-btn-lg.primary:active { transform: scale(0.98); }

/* ============================================================
   TUTOR-LED ASSESSMENT
   ============================================================ */
.pre-badge {
  display: inline-block;
  vertical-align: middle;
  background: rgba(250, 134, 209, 0.22);
  color: #c0277f;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 6px;
  margin-right: 8px;
  position: relative;
  top: -1px;
}
.assess-head h2 { line-height: 26px; }
.assess-subtitle {
  font-size: 14px;
  color: var(--ink-500);
  margin-top: -8px;
}

.assess-toolrow {
  display: flex; align-items: center;
  gap: 20px;
  margin-top: -2px;
}
.tools-link {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--bt-blue);
  font-weight: 500; font-size: 14px;
  cursor: pointer; text-decoration: none;
}
.tools-link svg { color: var(--bt-blue); }
.tools-link:hover { opacity: 0.72; }

.assess-controls-row {
  display: flex; align-items: center;
  gap: 12px;
}

/* Choose Student dropdown (reuses .select machinery, purple-outlined) */
.choose-student { width: 200px; }
.choose-student .select-trigger { border-color: var(--bt-blue); }
.choose-student .select-trigger .cs-label { color: var(--ink-400); font-weight: 400; }
.choose-student .select-trigger:not(.placeholder) .cs-label { color: var(--bt-blue); font-weight: 600; }
.choose-student .select-trigger .chev { color: var(--bt-blue); }
.cs-action { color: var(--ink-900); font-weight: 500; }
.cs-action.results { color: var(--bt-blue); font-weight: 600; }
.cs-divider { height: 1px; background: var(--ink-150); margin: 4px 0; }

/* Launch for Student — solid blue until launched, then white-with-blue-outline */
.assess-launch-btn {
  height: 44px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--bt-blue);
  border: 1.5px solid var(--bt-blue);
  color: #fff;
  font-weight: 600; font-size: 14px;
  white-space: nowrap;
  transition: all 150ms var(--ease-out);
  flex-shrink: 0;
}
.assess-launch-btn:hover:not(:disabled) { background: var(--bt-blue-deep); border-color: var(--bt-blue-deep); }
.assess-launch-btn:active:not(:disabled) { transform: scale(0.98); }
/* After launch (or while viewing results): secondary white + blue outline */
.assess-launch-btn.outline {
  background: #fff;
  border-color: var(--bt-blue);
  color: var(--bt-blue);
  cursor: default;
}
/* No student chosen yet: muted/disabled */
.assess-launch-btn.is-empty {
  background: var(--ink-150);
  border-color: var(--ink-200);
  color: var(--ink-400);
  cursor: not-allowed;
}

.assess-empty {
  font-size: 14px;
  color: var(--ink-500);
  text-align: center;
  margin: 48px auto 0;
  max-width: 380px;
  line-height: 22px;
}
.assess-empty b { color: var(--ink-700); font-weight: 600; }

/* Tutor question screen */
.assess-question {
  display: flex; flex-direction: column;
  gap: 18px;
  flex: 1;
  min-height: 0;
}
.assess-q-label { font-size: 14px; color: var(--ink-500); font-weight: 500; }
.assess-q-grid {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 32px;
  align-items: start;
}
.assess-q-left { display: flex; flex-direction: column; gap: 16px; }
.assess-q-prompt {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 16px; font-weight: 600; line-height: 22px;
  color: var(--ink-900);
}

/* Letter stimulus box */
.assess-letter-box {
  position: relative;
  background: #fff;
  border: 2px solid var(--ink-900);
  border-radius: 12px;
  height: 150px;
  width: 100%;
  max-width: 340px;
  display: grid; place-items: center;
}
.assess-letter-box.big { height: 300px; max-width: 100%; }
.assess-box-speaker { position: absolute; top: 8px; left: 8px; z-index: 2; }
.assess-letter {
  font-size: 96px; font-weight: 700; line-height: 1;
  color: var(--ink-900);
  font-family: 'Poppins', sans-serif;
}
.assess-letter-box.big .assess-letter { font-size: 168px; }

/* Correct / Incorrect options */
.assess-options {
  display: flex; flex-direction: column;
  gap: 18px; padding-top: 26px;
}
.assess-radio {
  display: inline-flex; align-items: center; gap: 11px;
  font-size: 15px; color: var(--ink-900);
  background: transparent;
}
.assess-radio-dot {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--ink-300);
  display: grid; place-items: center;
  color: #fff;
  flex-shrink: 0;
  transition: all 160ms var(--ease-out);
}
.assess-radio:hover .assess-radio-dot { border-color: var(--ink-400); }
.assess-radio.on .assess-radio-dot { background: var(--bt-blue); border-color: var(--bt-blue); }
.assess-radio-fill { width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.assess-radio.on .assess-radio-label { font-weight: 600; }

/* Next button row */
.assess-next-row {
  display: flex; justify-content: flex-end;
  margin-top: auto; padding-top: 24px;
}
.assess-next {
  height: 50px; padding: 0 32px;
  border-radius: 999px;
  background: var(--bt-blue); color: #fff;
  font-weight: 600; font-size: 16px;
  display: inline-flex; align-items: center; gap: 10px;
  transition: all 140ms var(--ease-out);
}
.assess-next:hover:not(.disabled):not(:disabled) { background: var(--bt-blue-deep); }
.assess-next:active:not(.disabled):not(:disabled) { transform: scale(0.98); }
.assess-next.disabled, .assess-next:disabled {
  background: var(--ink-200); color: var(--ink-400); cursor: not-allowed;
}

/* Results table — score cell shows "X/3" over "Completed" */
.assess-table .score-row td.assess-score-cell {
  text-align: center;
  font-style: normal;
}
.assess-score-num { display: block; font-size: 14px; font-weight: 700; }
.assess-score-sub { display: block; font-size: 11px; font-weight: 500; font-style: italic; opacity: 0.85; }

/* Student question screen (question only) */
.assess-student-prompt {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 18px; font-weight: 600; line-height: 24px;
  color: var(--ink-900);
}

/* ============================================================
   STUDENT-DRIVEN ASSESSMENT
   - Tutor drawer mirrors Activities (one "Launch for Students").
   - Student answers on their own screen: question + radio options + Next.
   - Live results show green (correct) / red (incorrect) only — no orange.
   ============================================================ */
.sd-head-students {
  font-weight: 400;
  font-size: 15px;
  color: var(--ink-500);
}
.sd-launch-row {
  margin: 4px 0 18px;
}
.launch-btn.sd-relaunch { background: var(--bt-blue); color: #fff; }

/* Results table — truncate long answers with an ellipsis (matches the spec) */
.sd-cell-text {
  display: inline-block;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.sd-table td.answer-key { font-weight: 700; }
.sd-table td.answer-key .sd-cell-text { max-width: 110px; }
.sd-key-emoji {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  border: 1.5px solid var(--ink-900);
  border-radius: 8px;
  font-size: 26px; line-height: 1;
}

/* Student screen — question + help on the left, options on the right */
.sd-question-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 32px;
  align-items: start;
  flex: 1;
}
.sd-q-text {
  margin: 0;
  font-size: 18px; font-weight: 700; line-height: 25px;
  color: var(--ink-900);
}
.sd-q-instruction {
  margin: 8px 0 0;
  font-size: 15px; color: var(--ink-700);
}

/* Help / examples box */
.sd-help {
  margin-top: 16px;
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 14px; line-height: 21px;
  color: var(--ink-900);
}
.sd-help-head {
  display: flex; align-items: flex-start; gap: 9px;
  margin-bottom: 14px;
}
.sd-help-line { margin: 12px 0 6px; }
.sd-help-bullets, .sd-help-nums {
  margin: 0 0 4px; padding-left: 26px;
}
.sd-help-bullets li, .sd-help-nums li { margin: 2px 0; }
.sd-help-bullets { list-style: disc; }
.sd-help-nums { list-style: decimal; }
.sd-help-note { margin: 10px 0 0; }

/* Radio options */
.sd-options {
  display: flex; flex-direction: column;
  gap: 20px;
  padding-top: 2px;
}
.sd-option {
  display: inline-flex; align-items: center; gap: 13px;
  background: transparent; border: 0;
  font-family: 'Poppins', sans-serif;
  font-size: 16px; color: var(--ink-900);
  text-align: left; cursor: pointer;
  padding: 0;
}
.sd-radio {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--ink-300);
  display: inline-grid; place-items: center;
  flex-shrink: 0;
  transition: border-color 140ms var(--ease-out);
}
.sd-option:hover .sd-radio { border-color: var(--ink-400); }
.sd-option.on .sd-radio { border-color: var(--bt-blue); }
.sd-radio-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--bt-blue);
}
.sd-option.on .sd-option-label { font-weight: 600; }

/* ---- Phonics SD student screen (picture + letter tiles) ---- */
.sd-phon-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 32px;
  align-items: start;
  margin-top: 8px;
}
.sd-phon-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px 18px 18px;
}
.sd-phon-head {
  display: flex; align-items: center; gap: 9px;
  font-size: 16px; font-weight: 700; color: var(--ink-900);
}
.sd-phon-instruction {
  display: flex; align-items: flex-start; gap: 9px;
  margin-top: 12px;
  font-size: 14px; color: var(--ink-500);
  line-height: 1.45;
}
.sd-phon-instruction .speaker.sm { margin-top: 1px; }
.sd-phon-pic-wrap { position: relative; margin-top: 14px; }
.sd-phon-pic-wrap > .speaker { position: absolute; top: 8px; left: 8px; z-index: 2; }
.sd-phon-pic {
  background: #0e0e12;
  border-radius: 10px;
  height: 214px;
  display: grid; place-items: center;
  overflow: hidden;
}
.sd-phon-pic span { font-size: 132px; line-height: 1; }

.sd-phon-right { padding-top: 6px; }
.sd-phon-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 30px;
  justify-items: center;
  padding: 6px 4px;
}
.sd-phon-tile {
  position: relative;
  width: 100%; max-width: 112px; aspect-ratio: 1 / 1;
  background: var(--bt-blue-tile);
  border: 2px solid transparent;
  border-radius: 12px;
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform 160ms var(--ease-pop), box-shadow 160ms var(--ease-out), border-color 140ms var(--ease-out);
}
.sd-phon-tile:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(60,1,247,0.18); }
.sd-phon-tile.on { border-color: var(--bt-blue); }
.sd-phon-letter {
  font-size: 54px; font-weight: 700; color: var(--ink-900);
  font-family: 'Poppins', sans-serif; line-height: 1;
}
.sd-phon-radio {
  position: absolute;
  bottom: -13px; left: 50%; transform: translateX(-50%);
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff;
  border: 2px solid var(--ink-300);
  display: grid; place-items: center;
  transition: border-color 140ms var(--ease-out);
}
.sd-phon-tile.on .sd-phon-radio { border-color: var(--bt-blue); }
.sd-phon-radio-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--bt-blue); }

.sd-row-emoji { margin-right: 7px; font-size: 16px; }

/* Next / Submit button */
.sd-actions {
  display: flex; justify-content: flex-end;
  margin-top: auto; padding-top: 24px;
}
