* { box-sizing: border-box; }
body {
  font-family: -apple-system, system-ui, sans-serif;
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
  background: #fafafa;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}
h1 { margin: 0; font-size: 1.25rem; }
#module-nav { font-size: 0.8rem; color: #666; margin-top: 0.25rem; }
#module-nav a { color: #0066cc; text-decoration: none; margin-right: 0.25rem; }
#module-nav a:hover { text-decoration: underline; }
.controls { display: flex; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.controls label { font-size: 0.85rem; display: flex; flex-direction: column; }
#chat-window {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  min-height: 300px;
  padding: 1rem;
  margin-bottom: 1rem;
  overflow-y: auto;
  max-height: 60vh;
}
.message { margin-bottom: 1rem; }
.message.user { text-align: right; }
.message .bubble {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  max-width: 80%;
  white-space: pre-wrap;
}
.message.user .bubble { background: #0066cc; color: white; }
.message.assistant .bubble { background: #eee; }
#metrics {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.5rem;
}
#chat-form { display: flex; gap: 0.5rem; }
#chat-form textarea { flex: 1; padding: 0.5rem; border-radius: 6px; border: 1px solid #ccc; }
button {
  padding: 0.5rem 1rem;
  background: #0066cc;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
button:hover { background: #0052a3; }
