
/* ── Copilot drawer ─────────────────────────────────── */
.copilot-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: var(--copilot-width);
  max-width: calc(100vw - 80px);
  z-index: 620;
  background: var(--s2);
  border-left: 1px solid var(--border);
  box-shadow: -16px 0 48px rgba(0,0,0,.5);
  display: flex; flex-direction: column;
  transform: translateX(105%);
  transition: transform .28s ease, width 0s;
}
.copilot-panel.open { transform: translateX(0); }
body.copilot-resizing .copilot-panel { transition: transform 0s; }

.copilot-resize {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 10px;
  margin-left: -5px;
  z-index: 30;
  cursor: ew-resize;
  background: transparent;
  touch-action: none;
}
.copilot-resize::after {
  content: '';
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 4px; transform: translateX(-50%);
  border-radius: 2px;
  background: transparent;
  transition: background .12s;
}
.copilot-resize:hover::after {
  background: rgba(99,102,241,.5);
}

.copilot-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.2px;
  flex-shrink: 0;
}
.copilot-hd .brand-mark { font-size: 15px; }
.copilot-hd em { font-style: normal; color: inherit; }

/* ── Chat input bar (bottom-anchored, above the mic dock) ──────────────
   Sits between the learned strip and the footer so the input, mic, and
   "learned" icon read as a single chat composer. */
.copilot-cmd {
  flex-shrink: 0;
  padding: 10px 18px 8px;
  border-top: 1px solid var(--border-soft);
  background: linear-gradient(0deg, var(--s2), rgba(30,30,53,.0));
}
.copilot-cmd-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--s0); border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color .12s, box-shadow .12s;
}
.copilot-cmd-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,.18);
}
.copilot-cmd-bar .cmd-ic {
  width: 24px; height: 24px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; letter-spacing: .5px;
  flex-shrink: 0;
}
.copilot-cmd-bar textarea {
  flex: 1; resize: none; min-height: 22px; max-height: 140px;
  background: transparent; border: 0; outline: 0; color: var(--text);
  font: inherit; font-size: 14px; line-height: 1.5;
  padding: 0;
}
.copilot-cmd-bar textarea::placeholder { color: var(--muted); opacity: .9; }
.copilot-cmd-bar .cmd-kbd {
  font-size: 10px; color: var(--muted);
  padding: 2px 6px; border: 1px solid var(--border); border-radius: 4px;
  font-family: ui-monospace, monospace;
  flex-shrink: 0;
}
.copilot-x {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--s1);
  color: var(--muted); cursor: pointer; font-size: 17px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color .12s, border-color .12s;
}
.copilot-x:hover { color: var(--text); border-color: var(--accent); }

/* "New chat" — same visual footprint as .copilot-x but wider to hold a label,
   sits to its left in the header. */
.copilot-new {
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--s1);
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 6px;
  transition: color .12s, border-color .12s;
}
.copilot-new:hover { color: var(--text); border-color: var(--accent); }
.copilot-new svg { opacity: .85; }

.copilot-status {
  padding: 6px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
  flex-shrink: 0;
}
.copilot-status:empty { display: none; }

/* ── Suggestion chips (welcome + nudges) ── */
.copilot-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.copilot-chip {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--s1);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  transition: color .12s, border-color .12s, background .12s;
}
.copilot-chip:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--s1));
}

/* Inline "ask the Copilot" link used in empty states */
.copilot-inline-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}

.copilot-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.copilot-msg {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 100%;
}
.copilot-msg.user      { align-self: stretch; align-items: stretch; }
.copilot-msg.assistant { align-self: stretch; align-items: stretch; }
.copilot-msg.err       { align-self: stretch; align-items: stretch; }
.copilot-msg.voice-delegate-request { align-self: stretch; align-items: stretch; }
.copilot-msg.voice-delegate-result  { align-self: stretch; align-items: stretch; }

