/* ============================================================
   nu — ML teacher assistant styles
   Split-pane: chat (left) + reader (right)
   ============================================================ */

/* ---------- Layout ---------- */

/* Full-width body for nu lesson pages — must override common.css body rule */
body.nu-fullwidth {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.nu-fullwidth > main {
  padding: 0;
  margin: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body.nu-fullwidth .main-nav {
  padding: 0.5rem 1rem;
  margin-bottom: 0;
  flex-shrink: 0;
}

body.nu-fullwidth .flash-alerts {
  flex-shrink: 0;
}

.nu-app {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 0;
  width: 100%;
}

.nu-chat-pane {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--color-border);
  background: var(--color-bg);
  min-height: 0;
}

.nu-reader-pane {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  background: var(--color-bg-page);
  min-width: 0;
  min-height: 0;
}

/* ---------- Chat header ---------- */
.nu-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.nu-chat-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-dusty-blue);
}

.nu-user-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 10rem;
}

.nu-header-actions {
  display: flex;
  gap: 0.375rem;
  align-items: center;
}

/* ---------- Progress bar ---------- */
.nu-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
  max-width: 200px;
}

.nu-progress-track {
  flex: 1;
  height: 6px;
  background: var(--color-bg-subtle);
  border-radius: 3px;
  overflow: hidden;
}

.nu-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--color-dusty-blue);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.nu-progress-label {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* ---------- Messages ---------- */
.nu-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nu-message {
  max-width: 90%;
  padding: 0.625rem 0.875rem;
  border-radius: 12px;
  font-size: 0.9375rem;
  line-height: 1.5;
  word-wrap: break-word;
}

.nu-message-user {
  align-self: flex-end;
  background: var(--color-rose-light);
  color: var(--color-text);
  border-bottom-right-radius: 4px;
}

.nu-message-assistant {
  align-self: flex-start;
  background: var(--color-bg-subtle);
  color: var(--color-text);
  border-bottom-left-radius: 4px;
}

.nu-message-content p {
  margin: 0 0 0.5rem;
}

.nu-message-content p:last-child {
  margin-bottom: 0;
}

/* Per-message TTS button */
.nu-msg-tts-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.625rem;
  line-height: 22px;
  text-align: center;
  cursor: not-allowed;
  opacity: 0;
  transition: opacity 0.15s;
}

.nu-message {
  position: relative;
}

.nu-message:hover .nu-msg-tts-btn {
  opacity: 0.4;
}

.nu-msg-tts-btn:disabled {
  cursor: not-allowed;
}

/* ---------- Loading indicator ---------- */
.nu-loading {
  display: inline-flex;
  gap: 4px;
  padding: 0.5rem 0;
}

.nu-loading-dot {
  width: 8px;
  height: 8px;
  background: var(--color-dusty-blue);
  border-radius: 50%;
  animation: nu-bounce 1.2s ease-in-out infinite;
}

.nu-loading-dot:nth-child(2) { animation-delay: 0.2s; }
.nu-loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes nu-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* ---------- Input area ---------- */
.nu-input-area {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
  flex-shrink: 0;
  max-width: none;
}

#nu-input {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  height: auto;
  resize: none;
  overflow-y: hidden;
  border: 1px solid var(--color-border-input);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.4;
  background: var(--color-bg);
  color: var(--color-text);
}

#nu-input:focus {
  outline: none;
  border-color: var(--color-dusty-blue);
  box-shadow: 0 0 0 3px rgba(122, 174, 196, 0.25);
}

.nu-input-toolbar {
  display: flex;
  gap: 0.375rem;
  justify-content: flex-end;
}

/* ---------- Reader tabs ---------- */
.nu-reader-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border);
  padding: 0 1rem;
  background: var(--color-bg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-shrink: 0;
}

.nu-reader-tabs::-webkit-scrollbar {
  display: none;
}

.nu-tab {
  padding: 0.625rem 1rem;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}

