/* ================================================================
   STUDY MODE (concept tutor) — conceptual/tutor/study.js + study_view.js.

   Lives in the Concept Chat page's light DOM, beside the Deep Chat root.
   Same column as the chat (760px), a scrolling thread above a fixed dock.
   Every colour is a token from styles/variables.css.
   ================================================================ */

/* Study is the whole page (Seth, 2026-10-04): the Ask header goes (study.js
   sets [hidden] on it). The timer at the top is the SHARED #practice-notch:
   practice/notch-menu.js draws Study's clock on it, with the same Pause as a
   drill (2026-10-06); its look is styles/practice/notch-menu.css. */
#concept-chat-head[hidden] { display: none; }

#concept-study-root {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: min(760px, 100%);
  margin: 0 auto;
  box-sizing: border-box;
  padding: 0 16px;
}

#concept-study-root[hidden],
#concept-chat-root[hidden] { display: none; }

/* ---- the thread: a chat, not a stack of cards (Seth, 2026-10-06) --------
   The tutor's turns are bare prose in the reading face, the learner's are
   right-hand bubbles, quotes are a thin rule and a quieter voice. Nothing is
   boxed, nothing is labelled. */
.ct-thread {
  position: relative;  /* offsetTop of a message is measured from here (study.js scrollThread) */
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 28px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  scrollbar-gutter: stable;
}

.ct-msg {
  font-family: var(--prose-font);
  font-size: 17.5px;
  line-height: 1.62;
  color: var(--text);
  animation: ct-rise 0.32s ease both;
}

@keyframes ct-rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ct-msg, .ct-bubble, .ct-thinking span { animation: none; }
}

/* Already on screen before this render (study.js `onScreen`): render()
   rebuilds the thread, and a message that was already there must not fade
   out and rise in again. */
.ct-msg.ct-still, .ct-bubble.ct-still { animation: none; }

#page-concept-chat .ct-title {
  margin: 0 0 12px;
  font-family: var(--prose-heading);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--prose-head);
}

.ct-prose p { margin: 0 0 14px; }
.ct-prose p:last-child { margin-bottom: 0; }
.ct-question .ct-prose { color: var(--prose-head); }

.ct-passage { margin: 16px 0; }
.ct-passage:last-child { margin-bottom: 0; }

.ct-passage blockquote {
  margin: 0;
  padding: 1px 0 1px 18px;
  border-left: 3px solid var(--border-strong);
  color: var(--text);
  opacity: 0.8;
  white-space: pre-wrap;
}

.ct-passage .ct-passage-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px;
  line-height: 1.55;
}

.ct-passage figcaption { padding-left: 21px; }
/* A source passage read as prose (study_view.js sourceText): lists and
   tables are real elements, and an AMBOSS image shows above its text. */
.ct-passage .ct-passage-read { white-space: normal; }
.ct-passage-read .ct-prose > p:first-child { margin-top: 0; }
.ct-passage-img {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  margin: 6px 0 10px;
  border-radius: 8px;
  background: var(--img-mat);
}

/* A lesson's interactive figure (conceptual/tutor/figure.js). */
.ct-figure {
  margin: 14px 0 0;
  padding: 10px 12px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-deep);
}

.ct-figure-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.ct-figure-frame {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
  border-radius: 6px;
  background: transparent;
}

.ct-figure-caption {
  margin: 8px 0 0;
  line-height: 1.55;
  color: var(--text);
}

.ct-cite {
  margin-top: 6px;
  font-family: var(--ui-font);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted-dim);
}

.ct-cite a { color: var(--muted); text-decoration-color: var(--border-strong); text-underline-offset: 2px; }
.ct-cite a:hover { color: var(--prose-link); }

.ct-hint {
  margin: 18px 0 0;
  font-family: var(--ui-font);
  font-size: 13px;
  color: var(--muted);
}

.ct-status {
  margin: 0;
  font-family: var(--ui-font);
  font-size: 14px;
  color: var(--muted);
}

