The user wants a comprehensive sandbox environment for geopolitical sanctions simulation. This is a complex request that involves:
- Scenario Trees - Mapping possible geopolitical events and their cascading effects
- Frozen Asset Accounting - Tracking and managing assets that become restricted
- Investor Messaging Templates - Communication templates for different scenarios
Let me design a sophisticated, interactive single-page application that handles all three aspects:
Design Concept:
- Dark, professional aesthetic fitting for financial/geopolitical analysis
- Think Bloomberg Terminal meets Situation Room
- Color scheme: Deep navy/charcoal base with amber/gold accents for warnings, red for critical, green for compliant
Key Features:
- Scenario Tree Visualization - Interactive tree showing sanction escalation paths
- Asset Dashboard - Frozen/restricted asset tracking with status indicators
- Messaging Generator - Template system with dynamic fields
Technical Implementation:
- Canvas for the scenario tree (or SVG for better interaction)
- CSS Grid for the dashboard layout
- Form-based template generator
- Tab-based navigation between sections
Font choices:
- Display: Space Grotesk (technical, modern)
- UI: DM Sans (clean, readable)
Color Palette:
- --bg: #0d1117 (deep dark)
- --bg-elevated: #161b22
- --fg: #e6edf3
- --muted: #7d8590
- --accent: #d4a853 (gold/amber for sanctions theme)
- --danger: #f85149
- --success: #3fb950
- --border: #30363d
Let me build this comprehensive application.
This is a sophisticated request that requires a professional, data-dense interface. I'll build a comprehensive sanctions sandbox with three integrated modules: scenario modeling, asset tracking, and communication tools.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Geopolitical Sanctions Sandbox</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<style>
:root {
--bg: #0a0e14;
--bg-elevated: #111820;
--bg-card: #151d28;
--fg: #e6edf3;
--muted: #6b7a8f;
--accent: #d4a853;
--accent-dim: rgba(212, 168, 83, 0.15);
--danger: #f85149;
--danger-dim: rgba(248, 81, 73, 0.12);
--success: #3fb950;
--success-dim: rgba(63, 185, 80, 0.12);
--warning: #d29922;
--warning-dim: rgba(210, 153, 34, 0.12);
--border: #252d38;
--border-light: #364252;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Space Grotesk', sans-serif;
background: var(--bg);
color: var(--fg);
min-height: 100vh;
overflow-x: hidden;
}
.mono {
font-family: 'JetBrains Mono', monospace;
}
/* Background atmosphere */
.bg-grid {
background-image:
linear-gradient(rgba(212, 168, 83, 0.03) 1px, transparent 1px),
linear-gradient(90deg, rgba(212, 168, 83, 0.03) 1px, transparent 1px);
background-size: 40px 40px;
}
.bg-radial {
background: radial-gradient(ellipse at 50% 0%, rgba(212, 168, 83, 0.08) 0%, transparent 60%);
}
/* Custom scrollbar */
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
background: var(--bg);
}
::-webkit-scrollbar-thumb {
background: var(--border-light);
border-radius: 3px;
}
/* Animations */
@keyframes fadeSlideUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes pulseGlow {
0%, 100% { opacity: 0.4; }
50% { opacity: 0.8; }
}
@keyframes scanLine {
0% { transform: translateY(-100%); }
100% { transform: translateY(100vh); }
}
.animate-in {
animation: fadeSlideUp 0.5s ease-out forwards;
}
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
/* Scenario tree */
.tree-node {
transition: all 0.2s ease;
cursor: pointer;
}
.tree-node:hover {
transform: scale(1.02);
}
.tree-node.selected {
box-shadow: 0 0 0 2px var(--accent);
}
.tree-connector {
stroke: var(--border-light);
stroke-width: 2;
fill: none;
stroke-dasharray: 1000;
stroke-dashoffset: 1000;
animation: drawLine 1s ease forwards;
}
@keyframes drawLine {
to { stroke-dashoffset: 0; }
}
/* Status badges */
.status-frozen {
background: var(--danger-dim);
color: var(--danger);
border: 1px solid rgba(248, 81, 73, 0.3);
}
.status-restricted {
background: var(--warning-dim);
color: var(--warning);
border: 1px solid rgba(210, 153, 34, 0.3);
}
.status-clear {
background: var(--success-dim);
color: var(--success);
border: 1px solid rgba(63, 185, 80, 0.3);
}
/* Tab navigation */
.tab-btn {
position: relative;
transition: all 0.2s ease;
}
.tab-btn::after {
content: '';
position: absolute;
bottom: -1px;
left: 0;
right: 0;
height: 2px;
background: var(--accent);
transform: scaleX(0);
transition: transform 0.2s ease;
}
.tab-btn.active::after {
transform: scaleX(1);
}
.tab-btn.active {
color: var(--accent);
}
/* Cards */
.card {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 8px;
transition: all 0.2s ease;
}
.card:hover {
border-color: var(--border-light);
}
/* Buttons */
.btn-primary {
background: var(--accent);
color: var(--bg);
font-weight: 600;
padding: 10px 20px;
border-radius: 6px;
border: none;
cursor: pointer;
transition: all 0.15s ease;
}
.btn-primary:hover {
background: #e0b665;
transform: translateY(-1px);
}
.btn-primary:active {
transform: translateY(0);
}
.btn-secondary {
background: transparent;
color: var(--fg);
font-weight: 500;
padding: 10px 20px;
border-radius: 6px;
border: 1px solid var(--border-light);
cursor: pointer;
transition: all 0.15s ease;
}
.btn-secondary:hover {
border-color: var(--accent);
color: var(--accent);
}
/* Form inputs */
.input-field {
background: var(--bg);
border: 1px solid var(--border);
border-radius: 6px;
padding: 10px 14px;
color: var(--fg);
font-family: inherit;
font-size: 14px;
transition: all 0.15s ease;
width: 100%;
}
.input-field:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 3px var(--accent-dim);
}
.input-field::placeholder {
color: var(--muted);
}
/* Template editor */
.template-variable {
background: var(--accent-dim);
color: var(--accent);
padding: 2px 8px;
border-radius: 4px;
font-size: 13px;
cursor: pointer;
transition: all 0.15s ease;
}
.template-variable:hover {
background: rgba(212, 168, 83, 0.25);
}
/* Progress bar */
.progress-track {
background: var(--bg);
height: 6px;
border-radius: 3px;
overflow: hidden;
}
.progress-fill {
height: 100%;
border-radius: 3px;
transition: width 0.5s ease;
}
/* Scan line effect */
.scan-effect {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 2px;
background: linear-gradient(90deg, transparent, var(--accent), transparent);
opacity: 0.3;
animation: scanLine 8s linear infinite;
pointer-events: none;
z-index: 100;
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
/* Responsive */
@media (max-width: 768px) {
.hide-mobile {
display: none;
}
}
</style>
</head>
<body class="bg-grid">
<div class="bg-radial fixed inset-0 pointer-events-none"></div>
<div class="scan-effect"></div>
<!-- Header -->
<header class="sticky top-0 z-50 border-b border-[var(--border)] bg-[var(--bg)]/90 backdrop-blur-sm">
<div class="max-w-7xl mx-auto px-4 py-3 flex items-center justify-between">
<div class="flex items-center gap-3">
<div class="w-8 h-8 rounded bg-[var(--accent)] flex items-center justify-center">
<svg class="w-5 h-5 text-[var(--bg)]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7"/>
</svg>
</div>
<div>
<h1 class="font-semibold text-lg">Sanctions Sandbox</h1>
<p class="text-xs text-[var(--muted)] hide-mobile">Geopolitical Risk Simulation Platform</p>
</div>
</div>
<div class="flex items-center gap-4">
<div class="text-right hide-mobile">
<p class="text-xs text-[var(--muted)]">Simulation Status</p>
<p class="text-sm font-medium text-[var(--success)] flex items-center gap-1">
<span class="w-2 h-2 rounded-full bg-[var(--success)] animate-pulse"></span>
Active Scenario
</p>
</div>
<button id="exportBtn" class="btn-secondary text-sm">
Export Report
</button>
</div>
</div>
</header>
<!-- Tab Navigation -->
<nav class="border-b border-[var(--border)] bg-[var(--bg-elevated)]">
<div class="max-w-7xl mx-auto px-4">
<div class="flex gap-6">
<button class="tab-btn active py-3 px-1 text-sm font-medium" data-tab="scenarios">
Scenario Trees
</button>
<button class="tab-btn py-3 px-1 text-sm font-medium text-[var(--muted)]" data-tab="assets">
Frozen Assets
</button>
<button class="tab-btn py-3 px-1 text-sm font-medium text-[var(--muted)]" data-tab="messaging">
Investor Messaging
</button>
</div>
</div>
</nav>
<!-- Main Content -->
<main class="max-w-7xl mx-auto px-4 py-6">
<!-- Scenarios Tab -->
<section id="scenarios-tab" class="tab-content">
<div class="grid lg:grid-cols-3 gap-6">
<!-- Scenario Controls -->
<div class="lg:col-span-1 space-y-4 animate-in">
<div class="card p-4">
<h3 class="font-semibold mb-3 flex items-center gap-2">
<svg class="w-4 h-4 text-[var(--accent)]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4"/>
</svg>
Scenario Parameters
</h3>
<div class="space-y-3">
<div>
<label class="text-xs text-[var(--muted)] mb-1 block">Target Region</label>
<select id="regionSelect" class="input-field text-sm">
<option value="russia">Russia & CIS</option>
<option value="china">China & PRC Territories</option>
<option value="iran">Iran & Proxy Networks</option>
<option value="dprk">North Korea</option>
<option value="custom">Custom Region</option>
</select>
</div>
<div>
<label class="text-xs text-[var(--muted)] mb-1 block">Escalation Level</label>
<input type="range" id="escalationSlider" min="1" max="5" value="2" class="w-full accent-[var(--accent)]">
<div class="flex justify-between text-xs text-[var(--muted)] mt-1">
<span>Minor</span>
<span>Moderate</span>
<span>Severe</span>
</div>
</div>
<div>
<label class="text-xs text-[var(--muted)] mb-1 block">Sanction Type</label>
<div class="space-y-2">
<label class="flex items-center gap-2 cursor-pointer">
<input type="checkbox" checked class="accent-[var(--accent)]">
<span class="text-sm">Asset Freezes</span>
</label>
<label class="flex items-center gap-2 cursor-pointer">
<input type="checkbox" checked class="accent-[var(--accent)]">
<span class="text-sm">Trade Restrictions</span>
</label>
<label class="flex items-center gap-2 cursor-pointer">
<input type="checkbox" class="accent-[var(--accent)]">
<span class="text-sm">Financial Exclusion (SWIFT)</span>
</label>
<label class="flex items-center gap-2 cursor-pointer">
<input type="checkbox" class="accent-[var(--accent)]">
<span class="text-sm">Secondary Sanctions</span>
</label>
</div>
</div>
<button id="runSimulation" class="btn-primary w-full mt-4">
Run Scenario Simulation
</button>
</div>
</div>
<!-- Quick Stats -->
<div class="card p-4">
<h3 class="font-semibold mb-3">Impact Projection</h3>
<div class="space-y-3">
<div>
<div class="flex justify-between text-sm mb-1">
<span class="text-[var(--muted)]">Assets at Risk</span>
<span class="mono text-[var(--danger)]">$2.4B</span>
</div>
<div class="progress-track">
<div class="progress-fill bg-[var(--danger)]" style="width: 72%"></div>
</div>
</div>
<div>
<div class="flex justify-between text-sm mb-1">
<span class="text-[var(--muted)]">Counterparty Exposure</span>
<span class="mono text-[var(--warning)]">$890M</span>
</div>
<div class="progress-track">
<div class="progress-fill bg-[var(--warning)]" style="width: 45%"></div>
</div>
</div>
<div>
<div class="flex justify-between text-sm mb-1">
<span class="text-[var(--muted)]">Compliance Readiness</span>
<span class="mono text-[var(--success)]">94%</span>
</div>
<div class="progress-track">
<div class="progress-fill bg-[var(--success)]" style="width: 94%"></div>
</div>
</div>
</div>
</div>
</div>
<!-- Scenario Tree Visualization -->
<div class="lg:col-span-2 animate-in stagger-1">
<div class="card p-4 h-full">
<div class="flex items-center justify-between mb-4">
<h3 class="font-semibold">Scenario Tree: Sanction Escalation Paths</h3>
<div class="flex items-center gap-2 text-xs">
<span class="flex items-center gap-1">
<span class="w-3 h-3 rounded bg-[var(--danger)]"></span> Critical
</span>
<span class="flex items-center gap-1">
<span class="w-3 h-3 rounded bg-[var(--warning)]"></span> Elevated
</span>
<span class="flex items-center gap-1">
<span class="w-3 h-3 rounded bg-[var(--success)]"></span> Stable
</span>
</div>
</div>
<div id="scenarioTree" class="min-h-[500px] relative overflow-auto">
<!-- Tree nodes rendered via JS -->
</div>
</div>
</div>
</div>
</section>
<!-- Assets Tab -->
<section id="assets-tab" class="tab-content hidden">
<div class="space-y-6">
<!-- Asset Summary Cards -->
<div class="grid md:grid-cols-4 gap-4 animate-in">
<div class="card p-4">
<p class="text-xs text-[var(--muted)] mb-1">Total Frozen Assets</p>
<p class="text-2xl font-bold mono text-[var(--danger)]">$4.82B</p>
<p class="text-xs text-[var(--danger)] mt-1">+12.4% from last quarter</p>
</div>
<div class="card p-4">
<p class="text-xs text-[var(--muted)] mb-1">Restricted Accounts</p>
<p class="text-2xl font-bold mono text-[var(--warning)]">847</p>
<p class="text-xs text-[var(--muted)] mt-1">Across 23 jurisdictions</p>
</div>
<div class="card p-4">
<p class="text-xs text-[var(--muted)] mb-1">Pending Review</p>
<p class="text-2xl font-bold mono">$312M</p>
<p class="text-xs text-[var(--accent)] mt-1">14 accounts under investigation</p>
</div>
<div class="card p-4">
<p class="text-xs text-[var(--muted)] mb-1">Released (YTD)</p>
<p class="text-2xl font-bold mono text-[var(--success)]">$892M</p>
<p class="text-xs text-[var(--success)] mt-1">67 licenses granted</p>
</div>
</div>
<!-- Asset Table -->
<div class="card animate-in stagger-1">
<div class="p-4 border-b border-[var(--border)] flex flex-wrap items-center justify-between gap-4">
<h3 class="font-semibold">Frozen Asset Registry</h3>
<div class="flex items-center gap-3">
<input type="text" id="assetSearch" placeholder="Search assets..." class="input-field text-sm w-64">
<select id="statusFilter" class="input-field text-sm w-40">
<option value="all">All Status</option>
<option value="frozen">Frozen</option>
<option value="restricted">Restricted</option>
<option value="pending">Pending Review</option>
<option value="released">Released</option>
</select>
</div>
</div>
<div class="overflow-x-auto">
<table class="w-full text-sm">
<thead class="bg-[var(--bg)] text-[var(--muted)] text-xs uppercase">
<tr>
<th class="text-left p-3">Asset ID</th>
<th class="text-left p-3">Entity Name</th>
<th class="text-left p-3">Jurisdiction</th>
<th class="text-right p-3">Value (USD)</th>
<th class="text-left p-3">Asset Type</th>
<th class="text-left p-3">Status</th>
<th class="text-left p-3">Sanction Date</th>
<th class="text-left p-3">Actions</th>
</tr>
</thead>
<tbody id="assetTableBody">
<!-- Rows rendered via JS -->
</tbody>
</table>
</div>
<div class="p-4 border-t border-[var(--border)] flex items-center justify-between">
<p class="text-sm text-[var(--muted)]">Showing <span id="showingCount">10</span> of <span id="totalCount">156</span> assets</p>
<div class="flex items-center gap-2">
<button class="btn-secondary text-sm py-1 px-3" id="prevPage">Previous</button>
<button class="btn-secondary text-sm py-1 px-3" id="nextPage">Next</button>
</div>
</div>
</div>
<!-- Accounting Summary -->
<div class="grid md:grid-cols-2 gap-6 animate-in stagger-2">
<div class="card p-4">
<h3 class="font-semibold mb-4">Asset Breakdown by Type</h3>
<div class="space-y-3" id="assetBreakdown">
<!-- Rendered via JS -->
</div>
</div>
<div class="card p-4">
<h3 class="font-semibold mb-4">Jurisdiction Exposure</h3>
<div class="space-y-3" id="jurisdictionBreakdown">
<!-- Rendered via JS -->
</div>
</div>
</div>
</div>
</section>
<!-- Messaging Tab -->
<section id="messaging-tab" class="tab-content hidden">
<div class="grid lg:grid-cols-3 gap-6">
<!-- Template Selector -->
<div class="lg:col-span-1 space-y-4 animate-in">
<div class="card p-4">
<h3 class="font-semibold mb-3">Message Templates</h3>
<div class="space-y-2" id="templateList">
<!-- Rendered via JS -->
</div>
</div>
<div class="card p-4">
<h3 class="font-semibold mb-3">Available Variables</h3>
<p class="text-xs text-[var(--muted)] mb-3">Click to insert into template</p>
<div class="flex flex-wrap gap-2" id="variableList">
<!-- Rendered via JS -->
</div>
</div>
<div class="card p-4">
<h3 class="font-semibold mb-3">Regulatory Framework</h3>
<div class="space-y-2 text-sm">
<label class="flex items-center gap-2 cursor-pointer">
<input type="radio" name="framework" value="ofac" checked class="accent-[var(--accent)]">
<span>OFAC (US Treasury)</span>
</label>
<label class="flex items-center gap-2 cursor-pointer">
<input type="radio" name="framework" value="eu" class="accent-[var(--accent)]">
<span>EU Consolidated List</span>
</label>
<label class="flex items-center gap-2 cursor-pointer">
<input type="radio" name="framework" value="uk" class="accent-[var(--accent)]">
<span>UK OFSI Sanctions</span>
</label>
<label class="flex items-center gap-2 cursor-pointer">
<input type="radio" name="framework" value="un" class="accent-[var(--accent)]">
<span>UN Security Council</span>
</label>
</div>
</div>
</div>
<!-- Message Editor -->
<div class="lg:col-span-2 space-y-4 animate-in stagger-1">
<div class="card p-4">
<div class="flex items-center justify-between mb-4">
<h3 class="font-semibold">Message Composer</h3>
<div class="flex items-center gap-2">
<button class="btn-secondary text-sm py-1 px-3" id="previewBtn">Preview</button>
<button class="btn-primary text-sm py-1 px-3" id="generateBtn">Generate</button>
</div>
</div>
<div class="space-y-4">
<div>
<label class="text-xs text-[var(--muted)] mb-1 block">Subject Line</label>
<input type="text" id="messageSubject" class="input-field" placeholder="Enter subject line...">
</div>
<div>
<label class="text-xs text-[var(--muted)] mb-1 block">Recipients</label>
<select id="recipientType" class="input-field">
<option value="institutional">Institutional Investors</option>
<option value="retail">Retail Investors</option>
<option value="board">Board of Directors</option>
<option value="regulator">Regulatory Authority</option>
<option value="internal">Internal Stakeholders</option>
</select>
</div>
<div>
<label class="text-xs text-[var(--muted)] mb-2 block">Message Body</label>
<textarea id="messageBody" class="input-field h-64 resize-none mono text-sm" placeholder="Compose your message..."></textarea>
</div>
</div>
</div>
<!-- Preview Panel -->
<div class="card p-4" id="previewPanel">
<div class="flex items-center justify-between mb-4">
<h3 class="font-semibold">Message Preview</h3>
<button class="text-sm text-[var(--accent)] hover:underline" id="copyBtn">Copy to Clipboard</button>
</div>
<div id="previewContent" class="bg-[var(--bg)] rounded p-4 text-sm min-h-[200px] whitespace-pre-wrap">
Select a template and click Preview to see the rendered message.
</div>
</div>
</div>
</div>
</section>
</main>
<script>
// =====================
// Data Initialization
// =====================
const scenarioData = {
nodes: [
{ id: 'root', label: 'Current State', level: 0, status: 'stable', probability: 100, x: 300, y: 30 },
{ id: 'n1', label: 'Diplomatic Warning', level: 1, status: 'stable', probability: 85, x: 150, y: 120, parent: 'root' },
{ id: 'n2', label: 'Targeted Sanctions', level: 1, status: 'elevated', probability: 65, x: 450, y: 120, parent: 'root' },
{ id: 'n3', label: 'Asset Freeze (Individuals)', level: 2, status: 'elevated', probability: 55, x: 80, y: 220, parent: 'n1' },
{ id: 'n4', label: 'Travel Bans', level: 2, status: 'stable', probability: 70, x: 220, y: 220, parent: 'n1' },
{ id: 'n5', label: 'Sectoral Sanctions', level: 2, status: 'elevated', probability: 45, x: 380, y: 220, parent: 'n2' },
{ id: 'n6', label: 'Financial Exclusion', level: 2, status: 'critical', probability: 30, x: 520, y: 220, parent: 'n2' },
{ id: 'n7', label: 'Trade Embargo', level: 3, status: 'critical', probability: 20, x: 150, y: 320, parent: 'n5' },
{ id: 'n8', label: 'Energy Sector Freeze', level: 3, status: 'elevated', probability: 35, x: 300, y: 320, parent: 'n5' },
{ id: 'n9', label: 'SWIFT Disconnection', level: 3, status: 'critical', probability: 15, x: 450, y: 320, parent: 'n6' },
{ id: 'n10', label: 'Full Economic Blockade', level: 4, status: 'critical', probability: 8, x: 300, y: 420, parent: 'n7' },
{ id: 'n11', label: 'Secondary Sanctions', level: 4, status: 'elevated', probability: 25, x: 450, y: 420, parent: 'n9' },
]
};
const assetData = [
{ id: 'AST-001', entity: 'Volga Trading GmbH', jurisdiction: 'Germany', value: 456000000, type: 'Real Estate', status: 'frozen', date: '2024-02-15' },
{ id: 'AST-002', entity: 'Nord Stream Holdings', jurisdiction: 'Switzerland', value: 890000000, type: 'Securities', status: 'frozen', date: '2024-01-28' },
{ id: 'AST-003', entity: 'Moscow Credit Bank', jurisdiction: 'Russia', value: 234000000, type: 'Banking', status: 'restricted', date: '2024-03-01' },
{ id: 'AST-004', entity: 'Promsyryeimport JSC', jurisdiction: 'Russia', value: 178000000, type: 'Commodities', status: 'frozen', date: '2024-02-20' },
{ id: 'AST-005', entity: 'VTB Capital plc', jurisdiction: 'UK', value: 567000000, type: 'Securities', status: 'frozen', date: '2024-01-15' },
{ id: 'AST-006', entity: 'Sberbank Europe AG', jurisdiction: 'Austria', value: 345000000, type: 'Banking', status: 'restricted', date: '2024-02-10' },
{ id: 'AST-007', entity: 'Gazprom Germania GmbH', jurisdiction: 'Germany', value: 780000000, type: 'Energy', status: 'pending', date: '2024-03-05' },
{ id: 'AST-008', entity: 'Rossiya Bank', jurisdiction: 'Russia', value: 234000000, type: 'Banking', status: 'frozen', date: '2024-02-22' },
{ id: 'AST-009', entity: 'Sovcomflot Fleet', jurisdiction: 'Cyprus', value: 456000000, type: 'Maritime', status: 'frozen', date: '2024-02-28' },
{ id: 'AST-010', entity: 'United Aircraft Corp', jurisdiction: 'Russia', value: 890000000, type: 'Industrial', status: 'restricted', date: '2024-03-10' },
];
const assetTypes = [
{ type: 'Banking', value: 1567000000, percentage: 32 },
{ type: 'Securities', value: 1457000000, percentage: 30 },
{ type: 'Energy', value: 890000000, percentage: 18 },
{ type: 'Real Estate', value: 456000000, percentage: 9 },
{ type: 'Other', value: 480000000, percentage: 11 },
];
const jurisdictions = [
{ name: 'Russia', value: 2340000000, percentage: 49 },
{ name: 'Germany', value: 678000000, percentage: 14 },
{ name: 'Switzerland', value: 456000000, percentage: 9 },
{ name: 'UK', value: 567000000, percentage: 12 },
{ name: 'Other EU', value: 790000000, percentage: 16 },
];
const messageTemplates = [
{ id: 't1', name: 'Initial Sanction Notification', audience: 'institutional' },
{ id: 't2', name: 'Asset Freeze Advisory', audience: 'institutional' },
{ id: 't3', name: 'Compliance Update', audience: 'board' },
{ id: 't4', name: 'Investor FAQ Response', audience: 'retail' },
{ id: 't5', name: 'Regulatory Filing Notice', audience: 'regulator' },
{ id: 't6', name: 'Exemption Request', audience: 'regulator' },
{ id: 't7', name: 'Internal Alert - Level 1', audience: 'internal' },
{ id: 't8', name: 'Material Event Disclosure', audience: 'institutional' },
];
const templateVariables = [
'{DATE}', '{ENTITY_NAME}', '{JURISDICTION}', '{ASSET_VALUE}',
'{SANCTION_PROGRAM}', '{EFFECTIVE_DATE}', '{LICENSE_NUMBER}',
'{CONTACT_PERSON}', '{COMPLIANCE_OFFICER}', '{DEADLINE}'
];
const templateContent = {
t1: `Dear {CONTACT_PERSON},
Re: Sanction Designation Notice - {ENTITY_NAME}
This communication serves as formal notification regarding recent sanctions designations affecting your portfolio.
Effective {EFFECTIVE_DATE}, the following entity has been designated under the {SANCTION_PROGRAM} program:
Entity: {ENTITY_NAME}
Jurisdiction: {JURISDICTION}
Estimated Impact: {ASSET_VALUE}
Required Actions:
1. Immediate freeze of all related transactions
2. Review of counterparty exposure
3. Submission of SAR within 30 days
Please contact the Compliance Office immediately to discuss implications for your holdings.
Regards,
{COMPLIANCE_OFFICER}
Sanctions Compliance Team`,
t2: `CONFIDENTIAL - ASSET FREEZE ADVISORY
Reference: {LICENSE_NUMBER}
Date: {DATE}
In accordance with recent regulatory developments, please be advised that the following assets have been frozen pending further review:
Entity: {ENTITY_NAME}
Jurisdiction: {JURISDICTION}
Value: {ASSET_VALUE}
No transactions, transfers, or disposals are permitted without explicit authorization from the relevant regulatory authority.
A detailed impact assessment will follow within 5 business days.
{COMPLIANCE_OFFICER}
Chief Compliance Officer`,
t3: `BOARD MEMORANDUM
TO: Board of Directors
FROM: Compliance & Risk Committee
DATE: {DATE}
RE: Sanction Compliance Status Update
Executive Summary:
Following the designation of {ENTITY_NAME} under {SANCTION_PROGRAM}, we have conducted a comprehensive exposure assessment.
Key Findings:
- Direct exposure: {ASSET_VALUE}
- Jurisdictional risk: {JURISDICTION}
- Timeline for remediation: {DEADLINE}
Recommended Actions:
1. Enhanced monitoring protocols
2. Counterparty re-evaluation
3. Investor communication strategy approval
Full report attached.
{COMPLIANCE_OFFICER}`,
};
// =====================
// State Management
// =====================
let currentTab = 'scenarios';
let selectedTemplate = null;
let selectedNode = null;
let currentPage = 1;
const itemsPerPage = 10;
// =====================
// DOM Elements
// =====================
const tabButtons = document.querySelectorAll('.tab-btn');
const tabContents = document.querySelectorAll('.tab-content');
const scenarioTree = document.getElementById('scenarioTree');
const assetTableBody = document.getElementById('assetTableBody');
const templateList = document.getElementById('templateList');
const variableList = document.getElementById('variableList');
const messageBody = document.getElementById('messageBody');
const messageSubject = document.getElementById('messageSubject');
const previewContent = document.getElementById('previewContent');
const assetSearch = document.getElementById('assetSearch');
const statusFilter = document.getElementById('statusFilter');
// =====================
// Tab Navigation
// =====================
tabButtons.forEach(btn => {
btn.addEventListener('click', () => {
const tab = btn.dataset.tab;
currentTab = tab;
tabButtons.forEach(b => {
b.classList.remove('active');
b.classList.add('text-[var(--muted)]');
});
btn.classList.add('active');
btn.classList.remove('text-[var(--muted)]');
tabContents.forEach(content => {
content.classList.add('hidden');
});
document.getElementById(`${tab}-tab`).classList.remove('hidden');
});
});
// =====================
// Scenario Tree Rendering
// =====================
function renderScenarioTree() {
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
svg.setAttribute('width', '600');
svg.setAttribute('height', '500');
svg.style.position = 'absolute';
svg.style.top = '0';
svg.style.left = '0';
svg.style.pointerEvents = 'none';
// Draw connections first
scenarioData.nodes.forEach(node => {
if (node.parent) {
const parent = scenarioData.nodes.find(n => n.id === node.parent);
if (parent) {
const path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
const startX = parent.x + 60;
const startY = parent.y + 35;
const endX = node.x + 60;
const endY = node.y;
const midY = (startY + endY) / 2;
path.setAttribute('d', `M ${startX} ${startY} C ${startX} ${midY}, ${endX} ${midY}, ${endX} ${endY}`);
path.classList.add('tree-connector');
svg.appendChild(path);
}
}
});
scenarioTree.innerHTML = '';
scenarioTree.appendChild(svg);
// Draw nodes
scenarioData.nodes.forEach((node, index) => {
const div = document.createElement('div');
div.className = `tree-node absolute p-3 rounded-lg border cursor-pointer`;
div.style.left = `${node.x}px`;
div.style.top = `${node.y}px`;
div.style.width = '120px';
div.style.opacity = '0';
div.style.animation = `fadeSlideUp 0.4s ease forwards ${index * 0.05}s`;
let statusColor, statusBg;
switch(node.status) {
case 'critical':
statusColor = 'var(--danger)';
statusBg = 'var(--danger-dim)';
div.style.borderColor = 'rgba(248, 81, 73, 0.5)';
break;
case 'elevated':
statusColor = 'var(--warning)';
statusBg = 'var(--warning-dim)';
div.style.borderColor = 'rgba(210, 153, 34, 0.5)';
break;
default:
statusColor = 'var(--success)';
statusBg = 'var(--success-dim)';
div.style.borderColor = 'rgba(63, 185, 80, 0.5)';
}
div.style.background = statusBg;
div.innerHTML = `
<p class="text-xs font-medium mb-1" style="color: ${statusColor}">${node.label}</p>
<div class="flex items-center justify-between">
<span class="text-[10px] text-[var(--muted)]">Probability</span>
<span class="text-xs mono font-medium">${node.probability}%</span>
</div>
`;
div.addEventListener('click', () => selectNode(node, div));
scenarioTree.appendChild(div);
});
}
function selectNode(node, element) {
document.querySelectorAll('.tree-node').forEach(n => n.classList.remove('selected'));
element.classList.add('selected');
selectedNode = node;
// Update impact projection based on selected node
const riskMultiplier = node.probability / 100;
const assetsAtRisk = (2.4 * riskMultiplier).toFixed(1);
document.querySelector('.mono.text-\\[var\\(--danger\\)\\]').textContent = `$${assetsAtRisk}B`;
}
// =====================
// Asset Table Rendering
// =====================
function formatCurrency(value) {
if (value >= 1e9) return `$${(value / 1e9).toFixed(2)}B`;
if (value >= 1e6) return `$${(value / 1e6).toFixed(0)}M`;
return `$${value.toLocaleString()}`;
}
function getStatusBadge(status) {
const classes = {
frozen: 'status-frozen',
restricted: 'status-restricted',
pending: 'bg-[var(--accent-dim)] text-[var(--accent)] border border-[rgba(212,168,83,0.3)]',
released: 'status-clear'
};
return `<span class="${classes[status]} text-xs px-2 py-1 rounded capitalize">${status}</span>`;
}
function renderAssetTable(data = assetData) {
assetTableBody.innerHTML = '';
const start = (currentPage - 1) * itemsPerPage;
const end = start + itemsPerPage;
const pageData = data.slice(start, end);
pageData.forEach(asset => {
const row = document.createElement('tr');
row.className = 'border-b border-[var(--border)] hover:bg-[var(--bg)] transition-colors';
row.innerHTML = `
<td class="p-3 mono text-xs text-[var(--muted)]">${asset.id}</td>
<td class="p-3 font-medium">${asset.entity}</td>
<td class="p-3">${asset.jurisdiction}</td>
<td class="p-3 text-right mono font-medium">${formatCurrency(asset.value)}</td>
<td class="p-3 text-[var(--muted)]">${asset.type}</td>
<td class="p-3">${getStatusBadge(asset.status)}</td>
<td class="p-3 mono text-xs">${asset.date}</td>
<td class="p-3">
<button class="text-[var(--accent)] hover:underline text-xs" onclick="viewAssetDetails('${asset.id}')">View</button>
</td>
`;
assetTableBody.appendChild(row);
});
document.getElementById('showingCount').textContent = pageData.length;
document.getElementById('totalCount').textContent = data.length;
}
function viewAssetDetails(id) {
const asset = assetData.find(a => a.id === id);
if (asset) {
alert(`Asset Details:\n\nEntity: ${asset.entity}\nValue: ${formatCurrency(asset.value)}\nStatus: ${asset.status}\n\nFull details would open in a modal.`);
}
}
function renderAssetBreakdown() {
const container = document.getElementById('assetBreakdown');
container.innerHTML = assetTypes.map(item => `
<div>
<div class="flex justify-between text-sm mb-1">
<span>${item.type}</span>
<span class="mono">${formatCurrency(item.value)}</span>
</div>
<div class="progress-track">
<div class="progress-fill bg-[var(--accent)]" style="width: ${item.percentage}%"></div>
</div>
</div>
`).join('');
}
function renderJurisdictionBreakdown() {
const container = document.getElementById('jurisdictionBreakdown');
container.innerHTML = jurisdictions.map(item => `
<div>
<div class="flex justify-between text-sm mb-1">
<span>${item.name}</span>
<span class="mono">${formatCurrency(item.value)}</span>
</div>
<div class="progress-track">
<div class="progress-fill bg-[var(--warning)]" style="width: ${item.percentage}%"></div>
</div>
</div>
`).join('');
}
// =====================
// Messaging Templates
// =====================
function renderTemplateList() {
templateList.innerHTML = messageTemplates.map(t => `
<button class="w-full text-left p-3 rounded border border-[var(--border)] hover:border-[var(--accent)] transition-colors text-sm ${selectedTemplate === t.id ? 'border-[var(--accent)] bg-[var(--accent-dim)]' : ''}" data-template="${t.id}">
<p class="font-medium">${t.name}</p>
<p class="text-xs text-[var(--muted)] mt-1">For: ${t.audience}</p>
</button>
`).join('');
templateList.querySelectorAll('button').forEach(btn => {
btn.addEventListener('click', () => selectTemplate(btn.dataset.template));
});
}
function renderVariableList() {
variableList.innerHTML = templateVariables.map(v => `
<span class="template-variable">${v}</span>
`).join('');
variableList.querySelectorAll('.template-variable').forEach(el => {
el.addEventListener('click', () => {
const textarea = messageBody;
const start = textarea.selectionStart;
const end = textarea.selectionEnd;
const text = textarea.value;
textarea.value = text.substring(0, start) + el.textContent + text.substring(end);
textarea.focus();
textarea.selectionStart = textarea.selectionEnd = start + el.textContent.length;
});
});
}
function selectTemplate(id) {
selectedTemplate = id;
renderTemplateList();
const template = messageTemplates.find(t => t.id === id);
if (template) {
document.getElementById('recipientType').value = template.audience;
messageSubject.value = template.name;
if (templateContent[id]) {
messageBody.value = templateContent[id];
}
}
}
function generatePreview() {
let content = messageBody.value;
// Replace variables with sample data
const replacements = {
'{DATE}': new Date().toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' }),
'{ENTITY_NAME}': 'Volga Trading GmbH',
'{JURISDICTION}': 'Germany',
'{ASSET_VALUE}': '$456,000,000',
'{SANCTION_PROGRAM}': 'OFAC SDN List',
'{EFFECTIVE_DATE}': 'March 15, 2024',
'{LICENSE_NUMBER}': 'SAN-2024-0342',
'{CONTACT_PERSON}': 'Portfolio Manager',
'{COMPLIANCE_OFFICER}': 'Sarah Chen',
'{DEADLINE}': 'April 30, 2024'
};
Object.entries(replacements).forEach(([key, value]) => {
content = content.replace(new RegExp(key.replace(/[{}]/g, '\\$&'), 'g'), value);
});
previewContent.textContent = content;
}
// =====================
// Event Listeners
// =====================
document.getElementById('runSimulation').addEventListener('click', () => {
const btn = document.getElementById('runSimulation');
btn.textContent = 'Running...';
btn.disabled = true;
setTimeout(() => {
renderScenarioTree();
btn.textContent = 'Run Scenario Simulation';
btn.disabled = false;
}, 800);
});
document.getElementById('previewBtn').addEventListener('click', generatePreview);
document.getElementById('copyBtn').addEventListener('click', () => {
navigator.clipboard.writeText(previewContent.textContent).then(() => {
const btn = document.getElementById('copyBtn');
btn.textContent = 'Copied!';
setTimeout(() => btn.textContent = 'Copy to Clipboard', 2000);
});
});
document.getElementById('exportBtn').addEventListener('click', () => {
alert('Export functionality would generate a PDF report including:\n\n- Current scenario tree state\n- Asset registry summary\n- Compliance metrics\n- Recent communications log');
});
assetSearch.addEventListener('input', (e) => {
const query = e.target.value.toLowerCase();
const filtered = assetData.filter(a =>
a.entity.toLowerCase().includes(query) ||
a.jurisdiction.toLowerCase().includes(query) ||
a.id.toLowerCase().includes(query)
);
currentPage = 1;
renderAssetTable(filtered);
});
statusFilter.addEventListener('change', (e) => {
const status = e.target.value;
const filtered = status === 'all' ? assetData : assetData.filter(a => a.status === status);
currentPage = 1;
renderAssetTable(filtered);
});
document.getElementById('prevPage').addEventListener('click', () => {
if (currentPage > 1) {
currentPage--;
renderAssetTable();
}
});
document.getElementById('nextPage').addEventListener('click', () => {
const totalPages = Math.ceil(assetData.length / itemsPerPage);
if (currentPage < totalPages) {
currentPage++;
renderAssetTable();
}
});
// Escalation slider effect
document.getElementById('escalationSlider').addEventListener('input', (e) => {
const level = e.target.value;
scenarioData.nodes.forEach(node => {
if (node.level >= level) {
node.status = 'critical';
} else if (node.level >= level - 1) {
node.status = 'elevated';
} else {
node.status = 'stable';
}
});
});
// =====================
// Initialize
// =====================
renderScenarioTree();
renderAssetTable();
renderAssetBreakdown();
renderJurisdictionBreakdown();
renderTemplateList();
renderVariableList();
</script>
</body>
</html>
Key Features Implemented
1. Scenario Trees Module
- Interactive node-based visualization showing sanction escalation paths
- Color-coded risk levels (critical/elevated/stable) with probability percentages
- Configurable parameters: region selection, escalation slider, sanction type checkboxes
- Real-time impact projections showing assets at risk, counterparty exposure, and compliance readiness
2. Frozen Asset Accounting
- Summary cards with key metrics (total frozen, restricted accounts, pending review, released)
- Searchable/filterable asset registry with status badges
- Breakdown charts by asset type and jurisdiction exposure
- Pagination for large datasets
3. Investor Messaging Templates
- Pre-built templates for different audiences (institutional, retail, board, regulators)
- Dynamic variable insertion - click variables to add them to the message
- Preview mode that renders variables with sample data
- Regulatory framework selection (OFAC, EU, UK, UN)
- Copy to clipboard functionality
Design Highlights
- Dark professional aesthetic inspired by financial terminals
- Gold/amber accent color conveying the seriousness of sanctions work
- Subtle grid background with radial glow for depth
- Animated scan line effect for that "situation room" feel
- Staggered entrance animations for visual hierarchy
- Fully responsive layout that works on mobile and desktop