:root {
  --bg:        #0f1117;
  --surface:   #1a1d27;
  --surface2:  #21253a;
  --border:    #2a2f3d;
  --text:      #e8eaef;
  --muted:     #8b92a5;
  --accent:    #6c9eff;
  --accent2:   #a78bfa;
  --user:      #2d3a5c;
  --assistant: #1e2433;
  --ok:        #6ee7a0;
  --warn:      #fbbf24;
  --err:       #f87171;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'SF Pro Text', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1rem 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.app-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 0.85rem;
  flex: 1;
  min-height: 0;
}

.chat-main {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
  min-height: 0;
}

/* ── Sessions sidebar ────────────────────────────────────────────────────── */
.sessions-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem;
  min-height: 520px;
  max-height: calc(100vh - 2rem);
}

.sessions-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.sessions-sidebar-header h2 {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.auth-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.auth-label {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.jwt-input {
  width: 100%;
  resize: vertical;
  min-height: 44px;
  max-height: 80px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  font: 0.72rem ui-monospace, monospace;
}

.auth-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.auth-status {
  font-size: 0.68rem;
  color: var(--muted);
}

.auth-status.ok { color: var(--ok); }
.auth-status.err { color: var(--err); }

.session-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.session-empty {
  font-size: 0.75rem;
  color: var(--muted);
  padding: 0.5rem 0.25rem;
}

.session-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.session-item:hover {
  background: var(--surface2);
}

.session-item.active {
  background: var(--surface2);
  border-color: var(--accent);
}

.session-item-title {
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-item-meta {
  font-size: 0.65rem;
  color: var(--muted);
}

@media (max-width: 860px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .sessions-sidebar {
    max-height: 220px;
    min-height: 0;
  }
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
}

.app-header h1 {
  font-size: 1.15rem;
  margin: 0;
}

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

.health {
  font-size: 0.75rem;
}

.health.ok  { color: var(--ok); }
.health.err { color: var(--err); }

.debug-toggle-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s;
}
.debug-toggle-btn:hover { background: var(--surface2); }

/* ── Controls (router mode + topology) ────────────────────────────────────── */
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 0.6rem 0.85rem;
  background: var(--surface);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.mode-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Router mode radio group */
.router-mode {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.mode-option {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  font-size: 0.82rem;
}

.mode-option input[type="radio"] {
  accent-color: var(--accent);
  cursor: pointer;
}

.mode-option small {
  color: var(--muted);
  font-size: 0.72rem;
}

/* Topology select */
.topology-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.topology-label select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.3rem 0.5rem;
  font-size: 0.82rem;
}

.router-status {
  font-size: 0.72rem;
  color: var(--muted);
  margin-left: auto;
}

/* ── Messages ──────────────────────────────────────────────────────────────── */
.messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 360px;
  max-height: calc(100vh - 280px);
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.bubble {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  max-width: 95%;
  line-height: 1.5;
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.bubble.user {
  align-self: flex-end;
  background: var(--user);
}

.bubble.assistant {
  align-self: flex-start;
  background: var(--assistant);
  border: 1px solid var(--border);
}

.bubble.system {
  align-self: center;
  color: var(--muted);
  font-size: 0.8rem;
}

.bubble h3 {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.85rem;
}

.bubble h3:first-child { margin-top: 0; }

.meta {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.bubble-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.copy-btn {
  font-size: 0.7rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.copy-btn:hover {
  color: var(--text);
  border-color: var(--muted);
}

.copy-btn.copied {
  color: #16a34a;
  border-color: #16a34a;
}

.response-time {
  font-size: 0.7rem;
  color: var(--muted);
}

/* ── Composer ──────────────────────────────────────────────────────────────── */
.composer {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.composer textarea {
  flex: 1;
  resize: vertical;
  min-height: 52px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font: inherit;
}

.composer button {
  background: var(--accent);
  color: #0f1117;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.composer button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-stop {
  background: #c44 !important;
  color: #fff !important;
}

.reply-preview {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem 0.65rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  font-size: 0.85rem;
}

.reply-preview-label {
  color: var(--muted);
  white-space: nowrap;
  font-size: 0.75rem;
  padding-top: 0.15rem;
}

.reply-quote {
  flex: 1;
  margin: 0;
  color: var(--text);
  opacity: 0.9;
  max-height: 4.5rem;
  overflow: hidden;
}

.bubble.assistant-selectable .bubble-text {
  user-select: text;
  cursor: text;
}

.bubble.assistant-selectable .orch-wrapper,
.bubble.assistant-selectable .meta,
.bubble.assistant-selectable .orch-tools-panel {
  user-select: none;
}

.bubble.user.bubble-reply {
  border-left: 3px solid var(--accent);
}

.reply-context {
  margin-bottom: 0.45rem;
  padding: 0.4rem 0.55rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  font-size: 0.82rem;
}

.reply-context-label {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.reply-context blockquote {
  margin: 0;
  color: var(--text);
  opacity: 0.88;
  border-left: 2px solid var(--accent);
  padding-left: 0.5rem;
}

.bubble.selectable {
  user-select: text;
}

.selection-reply-btn {
  position: fixed;
  z-index: 50;
  background: var(--accent);
  color: #0f1117;
  border: none;
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* ── Debug Panel ───────────────────────────────────────────────────────────── */
.debug-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 0.25rem;
}

.debug-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.debug-panel-header h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
}

.debug-close-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.debug-close-btn:hover { color: var(--text); background: rgba(255,255,255,0.07); }

.debug-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.debug-section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.debug-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.debug-section h3 {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text);
}

.debug-agent-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.debug-field-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.debug-agent-row select {
  flex: 1;
  min-width: 200px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
}

.debug-badge {
  font-size: 0.68rem;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  white-space: nowrap;
}

.badge-active {
  background: rgba(108, 158, 255, 0.15);
  border: 1px solid rgba(108, 158, 255, 0.4);
  color: var(--accent);
}

.badge-default {
  background: rgba(139, 146, 165, 0.12);
  border: 1px solid rgba(139, 146, 165, 0.3);
  color: var(--muted);
}

.badge-sm {
  font-size: 0.62rem;
  padding: 0.1rem 0.4rem;
}

.debug-note {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
  min-height: 1rem;
}

/* Two-column prompt comparison */
.debug-prompt-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .debug-prompt-row { grid-template-columns: 1fr; }
}

.debug-prompt-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.debug-editor {
  width: 100%;
  resize: vertical;
  min-height: 180px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  font: 0.78rem/1.45 ui-monospace, 'JetBrains Mono', monospace;
}

.debug-editor-readonly {
  color: var(--muted);
  background: rgba(0,0,0,0.2);
}

.debug-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn-primary {
  background: var(--accent);
  color: #0f1117;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); }

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  cursor: pointer;
}
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary:hover:not(:disabled) { background: #2d3249; }

.btn-sm {
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
}

.debug-status {
  font-size: 0.78rem;
}

.debug-status-ok  { color: var(--ok); }
.debug-status-err { color: var(--err); }

/* Skills list in debug panel */
.debug-skills-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 200px;
  overflow-y: auto;
}

.debug-skill-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0.5rem;
  background: rgba(255,255,255,0.02);
  border-radius: 5px;
  font-size: 0.8rem;
}

.debug-skill-id {
  flex: 1;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--text);
}

.debug-skill-priority {
  font-size: 0.7rem;
  color: var(--accent2);
  font-weight: 600;
  min-width: 20px;
}

.debug-agents-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 280px;
  overflow-y: auto;
}

.debug-agent-row {
  padding: 0.45rem 0.55rem;
  background: rgba(255,255,255,0.02);
  border-radius: 5px;
  font-size: 0.8rem;
}

.debug-agent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.debug-agent-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.debug-skill-chip {
  font-size: 0.68rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: rgba(99, 179, 237, 0.12);
  color: var(--accent2);
}

/* ── Orchestration trace panel ─────────────────────────────────────────────── */
.orch-panel {
  margin-top: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.78rem;
}

.orch-summary {
  cursor: pointer;
  padding: 0.5rem 0.65rem;
  font-weight: 600;
  color: var(--accent);
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
}

.orch-summary::-webkit-details-marker { display: none; }

.orch-summary-meta {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.68rem;
}

.orch-plan {
  padding: 0 0.65rem 0.65rem;
  border-top: 1px solid var(--border);
}

.orch-reasoning {
  margin: 0.5rem 0;
  padding: 0.45rem 0.6rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-size: 0.75rem;
}

.orch-kw {
  color: var(--muted);
  font-size: 0.7rem;
  margin-bottom: 0.4rem;
}

.orch-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.orch-step {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
}

.orch-step.status-done .orch-icon    { color: var(--ok); }
.orch-step.status-running .orch-icon { color: var(--warn); animation: pulse 1s ease-in-out infinite; }
.orch-step.status-error .orch-icon   { color: var(--err); }
.orch-step.status-aborted .orch-icon { color: var(--err); }
.orch-step.status-planned .orch-icon { color: var(--muted); }

.bubble.assistant.aborted {
  border-left: 3px solid var(--err);
  opacity: 0.92;
}

.abort-notice {
  margin-bottom: 0.5rem;
  padding: 0.45rem 0.6rem;
  background: rgba(204, 68, 68, 0.12);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9rem;
}

.orch-abort-banner {
  margin-bottom: 0.65rem;
  padding: 0.45rem 0.6rem;
  background: rgba(204, 68, 68, 0.1);
  border-radius: 6px;
  color: var(--err);
  font-size: 0.85rem;
}

.orch-panel-aborted > .orch-summary {
  color: var(--err);
}

@keyframes pulse { 50% { opacity: 0.45; } }

.orch-body { flex: 1; min-width: 0; }
.orch-label { font-weight: 500; }
.orch-ms, .orch-tools { margin-left: 0.5rem; color: var(--muted); font-size: 0.65rem; }
.orch-detail { display: block; color: var(--muted); font-size: 0.68rem; margin-top: 0.15rem; }

.orch-parallel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.35rem;
  border: 1px dashed var(--border);
  border-radius: 6px;
  background: rgba(108, 158, 255, 0.06);
}

