/* Augments Tailwind. Keep minimal. */

html, body { height: 100%; }
body { -webkit-font-smoothing: antialiased; }

/* Chat message bubbles — preserve whitespace + markdown-ish line breaks.
   Warm-neutral palette: white agent cards / subtly-greyed student bubbles on the
   stone-100 page, matching the landing and module-complete views. */
.bubble {
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.6;
  font-size: 0.9375rem; /* 15px */
}

.bubble.agent {
  background: #ffffff;
  border: 0.5px solid #e7e5e4; /* stone-200 */
  border-radius: 1rem; /* rounded-2xl */
  padding: 0.875rem 1.125rem;
  max-width: 92%;
  color: #1c1917; /* stone-900 */
}

.bubble.student {
  background: #f5f5f4; /* stone-100 — subtle differentiation from the white agent card */
  border: 0.5px solid #e7e5e4; /* stone-200 */
  color: #1c1917; /* stone-900 */
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  max-width: 80%;
  margin-left: auto;
}

.bubble.system {
  background: #fafaf9; /* stone-50 — calm, no bright accent */
  border: 0.5px dashed #d6d3d1; /* stone-300 */
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: #57534e; /* stone-600 */
  max-width: 92%;
}

/* Light typographic emphasis when agent uses **bold** */
.bubble.agent strong { font-weight: 600; color: #1c1917; }

/* Status indicator dot for streaming */
.streaming-cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: #a8a29e; /* stone-400 */
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.9s infinite;
}
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.2; }
}

/* Inspect panel — readable monospace for state */
#inspect-body pre {
  font-family: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-all;
  background: #fafaf9; /* stone-50 */
  border: 0.5px solid #e7e5e4; /* stone-200 */
  color: #1c1917; /* stone-900 */
  border-radius: 6px;
  padding: 8px;
  max-height: 240px;
  overflow-y: auto;
}

.inspect-section h3 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #78716c; /* stone-500 */
  background: #fafaf9; /* stone-50 — calm section-header bar */
  padding: 0.25rem 0.5rem;
  border-radius: 5px;
  margin-bottom: 0.4rem;
}

.kv { display: grid; grid-template-columns: max-content 1fr; column-gap: 0.5rem; row-gap: 0.15rem; font-size: 12px; }
.kv .k { color: #78716c; } /* stone-500 */
.kv .v { color: #1c1917; word-break: break-all; } /* stone-900 */

.mastery-bar {
  display: inline-block;
  width: 100%;
  height: 6px;
  background: #e7e5e4; /* stone-200 — empty track */
  border-radius: 3px;
  overflow: visible; /* allow the threshold marker to extend slightly past the bar */
  position: relative;
}
/* Threshold marker — thin vertical stone-400 line at the 0.7 mastery threshold
   (uniform across this curriculum's LOs). */
.mastery-bar::after {
  content: "";
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: 70%;
  width: 1px;
  background: #a8a29e; /* stone-400 */
}
.mastery-bar > span {
  display: block;
  height: 100%;
  background: #44403c; /* stone-700 — filled */
  border-radius: 3px;
}
/* Status variants stay grayscale; the status text label carries the meaning. */
.mastery-bar.escalated > span { background: #a8a29e; /* stone-400 — escalated, not mastered */ }
.mastery-bar.in_progress > span { background: #78716c; /* stone-500 */ }