.ct-options { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

/* Bank questions (Step 3): `a | b` rows become a table; question pictures. */
.ct-table-wrap { overflow-x: auto; margin: 10px 0; }
.ct-table { border-collapse: collapse; font-family: var(--ui-font); font-size: 14px; color: var(--text); }
.ct-table th, .ct-table td { border: 1px solid var(--border); padding: 4px 10px; text-align: left; vertical-align: top; }
.ct-table th { font-weight: 600; }
.ct-qimg { display: block; max-width: 100%; max-height: 420px; margin: 12px 0; border-radius: 8px; border: 1px solid var(--border); }
/* A bank question's exam video, and a UWorld picture we have only in words (study_view.js). */
.ct-qvideo { margin: 12px 0; }
.ct-qvideo iframe { display: block; width: 100%; max-width: 560px; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; }
.ct-qvideo a { display: inline-block; margin-top: 6px; font-family: var(--ui-font); font-size: 14px; }
.ct-fig-note { margin: 12px 0; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 8px; color: var(--muted); font-size: 0.95em; }

.ct-option {
  font-family: var(--ui-font);
  font-size: 15px;
  line-height: 1.45;
  text-align: left;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 14px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.ct-option:hover:not(:disabled) { border-color: var(--border-strong); background: var(--input-bg); }
.ct-option.is-picked { border-color: var(--info); background: rgb(var(--info-rgb) / 0.1); }
.ct-option:disabled { cursor: default; opacity: 0.85; }
/* Graded (Seth, 2026-10-07): the right answer on a dark green ground with a
   light green edge, a wrong pick the same in red (study_view.js question()). */
.ct-option.is-right,
.ct-option.is-wrong { opacity: 1; }
.ct-option.is-right { border-color: var(--ok); background: rgb(var(--ok-rgb) / 0.22); box-shadow: 0 0 0 1px var(--ok) inset; }
.ct-option.is-wrong { border-color: var(--danger); background: rgb(var(--danger-rgb) / 0.22); box-shadow: 0 0 0 1px var(--danger) inset; }

/* The learner's turns: a soft bubble on the right, in the UI face. */
.ct-bubble {
  max-width: 82%;
  padding: 11px 16px;
  border-radius: 18px;
  font-family: var(--ui-font);
  font-size: 15px;
  line-height: 1.55;
  animation: ct-rise 0.24s ease both;
}

.ct-bubble p { margin: 0; white-space: pre-wrap; }
.ct-learner { align-self: flex-end; background: var(--surface-2); color: var(--text); }
.ct-tutor { align-self: stretch; }

/* The tutor is working. */
.ct-thinking { display: flex; gap: 6px; padding: 4px 0; }
.ct-thinking span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: ct-dot 1.2s ease-in-out infinite;
}
.ct-thinking span:nth-child(2) { animation-delay: 0.15s; }
.ct-thinking span:nth-child(3) { animation-delay: 0.3s; }

@keyframes ct-dot {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

.ct-link {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.ct-link.ct-stance-correct { text-decoration-color: var(--ok); }
.ct-link.ct-stance-partial { text-decoration-color: var(--warn); }
.ct-link.ct-stance-misused { text-decoration-color: var(--danger); }
.ct-link.ct-stance-named,
.ct-link.ct-stance-asked { text-decoration-color: var(--muted); }
.ct-link.is-inferred { text-decoration-style: dotted; }
.ct-link.is-disputed { text-decoration-line: line-through; opacity: 0.7; }

.ct-pop {
  position: relative;
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 6px 18px var(--shadow-soft);
  font-size: 13px;
}

.ct-pop-title { font-weight: 600; color: var(--text); }
.ct-pop-sub { color: var(--muted); margin: 4px 0 8px; }

.ct-answer-key { margin: 0 0 12px; font-weight: 600; color: var(--prose-head); }

.ct-dock {
  flex: 0 0 auto;
  padding: 8px 0 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* The chat bubbles float over the bottom corners (Tutor, and Seth's console;
   feedback-widget/). Once the 760px column reaches them, the dock's last row
   ends under one, and that row's right end is the voice-mode mic (Seth,
   2026-10-09: "the button is hidden under the chat button"). Lift the dock
   clear of the 56px bubble + its 20px inset. */
@media (max-width: 980px) {
  .ct-dock { padding-bottom: 88px; }
}

.ct-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-row:empty { display: none; }

.ct-btn {
  font-family: var(--ui-font);
  font-size: 14px;
  color: var(--on-accent);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 9px 18px;
  cursor: pointer;
}

.ct-btn:hover:not(:disabled) { background: var(--accent-dark); }
.ct-btn:disabled { opacity: 0.5; cursor: default; }

.ct-btn-ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--border);
}

.ct-btn-ghost:hover:not(:disabled) { background: rgb(var(--tint-rgb) / calc(0.06 * var(--tint-k))); }

.ct-answer {
  font-family: var(--ui-font);
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 16px;
  box-sizing: border-box;
  width: 100%;
  resize: vertical;
  min-height: 96px;
  line-height: 1.5;
  box-shadow: 0 2px 10px var(--shadow-soft);
}

.ct-answer:focus { outline: none; border-color: var(--border-strong); }
.ct-answer-label { resize: none; border-radius: 999px; padding: 10px 18px; }

/* A CCS case's Physical exam button: its 12 systems float above it (case_exam.js). */
.ct-exam { position: relative; display: inline-flex; }
.ct-exam-menu {
  position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 20;
  display: flex; flex-direction: column; min-width: 220px; max-height: min(60vh, 420px); overflow-y: auto;
  padding: 4px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface);
  box-shadow: 0 -14px 36px var(--shadow-soft);
}
.ct-exam-menu[hidden] { display: none; }
.ct-exam-item {
  text-align: left; padding: 7px 10px; border: none; border-radius: 7px; background: none; cursor: pointer;
  font: 14px var(--ui-font); color: var(--text);
}
.ct-exam-item:hover, .ct-exam-item:focus-visible { outline: none; background: rgb(var(--tint-rgb) / calc(0.06 * var(--tint-k))); }

