/* Marlon call copilot (account managers) — token-only, no hex. Everything is mc- prefixed; Mo's
   #mo-* / .mo-* are never touched. Laptop: fixed right panel over the client 360 (z 9500, under
   Mo 10001 and Cmd-K). Phone: bottom sheet inside the mobile shell (z 1300, over the client sheet 1200). */
body:not(.marlon-enabled) #mc-fab, body:not(.marlon-enabled) #mc-root { display: none !important; }
body.chat-open #mc-fab { display: none; }
body.mo-enabled.marlon-enabled #mc-fab { bottom: 158px; }
body.mc-open #pmModalOv { padding-right: 436px; }

/* FAB + header deliberately share Mo's fixed gradient (sales-copilot.css) so the two copilots read as siblings; the only hex in this file. */
#mc-fab { position: fixed; right: 24px; bottom: 90px; z-index: 9400; width: 56px; height: 56px; border-radius: 50%; border: none; background: linear-gradient(135deg, #084a6b, #0d7a8a); color: #fff; box-shadow: 0 4px 20px rgba(8,74,107,.5); font-size: 1.4rem; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .15s, box-shadow .15s; }
#mc-fab:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(8,74,107,.7); }
#mc-fab .mc-fab-badge { position: absolute; top: -3px; right: -3px; background: #f4b844; color: #0a0f1a; font-size: .5rem; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; padding: 2px 5px; border-radius: 8px; }
body.is-mobile #mc-fab { display: none; }

