// RISK MANAGEMENT PLATFORM — Master Data Layer
const T = window.ArbiterTokens;

const RISK_DATA = {
  // ── RISK REGISTER ──
  register: [
    { id: 'RSK-001', name: 'Adverse Summary Judgment Ruling', category: 'Litigation', subcategory: 'Dispositive Motion', matter: 'Redstone v. Meridian', matterId: 'M-2024-0312', likelihood: 4, impact: 5, score: 20, trend: 'rising', status: 'Active', owner: 'M. Kirkland', mitigation: 'Strengthen fact pattern with supplemental expert testimony; prepare alternative damages theory', triggers: ['Weak deposition testimony', 'Missing Q3 2022 records'], lastAssessed: '2026-04-18', nextReview: '2026-04-25', controls: ['Expert report filed', 'Deposition contradictions documented'], residualScore: 12, history: [{date:'2026-03-01',score:15,note:'Initial assessment'},{date:'2026-03-15',score:16,note:'Privilege log gaps found'},{date:'2026-04-01',score:18,note:'Deposition evasiveness elevated risk'},{date:'2026-04-18',score:20,note:'Missing Q3 records confirmed'}] },
    { id: 'RSK-002', name: 'Key Evidence Spoliation', category: 'Discovery', subcategory: 'Preservation', matter: 'Redstone v. Meridian', matterId: 'M-2024-0312', likelihood: 3, impact: 5, score: 15, trend: 'stable', status: 'Active', owner: 'J. Park', mitigation: 'File motion for adverse inference instruction; document chain of custody gaps', triggers: ['Q3 2022 gap in financial records', 'Defendant retention policy unclear'], lastAssessed: '2026-04-17', nextReview: '2026-04-24', controls: ['Preservation letter sent', 'Court order obtained'], residualScore: 10, history: [{date:'2026-02-15',score:12,note:'Gap identified'},{date:'2026-03-20',score:15,note:'No explanation from defense'},{date:'2026-04-17',score:15,note:'Stable — awaiting supplemental production'}] },
    { id: 'RSK-003', name: 'Expert Witness Daubert Challenge', category: 'Litigation', subcategory: 'Expert', matter: 'Redstone v. Meridian', matterId: 'M-2024-0312', likelihood: 3, impact: 4, score: 12, trend: 'declining', status: 'Active', owner: 'M. Kirkland', mitigation: 'Dr. Mitchell credentials exceed threshold; methodology follows established precedent', triggers: ['Defense retained competing expert', 'Novel damages methodology'], lastAssessed: '2026-04-15', nextReview: '2026-05-01', controls: ['CV supports qualifications', 'Published methodology', 'Prior Daubert survival x3'], residualScore: 6, history: [{date:'2026-03-01',score:16,note:'Before expert report finalized'},{date:'2026-03-28',score:14,note:'Report filed — strong methodology'},{date:'2026-04-15',score:12,note:'Defense expert weaker credentials'}] },
    { id: 'RSK-004', name: 'Privilege Waiver on Board Communications', category: 'Discovery', subcategory: 'Privilege', matter: 'Redstone v. Meridian', matterId: 'M-2024-0312', likelihood: 2, impact: 4, score: 8, trend: 'stable', status: 'Monitoring', owner: 'L. Torres', mitigation: 'Crime-fraud exception argument prepared; targeted challenge filed', triggers: ['Crime-fraud exception motion', 'Broad waiver argument by defense'], lastAssessed: '2026-04-16', nextReview: '2026-04-30', controls: ['Privilege log reviewed', 'Motion drafted'], residualScore: 6, history: [{date:'2026-03-15',score:10,note:'Defense privilege claims aggressive'},{date:'2026-04-16',score:8,note:'Court signaled skepticism of defense position'}] },
    { id: 'RSK-005', name: 'Counterclaim Exposure — Tortious Interference', category: 'Litigation', subcategory: 'Counterclaim', matter: 'Redstone v. Meridian', matterId: 'M-2024-0312', likelihood: 2, impact: 3, score: 6, trend: 'declining', status: 'Monitoring', owner: 'M. Kirkland', mitigation: 'Counterclaim lacks factual basis; prepare MTD if not dismissed at MSJ', triggers: ['Aggressive defense posture', 'Client business activities'], lastAssessed: '2026-04-10', nextReview: '2026-05-10', controls: ['Answer filed denying all counts', 'Factual record undermines claim'], residualScore: 4, history: [{date:'2026-02-28',score:9,note:'Counterclaim filed'},{date:'2026-03-15',score:7,note:'Weak factual support identified'},{date:'2026-04-10',score:6,note:'Deposition undermined key allegation'}] },
    { id: 'RSK-006', name: 'Trial Date Continuance Denied', category: 'Procedural', subcategory: 'Scheduling', matter: 'Thornton Estate', matterId: 'M-2024-0189', likelihood: 3, impact: 3, score: 9, trend: 'rising', status: 'Active', owner: 'L. Torres', mitigation: 'Accelerate trial preparation; pre-mark all exhibits by Apr 28', triggers: ['Judge Reynolds strict on continuances', 'Expert scheduling conflict'], lastAssessed: '2026-04-19', nextReview: '2026-04-22', controls: ['Trial prep checklist initiated', 'Witness schedule confirmed'], residualScore: 6, history: [{date:'2026-04-01',score:6,note:'Trial date set'},{date:'2026-04-15',score:8,note:'Expert availability concern'},{date:'2026-04-19',score:9,note:'Judge denied informal extension request'}] },
    { id: 'RSK-007', name: 'Client Dissatisfaction — Settlement Pressure', category: 'Client', subcategory: 'Relationship', matter: 'Pacific Shipping', matterId: 'M-2024-0456', likelihood: 3, impact: 3, score: 9, trend: 'rising', status: 'Active', owner: 'M. Kirkland', mitigation: 'Schedule partner meeting; prepare cost-benefit analysis of continued litigation vs. settlement', triggers: ['Litigation costs exceeding budget', 'Board pressure on GC'], lastAssessed: '2026-04-18', nextReview: '2026-04-25', controls: ['Monthly budget reports', 'Quarterly strategy reviews'], residualScore: 6, history: [{date:'2026-03-01',score:6,note:'Client expressed cost concerns'},{date:'2026-04-01',score:8,note:'Q1 billing exceeded estimate'},{date:'2026-04-18',score:9,note:'GC requested settlement evaluation'}] },
    { id: 'RSK-008', name: 'Regulatory Investigation Spillover', category: 'Regulatory', subcategory: 'Compliance', matter: 'Redstone v. Meridian', matterId: 'M-2024-0312', likelihood: 2, impact: 5, score: 10, trend: 'stable', status: 'Monitoring', owner: 'M. Kirkland', mitigation: 'Monitor SEC activity; prepare for parallel proceedings if triggered', triggers: ['SEC enforcement trends', 'Fraud allegations in complaint'], lastAssessed: '2026-04-12', nextReview: '2026-05-12', controls: ['No SEC inquiry received', 'Monitoring EDGAR filings'], residualScore: 8, history: [{date:'2026-02-01',score:10,note:'Fraud claims could attract regulatory attention'},{date:'2026-04-12',score:10,note:'No change — monitoring'}] },
    { id: 'RSK-009', name: 'Witness Unavailability — Karen Osei', category: 'Litigation', subcategory: 'Witness', matter: 'Redstone v. Meridian', matterId: 'M-2024-0312', likelihood: 3, impact: 4, score: 12, trend: 'rising', status: 'Active', owner: 'L. Torres', mitigation: 'Locate and serve subpoena; prepare affidavit for admission of prior statements', triggers: ['Former CFO relocated overseas', 'No cooperation agreement'], lastAssessed: '2026-04-17', nextReview: '2026-04-24', controls: ['Private investigator engaged', 'Prior deposition transcript available'], residualScore: 8, history: [{date:'2026-03-01',score:8,note:'Osei cooperating informally'},{date:'2026-04-01',score:10,note:'Osei stopped responding'},{date:'2026-04-17',score:12,note:'Confirmed relocation to Singapore'}] },
    { id: 'RSK-010', name: 'Data Breach — Confidential Discovery Materials', category: 'Operational', subcategory: 'Security', matter: 'All Matters', matterId: null, likelihood: 1, impact: 5, score: 5, trend: 'stable', status: 'Monitoring', owner: 'J. Park', mitigation: 'Annual security audit; encrypted file transfer protocols; access logging', triggers: ['Third-party vendor breach', 'Phishing attempt'], lastAssessed: '2026-04-01', nextReview: '2026-07-01', controls: ['SOC 2 compliance', 'MFA enforced', 'DLP monitoring active'], residualScore: 3, history: [{date:'2026-01-01',score:5,note:'Annual baseline assessment'},{date:'2026-04-01',score:5,note:'No incidents — stable'}] },
    { id: 'RSK-011', name: 'Sanctions Motion — Discovery Conduct', category: 'Discovery', subcategory: 'Sanctions', matter: 'Redstone v. Meridian', matterId: 'M-2024-0312', likelihood: 2, impact: 3, score: 6, trend: 'stable', status: 'Monitoring', owner: 'L. Torres', mitigation: 'Document all meet-and-confer efforts; maintain detailed correspondence log', triggers: ['Aggressive discovery posture', 'Defense allegations of over-collection'], lastAssessed: '2026-04-14', nextReview: '2026-05-14', controls: ['All letters preserved', 'Judge aware of good faith efforts'], residualScore: 4, history: [{date:'2026-03-01',score:8,note:'Defense threatened sanctions'},{date:'2026-04-14',score:6,note:'Court praised our discovery compliance'}] },
    { id: 'RSK-012', name: 'Insurance Coverage Dispute', category: 'Financial', subcategory: 'Coverage', matter: 'Pacific Shipping', matterId: 'M-2024-0456', likelihood: 3, impact: 4, score: 12, trend: 'rising', status: 'Active', owner: 'M. Kirkland', mitigation: 'Engage coverage counsel; prepare declaratory judgment action if carrier denies', triggers: ['Late notice argument by carrier', 'Policy exclusion interpretation'], lastAssessed: '2026-04-16', nextReview: '2026-04-23', controls: ['Coverage opinion obtained', 'Carrier on notice'], residualScore: 8, history: [{date:'2026-03-10',score:8,note:'Carrier requesting additional info'},{date:'2026-04-01',score:10,note:'Carrier raising exclusion defense'},{date:'2026-04-16',score:12,note:'Coverage counsel advises 40% denial probability'}] },
    { id: 'RSK-013', name: 'Jury Bias — Complex Financial Evidence', category: 'Trial', subcategory: 'Jury', matter: 'Redstone v. Meridian', matterId: 'M-2024-0312', likelihood: 3, impact: 3, score: 9, trend: 'stable', status: 'Planning', owner: 'M. Kirkland', mitigation: 'Retain jury consultant; develop visual storytelling for financial narrative', triggers: ['Complex fraud scheme', 'Multi-million dollar figures'], lastAssessed: '2026-04-10', nextReview: '2026-06-01', controls: ['Visual exhibits in development', 'Mock trial planned'], residualScore: 6, history: [{date:'2026-04-10',score:9,note:'Initial trial risk assessment'}] },
    { id: 'RSK-014', name: 'Statute of Limitations — Count IV', category: 'Litigation', subcategory: 'Legal', matter: 'Redstone v. Meridian', matterId: 'M-2024-0312', likelihood: 2, impact: 5, score: 10, trend: 'declining', status: 'Active', owner: 'M. Kirkland', mitigation: 'Discovery rule tolling argument prepared; fraudulent concealment doctrine applies', triggers: ['Defense MTD on timeliness', 'Count IV filed at outer boundary'], lastAssessed: '2026-04-08', nextReview: '2026-05-08', controls: ['Tolling memo drafted', 'Supporting case law compiled'], residualScore: 6, history: [{date:'2026-02-01',score:14,note:'Defense raised SOL defense'},{date:'2026-03-01',score:12,note:'Tolling argument strengthened'},{date:'2026-04-08',score:10,note:'Judge indicated tolling likely applies'}] },
    { id: 'RSK-015', name: 'Associate Burnout — Case Staffing', category: 'Operational', subcategory: 'Staffing', matter: 'All Matters', matterId: null, likelihood: 3, impact: 3, score: 9, trend: 'rising', status: 'Active', owner: 'M. Kirkland', mitigation: 'Redistribute workload; authorize contract reviewers for document-heavy tasks', triggers: ['Multiple concurrent deadlines', 'Q2 billing targets'], lastAssessed: '2026-04-19', nextReview: '2026-04-26', controls: ['Workload dashboard active', 'Contract reviewers onboarded'], residualScore: 6, history: [{date:'2026-03-15',score:6,note:'Baseline staffing assessment'},{date:'2026-04-01',score:8,note:'Discovery production surge'},{date:'2026-04-19',score:9,note:'J. Park at 44h/week review load'}] },
  ],

  // ── RISK CATEGORIES WITH THRESHOLDS ──
  categories: [
    { name: 'Litigation', color: '#C23030', count: 6, avgScore: 11.5 },
    { name: 'Discovery', color: '#D97706', count: 3, avgScore: 9.7 },
    { name: 'Procedural', color: '#3B82F6', count: 1, avgScore: 9.0 },
    { name: 'Client', color: '#7C3AED', count: 1, avgScore: 9.0 },
    { name: 'Regulatory', color: '#0D9488', count: 1, avgScore: 10.0 },
    { name: 'Financial', color: '#B8860B', count: 1, avgScore: 12.0 },
    { name: 'Operational', color: '#6E7D9E', count: 2, avgScore: 7.0 },
    { name: 'Trial', color: '#A855F7', count: 1, avgScore: 9.0 },
  ],

  // ── SCENARIO ANALYSIS ──
  scenarios: [
    { id: 'SC-01', name: 'Best Case — Full Recovery', probability: 25, damages: '$18.7M', timeline: '12 months', outcome: 'Trial verdict in favor on all counts including punitive damages. Full expert damages awarded.', assumptions: ['All evidence admitted', 'Daubert challenge fails', 'Jury sympathetic', 'Punitive damages awarded'], risks: ['RSK-001', 'RSK-003', 'RSK-013'] },
    { id: 'SC-02', name: 'Base Case — Partial Recovery', probability: 45, damages: '$10.2M–$14.2M', timeline: '8–14 months', outcome: 'Settlement after MSJ or favorable verdict on Counts I–III. Count IV SOL defense partially successful.', assumptions: ['Key evidence survives challenges', 'Expert testimony admitted', 'Some counts dismissed', 'Settlement negotiations productive'], risks: ['RSK-001', 'RSK-002', 'RSK-014'] },
    { id: 'SC-03', name: 'Adverse — Partial Dismissal', probability: 20, damages: '$4.5M–$8M', timeline: '14–18 months', outcome: 'Summary judgment on fraud counts; breach of contract survives. Reduced damages without fraud multiplier.', assumptions: ['Fraud claims dismissed at MSJ', 'Contract claims survive', 'Expert limited on damages', 'Lengthy appeal possible'], risks: ['RSK-001', 'RSK-003', 'RSK-009', 'RSK-014'] },
    { id: 'SC-04', name: 'Worst Case — Complete Defense Verdict', probability: 10, damages: '$0 + defense costs', timeline: '18–24 months', outcome: 'All claims dismissed or defense verdict at trial. Counterclaim exposure materialized. Significant fee exposure.', assumptions: ['Key evidence excluded', 'Witness unavailable', 'Jury confused by financials', 'Counterclaim succeeds'], risks: ['RSK-001', 'RSK-002', 'RSK-005', 'RSK-009', 'RSK-013'] },
  ],

  // ── COMPLIANCE OBLIGATIONS ──
  compliance: [
    { id: 'CO-01', obligation: 'Litigation Hold — Redstone', matter: 'Redstone v. Meridian', status: 'Active', dueDate: null, owner: 'J. Park', lastVerified: '2026-04-15', nextVerification: '2026-05-15', scope: 'All custodians (4)', notes: 'Quarterly verification with IT and custodians' },
    { id: 'CO-02', obligation: 'ESI Protocol Compliance', matter: 'Redstone v. Meridian', status: 'Active', dueDate: null, owner: 'J. Park', lastVerified: '2026-04-12', nextVerification: '2026-05-12', scope: 'All productions', notes: 'Per court-ordered ESI protocol dated Feb 10, 2026' },
    { id: 'CO-03', obligation: 'Expert Disclosure — Rebuttal', matter: 'Redstone v. Meridian', status: 'Upcoming', dueDate: '2026-05-20', owner: 'M. Kirkland', lastVerified: null, nextVerification: null, scope: 'Defense rebuttal expert', notes: 'Monitor for defense expert report; prepare rebuttal within 30 days' },
    { id: 'CO-04', obligation: 'Proportionality Certification', matter: 'Redstone v. Meridian', status: 'Active', dueDate: '2026-05-01', owner: 'L. Torres', lastVerified: '2026-04-10', nextVerification: '2026-05-01', scope: 'Discovery requests', notes: 'Rule 26(g) certification for proportionality of discovery requests' },
    { id: 'CO-05', obligation: 'Protective Order Compliance', matter: 'Redstone v. Meridian', status: 'Active', dueDate: null, owner: 'L. Torres', lastVerified: '2026-04-18', nextVerification: '2026-05-18', scope: 'Confidential materials', notes: 'Monthly audit of access to AEO-designated materials' },
    { id: 'CO-06', obligation: 'Insurance Carrier Notice', matter: 'Pacific Shipping', status: 'At Risk', dueDate: '2026-04-25', owner: 'M. Kirkland', lastVerified: '2026-04-16', nextVerification: '2026-04-25', scope: 'Supplemental notice', notes: 'Carrier requesting additional documentation — deadline approaching' },
    { id: 'CO-07', obligation: 'Client Reporting — Quarterly', matter: 'All Matters', status: 'Upcoming', dueDate: '2026-04-30', owner: 'M. Kirkland', lastVerified: '2026-01-31', nextVerification: '2026-04-30', scope: 'All active matters', notes: 'Q1 2026 litigation status reports to all clients' },
    { id: 'CO-08', obligation: 'Conflict Check — New Matter', matter: 'Pending Intake', status: 'Pending', dueDate: '2026-04-22', owner: 'L. Torres', lastVerified: null, nextVerification: null, scope: 'Whitfield referral', notes: 'Conflict check required before engagement letter' },
  ],

  // ── MITIGATION ACTIONS ──
  mitigations: [
    { id: 'MIT-001', riskId: 'RSK-001', action: 'File supplemental expert declaration', assignee: 'M. Kirkland', dueDate: '2026-05-05', status: 'In Progress', priority: 'critical', progress: 60, notes: 'Dr. Mitchell preparing supplemental analysis of newly produced financials' },
    { id: 'MIT-002', riskId: 'RSK-001', action: 'Prepare alternative damages theory memo', assignee: 'L. Torres', dueDate: '2026-05-10', status: 'Not Started', priority: 'high', progress: 0, notes: 'Unjust enrichment theory as fallback to lost profits' },
    { id: 'MIT-003', riskId: 'RSK-002', action: 'File motion for adverse inference instruction', assignee: 'L. Torres', dueDate: '2026-04-28', status: 'Drafting', priority: 'critical', progress: 75, notes: 'Draft complete — partner review pending' },
    { id: 'MIT-004', riskId: 'RSK-006', action: 'Complete trial exhibit pre-marking', assignee: 'J. Park', dueDate: '2026-04-28', status: 'In Progress', priority: 'high', progress: 45, notes: '12 of 26 exhibits pre-marked' },
    { id: 'MIT-005', riskId: 'RSK-007', action: 'Prepare settlement cost-benefit analysis', assignee: 'M. Kirkland', dueDate: '2026-04-25', status: 'In Progress', priority: 'high', progress: 30, notes: 'Gathering billing data and exposure estimates' },
    { id: 'MIT-006', riskId: 'RSK-009', action: 'Engage PI to locate Karen Osei', assignee: 'L. Torres', dueDate: '2026-04-22', status: 'In Progress', priority: 'critical', progress: 50, notes: 'PI confirmed Singapore location — serving via Hague Convention' },
    { id: 'MIT-007', riskId: 'RSK-009', action: 'Prepare Rule 32 motion for prior deposition', assignee: 'L. Torres', dueDate: '2026-05-01', status: 'Not Started', priority: 'high', progress: 0, notes: 'Fallback if witness cannot be compelled' },
    { id: 'MIT-008', riskId: 'RSK-012', action: 'Engage coverage counsel — Barton & Kline', assignee: 'M. Kirkland', dueDate: '2026-04-21', status: 'Complete', priority: 'high', progress: 100, notes: 'Engagement letter signed; initial analysis due Apr 25' },
    { id: 'MIT-009', riskId: 'RSK-014', action: 'File tolling argument brief', assignee: 'M. Kirkland', dueDate: '2026-04-30', status: 'Drafting', priority: 'high', progress: 65, notes: 'Discovery rule + fraudulent concealment arguments' },
    { id: 'MIT-010', riskId: 'RSK-015', action: 'Onboard two additional contract reviewers', assignee: 'J. Park', dueDate: '2026-04-22', status: 'In Progress', priority: 'medium', progress: 80, notes: 'Background checks complete; access provisioning in progress' },
  ],

  // ── MONTE CARLO SIMULATION RESULTS ──
  monteCarlo: {
    iterations: 10000,
    expectedValue: 11200000,
    median: 10800000,
    p10: 4200000,
    p25: 7600000,
    p75: 14800000,
    p90: 17900000,
    stdDev: 4300000,
    distribution: [
      { bucket: '$0–2M', pct: 5 }, { bucket: '$2–4M', pct: 7 }, { bucket: '$4–6M', pct: 9 },
      { bucket: '$6–8M', pct: 12 }, { bucket: '$8–10M', pct: 16 }, { bucket: '$10–12M', pct: 18 },
      { bucket: '$12–14M', pct: 14 }, { bucket: '$14–16M', pct: 10 }, { bucket: '$16–18M', pct: 6 },
      { bucket: '$18M+', pct: 3 },
    ],
  },

  // ── RISK DEPENDENCIES (for correlation graph) ──
  dependencies: [
    { from: 'RSK-001', to: 'RSK-002', label: 'Spoliation weakens MSJ defense', weight: 3 },
    { from: 'RSK-001', to: 'RSK-003', label: 'Expert exclusion dooms damages', weight: 3 },
    { from: 'RSK-001', to: 'RSK-014', label: 'SOL dismissal removes Count IV', weight: 2 },
    { from: 'RSK-001', to: 'RSK-009', label: 'Missing witness weakens fact pattern', weight: 2 },
    { from: 'RSK-001', to: 'RSK-013', label: 'Jury confusion amplifies MSJ risk', weight: 1 },
    { from: 'RSK-002', to: 'RSK-011', label: 'Spoliation claim invites sanctions', weight: 2 },
    { from: 'RSK-002', to: 'RSK-004', label: 'Privilege disputes delay production', weight: 1 },
    { from: 'RSK-003', to: 'RSK-013', label: 'Excluded expert hurts jury narrative', weight: 2 },
    { from: 'RSK-007', to: 'RSK-012', label: 'Coverage denial increases settlement pressure', weight: 2 },
    { from: 'RSK-008', to: 'RSK-001', label: 'SEC investigation complicates litigation', weight: 2 },
    { from: 'RSK-009', to: 'RSK-002', label: 'Osei could testify to spoliation', weight: 2 },
    { from: 'RSK-014', to: 'RSK-001', label: 'Count IV dismissal reduces leverage', weight: 2 },
    { from: 'RSK-015', to: 'RSK-006', label: 'Burnout delays trial prep', weight: 1 },
    { from: 'RSK-015', to: 'RSK-002', label: 'Overwork causes review errors', weight: 1 },
  ],

  // ── EVIDENCE CROSS-REFERENCES ──
  evidenceLinks: {
    'RSK-001': ['EV-0001', 'EV-0006', 'EV-0007', 'EV-0009'],
    'RSK-002': ['EV-0008', 'EV-0004'],
    'RSK-003': ['EV-0007', 'EV-0015'],
    'RSK-004': ['EV-0011', 'EV-0005'],
    'RSK-005': ['EV-0010', 'EV-0001'],
    'RSK-008': ['EV-0002', 'EV-0003'],
    'RSK-009': ['EV-0006', 'EV-0004'],
    'RSK-012': [],
    'RSK-013': ['EV-0002', 'EV-0008', 'EV-0007'],
    'RSK-014': ['EV-0009', 'EV-0001'],
  },

  // ── AUDIT LOG ──
  auditLog: [
    { date: '2026-04-19', user: 'M. Kirkland', action: 'Updated RSK-015 score', detail: '8 → 9 (staffing pressure increasing)' },
    { date: '2026-04-18', user: 'M. Kirkland', action: 'Updated RSK-001 score', detail: '18 → 20 (missing records confirmed)' },
    { date: '2026-04-18', user: 'M. Kirkland', action: 'Updated RSK-007 score', detail: '8 → 9 (GC requested settlement eval)' },
    { date: '2026-04-17', user: 'L. Torres', action: 'Updated RSK-009 score', detail: '10 → 12 (confirmed Singapore relocation)' },
    { date: '2026-04-17', user: 'J. Park', action: 'Updated RSK-002 assessment', detail: 'No change — awaiting supplemental production' },
    { date: '2026-04-16', user: 'M. Kirkland', action: 'Updated RSK-012 score', detail: '10 → 12 (coverage counsel advises 40% denial)' },
    { date: '2026-04-16', user: 'L. Torres', action: 'Updated RSK-004 score', detail: '10 → 8 (court signaled skepticism of defense)' },
    { date: '2026-04-15', user: 'M. Kirkland', action: 'Created RSK-013', detail: 'Jury bias risk — trial preparation planning' },
    { date: '2026-04-14', user: 'L. Torres', action: 'Updated RSK-011 score', detail: '8 → 6 (court praised compliance)' },
    { date: '2026-04-12', user: 'M. Kirkland', action: 'Reviewed RSK-008', detail: 'No SEC inquiry — maintaining monitoring' },
    { date: '2026-04-10', user: 'M. Kirkland', action: 'Updated RSK-005 score', detail: '7 → 6 (deposition undermined counterclaim)' },
    { date: '2026-04-08', user: 'M. Kirkland', action: 'Updated RSK-014 score', detail: '12 → 10 (judge indicated tolling likely)' },
  ],

  // ── APPETITE THRESHOLDS (per category) ──
  appetiteThresholds: [
    { category: 'Litigation',  tolerance: 12, target: 8,  maxLoss: 5000000, currentAvg: 11.5, status: 'within'  },
    { category: 'Discovery',   tolerance: 10, target: 6,  maxLoss: 2000000, currentAvg: 9.7,  status: 'within'  },
    { category: 'Procedural',  tolerance: 9,  target: 5,  maxLoss: 500000,  currentAvg: 9.0,  status: 'at-limit'},
    { category: 'Client',      tolerance: 10, target: 6,  maxLoss: 1000000, currentAvg: 9.0,  status: 'within'  },
    { category: 'Regulatory',  tolerance: 8,  target: 4,  maxLoss: 3000000, currentAvg: 10.0, status: 'breach'  },
    { category: 'Financial',   tolerance: 10, target: 6,  maxLoss: 4000000, currentAvg: 12.0, status: 'breach'  },
    { category: 'Operational', tolerance: 8,  target: 4,  maxLoss: 750000,  currentAvg: 7.0,  status: 'within'  },
    { category: 'Trial',       tolerance: 12, target: 8,  maxLoss: 2500000, currentAvg: 9.0,  status: 'within'  },
  ],

  // ── CONTROL TESTS ──
  controlTests: [
    { id: 'CT-01', control: 'MFA enforcement',        riskId: 'RSK-010', lastTested: '2026-03-15', nextTest: '2026-06-15', result: 'effective',     owner: 'J. Park', findings: '' },
    { id: 'CT-02', control: 'Litigation hold monitor',riskId: 'RSK-002', lastTested: '2026-04-10', nextTest: '2026-05-10', result: 'effective',     owner: 'J. Park', findings: 'Quarterly certifications received' },
    { id: 'CT-03', control: 'Privilege log review',   riskId: 'RSK-004', lastTested: '2026-04-05', nextTest: '2026-05-05', result: 'partial',       owner: 'L. Torres', findings: '3 entries needed enhanced descriptions' },
    { id: 'CT-04', control: 'Expert CV verification', riskId: 'RSK-003', lastTested: '2026-03-20', nextTest: '2026-06-20', result: 'effective',     owner: 'M. Kirkland', findings: '' },
    { id: 'CT-05', control: 'Workload threshold',     riskId: 'RSK-015', lastTested: '2026-04-19', nextTest: '2026-04-26', result: 'ineffective',   owner: 'M. Kirkland', findings: 'J. Park at 44h/week' },
    { id: 'CT-06', control: 'SOC 2 annual audit',     riskId: 'RSK-010', lastTested: '2026-01-30', nextTest: '2027-01-30', result: 'effective',     owner: 'IT', findings: 'Clean opinion' },
    { id: 'CT-07', control: 'Conflict check pipeline',riskId: 'RSK-007', lastTested: '2026-04-01', nextTest: '2026-07-01', result: 'effective',     owner: 'L. Torres', findings: '' },
  ],

  // ── TREATMENT DECISIONS ──
  treatmentDecisions: [
    { id: 'TD-01', riskId: 'RSK-001', strategy: 'mitigate', decidedBy: 'M. Kirkland', date: '2026-04-18', rationale: 'Supplemental expert declaration cost-effective vs. adverse ruling', cost: 45000,  residualScore: 12 },
    { id: 'TD-02', riskId: 'RSK-012', strategy: 'transfer', decidedBy: 'M. Kirkland', date: '2026-04-16', rationale: 'Engage coverage counsel; pursue declaratory judgment',            cost: 75000,  residualScore: 8  },
    { id: 'TD-03', riskId: 'RSK-010', strategy: 'mitigate', decidedBy: 'J. Park',     date: '2026-01-15', rationale: 'SOC 2 + MFA + DLP baseline sufficient',                          cost: 120000, residualScore: 3  },
    { id: 'TD-04', riskId: 'RSK-005', strategy: 'accept',   decidedBy: 'M. Kirkland', date: '2026-04-10', rationale: 'Counterclaim lacks factual basis — low residual',                cost: 0,      residualScore: 4  },
    { id: 'TD-05', riskId: 'RSK-008', strategy: 'accept',   decidedBy: 'M. Kirkland', date: '2026-04-12', rationale: 'Monitor only — no SEC activity observed',                        cost: 0,      residualScore: 8  },
    { id: 'TD-06', riskId: 'RSK-013', strategy: 'mitigate', decidedBy: 'M. Kirkland', date: '2026-04-10', rationale: 'Mock trial + visual exhibits',                                   cost: 85000,  residualScore: 6  },
    { id: 'TD-07', riskId: 'RSK-015', strategy: 'mitigate', decidedBy: 'M. Kirkland', date: '2026-04-19', rationale: 'Add contract reviewers to reduce workload',                      cost: 38000,  residualScore: 6  },
  ],

  // ── INSURANCE POLICIES ──
  insurancePolicies: [
    { id: 'IP-01', carrier: 'Axis',         type: 'E&O',       limit: 10000000, retention: 250000, annualPremium: 185000, expires: '2026-10-01', coveredRisks: ['RSK-001','RSK-003','RSK-014'], notes: 'Primary layer' },
    { id: 'IP-02', carrier: 'AIG',          type: 'E&O Excess',limit: 15000000, retention: 0,      annualPremium: 92000,  expires: '2026-10-01', coveredRisks: ['RSK-001'],                     notes: 'Excess over IP-01' },
    { id: 'IP-03', carrier: 'Beazley',      type: 'Cyber',     limit: 5000000,  retention: 100000, annualPremium: 48000,  expires: '2026-07-15', coveredRisks: ['RSK-010'],                     notes: 'First-party + liability' },
    { id: 'IP-04', carrier: 'Travelers',    type: 'D&O',       limit: 10000000, retention: 500000, annualPremium: 125000, expires: '2026-12-31', coveredRisks: ['RSK-008'],                     notes: '' },
    { id: 'IP-05', carrier: 'Continental',  type: 'Employment',limit: 3000000,  retention: 75000,  annualPremium: 28000,  expires: '2026-09-01', coveredRisks: ['RSK-015'],                     notes: '' },
  ],

  // ── KRI INDICATORS ──
  kriIndicators: [
    { id: 'KRI-01', name: 'Avg risk score',         current: 10.2, threshold: 12, trend: 'rising',   window: '30d', related: [] },
    { id: 'KRI-02', name: 'Critical risk count',    current: 3,    threshold: 4,  trend: 'stable',   window: '30d', related: ['RSK-001','RSK-002'] },
    { id: 'KRI-03', name: 'Mitigation overdue %',   current: 15,   threshold: 20, trend: 'declining',window: '7d',  related: [] },
    { id: 'KRI-04', name: 'Attorney util %',        current: 94,   threshold: 90, trend: 'rising',   window: '7d',  related: ['RSK-015'] },
    { id: 'KRI-05', name: 'Discovery cost burn',    current: 112,  threshold: 110,trend: 'rising',   window: '30d', related: ['RSK-007'] },
    { id: 'KRI-06', name: 'Privilege claim rate',   current: 8,    threshold: 15, trend: 'stable',   window: '30d', related: ['RSK-004'] },
    { id: 'KRI-07', name: 'Witness response rate',  current: 72,   threshold: 80, trend: 'declining',window: '14d', related: ['RSK-009'] },
    { id: 'KRI-08', name: 'Evidence gap count',     current: 2,    threshold: 3,  trend: 'stable',   window: '30d', related: ['RSK-002'] },
  ],

  // ── EARLY WARNING TRIGGER RULES ──
  triggerRules: [
    { id: 'TR-01', name: 'Score jumps ≥3 in 7d',       condition: 'deltaScore >= 3 within 7 days',      action: 'notify owner + partner', enabled: true,  triggered: 2 },
    { id: 'TR-02', name: 'Two risks rising same matter',condition: 'count(rising)>=2 per matter',       action: 'escalate to partner',    enabled: true,  triggered: 1 },
    { id: 'TR-03', name: 'Mitigation overdue >3d',     condition: 'dueDate past + status<>Complete',    action: 'notify assignee',        enabled: true,  triggered: 4 },
    { id: 'TR-04', name: 'Appetite breach',            condition: 'category currentAvg > tolerance',    action: 'committee review',       enabled: true,  triggered: 2 },
    { id: 'TR-05', name: 'KRI threshold crossed',      condition: 'any KRI current > threshold',        action: 'dashboard alert',        enabled: true,  triggered: 2 },
    { id: 'TR-06', name: 'Residual >= inherent',       condition: 'residualScore >= score',             action: 'control review',         enabled: false, triggered: 0 },
  ],

  // ── REGULATORY HORIZON ──
  regulatoryWatch: [
    { id: 'RW-01', rule: 'SEC Cyber Disclosure Rule 2026-01', effective: '2026-07-01', jurisdiction: 'Federal', impact: 'high',   area: 'Cyber',     matters: ['Redstone v. Meridian'], status: 'tracking' },
    { id: 'RW-02', rule: 'CA SB-920 ESI amendments',          effective: '2026-09-01', jurisdiction: 'CA',      impact: 'medium', area: 'Discovery', matters: ['Pacific Shipping'],     status: 'analysis' },
    { id: 'RW-03', rule: 'FRCP 26 proposed amendments',       effective: '2027-01-01', jurisdiction: 'Federal', impact: 'high',   area: 'Discovery', matters: ['All'],                  status: 'tracking' },
    { id: 'RW-04', rule: 'NY CLE mandatory DEI',              effective: '2026-06-01', jurisdiction: 'NY',      impact: 'low',    area: 'Operational',matters: [],                      status: 'complied' },
    { id: 'RW-05', rule: 'EU AI Act enforcement phase',       effective: '2026-08-02', jurisdiction: 'EU',      impact: 'medium', area: 'Regulatory',matters: ['Redstone v. Meridian'], status: 'analysis' },
  ],

  // ── INCIDENTS / NEAR-MISS ──
  incidents: [
    { id: 'INC-01', date: '2026-04-10', type: 'near-miss', severity: 'medium', description: 'Privilege log sent to opposing counsel with 3 unredacted entries; recalled within 4 hours',  rootCause: 'Manual review',  resolved: true, relatedRisk: 'RSK-004', lessons: 'Second-reviewer requirement added' },
    { id: 'INC-02', date: '2026-03-28', type: 'incident',  severity: 'low',    description: 'Deposition start delayed 45 minutes due to exhibit reproduction',                             rootCause: 'Process',        resolved: true, relatedRisk: null,      lessons: 'Exhibits pre-printed 24h prior' },
    { id: 'INC-03', date: '2026-03-15', type: 'near-miss', severity: 'high',   description: 'Custodian nearly deleted email archive during office cleanup; IT intervention saved 2 years', rootCause: 'Awareness',      resolved: true, relatedRisk: 'RSK-002', lessons: 'Quarterly custodian refresher' },
    { id: 'INC-04', date: '2026-02-20', type: 'incident',  severity: 'medium', description: 'Associate filed brief 1 day past deadline; granted nunc pro tunc',                            rootCause: 'Calendaring',    resolved: true, relatedRisk: 'RSK-015', lessons: 'Dual-calendar rule' },
    { id: 'INC-05', date: '2026-04-18', type: 'near-miss', severity: 'medium', description: 'Phishing email targeted Kirkland account; blocked by spam filter',                           rootCause: 'External',       resolved: true, relatedRisk: 'RSK-010', lessons: 'Executive awareness training' },
  ],

  // ── CYBER REGISTER ──
  cyberRegister: [
    { id: 'CY-01', asset: 'Document Review Platform', classification: 'Confidential', vendor: 'Relativity', lastPenTest: '2026-01-15', exposure: 'low',    mitigations: ['SSO','MFA','audit log'], breachScore: 2 },
    { id: 'CY-02', asset: 'Client Portal',            classification: 'Confidential', vendor: 'HighQ',      lastPenTest: '2026-02-01', exposure: 'medium', mitigations: ['MFA','encryption'],        breachScore: 4 },
    { id: 'CY-03', asset: 'Email Archive',            classification: 'Sensitive',    vendor: 'Mimecast',   lastPenTest: '2025-11-20', exposure: 'medium', mitigations: ['DLP','encryption'],        breachScore: 5 },
    { id: 'CY-04', asset: 'Trial Presentation Cloud', classification: 'AEO',          vendor: 'TrialPad',   lastPenTest: '2025-09-10', exposure: 'high',   mitigations: ['VPN only'],                breachScore: 7 },
    { id: 'CY-05', asset: 'Timesheet System',         classification: 'Internal',     vendor: 'Aderant',    lastPenTest: '2026-03-01', exposure: 'low',    mitigations: ['SSO'],                     breachScore: 3 },
  ],

  // ── CLIENT/MATTER PORTFOLIOS ──
  clientPortfolios: [
    { id: 'CP-01', client: 'Redstone Capital',  matters: 3, activeRisks: 11, aggregateScore: 124, expectedLoss: 8200000, concentration: 'high',   relationshipScore: 7 },
    { id: 'CP-02', client: 'Pacific Shipping',  matters: 2, activeRisks: 3,  aggregateScore: 27,  expectedLoss: 2100000, concentration: 'medium', relationshipScore: 6 },
    { id: 'CP-03', client: 'Thornton Estate',   matters: 1, activeRisks: 2,  aggregateScore: 12,  expectedLoss: 400000,  concentration: 'low',    relationshipScore: 9 },
    { id: 'CP-04', client: 'Whitfield (pending)', matters: 0, activeRisks: 1, aggregateScore: 0,  expectedLoss: 0,        concentration: 'low',   relationshipScore: null },
  ],

  // ── RISK COMMITTEE MEETINGS ──
  riskCommittee: [
    { id: 'RC-01', date: '2026-04-22', chair: 'M. Kirkland', attendees: ['M. Kirkland','L. Torres','J. Park','GC'], agenda: ['RSK-001 strategy','RSK-012 coverage','Q1 appetite review'], minutesUrl: null, decisions: [] },
    { id: 'RC-02', date: '2026-03-25', chair: 'M. Kirkland', attendees: ['M. Kirkland','L. Torres','J. Park'],      agenda: ['Portfolio review','New matter intake'],                     minutesUrl: 'minutes-0325.pdf', decisions: ['Accept Redstone supplemental budget','Defer Whitfield intake'] },
    { id: 'RC-03', date: '2026-02-25', chair: 'M. Kirkland', attendees: ['M. Kirkland','L. Torres'],                agenda: ['SOC 2 audit','Insurance renewal'],                          minutesUrl: 'minutes-0225.pdf', decisions: ['Renew Axis E&O','Add cyber excess'] },
  ],

  // ── REPORT TEMPLATES ──
  reportTemplates: [
    { id: 'RT-01', name: 'Board Risk Summary',    audience: 'Board',    cadence: 'Quarterly',  sections: ['Top 10','Heatmap','Trend','Appetite'],   lastUsed: '2026-01-30' },
    { id: 'RT-02', name: 'Client Matter Report',  audience: 'Client',   cadence: 'Monthly',    sections: ['Status','Budget','Risks','Next Steps'],  lastUsed: '2026-04-01' },
    { id: 'RT-03', name: 'GC Brief',              audience: 'GC',       cadence: 'Weekly',     sections: ['New','Rising','Mitigations'],            lastUsed: '2026-04-19' },
    { id: 'RT-04', name: 'Insurance Disclosure',  audience: 'Carrier',  cadence: 'Annual',     sections: ['Loss runs','Risk profile','Controls'],   lastUsed: '2025-10-01' },
    { id: 'RT-05', name: 'Internal Audit Report', audience: 'Partners', cadence: 'Semi-annual',sections: ['Controls','Incidents','KRIs','Appetite'],lastUsed: '2026-01-15' },
  ],

  // ── ERM MATURITY ──
  ermMaturity: [
    { dimension: 'Risk Identification',   current: 4, target: 5, framework: 'COSO 2017',      gap: 'Emerging risk horizon scanning' },
    { dimension: 'Risk Assessment',       current: 4, target: 4, framework: 'ISO 31000',      gap: '' },
    { dimension: 'Risk Response',         current: 3, target: 4, framework: 'COSO 2017',      gap: 'Treatment decision documentation' },
    { dimension: 'Control Activities',    current: 3, target: 4, framework: 'COSO 2013',      gap: 'Control testing frequency' },
    { dimension: 'Information & Comm',    current: 4, target: 4, framework: 'COSO 2017',      gap: '' },
    { dimension: 'Monitoring',            current: 3, target: 5, framework: 'COSO 2017',      gap: 'Continuous KRI automation' },
    { dimension: 'Governance & Culture',  current: 4, target: 5, framework: 'COSO 2017',      gap: 'Risk committee cadence' },
  ],

  // ── ETHICAL WALLS ──
  ethicalWalls: [
    { id: 'EW-01', name: 'Redstone / Meridian screen', matter: 'Redstone v. Meridian', established: '2025-08-15', screenedAttorneys: ['P. Nguyen'], reason: 'Former Meridian associate', status: 'active',  lastAudit: '2026-04-01' },
    { id: 'EW-02', name: 'Pacific / Atlantic screen',  matter: 'Pacific Shipping',     established: '2024-11-20', screenedAttorneys: ['R. Hall'],   reason: 'Prior Atlantic work',       status: 'active',  lastAudit: '2026-03-15' },
    { id: 'EW-03', name: 'Thornton family screen',     matter: 'Thornton Estate',      established: '2024-05-10', screenedAttorneys: ['D. Shaw'],   reason: 'Family relationship',       status: 'closed',  lastAudit: '2026-01-10' },
  ],

  // ── VENDOR / PANEL ──
  vendorPanel: [
    { id: 'VN-01', name: 'Dr. Alan Mitchell',  type: 'Expert Witness', specialty: 'Forensic Accounting', rating: 4.8, engagements: 12, lastRetained: '2026-03-01', risks: [], status: 'active' },
    { id: 'VN-02', name: 'Logik Systems',      type: 'ESI Vendor',     specialty: 'Collection',          rating: 4.5, engagements: 8,  lastRetained: '2026-02-15', risks: ['SOC 2 expiring'], status: 'active' },
    { id: 'VN-03', name: 'Smith Investigation',type: 'PI',             specialty: 'International',       rating: 4.9, engagements: 5,  lastRetained: '2026-04-15', risks: [], status: 'active' },
    { id: 'VN-04', name: 'Barton & Kline',     type: 'Coverage Counsel',specialty: 'Insurance',          rating: 4.7, engagements: 3,  lastRetained: '2026-04-16', risks: [], status: 'active' },
    { id: 'VN-05', name: 'Jury Insight',       type: 'Jury Consultant',specialty: 'Complex Financial',   rating: 4.6, engagements: 6,  lastRetained: '2025-11-10', risks: [], status: 'active' },
  ],

  // ── CLIENT RATINGS ──
  clientRatings: [
    { id: 'CR-01', client: 'Redstone Capital', payment: 'A',  disputes: 'B', concentration: 'C', aml: 'A', composite: 'B+', reviewed: '2026-01-15', flags: ['high-concentration'] },
    { id: 'CR-02', client: 'Pacific Shipping', payment: 'A',  disputes: 'A', concentration: 'B', aml: 'A', composite: 'A',  reviewed: '2026-01-15', flags: [] },
    { id: 'CR-03', client: 'Thornton Estate',  payment: 'A',  disputes: 'A', concentration: 'A', aml: 'A', composite: 'A',  reviewed: '2026-01-15', flags: [] },
    { id: 'CR-04', client: 'Whitfield (pending)',payment: '-',disputes: '-', concentration: '-', aml: 'B', composite: 'pending', reviewed: null,    flags: ['aml-enhanced-DD'] },
  ],

  // ── ATTORNEY PROFILES ──
  attorneyProfiles: [
    { id: 'AP-01', name: 'M. Kirkland', role: 'Partner',  utilization: 92, realization: 94, winRate: 82, cleSuffiencies: true,  cyberTraining: '2026-02-10', complaints: 0, malpractice: 0 },
    { id: 'AP-02', name: 'L. Torres',   role: 'Senior',   utilization: 88, realization: 89, winRate: 76, cleSuffiencies: true,  cyberTraining: '2026-02-10', complaints: 0, malpractice: 0 },
    { id: 'AP-03', name: 'J. Park',     role: 'Associate',utilization: 104,realization: 86, winRate: null,cleSuffiencies: true, cyberTraining: '2026-03-05', complaints: 0, malpractice: 0 },
    { id: 'AP-04', name: 'D. Shaw',     role: 'Counsel',  utilization: 72, realization: 91, winRate: 70, cleSuffiencies: false, cyberTraining: '2025-11-20', complaints: 0, malpractice: 0 },
  ],

  // ── SETTLEMENT DECISION TREES ──
  settlementTrees: [
    {
      id: 'ST-01', matter: 'Redstone v. Meridian', matterId: 'M-2024-0312',
      nodes: [
        { id: 'root',    type: 'decision', label: 'Accept $8.5M settlement?' },
        { id: 'accept',  type: 'outcome',  parent: 'root', choice: 'Accept',  value: 8500000, probability: 1.0, ev: 8500000 },
        { id: 'reject',  type: 'chance',   parent: 'root', choice: 'Reject', value: null, probability: 1.0, ev: 10400000 },
        { id: 'win',     type: 'outcome',  parent: 'reject', label: 'Trial win',   value: 14200000, probability: 0.55, ev: 7810000 },
        { id: 'loss',    type: 'outcome',  parent: 'reject', label: 'Defense verdict', value: -2500000, probability: 0.15, ev: -375000 },
        { id: 'partial', type: 'outcome',  parent: 'reject', label: 'Partial recovery', value: 6500000, probability: 0.30, ev: 1950000 },
      ],
      recommendation: 'reject',
      ev: 9385000,
    },
  ],

  // ── SENSITIVITY FACTORS ──
  sensitivityFactors: [
    { id: 'SF-01', factor: 'Daubert outcome',      low: 3200000,  high: 15800000, range: 12600000 },
    { id: 'SF-02', factor: 'Witness availability', low: 5100000,  high: 13400000, range: 8300000 },
    { id: 'SF-03', factor: 'SOL tolling ruling',   low: 7200000,  high: 12900000, range: 5700000 },
    { id: 'SF-04', factor: 'Counterclaim outcome', low: 8500000,  high: 11800000, range: 3300000 },
    { id: 'SF-05', factor: 'Coverage denial',      low: 8200000,  high: 11200000, range: 3000000 },
    { id: 'SF-06', factor: 'Jury composition',     low: 8900000,  high: 12100000, range: 3200000 },
  ],

  // ── VaR RESULTS ──
  varResults: {
    horizon: '12 months',
    confidence: 0.95,
    var95: 3400000,
    cvar95: 5100000,
    ead: 11200000,
    method: 'Monte Carlo · Cornish-Fisher adj.',
    lastRun: '2026-04-20',
  },

  // ── ASC 450 RESERVES ──
  reserves: [
    { id: 'RV-01', matter: 'Redstone v. Meridian', matterId: 'M-2024-0312', probability: 'probable',   estimate: 9000000, range: '7.5M–12M', ascCategory: 'probable',    disclosure: 'full', lastReviewed: '2026-04-18' },
    { id: 'RV-02', matter: 'Pacific Shipping',     matterId: 'M-2024-0456', probability: 'reasonably possible', estimate: null, range: '0.5M–2.8M', ascCategory: 'reasonably-possible', disclosure: 'contingent', lastReviewed: '2026-04-16' },
    { id: 'RV-03', matter: 'Thornton Estate',      matterId: 'M-2024-0189', probability: 'remote',     estimate: 0,       range: '0',        ascCategory: 'remote',     disclosure: 'none', lastReviewed: '2026-04-10' },
  ],

  // ── BOW-TIE DIAGRAMS ──
  bowTies: [
    {
      id: 'BT-01', event: 'Adverse MSJ ruling', riskId: 'RSK-001',
      causes:       [{ cause: 'Missing records',       control: 'Adverse inference motion' }, { cause: 'Weak deposition',     control: 'Supplemental expert' }, { cause: 'Legal precedent', control: 'Tolling brief' }],
      consequences: [{ consequence: 'Claims dismissed',control: 'Interlocutory appeal' },     { consequence: 'Client loss',   control: 'Cost-benefit memo' }, { consequence: 'Fee exposure', control: 'Insurance trigger' }],
    },
    {
      id: 'BT-02', event: 'Data breach',        riskId: 'RSK-010',
      causes:       [{ cause: 'Phishing',              control: 'Awareness training' },       { cause: 'Vendor breach',       control: 'SOC 2 req' },           { cause: 'Insider',         control: 'DLP monitoring' }],
      consequences: [{ consequence: 'Regulatory fine', control: 'Cyber insurance' },          { consequence: 'Client notify', control: 'IR plan' },             { consequence: 'Privilege loss', control: 'Segmentation' }],
    },
  ],

  // ── STRESS TESTS ──
  stressTests: [
    { id: 'ST-T1', scenario: 'Judge Reynolds adverse ruling cascade', impactedRisks: ['RSK-001','RSK-006','RSK-014'], newScore: 22, baselineScore: 20, deltaLoss: 3200000, ran: '2026-04-15' },
    { id: 'ST-T2', scenario: 'All experts excluded',                   impactedRisks: ['RSK-001','RSK-003','RSK-013'], newScore: 25, baselineScore: 20, deltaLoss: 5800000, ran: '2026-04-15' },
    { id: 'ST-T3', scenario: 'Cyber breach + regulatory spillover',    impactedRisks: ['RSK-008','RSK-010'],           newScore: 18, baselineScore: 10, deltaLoss: 4100000, ran: '2026-04-12' },
    { id: 'ST-T4', scenario: 'Two key witnesses unavailable',          impactedRisks: ['RSK-001','RSK-009'],           newScore: 23, baselineScore: 20, deltaLoss: 2700000, ran: '2026-04-17' },
  ],
};

window.RISK_DATA = RISK_DATA;