/* A CCS case's findings so far (case_results.js "Get results"), above the answer box. */
.ct-case-results { margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.ct-case-results-h { margin: 0 0 6px; font: 600 13px var(--ui-font); color: var(--muted); }
.ct-case-results-list { display: flex; flex-direction: column; gap: 8px; max-height: min(40vh, 360px); overflow-y: auto; }
.ct-case-result-h { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font: 14px var(--ui-font); color: var(--text); }
.ct-case-result.is-new .ct-case-result-h strong { text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.ct-case-result-when { font-size: 12px; color: var(--muted); }
.ct-case-result-text { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 12.5px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); }
.ct-case-results-note { margin: 8px 0 0; font: 13px var(--ui-font); color: var(--muted); }

/* ---- talking back after the feedback (study_view.js chatBox) -------------
   A chat box with its send arrow inside, Continue beside it: keep talking, or
   move on to the next question. */
.ct-compose { display: flex; align-items: flex-end; gap: 10px; }

.ct-chat {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px 8px 8px 16px;
  box-shadow: 0 2px 10px var(--shadow-soft);
  transition: border-color 0.12s ease;
}

.ct-chat:focus-within { border-color: var(--border-strong); }

.ct-chat-input {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--ui-font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: none;
  resize: none;
  padding: 6px 0;
  max-height: 200px;
}

.ct-chat-input::placeholder { color: var(--muted-dim); }

.ct-send {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 0;
  background: var(--accent);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.12s ease, opacity 0.12s ease;
}

.ct-send:hover:not(:disabled) { background: var(--accent-dark); }
.ct-send:disabled { opacity: 0.35; cursor: default; }

/* An up arrow drawn with borders: no icon font, no SVG string to sanitise. */
.ct-send-glyph {
  width: 9px;
  height: 9px;
  border-left: 2px solid var(--on-accent);
  border-top: 2px solid var(--on-accent);
  transform: translateY(2px) rotate(45deg);
}

.ct-continue { flex: 0 0 auto; height: 52px; padding: 0 22px; border-radius: 14px; font-weight: 600; }

@media (max-width: 520px) {
  .ct-compose { flex-direction: column; align-items: stretch; }
  .ct-continue { height: 44px; }
}

.ct-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--danger);
  background: rgb(var(--danger-rgb) / 0.08);
  border-radius: 8px;
  padding: 8px 12px;
}