.orch-parallel::before {
  content: '∥ parallel';
  width: 100%;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  opacity: 0.85;
}

.orch-parallel-card {
  flex: 1 1 120px;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.35rem 0.45rem;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.72rem;
}

.orch-reflection {
  margin-top: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.orch-reflect-summary { font-weight: 500; margin-bottom: 0.35rem; }

.orch-findings, .orch-gaps {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.orch-gaps .gap { color: var(--warn); }

.orch-reflect-pending { margin-top: 0.5rem; color: var(--muted); font-style: italic; font-size: 0.72rem; }

.orch-tools-panel { margin-top: 0.5rem; font-size: 0.72rem; color: var(--muted); }
.orch-tools-panel summary { cursor: pointer; color: var(--accent); }

.orch-tools-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.35rem;
}

.orch-tools-table td {
  padding: 0.2rem 0.35rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.orch-inline-pre {
  margin: 0;
  font-size: 0.62rem;
  white-space: pre-wrap;
  max-width: 220px;
}

.orch-tools-table td:first-child {
  font-family: ui-monospace, monospace;
  white-space: nowrap;
}

.transport-mcp   { color: var(--ok);   font-size: 0.62rem; text-transform: uppercase; }
.transport-local { color: var(--muted); font-size: 0.62rem; text-transform: uppercase; }

.orch-invocation { margin-top: 0.35rem; font-size: 0.68rem; }

.orch-invocation pre {
  margin: 0.25rem 0 0;
  padding: 0.35rem 0.45rem;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.65rem;
  line-height: 1.35;
  color: #c8d0e0;
}

.orch-subagents {
  margin-top: 0.65rem;
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
}

.orch-subagent-card {
  margin-bottom: 0.5rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}

.orch-subagent-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
  font-weight: 600;
  font-size: 0.75rem;
}

.orch-subagent-out { color: var(--muted); font-weight: 400; font-size: 0.68rem; }

.orch-tool-row {
  margin-top: 0.35rem;
  padding: 0.3rem 0.4rem;
  border-left: 2px solid var(--border);
}

.orch-divergence {
  margin-top: 0.5rem;
  padding: 0.45rem 0.55rem;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 6px;
  font-size: 0.72rem;
}

.orch-divergence ul {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.orch-router-error {
  margin: 0.5rem 0;
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.1);
  color: #fca5a5;
  font-size: 0.75rem;
}

.orch-router-error strong { color: var(--err); }

.orch-err-table { margin-top: 0.45rem; }
.orch-err-row td { vertical-align: top; }

.orch-fix {
  margin-top: 0.45rem;
  padding: 0.4rem 0.5rem;
  background: rgba(251, 191, 36, 0.12);
  border-left: 3px solid var(--warn);
  color: #fde68a;
  font-size: 0.72rem;
}

.orch-err-pre {
  margin: 0.35rem 0 0;
  font-size: 0.65rem;
  white-space: pre-wrap;
  color: #fca5a5;
}

/* ── Rendered markdown in assistant bubbles ─────────────────────────────────── */
.bubble-text h1, .bubble-text h2, .bubble-text h3, .bubble-text h4 {
  margin: 0.9em 0 0.4em;
  line-height: 1.25;
  font-weight: 650;
}
.bubble-text h1 { font-size: 1.35em; }
.bubble-text h2 { font-size: 1.18em; }
.bubble-text h3 { font-size: 1.05em; }
.bubble-text h4 { font-size: 0.98em; opacity: 0.9; }
.bubble-text > :first-child { margin-top: 0; }
.bubble-text p { margin: 0.5em 0; }
.bubble-text ul, .bubble-text ol { margin: 0.5em 0; padding-left: 1.4em; }
.bubble-text li { margin: 0.2em 0; }
.bubble-text a { color: #7aa2ff; text-decoration: underline; }
.bubble-text strong { font-weight: 650; }
.bubble-text hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin: 1em 0;
}
.bubble-text code {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  font-size: 0.88em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.bubble-text pre {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.75em 0.9em;
  overflow-x: auto;
}
.bubble-text pre code { background: none; padding: 0; }
.bubble-text blockquote {
  margin: 0.6em 0;
  padding: 0.2em 0.9em;
  border-left: 3px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.75);
}
.bubble-text table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.7em 0;
  font-size: 0.9em;
  display: block;
  overflow-x: auto;
}
.bubble-text th, .bubble-text td {
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.4em 0.6em;
  text-align: left;
  vertical-align: top;
}
.bubble-text th {
  background: rgba(255, 255, 255, 0.06);
  font-weight: 600;
}
.bubble-text tr:nth-child(even) td { background: rgba(255, 255, 255, 0.025); }
