// WAR ROOM — Mock data for Redstone Capital v. Meridian Holdings
// Other matters get scaled-down defaults

const WAR_ROOM_DATA = {
  'M-2024-0312': {
    // ── CASE THEORY ──
    theories: [
      {
        id: 'T1', label: 'Breach of Contract', strength: 85, status: 'Primary',
        thesis: 'Meridian breached the Master Services Agreement by diverting $14.2M in receivables to shell entity controlled by CEO.',
        keyFacts: ['MSA §4.2 prohibits undisclosed related-party transactions', 'Wire transfer records show 23 transfers to Apex Ventures LLC', 'Apex Ventures incorporated 6 days before first transfer'],
        attacks: ['Defense will argue business judgment rule', 'Statute of limitations on earliest transfers'],
        evidence: ['MSA executed copy', 'Wire transfer records', 'Apex incorporation docs', 'Harrington depo pp. 87–92'],
      },
      {
        id: 'T2', label: 'Fraud / Misrepresentation', strength: 72, status: 'Primary',
        thesis: 'Meridian CEO knowingly misrepresented financial condition during Q3 2023 board meeting to secure additional investment from Redstone.',
        keyFacts: ['Board minutes show CEO presented $48M revenue projection', 'Actual Q3 revenue was $31M — 35% shortfall', 'Internal emails show CEO aware of shortfall 2 weeks prior'],
        attacks: ['Defense: projections are inherently forward-looking', 'Must prove scienter — reliance may be contested'],
        evidence: ['Board minutes Oct 2023', 'Internal revenue reports', 'CEO email chain (Bates MH-0012440–0012467)', 'Mitchell damages report'],
      },
      {
        id: 'T3', label: 'Breach of Fiduciary Duty', strength: 78, status: 'Secondary',
        thesis: 'As board member and officer, CEO owed fiduciary duties to Redstone as significant minority shareholder. Self-dealing transactions violated duty of loyalty.',
        keyFacts: ['CEO sat on both sides of Apex transactions', 'No board approval sought for related-party deals', 'Delaware law applies — entire fairness standard triggered'],
        attacks: ['Defense: Redstone was sophisticated investor, assumed risk', 'Exculpation clause in charter (but does not cover loyalty)'],
        evidence: ['Corporate charter', 'Board resolutions (absence of approval)', 'Park research memo on Delaware standards'],
      },
      {
        id: 'T4', label: 'Unjust Enrichment', strength: 55, status: 'Fallback',
        thesis: 'Even if contract claims fail, Meridian was unjustly enriched by retaining diverted funds.',
        keyFacts: ['$14.2M transferred, $0 returned', 'Meridian benefited from Redstone\'s capital while diverting returns'],
        attacks: ['Quasi-contractual claim — may be barred if express contract governs', 'Damages overlap with contract claim'],
        evidence: ['Financial records', 'Expert damages analysis'],
      },
    ],

    // ── WITNESSES ──
    witnesses: {
      friendly: [
        { name: 'David Redstone', role: 'Plaintiff CEO', status: 'Ready', credibility: 88, risk: 'low', notes: 'Strong presence. Prep for cross on due diligence failures. 2 prep sessions completed.', examTime: '2.5h', topics: ['Investment decision', 'Reliance on representations', 'Damages suffered'] },
        { name: 'Dr. Sarah Mitchell', role: 'Damages Expert', status: 'Ready', credibility: 92, risk: 'low', notes: 'Excellent credentials. Daubert-proof methodology. $14.2M–$18.7M range well-supported.', examTime: '3h', topics: ['Economic damages methodology', 'Lost profits calculation', 'Rebuttal of defense expert'] },
        { name: 'Karen Osei', role: 'Former Meridian CFO', status: 'Prep Needed', credibility: 75, risk: 'medium', notes: 'Left Meridian in 2024. Knows about internal accounting. May be reluctant — subpoenaed.', examTime: '1.5h', topics: ['Financial reporting practices', 'Apex transaction awareness', 'CEO directives'] },
      ],
      adverse: [
        { name: 'James Harrington', role: 'Meridian CEO', status: 'Deposed', credibility: 45, risk: 'high', notes: 'Depo revealed key admissions pp. 87–92. Evasive on Apex questions. Will be hostile at trial.', examTime: '4h', crossPlan: ['Lock in depo admissions', 'Impeach with internal emails', 'Timeline of Apex creation vs. first transfer', 'Challenge "business judgment" narrative'] },
        { name: 'Robert Chen', role: 'Meridian GC', status: 'Not Deposed', credibility: 60, risk: 'medium', notes: 'May assert privilege. Likely aware of related-party issues. Consider motion to compel if privilege waived.', examTime: '2h', crossPlan: ['Board meeting advice', 'Privilege log gaps', 'Knowledge of Apex entity'] },
        { name: 'Thomas Vance', role: 'Defense Expert (Valuation)', status: 'Report Pending', credibility: 55, risk: 'medium', notes: 'Expected to minimize damages. Prior testimony in 3 cases — impeachable on methodology inconsistency.', examTime: '2.5h', crossPlan: ['Prior inconsistent methodology', 'Assumptions vs. actual data', 'Fee arrangement / bias'] },
      ],
    },

    // ── EVIDENCE MATRIX ──
    evidenceMatrix: [
      { id: 'E1', name: 'Master Services Agreement', type: 'Document', claims: ['T1','T3'], strength: 95, status: 'Admitted', notes: 'Foundation document. §4.2 is key provision.' },
      { id: 'E2', name: 'Wire Transfer Records (23)', type: 'Financial', claims: ['T1','T4'], strength: 90, status: 'Admitted', notes: '$14.2M across 23 transfers. Clear paper trail.' },
      { id: 'E3', name: 'Apex Ventures Incorporation', type: 'Corporate', claims: ['T1','T2','T3'], strength: 88, status: 'Admitted', notes: 'Filed 6 days before first transfer. CEO is sole director.' },
      { id: 'E4', name: 'Harrington Depo Transcript', type: 'Testimony', claims: ['T1','T2','T3'], strength: 82, status: 'Designated', notes: 'Key admissions pp. 87–92. Evasive answers strengthen our narrative.' },
      { id: 'E5', name: 'CEO Internal Emails', type: 'Communications', claims: ['T2'], strength: 85, status: 'Produced', notes: 'Bates MH-0012440–67. Shows knowledge of revenue shortfall before board meeting.' },
      { id: 'E6', name: 'Board Minutes — Oct 2023', type: 'Corporate', claims: ['T2','T3'], strength: 78, status: 'Admitted', notes: 'CEO revenue projection vs. actuals. No disclosure of Apex.' },
      { id: 'E7', name: 'Mitchell Expert Report', type: 'Expert', claims: ['T1','T2','T4'], strength: 88, status: 'Disclosed', notes: '$14.2M–$18.7M. Strong methodology. Anticipate Daubert challenge.' },
      { id: 'E8', name: 'Financial Records 2020–24', type: 'Financial', claims: ['T1','T2','T3','T4'], strength: 75, status: 'Under Review', notes: '3,200+ docs. Gaps in Q3 2022. May need supplemental production.' },
      { id: 'E9', name: 'Corporate Charter', type: 'Corporate', claims: ['T3'], strength: 70, status: 'Admitted', notes: 'Exculpation clause — but does NOT cover loyalty breaches.' },
    ],

    // ── OPPOSITION INTEL ──
    opposition: {
      firm: 'Caldwell & Strauss LLP',
      leadCounsel: 'Patricia Caldwell',
      teamSize: 8,
      firmProfile: 'AmLaw 100 firm. Aggressive discovery tactics. Strong motion practice. Caldwell personally has 73% win rate in commercial lit.',
      strategy: 'Business judgment rule defense. Minimize damages. Attack Redstone\'s due diligence. May push for early MSJ to force settlement.',
      patterns: [
        { pattern: 'Heavy motion practice — avg 4.2 motions per case', risk: 'medium' },
        { pattern: 'Aggressive deposition style — often seeks protective orders', risk: 'low' },
        { pattern: 'Caldwell settles 62% of cases before trial', risk: 'high' },
        { pattern: 'Tends to hire 2+ experts to overwhelm on damages', risk: 'medium' },
        { pattern: 'Prior cases show weakness on fiduciary duty claims — 2 losses in last 3', risk: 'low' },
      ],
      weaknesses: [
        'Fiduciary duty defense historically weak — 33% success rate',
        'Self-dealing facts here are stronger than their prior cases',
        'Harrington\'s depo admissions are difficult to rehabilitate',
        'Financial trail is clean and well-documented',
        'Caldwell overextended — 4 active trials this quarter',
      ],
      threats: [
        'MSJ on fraud claim — scienter is our weakest element',
        'Daubert challenge on Mitchell — unlikely to succeed but will delay',
        'Jury sympathy for "sophisticated investor should have known" narrative',
        'Potential counterclaim on tortious interference (low merit, distraction tactic)',
      ],
    },

    // ── SETTLEMENT MODELING ──
    settlement: {
      ourRange: { low: 8500000, mid: 12000000, high: 18700000 },
      theirLastOffer: 3200000,
      expectedVerdict: { low: 10200000, mid: 14200000, high: 18700000, probability: 72 },
      trialCostEstimate: 480000,
      scenarioTree: [
        { scenario: 'Trial — Full Verdict', probability: 42, value: 14200000 },
        { scenario: 'Trial — Partial (Contract only)', probability: 18, value: 8500000 },
        { scenario: 'Trial — Defense Verdict', probability: 12, value: 0 },
        { scenario: 'Settlement — Pre-trial', probability: 22, value: 9500000 },
        { scenario: 'MSJ Granted (partial)', probability: 6, value: 4000000 },
      ],
      expectedValue: 10140000,
      walkAwayFloor: 7000000,
      nextMoveRec: 'Counter at $11.5M. Their $3.2M offer signals willingness to negotiate but is anchored low. Discovery wins have strengthened our position. Recommend structured counter with 14-day deadline to maintain trial prep momentum.',
    },

    // ── TRIAL PLAN ──
    trialPlan: [
      { day: 1, label: 'Day 1 — Openings + Plaintiff Case', items: [
        { time: '9:00 AM', event: 'Opening Statement', who: 'M. Kirkland', duration: '45 min', notes: 'Theme: Trust betrayed. Money trail tells the story.' },
        { time: '10:00 AM', event: 'Direct — David Redstone', who: 'M. Kirkland', duration: '2.5 hrs', notes: 'Establish investment, reliance, harm. Strong witness.' },
        { time: '1:30 PM', event: 'Cross — David Redstone (est.)', who: 'Defense', duration: '1.5 hrs', notes: 'Expect: due diligence attacks. Prep complete.' },
        { time: '3:30 PM', event: 'Direct — Karen Osei', who: 'L. Torres', duration: '1.5 hrs', notes: 'Internal knowledge of financials. May be reluctant.' },
      ]},
      { day: 2, label: 'Day 2 — Plaintiff Case Cont.', items: [
        { time: '9:00 AM', event: 'Cross — Karen Osei (est.)', who: 'Defense', duration: '1 hr', notes: 'Limited cross expected — she\'s hostile to both sides.' },
        { time: '10:30 AM', event: 'Direct — Dr. Sarah Mitchell', who: 'M. Kirkland', duration: '3 hrs', notes: 'Damages testimony. Walk through methodology slowly.' },
        { time: '2:00 PM', event: 'Cross — Dr. Mitchell (est.)', who: 'Defense', duration: '2 hrs', notes: 'Expect methodology attacks. Mitchell well-prepared.' },
      ]},
      { day: 3, label: 'Day 3 — Defense Case', items: [
        { time: '9:00 AM', event: 'Direct — James Harrington', who: 'Defense', duration: '3 hrs', notes: 'CEO testimony. Will push business judgment narrative.' },
        { time: '1:00 PM', event: 'Cross — James Harrington', who: 'M. Kirkland', duration: '4 hrs', notes: 'KEY MOMENT. Lock in depo admissions. Impeach with emails. Apex timeline.' },
      ]},
      { day: 4, label: 'Day 4 — Defense Case + Closings', items: [
        { time: '9:00 AM', event: 'Direct — Defense Expert', who: 'Defense', duration: '2 hrs', notes: 'Damages rebuttal. Expect lowball methodology.' },
        { time: '11:30 AM', event: 'Cross — Defense Expert', who: 'L. Torres', duration: '2.5 hrs', notes: 'Prior inconsistent testimony. Fee arrangement. Assumptions.' },
        { time: '2:30 PM', event: 'Closing — Plaintiff', who: 'M. Kirkland', duration: '1 hr', notes: 'Tie evidence to verdict form. Money trail. Betrayal theme.' },
        { time: '3:45 PM', event: 'Closing — Defense', who: 'Defense', duration: '1 hr', notes: '' },
        { time: '4:45 PM', event: 'Rebuttal — Plaintiff', who: 'M. Kirkland', duration: '15 min', notes: 'Sharp. End on strongest fact.' },
      ]},
    ],
  },

  _default: {
    theories: [
      { id: 'T1', label: 'Primary Claim', strength: 70, status: 'Primary', thesis: 'Core legal theory under development.', keyFacts: ['Key fact 1','Key fact 2'], attacks: ['Anticipated defense'], evidence: ['Supporting document'] },
    ],
    witnesses: { friendly: [{ name: 'Lead witness', role: 'Plaintiff', status: 'Prep Needed', credibility: 70, risk: 'medium', notes: 'Witness preparation in progress.', examTime: '2h', topics: ['Key issue'] }], adverse: [{ name: 'Opposing party', role: 'Defendant', status: 'Not Deposed', credibility: 50, risk: 'high', notes: 'Deposition to be scheduled.', examTime: '3h', crossPlan: ['Key impeachment point'] }] },
    evidenceMatrix: [{ id: 'E1', name: 'Key Document', type: 'Document', claims: ['T1'], strength: 70, status: 'Produced', notes: 'Under review.' }],
    opposition: { firm: 'Opposing Firm LLP', leadCounsel: 'Lead Attorney', teamSize: 4, firmProfile: 'Regional firm with commercial litigation practice.', strategy: 'Standard defense posture.', patterns: [{ pattern: 'Standard motion practice', risk: 'medium' }], weaknesses: ['Analysis pending'], threats: ['Standard litigation risks'] },
    settlement: { ourRange: { low: 500000, mid: 1000000, high: 2000000 }, theirLastOffer: 0, expectedVerdict: { low: 600000, mid: 1200000, high: 2000000, probability: 55 }, trialCostEstimate: 200000, scenarioTree: [{ scenario: 'Trial — Favorable', probability: 55, value: 1200000 },{ scenario: 'Trial — Unfavorable', probability: 25, value: 0 },{ scenario: 'Settlement', probability: 20, value: 800000 }], expectedValue: 820000, walkAwayFloor: 400000, nextMoveRec: 'Evaluate settlement posture after discovery phase.' },
    trialPlan: [{ day: 1, label: 'Day 1', items: [{ time: '9:00 AM', event: 'Opening Statements', who: 'Lead', duration: '1 hr', notes: '' }] }],
  },
};

window.WAR_ROOM_DATA = WAR_ROOM_DATA;