/* ---- wrong parts + margin notes (study_view.js answer / alignNotes) -------
   A graded answer with wrong sentences becomes a two-column block: the answer
   on the left with each wrong stretch in red, the tutor's note level with it
   on the right. Under 760px the notes stack below the answer instead. */
.ct-review {
  align-self: stretch;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 300px);
  gap: 14px;
  align-items: start;
}

.ct-review .ct-learner { max-width: none; align-self: start; justify-self: end; }

mark.ct-wrong {
  color: inherit;
  background: rgb(var(--danger-rgb) / 0.16);
  border-bottom: 2px solid var(--danger);
  border-radius: 3px;
  padding: 0 1px;
  transition: background 0.12s ease;
}

mark.ct-wrong.is-hot { background: rgb(var(--danger-rgb) / 0.3); }

.ct-notes { position: relative; }

.ct-note {
  position: absolute;
  left: 0;
  right: 0;
  padding: 8px 11px;
  background: transparent;
  border: 0;
  border-left: 2px solid var(--danger);
  border-radius: 0;
  font-family: var(--ui-font);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text);
  transition: box-shadow 0.12s ease, top 0.15s ease;
}

.ct-note.is-hot { box-shadow: 0 4px 14px var(--shadow-soft); }

@media (max-width: 760px) {
  .ct-review { grid-template-columns: minmax(0, 1fr); }
  .ct-notes { position: static; display: flex; flex-direction: column; gap: 8px; min-height: 0 !important; }
  .ct-note { position: static; }
}

/* ---- a concept's lesson, re-read from a link (study.js showLesson) -------
   Over the jargon panel (z 200), under nothing: it is the one thing on screen. */
.ct-lesson-view {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 6vh 16px;
  background: var(--scrim-modal);
  overflow-y: auto;
}