.nu-tab:hover {
  color: var(--color-text);
}

.nu-tab-active {
  color: var(--color-dusty-blue);
  border-bottom-color: var(--color-dusty-blue);
}

/* ---------- Reader content ---------- */
.nu-reader-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 2rem;
}

.nu-section {
  display: none;
}

.nu-section-active {
  display: block;
}

.nu-step {
  margin-bottom: 2rem;
}

.nu-step h3 {
  font-size: 1.125rem;
  margin: 0 0 0.75rem;
  color: var(--color-text);
}

.nu-content-block {
  font-size: 1.0625rem;
  line-height: 1.7;
  margin: 0 0 0.25rem;
  color: var(--color-text);
}

.nu-question-prompt {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  background: var(--color-info-bg);
  border-left: 3px solid var(--color-dusty-blue);
  border-radius: 0 6px 6px 0;
  font-weight: 600;
  color: var(--color-info-text);
}

/* ---------- Reader controls ---------- */
.nu-reader-controls {
  display: flex;
  justify-content: flex-end;
  padding: 0.375rem 1rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

#nu-tts-btn {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- TTS word highlight (ready, disabled) ---------- */
.nu-word {
  transition: background 0.1s;
}

.nu-word-active {
  background: rgba(230, 128, 155, 0.3);
  border-radius: 2px;
}

/* ---------- Continue button ---------- */
.nu-continue-wrap {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0;
}

.nu-continue-btn {
  border: 1px solid var(--color-dusty-blue);
  color: var(--color-dusty-blue);
}

.nu-continue-btn:hover {
  background: var(--color-dusty-blue);
  color: #fff;
}

/* ---------- Locked input ---------- */
#nu-input:disabled {
  background: var(--color-bg-subtle);
  cursor: not-allowed;
  opacity: 0.6;
}

#nu-input.nu-code-input {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  tab-size: 4;
  white-space: pre;
}

/* ---------- Special message types ---------- */
.nu-message-hint {
  background: var(--color-warning-bg);
  border-left: 3px solid var(--color-warning-border);
}

.nu-message-rubric {
  background: var(--color-info-bg);
  border-left: 3px solid var(--color-info-border);
  font-size: 0.875rem;
}

.nu-message-agent {
  background: var(--color-bg-subtle);
  border-left: 3px solid var(--color-dusty-blue);
  font-size: 0.9rem;
}

.nu-message-random {
  background: #fff3e0;
  border-left: 3px solid var(--color-warning-border);
}

.nu-message-code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8125rem;
  white-space: pre-wrap;
  background: #1e1e2e;
  color: #cdd6f4;
}

.nu-message-code .nu-message-content {
  white-space: pre-wrap;
}

.nu-message-execution {
  background: #1e1e2e;
  color: #cdd6f4;
  border-left: 3px solid #89b4fa;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8125rem;
  white-space: pre-wrap;
  word-break: break-all;
}

.nu-message-execution .nu-message-content {
  white-space: pre-wrap;
}

/* ---------- Signup prompt ---------- */
.nu-signup-btn {
  display: inline-block;
  margin-top: 0.75rem;
  text-decoration: none;
}

