/* ═══ Sales Copilot (Mo) — ported from Sales Playbook v5 ═══ */
/* RBAC gate: copilot only appears for sales/admin (body.mo-enabled set in app.js applyRbac). */
body:not(.mo-enabled) #mo-fab,
body:not(.mo-enabled) #mo-panel,
body:not(.mo-enabled) #mo-backdrop { display: none !important; }
  #mo-fab{position:fixed;bottom:90px;right:24px;z-index:10001;width:56px;height:56px;border-radius:50%;background:linear-gradient(135deg,#084a6b,#0d7a8a);color:#fff;border:none;cursor:pointer;box-shadow:0 4px 20px rgba(8,74,107,.5);display:flex;align-items:center;justify-content:center;transition:transform .2s,box-shadow .2s,opacity .25s;font-size:1.4rem}
  /* stacked ABOVE the status widget (.sw-wrap bottom:24); hidden while the CFO chat float is open so it doesn't sit on top of it */
  body.chat-open #mo-fab{display:none}
  #mo-fab:hover{transform:scale(1.08);box-shadow:0 6px 28px rgba(8,74,107,.7)}
  #mo-fab.hidden{opacity:0;pointer-events:none}
  #mo-fab .mo-badge{position:absolute;top:-3px;right:-3px;background:#f4b844;color:#0a0f1a;font-size:.5rem;font-weight:800;text-transform:uppercase;padding:2px 5px;border-radius:8px}
  #mo-backdrop{display:none;position:fixed;inset:0;z-index:10000;background:rgba(0,0,0,.12);transition:opacity .25s}
  #mo-backdrop.visible{display:block}
  #mo-panel{position:fixed;top:0;right:0;bottom:0;z-index:10001;width:33.333vw;min-width:360px;max-width:800px;background:#f9fafb;box-shadow:-8px 0 40px rgba(0,0,0,.18);display:flex;flex-direction:column;transform:translateX(100%);transition:transform .3s cubic-bezier(.22,1,.36,1);border-left:1px solid #e5e7eb;will-change:transform;font-family:'Plus Jakarta Sans',-apple-system,'Segoe UI',Helvetica,Arial,sans-serif}
  #mo-panel.open{transform:translateX(0)}
  #mo-resize-handle{position:absolute;top:0;left:-5px;bottom:0;width:10px;cursor:ew-resize;z-index:10002;display:flex;align-items:center;justify-content:center}
  #mo-resize-handle::after{content:'';display:block;width:3px;height:40px;background:rgba(8,74,107,.25);border-radius:3px;transition:background .2s}
  #mo-resize-handle:hover::after{background:rgba(8,74,107,.7)}
  .mh{background:linear-gradient(135deg,#084a6b,#0d7a8a);color:#fff;padding:14px 16px;display:flex;align-items:center;gap:10px;flex-shrink:0}
  .mh-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}
  .mh-t{flex:1;min-width:0}.mh-n{font-weight:800;font-size:.9rem}.mh-s{font-size:.65rem;opacity:.8;display:flex;align-items:center;gap:4px;margin-top:1px}
  .mh-dot{width:5px;height:5px;border-radius:50%;background:#4ade80}
  .mh-x{background:none;border:none;color:#fff;cursor:pointer;opacity:.6;padding:4px 6px;border-radius:4px;font-size:.95rem;transition:opacity .15s,background .15s}
  .mh-x:hover{opacity:1;background:rgba(255,255,255,.1)}
  /* A header toggle that is ON must look it. moApplyTele()/moToggleFull() have always set .active on
     #mo-tele-btn and #mo-full-btn, but no rule existed, so teleprompter mode (which hides the meeting
     picker, the deal and the quick actions, and persists in localStorage) was invisible. */
  .mh-x.active{opacity:1;background:rgba(255,255,255,.3);box-shadow:inset 0 0 0 1px rgba(255,255,255,.6)}
  #mo-meeting{padding:8px 14px;background:#0a0f1a;flex-shrink:0;border-bottom:1px solid #1e293b}
  .mtg-active{display:flex;align-items:center;gap:8px}.mtg-icon{font-size:.85rem;flex-shrink:0}.mtg-info{flex:1;min-width:0}
  .mtg-title{font-size:.75rem;font-weight:700;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mtg-meta{font-size:.62rem;color:#94a3b8;display:flex;gap:8px;margin-top:1px}.mtg-nav{display:flex;gap:2px;flex-shrink:0}
  .mtg-nav-btn{background:none;border:1px solid #334155;border-radius:4px;color:#94a3b8;cursor:pointer;padding:2px 6px;font-size:.6rem;font-weight:700;transition:all .12s}
  .mtg-nav-btn:hover{background:#1e293b;color:#fff;border-color:#475569}.mtg-empty{font-size:.68rem;color:#64748b}
  .mtg-manual{background:none;border:1px dashed #475569;border-radius:4px;color:#94a3b8;cursor:pointer;padding:3px 8px;font-size:.6rem;font-weight:600;transition:all .12s;margin-left:6px}
  .mtg-manual:hover{border-color:#f4b844;color:#f4b844}
  #mtg-deal{display:none;padding:4px 14px;background:#0f172a;border-bottom:1px solid #1e293b}
  .deal-badge{display:flex;align-items:center;gap:6px;font-size:.62rem;color:#94a3b8;flex-wrap:wrap}
  .deal-stage{padding:2px 7px;border-radius:8px;background:#0d7a8a;color:#fff;font-weight:800;font-size:.55rem;text-transform:uppercase;letter-spacing:.03em}
  .deal-val{color:#f4b844;font-weight:800}.deal-age{color:#64748b}
  /* ── Call phase bar (Phase E): five segments, current phase highlighted, amber when over its target ── */
  #mo-phasebar{display:flex;align-items:stretch;gap:2px;padding:6px 14px;background:#0f172a;border-bottom:1px solid #1e293b;flex-shrink:0}
  .ph-seg{flex:1;display:flex;align-items:center;gap:4px;padding:3px 6px;border-radius:5px;background:#1e293b;color:#94a3b8;font-size:.58rem;font-weight:700;cursor:pointer;min-width:0;transition:background .2s,color .2s}
  .ph-seg:hover{background:#334155;color:#fff}
  .ph-n{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;border-radius:50%;background:rgba(255,255,255,.08);font-size:.52rem;flex-shrink:0}
  .ph-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .ph-seg.done{background:#134e4a;color:#99f6e4}
  .ph-seg.active{background:var(--teal,#0d7a8a);color:#fff}
  .ph-seg.active .ph-n{background:rgba(255,255,255,.22)}
  .ph-seg.over{background:var(--amber,#f59e0b);color:#1e1b18}
  .ph-seg.override{outline:2px solid var(--gold,#f4b844);outline-offset:-2px}
  .ph-t{margin-left:auto;opacity:.8;font-variant-numeric:tabular-nums;font-size:.52rem}
  .ph-clock{font-size:.58rem;color:#94a3b8;align-self:center;padding-left:6px;white-space:nowrap;font-variant-numeric:tabular-nums}
  .mo-top-bar{display:flex;gap:6px;padding:8px 14px;flex-shrink:0;background:#fff;border-bottom:1px solid #eee}
  .mo-setup-btn{flex:1;padding:6px 0;font-size:.68rem;font-weight:700;text-align:center;border:1.5px solid #d1d5db;border-radius:6px;background:#fff;color:#6b7280;cursor:pointer;transition:all .15s;text-transform:uppercase;letter-spacing:.04em;display:flex;align-items:center;justify-content:center;gap:5px}
  .mo-setup-btn:hover{background:#f4b844;color:#0a0f1a;border-color:#f4b844}
  .mo-setup-btn.running{background:#fef3c7;color:#92400e;border-color:#fde68a;pointer-events:none}
  .mo-setup-btn .mo-btn-icon{font-size:.8rem}
  .mo-speed{display:flex;gap:0;flex-shrink:0}
  .mo-speed-btn{padding:4px 10px;font-size:.63rem;font-weight:700;border:1.5px solid #d1d5db;background:#fff;color:#6b7280;cursor:pointer;transition:all .12s;text-transform:uppercase;letter-spacing:.03em}
  .mo-speed-btn:first-child{border-radius:5px 0 0 5px;border-right:0}.mo-speed-btn:last-child{border-radius:0 5px 5px 0}
  .mo-speed-btn.active{background:#084a6b;color:#fff;border-color:#084a6b}
  #mo-thermo{flex-shrink:0;padding:0;background:#fff;border-bottom:1px solid #eee}
  #mo-thermo-header{display:flex;align-items:center;gap:8px;padding:7px 14px;cursor:pointer;user-select:none;transition:background .15s}
  #mo-thermo-header:hover{background:#f9fafb}
  #mo-thermo-toggle{font-size:.6rem;color:#9ca3af;margin-left:auto;transition:transform .2s}
  #mo-thermo.collapsed #mo-thermo-toggle{transform:rotate(-90deg)}
  #mo-thermo-body{padding:8px 14px 10px;overflow:hidden;transition:max-height .25s ease,padding .25s ease,opacity .2s;max-height:300px;opacity:1}
  #mo-thermo.collapsed #mo-thermo-body{max-height:0;padding-top:0;padding-bottom:0;opacity:0}
  .th-path-bar{display:flex;align-items:center;gap:0;height:28px;border-radius:6px;overflow:hidden;margin-bottom:8px;position:relative;background:#e5e7eb;cursor:pointer}
  .th-seg{flex:1;height:100%;display:flex;align-items:center;justify-content:center;font-size:.6rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em;transition:all .3s;color:rgba(0,0,0,.55);position:relative}
  .th-seg.active{color:#fff}
  .th-seg[data-path=workmate]{background:#0d7a8a33}.th-seg[data-path=workmate].active{background:#0d7a8a}
  .th-seg[data-path=sic_starter]{background:#0b6a8c33}.th-seg[data-path=sic_starter].active{background:#0b6a8c}
  .th-seg[data-path=sic_pro]{background:#084a6b33}.th-seg[data-path=sic_pro].active{background:#084a6b}
  .th-seg[data-path=sic_enterprise]{background:#0a0f1a33}.th-seg[data-path=sic_enterprise].active{background:#0a0f1a}
  .th-seg[data-path=product_blueprint]{background:#7c2d1233}.th-seg[data-path=product_blueprint].active{background:#7c2d12}
  .th-seg[data-path=unknown]{display:none}
  .th-conf-bar{height:4px;background:#e5e7eb;border-radius:2px;overflow:hidden}
  .th-conf-fill{height:100%;border-radius:2px;transition:width .5s ease,background .3s}
  .th-bant{display:grid;grid-template-columns:1fr 1fr;gap:4px 8px}
  .th-field{display:flex;align-items:flex-start;gap:5px;font-size:.68rem;padding:3px 0}
  .th-icon{width:14px;height:14px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:.55rem;flex-shrink:0;font-weight:900;margin-top:1px;transition:background .2s,color .2s}
  .th-icon.confirmed{background:#dcfce7;color:#16a34a}.th-icon.likely{background:#fef9c3;color:#ca8a04}
  .th-icon.unlikely{background:#fee2e2;color:#dc2626}.th-icon.unknown{background:#f3f4f6;color:#9ca3af}
  .th-lbl{font-weight:700;color:#374151;flex-shrink:0}.th-val{color:#6b7280;font-weight:500;flex:1;white-space:normal;line-height:1.3}
  .th-next{margin-top:8px;padding:6px 10px;background:#fffbeb;border:1px solid #fde68a;border-radius:6px;font-size:.75rem;display:flex;align-items:flex-start;gap:5px}
  .th-next-icon{font-size:.8rem;flex-shrink:0;margin-top:1px}.th-next-text{color:#92400e;font-weight:600;line-height:1.4}
  .th-ctx{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}
  .th-chip{font-size:.6rem;padding:2px 7px;border-radius:10px;background:#f3f4f6;color:#6b7280;font-weight:600}
  .th-chip.has-val{background:#e0f2fe;color:#0369a1}
  /* Call type selector */
  .mo-ct{display:flex;gap:0;padding:6px 14px;flex-shrink:0;border-bottom:1px solid #eee;background:#f8fafc;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .mo-ct-btn{padding:4px 10px;font-size:.6rem;font-weight:700;border:1.5px solid #d1d5db;background:#fff;color:#4b5563;cursor:pointer;transition:all .12s;white-space:nowrap;letter-spacing:.02em}
  .mo-ct-btn:first-child{border-radius:6px 0 0 6px}.mo-ct-btn:last-child{border-radius:0 6px 6px 0}
  .mo-ct-btn:not(:first-child){border-left:0}
  .mo-ct-btn:hover{background:#f0f9ff;color:#084a6b;border-color:#0d7a8a}
  .mo-ct-btn.active{background:#084a6b;color:#fff;border-color:#084a6b}
  .mo-ct-btn.active+.mo-ct-btn{border-left-color:#084a6b}
  .mo-qa{display:flex;flex-wrap:wrap;gap:5px;padding:8px 14px;flex-shrink:0;border-bottom:1px solid #eee;background:#fafafa}
  .mo-q{padding:3px 10px;border-radius:14px;border:1px solid #d1d5db;font-size:.65rem;font-weight:600;color:#374151;background:#fff;cursor:pointer;transition:all .12s;white-space:nowrap}
  .mo-q:hover{background:#084a6b;color:#fff;border-color:#084a6b}
  .mo-q-proposal{background:linear-gradient(135deg,#f4b844,#d49a2a);color:#0a0f1a;border-color:#d49a2a;font-weight:800}
  .mo-q-proposal:hover{background:linear-gradient(135deg,#d49a2a,#b8841a);color:#fff;border-color:#b8841a}
  #mo-msgs{flex:1;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:8px;background:#f9fafb;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
  .mm{display:flex;flex-direction:column;max-width:92%;animation:mmFadeIn .2s ease}
  @keyframes mmFadeIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
  .mm.u{align-self:flex-end;align-items:flex-end}.mm.a{align-self:flex-start;align-items:flex-start;width:100%;max-width:100%}
  .mm-l{font-size:.58rem;color:#9ca3af;margin-bottom:2px;font-weight:700;text-transform:uppercase;letter-spacing:.05em}
  .mm-b{padding:9px 12px;border-radius:10px;font-size:.82rem;line-height:1.6;word-break:break-word}
  .mm.u .mm-b{background:#084a6b;color:#fff;border-bottom-right-radius:3px;max-width:85%}
  .mm.a .mm-b{background:#fff;color:#111827;border:1px solid #e5e7eb;border-bottom-left-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.04)}
  .mm.a{position:relative}.mo-copy-btn{position:absolute;top:2px;right:2px;background:none;border:none;color:#9ca3af;cursor:pointer;font-size:.7rem;padding:2px 4px;border-radius:4px;opacity:0;transition:opacity .2s}.mm.a:hover .mo-copy-btn{opacity:1}.mo-copy-btn:hover{background:#f3f4f6;color:#374151}
  .mm-tr{background:#1e3a4a;color:#a8d4e6;border-bottom-right-radius:3px;max-width:85%;cursor:pointer;user-select:none}
  .mm-tr-h{display:flex;align-items:center;gap:6px;font-size:.68rem;font-weight:700}
  .mm-tr-m{color:#bcdff0;font-size:.63rem;font-weight:500}
  .mm-tr-p{margin-top:4px;font-size:.7rem;color:#bcdff0;font-style:italic;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px}
  .mm-tr-f{display:none;margin-top:6px;font-size:.76rem;color:#cde8f4;line-height:1.5;white-space:pre-wrap;max-height:180px;overflow-y:auto;border-top:1px solid rgba(255,255,255,.1);padding-top:6px}
  .mm-tr.exp .mm-tr-f{display:block}.mm-tr.exp .mm-tr-p{display:none}
  .mo-think{font-style:italic;color:#6b7280;font-size:.76rem}
  @keyframes moThinkPulse{0%,80%,100%{opacity:.3}40%{opacity:1}}
  .mo-think-dots span{display:inline-block;animation:moThinkPulse 1.4s infinite}
  .mo-think-dots span:nth-child(2){animation-delay:.2s}.mo-think-dots span:nth-child(3){animation-delay:.4s}
  #mo-in{border-top:1px solid #e5e7eb;padding:10px 14px;flex-shrink:0;background:#fff}
  #mo-ta{width:100%;border:1.5px solid #d1d5db;border-radius:8px;padding:8px 11px;font-size:.8rem;font-family:inherit;resize:none;outline:none;line-height:1.45;box-sizing:border-box;color:#111827;transition:border-color .15s,box-shadow .15s;min-height:42px;max-height:120px}
  #mo-ta:focus{border-color:#0d7a8a;box-shadow:0 0 0 3px rgba(13,122,138,.1)}
  #mo-ta::placeholder{color:#9ca3af}
  .mo-sr{display:flex;gap:6px;margin-top:6px;align-items:center;justify-content:space-between}
  #mo-send{background:#084a6b;color:#fff;border:none;border-radius:6px;padding:6px 14px;font-size:.78rem;font-weight:700;cursor:pointer;transition:background .15s,opacity .15s}
  #mo-send:hover{background:#0d7a8a}#mo-send:disabled{background:#9ca3af;cursor:not-allowed;opacity:.7}
  .mo-hi{font-size:.6rem;color:#6b7280}
  .mo-conn-err{padding:6px 14px;background:#fef2f2;border-bottom:1px solid #fecaca;font-size:.68rem;color:#dc2626;font-weight:600;display:flex;align-items:center;gap:6px;flex-shrink:0;cursor:pointer}
  .mo-conn-err:hover{background:#fee2e2}
  #mo-msgs::-webkit-scrollbar{width:3px}#mo-msgs::-webkit-scrollbar-thumb{background:#d1d5db;border-radius:2px}
  #mo-resources{flex-shrink:0;background:#fff;border-bottom:1px solid #eee}
  #mo-res-header{display:flex;align-items:center;gap:8px;padding:7px 14px;cursor:pointer;user-select:none;transition:background .15s}
  #mo-res-header:hover{background:#f9fafb}
  #mo-res-body{padding:0 14px 8px;overflow-y:auto;max-height:200px;transition:max-height .25s ease,padding .25s ease,opacity .2s}
  #mo-resources.collapsed #mo-res-body{max-height:0;padding:0 14px;opacity:0;overflow:hidden}
  #mo-resources.collapsed #mo-res-toggle{transform:rotate(-90deg)}
  .mo-res-sidebar-item{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:6px;border:1px solid #e5e7eb;margin-bottom:4px;font-size:.68rem;cursor:pointer;transition:background .12s}
  .mo-res-sidebar-item:hover{background:#f0f9ff}
  .mo-res-card{display:flex;align-items:flex-start;gap:8px;padding:8px 10px;background:#f0f9ff;border:1px solid #bae6fd;border-radius:8px;margin:6px 0;font-size:.72rem;transition:background .12s}
  .mo-res-card:hover{background:#e0f2fe}
  .mo-res-type-tag{font-size:.55rem;font-weight:900;padding:2px 6px;border-radius:4px;flex-shrink:0;text-transform:uppercase;letter-spacing:.04em;line-height:1.4}
  .mo-res-type-tag.cs{background:#dcfce7;color:#166534}.mo-res-type-tag.dm{background:#dbeafe;color:#1e40af}.mo-res-type-tag.in{background:#fef3c7;color:#92400e}
  .mo-res-body-inner{flex:1;min-width:0}
  .mo-res-title{font-weight:700;color:#1e3a5f;font-size:.72rem}
  .mo-res-why{color:#6b7280;margin-top:2px;line-height:1.3;font-size:.68rem}
  .mo-res-proof{color:#0d7a8a;font-weight:600;font-style:italic;margin-top:2px;font-size:.65rem}
  .mo-res-link{flex-shrink:0;padding:4px 10px;background:#084a6b;color:#fff;border-radius:6px;text-decoration:none;font-weight:700;font-size:.65rem;white-space:nowrap;align-self:center}
  .mo-res-link:hover{background:#0d7a8a}
  @media(max-width:768px){
    #mo-panel{width:100vw;min-width:0;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0}
    #mo-panel.open{right:0}
    #mo-fab.hidden{display:none}
    #mo-resize-handle{display:none}
    #mo-fab{bottom:128px;right:16px;width:48px;height:48px}
    #mo-backdrop.visible{background:rgba(0,0,0,.5)}
    .mh{padding:10px 12px;min-height:44px}
    .mh-x{min-width:36px;min-height:36px;font-size:1rem}
    #mo-meeting{padding:8px 12px}
    .mtg-nav-btn{min-width:32px;min-height:32px}
    .mo-ct{padding:4px 8px;gap:0;overflow-x:auto;-webkit-overflow-scrolling:touch;flex-wrap:nowrap}
    .mo-ct-btn{padding:6px 10px;font-size:.62rem;min-height:32px}
    .mo-qa{padding:6px 8px;gap:4px;overflow-x:auto;flex-wrap:nowrap;-webkit-overflow-scrolling:touch}
    .mo-q{padding:6px 12px;font-size:.68rem;min-height:32px;flex-shrink:0}
    #mo-brief{padding:8px 10px;max-height:140px;overflow-y:auto;-webkit-overflow-scrolling:touch}
    #mo-thermo{font-size:.65rem}
    #mo-thermo-header{padding:6px 10px}
    .th-seg{padding:3px 8px;font-size:.55rem}
    #mo-msgs{padding:8px;gap:6px}
    .mm-b{padding:8px 10px;font-size:.82rem;line-height:1.55}
    #mo-in{padding:8px 10px;padding-bottom:calc(8px + env(safe-area-inset-bottom,0px))}
    #mo-ta{font-size:.85rem;padding:10px 12px;min-height:44px;border-radius:10px}
    #mo-send{padding:8px 16px;font-size:.82rem;min-height:40px;border-radius:8px}
    .mo-speed-btn{padding:5px 10px;font-size:.68rem;min-height:32px}
    #mo-endcall{padding:6px 12px;font-size:.7rem;min-height:32px}
    .mo-copy-btn{opacity:1;font-size:.8rem;padding:4px 6px}
    #mo-resources{max-height:100px;overflow-y:auto}
    #mo-phasebar{padding:5px 8px}
    .ph-name{display:none}
    .ph-seg{padding:4px 5px;justify-content:center}
    #mo-panel.mo-tele .th-val{display:none}
    #mo-panel.mo-tele .th-bant{gap:2px 4px}
    #mo-panel.mo-tele .mo-say{font-size:1.7rem}
    #mo-panel.mo-tele #mo-teleprompter{padding:14px 16px;max-height:40vh}
    .mo-res-sidebar-item{padding:8px 10px;font-size:.72rem}
  }
  /* ── Focus states (a11y): every control gets a visible ring (only #mo-ta had one) ── */
  #mo-panel button:focus-visible,#mo-fab:focus-visible,.mo-res-link:focus-visible{outline:2px solid #0d7a8a;outline-offset:2px;border-radius:6px}
  /* ── Streaming cursor: blinking caret while Mo streams ── */
  .mo-cursor{display:inline-block;margin-left:1px;color:#0d7a8a;font-weight:700;animation:moBlink 1s steps(1) infinite}
  @keyframes moBlink{50%{opacity:0}}
  /* ── Live "on your call" dot pulse + listening pulse + dropped-audio warning ── */
  .mh-dot{animation:moDotPulse 2.2s infinite}
  @keyframes moDotPulse{0%{box-shadow:0 0 0 0 rgba(74,222,128,.6)}70%{box-shadow:0 0 0 5px rgba(74,222,128,0)}100%{box-shadow:0 0 0 0 rgba(74,222,128,0)}}
  #mo-listen-btn.running{animation:moListenPulse 1.6s ease-in-out infinite}
  @keyframes moListenPulse{0%,100%{box-shadow:0 0 0 0 rgba(220,38,38,0)}50%{box-shadow:0 0 0 3px rgba(220,38,38,.18)}}
  #mo-listen-btn.mo-listen-warn{background:#fef2f2!important;color:#b91c1c!important;border-color:#fca5a5!important;animation:none}
  .mo-live{scrollbar-width:thin}
  /* ═══ TELEPROMPTER (.mo-tele) + FULLSCREEN (.mo-full) ═══
     Phase C (2026-10-03): split. .mo-tele = the big SAY line near the webcam, coach replies, the phase bar on top and the
     qualification strip above the input, at ANY width. .mo-full only widens the panel to the viewport. */
  #mo-teleprompter{display:none;flex-shrink:0;background:#fff;border-bottom:3px solid #0d7a8a;padding:20px 26px;box-shadow:0 4px 14px rgba(0,0,0,.06);max-height:44vh;overflow-y:auto}
  .mo-tele-body{max-width:1000px;margin:0 auto;font-size:1.55rem;line-height:1.5;font-weight:600;color:#0f172a;text-align:center}
  .mo-tele-body strong{color:#084a6b}
  .mo-tele-body:empty::before{content:'This is your teleprompter. Tap 🎙 Listen (bottom) so Mo hears the call, or just ask him a question. He replies with the ONE thing to say next, big and near your camera so reading it looks like eye contact.';color:#94a3b8;font-size:1.05rem;font-weight:500;line-height:1.5;display:block;max-width:760px;margin:0 auto}
  .mo-tele-next{margin-top:14px;font-size:1.15rem;font-weight:800;color:#0d7a8a;text-align:center}
  /* Live-coach tiers: the ONE line to say (big), a follow-up to ask, and a one-clause why */
  .mo-say{font-size:2.4rem;line-height:1.3;font-weight:700;color:#0f172a;text-align:center;letter-spacing:-.01em;text-wrap:balance}
  /* never cut the SAY line (Jonathan 2026-10-22: "cut off with three dots ... can't happen in a meeting"): long lines get smaller, the teleprompter scrolls */
  .mo-say.mo-long{font-size:1.8rem}.mo-say.mo-xlong{font-size:1.4rem;line-height:1.4}
  .mo-ask{margin-top:18px;font-size:1.2rem;font-weight:700;color:#0d7a8a;text-align:center}
  .mo-why{margin-top:12px;font-size:.9rem;font-weight:500;color:#64748b;text-align:center;font-style:italic}
  /* Calm "on script" state — the teleprompter only jumps to the big SAY line when you go off-script */
  .mo-onscript{font-size:1.35rem;font-weight:700;color:#16a34a;text-align:center;opacity:.85}
  #mo-full-btn{opacity:.9}
  /* ── Context panel: what Mo is grounded in (playbook / script / assessment / dossier) ── */
  #mo-context{flex-shrink:0;background:#fff;border-bottom:1px solid #eee}
  #mo-ctx-header{display:flex;align-items:center;gap:8px;padding:7px 14px;cursor:pointer;user-select:none;transition:background .15s}
  #mo-ctx-header:hover{background:#f9fafb}
  #mo-ctx-body{padding:0 14px 8px;overflow-y:auto;max-height:240px;transition:max-height .25s ease,padding .25s ease,opacity .2s}
  #mo-context.collapsed #mo-ctx-body{max-height:0;padding:0 14px;opacity:0;overflow:hidden}
  #mo-context.collapsed #mo-ctx-toggle{transform:rotate(-90deg)}
  .mo-ctx-card{border:1px solid #e5e7eb;border-radius:8px;margin:6px 0;overflow:hidden}
  .mo-ctx-card-h{display:flex;align-items:center;gap:8px;padding:8px 10px;cursor:pointer;background:#f8fafc;transition:background .12s}
  .mo-ctx-card-h:hover{background:#f0f9ff}
  .mo-ctx-tag{font-size:.52rem;font-weight:900;padding:2px 6px;border-radius:4px;text-transform:uppercase;letter-spacing:.04em;flex-shrink:0}
  .mo-ctx-tag.play{background:#dcfce7;color:#166534}.mo-ctx-tag.asmt{background:#dbeafe;color:#1e40af}.mo-ctx-tag.scr{background:#fef3c7;color:#92400e}.mo-ctx-tag.dos{background:#ede9fe;color:#6b21a8}
  .mo-ctx-title{font-weight:700;color:#1e3a5f;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.7rem}
  .mo-ctx-full{display:none;padding:8px 12px;font-size:.72rem;color:#374151;line-height:1.55;white-space:pre-wrap;max-height:340px;overflow-y:auto;border-top:1px solid #e5e7eb;background:#fff}
  .mo-ctx-card.exp .mo-ctx-full{display:block}
  /* In fullscreen keep Context + Resources reachable, centered, compact so the teleprompter still dominates */
  #mo-panel.mo-full #mo-context,#mo-panel.mo-full #mo-resources{max-width:1000px;width:100%;margin:0 auto}
  #mo-panel.mo-full .mo-ctx-full{max-height:38vh}
  #mo-panel.mo-full{width:100vw!important;max-width:100vw!important;min-width:0!important;left:0}
  #mo-panel.mo-full #mo-resize-handle{display:none}
  #mo-panel.mo-tele #mo-teleprompter{display:block}
  #mo-panel.mo-tele #mo-meeting,#mo-panel.mo-tele #mtg-deal,#mo-panel.mo-tele #mo-brief,#mo-panel.mo-tele .mo-qa{display:none!important}
  /* Phase E re-stack, now keyed on .mo-tele (Phase C) (flex order on the existing #mo-panel column, no DOM move): phase bar on top,
     teleprompter center, the thermometer becomes a compact qualification strip above the input so confidence,
     BANT, path and the next question are visible while presenting (they used to be hidden in fullscreen). */
  #mo-panel.mo-tele #mo-phasebar{order:-2;max-width:1000px;width:100%;margin:0 auto;background:transparent;border-bottom:0;padding:8px 24px 4px}
  #mo-panel.mo-tele .ph-seg{font-size:.72rem;padding:6px 10px}
  #mo-panel.mo-tele .ph-clock{font-size:.72rem}
  #mo-panel.mo-tele #mo-teleprompter{order:-1}
  #mo-panel.mo-tele #mo-thermo{order:10;max-width:1000px;width:100%;margin:0 auto;border-top:1px solid #e5e7eb;border-bottom:0;background:#fff}
  #mo-panel.mo-tele #mo-thermo-header{padding:6px 14px;cursor:default}
  #mo-panel.mo-tele #mo-thermo-toggle{display:none}
  #mo-panel.mo-tele #mo-thermo-body,#mo-panel.mo-tele #mo-thermo.collapsed #mo-thermo-body{max-height:none;opacity:1;padding:6px 14px 10px}
  #mo-panel.mo-tele .th-bant{grid-template-columns:repeat(4,1fr);gap:4px 10px}
  #mo-panel.mo-tele .th-field{font-size:.72rem}
  #mo-panel.mo-tele .th-val{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:160px}
  #mo-panel.mo-tele .th-ctx{display:none}
  #mo-panel.mo-tele .th-next{margin-top:6px;font-size:.8rem}
  #mo-panel.mo-tele #mo-in{order:11}
  .mo-tele-nudge{margin-top:12px;font-size:1rem;font-weight:700;color:#b45309;text-align:center}
  #mo-panel.mo-full .mh{padding:8px 16px}
  #mo-panel.mo-full .mo-top-bar{max-width:1000px;width:100%;margin:0 auto;background:transparent;border-bottom:none;justify-content:center}
  #mo-panel.mo-full .mo-ct{max-width:1000px;width:100%;margin:0 auto;justify-content:center;background:transparent;border-bottom:none}
  #mo-panel.mo-full #mo-msgs{align-self:center;width:100%;max-width:1000px;padding:16px 24px}
  #mo-panel.mo-full .mm{max-width:820px}
  #mo-panel.mo-full .mm-b{font-size:1rem;line-height:1.6}
  #mo-panel.mo-full #mo-in{align-self:center;width:100%;max-width:1000px}
  #mo-panel.mo-full .mo-live{max-height:20vh!important;font-size:1rem!important}
  #mo-full-btn.active,#mo-tele-btn.active{background:rgba(255,255,255,.22);opacity:1}
  /* The call clock's Start / End and the Speak up toggle (2026-10-23) */
  #mo-clock-start.live{background:#dc2626!important;border-color:#dc2626!important;color:#fff!important}
  #mo-speak-btn.active{background:#0d7a8a;color:#fff}
  /* Off script (amber) and back on (green) in the teleprompter (2026-10-23) */
  .mo-offscript{font-size:1.1rem;font-weight:800;color:#b45309;background:#fffbeb;border:1px solid #fde68a;border-radius:8px;padding:6px 10px;text-align:center}
  /* What Mo is using: chips painted from the server's META of the last turn (2026-10-23) */
  #mo-using{display:inline-flex;gap:4px;flex-wrap:wrap;margin-left:6px}
  .mo-use{font-size:.56rem;font-weight:700;padding:1px 6px;border-radius:7px;background:#f3f4f6;color:#9ca3af;border:1px solid #e5e7eb;white-space:nowrap}
  .mo-use.on{background:#ecfdf5;color:#047857;border-color:#a7f3d0}
  .mo-use.warn{background:#fee2e2;color:#b91c1c;border-color:#fecaca}
  .mo-ctx-tag.att{background:#ede9fe;color:#5b21b6}
  .mo-att-ack{font-size:.74rem}.mo-att-hint{font-size:.64rem;color:#6b7280;margin-top:3px;line-height:1.4}
  #mo-att-btn:hover{background:#475569}
  /* The Script button's four states (2026-10-23) and the ingestion receipt */
  #mo-script-btn.mo-script-idle{background:#0d7a8a!important;color:#fff!important}
  #mo-script-btn.mo-script-loading{background:#fef3c7!important;color:#92400e!important}
  #mo-script-btn.mo-script-loaded{background:#16a34a!important;color:#fff!important}
  #mo-script-btn.mo-script-error{background:#fee2e2!important;color:#b91c1c!important}
  .mo-receipt{padding:10px 12px;background:#ecfdf5;border:1px solid #a7f3d0;border-radius:10px;font-size:.76rem;line-height:1.55;color:#064e3b}
  .mo-receipt-h{font-weight:800;margin-bottom:4px}
  .mo-receipt-f{margin-top:6px;font-size:.68rem;color:#047857}
  /* Long-paste choice (Phase C): script / context / message, 44px targets */
  .mo-docq{padding:10px 12px;background:#fffbeb;border:1px solid #fde68a;border-radius:10px;font-size:.78rem;line-height:1.5;color:#1f2937}
  .mo-docq-acts{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
  .mo-docq-acts .mo-q{min-height:44px;padding:10px 14px;font-size:.78rem;flex-shrink:0}
  .mo-docq-hint{margin-top:8px;font-size:.66rem;color:#6b7280}
  /* Script card actions in the Context panel */
  .mo-ctx-acts{display:flex;gap:4px;margin-right:6px}
  .mo-ctx-act{font-size:.58rem;font-weight:700;padding:3px 7px;border-radius:6px;border:1px solid #d1d5db;background:#fff;color:#374151;cursor:pointer;min-height:24px}
  .mo-ctx-act:hover{background:#f3f4f6}