.copilot-role {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted-2);
  padding: 0;
  display: inline-flex; align-items: center; gap: 8px;
}
.copilot-role::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted-2);
}
.copilot-msg.user      .copilot-role::before { background: #c7d2fe; }
.copilot-msg.user      .copilot-role { color: #c7d2fe; }
.copilot-msg.assistant .copilot-role::before { background: var(--accent); }
.copilot-msg.assistant .copilot-role { color: var(--accent); }
.copilot-msg.err       .copilot-role::before { background: #fca5a5; }
.copilot-msg.err       .copilot-role { color: #fca5a5; }
.copilot-msg.voice-delegate-request .copilot-role::before { background: #7dd3fc; }
.copilot-msg.voice-delegate-request .copilot-role { color: #7dd3fc; }
.copilot-msg.voice-delegate-result  .copilot-role::before { background: #86efac; }
.copilot-msg.voice-delegate-result  .copilot-role { color: #86efac; }

.copilot-bubble {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.55;
  white-space: normal;
  word-break: break-word;
  max-width: 100%;
  border-left: 2px solid var(--border);
}
.copilot-bubble p  { margin: 0 0 .55em; }
.copilot-bubble p:last-child { margin-bottom: 0; }
.copilot-bubble strong { font-weight: 700; color: var(--text); }
.copilot-bubble em     { font-style: italic; color: var(--muted); }
.copilot-bubble code   { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; background: rgba(99,102,241,.12); padding: 1px 5px; border-radius: 4px; }
.copilot-bubble h3, .copilot-bubble h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: .9em 0 .35em; }
.copilot-bubble ul, .copilot-bubble ol { margin: .3em 0 .55em 1.2em; padding: 0; }
.copilot-bubble li { margin-bottom: .2em; }
/* DMX change table */
.copilot-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  margin: .6em 0 .8em; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border);
}
.copilot-table th {
  background: var(--s2); border-bottom: 1px solid var(--border);
  padding: 6px 10px; text-align: left; font-weight: 600;
  font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
}
.copilot-table td { padding: 5px 10px; border-bottom: 1px solid rgba(255,255,255,.04); }
.copilot-table tr:last-child td { border-bottom: none; }
.copilot-table tr:nth-child(even) td { background: rgba(255,255,255,.02); }
.copilot-bubble.user {
  background: rgba(99,102,241,.08);
  border-left: 2px solid var(--accent);
  font-style: italic;
  color: #d5d6f2;
}
.copilot-bubble.assistant {
  background: var(--s1);
  border-left: 2px solid var(--accent);
}
.copilot-bubble.err {
  border-left: 2px solid var(--red);
  background: rgba(239,68,68,.08);
  color: #fecaca;
}
.copilot-bubble.voice-delegate-request {
  border-left: 2px solid #38bdf8;
  background: rgba(56, 189, 248, .08);
  color: #d9f3ff;
}
.copilot-bubble.voice-delegate-result {
  border-left: 2px solid #4ade80;
  background: rgba(74, 222, 128, .08);
  color: #ddffe8;
}

/* ── "🧠 Learned" inspector strip (Capstack profile entries) ─────────── */

.learned-strip {
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--s2) 50%, transparent);
}

.learned-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 18px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  transition: color 0.15s, background 0.15s;
}
.learned-toggle:hover {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  color: var(--text);
}

.learned-icon { font-size: 14px; line-height: 1; }
.learned-count {
  font-weight: 600;
  color: var(--text);
  min-width: 14px;
  text-align: center;
}
.learned-label { letter-spacing: 0.02em; }
.learned-chev {
  margin-left: auto;
  transition: transform 0.18s;
  font-size: 10px;
}
.learned-toggle.open .learned-chev { transform: rotate(180deg); }

.learned-panel {
  max-height: 260px;
  overflow-y: auto;
  padding: 4px 14px 12px;
  border-top: 1px solid var(--border);
}

.learned-empty {
  font-size: 12px;
  color: var(--muted);
  padding: 12px 4px;
  font-style: italic;
}

.learned-section { margin: 8px 0; }
.learned-section-hd {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 6px 0 4px;
}
.learned-section-name {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
}
.learned-section-hint {
  font-size: 10px;
  color: var(--muted);
  opacity: 0.7;
}

.learned-entry {
  background: var(--s2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--text);
}
.learned-entry-hd {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.learned-chip {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  white-space: nowrap;
}
.learned-chip.scope-general {
  background: color-mix(in srgb, #a78bfa 14%, transparent);
  color: #c4b5fd;
  border-color: color-mix(in srgb, #a78bfa 30%, transparent);
}
.learned-chip.scope-type {
  background: color-mix(in srgb, #4ade80 12%, transparent);
  color: #86efac;
  border-color: color-mix(in srgb, #4ade80 28%, transparent);
}
.learned-chip-conf {
  font-size: 10px;
  color: var(--muted);
  padding: 2px 6px;
  background: color-mix(in srgb, var(--muted) 14%, transparent);
  border-radius: 10px;
}
.learned-del {
  margin-left: auto;
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.learned-del:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

.learned-entry-title {
  font-weight: 600;
  margin-bottom: 2px;
  line-height: 1.35;
}
.learned-entry-body {
  color: var(--muted);
  line-height: 1.4;
  margin: 2px 0;
}
.learned-entry-rule {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--accent);
  margin-top: 4px;
  padding: 3px 6px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  display: inline-block;
}
.learned-entry-quote {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
  margin-top: 4px;
  padding-left: 8px;
  border-left: 2px solid var(--border);
}

@keyframes learnedFlash {
  0%   { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 0%, transparent); }
  20%  { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 70%, transparent); }
  100% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 0%, transparent); }
}
.learned-entry.flash {
  animation: learnedFlash 1.3s ease-out;
}

/* ── "↳ Applied:" footnote under an assistant bubble ──────────────────── */

.copilot-applied {
  margin-top: 6px;
  padding: 0 4px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  line-height: 1.6;
}
.copilot-applied-lead {
  opacity: 0.8;
}
.copilot-applied-sep {
  opacity: 0.5;
  margin: 0 2px;
}
.copilot-applied-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.copilot-applied-pill:hover {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
}
.copilot-applied-pill:active {
  transform: scale(0.97);
}
.copilot-applied-pill.scope-general {
  border-color: color-mix(in srgb, #a78bfa 30%, transparent);
  background: color-mix(in srgb, #a78bfa 12%, transparent);
  color: #c4b5fd;
}
.copilot-applied-pill.scope-type {
  border-color: color-mix(in srgb, #4ade80 28%, transparent);
  background: color-mix(in srgb, #4ade80 12%, transparent);
  color: #86efac;
}

/* ── Learning proposal card (from propose_learning tool) ──────────────── */

.learning-proposal {
  margin-top: 10px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--accent) 6%, var(--s2));
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border));
  border-radius: 10px;
  font-size: 13px;
  color: var(--text);
}
.lp-hd {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}
.lp-icon { font-size: 13px; }
.lp-title {
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}
.lp-body {
  color: var(--muted);
  line-height: 1.45;
  margin-top: 4px;
}
.lp-rule {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--accent);
  background: rgba(0, 0, 0, 0.22);
  border-radius: 4px;
}
.lp-prompt {
  margin-top: 12px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--text);
  font-weight: 600;
}
.lp-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s;
  font-size: 12px;
}
.lp-radio:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.lp-radio input { margin: 0; cursor: pointer; }
.lp-radio span { line-height: 1.4; }
.lp-radio em {
  font-style: normal;
  color: var(--muted);
  font-size: 11px;
  margin-left: 4px;
}
.lp-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}
.lp-actions .btn { padding: 6px 14px; font-size: 12px; }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text); }