/* ---------- Catalog page ---------- */
.nu-catalog {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.nu-catalog-header {
  margin-bottom: 2rem;
}

.nu-catalog-header h1 {
  font-size: 2rem;
  margin: 0;
  color: var(--color-dusty-blue);
}

.nu-subtitle {
  margin: 0.25rem 0 0;
  color: var(--color-text-muted);
  font-size: 1rem;
}

.nu-lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.nu-lesson-card {
  display: block;
  padding: 1.25rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.nu-lesson-card:hover {
  border-color: var(--color-dusty-blue);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.nu-lesson-card h2 {
  font-size: 1.125rem;
  margin: 0.5rem 0 0.375rem;
}

.nu-lesson-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.nu-subject-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.125rem 0.5rem;
  border-radius: 3px;
  background: var(--color-bg-subtle);
  color: var(--color-text-muted);
}

.nu-subject-language_arts { background: #f3e5f5; color: #7b1fa2; }
.nu-subject-literature { background: #f3e5f5; color: #6a1b9a; }
.nu-subject-writing { background: #ede7f6; color: #4527a0; }
.nu-subject-science { background: #e8f5e9; color: #2e7d32; }
.nu-subject-biology { background: #e8f5e9; color: #1b5e20; }
.nu-subject-chemistry { background: #e0f7fa; color: #00695c; }
.nu-subject-physics { background: #e8eaf6; color: #283593; }
.nu-subject-environmental_science { background: #f1f8e9; color: #33691e; }
.nu-subject-math { background: #fff3e0; color: #e65100; }
.nu-subject-algebra { background: #fff3e0; color: #bf360c; }
.nu-subject-geometry { background: #fff8e1; color: #f57f17; }
.nu-subject-statistics { background: #fff3e0; color: #e65100; }
.nu-subject-computer_science { background: #e3f2fd; color: #1565c0; }
.nu-subject-art { background: #fce4ec; color: #c62828; }
.nu-subject-music { background: #fce4ec; color: #880e4f; }
.nu-subject-history { background: #efebe9; color: #4e342e; }
.nu-subject-geography { background: #e0f2f1; color: #004d40; }
.nu-subject-government { background: #eceff1; color: #37474f; }
.nu-subject-economics { background: #fff9c4; color: #f9a825; }
.nu-subject-philosophy { background: #f3e5f5; color: #4a148c; }
.nu-subject-psychology { background: #fce4ec; color: #ad1457; }
.nu-subject-health { background: #e8f5e9; color: #388e3c; }
.nu-subject-general { background: var(--color-bg-subtle); color: var(--color-text-muted); }
.nu-subject-trades { background: #e8eaf6; color: #1a237e; }
.nu-subject-aerospace { background: #e3f2fd; color: #0d47a1; }
.nu-subject-automotive { background: #efebe9; color: #3e2723; }
.nu-subject-culinary { background: #fff8e1; color: #e65100; }
.nu-subject-nursing { background: #fce4ec; color: #b71c1c; }
.nu-subject-business { background: #e8eaf6; color: #283593; }
.nu-subject-agriculture { background: #e8f5e9; color: #1b5e20; }
.nu-subject-hvac { background: #e0f7fa; color: #006064; }
.nu-subject-plumbing { background: #e3f2fd; color: #01579b; }
.nu-subject-construction { background: #efebe9; color: #4e342e; }
.nu-subject-logistics { background: #f3e5f5; color: #4a148c; }
.nu-subject-aviation { background: #e8eaf6; color: #1a237e; }
.nu-subject-robotics { background: #e8eaf6; color: #283593; }
.nu-subject-environmental { background: #e8f5e9; color: #2e7d32; }
.nu-subject-law { background: #eceff1; color: #37474f; }
.nu-subject-finance { background: #fff9c4; color: #f57f17; }
.nu-subject-communications { background: #fce4ec; color: #880e4f; }
.nu-subject-engineering { background: #e3f2fd; color: #1565c0; }

/* ============================================================
   Catalog: search, create card, fork, user lessons
   ============================================================ */

/* Search bar */
.nu-catalog-controls {
  margin-bottom: 1.5rem;
}

.nu-search-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.nu-search-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border, #ddd);
  border-radius: 6px;
  font-size: 0.9375rem;
  background: var(--color-bg, #fff);
}

.nu-search-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border, #ddd);
  border-radius: 6px;
  background: var(--color-bg, #fff);
  cursor: pointer;
  font-size: 0.9375rem;
}

.nu-search-btn:hover { background: var(--color-hover, #f5f5f5); }

.nu-search-clear {
  font-size: 0.875rem;
  color: var(--color-muted, #888);
  text-decoration: none;
}

.nu-search-clear:hover { text-decoration: underline; }

/* Lesson card wrapper (holds card + fork/edit links) */
.nu-lesson-card-wrap {
  display: flex;
  flex-direction: column;
  position: relative;
}

.nu-lesson-card-wrap .nu-lesson-card {
  flex: 1;
}

/* Fork button */
.nu-fork-form {
  margin-top: 0.25rem;
}

.nu-fork-btn {
  width: 100%;
  padding: 0.375rem 0.5rem;
  background: transparent;
  border: 1px solid var(--color-border, #ddd);
  border-radius: 0 0 8px 8px;
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--color-muted, #666);
  transition: background 0.15s;
}

.nu-fork-btn:hover {
  background: var(--color-hover, #f5f5f5);
  color: var(--color-text, #222);
}

.nu-edit-link {
  display: block;
  text-align: center;
  padding: 0.25rem;
  font-size: 0.8125rem;
  color: var(--color-muted, #888);
  text-decoration: none;
}

.nu-edit-link:hover { text-decoration: underline; }

/* Visibility badge */
.nu-visibility-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.25rem;
}

.nu-visibility-private { background: #f3e5f5; color: #6a1b9a; }
.nu-visibility-unlisted { background: #fff3e0; color: #e65100; }
.nu-visibility-public { background: #e8f5e9; color: #1b5e20; }

.nu-review-badge {
  display: inline-block;
  font-size: 0.6875rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.25rem;
}

.nu-review-pending { background: #fff8e1; color: #f57f17; }
.nu-review-approved { background: #e8f5e9; color: #1b5e20; }
.nu-review-rejected { background: #ffebee; color: #b71c1c; }

/* Create New card */
.nu-create-card {
  border: 2px dashed var(--color-border, #ddd) !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--color-bg-subtle, #fafafa) !important;
  min-height: 160px;
}

.nu-create-card:hover {
  border-color: var(--color-primary, #1976d2) !important;
  background: var(--color-hover, #f0f7ff) !important;
}

.nu-create-card--locked {
  opacity: 0.6;
}

.nu-create-icon {
  font-size: 2.5rem;
  font-weight: 200;
  color: var(--color-muted, #aaa);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.nu-create-card:hover .nu-create-icon {
  color: var(--color-primary, #1976d2);
}

/* User lesson card accent */
.nu-user-lesson-card {
  border-left: 3px solid var(--color-primary, #1976d2) !important;
}

/* My lessons link at bottom of catalog */
.nu-my-lessons-link {
  margin-top: 1.5rem;
  text-align: right;
}

.nu-my-lessons-link a {
  font-size: 0.9375rem;
  color: var(--color-muted, #888);
  text-decoration: none;
}

.nu-my-lessons-link a:hover { text-decoration: underline; }

/* Inline form (fork in lesson header) */
.nu-inline-form {
  display: inline;
}

/* ============================================================
   Create / status / edit / my-lessons pages
   ============================================================ */

.nu-create-page,
.nu-status-page,
.nu-edit-page,
.nu-my-lessons-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.nu-create-form,
.nu-edit-form {
  margin-top: 1.5rem;
}

.nu-form-group {
  margin-bottom: 1.25rem;
}

.nu-form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.nu-form-hint {
  font-size: 0.875rem;
  color: var(--color-muted, #666);
  margin-top: 0.25rem;
}

.nu-form-row {
  display: flex;
  gap: 1rem;
}

.nu-form-group--half {
  flex: 1;
}

.nu-prompt-textarea,
.nu-form-textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--color-border, #ddd);
  border-radius: 6px;
  font-size: 0.9375rem;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}

.nu-form-input,
.nu-form-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border, #ddd);
  border-radius: 6px;
  font-size: 0.9375rem;
  background: var(--color-bg, #fff);
  box-sizing: border-box;
}

.nu-char-count {
  font-size: 0.8125rem;
  color: var(--color-muted, #aaa);
  text-align: right;
  margin-top: 0.25rem;
}

.nu-form-footer {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 1.5rem;
}

.nu-generate-btn {
  padding: 0.625rem 1.25rem;
  background: var(--color-primary, #1976d2);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.9375rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.nu-generate-btn:hover { opacity: 0.9; }

.nu-cancel-link,
.nu-back-link {
  font-size: 0.9375rem;
  color: var(--color-muted, #888);
  text-decoration: none;
}

.nu-cancel-link:hover,
.nu-back-link:hover { text-decoration: underline; }

.nu-guardrail-note {
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--color-muted, #888);
  border-left: 3px solid var(--color-border, #ddd);
  padding-left: 0.75rem;
}

/* Status page */
.nu-status-page {
  text-align: center;
  padding-top: 4rem;
}

.nu-status-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.nu-status-complete { color: #2e7d32; }
.nu-status-failed { color: #c62828; }
.nu-status-generating { color: var(--color-muted, #888); }

.nu-status-message {
  font-size: 1.0625rem;
  color: var(--color-muted, #555);
  margin-bottom: 1.5rem;
}

.nu-status-hint {
  font-size: 0.875rem;
  color: var(--color-muted, #aaa);
}

/* Generation spinner */
.nu-spinner {
  display: inline-block;
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid var(--color-border, #ddd);
  border-top-color: var(--color-primary, #1976d2);
  border-radius: 50%;
  animation: nu-spin 0.8s linear infinite;
}

@keyframes nu-spin {
  to { transform: rotate(360deg); }
}

/* Progress bar (status page) */
.nu-progress-bar {
  height: 6px;
  background: var(--color-border, #eee);
  border-radius: 3px;
  overflow: hidden;
  max-width: 400px;
  margin: 1rem auto;
}

.nu-progress-fill {
  height: 100%;
  background: var(--color-primary, #1976d2);
  border-radius: 3px;
  width: 0%;
  transition: width 0.5s ease;
}

/* My lessons page */
.nu-my-lessons-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.nu-my-lessons-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nu-my-lesson-row {
  border: 1px solid var(--color-border, #ddd);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}

.nu-my-lesson-meta {
  margin-bottom: 0.375rem;
}

.nu-my-lesson-title {
  font-size: 1.0625rem;
  margin: 0.25rem 0;
}

.nu-my-lesson-title a {
  text-decoration: none;
  color: inherit;
}

.nu-my-lesson-title a:hover { text-decoration: underline; }

.nu-my-lesson-desc {
  font-size: 0.9rem;
  color: var(--color-muted, #666);
  margin: 0.25rem 0 0.75rem;
}

.nu-forked-from {
  font-size: 0.8125rem;
  color: var(--color-muted, #999);
  margin-bottom: 0.5rem;
}

.nu-my-lesson-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.nu-edit-btn {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--color-border, #ddd);
  border-radius: 6px;
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--color-text, #333);
  background: var(--color-bg, #fff);
}

.nu-edit-btn:hover { background: var(--color-hover, #f5f5f5); }

.nu-delete-form { display: inline; }

.nu-delete-btn {
  padding: 0.375rem 0.75rem;
  border: 1px solid #ffcdd2;
  border-radius: 6px;
  font-size: 0.875rem;
  background: transparent;
  color: #c62828;
  cursor: pointer;
}

.nu-delete-btn:hover { background: #ffebee; }

.nu-empty-state {
  color: var(--color-muted, #888);
  font-style: italic;
}

.nu-review-note {
  margin-top: 0.375rem !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nu-app {
    flex-direction: column;
  }

  .nu-chat-pane {
    flex: none;
    height: 50vh;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }

  .nu-reader-pane {
    flex: 1;
    min-height: 0;
  }

  .nu-tab {
    padding: 0.75rem 0.875rem;
    font-size: 0.8125rem;
  }

  .nu-reader-content {
    padding: 1rem;
  }
}

/* ── Diagrams ── */
.nu-diagram {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1rem auto;
  border-radius: 6px;
  background: #fff;
  padding: 0.5rem;
}
