// COMMUNICATIONS PLATFORM — mock data
// Realistic legal-firm comms data: E2EE channels, DMs, emails, calls, client portal
(function () {
  const now = new Date();
  const ago = (mins) => new Date(now - mins * 60000).toISOString();

  const people = [
    { id: 'u1',  name: 'Marcus Kirkland',     initials: 'MK', role: 'Senior Partner',   color: '#0F766E', status: 'active',  dept: 'Litigation',   fingerprint: '1A2B 3C4D 5E6F 7A8B · 9C0D 1E2F 3A4B 5C6D · 7E8F 9A0B 1C2D 3E4F' },
    { id: 'u2',  name: 'Elena Vasquez',       initials: 'EV', role: 'Partner',          color: '#7C3AED', status: 'active',  dept: 'Litigation',   fingerprint: '2B3C 4D5E 6F7A 8B9C · 0D1E 2F3A 4B5C 6D7E · 8F9A 0B1C 2D3E 4F5A' },
    { id: 'u3',  name: 'James Chen',          initials: 'JC', role: 'Associate',        color: '#2563EB', status: 'away',    dept: 'Litigation',   fingerprint: '3C4D 5E6F 7A8B 9C0D · 1E2F 3A4B 5C6D 7E8F · 9A0B 1C2D 3E4F 5A6B' },
    { id: 'u4',  name: 'Priya Sharma',        initials: 'PS', role: 'Associate',        color: '#DB2777', status: 'active',  dept: 'Corporate',    fingerprint: '4D5E 6F7A 8B9C 0D1E · 2F3A 4B5C 6D7E 8F9A · 0B1C 2D3E 4F5A 6B7C' },
    { id: 'u5',  name: 'Robert Okafor',       initials: 'RO', role: 'Counsel',          color: '#D97706', status: 'dnd',     dept: 'Corporate',    fingerprint: '5E6F 7A8B 9C0D 1E2F · 3A4B 5C6D 7E8F 9A0B · 1C2D 3E4F 5A6B 7C8D' },
    { id: 'u6',  name: 'Sarah Mitchell',      initials: 'SM', role: 'Senior Associate', color: '#059669', status: 'active',  dept: 'IP',           fingerprint: '6F7A 8B9C 0D1E 2F3A · 4B5C 6D7E 8F9A 0B1C · 2D3E 4F5A 6B7C 8D9E' },
    { id: 'u7',  name: 'David Park',          initials: 'DP', role: 'Paralegal',        color: '#64748B', status: 'active',  dept: 'Litigation',   fingerprint: '7A8B 9C0D 1E2F 3A4B · 5C6D 7E8F 9A0B 1C2D · 3E4F 5A6B 7C8D 9E0F' },
    { id: 'u8',  name: 'Ana Oliveira',        initials: 'AO', role: 'Associate',        color: '#B91C1C', status: 'offline', dept: 'Regulatory',   fingerprint: '8B9C 0D1E 2F3A 4B5C · 6D7E 8F9A 0B1C 2D3E · 4F5A 6B7C 8D9E 0F1A' },
    { id: 'u9',  name: 'Tomás Reyes',         initials: 'TR', role: 'Partner',          color: '#0D9488', status: 'active',  dept: 'IP',           fingerprint: '9C0D 1E2F 3A4B 5C6D · 7E8F 9A0B 1C2D 3E4F · 5A6B 7C8D 9E0F 1A2B' },
    { id: 'u10', name: 'Maya Johannsen',      initials: 'MJ', role: 'Paralegal',        color: '#7C3AED', status: 'away',    dept: 'Corporate',    fingerprint: '0D1E 2F3A 4B5C 6D7E · 8F9A 0B1C 2D3E 4F5A · 6B7C 8D9E 0F1A 2B3C' },
  ];

  const channels = [
    { id: 'c1',  name: 'matter-2026-1142-hyperion',  topic: 'Hyperion v. Quantum · discovery war-room', matter: '2026-1142', members: 8,  unread: 3, mention: true,  e2ee: true,  restricted: true,  ethicalWall: false, archived: false, lastActivity: ago(4),    pinned: true,  color: '#0F766E' },
    { id: 'c2',  name: 'matter-2026-1078-falcon',    topic: 'Falcon SEC settlement · privileged',       matter: '2026-1078', members: 5,  unread: 0, mention: false, e2ee: true,  restricted: true,  ethicalWall: true,  archived: false, lastActivity: ago(22),   pinned: true,  color: '#7C3AED' },
    { id: 'c3',  name: 'practice-litigation',        topic: 'Litigation group · announcements',         matter: null,        members: 24, unread: 7, mention: false, e2ee: true,  restricted: false, ethicalWall: false, archived: false, lastActivity: ago(38),   pinned: false, color: '#2563EB' },
    { id: 'c4',  name: 'practice-corporate',         topic: 'Corporate group',                          matter: null,        members: 18, unread: 0, mention: false, e2ee: true,  restricted: false, ethicalWall: false, archived: false, lastActivity: ago(120),  pinned: false, color: '#D97706' },
    { id: 'c5',  name: 'matter-2026-1156-meridian',  topic: 'Meridian IP · opposition brief',           matter: '2026-1156', members: 4,  unread: 1, mention: false, e2ee: true,  restricted: true,  ethicalWall: false, archived: false, lastActivity: ago(72),   pinned: false, color: '#059669' },
    { id: 'c6',  name: 'general',                    topic: 'Firm-wide',                                 matter: null,        members: 87, unread: 0, mention: false, e2ee: true,  restricted: false, ethicalWall: false, archived: false, lastActivity: ago(14),   pinned: false, color: '#64748B' },
    { id: 'c7',  name: 'random',                     topic: 'Not-work stuff',                           matter: null,        members: 52, unread: 2, mention: false, e2ee: true,  restricted: false, ethicalWall: false, archived: false, lastActivity: ago(8),    pinned: false, color: '#DB2777' },
    { id: 'c8',  name: 'matter-2025-0981-apollo',    topic: 'Apollo M&A · archived',                     matter: '2025-0981', members: 6,  unread: 0, mention: false, e2ee: true,  restricted: true,  ethicalWall: false, archived: true,  lastActivity: ago(4380), pinned: false, color: '#94A3B8' },
    { id: 'c9',  name: 'it-incidents',               topic: 'IT / Ops incident channel',                matter: null,        members: 12, unread: 0, mention: false, e2ee: true,  restricted: false, ethicalWall: false, archived: false, lastActivity: ago(240),  pinned: false, color: '#B91C1C' },
    { id: 'c10', name: 'matter-2026-1203-atlas',     topic: 'Atlas regulatory matter · privileged',     matter: '2026-1203', members: 7,  unread: 0, mention: false, e2ee: true,  restricted: true,  ethicalWall: true,  archived: false, lastActivity: ago(180),  pinned: false, color: '#7C3AED' },
  ];

  const dms = [
    { id: 'd1', userIds: ['u2'],       unread: 2, mention: true,  e2ee: true, verified: true,  lastActivity: ago(6),   lastSnippet: 'Reviewed your red-line — approved with minor fixes' },
    { id: 'd2', userIds: ['u3'],       unread: 0, mention: false, e2ee: true, verified: true,  lastActivity: ago(90),  lastSnippet: 'Sending the deposition transcript now' },
    { id: 'd3', userIds: ['u4', 'u5'], unread: 0, mention: false, e2ee: true, verified: false, lastActivity: ago(300), lastSnippet: 'Priya: let\'s sync on the SEC filing tomorrow' },
    { id: 'd4', userIds: ['u6'],       unread: 0, mention: false, e2ee: true, verified: true,  lastActivity: ago(1400), lastSnippet: ' Filed with USPTO at 3:47pm' },
    { id: 'd5', userIds: ['u9'],       unread: 1, mention: false, e2ee: true, verified: false, lastActivity: ago(30),  lastSnippet: 'Can you review the IP assignment clauses?' },
  ];

  // Messages for the currently-selected channel/thread — keyed by conversation id
  const messages = {
    c1: [
      { id: 'm1',   userId: 'u2', ts: ago(340), body: 'Team — Hyperion pushed back on interrogatory 14. They claim it\'s overbroad.', reactions: [{ emoji: '', count: 3 }], thread: 2, pinned: false, edited: false, e2ee: true },
      { id: 'm2',   userId: 'u1', ts: ago(328), body: 'Not overbroad — we targeted it precisely to their CFO\'s 2024 comms. Let\'s fight it. Draft the meet-and-confer letter.', reactions: [{ emoji: '', count: 2 }], thread: 0, pinned: true,  edited: false, e2ee: true },
      { id: 'm3',   userId: 'u3', ts: ago(315), body: 'On it. Will circulate draft by EOD.', reactions: [], thread: 0, pinned: false, edited: false, e2ee: true },
      { id: 'm4',   userId: 'u7', ts: ago(240), body: 'Bates-numbered the latest production: HYP_028_000001 – HYP_028_008241. Uploading now.', reactions: [{ emoji: '', count: 1 }], thread: 0, pinned: false, edited: false, e2ee: true, attachment: { kind: 'doc', name: 'HYP_028_production.zip', size: '142 MB', encrypted: true } },
      { id: 'm5',   userId: 'u2', ts: ago(120), body: 'Witness prep memo attached. Please review before tomorrow\'s meeting.', reactions: [{ emoji: '', count: 4 }], thread: 5, pinned: false, edited: false, e2ee: true, attachment: { kind: 'doc', name: 'witness-prep-memo.pdf', size: '2.1 MB', encrypted: true } },
      { id: 'm6',   userId: 'u1', ts: ago(60),  body: '@james can you pull the three cases on burden-shifting from last month\'s research?', reactions: [], thread: 1, pinned: false, edited: false, e2ee: true, mentions: ['u3'] },
      { id: 'm7',   userId: 'u3', ts: ago(42),  body: 'Yep — pulling now. Will post in thread.', reactions: [{ emoji: '', count: 1 }], thread: 0, pinned: false, edited: false, e2ee: true },
      { id: 'm8',   userId: 'u2', ts: ago(18),  body: 'Also — HYPERION just filed an emergency motion to quash. PDF attached.', reactions: [{ emoji: '', count: 2 }, { emoji: '', count: 1 }], thread: 0, pinned: false, edited: false, e2ee: true, attachment: { kind: 'doc', name: 'motion-to-quash.pdf', size: '318 KB', encrypted: true } },
      { id: 'm9',   userId: 'u1', ts: ago(11),  body: 'Reading now. Elena — let\'s jump on a call in 15?', reactions: [], thread: 0, pinned: false, edited: false, e2ee: true },
      { id: 'm10',  userId: 'u2', ts: ago(4),   body: 'Yes — sending invite.', reactions: [{ emoji: '', count: 1 }], thread: 0, pinned: false, edited: false, e2ee: true },
    ],
    d1: [
      { id: 'md1', userId: 'u2', ts: ago(44), body: 'Got your red-line. One correction on §4(b)(ii) — the indemnity scope needs to explicitly exclude tax liabilities.', reactions: [], thread: 0, pinned: false, edited: false, e2ee: true },
      { id: 'md2', userId: 'u1', ts: ago(28), body: 'Agreed. I\'ll make the change and send to opposing counsel EOD.', reactions: [], thread: 0, pinned: false, edited: false, e2ee: true },
      { id: 'md3', userId: 'u2', ts: ago(12), body: 'Reviewed your red-line — approved with minor fixes on §4(b)(ii) (indemnity scope) and §7 (survival). Will send back in the next hour.', reactions: [{ emoji: '', count: 1 }], thread: 0, pinned: false, edited: true, e2ee: true },
      { id: 'md4', userId: 'u2', ts: ago(6),  body: 'Here are the tracked changes.', reactions: [], thread: 0, pinned: false, edited: false, e2ee: true, attachment: { kind: 'doc', name: 'hyperion-settlement-redline-v3.docx', size: '412 KB', encrypted: true } },
    ],
  };

  // Key verification events for the transparency log
  const keyEvents = [
    { id: 'k1', userId: 'u2', deviceId: 'MBP-EV-01',  ts: ago(1440 * 3), action: 'device_registered',  fingerprint: '2B3C...4F5A' },
    { id: 'k2', userId: 'u3', deviceId: 'iPhone-JC',  ts: ago(1440 * 1), action: 'device_registered',  fingerprint: '3C4D...5A6B' },
    { id: 'k3', userId: 'u5', deviceId: 'MBP-RO-02',  ts: ago(480),      action: 'key_rotated',        fingerprint: '5E6F...7C8D' },
    { id: 'k4', userId: 'u2', deviceId: 'MBP-EV-01',  ts: ago(120),      action: 'fingerprint_verified', fingerprint: '2B3C...4F5A', verifier: 'u1' },
    { id: 'k5', userId: 'u8', deviceId: 'iPhone-AO',  ts: ago(60),       action: 'session_pinned',     fingerprint: '8B9C...0F1A' },
  ];

  // Email threads — unified inbox
  const emailThreads = [
    { id: 'e1',  subject: 'Hyperion v. Quantum — Amended Protective Order (tracked)', from: 'jennifer.park@wachtell-lipton.example', to: ['m.kirkland@arbiter.law'], cc: ['e.vasquez@arbiter.law'], count: 8,  hasAttachments: true, attachments: 3, ts: ago(16),    unread: true,  starred: true,  labels: ['matter:2026-1142', 'opposing-counsel'], snippet: 'Attached is the amended protective order reflecting the changes we discussed. Please review §§4.2 and 7 and…', encrypted: false, sensitivity: 'privileged' },
    { id: 'e2',  subject: 'Re: Falcon SEC — Settlement term sheet v4',           from: 'r.dunbar@falconcorp.example',             to: ['e.vasquez@arbiter.law'], cc: [],                       count: 12, hasAttachments: true, attachments: 2, ts: ago(45),    unread: true,  starred: false, labels: ['matter:2026-1078', 'client'], snippet: 'Ralph has reviewed with the board. Requesting minor edits to the indemnity cap and the survival period for reps and…', encrypted: true,  sensitivity: 'privileged' },
    { id: 'e3',  subject: 'USPTO Receipt — App. No. 17/892,441 filed',           from: 'noreply@uspto.gov',                       to: ['s.mitchell@arbiter.law'], cc: [],                       count: 1,  hasAttachments: true, attachments: 1, ts: ago(180),   unread: false, starred: false, labels: ['matter:2026-1156', 'filings'], snippet: 'Your application has been received. Filing date assigned: 2026-04-22. Confirmation number: 47128-LR2…', encrypted: false, sensitivity: 'public' },
    { id: 'e4',  subject: 'Re: Meridian IP — Opposition brief review',           from: 't.reyes@arbiter.law',                     to: ['s.mitchell@arbiter.law'], cc: ['m.kirkland@arbiter.law'], count: 5,  hasAttachments: false, attachments: 0, ts: ago(310),   unread: false, starred: false, labels: ['matter:2026-1156', 'internal'], snippet: 'My notes on the brief — focus on the bloc on obviousness. I think the Graham factors analysis needs more…', encrypted: false, sensitivity: 'privileged' },
    { id: 'e5',  subject: 'Court Notice: Hearing scheduled 2026-05-14',          from: 'clerk@sdny.uscourts.gov',                 to: ['m.kirkland@arbiter.law'], cc: [],                       count: 1,  hasAttachments: true, attachments: 1, ts: ago(720),   unread: false, starred: true,  labels: ['matter:2026-1142', 'court'], snippet: 'Take notice that a hearing on the motion to quash has been scheduled for 2026-05-14 at 10:00 AM in courtroom…', encrypted: false, sensitivity: 'privileged' },
    { id: 'e6',  subject: 'Invoice #2026-0412 — Arbiter Law LLP',                from: 'billing@arbiter.law',                     to: ['controller@hyperion.example'], cc: [],                  count: 1,  hasAttachments: true, attachments: 1, ts: ago(1440),  unread: false, starred: false, labels: ['billing'], snippet: 'Please find attached invoice #2026-0412 for services rendered in March 2026 on matter 2026-1142…', encrypted: false, sensitivity: 'confidential' },
    { id: 'e7',  subject: 'Phishing report — click simulation (passed)',         from: 'security@arbiter.law',                    to: ['m.kirkland@arbiter.law'], cc: [],                       count: 1,  hasAttachments: false, attachments: 0, ts: ago(2880),  unread: false, starred: false, labels: ['security'], snippet: 'Our quarterly phishing simulation was deployed on 2026-04-15. You correctly reported the suspicious email…', encrypted: false, sensitivity: 'internal' },
    { id: 'e8',  subject: 'RE: Atlas regulatory — consent decree draft',         from: 'counsel@atlaspharma.example',             to: ['r.okafor@arbiter.law'], cc: ['p.sharma@arbiter.law'],   count: 6,  hasAttachments: true, attachments: 2, ts: ago(90),    unread: true,  starred: true,  labels: ['matter:2026-1203', 'client', 'opposing-counsel'], snippet: 'Attached is our response to your proposed consent decree. We have concerns with §§3 and 5(b) which…', encrypted: true,  sensitivity: 'privileged' },
    { id: 'e9',  subject: 'Travel confirmation — DCA→JFK 2026-05-03',            from: 'reservations@amextrvl.example',           to: ['m.kirkland@arbiter.law'], cc: [],                       count: 1,  hasAttachments: true, attachments: 1, ts: ago(4320),  unread: false, starred: false, labels: ['personal'], snippet: 'Your trip has been confirmed. Flight AA2048 departing DCA 7:20 AM arriving JFK 8:58 AM…', encrypted: false, sensitivity: 'internal' },
    { id: 'e10', subject: 'Partnership compensation committee — agenda',         from: 'committee@arbiter.law',                   to: ['m.kirkland@arbiter.law'], cc: [],                       count: 1,  hasAttachments: true, attachments: 1, ts: ago(10080), unread: false, starred: false, labels: ['internal', 'confidential'], snippet: 'The partnership compensation committee will meet on 2026-05-10 to discuss Q1 performance…', encrypted: true,  sensitivity: 'privileged' },
  ];

  // Calls (voice + video)
  const calls = [
    { id: 'v1', kind: 'video',  direction: 'outbound', with: ['u2', 'u3'],     duration: 2340, ts: ago(60),   matter: '2026-1142', recorded: true,  consent: 'opt-in', transcribed: true,  summary: 'Discussed response to motion to quash. Elena will draft opposition. James to pull cases on burden-shifting.' },
    { id: 'v2', kind: 'voice',  direction: 'inbound',  with: ['client:hyperion-gc'], duration: 820, ts: ago(180),  matter: '2026-1142', recorded: false, consent: 'opt-out', transcribed: false, summary: 'GC wants status update on discovery.' },
    { id: 'v3', kind: 'video',  direction: 'outbound', with: ['u4', 'u5'],     duration: 1580, ts: ago(360),  matter: '2026-1078', recorded: true,  consent: 'opt-in', transcribed: true,  summary: 'Reviewed settlement term sheet v4. Priya to revise indemnity language.' },
    { id: 'v4', kind: 'video',  direction: 'outbound', with: ['u9', 'u6'],     duration: 920,  ts: ago(1440), matter: '2026-1156', recorded: true,  consent: 'opt-in', transcribed: true,  summary: 'USPTO strategy meeting. Sarah to finalize opposition brief by Friday.' },
    { id: 'v5', kind: 'voice',  direction: 'inbound',  with: ['external:opposing-counsel'], duration: 240, ts: ago(5760), matter: '2026-1142', recorded: false, consent: 'none', transcribed: false, summary: '' },
    { id: 'v6', kind: 'video',  direction: 'outbound', with: ['u1','u2','u3','u6','u9','u5'], duration: 3420, ts: ago(10080), matter: null, recorded: true,  consent: 'opt-in', transcribed: true,  summary: 'All-partners meeting. Quarterly review. Minutes attached.' },
  ];

  // Client portal shares (external secure rooms)
  const portalRooms = [
    { id: 'p1', name: 'Hyperion / Quantum — Secure Room',   matter: '2026-1142', clients: ['ceo@hyperion.example', 'gc@hyperion.example', 'cfo@hyperion.example'], docs: 34, messages: 87, lastActivity: ago(240),  expiresAt: 'Never (matter-lifecycle)', watermark: 'DYNAMIC', e2ee: true, restricted: true  },
    { id: 'p2', name: 'Falcon SEC — Settlement Workspace',  matter: '2026-1078', clients: ['ralph@falconcorp.example', 'board@falconcorp.example'],              docs: 12, messages: 43, lastActivity: ago(90),   expiresAt: '2026-06-30',               watermark: 'DYNAMIC', e2ee: true, restricted: true  },
    { id: 'p3', name: 'Meridian IP — Filings Room',         matter: '2026-1156', clients: ['founder@meridian-tech.example'],                                     docs: 8,  messages: 12, lastActivity: ago(1440), expiresAt: 'Never',                    watermark: 'STATIC',  e2ee: true, restricted: true  },
    { id: 'p4', name: 'Atlas Pharma — Regulatory Room',     matter: '2026-1203', clients: ['compliance@atlaspharma.example', 'counsel@atlaspharma.example'],     docs: 22, messages: 31, lastActivity: ago(720),  expiresAt: '2027-01-15',               watermark: 'DYNAMIC', e2ee: true, restricted: true  },
  ];

  // Compliance / retention policies for comms
  const policies = [
    { id: 'r1', name: 'Privileged matter channels',       channelFilter: 'matter:*, privileged=true',            retention: '7 years',  hold: true,  encryption: 'E2EE + archival-key escrow', legalBasis: 'ABA 1.6 · state bar rules' },
    { id: 'r2', name: 'Non-privileged group channels',    channelFilter: 'practice-*, general, random',          retention: '2 years',  hold: false, encryption: 'E2EE',                      legalBasis: 'Firm policy' },
    { id: 'r3', name: 'DMs between attorneys',            channelFilter: 'dm:*',                                  retention: '5 years',  hold: true,  encryption: 'E2EE',                      legalBasis: 'Work-product doctrine' },
    { id: 'r4', name: 'Client portal messages',           channelFilter: 'portal:*',                              retention: 'Matter lifecycle + 7 years', hold: true,  encryption: 'E2EE + client escrow', legalBasis: 'Client agreement' },
    { id: 'r5', name: 'Voice/video recordings (opt-in)',  channelFilter: 'call:*, consent=opt-in',                retention: '3 years',  hold: true,  encryption: 'AES-256 at rest',           legalBasis: 'Consent + retention schedule' },
    { id: 'r6', name: 'Archived matter channels',         channelFilter: 'matter:*, archived=true',               retention: '7 years after close', hold: false, encryption: 'E2EE + cold-storage key', legalBasis: 'Retention schedule' },
  ];

  // Legal holds on comms
  const holds = [
    { id: 'h1', matter: '2026-1142', label: 'Hyperion v. Quantum — discovery scope', custodians: 8, channels: 2, status: 'active',   issued: ago(43200),  by: 'u2', acknowledgment: '8/8' },
    { id: 'h2', matter: '2026-1078', label: 'Falcon SEC investigation',              custodians: 5, channels: 1, status: 'active',   issued: ago(64800),  by: 'u4', acknowledgment: '5/5' },
    { id: 'h3', matter: '2026-1203', label: 'Atlas consent decree',                  custodians: 7, channels: 1, status: 'active',   issued: ago(2880),   by: 'u5', acknowledgment: '4/7' },
    { id: 'h4', matter: '2025-0981', label: 'Apollo M&A — regulatory review',        custodians: 6, channels: 1, status: 'released', issued: ago(157680), by: 'u9', acknowledgment: '6/6' },
  ];

  // Comms KPIs
  const kpis = {
    channelsActive: channels.filter(c => !c.archived).length,
    dmsActive: dms.length,
    e2eeCoverage: 100,
    verifiedDevices: 42,
    unverifiedDevices: 3,
    messagesTodayDays: 7,
    messagesToday: 1847,
    callsToday: 14,
    emailsUnread: emailThreads.filter(e => e.unread).length,
    mentionsUnread: channels.reduce((s, c) => s + (c.mention ? 1 : 0), 0) + dms.reduce((s, d) => s + (d.mention ? 1 : 0), 0),
    clientPortalRooms: portalRooms.length,
    activeHolds: holds.filter(h => h.status === 'active').length,
  };

  // Directory contacts (external)
  const externalContacts = [
    { id: 'x1', name: 'Jennifer Park',        org: 'Wachtell, Lipton',      role: 'Partner (opposing)',       email: 'jennifer.park@wachtell-lipton.example', matter: '2026-1142', verified: true  },
    { id: 'x2', name: 'Ralph Dunbar',         org: 'Falcon Corp',           role: 'CEO (client)',             email: 'r.dunbar@falconcorp.example',           matter: '2026-1078', verified: true  },
    { id: 'x3', name: 'Dr. Amelia Okonkwo',   org: 'Meridian Technologies', role: 'Founder (client)',         email: 'founder@meridian-tech.example',         matter: '2026-1156', verified: true  },
    { id: 'x4', name: 'Counsel General',      org: 'Atlas Pharma',          role: 'GC (client)',              email: 'counsel@atlaspharma.example',           matter: '2026-1203', verified: false },
    { id: 'x5', name: 'Kevin O\'Brien',       org: 'Sullivan & Cromwell',   role: 'Associate (opposing)',     email: 'k.obrien@sullcrom.example',             matter: '2026-1078', verified: false },
    { id: 'x6', name: 'Court Clerk SDNY',     org: 'U.S. District Court',   role: 'Clerk',                    email: 'clerk@sdny.uscourts.gov',               matter: null,         verified: true  },
  ];

  window.COMMS_DATA = {
    people, channels, dms, messages, keyEvents,
    emailThreads, calls, portalRooms, policies, holds,
    externalContacts, kpis,
  };
})();