.ct-lesson-panel {
  width: min(760px, 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ct-lesson-close { align-self: flex-end; background: var(--panel); }

/* ---- the same lesson opened in a new tab (kg_bridge.js openLessonMax) ----
   The arena's maximize bar (.kg-maxi, how-it-works.css) over a scrolling page. */
.ct-lesson-max-body {
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  padding: 24px 16px 48px;
}
.ct-lesson-panel .ct-title { margin: 0 0 8px; font-size: 19px; color: var(--prose-head); }

@media (max-width: 520px) {
  .ct-bubble { max-width: 100%; }
  .ct-msg { font-size: 16.5px; }
}

/* ---- image occlusion (diagram.js, 2026-10-07) ------------------------------
   The picture keeps its own aspect ratio; boxes sit on it in %. "ask": the
   masked picture (labels painted server-side) with the asked box in the
   accent; "reveal": the labelled picture with that box outlined. Pictures are
   slides, so they stay on a white plate in dark mode too. */
.ct-diagram { margin: 14px 0; }
.ct-diagram-stage {
  position: relative;
  width: 100%;
  background: var(--img-mat);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.ct-diagram-img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ct-diagram-box { position: absolute; box-sizing: border-box; border-radius: 3px; }
.ct-diagram-box.is-ask {
  background: var(--accent);
  border: 2px solid var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ct-diagram-q { color: var(--on-accent); font: 700 14px/1 var(--ui-font); }
.ct-diagram-box.is-reveal { border: 3px solid var(--accent); box-shadow: 0 0 0 2px var(--white); }
.ct-diagram-cap { margin-top: 6px; font: 13px/1.4 var(--ui-font); color: var(--muted); }


/* Line-aware prose (study_view.js paragraphs): a run of "- " lines is a list. */
.ct-prose .ct-list { margin: 0 0 14px; padding-left: 1.3em; }
.ct-prose .ct-list li { margin: 0 0 4px; }

/* A CCS case's review in the ccscases.com format (Seth, 2026-10-11): a card per
   answer-key line, green = ordered, red = should have ordered, blue = optional,
   grey = do not order / setting, and the level as five pills (study_view.js
   caseReview). UI face, smaller than the prose: it is a long key to scan. */
.ct-case { display: flex; flex-direction: column; gap: 18px; margin-top: 8px;
  font-family: var(--ui-font); font-size: 14px; line-height: 1.5; }
.ct-case-sec h4 { margin: 0 0 8px; font-size: 16px; font-weight: 600; color: var(--prose-head); }
.ct-case-row { margin: 0 0 8px; padding: 10px 12px; border-radius: 6px;
  background: var(--surface-2); border-left: 3px solid var(--muted); }
.ct-case-row.is-good { background: rgb(var(--ok-rgb) / 0.13); border-left-color: var(--ok); }
.ct-case-row.is-bad { background: rgb(var(--danger-rgb) / 0.13); border-left-color: var(--danger); }
.ct-case-row.is-optional { background: rgb(var(--info-rgb) / 0.13); border-left-color: var(--info); }
.ct-case-row.is-late { background: rgb(var(--warn-rgb) / 0.13); border-left-color: var(--warn); }
.is-late .ct-case-status, .is-late .ct-pills rect { color: var(--warn); fill: var(--warn); }
.ct-case-when { font-weight: 400; color: var(--muted); }
.ct-case-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ct-case-status { font-weight: 700; color: var(--muted); }
.is-good .ct-case-status, .is-good .ct-pills rect { color: var(--ok); fill: var(--ok); }
.is-bad .ct-case-status, .is-bad .ct-pills rect { color: var(--danger); fill: var(--danger); }
.is-optional .ct-case-status, .is-optional .ct-pills rect { color: var(--info); fill: var(--info); }
.ct-case-level { display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  font-size: 11px; color: var(--muted); flex: none; }
.ct-pills { width: 54px; height: 6px; display: block; }
.ct-pills rect { fill: var(--muted); }
.ct-pills rect.off { opacity: 0.25; }
.ct-case-order { margin: 4px 0 0; padding-left: 1.2em; color: var(--text); }
.ct-case-why { margin: 6px 0 0; font-size: 13px; color: var(--text); }
.ct-order-set { padding: 12px 14px; border: 1px solid var(--border); border-radius: 6px; }
.ct-order-set p { margin: 0 0 6px; }
.ct-order-set-sec { font-weight: 600; margin-top: 8px !important; }
.ct-order-set .ct-list { margin: 0 0 6px; padding-left: 1.3em; }
.ct-order-crit { color: var(--danger); font-weight: 600; }

/* ---- An authored lesson (study_view.js `authored`, Seth 2026-10-11) -------
   Reads as one lesson: quoted and connecting text look the same, and each
   block's source is a small pill that opens the original passage. */
.ct-lesson-h {
  margin: 24px 0 8px;
  font-family: var(--prose-heading);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--prose-head);
}
.ct-lesson-p { margin: 0 0 14px; }
.ct-lesson-list { margin: 0 0 14px; padding-left: 1.3em; }
.ct-lesson-list li { margin: 0 0 5px; }
.ct-lesson-fig { margin: 18px 0 20px; }
.ct-lesson-fig img {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  border-radius: 8px;
  background: var(--img-mat);   /* the source pictures are drawn on white */
}
.ct-lesson-fig figcaption {
  margin-top: 8px;
  font-family: var(--ui-font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.ct-src-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 2px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 11.5px;
  line-height: 1.6;
  vertical-align: 2px;
  cursor: pointer;
}
.ct-src-pill:hover, .ct-src-pill:focus-visible { color: var(--text); border-color: var(--border-strong); }
.ct-src-pop {
  display: block;
  max-width: 640px;
  max-height: 340px;
  overflow-y: auto;
  font-family: var(--ui-font);
}
.ct-src-text { margin: 6px 0 8px; font-family: var(--prose-font); font-size: 14.5px; line-height: 1.55; color: var(--text); }
.ct-src-text p { margin: 0 0 8px; }
.ct-src-link { font-size: 12.5px; color: var(--prose-link); text-underline-offset: 2px; }

.ct-examples { margin-top: 28px; }
.ct-example {
  margin: 12px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-deep);
}
.ct-example-title { margin-bottom: 6px; font-family: var(--ui-font); font-size: 14px; font-weight: 600; color: var(--text); }
.ct-example-problem { margin: 0 0 10px; }
.ct-example-steps { margin: 0 0 10px; padding-left: 1.3em; }
.ct-example-steps li { margin: 0 0 10px; }
.ct-example-plan { margin: 0 0 12px; }
.ct-example-label { font-family: var(--ui-font); font-size: 13px; font-weight: 600; color: var(--prose-head); }
.ct-example-why { margin-top: 3px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.ct-example-answer { margin: 0; font-weight: 600; color: var(--prose-head); }

/* A CCS case PLAYED in the dock: its own sheet, styles/conceptual/case_sim.css. */

/* An oral course (oral_view.js, dictate.js; Seth 2026-10-21, Paula's QI rotation):
   amber = what to tighten, dotted = filler words, red stays "wrong". */
mark.ct-trim {
  color: inherit;
  background: rgb(var(--warn-rgb) / 0.18);
  border-bottom: 2px solid var(--warn);
  border-radius: 3px;
  padding: 0 1px;
  transition: background 0.12s ease;
}
mark.ct-trim.is-hot { background: rgb(var(--warn-rgb) / 0.34); }
mark.ct-filler, mark.ct-trim span.ct-filler {
  color: var(--muted);
  background: transparent;
  text-decoration: underline dotted var(--warn);
  text-underline-offset: 3px;
}
.ct-note.ct-note-trim { border-left-color: var(--warn); }
.ct-delivery { margin: 0 0 10px; }
.ct-delivery-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.ct-delivery-bit {
  font-family: var(--ui-font); font-size: 12.5px; padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--border-strong); white-space: nowrap;
}
.ct-delivery-bit.is-warn { border-color: var(--warn); background: rgb(var(--warn-rgb) / 0.12); }
.ct-delivery-bit.is-ok { border-color: var(--ok); }
.ct-delivery-main, .ct-delivery-hint { margin: 8px 0 0; font-size: 14px; }
.ct-delivery-hint { font-family: var(--ui-font); font-size: 12.5px; opacity: 0.8; }
.ct-delivery-tight { margin: 12px 0 0; padding: 8px 12px; border-left: 2px solid var(--warn); }
.ct-delivery-tight p { margin: 0; }
.ct-delivery-label { font-family: var(--ui-font); font-size: 12.5px; opacity: 0.8; margin-bottom: 4px !important; }
.ct-dictate { display: inline-flex; align-items: center; gap: 8px; }
.ct-dictate.is-on .ct-dictate-btn { border-color: var(--danger); color: var(--danger); }
.ct-dictate-msg { font-family: var(--ui-font); font-size: 12.5px; color: var(--danger); }

/* A segmented lesson's "Part n of N" row (study_view.js segmentHead). */
.ct-seg { display: flex; align-items: center; gap: 10px; margin: -4px 0 12px; font-size: 0.86rem; color: var(--muted); }
.ct-seg-dots { display: inline-flex; gap: 5px; }
.ct-seg-dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid currentColor; opacity: 0.55; }
.ct-seg-dot.done { background: currentColor; opacity: 0.55; }
.ct-seg-dot.now { background: var(--ok); border-color: var(--ok); opacity: 1; }
.ct-seg-label { font-weight: 600; }