.mc-panel { position: fixed; top: 0; right: 0; height: 100dvh; width: 420px; min-width: 360px; max-width: 560px; z-index: 9500; background: var(--card); color: var(--text); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg, 0 12px 40px rgba(0,0,0,.22)); display: none; flex-direction: column; font-size: 13px; line-height: 1.4; }
.mc-panel.open { display: flex; }
.mc-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 6px; background: linear-gradient(135deg, #084a6b, #0d7a8a); color: #fff; flex-shrink: 0; }
.mc-av { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.mc-title { font-weight: 800; font-size: .9rem; }
.mc-client { flex: 1; min-width: 0; font: inherit; font-weight: 700; font-size: 12px; padding: 6px 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.14); color: #fff; }
.mc-client option { color: #0a0f1a; }
.mc-ib { border: 0; background: transparent; color: #fff; opacity: .7; font-size: 16px; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.mc-ib:hover { opacity: 1; background: rgba(255,255,255,.12); color: #fff; }
.mc-sub { padding: 0 16px 12px 60px; font-size: .65rem; color: rgba(255,255,255,.8); background: linear-gradient(135deg, #084a6b, #0d7a8a); }
.mc-sub::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #4ade80; margin-right: 5px; vertical-align: middle; }
.mc-modes { display: flex; gap: 4px; padding: 0 10px 8px; border-bottom: 1px solid var(--border); }
.mc-mode { flex: 1; border: 1px solid var(--border); background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: 12px; padding: 7px 4px; border-radius: 9px; cursor: pointer; }
.mc-mode.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.mc-mode .n { display: inline-block; min-width: 16px; margin-left: 4px; padding: 0 5px; border-radius: 99px; background: color-mix(in srgb, var(--gold) 25%, transparent); color: var(--text); font-size: 10px; }
.mc-body { flex: 1; overflow: auto; padding: 10px 14px 14px; }
.mc-sec-l { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 12px 0 5px; display: flex; justify-content: space-between; align-items: baseline; }
.mc-sec-n { font-weight: 700; color: var(--dim); }
.mc-line { display: flex; align-items: flex-start; gap: 8px; padding: 5px 0; border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.mc-line .t { flex: 1; min-width: 0; }
.mc-line.is-blocked .t::before, .mc-line.is-overdue .t::before { content: '● '; color: var(--red); }
.mc-line.is-waiting .t::before { content: '◔ '; color: var(--amber); }
.mc-line.is-open .t::before { content: '○ '; color: var(--muted); }
.mc-line.is-done .t { color: var(--muted); text-decoration: line-through; }
.mc-line.plan-b .t, .mc-line.dim .t { color: var(--muted); }
.mc-line.likely { cursor: pointer; }
.mc-health { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.mc-score { font-size: 1.4rem; font-weight: 800; }
.mc-why { flex: 1; color: var(--muted); font-size: 12px; }
.mc-flag { padding: 8px 10px; border-radius: 12px; margin-top: 8px; font-weight: 700; }
.mc-flag.red { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
.mc-flag.amber { background: color-mix(in srgb, var(--amber) 14%, transparent); color: var(--amber); }
.mc-chip { flex: none; border: 1px solid var(--border); background: transparent; color: var(--muted); font: inherit; font-size: 10.5px; padding: 1px 7px; border-radius: 99px; cursor: pointer; white-space: nowrap; }
.mc-chip.on { color: var(--text); }
.mc-chip.k-transcript { color: var(--teal); border-color: color-mix(in srgb, var(--teal) 50%, transparent); }
.mc-chip.k-item { color: var(--muted); }
.mc-chip.k-slack { color: var(--purple, var(--teal)); }
.mc-chip.k-portal { color: var(--blue, var(--teal)); }
.mc-chip.k-eng { color: var(--orange, var(--gold)); }
.mc-chip.k-health.g { color: var(--green); } .mc-chip.k-health.a { color: var(--amber); } .mc-chip.k-health.r { color: var(--red); }
.mc-peek { margin: 4px 0 6px 14px; padding: 6px 10px; border-left: 2px solid var(--teal); background: var(--fill); border-radius: 0 8px 8px 0; font-size: 12px; }
.mc-peek .m { color: var(--muted); font-size: 11px; margin-top: 3px; }
.mc-peek a { color: var(--teal); font-weight: 700; }
.mc-skel { height: 14px; margin: 6px 0; border-radius: 6px; }
.mc-skel-card { height: 64px; border-radius: 12px; margin: 8px 0; }
.mc-status { font-size: 11px; color: var(--muted); padding: 6px 0; font-style: italic; }
.mc-offline { background: color-mix(in srgb, var(--amber) 14%, transparent); color: var(--amber); padding: 6px 10px; border-radius: 10px; font-size: 12px; margin-bottom: 8px; }
.mc-foot-note, .mc-note { font-size: 11px; color: var(--dim); margin-top: 10px; }
.mc-err { padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--red) 10%, transparent); color: var(--red); font-size: 12px; margin: 8px 0; display: flex; align-items: center; gap: 8px; }
.mc-err .retry, .mc-cap-row .retry { margin-left: auto; }

.mc-qa { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.mc-q { border: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; font-size: 11.5px; padding: 5px 9px; border-radius: 99px; cursor: pointer; }
.mc-q .k { display: inline-block; width: 16px; height: 16px; line-height: 16px; text-align: center; border-radius: 50%; background: var(--fill); color: var(--muted); font-size: 10px; margin-right: 4px; }
.mc-q.eng { margin-left: auto; border-color: color-mix(in srgb, var(--gold) 60%, transparent); }
.mc-msgs { padding: 6px 0; }
.mc-msg { margin: 10px 0; }
.mc-msg.u { text-align: right; }
.mc-msg.u .mc-b { display: inline-block; max-width: 84%; text-align: left; background: var(--fill); padding: 8px 10px; border-radius: 12px 12px 2px 12px; }
.mc-msg.ai .mc-who { font-size: 10px; font-weight: 800; letter-spacing: .08em; color: var(--muted); }
.mc-msg.ai .mc-b { padding: 2px 0 4px; line-height: 1.5; }
.mc-msg.ai .mc-b p { margin: 0 0 7px; }
.mc-msg.ai .mc-b ul, .mc-msg.ai .mc-b ol { margin: 2px 0 8px; padding-left: 18px; }
.mc-msg.ai .mc-b li { margin: 2px 0; }
.mc-msg.ai .mc-b h3, .mc-msg.ai .mc-b h4, .mc-msg.ai .mc-b h5 { font-size: 12.5px; margin: 8px 0 3px; }
.mc-cursor { display: inline-block; width: 7px; height: 14px; vertical-align: -2px; background: var(--teal); margin-left: 2px; animation: mcblink 1s steps(2) infinite; }
@keyframes mcblink { 50% { opacity: 0; } }
.mc-srcs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.mc-msg-acts { display: flex; gap: 6px; margin-top: 6px; }
.mc-msg-acts .btn { font-size: 11px; padding: 4px 9px; min-height: 28px; }
.mc-handoff { margin: 8px 0; padding: 10px 12px; border-left: 3px solid var(--amber); background: var(--fill); border-radius: 0 12px 12px 0; }
.mc-handoff .h { font-weight: 800; }
.mc-handoff .mc-why, .mc-handoff .mc-st { color: var(--muted); font-size: 12px; margin-top: 3px; }
.mc-handoff .acts { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.mc-handoff.is-pending { border-left-color: var(--teal); }
.mc-handoff.is-answered { border-left-color: var(--green); }
.mc-handoff.is-failed { border-left-color: var(--red); }

.mc-in { display: flex; align-items: flex-end; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--card); }
.mc-ta { flex: 1; min-width: 0; resize: none; font: inherit; font-size: 13px; line-height: 1.35; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--fill, transparent); color: var(--text); max-height: 110px; }
.mc-mic { border: 1px solid var(--border); background: transparent; color: var(--muted); border-radius: 10px; width: 36px; height: 36px; cursor: pointer; font-size: 15px; }
.mc-mic.is-live { color: var(--red); border-color: var(--red); animation: mcpulse 1.2s ease-in-out infinite; }
@keyframes mcpulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 20%, transparent); } }
.mc-send { min-height: 36px; }

.mc-cap-in { width: 100%; font: inherit; font-size: 13px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--fill, transparent); color: var(--text); resize: none; }
.mc-kind, .mc-owners, .mc-dates { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; align-items: center; font-size: 11px; color: var(--muted); }
.mc-kind button, .mc-pill { border: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; font-size: 11.5px; padding: 4px 10px; border-radius: 99px; cursor: pointer; }
.mc-kind button.on, .mc-pill.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.mc-cap-list { margin-top: 6px; }
.mc-cap-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.mc-cap-row .kind { font-size: 9.5px; font-weight: 800; letter-spacing: .06em; color: var(--muted); min-width: 56px; }
.mc-cap-row .t { flex: 1; min-width: 0; }
.mc-cap-row .meta { color: var(--muted); font-size: 11px; white-space: nowrap; }
.mc-cap-row.is-saving { opacity: .65; }
.mc-cap-row.is-err .meta { color: var(--red); }
.mc-wrap-sum { color: var(--muted); font-size: 12px; margin: 8px 0; }
.mc-draft { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin: 10px 0; background: var(--card); }
.mc-draft-h { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.mc-draft-ta { width: 100%; min-height: 90px; font: inherit; font-size: 12.5px; line-height: 1.45; padding: 8px; border-radius: 9px; border: 1px solid var(--border); background: var(--fill, transparent); color: var(--text); resize: vertical; }
.mc-copy { font-size: 11px; }
.mc-copy.ok { color: var(--green); }
.mc-cap-row .meta.ok { color: var(--green); }
.mc-wrap-srcs { margin: 6px 0 2px; }
.mc-guard-badge { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0; text-transform: none; padding: 1px 7px; border-radius: 99px; margin-left: 6px; background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); }
.mc-draft-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.mc-draft-acts .btn { font-size: 11.5px; }
.mc-queued { font-size: 11px; color: var(--muted); }
.mc-eng-q { padding: 7px 0; border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.mc-eng-q .t { font-size: 12.5px; }
.mc-eng-q .mc-why { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.mc-eq-acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.mc-eq-acts .btn { font-size: 11px; padding: 4px 9px; min-height: 28px; }

@media (prefers-reduced-motion: reduce) { .mc-cursor, .mc-mic.is-live, .mc-skel, .mc-skel-card { animation: none !important; } }

/* phone: bottom sheet inside the mobile shell */
@media (max-width: 768px) {
  body.mc-open #pmModalOv { padding-right: 0; }
  body.is-mobile .mc-sheet-wrap { position: fixed; inset: 0; z-index: 1300; background: color-mix(in srgb, #000 35%, transparent); display: none; }
  body.is-mobile .mc-sheet-wrap.open { display: block; }
  body.is-mobile .mc-sheet { position: absolute; left: 0; right: 0; bottom: 0; height: 58dvh; background: var(--card); color: var(--text); border-radius: 18px 18px 0 0; box-shadow: var(--shadow-lg, 0 -8px 30px rgba(0,0,0,.25)); display: flex; flex-direction: column; font-size: 14px; }
  body.is-mobile .mc-sheet.full { height: 92dvh; }
  body.is-mobile .mc-grab { width: 44px; height: 5px; border-radius: 99px; background: var(--border); margin: 8px auto 2px; }
  body.is-mobile .mc-head { padding: 6px 14px; min-height: 44px; }
  body.is-mobile .mc-client { font-size: 14px; }
  body.is-mobile .mc-x { width: 44px; height: 44px; font-size: 20px; }
  body.is-mobile .mc-body { padding: 8px 14px 10px; -webkit-overflow-scrolling: touch; }
  body.is-mobile .mc-line { min-height: 44px; align-items: center; }
  body.is-mobile .mc-chip { min-height: 32px; display: inline-flex; align-items: center; }
  body.is-mobile .mc-modes { order: 10; border-top: 1px solid var(--border); border-bottom: 0; padding: 8px 10px; }
  body.is-mobile .mc-mode { min-height: 48px; font-size: 13px; }
  body.is-mobile .mc-in { order: 11; padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); }
  body.is-mobile .mc-ta, body.is-mobile .mc-cap-in { font-size: 16px; min-height: 48px; }
  body.is-mobile .mc-mic, body.is-mobile .mc-send, body.is-mobile .btn { min-height: 48px; min-width: 48px; }
  body.is-mobile .mc-qa { flex-wrap: nowrap; overflow-x: auto; }
  body.is-mobile .mc-q { min-height: 44px; display: inline-flex; align-items: center; }
  body.is-mobile .mc-kind button, body.is-mobile .mc-pill { min-height: 40px; }
  body.is-mobile .mc-mbar { display: flex; gap: 8px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); position: sticky; bottom: 0; background: var(--card); border-top: 1px solid var(--border); }
  body.is-mobile .mc-mbar button { flex: 1; min-height: 48px; font-weight: 800; }
}