.learning-proposal.saved {
  background: color-mix(in srgb, #4ade80 8%, var(--s2));
  border-color: color-mix(in srgb, #4ade80 28%, var(--border));
  padding: 10px 14px;
}
.lp-saved {
  color: #86efac;
  font-size: 12px;
  text-align: center;
}

/* ── Conflicts on the proposal card ───────────────────────────────────── */

.lp-conflicts {
  margin: 10px 0;
  padding: 10px 12px;
  background: color-mix(in srgb, #fbbf24 9%, var(--s2));
  border: 1px solid color-mix(in srgb, #fbbf24 32%, var(--border));
  border-radius: 8px;
}
.lp-conflicts-hd {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #fcd34d;
  margin-bottom: 6px;
}
.lp-conflict-item {
  font-size: 12px;
  color: var(--text);
  padding: 6px 0;
  border-top: 1px solid rgba(251, 191, 36, 0.18);
}
.lp-conflict-item:first-of-type { border-top: 0; }
.lp-conflict-msg { line-height: 1.4; }
.lp-conflict-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.lp-conflict-link {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: #fcd34d;
  text-decoration: none;
  padding: 1px 5px;
  background: rgba(251, 191, 36, 0.12);
  border-radius: 3px;
}
.lp-conflict-link:hover { background: rgba(251, 191, 36, 0.22); }
.lp-conflict-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  font-style: italic;
}
.lp-conflict-foot {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(251, 191, 36, 0.18);
}

/* ── Agent thinking / chain-of-thought block ─────────────────────────
   Rendered between the "Copilot" role label and the answer bubble.
   Collapsed by default; expand to inspect tool calls + reasoning.     */

.copilot-thinking {
  margin-bottom: 6px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border));
  background: color-mix(in srgb, var(--accent) 4%, var(--s0));
  overflow: hidden;
}

.copilot-thinking > summary {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  cursor: pointer;
  list-style: none;
  font-size: 11.5px;
  color: var(--muted);
  user-select: none;
  transition: color .12s, background .12s;
}
.copilot-thinking > summary::-webkit-details-marker { display: none; }
.copilot-thinking > summary:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

.copilot-thinking-icon {
  font-size: 10px;
  color: var(--accent);
  opacity: .8;
  flex-shrink: 0;
}
.copilot-thinking-label { flex: 1; letter-spacing: .01em; }
.copilot-thinking-chev {
  font-size: 9px;
  transition: transform .17s;
  flex-shrink: 0;
}
.copilot-thinking[open] > summary .copilot-thinking-chev {
  transform: rotate(180deg);
}

.copilot-thinking-body {
  padding: 6px 12px 10px;
  border-top: 1px solid color-mix(in srgb, var(--accent) 16%, var(--border));
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.copilot-thinking-round-hd {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted-2);
  font-weight: 600;
  margin-bottom: 4px;
}

.copilot-thinking-text {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
  font-style: italic;
  padding-left: 8px;
  border-left: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  margin-bottom: 6px;
  white-space: pre-wrap;
  word-break: break-word;
}

.copilot-thinking-tools {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.copilot-thinking-tool {
  background: rgba(0,0,0,.22);
  border-radius: 6px;
  padding: 5px 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}
.copilot-tool-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.copilot-tool-name {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}
.copilot-tool-args {
  color: var(--muted);
  word-break: break-all;
}
.copilot-tool-result {
  margin-top: 3px;
  color: color-mix(in srgb, var(--muted) 70%, var(--text));
  word-break: break-all;
  max-height: 72px;
  overflow: hidden;
  position: relative;
}
.copilot-tool-result.clipped::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 24px;
  background: linear-gradient(transparent, rgba(0,0,0,.4));
  pointer-events: none;
}
.copilot-tool-err {
  color: #fca5a5;
}

/* ── Footer dock (voice mic + hint; input bar sits directly above) ─── */

.copilot-ft {
  padding: 8px 18px 12px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  background: var(--s2);
}

.voice-mode-hint {
  flex: 1;
  min-height: 14px;
  font-size: 12px;
  letter-spacing: .2px;
  color: #9aa0da;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity .14s ease, transform .14s ease;
}
.voice-mode-hint.on {
  opacity: 1;
  transform: translateY(0);
}
/* Hidden legacy chat textarea + send button kept for JS that still references them. */
.copilot-ft textarea { display: none; }
.copilot-ft .btn:not(.btn-mic) { display: none; }

.copilot-ft-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* ── Mic button ──────────────────────────────────── */
.btn-mic {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--s1);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color .15s, border-color .15s, background .15s, box-shadow .15s;
  flex-shrink: 0;
}
.btn-mic:hover { color: var(--text); border-color: var(--accent); }

/* Connecting: pulsing border */
.btn-mic.voice-connecting {
  color: var(--accent);
  border-color: var(--accent);
  animation: mic-pulse 1.2s ease-in-out infinite;
}

/* Live: glowing red — user knows it's recording */
.btn-mic.voice-live {
  color: #fff;
  background: #e03;
  border-color: #e03;
  box-shadow: 0 0 0 4px rgba(238, 0, 51, .25);
  animation: mic-ring 1.8s ease-in-out infinite;
}

@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,.4); }
  50%       { box-shadow: 0 0 0 6px rgba(99,102,241,.0); }
}
@keyframes mic-ring {
  0%, 100% { box-shadow: 0 0 0 4px rgba(238,0,51,.25); }
  50%       { box-shadow: 0 0 0 8px rgba(238,0,51,.0); }
}
