/* ============================================================================
   COPILOT WORKSPACE — Spectacular UI Design System
   Built on top of the Merit Trading theme.css variables.
   ============================================================================ */

/* ---------- Layout ---------- */
.cp-workspace {
  display: grid;
  grid-template-columns: 280px 1fr 340px;
  grid-template-rows: auto 1fr;
  height: calc(100vh - 4rem);
  overflow: hidden;
  background: var(--zinc-950, #09090b);
}

.cp-toolbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: var(--zinc-950, #09090b);
  border-bottom: 1px solid var(--zinc-800, #27272a);
  font-family: var(--font-mono, monospace);
  font-size: var(--text-xs, 0.75rem);
}

/* --- Left rail --- */
.cp-sidebar {
  display: flex;
  flex-direction: column;
  background: var(--zinc-950, #09090b);
  border-right: 1px solid var(--zinc-800, #27272a);
  overflow: hidden;
}
.cp-sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid var(--zinc-800, #27272a);
  background: rgba(255,255,255,0.02);
}
.cp-sidebar-header h3 {
  font-size: var(--text-xs, 0.75rem);
  font-weight: 600;
  color: var(--zinc-400, #a1a1aa);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}
.cp-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}
.cp-sidebar-body::-webkit-scrollbar { width: 4px; }
.cp-sidebar-body::-webkit-scrollbar-thumb { background: var(--zinc-700, #3f3f46); border-radius: 2px; }

/* --- Center stage --- */
.cp-center {
  display: flex;
  flex-direction: column;
  background: var(--zinc-900, #18181b);
  overflow: hidden;
}

/* --- Right rail --- */
.cp-intel {
  display: flex;
  flex-direction: column;
  background: var(--zinc-950, #09090b);
  border-left: 1px solid var(--zinc-800, #27272a);
  overflow: hidden;
}

/* ---------- Inputs ---------- */
.cp-input-group {
  margin-bottom: 0.75rem;
}
.cp-input-group label {
  display: block;
  font-size: var(--text-xs, 0.75rem);
  color: var(--zinc-500, #71717a);
  margin-bottom: 0.25rem;
  font-weight: 500;
}
.cp-input-group input,
.cp-input-group select {
  width: 100%;
  background: var(--zinc-900, #18181b);
  border: 1px solid var(--zinc-800, #27272a);
  color: var(--zinc-200, #e4e4e7);
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  font-size: var(--text-sm, 0.875rem);
  font-family: var(--font-mono, monospace);
  transition: border-color 0.2s;
}
.cp-input-group input:focus,
.cp-input-group select:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.15);
}

/* ---------- Dividers & Headings ---------- */
.cp-divider {
  height: 1px;
  background: var(--zinc-800, #27272a);
  margin: 1rem 0;
}
.cp-section-title {
  font-size: var(--text-xs, 0.75rem);
  font-weight: 600;
  color: var(--zinc-400, #a1a1aa);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.75rem 0;
}

/* ---------- Panel Cards ---------- */
.cp-panel {
  margin-bottom: 0.75rem;
}
.cp-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--zinc-800, #27272a);
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  user-select: none;
}
.cp-panel-header h4 {
  font-size: var(--text-xs, 0.75rem);
  font-weight: 600;
  color: var(--zinc-300, #d4d4d8);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.cp-panel-body {
  padding: 0.75rem;
  border: 1px solid var(--zinc-800, #27272a);
  border-top: none;
  border-radius: 0 0 8px 8px;
  background: rgba(255,255,255,0.01);
}
.cp-panel-hidden { display: none; }
.cp-panel-empty {
  font-size: var(--text-xs, 0.75rem);
  color: var(--zinc-600, #52525b);
  text-align: center;
  padding: 0.5rem;
}

.cp-sidebar-note {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--zinc-800, #27272a);
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  font-size: var(--text-xs, 0.75rem);
  color: var(--zinc-500, #71717a);
  line-height: 1.5;
}
.cp-sidebar-note-ok {
  border-color: rgba(52,211,153,0.25);
  color: #86efac;
}
.cp-sidebar-note-busy {
  border-color: rgba(251,191,36,0.25);
  color: #fcd34d;
}
.cp-sidebar-note-error {
  border-color: rgba(248,113,113,0.25);
  color: #fca5a5;
}

.cp-dropzone {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem;
  border: 1px dashed rgba(139,92,246,0.28);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(24,24,27,0.55));
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.cp-dropzone:hover,
.cp-dropzone.is-dragover {
  border-color: rgba(139,92,246,0.5);
  background: linear-gradient(135deg, rgba(139,92,246,0.14), rgba(24,24,27,0.72));
  transform: translateY(-1px);
}
.cp-dropzone:focus {
  outline: none;
  border-color: rgba(139,92,246,0.55);
  box-shadow: 0 0 0 2px rgba(139,92,246,0.16);
}
.cp-dropzone-title {
  color: var(--zinc-200, #e4e4e7);
  font-size: 0.78rem;
  font-weight: 600;
}
.cp-dropzone-subtitle {
  color: var(--zinc-500, #71717a);
  font-size: 0.72rem;
}

.cp-state-card {
  border-radius: 8px;
  overflow: hidden;
}

/* ---------- Chat ---------- */
.cp-chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cp-chat-history {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.cp-chat-history::-webkit-scrollbar { width: 5px; }
.cp-chat-history::-webkit-scrollbar-thumb { background: var(--zinc-700); border-radius: 3px; }

.cp-msg {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.6;
  max-width: 85%;
  word-wrap: break-word;
  animation: cp-fadeIn 0.25s ease;
}
@keyframes cp-fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cp-msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--zinc-800), var(--zinc-700));
  color: var(--zinc-100, #f4f4f5);
  border-bottom-right-radius: 4px;
}
.cp-msg-bot {
  align-self: flex-start;
  background: linear-gradient(135deg, rgba(139,92,246,0.12), rgba(139,92,246,0.06));
  color: #c4b5fd;
  border: 1px solid rgba(139,92,246,0.18);
  border-bottom-left-radius: 4px;
}
.cp-msg-bot strong { color: #ddd6fe; }
.cp-msg-bot code {
  background: rgba(0,0,0,0.3);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.85em;
  font-family: var(--font-mono);
}
.cp-msg-system {
  align-self: center;
  background: rgba(255,255,255,0.04);
  color: var(--zinc-500);
  font-size: var(--text-xs);
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
}

/* Streaming dots / progress bubble */
.cp-streaming { display: flex; gap: 4px; align-items: center; min-height: 1.5rem; }
.cp-progress-text {
  font-size: 0.82rem;
  color: #a78bfa;
  opacity: 0.85;
  animation: cp-fadein 0.35s ease;
}
@keyframes cp-fadein { from { opacity: 0; } to { opacity: 0.85; } }
.cp-dot {
  width: 6px; height: 6px;
  background: #8b5cf6;
  border-radius: 50%;
  animation: cp-pulse 1.2s ease-in-out infinite;
}
.cp-dot:nth-child(2) { animation-delay: 0.2s; }
.cp-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes cp-pulse {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Chat input */
.cp-chat-input-area {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--zinc-800, #27272a);
  background: var(--zinc-950, #09090b);
}
.cp-chat-input-wrapper {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}
.cp-chat-input-wrapper textarea {
  flex: 1;
  background: var(--zinc-900);
  border: 1px solid var(--zinc-700);
  color: var(--zinc-200);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  font-size: var(--text-sm);
  resize: none;
  min-height: 42px;
  max-height: 120px;
  font-family: var(--font-sans, 'Inter', sans-serif);
  transition: border-color 0.2s;
}
.cp-chat-input-wrapper textarea:focus {
  outline: none;
  border-color: #8b5cf6;
}
.cp-chat-input-wrapper button {
  padding: 0.55rem 1rem;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.cp-chat-input-wrapper button:hover {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139,92,246,0.3);
}
.cp-chat-input-wrapper button:active { transform: translateY(0); }
.cp-chat-input-wrapper button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Quick Commands ---------- */
.cp-quick-commands {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 1rem 0.75rem;
}
.cp-quick-cmd {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  background: var(--zinc-900);
  border: 1px solid var(--zinc-800);
  color: var(--zinc-400);
  border-radius: 20px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.cp-quick-cmd:hover {
  border-color: #8b5cf6;
  color: #c4b5fd;
  background: rgba(139,92,246,0.08);
}
.cp-quick-icon { font-size: 0.8rem; }

/* ---------- Status ---------- */
.cp-status-indicator {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
}
.cp-status-ok    { color: #34d399; }
.cp-status-busy  { color: #fbbf24; }
.cp-status-error { color: #f87171; }

/* ---------- Badges ---------- */
.cp-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(255,255,255,0.06);
  color: var(--zinc-400);
}
.cp-badge-accent { background: rgba(139,92,246,0.15); color: #a78bfa; }
.cp-badge-success { background: rgba(52,211,153,0.15); color: #34d399; }
.cp-badge-danger  { background: rgba(248,113,113,0.15); color: #f87171; }
.cp-badge-dim     { background: rgba(255,255,255,0.04); color: var(--zinc-500); }

/* ---------- Price Card ---------- */
.cp-price-card {
  text-align: center;
  padding: 0.5rem;
}
.cp-price-main {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--zinc-100);
  letter-spacing: -0.02em;
}
.cp-price-change {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-top: 0.25rem;
}
.cp-price-vol {
  font-size: var(--text-xs);
  color: var(--zinc-500);
  margin-top: 0.15rem;
}

/* ---------- Colors ---------- */
.cp-positive { color: #34d399; }
.cp-negative { color: #f87171; }
.cp-neutral  { color: var(--zinc-400); }

/* ---------- Signals ---------- */
.cp-signal {
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--zinc-800);
  margin-bottom: 0.5rem;
  transition: border-color 0.2s;
}
.cp-signal:hover { border-color: var(--zinc-700); }
.cp-signal-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}
.cp-signal-sym {
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--zinc-200);
}
.cp-signal-levels {
  display: flex;
  gap: 0.75rem;
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--zinc-400);
}
.cp-signal-thesis {
  font-size: var(--text-xs);
  color: var(--zinc-500);
  margin-top: 0.3rem;
}
.cp-signal-long { border-left: 3px solid #34d399; }
.cp-signal-short { border-left: 3px solid #f87171; }

/* ---------- Fibonacci ---------- */
.cp-fib-card {
  padding: 0.6rem;
  border: 1px solid var(--zinc-800);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  border-left: 3px solid #8b5cf6;
}
.cp-fib-header {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--zinc-200);
  margin-bottom: 0.35rem;
}
.cp-fib-levels {
  display: flex;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}
.cp-fib-level {
  display: flex;
  flex-direction: column;
  color: var(--zinc-300);
}
.cp-fib-level small {
  color: var(--zinc-500);
  font-size: 0.65rem;
  text-transform: uppercase;
}
.cp-fib-action { margin-top: 0.35rem; }
.cp-fib-thesis {
  font-size: var(--text-xs);
  color: var(--zinc-400);
  margin-top: 0.4rem;
  line-height: 1.5;
}

/* ---------- Education ---------- */
.cp-edu-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  color: var(--zinc-300);
  text-decoration: none;
  font-size: var(--text-xs);
  transition: all 0.2s;
}
.cp-edu-link:hover {
  background: rgba(139,92,246,0.08);
  color: #c4b5fd;
}
.cp-edu-icon { font-size: 1rem; }

/* ---------- Journal ---------- */
.cp-journal-entry {
  padding: 0.5rem;
  border-bottom: 1px solid var(--zinc-800);
}
.cp-journal-entry:last-child { border-bottom: none; }
.cp-journal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.2rem;
}
.cp-journal-sym {
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--zinc-300);
}
.cp-journal-date {
  font-size: var(--text-xs);
  color: var(--zinc-600);
}
.cp-journal-notes {
  font-size: var(--text-xs);
  color: var(--zinc-500);
  margin-bottom: 0.2rem;
}

/* ---------- Social ---------- */
.cp-social-item {
  padding: 0.5rem;
  border-bottom: 1px solid var(--zinc-800);
}
.cp-social-item:last-child { border-bottom: none; }
.cp-social-author {
  font-weight: 600;
  font-size: var(--text-xs);
  color: var(--zinc-300);
}
.cp-social-summary {
  font-size: var(--text-xs);
  color: var(--zinc-400);
  margin: 0.15rem 0;
}
.cp-social-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.65rem;
}
.cp-social-time { color: var(--zinc-600); }

/* ---------- Sentiment ---------- */
.cp-sentiment { padding: 0.3rem; }
.cp-sentiment-bar {
  height: 8px;
  background: var(--zinc-800);
  border-radius: 4px;
  overflow: hidden;
}
.cp-sentiment-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}
.cp-sentiment-fill.cp-positive { background: linear-gradient(90deg, #059669, #34d399); }
.cp-sentiment-fill.cp-negative { background: linear-gradient(90deg, #dc2626, #f87171); }
.cp-sentiment-fill.cp-neutral  { background: linear-gradient(90deg, #d97706, #fbbf24); }
.cp-sentiment-label {
  display: flex;
  justify-content: space-between;
  margin-top: 0.3rem;
  font-size: var(--text-sm);
  font-weight: 600;
}
.cp-sentiment-summary {
  font-size: var(--text-xs);
  color: var(--zinc-500);
  margin-top: 0.25rem;
}

/* ---------- Risk ---------- */
.cp-risk { font-size: var(--text-xs); }
.cp-risk-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--zinc-800);
  color: var(--zinc-400);
}
.cp-risk-row:last-child { border-bottom: none; }
.cp-risk-row b {
  color: var(--zinc-200);
  font-family: var(--font-mono);
}

/* ---------- Scenario Buttons ---------- */
.cp-preset-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.cp-preset-btn {
  padding: 0.45rem 0.6rem;
  background: var(--zinc-900);
  border: 1px solid var(--zinc-800);
  color: var(--zinc-300);
  border-radius: 6px;
  font-size: var(--text-xs);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}
.cp-preset-btn:hover {
  background: rgba(139,92,246,0.08);
  border-color: rgba(139,92,246,0.3);
  color: #c4b5fd;
}

/* ---------- Historical Context ---------- */
.cp-history-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.cp-history-help {
  font-size: 0.66rem;
  color: var(--zinc-500);
  margin-top: 0.25rem;
}
.cp-history-event-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.45rem;
  max-height: 24rem;
  overflow-y: auto;
  padding-right: 0.15rem;
}
.cp-history-section {
  background: rgba(9, 9, 11, 0.45);
  border: 1px solid var(--zinc-800);
  border-radius: 8px;
  padding: 0.5rem;
}
.cp-history-disclosure {
  border: 1px solid var(--zinc-800);
  border-radius: 8px;
  background: rgba(9, 9, 11, 0.55);
  overflow: hidden;
}
.cp-history-disclosure[open] {
  border-color: rgba(139,92,246,0.28);
  box-shadow: 0 0 0 1px rgba(139,92,246,0.08);
}
.cp-history-summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 0.55rem 1.9rem 0.55rem 0.6rem;
}
.cp-history-summary::-webkit-details-marker {
  display: none;
}
.cp-history-summary::after {
  content: '+';
  position: absolute;
  top: 0.52rem;
  right: 0.65rem;
  color: #a78bfa;
  font-size: 0.95rem;
  line-height: 1;
}
.cp-history-disclosure[open] .cp-history-summary::after {
  content: '−';
}
.cp-history-summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.cp-history-summary-badges {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.cp-history-summary-line {
  font-size: 0.68rem;
  color: var(--zinc-400);
  line-height: 1.45;
  margin-top: 0.2rem;
}
.cp-history-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.cp-history-body {
  border-top: 1px dashed var(--zinc-800);
  padding: 0.55rem 0.6rem 0.65rem;
}
.cp-history-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(139,92,246,0.2);
  background: rgba(139,92,246,0.08);
  color: #ddd6fe;
  font-size: 0.62rem;
  font-weight: 600;
}
.cp-history-title {
  font-size: 0.75rem;
  color: var(--zinc-200);
  font-weight: 600;
}
.cp-history-meta {
  font-size: 0.65rem;
  color: var(--zinc-500);
  margin-top: 0.12rem;
}
.cp-history-followups {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.cp-history-followup {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(139,92,246,0.25);
  background: rgba(139,92,246,0.08);
  color: #ddd6fe;
  border-radius: 6px;
  font-size: 0.68rem;
  line-height: 1.35;
  padding: 0.42rem 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.cp-history-followup:hover {
  background: rgba(139,92,246,0.16);
  border-color: rgba(139,92,246,0.45);
}

/* ---------- Drive-Signal Post-Create Follow-ups ---------- */
.cp-signal-followups {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.15rem;
}
.cp-signal-followup {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(139,92,246,0.35);
  background: rgba(139,92,246,0.1);
  color: #ddd6fe;
  border-radius: 20px;
  font-size: 0.7rem;
  line-height: 1.2;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.cp-signal-followup:hover {
  background: rgba(139,92,246,0.2);
  border-color: rgba(139,92,246,0.55);
  color: #ede9fe;
}

/* ---------- Panel Toggles ---------- */
.cp-panel-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.5rem 0;
}
.cp-panel-toggle {
  padding: 0.25rem 0.5rem;
  background: var(--zinc-900);
  border: 1px solid var(--zinc-800);
  color: var(--zinc-500);
  border-radius: 4px;
  font-size: 0.65rem;
  cursor: pointer;
  transition: all 0.2s;
}
.cp-panel-toggle.active {
  background: rgba(139,92,246,0.12);
  border-color: rgba(139,92,246,0.3);
  color: #a78bfa;
}
.cp-panel-toggle.cp-panel-toggle-primary {
  background: rgba(139,92,246,0.18);
  border-color: rgba(139,92,246,0.5);
  color: #e9d5ff;
  box-shadow: inset 0 0 0 1px rgba(139,92,246,0.18);
}
.cp-panel-priority .cp-panel-header {
  border-bottom-color: rgba(139,92,246,0.22);
}
.cp-panel-priority .cp-panel-header h4 {
  color: #ddd6fe;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cp-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
  }
  .cp-sidebar { display: none; }
  .cp-intel {
    border-left: none;
    border-top: 1px solid var(--zinc-800);
    max-height: 300px;
  }
}

/* ============================================================
   COPILOT v2.1 ADDITIONS — mode tabs, trader ideas, pivots
   ============================================================ */

/* ---------- Mode Tabs Bar ---------- */
.cp-mode-tabs {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0 0.75rem;
  border-bottom: 1px solid var(--zinc-800, #27272a);
  background: var(--zinc-950, #09090b);
  overflow-x: auto;
  flex-shrink: 0;
}
.cp-mode-tabs::-webkit-scrollbar { height: 0; }

.cp-mode-tab {
  padding: 0.55rem 0.85rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--zinc-500, #71717a);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
  margin-bottom: -1px;
}
.cp-mode-tab:hover { color: var(--zinc-300, #d4d4d8); }
.cp-mode-tab.cp-mode-active {
  color: #c4b5fd;
  border-bottom-color: #8b5cf6;
  font-weight: 600;
}

/* ---------- Snip Button ---------- */
.cp-snip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  background: rgba(139,92,246,0.08);
  border: 1px solid rgba(139,92,246,0.25);
  color: #a78bfa;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  margin: 0.35rem 0 0.35rem 0.5rem;
}
.cp-snip-btn:hover {
  background: rgba(139,92,246,0.15);
  border-color: rgba(139,92,246,0.45);
  color: #c4b5fd;
}

/* ---------- Auth Pill ---------- */
.cp-user-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
}
.cp-user-loggedin-name {
  display: none;
  font-family: var(--font-mono, monospace);
  color: #34d399;
  font-weight: 600;
}
.cp-user-pill.cp-user-loggedin .cp-user-loggedin-name { display: inline; }
.cp-user-pill.cp-user-loggedin .cp-user-signin { display: none; }
.cp-user-signin {
  padding: 0.25rem 0.6rem;
  background: rgba(139,92,246,0.1);
  border: 1px solid rgba(139,92,246,0.25);
  color: #a78bfa;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}
.cp-user-signin:hover { background: rgba(139,92,246,0.18); color: #c4b5fd; }

/* ---------- Trader Ideas Panel ---------- */
.cp-trader-ideas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0.2rem 0.5rem;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid var(--zinc-800, #27272a);
}
.cp-trader-consensus {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.cp-trader-counts {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-family: var(--font-mono, monospace);
  font-weight: 600;
}

.cp-trader-idea {
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--zinc-800, #27272a);
  margin-bottom: 0.4rem;
  transition: border-color 0.2s;
}
.cp-trader-idea:hover { border-color: var(--zinc-700, #3f3f46); }
.cp-trader-idea.cp-signal-long  { border-left: 3px solid #34d399; }
.cp-trader-idea.cp-signal-short { border-left: 3px solid #f87171; }

.cp-trader-idea-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.3rem;
  flex-wrap: wrap;
}
.cp-trader-rank {
  display: inline-block;
  padding: 0.1rem 0.3rem;
  background: rgba(139,92,246,0.15);
  color: #a78bfa;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
}
.cp-trader-handle {
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  color: var(--zinc-300, #d4d4d8);
  font-weight: 500;
}
.cp-trader-wr {
  margin-left: auto;
  font-size: 0.65rem;
  color: var(--zinc-500, #71717a);
  font-family: var(--font-mono, monospace);
}
.cp-trader-idea-levels {
  display: flex;
  gap: 0.6rem;
  font-size: 0.7rem;
  font-family: var(--font-mono, monospace);
  color: var(--zinc-400, #a1a1aa);
}
.cp-trader-idea-levels b { color: var(--zinc-200, #e4e4e7); }

/* ---------- Pivot Table ---------- */
.cp-pivot-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
  font-family: var(--font-mono, monospace);
}
.cp-pivot-table tr:hover td { background: rgba(255,255,255,0.03); }
.cp-pivot-label {
  padding: 0.25rem 0.4rem;
  color: var(--zinc-400, #a1a1aa);
  font-weight: 500;
  width: 40%;
}
.cp-pivot-price {
  padding: 0.25rem 0.4rem;
  font-weight: 600;
  text-align: right;
}

/* ---------- Sentiment extras ---------- */
.cp-sentiment-extra {
  font-size: 0.7rem;
  color: var(--zinc-500, #71717a);
  margin-top: 0.2rem;
}
.cp-sentiment-extra b { color: var(--zinc-300, #d4d4d8); }
.cp-sentiment-bias-label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cp-sentiment-contributor {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0;
  font-size: 0.7rem;
  border-top: 1px solid var(--zinc-800, #27272a);
  margin-top: 0.25rem;
}

/* ---------- Responsive additions ---------- */
@media (max-width: 768px) {
  .cp-mode-tab { padding: 0.45rem 0.55rem; font-size: 0.7rem; }
  .cp-snip-btn { display: none; }
  .cp-user-pill { display: none; }
}

/* ---------- Clarification Modal ---------- */
.cp-clarification-root {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.58);
  z-index: 80;
  padding: 1rem;
}

.cp-clarification-root.is-open {
  display: flex;
}

.cp-clarification-modal {
  width: min(620px, 96vw);
  max-height: 88vh;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.96), rgba(9, 9, 11, 0.96));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  padding: 1rem;
}

.cp-clarification-title {
  margin: 0;
  font-size: 0.95rem;
  color: #ddd6fe;
  font-weight: 700;
}

.cp-clarification-message {
  margin: 0.45rem 0 0.8rem;
  color: var(--zinc-300, #d4d4d8);
  font-size: 0.8rem;
  line-height: 1.5;
}

.cp-clarification-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.55rem;
}

.cp-clarification-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cp-clarification-field label {
  font-size: 0.7rem;
  color: var(--zinc-400, #a1a1aa);
}

.cp-clarification-field input,
.cp-clarification-field select,
.cp-clarification-field textarea {
  width: 100%;
  background: var(--zinc-900, #18181b);
  border: 1px solid var(--zinc-700, #3f3f46);
  color: var(--zinc-100, #f4f4f5);
  border-radius: 7px;
  padding: 0.45rem 0.55rem;
  font-size: 0.78rem;
  font-family: var(--font-mono, monospace);
}

.cp-clarification-field textarea {
  resize: vertical;
  font-family: inherit;
}

.cp-clarification-field input:focus,
.cp-clarification-field select:focus,
.cp-clarification-field textarea:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.8);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.cp-clarification-actions {
  margin-top: 0.85rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
}

.cp-clarification-btn {
  border: 1px solid var(--zinc-700, #3f3f46);
  background: var(--zinc-900, #18181b);
  color: var(--zinc-200, #e4e4e7);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.cp-clarification-btn:hover {
  border-color: var(--zinc-500, #71717a);
}

.cp-clarification-btn-primary {
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.22);
  color: #e9d5ff;
}

.cp-clarification-btn-primary:hover {
  background: rgba(139, 92, 246, 0.32);
  border-color: rgba(139, 92, 246, 0.7);
}

/* Generate Signal (mini /strategies): drivers -> emergent plan preview */
.cp-signal-drivers {
  grid-column: 1 / -1;
  border: 1px dashed rgba(139, 92, 246, 0.35);
  border-radius: 8px;
  padding: 0.5rem;
}
.cp-signal-drivers-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.72rem;
  color: #ddd6fe;
  font-weight: 600;
}
.cp-signal-drivers-empty { font-size: 0.72rem; color: var(--zinc-400, #a1a1aa); }
.cp-signal-mini-btn {
  border: 1px solid var(--zinc-700, #3f3f46);
  background: var(--zinc-900, #18181b);
  color: var(--zinc-300, #d4d4d8);
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  font-size: 0.68rem;
  cursor: pointer;
}
.cp-signal-mini-btn:hover { border-color: rgba(139, 92, 246, 0.7); }
.cp-signal-preview-row { margin-top: 0.6rem; display: flex; justify-content: flex-start; }

.cp-signal-plan {
  margin-top: 0.6rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--zinc-700, #3f3f46);
  background: rgba(24, 24, 27, 0.7);
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--zinc-300, #d4d4d8);
}
.cp-signal-plan:empty { display: none; }
.cp-signal-plan.is-ready { border-color: rgba(34, 197, 94, 0.5); }
.cp-signal-plan.has-warnings { border-color: rgba(234, 179, 8, 0.5); }
.cp-signal-plan.is-error { border-color: rgba(224, 82, 82, 0.55); }
.cp-signal-plan.is-missing { border-color: rgba(139, 92, 246, 0.45); }
.cp-signal-plan-title { font-weight: 700; color: var(--zinc-100, #f4f4f5); margin-bottom: 0.25rem; }
.cp-signal-plan-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.45rem; }
.cp-signal-side {
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.55rem;
  border-radius: 6px;
}
.cp-signal-side-long { background: rgba(34, 197, 94, 0.18); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.5); }
.cp-signal-side-short { background: rgba(224, 82, 82, 0.18); color: #fca5a5; border: 1px solid rgba(224, 82, 82, 0.5); }
.cp-signal-plan-meta { color: var(--zinc-400, #a1a1aa); }
.cp-signal-counter { color: #fde68a; font-weight: 600; }
.cp-signal-size {
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  color: #ddd6fe;
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  border: 1px solid rgba(139, 92, 246, 0.45);
}
.cp-signal-size.is-invalid { color: #fca5a5; border-color: rgba(224, 82, 82, 0.55); }
.cp-signal-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}
.cp-signal-plan-grid div { display: flex; flex-direction: column; }
.cp-signal-plan-grid span,
.cp-signal-plan-targets > span,
.cp-signal-plan-lane label { font-size: 0.66rem; color: var(--zinc-400, #a1a1aa); }
.cp-signal-plan-grid b { font-family: var(--font-mono, monospace); color: var(--zinc-100, #f4f4f5); }
.cp-signal-plan-targets { display: flex; flex-direction: column; gap: 0.15rem; margin-bottom: 0.45rem; }
.cp-signal-target { display: flex; align-items: center; gap: 0.35rem; font-family: var(--font-mono, monospace); cursor: pointer; }
.cp-signal-target em { color: #86efac; font-style: normal; font-size: 0.66rem; }
.cp-signal-target small { color: var(--zinc-400, #a1a1aa); }
.cp-signal-plan-lane { display: flex; flex-direction: column; gap: 0.2rem; }
.cp-signal-plan-lane select {
  background: var(--zinc-900, #18181b);
  border: 1px solid var(--zinc-700, #3f3f46);
  color: var(--zinc-100, #f4f4f5);
  border-radius: 7px;
  padding: 0.35rem 0.5rem;
  font-size: 0.74rem;
}
.cp-signal-plan-block { color: #fca5a5; font-size: 0.7rem; }
.cp-signal-plan-warnings,
.cp-signal-missing { margin: 0.35rem 0 0; padding-left: 1.1rem; }
.cp-signal-plan-warnings { color: #fde68a; }
/* book harmonic point times (X's date/time pins the pattern on the chart) */
.cp-driver-help { margin-top: 0.2rem; font-size: 0.72rem; line-height: 1.3; color: var(--zinc-400, #a1a1aa); }
.cp-driver-rec { font-size: 0.72rem; color: #fde68a; }
.cp-signal-drivers-adv { margin-top: 0.5rem; }
.cp-signal-drivers-adv > summary { cursor: pointer; font-size: 0.78rem; color: var(--zinc-400, #a1a1aa); }
.cp-signal-plan-location { margin-top: 0.35rem; font-size: 0.8rem; }
.cp-signal-plan-location > span { color: var(--zinc-400, #a1a1aa); margin-right: 0.3rem; }
.cp-signal-plan-location.is-ok { color: #5eead4; }
.cp-signal-plan-location.is-warn { color: #fde68a; }
.cp-autofill-muted { color: var(--zinc-400, #a1a1aa); }
.cp-clarification-btn-primary:disabled,
.cp-clarification-btn.is-disabled { opacity: 0.45; cursor: not-allowed; }

/* ── M6 Workflow Cards ──────────────────────────────────────────────── */
.cp-workflow-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 12px 2px;
}

.cp-wf-card {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: var(--zinc-300, #d4d4d8);
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.cp-wf-card:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(139,92,246,0.5);
  color: #e9d5ff;
}

.cp-wf-icon {
  font-size: 0.85em;
}

.cp-wf-role {
  font-size: 0.65rem;
  padding: 1px 4px;
  background: rgba(139,92,246,0.2);
  border-radius: 3px;
  color: #c4b5fd;
  margin-left: 2px;
}

/* ---------- Admin command row (dedicated, server-gated) ---------- */
.cp-admin-row-label {
  display: inline-flex;
  align-items: center;
  align-self: center;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fbbf24;
  padding: 0 0.35rem 0 0;
}
.cp-admin-cmd {
  border-color: rgba(251,191,36,0.4);
  color: #fcd34d;
}
.cp-admin-cmd:hover {
  border-color: #fbbf24;
  color: #fde68a;
  background: rgba(251,191,36,0.08);
}

/* ---------- Forecast workflow (copilot-forecast.js) ---------- */
.cp-fc-modal { width: min(760px, 96vw); }
.cp-fc-req { color: #e05252; }
.cp-fc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin-bottom: 0.5rem; }
.cp-fc-title { font-size: 0.75rem; font-weight: 700; color: var(--zinc-300, #d4d4d8); }
.cp-fc-toggle { display: inline-flex; border: 1px solid var(--zinc-700, #3f3f46); border-radius: 7px; overflow: hidden; }
.cp-fc-toggle button { background: var(--zinc-900, #18181b); color: var(--zinc-400, #a1a1aa); border: 0; padding: 0.25rem 0.55rem; font-size: 0.72rem; cursor: pointer; }
.cp-fc-toggle button.is-on.is-bull { background: rgba(34, 197, 94, 0.2); color: #86efac; }
.cp-fc-toggle button.is-on.is-bear { background: rgba(224, 82, 82, 0.2); color: #fca5a5; }
.cp-fc-preset, .cp-fc-tune select, .cp-fc-tune input, .cp-fc-step select {
  background: var(--zinc-900, #18181b); border: 1px solid var(--zinc-700, #3f3f46); color: var(--zinc-100, #f4f4f5);
  border-radius: 6px; padding: 0.22rem 0.35rem; font-size: 0.72rem; font-family: var(--font-mono, monospace);
}
.cp-fc-preset { max-width: 240px; color: #c4b5fd; }
.cp-fc-add { margin-left: auto; background: none; border: 1px solid rgba(34, 211, 238, 0.45); color: #67e8f9; border-radius: 6px; padding: 0.22rem 0.55rem; font-size: 0.72rem; cursor: pointer; }
.cp-fc-add:hover { background: rgba(34, 211, 238, 0.12); }
.cp-fc-tune { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; margin-bottom: 0.45rem; font-size: 0.68rem; color: var(--zinc-400, #a1a1aa); }
.cp-fc-tune label { display: inline-flex; align-items: center; gap: 0.3rem; }
.cp-fc-nudge { display: inline-flex; align-items: center; gap: 0.15rem; }
.cp-fc-nudge input { width: 6.5rem; }
.cp-fc-tune input[data-fc-field="seed"] { width: 5.5rem; }
.cp-fc-nudge button { background: var(--zinc-800, #27272a); border: 1px solid var(--zinc-700, #3f3f46); color: var(--zinc-200, #e4e4e7); border-radius: 5px; width: 1.5rem; height: 1.5rem; cursor: pointer; font-size: 0.75rem; }
.cp-fc-meta { font-size: 0.68rem; color: var(--zinc-500, #71717a); margin-bottom: 0.35rem; font-family: var(--font-mono, monospace); }
.cp-fc-empty { font-size: 0.72rem; color: var(--zinc-500, #71717a); font-style: italic; text-align: center; border: 1px dashed var(--zinc-700, #3f3f46); border-radius: 7px; padding: 0.55rem; }
.cp-fc-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.cp-fc-step { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; background: rgba(39, 39, 42, 0.7); border: 1px solid transparent; border-radius: 7px; padding: 0.3rem 0.45rem; font-size: 0.72rem; }
.cp-fc-step.is-previewing { background: rgba(8, 145, 178, 0.25); border-color: rgba(34, 211, 238, 0.5); }
.cp-fc-step.is-within { background: rgba(8, 145, 178, 0.1); border-color: rgba(34, 211, 238, 0.2); }
.cp-fc-n { color: var(--zinc-500, #71717a); width: 1.2rem; }
.cp-fc-from { color: var(--zinc-400, #a1a1aa); width: 2.3rem; font-family: var(--font-mono, monospace); }
.cp-fc-arrow { color: var(--zinc-600, #52525b); }
.cp-fc-action-breakout { color: #4ade80 !important; }
.cp-fc-action-stall { color: #facc15 !important; }
.cp-fc-action-sharp { color: #fb923c !important; }
.cp-fc-action-multi_leg { color: #c084fc !important; }
.cp-fc-action-full_reversal { color: #f87171 !important; }
.cp-fc-price { margin-left: auto; font-family: var(--font-mono, monospace); font-size: 0.66rem; color: var(--zinc-500, #71717a); }
.cp-fc-tools { display: inline-flex; gap: 0.1rem; }
.cp-fc-tools button { background: none; border: 0; color: var(--zinc-500, #71717a); cursor: pointer; font-size: 0.72rem; padding: 0.1rem 0.2rem; }
.cp-fc-tools button:hover { color: var(--zinc-200, #e4e4e7); }
.cp-fc-tools button[data-fc-action="delete"]:hover { color: #f87171; }
.cp-fc-tools button:disabled { opacity: 0.3; cursor: default; }
.cp-fc-path { margin-top: 0.3rem; font-size: 0.64rem; color: var(--zinc-500, #71717a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Forecast "Variants": look-alike count, failed-move rungs, a show/hide row per path */
.cp-fc-variants { margin-top: 0.5rem; padding: 0.4rem 0.5rem; border: 1px solid var(--zinc-800, #27272a); border-radius: 8px; font-size: 0.68rem; color: var(--zinc-400, #a1a1aa); }
.cp-fc-variants-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.8rem; }
.cp-fc-variants-head label, .cp-fc-fail { display: inline-flex; flex-direction: row; align-items: center; gap: 0.25rem; }
.cp-fc-fails { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.55rem; }
.cp-fc-none { color: var(--zinc-500, #71717a); }
.cp-fc-paths { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; margin: 0.35rem 0 0; padding: 0; list-style: none; }
.cp-fc-pathrow label { display: inline-flex; flex-direction: row; align-items: center; gap: 0.3rem; color: var(--zinc-300, #d4d4d8); cursor: pointer; }
.cp-fc-pathrow.is-hidden label { color: var(--zinc-500, #71717a); text-decoration: line-through; }
.cp-fc-pathmeta { margin-left: 0.25rem; color: var(--zinc-500, #71717a); }
.cp-fc-swatch { display: inline-block; width: 0.8rem; height: 0.55rem; border-radius: 2px; background: var(--fc-swatch); }
.cp-fc-swatch.is-failure { background: transparent; border: 2px solid var(--fc-swatch); width: 0.55rem; }
.cp-fc-swatch.is-primary { background: transparent; border: 1px solid var(--fc-swatch); }
.cp-fc-modal .cp-fc-variants input[type="checkbox"] { width: auto; height: auto; margin: 0; flex: none; }
.cp-fc-preview { margin-top: 0.55rem; border: 1px solid var(--zinc-700, #3f3f46); border-radius: 8px; background: #0f1417; min-height: 120px; overflow: hidden; }
.cp-fc-preview img { display: block; width: 100%; height: auto; }
.cp-fc-preview.is-busy img { opacity: 0.55; }
.cp-fc-preview-empty { padding: 2.5rem 0; text-align: center; color: var(--zinc-500, #71717a); font-size: 0.72rem; }
.cp-fc-summary { padding: 0.3rem 0.5rem; font-size: 0.66rem; color: var(--zinc-400, #a1a1aa); border-top: 1px solid var(--zinc-800, #27272a); }
.cp-fc-errors, .cp-fc-warnings { margin: 0.45rem 0 0; padding-left: 1.1rem; font-size: 0.7rem; }
.cp-fc-errors { color: #fca5a5; }
.cp-fc-warnings { color: #fde68a; }
.cp-fc-publish { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.55rem; font-size: 0.72rem; color: var(--zinc-300, #d4d4d8); }
.cp-fc-result { display: flex; flex-direction: column; gap: 0.35rem; }
.cp-fc-result-head { font-weight: 700; color: #ddd6fe; font-size: 0.8rem; }
.cp-fc-result-img { width: 100%; max-width: 900px; border-radius: 8px; border: 1px solid var(--zinc-700, #3f3f46); }
.cp-fc-result-meta, .cp-fc-result-path { font-size: 0.7rem; color: var(--zinc-400, #a1a1aa); }
.cp-fc-anchor { font-size: 0.72rem; color: #86efac; }
.cp-fc-anchor.is-error { color: #fca5a5; }
@media (max-width: 640px) {
  .cp-fc-add { margin-left: 0; }
  .cp-fc-price { margin-left: 0; width: 100%; }
  .cp-fc-nudge input { width: 5.2rem; }
}
.cp-fc-modal .cp-clarification-field label { display: block; }
.cp-fc-req { display: inline !important; margin-left: 0.15rem; }
.cp-fc-modal select, .cp-fc-modal .cp-fc-tune input { width: auto; display: inline-block; margin: 0; }
.cp-fc-step select { min-width: 4.2rem; }
.cp-fc-step select.cp-fc-action { min-width: 7rem; }
.cp-fc-tune label { flex-direction: row; }
.cp-fc-nudge button { line-height: 1; padding: 0; }
/* the modal sits above the site nav (its mobile dropdowns overlapped it) */
.cp-clarification-root.is-open { z-index: 9500; }
@media (max-width: 640px) {
  .cp-fc-step .cp-fc-price { width: auto; margin-left: 1.6rem; }
  .cp-fc-tools { margin-left: auto; }
}

/* ---------- SR Levels workflow (copilot-sr.js) ---------- */
.cp-sr-picker { display: flex; flex-direction: column; gap: 0.5rem; }
.cp-sr-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.cp-sr-chip { display: inline-flex; align-items: center; gap: 0.3rem; border: 1px solid var(--zinc-700, #3f3f46); border-radius: 999px; padding: 0.15rem 0.55rem; font-size: 0.72rem; color: var(--zinc-200, #e4e4e7); cursor: pointer; }
.cp-sr-chip small, .cp-sr-group small { color: var(--zinc-500, #71717a); }
.cp-sr-swatch { display: inline-block; width: 16px; background: var(--sr-c); border-radius: 2px; }
.cp-sr-groups summary { cursor: pointer; font-size: 0.72rem; color: var(--zinc-300, #d4d4d8); display: flex; align-items: center; gap: 0.5rem; }
.cp-sr-glist { max-height: 170px; overflow: auto; display: flex; flex-direction: column; gap: 0.15rem; margin-top: 0.35rem; }
.cp-sr-group { display: flex; align-items: center; gap: 0.4rem; font-size: 0.7rem; color: var(--zinc-300, #d4d4d8); }
.cp-sr-group.is-muted { opacity: 0.45; }
.cp-sr-tag { font-family: var(--font-mono, monospace); font-size: 0.64rem; color: var(--sr-c); border: 1px solid var(--sr-c); border-radius: 4px; padding: 0 0.25rem; }
.cp-sr-glabel { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-sr-notes { margin: 0; padding-left: 1.1rem; font-size: 0.72rem; color: var(--zinc-200, #e4e4e7); line-height: 1.5; }
.cp-sr-group input, .cp-sr-chip input { width: auto; margin: 0; }
.cp-sr-modal label.cp-sr-chip { display: inline-flex; flex-direction: row; align-items: center; margin: 0; }
.cp-sr-modal label.cp-sr-group { display: flex; flex-direction: row; align-items: center; text-align: left; margin: 0; }
.cp-sr-modal input[type="checkbox"], .cp-fc-publish input[type="checkbox"] { width: auto; height: auto; margin: 0; flex: none; }
.cp-fc-modal label.cp-fc-publish { display: flex; flex-direction: row; }
.cp-fc-modal .cp-clarification-actions { flex-wrap: wrap; }
.cp-fc-modal .cp-clarification-actions .cp-clarification-btn { white-space: nowrap; }

/* ---------- Elliott workflow (copilot-elliott.js) ---------- */
.cp-ew-table { width: 100%; border-collapse: collapse; font-size: 0.7rem; color: var(--zinc-200, #e4e4e7); }
.cp-ew-table th, .cp-ew-table td { text-align: left; padding: 0.2rem 0.35rem; border-bottom: 1px solid var(--zinc-800, #27272a); vertical-align: top; }
.cp-ew-table thead th { color: var(--zinc-400, #a1a1aa); font-weight: 500; }
.cp-ew-table small { color: var(--zinc-500, #71717a); }
.cp-ew-ladder { margin: 0.35rem 0; font-size: 0.72rem; color: var(--zinc-300, #d4d4d8); }
.cp-ew-setups, .cp-ew-zones { font-size: 0.7rem; color: var(--zinc-300, #d4d4d8); }
.cp-ew-setups summary, .cp-ew-zones summary { cursor: pointer; }
.cp-ew-setups ul, .cp-ew-zones ul { margin: 0.25rem 0 0; padding-left: 1.1rem; }
.cp-ew-toggles { border: 1px solid var(--zinc-800, #27272a); border-radius: 6px; padding: 0.35rem 0.6rem; margin: 0.4rem 0 0; }
.cp-ew-toggles legend { font-size: 0.68rem; color: var(--zinc-400, #a1a1aa); padding: 0 0.25rem; }
.cp-ew-modal { overflow-x: auto; }

/* MVP 76: 76 ABC stop/spike-out summary, anchor-guard override, variants builder */
.cp-signal-plan-opts { display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; align-items: baseline; margin-bottom: 0.4rem; font-size: 0.72rem; color: var(--zinc-300, #d4d4d8); }
.cp-signal-plan-opts .cp-autofill-muted { flex-basis: 100%; }
.cp-signal-spike { color: #fde68a; }
.cp-signal-force { display: flex; gap: 0.35rem; align-items: center; margin-top: 0.3rem; color: var(--zinc-300, #d4d4d8); }
.cp-signal-variants { margin-top: 0.6rem; padding-top: 0.5rem; border-top: 1px dashed var(--zinc-700, #3f3f46); }
.cp-variant-row { border: 1px solid var(--zinc-700, #3f3f46); border-radius: 8px; padding: 0.45rem 0.55rem; margin-bottom: 0.45rem; }
.cp-variant-row.is-error { border-color: rgba(252, 165, 165, 0.45); }
.cp-variant-head { display: flex; gap: 0.5rem; align-items: center; justify-content: space-between; font-size: 0.72rem; margin-bottom: 0.35rem; }
.cp-variant-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.35rem 0.5rem; font-size: 0.7rem; }
.cp-variant-grid label { display: flex; flex-direction: column; gap: 0.15rem; color: var(--zinc-400, #a1a1aa); }
.cp-variant-grid .cp-variant-spike { flex-direction: row; align-items: center; gap: 0.35rem; }
.cp-variant-plan { margin-top: 0.35rem; font-size: 0.72rem; color: var(--zinc-300, #d4d4d8); }
