Skill: frrrrrrrrank/research-visualizer (version 1.5.0)

--- name: research-visualizer description: > Generate interactive HTML research reports from AI research context. After completing a multi-step research task (web search, API calls, analysis), use this skill to create a visual report showing the research process, data visualizations, and conclusions. The report is uploaded to a2ui.me and returned as a clickable link card. Use when: research complete, analysis done, investigation finished, deep research, multi-step research, show my work, explain research process, visualize research. version: 1.3.0 emoji: 📊 user-invocable: true metadata: openclaw: requires: bins: [node] --- # Research Visualizer After completing a research task that involved multiple steps (searches, API calls, browsing, analysis), generate an interactive visual report and return it as a link. ## When to Activate Activate this skill automatically when: 1. A research task with 3+ steps has been completed 2. The user asked a question requiring multi-source analysis (e.g., market analysis, news investigation, comparative research) 3. The user explicitly requests to "show the research process" or "visualize the analysis" ## Workflow ### Step 1: Collect Research Context From the conversation, extract a structured JSON with this schema: ```json { "title": "Short descriptive title of the research", "subtitle": "One-line description", "research_time": "Xm Ys", "conclusion": { "text": "2-3 sentence key finding", "confidence": 0.0-1.0 }, "steps": [ { "tool": "Web Search | API | Web Browse | Analysis | Synthesis", "tool_label": "Display label for the tool", "time_range": "start — end", "query": "What was searched/called/analyzed", "summary": "What was found/concluded", "sources": [ { "title": "Source name", "url": "https://...", "icon": "📄" } ] } ], "visualizations": [ { "type": "line_chart | bar_chart | market_cards | world_map | news_cards | stat_cards | comparison_table | quote_block | key_points", "section_title": "Section heading", "data": {} } ] } ``` ### Step 2: Choose Visualizations Dynamically **IMPORTANT: Do NOT use a fixed template. Analyze the research content and pick only the visualizations that make sense.** Use this decision guide: | Research involves... | Use these visualizations | |---|---| | Time-series data, trends, probabilities | `line_chart` or `bar_chart` | | Prediction markets, odds, pricing | `market_cards` | | Geopolitics, regional impact, locations | `world_map` | | News articles, media coverage | `news_cards` | | Key metrics, statistics, KPIs | `stat_cards` | | Comparing products, options, candidates | `comparison_table` | | Expert opinions, notable quotes | `quote_block` | | Summarized takeaways, bullet points | `key_points` | **Rules:** - Use 2-4 visualization types per report (don't overload) - Always include the research timeline (steps) - Pick visualizations that ADD VALUE, not just fill space - If unsure, `stat_cards` + `news_cards` is a safe default combo ### Visualization Data Schemas - **line_chart**: Time-series data, trends, probability changes ```json { "title": "Chart Title", "y_format": "percent", "y_min": 0, "y_max": 100, "x_labels": ["Label1", "Label2"], "series": [{ "name": "Series Name", "values": [10, 20, 30] }] } ``` - **bar_chart**: Categorical comparisons, rankings ```json { "title": "Chart Title", "y_format": "number", "bars": [{ "label": "Category A", "value": 85, "color": "#00d2a0" }, { "label": "Category B", "value": 62, "color": "#6c5ce7" }] } ``` - **market_cards**: Prediction markets, pricing, comparisons ```json [{ "name": "Market Name", "yes_price": 85, "no_price": 15, "volume": "128M", "change_7d": 3.2 }] ``` - **world_map**: Geopolitical analysis, regional impacts ```json { "regions": [{ "id": "united_states|europe|east_asia|...", "name": "Display Name", "info": "Impact description" }] } ``` Valid region IDs: north_america, united_states, canada, mexico, south_america, europe, africa, russia, middle_east, east_asia, china, southeast_asia, australia - **news_cards**: Related news, source citations ```json [{ "title": "Headline", "source": "Publisher", "date": "Mar 28, 2026", "sentiment": "positive|negative|neutral|warning", "tag": "Category", "url": "https://..." }] ``` - **stat_cards**: Key metrics and statistics (use for any numerical highlights) ```json [{ "label": "Total Volume", "value": "$4.2B", "change": "+12.5%", "trend": "up|down|neutral", "icon": "💰" }] ``` - **comparison_table**: Side-by-side comparisons ```json { "headers": ["Feature", "Option A", "Option B"], "rows": [["Price", "$10/mo", "$25/mo"], ["Users", "5", "Unlimited"]], "highlight_col": 1 } ``` - **quote_block**: Notable quotes from sources ```json [{ "text": "The quote text here", "author": "Person Name", "role": "Title / Organization", "url": "https://..." }] ``` - **key_points**: Bullet-point takeaways with icons ```json [{ "icon": "✅", "title": "Point Title", "text": "Explanation of the point" }] ``` ### Step 3: Generate and Upload Save the JSON to a temp file, then run: ```bash node {baseDir}/scripts/generate-report.js --input /tmp/research-data.json --output /tmp/report.html node {baseDir}/scripts/upload-report.js --file /tmp/report.html ``` The upload script automatically: 1. Encrypts the HTML with AES-256-GCM (key never touches the server) 2. Uploads the encrypted viewer page to R2 3. Outputs the full URL with the decryption key in the fragment (`#key=...`) **Privacy guarantee**: The URL fragment (`#key=...`) is never sent to the server. Only the person with the complete URL can view the report. Return the URL to the user as: ``` 📊 Research Report Ready [Title of Research](https://r.a2ui.me/r/xxxxx.html#key=yyy) 6 steps · 14 sources · 87% confidence 🔒 End-to-end encrypted — only this link can decrypt ``` ### Step 4: Local Fallback If no upload credentials are set, the report saves locally to `{baseDir}/output/`. Inform the user: ``` 📊 Research report saved locally: file:///path/to/output/report.html#key=yyy (Set A2UI_R2_BUCKET to enable cloud hosting at r.a2ui.me) ``` ### Step 5: No-encrypt option If the user explicitly wants a public (unencrypted) report, add `--no-encrypt`: ```bash node {baseDir}/scripts/upload-report.js --file /tmp/report.html --no-encrypt ``` ## Important - Always include ALL research steps, not just the final answer - Include real source URLs whenever available - Set confidence based on source agreement (high if multiple sources agree, lower if contradictory) - The report should make the research process transparent and verifiable - Keep step summaries concise but informative (1-2 sentences each)

path: article-wechat.md
content: # 我做了一个OpenClaw技能：让AI的"深度研究"过程看得见

你有没有遇到过这种情况：

让AI帮你研究一个问题，比如"帮我看看Polymarket上胜率最高的预测市场"，等了一会儿，AI给你回了一段结论。

你看了看，心里想：**这结论靠谱吗？它真的去查了吗？查了哪些资料？怎么分析的？**

尤其是在IM里（Telegram、微信等），你只能看到最终那段文字。至于AI到底做了什么——搜了什么、看了几个网页、对比了哪些数据——全是黑盒。

---

## 问题：AI研究的"最后一公里"

我日常用OpenClaw做各种研究分析。它确实会联网搜索、调API、浏览网页、综合分析。但有个根本问题：

**整个研究过程，用户看不到。**

你不知道它搜了5个来源还是50个。你不知道它是真的分析了数据还是在编。你更不知道那些数据从哪来的，能不能追溯。

在桌面端还好，你可以看到工具调用日志。但在手机上的Telegram里？你只有一段文字。

---

## 解决方案：research-visualizer

所以我做了这个技能。它的逻辑很简单：

> AI做完研究之后，自动把整个研究过程生成一个**可交互的可视化网页**，给你一个链接，点开就能看。

点开这个链接，你能看到：

**研究时间线** — AI每一步做了什么，搜了什么关键词，从哪个网站拿到了什么信息，每一步都清清楚楚。

**数据可视化** — 根据研究内容自动选择合适的图表：
- 趋势折线图（概率变化、价格走势）
- 柱状对比图（分类排名）
- 预测市场卡片（赔率、成交量、涨跌）
- 世界地图（地缘分析、区域影响）
- 新闻卡片（相关报道、情绪标注）
- 统计数据卡片（关键指标、KPI）
- 对比表格（方案比较、产品对比）
- 关键要点（总结条目）

一共9种可视化组件，AI会根据研究内容**动态选择**最合适的2-4种组合。不是固定模板，是真的"看内容出牌"。

**隐私保护** — 报告使用AES-256-GCM端到端加密。解密密钥只在URL的`#`后面，不经过任何服务器。即使有人拿到了服务器上的文件，看到的也只是一堆密文。只有拿到完整链接的人才能查看。

---

## 举个例子

你在Telegram里问AI：

> 帮我分析一下最近中美关税对东南亚制造业的影响

AI会：
1. 搜索最新新闻和分析报告
2. 浏览相关数据来源
3. 综合多方观点
4. 形成结论

然后自动生成一个报告链接：

```
📊 Research Report Ready
中美关税对东南亚制造业影响分析
https://r.a2ui.me/r/xxxxx.html#key=yyy
8 steps · 12 sources · 82% confidence
🔒 End-to-end encrypted
```

点开链接，你看到的不是一段干巴巴的文字，而是一个完整的研究报告页面：带时间线、带世界地图（标注了受影响区域）、带新闻卡片（正面/负面情绪标注）、带关键数据统计。

手机上看也很舒服，做了完整的移动端适配。

---

## 如何安装（一句话）

如果你在用OpenClaw，只需要给你的AI发这一句话：

> **帮我安装clawhub上的research-visualizer技能，安装完成后，以后每次你帮我做深度研究分析的时候，自动生成一个可视化的研究报告链接给我看。**

就这样。复制粘贴，发送，搞定。

不需要配置任何环境变量。不需要装任何额外工具。不需要懂技术。

装完之后，以后你再让AI做深度研究，它就会自动在回答的同时附上一个可视化报告链接。

---

## 技术细节（给感兴趣的人）

对于想了解技术实现的朋友：

- **生成引擎**：Node.js脚本，根据JSON数据动态生成自包含的HTML页面（无外部依赖）
- **加密方案**：AES-256-GCM，密钥通过URL fragment（#key=...）传递，fragment不会被发送到服务器
- **存储**：Cloudflare R2，通过公共API上传，无需用户配置
- **自动清理**：报告30天后自动过期删除
- **开源**：GitHub上完全开源

技术栈选择的核心原则是**零配置**。用户不应该需要配任何东西，装上就能用。

---

## 为什么要做这个

AI能力越来越强，但"可信度"一直是个问题。用户无法验证AI是否真的做了研究、研究质量如何。

这个技能试图解决的就是这个问题：**让AI的思考过程透明化**。

不是给你一个结论让你信或不信。而是把整个研究过程摊开来，搜了什么、看了什么、怎么得出的结论，你自己判断。

每个来源都有链接，你可以点进去看原文。每一步都有记录，你可以追溯整个推理链条。

---

## 链接

- ClawHub：`clawhub install research-visualizer`
- GitHub：https://github.com/Frrrrrrrrank/openclaw-research-viz

如果你觉得有用，欢迎安装试试。有任何反馈欢迎留言。


path: demo/generated-test.html
content: <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Research Report — Polymarket Top Opportunities Analysis</title>
<meta property="og:title" content="Polymarket Top Opportunities Analysis">
<meta property="og:description" content="AI Research Report — 6 steps, 11 sources analyzed">
<meta name="twitter:card" content="summary">
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0a0a0f; --bg-card: #12121a; --bg-card-hover: #1a1a25;
  --border: #1e1e2e; --text: #e0e0e8; --text-dim: #8888a0; --text-muted: #555568;
  --accent: #6c5ce7; --accent-glow: rgba(108,92,231,0.3);
  --green: #00d2a0; --green-dim: rgba(0,210,160,0.15);
  --red: #ff6b6b; --red-dim: rgba(255,107,107,0.15);
  --blue: #4da6ff; --yellow: #ffd93d; --orange: #ff9f43;
  --radius: 12px; --radius-sm: 8px;
}
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; }
.container { max-width: 900px; margin: 0 auto; padding: 20px 16px 60px; }

.header { text-align: center; padding: 40px 0 30px; }
.header-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-glow); border: 1px solid rgba(108,92,231,0.4); border-radius: 20px; padding: 4px 14px; font-size: 12px; color: var(--accent); margin-bottom: 16px; letter-spacing: 0.5px; }
.header-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:0.4} }
.header h1 { font-size: clamp(22px,5vw,32px); font-weight: 700; margin-bottom: 8px; background: linear-gradient(135deg,#fff,#a0a0c0); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.header .subtitle { color: var(--text-dim); font-size: 14px; }
.header .meta { display: flex; justify-content: center; gap: 20px; margin-top: 16px; font-size: 12px; color: var(--text-muted); }
.header .meta span { display: flex; align-items: center; gap: 4px; }

.conclusion-card { background: linear-gradient(135deg,rgba(108,92,231,0.12),rgba(0,210,160,0.08)); border: 1px solid rgba(108,92,231,0.3); border-radius: var(--radius); padding: 24px; margin-bottom: 32px; position: relative; overflow: hidden; }
.conclusion-card::before { content: ''; position: absolute; top:0; left:0; right:0; height:2px; background: linear-gradient(90deg,var(--accent),var(--green)); }
.conclusion-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent); margin-bottom: 10px; }
.conclusion-text { font-size: 18px; font-weight: 600; line-height: 1.5; margin-bottom: 16px; }
.confidence-bar { display: flex; align-items: center; gap: 12px; }
.confidence-bar .label { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.confidence-track { flex: 1; height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.confidence-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg,var(--accent),var(--green)); transition: width 1.5s ease; }
.confidence-val { font-size: 14px; font-weight: 600; color: var(--green); }

.section { margin-bottom: 32px; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.timeline { position: relative; }
.timeline::before { content: ''; position: absolute; left: 18px; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg,var(--accent),var(--border)); }
.step { position: relative; padding-left: 48px; padding-bottom: 24px; cursor: pointer; }
.step:last-child { padding-bottom: 0; }
.step-dot { position: absolute; left: 10px; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); display: flex; align-items: center; justify-content: center; z-index: 1; transition: all 0.3s; }
.step-dot .inner { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); transition: all 0.3s; }
.step.active .step-dot { border-color: var(--green); box-shadow: 0 0 12px var(--green-dim); }
.step.active .step-dot .inner { background: var(--green); }
.step-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; transition: all 0.3s; }
.step:hover .step-card { background: var(--bg-card-hover); border-color: rgba(108,92,231,0.3); }
.step-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.step-tool { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; padding: 3px 10px; border-radius: 12px; font-weight: 600; }
.step-tool.search { background: rgba(77,166,255,0.12); color: var(--blue); }
.step-tool.api { background: rgba(0,210,160,0.12); color: var(--green); }
.step-tool.analyze { background: rgba(108,92,231,0.12); color: var(--accent); }
.step-tool.browse { background: rgba(255,159,67,0.12); color: var(--orange); }
.step-time { font-size: 11px; color: var(--text-muted); }
.step-query { font-size: 13px; color: var(--text-dim); margin-bottom: 6px; font-style: italic; }
.step-summary { font-size: 14px; line-height: 1.6; }
.step-details { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, margin 0.3s ease; }
.step-details.open { max-height: 500px; margin-top: 12px; }
.step-sources { padding-top: 12px; border-top: 1px solid var(--border); }
.step-sources .src-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.source-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; color: var(--blue); text-decoration: none; }
.source-item:hover { text-decoration: underline; }
.source-icon { width: 16px; height: 16px; border-radius: 4px; background: rgba(77,166,255,0.12); display: flex; align-items: center; justify-content: center; font-size: 9px; }

.chart-container { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.chart-title { font-size: 15px; font-weight: 600; }
.chart-legend { display: flex; gap: 16px; font-size: 12px; flex-wrap: wrap; }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.chart-svg { width: 100%; height: auto; }

.market-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 12px; }
.market-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; transition: all 0.3s; }
.market-card:hover { border-color: rgba(108,92,231,0.3); transform: translateY(-2px); }
.market-name { font-size: 14px; font-weight: 600; margin-bottom: 8px; line-height: 1.4; }
.market-odds { display: flex; gap: 8px; margin-bottom: 10px; }
.odds-tag { font-size: 20px; font-weight: 700; }
.odds-tag.yes { color: var(--green); }
.odds-tag.no { color: var(--red); }
.odds-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; }
.market-volume { font-size: 12px; color: var(--text-muted); }
.market-change { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 10px; }
.market-change.up { background: var(--green-dim); color: var(--green); }
.market-change.down { background: var(--red-dim); color: var(--red); }

.map-container { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; position: relative; }
.map-svg { width: 100%; height: auto; }
.map-svg path { fill: #1a1a2e; stroke: #2a2a40; stroke-width: 0.5; transition: fill 0.3s; }
.map-svg path.highlight { fill: rgba(108,92,231,0.4); stroke: var(--accent); }
.map-svg path.highlight:hover { fill: rgba(108,92,231,0.6); }
.map-tooltip { position: absolute; background: rgba(18,18,26,0.95); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; pointer-events: none; opacity: 0; transition: opacity 0.2s; z-index: 10; max-width: 220px; }
.map-tooltip.visible { opacity: 1; }
.map-legend { display: flex; gap: 16px; margin-top: 12px; justify-content: center; flex-wrap: wrap; }
.map-legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-dim); }
.map-legend-dot { width: 10px; height: 10px; border-radius: 3px; }

.news-list { display: flex; flex-direction: column; gap: 10px; }
.news-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; gap: 14px; align-items: flex-start; transition: all 0.3s; text-decoration: none; color: inherit; }
.news-item:hover { border-color: rgba(108,92,231,0.3); background: var(--bg-card-hover); }
.news-sentiment { flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.news-sentiment.positive { background: var(--green-dim); }
.news-sentiment.negative { background: var(--red-dim); }
.news-sentiment.neutral { background: rgba(255,255,255,0.06); }
.news-body { flex: 1; }
.news-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; line-height: 1.4; }
.news-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 12px; }
.news-tag { display: inline-block; background: rgba(108,92,231,0.12); color: var(--accent); font-size: 11px; padding: 2px 8px; border-radius: 8px; margin-top: 6px; }

.footer { text-align: center; padding: 32px 0 16px; font-size: 12px; color: var(--text-muted); }
.footer a { color: var(--accent); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

.fade-in { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

@media (max-width:600px) {
  .container { padding: 12px 12px 40px; }
  .header { padding: 24px 0 20px; }
  .conclusion-card { padding: 18px; }
  .conclusion-text { font-size: 16px; }
  .market-grid { grid-template-columns: 1fr; }
}
</style>
</head>
<body>
<div class="container">
  <div class="header fade-in">
    <div class="header-badge"><span class="dot"></span> Research Complete</div>
    <h1>Polymarket Top Opportunities Analysis</h1>
    <p class="subtitle">AI-powered deep research into highest probability markets</p>
    <div class="meta">
      <span>🕐 3m 42s</span>
      <span>📊 6 steps completed</span>
      <span>🔗 11 sources analyzed</span>
    </div>
  </div>

  
  <div class="conclusion-card fade-in">
    <div class="conclusion-label">Key Finding</div>
    <div class="conclusion-text">The three highest-confidence markets on Polymarket are US Midterm outcomes (Senate control at 78% YES), Fed rate decision for June 2026 (hold at 85%), and UEFA Champions League winner (Real Madrid at 32%). Combined analysis across news, polling data, and market volume suggests the Fed rate hold is the safest play.</div>
    
    <div class="confidence-bar">
      <span class="label">Research Confidence</span>
      <div class="confidence-track">
        <div class="confidence-fill" style="width:0%" data-target="87"></div>
      </div>
      <span class="confidence-val">87%</span>
    </div>
  </div>

  
  <div class="section fade-in">
    <div class="section-title">Research Process</div>
    <div class="timeline">
      
      <div class="step active" onclick="toggleDetails(this)">
        <div class="step-dot"><div class="inner"></div></div>
        <div class="step-card">
          <div class="step-header">
            <span class="step-tool search">🔍 Web Search</span>
            <span class="step-time">0:00 — 0:12</span>
          </div>
          <div class="step-query">Polymarket highest volume markets March 2026</div>
          <div class="step-summary">Found top 20 markets by trading volume. US political markets dominate with $450M+ total volume. Identified 3 categories: Politics, Finance, Sports.</div>
          
      <div class="step-details">
        <div class="step-sources">
          <div class="src-label">Sources</div>
          <a class="source-item" href="https://polymarket.com" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> Polymarket — Top Markets Dashboard
      </a>
<a class="source-item" href="https://theblock.co" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> The Block — Prediction Market Volumes Surge
      </a>
<a class="source-item" href="https://coindesk.com" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> CoinDesk — Polymarket March 2026 Overview
      </a>
        </div>
      </div>
        </div>
      </div>

      <div class="step active" onclick="toggleDetails(this)">
        <div class="step-dot"><div class="inner"></div></div>
        <div class="step-card">
          <div class="step-header">
            <span class="step-tool api">⚡ API Call</span>
            <span class="step-time">0:12 — 0:28</span>
          </div>
          <div class="step-query">Polymarket CLOB API — fetch top 50 markets by volume</div>
          <div class="step-summary">Retrieved real-time odds data for 50 markets. Filtered to markets with &gt;$10M volume and &gt;70% YES probability for &quot;safest bet&quot; analysis.</div>
          
      <div class="step-details">
        <div class="step-sources">
          <div class="src-label">Sources</div>
          <a class="source-item" href="https://docs.polymarket.com" target="_blank" rel="noopener">
        <span class="source-icon">🔌</span> Polymarket CLOB API v2
      </a>
        </div>
      </div>
        </div>
      </div>

      <div class="step active" onclick="toggleDetails(this)">
        <div class="step-dot"><div class="inner"></div></div>
        <div class="step-card">
          <div class="step-header">
            <span class="step-tool browse">🌐 Web Browse</span>
            <span class="step-time">0:28 — 1:05</span>
          </div>
          <div class="step-query">Browse FiveThirtyEight, Reuters, Bloomberg for corroborating data</div>
          <div class="step-summary">Cross-referenced prediction market odds with polling averages and expert forecasts. Senate control prediction aligns with FiveThirtyEight model (76% vs 78%).</div>
          
      <div class="step-details">
        <div class="step-sources">
          <div class="src-label">Sources</div>
          <a class="source-item" href="https://fivethirtyeight.com" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> FiveThirtyEight — 2026 Senate Forecast
      </a>
<a class="source-item" href="https://reuters.com" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> Reuters — Fed Rate Decision Preview
      </a>
<a class="source-item" href="https://bloomberg.com" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> Bloomberg — Champions League Odds Analysis
      </a>
        </div>
      </div>
        </div>
      </div>

      <div class="step active" onclick="toggleDetails(this)">
        <div class="step-dot"><div class="inner"></div></div>
        <div class="step-card">
          <div class="step-header">
            <span class="step-tool search">🔍 Web Search</span>
            <span class="step-time">1:05 — 1:35</span>
          </div>
          <div class="step-query">Fed June 2026 rate decision forecast CME FedWatch</div>
          <div class="step-summary">CME FedWatch tool shows 88.2% probability of rate hold, closely aligned with Polymarket's 85%. Market consensus is very strong — 12 of 14 surveyed economists predict hold.</div>
          
      <div class="step-details">
        <div class="step-sources">
          <div class="src-label">Sources</div>
          <a class="source-item" href="https://cmegroup.com/fedwatch" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> CME FedWatch Tool
      </a>
<a class="source-item" href="https://cnbc.com" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> CNBC — Economist Survey: June FOMC
      </a>
        </div>
      </div>
        </div>
      </div>

      <div class="step active" onclick="toggleDetails(this)">
        <div class="step-dot"><div class="inner"></div></div>
        <div class="step-card">
          <div class="step-header">
            <span class="step-tool analyze">🧠 Analysis</span>
            <span class="step-time">1:35 — 2:50</span>
          </div>
          <div class="step-query">Cross-correlate data sources, identify geopolitical risk factors</div>
          <div class="step-summary">Mapped geopolitical events that could shift odds: US-China trade talks (impact on Fed), EU elections (impact on Champions League scheduling), key Senate primaries in swing states. Risk-adjusted confidence: 87%.</div>
          
      <div class="step-details">
        <div class="step-sources">
          <div class="src-label">Sources</div>
          <a class="source-item" href="#" target="_blank" rel="noopener">
        <span class="source-icon">🧠</span> Internal cross-reference analysis
      </a>
<a class="source-item" href="https://cfr.org" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> Council on Foreign Relations — US-China Trade Timeline
      </a>
        </div>
      </div>
        </div>
      </div>

      <div class="step active" onclick="toggleDetails(this)">
        <div class="step-dot"><div class="inner"></div></div>
        <div class="step-card">
          <div class="step-header">
            <span class="step-tool analyze">✅ Synthesis</span>
            <span class="step-time">2:50 — 3:42</span>
          </div>
          <div class="step-query">Generate final recommendation with confidence scoring</div>
          <div class="step-summary">Ranked top 3 markets by risk-adjusted confidence. Fed rate hold (85% YES) is safest due to strong multi-source consensus. Senate control (78% YES) has highest potential return. Champions League (32% YES for Real Madrid) is highest risk/reward.</div>
          
        </div>
      </div>
    </div>
  </div>

  
    <div class="section fade-in">
      <div class="section-title">Probability Trends (Last 30 Days)</div>
      
    <div class="chart-container">
      <div class="chart-header">
        <div class="chart-title">Market Odds Movement</div>
        <div class="chart-legend"><span><span class="legend-dot" style="background:#00d2a0"></span> Fed Rate Hold</span>
<span><span class="legend-dot" style="background:#6c5ce7"></span> Senate Control</span>
<span><span class="legend-dot" style="background:#ff9f43"></span> Real Madrid UCL</span></div>
      </div>
      <svg class="chart-svg" viewBox="0 0 800 300" preserveAspectRatio="xMidYMid meet">
        <defs><linearGradient id="greenGrad" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0%" stop-color="#00d2a0" stop-opacity="0.2"/>
      <stop offset="100%" stop-color="#00d2a0" stop-opacity="0"/>
    </linearGradient>
<linearGradient id="purpleGrad" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0%" stop-color="#6c5ce7" stop-opacity="0.2"/>
      <stop offset="100%" stop-color="#6c5ce7" stop-opacity="0"/>
    </linearGradient>
<linearGradient id="orangeGrad" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0%" stop-color="#ff9f43" stop-opacity="0.2"/>
      <stop offset="100%" stop-color="#ff9f43" stop-opacity="0"/>
    </linearGradient></defs>
        <line x1="55" y1="270" x2="780" y2="270" stroke="#1e1e2e" stroke-width="1"/><text x="47" y="274" fill="#555568" font-size="11" text-anchor="end">25%</text><line x1="55" y1="222" x2="780" y2="222" stroke="#1e1e2e" stroke-width="1"/><text x="47" y="226" fill="#555568" font-size="11" text-anchor="end">39%</text><line x1="55" y1="174" x2="780" y2="174" stroke="#1e1e2e" stroke-width="1"/><text x="47" y="178" fill="#555568" font-size="11" text-anchor="end">53%</text><line x1="55" y1="126" x2="780" y2="126" stroke="#1e1e2e" stroke-width="1"/><text x="47" y="130" fill="#555568" font-size="11" text-anchor="end">67%</text><line x1="55" y1="78" x2="780" y2="78" stroke="#1e1e2e" stroke-width="1"/><text x="47" y="82" fill="#555568" font-size="11" text-anchor="end">81%</text><line x1="55" y1="30" x2="780" y2="30" stroke="#1e1e2e" stroke-width="1"/><text x="47" y="34" fill="#555568" font-size="11" text-anchor="end">95%</text>
        <text x="55" y="295" fill="#555568" font-size="11" text-anchor="middle">Mar 1</text><text x="236.25" y="295" fill="#555568" font-size="11" text-anchor="middle">Mar 8</text><text x="417.5" y="295" fill="#555568" font-size="11" text-anchor="middle">Mar 15</text><text x="598.75" y="295" fill="#555568" font-size="11" text-anchor="middle">Mar 22</text><text x="780" y="295" fill="#555568" font-size="11" text-anchor="middle">Mar 31</text>
        <path d="M55,81.42857142857144 L158.57142857142856,74.57142857142858 L262.1428571428571,78 L365.7142857142857,67.71428571428572 L469.2857142857143,71.14285714285714 L572.8571428571429,67.71428571428572 L676.4285714285714,64.2857142857143 L780,64.2857142857143 L780,270 L55,270 Z"
        fill="url(#greenGrad)" opacity="0.5"/><polyline points="55,81.42857142857144 158.57142857142856,74.57142857142858 262.1428571428571,78 365.7142857142857,67.71428571428572 469.2857142857143,71.14285714285714 572.8571428571429,67.71428571428572 676.4285714285714,64.2857142857143 780,64.2857142857143" fill="none" stroke="#00d2a0" stroke-width="2.5"
      stroke-linecap="round" stroke-linejoin="round"/><circle cx="780" cy="64.2857142857143" r="5" fill="#00d2a0" opacity="0.9"/><text x="760" y="54.285714285714306" fill="#00d2a0" font-size="12" font-weight="600">85%</text><path d="M55,122.57142857142856 L158.57142857142856,115.7142857142857 L262.1428571428571,119.14285714285714 L365.7142857142857,105.42857142857142 L469.2857142857143,98.57142857142856 L572.8571428571429,95.14285714285714 L676.4285714285714,91.71428571428572 L780,88.28571428571428 L780,270 L55,270 Z"
        fill="url(#purpleGrad)" opacity="0.5"/><polyline points="55,122.57142857142856 158.57142857142856,115.7142857142857 262.1428571428571,119.14285714285714 365.7142857142857,105.42857142857142 469.2857142857143,98.57142857142856 572.8571428571429,95.14285714285714 676.4285714285714,91.71428571428572 780,88.28571428571428" fill="none" stroke="#6c5ce7" stroke-width="2.5"
      stroke-linecap="round" stroke-linejoin="round"/><circle cx="780" cy="88.28571428571428" r="5" fill="#6c5ce7" opacity="0.9"/><text x="760" y="78.28571428571428" fill="#6c5ce7" font-size="12" font-weight="600">78%</text><polyline points="55,259.7142857142857 158.57142857142856,256.2857142857143 262.1428571428571,266.57142857142856 365.7142857142857,252.85714285714286 469.2857142857143,256.2857142857143 572.8571428571429,249.42857142857142 676.4285714285714,252.85714285714286 780,246" fill="none" stroke="#ff9f43" stroke-width="2.5"
      stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="6,4"/><circle cx="780" cy="246" r="5" fill="#ff9f43" opacity="0.9"/><text x="760" y="236" fill="#ff9f43" font-size="12" font-weight="600">32%</text>
      </svg>
    </div>
    </div>

    <div class="section fade-in">
      <div class="section-title">Top Markets by Confidence</div>
      <div class="market-grid">
    
      <div class="market-card">
        <div class="market-name">🏛️ Fed Holds Rate at June 2026 FOMC</div>
        <div class="market-odds">
          <div><div class="odds-tag yes">85¢</div><div class="odds-label">YES</div></div>
          <div><div class="odds-tag no">15¢</div><div class="odds-label">NO</div></div>
        </div>
        <div class="market-volume">
          Vol: $128.5M &nbsp;·&nbsp;
          <span class="market-change up">↑ +3.2% 7d</span>
        </div>
      </div>

      <div class="market-card">
        <div class="market-name">🗳️ Democrats Control Senate After 2026 Midterms</div>
        <div class="market-odds">
          <div><div class="odds-tag yes">78¢</div><div class="odds-label">YES</div></div>
          <div><div class="odds-tag no">22¢</div><div class="odds-label">NO</div></div>
        </div>
        <div class="market-volume">
          Vol: $342.1M &nbsp;·&nbsp;
          <span class="market-change up">↑ +5.1% 7d</span>
        </div>
      </div>

      <div class="market-card">
        <div class="market-name">⚽ Real Madrid Wins UEFA Champions League 2026</div>
        <div class="market-odds">
          <div><div class="odds-tag yes">32¢</div><div class="odds-label">YES</div></div>
          <div><div class="odds-tag no">68¢</div><div class="odds-label">NO</div></div>
        </div>
        <div class="market-volume">
          Vol: $87.3M &nbsp;·&nbsp;
          <span class="market-change down">↓ -1.8% 7d</span>
        </div>
      </div>
  </div>
    </div>

    <div class="section fade-in">
      <div class="section-title">Geopolitical Impact Map</div>
      
    <div class="map-container">
      <div class="map-tooltip" id="mapTooltip"></div>
      <svg class="map-svg" viewBox="0 0 1000 500" preserveAspectRatio="xMidYMid meet">
        <path d="M150,80 L280,60 L300,100 L310,160 L290,200 L250,220 L200,200 L160,170 L130,130 Z" data-region="north_america"/>
<path class="highlight" d="M150,80 L280,60 L300,100 L310,160 L290,200 L250,220 L200,200 L160,170 L130,130 Z" data-region="United States" data-info="Key market: Senate Midterm Control (78% YES). 34 Senate seats up for election. Fed rate decision impacts USD globally." onmouseenter="showTooltip(event, this)" onmouseleave="hideTooltip()"/>
<path d="M150,30 L280,20 L300,60 L280,60 L150,80 L120,60 Z" data-region="canada"/>
<path d="M160,220 L250,220 L240,270 L200,290 L160,260 Z" data-region="mexico"/>
<path d="M230,300 L290,280 L310,330 L300,400 L270,440 L240,420 L220,370 Z" data-region="south_america"/>
<path class="highlight" d="M430,70 L530,50 L560,80 L550,130 L520,150 L470,140 L440,110 Z" data-region="Europe" data-info="UEFA Champions League market (Real Madrid 32%). EU economic conditions influence Fed policy decisions." onmouseenter="showTooltip(event, this)" onmouseleave="hideTooltip()"/>
<path d="M440,170 L530,160 L560,200 L550,320 L500,370 L450,340 L430,260 Z" data-region="africa"/>
<path d="M560,40 L780,30 L820,80 L800,120 L700,130 L600,120 L560,80 Z" data-region="russia"/>
<path d="M560,130 L630,120 L650,160 L620,190 L570,180 Z" data-region="middle_east"/>
<path class="highlight" d="M700,100 L800,90 L830,130 L810,180 L760,190 L720,170 L700,140 Z" data-region="East Asia" data-info="US-China trade negotiations could shift Fed rate expectations. Ongoing tariff discussions add volatility." onmouseenter="showTooltip(event, this)" onmouseleave="hideTooltip()"/>
<path d="M700,100 L800,90 L830,130 L810,180 L760,190 L720,170 L700,140 Z" data-region="china"/>
<path d="M740,200 L810,190 L840,230 L820,270 L770,260 L740,230 Z" data-region="southeast_asia"/>
<path d="M800,330 L880,310 L920,350 L900,400 L840,400 L800,370 Z" data-region="australia"/>

      </svg>
      <div class="map-legend">
        <div class="map-legend-item"><div class="map-legend-dot" style="background:rgba(108,92,231,0.5)"></div> High impact region</div>
        <div class="map-legend-item"><div class="map-legend-dot" style="background:#1a1a2e"></div> Low / indirect impact</div>
      </div>
    </div>
    </div>

    <div class="section fade-in">
      <div class="section-title">Key News &amp; Sources</div>
      <div class="news-list">
    
      <a class="news-item" href="#" target="_blank" rel="noopener">
        <div class="news-sentiment positive">📈</div>
        <div class="news-body">
          <div class="news-title">Fed Officials Signal Patience on Rate Cuts Amid Sticky Inflation</div>
          <div class="news-meta">
            <span>Reuters</span>
            <span>Mar 28, 2026</span>
          </div>
          <span class="news-tag">Fed Rate Decision</span>
        </div>
      </a>

      <a class="news-item" href="#" target="_blank" rel="noopener">
        <div class="news-sentiment positive">📈</div>
        <div class="news-body">
          <div class="news-title">New Polling Shows Democrats Leading in 4 of 6 Key Senate Races</div>
          <div class="news-meta">
            <span>FiveThirtyEight</span>
            <span>Mar 27, 2026</span>
          </div>
          <span class="news-tag">Senate Midterms</span>
        </div>
      </a>

      <a class="news-item" href="#" target="_blank" rel="noopener">
        <div class="news-sentiment neutral">📰</div>
        <div class="news-body">
          <div class="news-title">Champions League Quarter-Final Draw Sets Up Real Madrid vs. Man City</div>
          <div class="news-meta">
            <span>UEFA.com</span>
            <span>Mar 25, 2026</span>
          </div>
          <span class="news-tag">Champions League</span>
        </div>
      </a>

      <a class="news-item" href="#" target="_blank" rel="noopener">
        <div class="news-sentiment neutral">⚠️</div>
        <div class="news-body">
          <div class="news-title">US-China Trade Talks Stall Over Tech Export Controls</div>
          <div class="news-meta">
            <span>Bloomberg</span>
            <span>Mar 26, 2026</span>
          </div>
          <span class="news-tag">Geopolitical Risk</span>
        </div>
      </a>
  </div>
    </div>

  <div class="footer">
    <p>Generated by <a href="https://a2ui.me">OpenClaw Research Visualizer</a> · Powered by AI</p>
    <p style="margin-top:4px">This is an AI-generated research report. Not financial advice.</p>
  </div>
</div>

<script>
function toggleDetails(el){var d=el.querySelector('.step-details');if(d)d.classList.toggle('open')}
function showTooltip(e,el){var t=document.getElementById('mapTooltip'),r=el.getAttribute('data-region'),i=el.getAttribute('data-info');if(!i)return;t.innerHTML='<strong>'+r+'</strong><br/>'+i;t.classList.add('visible');var b=el.closest('.map-container').getBoundingClientRect();t.style.left=(e.clientX-b.left+10)+'px';t.style.top=(e.clientY-b.top-60)+'px'}
function hideTooltip(){document.getElementById('mapTooltip').classList.remove('visible')}
var obs=new IntersectionObserver(function(es){es.forEach(function(e){if(e.isIntersecting){e.target.classList.add('visible');obs.unobserve(e.target)}})},{threshold:0.1});
document.querySelectorAll('.fade-in').forEach(function(el){obs.observe(el)});
setTimeout(function(){var f=document.querySelector('.confidence-fill');if(f)f.style.width=f.dataset.target+'%'},500);
</script>
</body>
</html>

path: demo/mobile-test.html
content: <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Research Report — Polymarket Top Opportunities Analysis</title>
<meta property="og:title" content="Polymarket Top Opportunities Analysis">
<meta property="og:description" content="AI Research Report — 6 steps, 11 sources analyzed">
<meta name="twitter:card" content="summary">
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0a0a0f; --bg-card: #12121a; --bg-card-hover: #1a1a25;
  --border: #1e1e2e; --text: #e0e0e8; --text-dim: #8888a0; --text-muted: #555568;
  --accent: #6c5ce7; --accent-glow: rgba(108,92,231,0.3);
  --green: #00d2a0; --green-dim: rgba(0,210,160,0.15);
  --red: #ff6b6b; --red-dim: rgba(255,107,107,0.15);
  --blue: #4da6ff; --yellow: #ffd93d; --orange: #ff9f43;
  --radius: 12px; --radius-sm: 8px;
}
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; }
.container { max-width: 900px; margin: 0 auto; padding: 20px 16px 60px; }

.header { text-align: center; padding: 40px 0 30px; }
.header-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-glow); border: 1px solid rgba(108,92,231,0.4); border-radius: 20px; padding: 4px 14px; font-size: 12px; color: var(--accent); margin-bottom: 16px; letter-spacing: 0.5px; }
.header-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:0.4} }
.header h1 { font-size: clamp(22px,5vw,32px); font-weight: 700; margin-bottom: 8px; background: linear-gradient(135deg,#fff,#a0a0c0); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.header .subtitle { color: var(--text-dim); font-size: 14px; }
.header .meta { display: flex; justify-content: center; gap: 20px; margin-top: 16px; font-size: 12px; color: var(--text-muted); }
.header .meta span { display: flex; align-items: center; gap: 4px; }

.conclusion-card { background: linear-gradient(135deg,rgba(108,92,231,0.12),rgba(0,210,160,0.08)); border: 1px solid rgba(108,92,231,0.3); border-radius: var(--radius); padding: 24px; margin-bottom: 32px; position: relative; overflow: hidden; }
.conclusion-card::before { content: ''; position: absolute; top:0; left:0; right:0; height:2px; background: linear-gradient(90deg,var(--accent),var(--green)); }
.conclusion-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent); margin-bottom: 10px; }
.conclusion-text { font-size: 18px; font-weight: 600; line-height: 1.5; margin-bottom: 16px; }
.confidence-bar { display: flex; align-items: center; gap: 12px; }
.confidence-bar .label { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.confidence-track { flex: 1; height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.confidence-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg,var(--accent),var(--green)); transition: width 1.5s ease; }
.confidence-val { font-size: 14px; font-weight: 600; color: var(--green); }

.section { margin-bottom: 32px; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.timeline { position: relative; }
.timeline::before { content: ''; position: absolute; left: 18px; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg,var(--accent),var(--border)); }
.step { position: relative; padding-left: 48px; padding-bottom: 24px; cursor: pointer; }
.step:last-child { padding-bottom: 0; }
.step-dot { position: absolute; left: 10px; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); display: flex; align-items: center; justify-content: center; z-index: 1; transition: all 0.3s; }
.step-dot .inner { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); transition: all 0.3s; }
.step.active .step-dot { border-color: var(--green); box-shadow: 0 0 12px var(--green-dim); }
.step.active .step-dot .inner { background: var(--green); }
.step-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; transition: all 0.3s; }
.step:hover .step-card { background: var(--bg-card-hover); border-color: rgba(108,92,231,0.3); }
.step-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.step-tool { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; padding: 3px 10px; border-radius: 12px; font-weight: 600; }
.step-tool.search { background: rgba(77,166,255,0.12); color: var(--blue); }
.step-tool.api { background: rgba(0,210,160,0.12); color: var(--green); }
.step-tool.analyze { background: rgba(108,92,231,0.12); color: var(--accent); }
.step-tool.browse { background: rgba(255,159,67,0.12); color: var(--orange); }
.step-time { font-size: 11px; color: var(--text-muted); }
.step-query { font-size: 13px; color: var(--text-dim); margin-bottom: 6px; font-style: italic; }
.step-summary { font-size: 14px; line-height: 1.6; }
.step-details { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, margin 0.3s ease; }
.step-details.open { max-height: 500px; margin-top: 12px; }
.step-sources { padding-top: 12px; border-top: 1px solid var(--border); }
.step-sources .src-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.source-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; color: var(--blue); text-decoration: none; }
.source-item:hover { text-decoration: underline; }
.source-icon { width: 16px; height: 16px; border-radius: 4px; background: rgba(77,166,255,0.12); display: flex; align-items: center; justify-content: center; font-size: 9px; }

.chart-container { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.chart-title { font-size: 15px; font-weight: 600; }
.chart-legend { display: flex; gap: 16px; font-size: 12px; flex-wrap: wrap; }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.chart-svg { width: 100%; height: auto; }

.market-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 12px; }
.market-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; transition: all 0.3s; }
.market-card:hover { border-color: rgba(108,92,231,0.3); transform: translateY(-2px); }
.market-name { font-size: 14px; font-weight: 600; margin-bottom: 8px; line-height: 1.4; }
.market-odds { display: flex; gap: 8px; margin-bottom: 10px; }
.odds-tag { font-size: 20px; font-weight: 700; }
.odds-tag.yes { color: var(--green); }
.odds-tag.no { color: var(--red); }
.odds-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; }
.market-volume { font-size: 12px; color: var(--text-muted); }
.market-change { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 10px; }
.market-change.up { background: var(--green-dim); color: var(--green); }
.market-change.down { background: var(--red-dim); color: var(--red); }

.map-container { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; position: relative; }
.map-svg { width: 100%; height: auto; }
.map-svg path { fill: #1a1a2e; stroke: #2a2a40; stroke-width: 0.5; transition: fill 0.3s; }
.map-svg path.highlight { fill: rgba(108,92,231,0.4); stroke: var(--accent); }
.map-svg path.highlight:hover { fill: rgba(108,92,231,0.6); }
.map-tooltip { position: absolute; background: rgba(18,18,26,0.95); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; pointer-events: none; opacity: 0; transition: opacity 0.2s; z-index: 10; max-width: 220px; }
.map-tooltip.visible { opacity: 1; }
.map-legend { display: flex; gap: 16px; margin-top: 12px; justify-content: center; flex-wrap: wrap; }
.map-legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-dim); }
.map-legend-dot { width: 10px; height: 10px; border-radius: 3px; }

.news-list { display: flex; flex-direction: column; gap: 10px; }
.news-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; gap: 14px; align-items: flex-start; transition: all 0.3s; text-decoration: none; color: inherit; }
.news-item:hover { border-color: rgba(108,92,231,0.3); background: var(--bg-card-hover); }
.news-sentiment { flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.news-sentiment.positive { background: var(--green-dim); }
.news-sentiment.negative { background: var(--red-dim); }
.news-sentiment.neutral { background: rgba(255,255,255,0.06); }
.news-body { flex: 1; }
.news-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; line-height: 1.4; }
.news-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 12px; }
.news-tag { display: inline-block; background: rgba(108,92,231,0.12); color: var(--accent); font-size: 11px; padding: 2px 8px; border-radius: 8px; margin-top: 6px; }

.bar-chart { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: flex; align-items: center; gap: 12px; }
.bar-label { width: 120px; font-size: 13px; text-align: right; color: var(--text-dim); flex-shrink: 0; }
.bar-track { flex: 1; height: 28px; background: rgba(255,255,255,0.04); border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; display: flex; align-items: center; justify-content: flex-end; padding-right: 10px; font-size: 12px; font-weight: 600; color: #fff; min-width: 40px; transition: width 1s ease; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(160px,1fr)); gap: 12px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 16px; text-align: center; transition: all 0.3s; }
.stat-card:hover { border-color: rgba(108,92,231,0.3); transform: translateY(-2px); }
.stat-icon { font-size: 24px; margin-bottom: 8px; }
.stat-value { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.stat-change { font-size: 13px; font-weight: 600; padding: 2px 8px; border-radius: 10px; display: inline-block; }
.stat-change.up { background: var(--green-dim); color: var(--green); }
.stat-change.down { background: var(--red-dim); color: var(--red); }
.stat-change.neutral { background: rgba(255,255,255,0.06); color: var(--text-dim); }

.table-wrap { overflow-x: auto; }
.comp-table { width: 100%; border-collapse: collapse; background: var(--bg-card); border-radius: var(--radius); overflow: hidden; }
.comp-table th,.comp-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; }
.comp-table th { background: rgba(108,92,231,0.08); color: var(--accent); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.comp-table td.highlight,.comp-table th.highlight { background: rgba(0,210,160,0.08); }
.comp-table tr:last-child td { border-bottom: none; }

.quotes-list { display: flex; flex-direction: column; gap: 14px; }
.quote-card { background: var(--bg-card); border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; padding: 18px 20px; margin: 0; }
.quote-text { font-size: 15px; font-style: italic; line-height: 1.6; margin-bottom: 10px; color: var(--text); }
.quote-author { font-size: 13px; color: var(--text-dim); }
.quote-role { color: var(--text-muted); }

.key-points { display: flex; flex-direction: column; gap: 12px; }
.kp-item { display: flex; gap: 14px; align-items: flex-start; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.kp-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.kp-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.kp-text { font-size: 13px; color: var(--text-dim); line-height: 1.5; }

.footer { text-align: center; padding: 32px 0 16px; font-size: 12px; color: var(--text-muted); }
.footer a { color: var(--accent); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

.fade-in { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

@media (max-width:768px) {
  .container { padding: 16px 14px 48px; }
  .header { padding: 28px 0 20px; }
  .header h1 { font-size: 22px; }
  .header .meta { flex-wrap: wrap; gap: 10px; justify-content: center; }
  .conclusion-card { padding: 16px; }
  .conclusion-text { font-size: 15px; }
  .confidence-bar { flex-wrap: wrap; gap: 8px; }
  .confidence-bar .label { width: 100%; }

  /* Timeline */
  .timeline::before { left: 14px; }
  .step { padding-left: 40px; padding-bottom: 18px; }
  .step-dot { left: 6px; width: 16px; height: 16px; }
  .step-dot .inner { width: 6px; height: 6px; }
  .step-card { padding: 12px; }
  .step-header { flex-direction: column; align-items: flex-start; gap: 4px; }
  .step-summary { font-size: 13px; }

  /* Charts */
  .chart-container { padding: 14px; }
  .chart-header { flex-direction: column; align-items: flex-start; gap: 6px; }
  .chart-legend { font-size: 11px; }

  /* Cards */
  .market-grid { grid-template-columns: 1fr; gap: 10px; }
  .market-card { padding: 14px; }
  .market-name { font-size: 13px; }
  .odds-tag { font-size: 18px; }

  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 14px 12px; }
  .stat-value { font-size: 20px; }
  .stat-icon { font-size: 20px; margin-bottom: 6px; }

  /* News */
  .news-item { padding: 12px; gap: 10px; }
  .news-sentiment { width: 32px; height: 32px; font-size: 16px; }
  .news-title { font-size: 13px; }

  /* Map */
  .map-container { padding: 14px; }
  .map-legend { gap: 10px; }

  /* Bar chart */
  .bar-row { flex-direction: column; align-items: stretch; gap: 4px; }
  .bar-label { width: auto; text-align: left; font-size: 12px; }
  .bar-fill { font-size: 11px; }

  /* Table */
  .comp-table th, .comp-table td { padding: 8px 10px; font-size: 12px; }

  /* Quotes */
  .quote-card { padding: 14px 16px; }
  .quote-text { font-size: 14px; }

  /* Key points */
  .kp-item { padding: 12px; gap: 10px; }
  .kp-icon { font-size: 18px; }
  .kp-title { font-size: 13px; }
  .kp-text { font-size: 12px; }

  .section-title { font-size: 12px; }
  .footer { font-size: 11px; }
}

@media (max-width:380px) {
  .container { padding: 10px 10px 40px; }
  .header h1 { font-size: 19px; }
  .stat-grid { grid-template-columns: 1fr; }
  .header .meta { font-size: 11px; }
  .step { padding-left: 34px; }
  .timeline::before { left: 10px; }
  .step-dot { left: 2px; }
}
</style>
</head>
<body>
<div class="container">
  <div class="header fade-in">
    <div class="header-badge"><span class="dot"></span> Research Complete</div>
    <h1>Polymarket Top Opportunities Analysis</h1>
    <p class="subtitle">AI-powered deep research into highest probability markets</p>
    <div class="meta">
      <span>🕐 3m 42s</span>
      <span>📊 6 steps completed</span>
      <span>🔗 11 sources analyzed</span>
    </div>
  </div>

  
  <div class="conclusion-card fade-in">
    <div class="conclusion-label">Key Finding</div>
    <div class="conclusion-text">The three highest-confidence markets on Polymarket are US Midterm outcomes (Senate control at 78% YES), Fed rate decision for June 2026 (hold at 85%), and UEFA Champions League winner (Real Madrid at 32%). Combined analysis across news, polling data, and market volume suggests the Fed rate hold is the safest play.</div>
    
    <div class="confidence-bar">
      <span class="label">Research Confidence</span>
      <div class="confidence-track">
        <div class="confidence-fill" style="width:0%" data-target="87"></div>
      </div>
      <span class="confidence-val">87%</span>
    </div>
  </div>

  
  <div class="section fade-in">
    <div class="section-title">Research Process</div>
    <div class="timeline">
      
      <div class="step active" onclick="toggleDetails(this)">
        <div class="step-dot"><div class="inner"></div></div>
        <div class="step-card">
          <div class="step-header">
            <span class="step-tool search">🔍 Web Search</span>
            <span class="step-time">0:00 — 0:12</span>
          </div>
          <div class="step-query">Polymarket highest volume markets March 2026</div>
          <div class="step-summary">Found top 20 markets by trading volume. US political markets dominate with $450M+ total volume. Identified 3 categories: Politics, Finance, Sports.</div>
          
      <div class="step-details">
        <div class="step-sources">
          <div class="src-label">Sources</div>
          <a class="source-item" href="https://polymarket.com" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> Polymarket — Top Markets Dashboard
      </a>
<a class="source-item" href="https://theblock.co" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> The Block — Prediction Market Volumes Surge
      </a>
<a class="source-item" href="https://coindesk.com" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> CoinDesk — Polymarket March 2026 Overview
      </a>
        </div>
      </div>
        </div>
      </div>

      <div class="step active" onclick="toggleDetails(this)">
        <div class="step-dot"><div class="inner"></div></div>
        <div class="step-card">
          <div class="step-header">
            <span class="step-tool api">⚡ API Call</span>
            <span class="step-time">0:12 — 0:28</span>
          </div>
          <div class="step-query">Polymarket CLOB API — fetch top 50 markets by volume</div>
          <div class="step-summary">Retrieved real-time odds data for 50 markets. Filtered to markets with &gt;$10M volume and &gt;70% YES probability for &quot;safest bet&quot; analysis.</div>
          
      <div class="step-details">
        <div class="step-sources">
          <div class="src-label">Sources</div>
          <a class="source-item" href="https://docs.polymarket.com" target="_blank" rel="noopener">
        <span class="source-icon">🔌</span> Polymarket CLOB API v2
      </a>
        </div>
      </div>
        </div>
      </div>

      <div class="step active" onclick="toggleDetails(this)">
        <div class="step-dot"><div class="inner"></div></div>
        <div class="step-card">
          <div class="step-header">
            <span class="step-tool browse">🌐 Web Browse</span>
            <span class="step-time">0:28 — 1:05</span>
          </div>
          <div class="step-query">Browse FiveThirtyEight, Reuters, Bloomberg for corroborating data</div>
          <div class="step-summary">Cross-referenced prediction market odds with polling averages and expert forecasts. Senate control prediction aligns with FiveThirtyEight model (76% vs 78%).</div>
          
      <div class="step-details">
        <div class="step-sources">
          <div class="src-label">Sources</div>
          <a class="source-item" href="https://fivethirtyeight.com" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> FiveThirtyEight — 2026 Senate Forecast
      </a>
<a class="source-item" href="https://reuters.com" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> Reuters — Fed Rate Decision Preview
      </a>
<a class="source-item" href="https://bloomberg.com" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> Bloomberg — Champions League Odds Analysis
      </a>
        </div>
      </div>
        </div>
      </div>

      <div class="step active" onclick="toggleDetails(this)">
        <div class="step-dot"><div class="inner"></div></div>
        <div class="step-card">
          <div class="step-header">
            <span class="step-tool search">🔍 Web Search</span>
            <span class="step-time">1:05 — 1:35</span>
          </div>
          <div class="step-query">Fed June 2026 rate decision forecast CME FedWatch</div>
          <div class="step-summary">CME FedWatch tool shows 88.2% probability of rate hold, closely aligned with Polymarket's 85%. Market consensus is very strong — 12 of 14 surveyed economists predict hold.</div>
          
      <div class="step-details">
        <div class="step-sources">
          <div class="src-label">Sources</div>
          <a class="source-item" href="https://cmegroup.com/fedwatch" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> CME FedWatch Tool
      </a>
<a class="source-item" href="https://cnbc.com" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> CNBC — Economist Survey: June FOMC
      </a>
        </div>
      </div>
        </div>
      </div>

      <div class="step active" onclick="toggleDetails(this)">
        <div class="step-dot"><div class="inner"></div></div>
        <div class="step-card">
          <div class="step-header">
            <span class="step-tool analyze">🧠 Analysis</span>
            <span class="step-time">1:35 — 2:50</span>
          </div>
          <div class="step-query">Cross-correlate data sources, identify geopolitical risk factors</div>
          <div class="step-summary">Mapped geopolitical events that could shift odds: US-China trade talks (impact on Fed), EU elections (impact on Champions League scheduling), key Senate primaries in swing states. Risk-adjusted confidence: 87%.</div>
          
      <div class="step-details">
        <div class="step-sources">
          <div class="src-label">Sources</div>
          <a class="source-item" href="#" target="_blank" rel="noopener">
        <span class="source-icon">🧠</span> Internal cross-reference analysis
      </a>
<a class="source-item" href="https://cfr.org" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> Council on Foreign Relations — US-China Trade Timeline
      </a>
        </div>
      </div>
        </div>
      </div>

      <div class="step active" onclick="toggleDetails(this)">
        <div class="step-dot"><div class="inner"></div></div>
        <div class="step-card">
          <div class="step-header">
            <span class="step-tool analyze">✅ Synthesis</span>
            <span class="step-time">2:50 — 3:42</span>
          </div>
          <div class="step-query">Generate final recommendation with confidence scoring</div>
          <div class="step-summary">Ranked top 3 markets by risk-adjusted confidence. Fed rate hold (85% YES) is safest due to strong multi-source consensus. Senate control (78% YES) has highest potential return. Champions League (32% YES for Real Madrid) is highest risk/reward.</div>
          
        </div>
      </div>
    </div>
  </div>

  
    <div class="section fade-in">
      <div class="section-title">Probability Trends (Last 30 Days)</div>
      
    <div class="chart-container">
      <div class="chart-header">
        <div class="chart-title">Market Odds Movement</div>
        <div class="chart-legend"><span><span class="legend-dot" style="background:#00d2a0"></span> Fed Rate Hold</span>
<span><span class="legend-dot" style="background:#6c5ce7"></span> Senate Control</span>
<span><span class="legend-dot" style="background:#ff9f43"></span> Real Madrid UCL</span></div>
      </div>
      <svg class="chart-svg" viewBox="0 0 800 300" preserveAspectRatio="xMidYMid meet">
        <defs><linearGradient id="greenGrad" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0%" stop-color="#00d2a0" stop-opacity="0.2"/>
      <stop offset="100%" stop-color="#00d2a0" stop-opacity="0"/>
    </linearGradient>
<linearGradient id="purpleGrad" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0%" stop-color="#6c5ce7" stop-opacity="0.2"/>
      <stop offset="100%" stop-color="#6c5ce7" stop-opacity="0"/>
    </linearGradient>
<linearGradient id="orangeGrad" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0%" stop-color="#ff9f43" stop-opacity="0.2"/>
      <stop offset="100%" stop-color="#ff9f43" stop-opacity="0"/>
    </linearGradient></defs>
        <line x1="55" y1="270" x2="780" y2="270" stroke="#1e1e2e" stroke-width="1"/><text x="47" y="274" fill="#555568" font-size="11" text-anchor="end">25%</text><line x1="55" y1="222" x2="780" y2="222" stroke="#1e1e2e" stroke-width="1"/><text x="47" y="226" fill="#555568" font-size="11" text-anchor="end">39%</text><line x1="55" y1="174" x2="780" y2="174" stroke="#1e1e2e" stroke-width="1"/><text x="47" y="178" fill="#555568" font-size="11" text-anchor="end">53%</text><line x1="55" y1="126" x2="780" y2="126" stroke="#1e1e2e" stroke-width="1"/><text x="47" y="130" fill="#555568" font-size="11" text-anchor="end">67%</text><line x1="55" y1="78" x2="780" y2="78" stroke="#1e1e2e" stroke-width="1"/><text x="47" y="82" fill="#555568" font-size="11" text-anchor="end">81%</text><line x1="55" y1="30" x2="780" y2="30" stroke="#1e1e2e" stroke-width="1"/><text x="47" y="34" fill="#555568" font-size="11" text-anchor="end">95%</text>
        <text x="55" y="295" fill="#555568" font-size="11" text-anchor="middle">Mar 1</text><text x="236.25" y="295" fill="#555568" font-size="11" text-anchor="middle">Mar 8</text><text x="417.5" y="295" fill="#555568" font-size="11" text-anchor="middle">Mar 15</text><text x="598.75" y="295" fill="#555568" font-size="11" text-anchor="middle">Mar 22</text><text x="780" y="295" fill="#555568" font-size="11" text-anchor="middle">Mar 31</text>
        <path d="M55,81.42857142857144 L158.57142857142856,74.57142857142858 L262.1428571428571,78 L365.7142857142857,67.71428571428572 L469.2857142857143,71.14285714285714 L572.8571428571429,67.71428571428572 L676.4285714285714,64.2857142857143 L780,64.2857142857143 L780,270 L55,270 Z"
        fill="url(#greenGrad)" opacity="0.5"/><polyline points="55,81.42857142857144 158.57142857142856,74.57142857142858 262.1428571428571,78 365.7142857142857,67.71428571428572 469.2857142857143,71.14285714285714 572.8571428571429,67.71428571428572 676.4285714285714,64.2857142857143 780,64.2857142857143" fill="none" stroke="#00d2a0" stroke-width="2.5"
      stroke-linecap="round" stroke-linejoin="round"/><circle cx="780" cy="64.2857142857143" r="5" fill="#00d2a0" opacity="0.9"/><text x="760" y="54.285714285714306" fill="#00d2a0" font-size="12" font-weight="600">85%</text><path d="M55,122.57142857142856 L158.57142857142856,115.7142857142857 L262.1428571428571,119.14285714285714 L365.7142857142857,105.42857142857142 L469.2857142857143,98.57142857142856 L572.8571428571429,95.14285714285714 L676.4285714285714,91.71428571428572 L780,88.28571428571428 L780,270 L55,270 Z"
        fill="url(#purpleGrad)" opacity="0.5"/><polyline points="55,122.57142857142856 158.57142857142856,115.7142857142857 262.1428571428571,119.14285714285714 365.7142857142857,105.42857142857142 469.2857142857143,98.57142857142856 572.8571428571429,95.14285714285714 676.4285714285714,91.71428571428572 780,88.28571428571428" fill="none" stroke="#6c5ce7" stroke-width="2.5"
      stroke-linecap="round" stroke-linejoin="round"/><circle cx="780" cy="88.28571428571428" r="5" fill="#6c5ce7" opacity="0.9"/><text x="760" y="78.28571428571428" fill="#6c5ce7" font-size="12" font-weight="600">78%</text><polyline points="55,259.7142857142857 158.57142857142856,256.2857142857143 262.1428571428571,266.57142857142856 365.7142857142857,252.85714285714286 469.2857142857143,256.2857142857143 572.8571428571429,249.42857142857142 676.4285714285714,252.85714285714286 780,246" fill="none" stroke="#ff9f43" stroke-width="2.5"
      stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="6,4"/><circle cx="780" cy="246" r="5" fill="#ff9f43" opacity="0.9"/><text x="760" y="236" fill="#ff9f43" font-size="12" font-weight="600">32%</text>
      </svg>
    </div>
    </div>

    <div class="section fade-in">
      <div class="section-title">Top Markets by Confidence</div>
      <div class="market-grid">
    
      <div class="market-card">
        <div class="market-name">🏛️ Fed Holds Rate at June 2026 FOMC</div>
        <div class="market-odds">
          <div><div class="odds-tag yes">85¢</div><div class="odds-label">YES</div></div>
          <div><div class="odds-tag no">15¢</div><div class="odds-label">NO</div></div>
        </div>
        <div class="market-volume">
          Vol: $128.5M &nbsp;·&nbsp;
          <span class="market-change up">↑ +3.2% 7d</span>
        </div>
      </div>

      <div class="market-card">
        <div class="market-name">🗳️ Democrats Control Senate After 2026 Midterms</div>
        <div class="market-odds">
          <div><div class="odds-tag yes">78¢</div><div class="odds-label">YES</div></div>
          <div><div class="odds-tag no">22¢</div><div class="odds-label">NO</div></div>
        </div>
        <div class="market-volume">
          Vol: $342.1M &nbsp;·&nbsp;
          <span class="market-change up">↑ +5.1% 7d</span>
        </div>
      </div>

      <div class="market-card">
        <div class="market-name">⚽ Real Madrid Wins UEFA Champions League 2026</div>
        <div class="market-odds">
          <div><div class="odds-tag yes">32¢</div><div class="odds-label">YES</div></div>
          <div><div class="odds-tag no">68¢</div><div class="odds-label">NO</div></div>
        </div>
        <div class="market-volume">
          Vol: $87.3M &nbsp;·&nbsp;
          <span class="market-change down">↓ -1.8% 7d</span>
        </div>
      </div>
  </div>
    </div>

    <div class="section fade-in">
      <div class="section-title">Geopolitical Impact Map</div>
      
    <div class="map-container">
      <div class="map-tooltip" id="mapTooltip"></div>
      <svg class="map-svg" viewBox="0 0 1000 500" preserveAspectRatio="xMidYMid meet">
        <path d="M150,80 L280,60 L300,100 L310,160 L290,200 L250,220 L200,200 L160,170 L130,130 Z" data-region="north_america"/>
<path class="highlight" d="M150,80 L280,60 L300,100 L310,160 L290,200 L250,220 L200,200 L160,170 L130,130 Z" data-region="United States" data-info="Key market: Senate Midterm Control (78% YES). 34 Senate seats up for election. Fed rate decision impacts USD globally." onmouseenter="showTooltip(event, this)" onmouseleave="hideTooltip()"/>
<path d="M150,30 L280,20 L300,60 L280,60 L150,80 L120,60 Z" data-region="canada"/>
<path d="M160,220 L250,220 L240,270 L200,290 L160,260 Z" data-region="mexico"/>
<path d="M230,300 L290,280 L310,330 L300,400 L270,440 L240,420 L220,370 Z" data-region="south_america"/>
<path class="highlight" d="M430,70 L530,50 L560,80 L550,130 L520,150 L470,140 L440,110 Z" data-region="Europe" data-info="UEFA Champions League market (Real Madrid 32%). EU economic conditions influence Fed policy decisions." onmouseenter="showTooltip(event, this)" onmouseleave="hideTooltip()"/>
<path d="M440,170 L530,160 L560,200 L550,320 L500,370 L450,340 L430,260 Z" data-region="africa"/>
<path d="M560,40 L780,30 L820,80 L800,120 L700,130 L600,120 L560,80 Z" data-region="russia"/>
<path d="M560,130 L630,120 L650,160 L620,190 L570,180 Z" data-region="middle_east"/>
<path class="highlight" d="M700,100 L800,90 L830,130 L810,180 L760,190 L720,170 L700,140 Z" data-region="East Asia" data-info="US-China trade negotiations could shift Fed rate expectations. Ongoing tariff discussions add volatility." onmouseenter="showTooltip(event, this)" onmouseleave="hideTooltip()"/>
<path d="M700,100 L800,90 L830,130 L810,180 L760,190 L720,170 L700,140 Z" data-region="china"/>
<path d="M740,200 L810,190 L840,230 L820,270 L770,260 L740,230 Z" data-region="southeast_asia"/>
<path d="M800,330 L880,310 L920,350 L900,400 L840,400 L800,370 Z" data-region="australia"/>

      </svg>
      <div class="map-legend">
        <div class="map-legend-item"><div class="map-legend-dot" style="background:rgba(108,92,231,0.5)"></div> High impact region</div>
        <div class="map-legend-item"><div class="map-legend-dot" style="background:#1a1a2e"></div> Low / indirect impact</div>
      </div>
    </div>
    </div>

    <div class="section fade-in">
      <div class="section-title">Key News &amp; Sources</div>
      <div class="news-list">
    
      <a class="news-item" href="#" target="_blank" rel="noopener">
        <div class="news-sentiment positive">📈</div>
        <div class="news-body">
          <div class="news-title">Fed Officials Signal Patience on Rate Cuts Amid Sticky Inflation</div>
          <div class="news-meta">
            <span>Reuters</span>
            <span>Mar 28, 2026</span>
          </div>
          <span class="news-tag">Fed Rate Decision</span>
        </div>
      </a>

      <a class="news-item" href="#" target="_blank" rel="noopener">
        <div class="news-sentiment positive">📈</div>
        <div class="news-body">
          <div class="news-title">New Polling Shows Democrats Leading in 4 of 6 Key Senate Races</div>
          <div class="news-meta">
            <span>FiveThirtyEight</span>
            <span>Mar 27, 2026</span>
          </div>
          <span class="news-tag">Senate Midterms</span>
        </div>
      </a>

      <a class="news-item" href="#" target="_blank" rel="noopener">
        <div class="news-sentiment neutral">📰</div>
        <div class="news-body">
          <div class="news-title">Champions League Quarter-Final Draw Sets Up Real Madrid vs. Man City</div>
          <div class="news-meta">
            <span>UEFA.com</span>
            <span>Mar 25, 2026</span>
          </div>
          <span class="news-tag">Champions League</span>
        </div>
      </a>

      <a class="news-item" href="#" target="_blank" rel="noopener">
        <div class="news-sentiment neutral">⚠️</div>
        <div class="news-body">
          <div class="news-title">US-China Trade Talks Stall Over Tech Export Controls</div>
          <div class="news-meta">
            <span>Bloomberg</span>
            <span>Mar 26, 2026</span>
          </div>
          <span class="news-tag">Geopolitical Risk</span>
        </div>
      </a>
  </div>
    </div>

  <div class="footer">
    <p>Generated by <a href="https://a2ui.me">OpenClaw Research Visualizer</a> · Powered by AI</p>
    <p style="margin-top:4px">This is an AI-generated research report. Not financial advice.</p>
  </div>
</div>

<script>
function toggleDetails(el){var d=el.querySelector('.step-details');if(d)d.classList.toggle('open')}
function showTooltip(e,el){var t=document.getElementById('mapTooltip'),r=el.getAttribute('data-region'),i=el.getAttribute('data-info');if(!i)return;t.innerHTML='<strong>'+r+'</strong><br/>'+i;t.classList.add('visible');var b=el.closest('.map-container').getBoundingClientRect();t.style.left=(e.clientX-b.left+10)+'px';t.style.top=(e.clientY-b.top-60)+'px'}
function hideTooltip(){document.getElementById('mapTooltip').classList.remove('visible')}
var obs=new IntersectionObserver(function(es){es.forEach(function(e){if(e.isIntersecting){e.target.classList.add('visible');obs.unobserve(e.target)}})},{threshold:0.1});
document.querySelectorAll('.fade-in').forEach(function(el){obs.observe(el)});
setTimeout(function(){var f=document.querySelector('.confidence-fill');if(f)f.style.width=f.dataset.target+'%'},500);
</script>
</body>
</html>

path: demo/polymarket-demo.html
content: <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Research Report — Polymarket Top Opportunities Analysis</title>
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a25;
  --border: #1e1e2e;
  --text: #e0e0e8;
  --text-dim: #8888a0;
  --text-muted: #555568;
  --accent: #6c5ce7;
  --accent-glow: rgba(108,92,231,0.3);
  --green: #00d2a0;
  --green-dim: rgba(0,210,160,0.15);
  --red: #ff6b6b;
  --red-dim: rgba(255,107,107,0.15);
  --blue: #4da6ff;
  --yellow: #ffd93d;
  --orange: #ff9f43;
  --radius: 12px;
  --radius-sm: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container { max-width: 900px; margin: 0 auto; padding: 20px 16px 60px; }

/* Header */
.header {
  text-align: center;
  padding: 40px 0 30px;
}
.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-glow);
  border: 1px solid rgba(108,92,231,0.4);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}
.header-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }

.header h1 {
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 0%, #a0a0c0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.header .subtitle {
  color: var(--text-dim);
  font-size: 14px;
}
.header .meta {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
}
.header .meta span { display: flex; align-items: center; gap: 4px; }

/* Conclusion Card */
.conclusion-card {
  background: linear-gradient(135deg, rgba(108,92,231,0.12) 0%, rgba(0,210,160,0.08) 100%);
  border: 1px solid rgba(108,92,231,0.3);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
.conclusion-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--green));
}
.conclusion-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 10px;
}
.conclusion-text {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 16px;
}
.confidence-bar {
  display: flex; align-items: center; gap: 12px;
}
.confidence-bar .label { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.confidence-track {
  flex: 1; height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden;
}
.confidence-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--green));
  transition: width 1.5s ease;
}
.confidence-val { font-size: 14px; font-weight: 600; color: var(--green); }

/* Section */
.section { margin-bottom: 32px; }
.section-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.section-title::after {
  content: '';
  flex: 1; height: 1px;
  background: var(--border);
}

/* Research Timeline */
.timeline { position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 18px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--border) 100%);
}

.step {
  position: relative;
  padding-left: 48px;
  padding-bottom: 24px;
  cursor: pointer;
}
.step:last-child { padding-bottom: 0; }

.step-dot {
  position: absolute; left: 10px; top: 4px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
  transition: all 0.3s;
}
.step-dot .inner {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  transition: all 0.3s;
}
.step.active .step-dot { border-color: var(--green); box-shadow: 0 0 12px var(--green-dim); }
.step.active .step-dot .inner { background: var(--green); }

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: all 0.3s;
}
.step:hover .step-card {
  background: var(--bg-card-hover);
  border-color: rgba(108,92,231,0.3);
}

.step-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.step-tool {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 600;
}
.step-tool.search { background: rgba(77,166,255,0.12); color: var(--blue); }
.step-tool.api { background: rgba(0,210,160,0.12); color: var(--green); }
.step-tool.analyze { background: rgba(108,92,231,0.12); color: var(--accent); }
.step-tool.browse { background: rgba(255,159,67,0.12); color: var(--orange); }

.step-time { font-size: 11px; color: var(--text-muted); }

.step-query {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 6px;
  font-style: italic;
}
.step-summary {
  font-size: 14px;
  line-height: 1.6;
}

.step-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, margin 0.3s ease;
}
.step-details.open {
  max-height: 500px;
  margin-top: 12px;
}
.step-sources {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.step-sources .src-label {
  font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px;
}
.source-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--blue);
  text-decoration: none;
}
.source-item:hover { text-decoration: underline; }
.source-icon {
  width: 16px; height: 16px; border-radius: 4px;
  background: rgba(77,166,255,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px;
}

/* Chart */
.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.chart-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.chart-title { font-size: 15px; font-weight: 600; }
.chart-legend {
  display: flex; gap: 16px; font-size: 12px;
}
.chart-legend span {
  display: flex; align-items: center; gap: 6px;
}
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }

.chart-svg { width: 100%; height: auto; }

/* Market Cards */
.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.market-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: all 0.3s;
}
.market-card:hover {
  border-color: rgba(108,92,231,0.3);
  transform: translateY(-2px);
}
.market-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}
.market-odds {
  display: flex; gap: 8px; margin-bottom: 10px;
}
.odds-tag {
  font-size: 20px; font-weight: 700;
}
.odds-tag.yes { color: var(--green); }
.odds-tag.no { color: var(--red); }
.odds-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; }
.market-volume {
  font-size: 12px; color: var(--text-muted);
}
.market-change {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 12px; font-weight: 600;
  padding: 2px 8px; border-radius: 10px;
}
.market-change.up { background: var(--green-dim); color: var(--green); }
.market-change.down { background: var(--red-dim); color: var(--red); }

/* World Map */
.map-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
}
.map-svg {
  width: 100%;
  height: auto;
}
.map-svg path {
  fill: #1a1a2e;
  stroke: #2a2a40;
  stroke-width: 0.5;
  transition: fill 0.3s;
}
.map-svg path.highlight {
  fill: rgba(108,92,231,0.4);
  stroke: var(--accent);
}
.map-svg path.highlight:hover {
  fill: rgba(108,92,231,0.6);
}
.map-tooltip {
  position: absolute;
  background: rgba(18,18,26,0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
  max-width: 220px;
}
.map-tooltip.visible { opacity: 1; }
.map-legend {
  display: flex; gap: 16px; margin-top: 12px; justify-content: center;
}
.map-legend-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-dim);
}
.map-legend-dot {
  width: 10px; height: 10px; border-radius: 3px;
}

/* News Cards */
.news-list { display: flex; flex-direction: column; gap: 10px; }
.news-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
}
.news-item:hover {
  border-color: rgba(108,92,231,0.3);
  background: var(--bg-card-hover);
}
.news-sentiment {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.news-sentiment.positive { background: var(--green-dim); }
.news-sentiment.negative { background: var(--red-dim); }
.news-sentiment.neutral { background: rgba(255,255,255,0.06); }
.news-body { flex: 1; }
.news-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; line-height: 1.4; }
.news-meta {
  font-size: 12px; color: var(--text-muted);
  display: flex; gap: 12px;
}
.news-tag {
  display: inline-block;
  background: rgba(108,92,231,0.12);
  color: var(--accent);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 8px;
  margin-top: 6px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 32px 0 16px;
  font-size: 12px;
  color: var(--text-muted);
}
.footer a { color: var(--accent); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile */
@media (max-width: 600px) {
  .container { padding: 12px 12px 40px; }
  .header { padding: 24px 0 20px; }
  .conclusion-card { padding: 18px; }
  .conclusion-text { font-size: 16px; }
  .market-grid { grid-template-columns: 1fr; }
}
</style>
</head>
<body>

<div class="container">
  <!-- Header -->
  <div class="header fade-in">
    <div class="header-badge"><span class="dot"></span> Research Complete</div>
    <h1>Polymarket Top Opportunities Analysis</h1>
    <p class="subtitle">AI-powered deep research into highest probability markets</p>
    <div class="meta">
      <span>🕐 3m 42s research time</span>
      <span>📊 6 steps completed</span>
      <span>🔗 14 sources analyzed</span>
    </div>
  </div>

  <!-- Conclusion -->
  <div class="conclusion-card fade-in">
    <div class="conclusion-label">Key Finding</div>
    <div class="conclusion-text">
      The three highest-confidence markets on Polymarket are US Midterm outcomes (Senate control at 78% YES), Fed rate decision for June 2026 (hold at 85%), and UEFA Champions League winner (Real Madrid at 32%). Combined analysis across news, polling data, and market volume suggests the Fed rate hold is the safest play.
    </div>
    <div class="confidence-bar">
      <span class="label">Research Confidence</span>
      <div class="confidence-track">
        <div class="confidence-fill" style="width:0%" data-target="87"></div>
      </div>
      <span class="confidence-val">87%</span>
    </div>
  </div>

  <!-- Research Steps Timeline -->
  <div class="section fade-in">
    <div class="section-title">Research Process</div>
    <div class="timeline">

      <div class="step active" onclick="toggleDetails(this)">
        <div class="step-dot"><div class="inner"></div></div>
        <div class="step-card">
          <div class="step-header">
            <span class="step-tool search">🔍 Web Search</span>
            <span class="step-time">0:00 — 0:12</span>
          </div>
          <div class="step-query">"Polymarket highest volume markets March 2026"</div>
          <div class="step-summary">Found top 20 markets by trading volume. US political markets dominate with $450M+ total volume. Identified 3 categories: Politics, Finance, Sports.</div>
          <div class="step-details">
            <div class="step-sources">
              <div class="src-label">Sources</div>
              <a class="source-item" href="#"><span class="source-icon">📄</span> Polymarket — Top Markets Dashboard</a>
              <a class="source-item" href="#"><span class="source-icon">📄</span> The Block — Prediction Market Volumes Surge</a>
              <a class="source-item" href="#"><span class="source-icon">📄</span> CoinDesk — Polymarket March 2026 Overview</a>
            </div>
          </div>
        </div>
      </div>

      <div class="step active" onclick="toggleDetails(this)">
        <div class="step-dot"><div class="inner"></div></div>
        <div class="step-card">
          <div class="step-header">
            <span class="step-tool api">⚡ API Call</span>
            <span class="step-time">0:12 — 0:28</span>
          </div>
          <div class="step-query">Polymarket CLOB API — fetch top 50 markets by volume</div>
          <div class="step-summary">Retrieved real-time odds data for 50 markets. Filtered to markets with >$10M volume and >70% YES probability for "safest bet" analysis.</div>
          <div class="step-details">
            <div class="step-sources">
              <div class="src-label">Sources</div>
              <a class="source-item" href="#"><span class="source-icon">🔌</span> Polymarket CLOB API v2</a>
            </div>
          </div>
        </div>
      </div>

      <div class="step active" onclick="toggleDetails(this)">
        <div class="step-dot"><div class="inner"></div></div>
        <div class="step-card">
          <div class="step-header">
            <span class="step-tool browse">🌐 Web Browse</span>
            <span class="step-time">0:28 — 1:05</span>
          </div>
          <div class="step-query">Browse FiveThirtyEight, Reuters, Bloomberg for corroborating data</div>
          <div class="step-summary">Cross-referenced prediction market odds with polling averages and expert forecasts. Senate control prediction aligns with FiveThirtyEight model (76% vs 78%).</div>
          <div class="step-details">
            <div class="step-sources">
              <div class="src-label">Sources</div>
              <a class="source-item" href="#"><span class="source-icon">📄</span> FiveThirtyEight — 2026 Senate Forecast</a>
              <a class="source-item" href="#"><span class="source-icon">📄</span> Reuters — Fed Rate Decision Preview</a>
              <a class="source-item" href="#"><span class="source-icon">📄</span> Bloomberg — Champions League Odds Analysis</a>
            </div>
          </div>
        </div>
      </div>

      <div class="step active" onclick="toggleDetails(this)">
        <div class="step-dot"><div class="inner"></div></div>
        <div class="step-card">
          <div class="step-header">
            <span class="step-tool search">🔍 Web Search</span>
            <span class="step-time">1:05 — 1:35</span>
          </div>
          <div class="step-query">"Fed June 2026 rate decision forecast CME FedWatch"</div>
          <div class="step-summary">CME FedWatch tool shows 88.2% probability of rate hold, closely aligned with Polymarket's 85%. Market consensus is very strong — 12 of 14 surveyed economists predict hold.</div>
          <div class="step-details">
            <div class="step-sources">
              <div class="src-label">Sources</div>
              <a class="source-item" href="#"><span class="source-icon">📄</span> CME FedWatch Tool</a>
              <a class="source-item" href="#"><span class="source-icon">📄</span> CNBC — Economist Survey: June FOMC</a>
            </div>
          </div>
        </div>
      </div>

      <div class="step active" onclick="toggleDetails(this)">
        <div class="step-dot"><div class="inner"></div></div>
        <div class="step-card">
          <div class="step-header">
            <span class="step-tool analyze">🧠 Analysis</span>
            <span class="step-time">1:35 — 2:50</span>
          </div>
          <div class="step-query">Cross-correlate data sources, identify geopolitical risk factors</div>
          <div class="step-summary">Mapped geopolitical events that could shift odds: US-China trade talks (impact on Fed), EU elections (impact on Champions League scheduling), key Senate primaries in swing states. Risk-adjusted confidence: 87%.</div>
          <div class="step-details">
            <div class="step-sources">
              <div class="src-label">Sources</div>
              <a class="source-item" href="#"><span class="source-icon">🧠</span> Internal cross-reference analysis</a>
              <a class="source-item" href="#"><span class="source-icon">📄</span> Council on Foreign Relations — US-China Trade Timeline</a>
            </div>
          </div>
        </div>
      </div>

      <div class="step active" onclick="toggleDetails(this)">
        <div class="step-dot"><div class="inner"></div></div>
        <div class="step-card">
          <div class="step-header">
            <span class="step-tool analyze">✅ Synthesis</span>
            <span class="step-time">2:50 — 3:42</span>
          </div>
          <div class="step-query">Generate final recommendation with confidence scoring</div>
          <div class="step-summary">Ranked top 3 markets by risk-adjusted confidence. Fed rate hold (85% YES) is safest due to strong multi-source consensus. Senate control (78% YES) has highest potential return. Champions League (32% YES for Real Madrid) is highest risk/reward.</div>
        </div>
      </div>

    </div>
  </div>

  <!-- Probability Trend Chart -->
  <div class="section fade-in">
    <div class="section-title">Probability Trends (Last 30 Days)</div>
    <div class="chart-container">
      <div class="chart-header">
        <div class="chart-title">Market Odds Movement</div>
        <div class="chart-legend">
          <span><span class="legend-dot" style="background:var(--green)"></span> Fed Rate Hold</span>
          <span><span class="legend-dot" style="background:var(--accent)"></span> Senate Control</span>
          <span><span class="legend-dot" style="background:var(--orange)"></span> Real Madrid UCL</span>
        </div>
      </div>
      <svg class="chart-svg" viewBox="0 0 800 300" preserveAspectRatio="xMidYMid meet">
        <!-- Grid -->
        <defs>
          <linearGradient id="greenGrad" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0%" stop-color="rgba(0,210,160,0.2)"/>
            <stop offset="100%" stop-color="rgba(0,210,160,0)"/>
          </linearGradient>
          <linearGradient id="purpleGrad" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0%" stop-color="rgba(108,92,231,0.15)"/>
            <stop offset="100%" stop-color="rgba(108,92,231,0)"/>
          </linearGradient>
        </defs>
        <!-- Y-axis labels -->
        <text x="25" y="38" fill="#555568" font-size="11">90%</text>
        <text x="25" y="98" fill="#555568" font-size="11">75%</text>
        <text x="25" y="158" fill="#555568" font-size="11">60%</text>
        <text x="25" y="218" fill="#555568" font-size="11">45%</text>
        <text x="25" y="278" fill="#555568" font-size="11">30%</text>
        <!-- Grid lines -->
        <line x1="55" y1="33" x2="780" y2="33" stroke="#1e1e2e" stroke-width="1"/>
        <line x1="55" y1="93" x2="780" y2="93" stroke="#1e1e2e" stroke-width="1"/>
        <line x1="55" y1="153" x2="780" y2="153" stroke="#1e1e2e" stroke-width="1"/>
        <line x1="55" y1="213" x2="780" y2="213" stroke="#1e1e2e" stroke-width="1"/>
        <line x1="55" y1="273" x2="780" y2="273" stroke="#1e1e2e" stroke-width="1"/>
        <!-- X-axis labels -->
        <text x="55" y="295" fill="#555568" font-size="11">Mar 1</text>
        <text x="237" y="295" fill="#555568" font-size="11">Mar 8</text>
        <text x="418" y="295" fill="#555568" font-size="11">Mar 15</text>
        <text x="600" y="295" fill="#555568" font-size="11">Mar 22</text>
        <text x="750" y="295" fill="#555568" font-size="11">Mar 31</text>

        <!-- Fed Rate Hold - area -->
        <path d="M55,73 L152,63 L248,68 L345,53 L442,48 L538,43 L635,38 L732,33 L780,33 L780,273 L55,273 Z" fill="url(#greenGrad)" opacity="0.5"/>
        <!-- Fed Rate Hold - line -->
        <polyline points="55,73 152,63 248,68 345,53 442,48 538,43 635,38 732,33 780,33"
          fill="none" stroke="#00d2a0" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>

        <!-- Senate Control - area -->
        <path d="M55,133 L152,123 L248,128 L345,113 L442,103 L538,98 L635,93 L732,83 L780,78 L780,273 L55,273 Z" fill="url(#purpleGrad)" opacity="0.5"/>
        <!-- Senate Control - line -->
        <polyline points="55,133 152,123 248,128 345,113 442,103 538,98 635,93 732,83 780,78"
          fill="none" stroke="#6c5ce7" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>

        <!-- Real Madrid UCL - line -->
        <polyline points="55,233 152,228 248,243 345,218 442,223 538,213 635,208 732,213 780,208"
          fill="none" stroke="#ff9f43" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="6,4"/>

        <!-- Current value dots -->
        <circle cx="780" cy="33" r="5" fill="#00d2a0" opacity="0.9"/>
        <circle cx="780" cy="78" r="5" fill="#6c5ce7" opacity="0.9"/>
        <circle cx="780" cy="208" r="5" fill="#ff9f43" opacity="0.9"/>

        <!-- Value labels -->
        <text x="760" y="25" fill="#00d2a0" font-size="12" font-weight="600">85%</text>
        <text x="760" y="70" fill="#6c5ce7" font-size="12" font-weight="600">78%</text>
        <text x="760" y="200" fill="#ff9f43" font-size="12" font-weight="600">32%</text>
      </svg>
    </div>
  </div>

  <!-- Top Markets -->
  <div class="section fade-in">
    <div class="section-title">Top Markets by Confidence</div>
    <div class="market-grid">
      <div class="market-card">
        <div class="market-name">🏛️ Fed Holds Rate at June 2026 FOMC</div>
        <div class="market-odds">
          <div>
            <div class="odds-tag yes">85¢</div>
            <div class="odds-label">YES</div>
          </div>
          <div>
            <div class="odds-tag no">15¢</div>
            <div class="odds-label">NO</div>
          </div>
        </div>
        <div class="market-volume">
          Vol: $128.5M &nbsp;·&nbsp;
          <span class="market-change up">↑ +3.2% 7d</span>
        </div>
      </div>

      <div class="market-card">
        <div class="market-name">🗳️ Democrats Control Senate After 2026 Midterms</div>
        <div class="market-odds">
          <div>
            <div class="odds-tag yes">78¢</div>
            <div class="odds-label">YES</div>
          </div>
          <div>
            <div class="odds-tag no">22¢</div>
            <div class="odds-label">NO</div>
          </div>
        </div>
        <div class="market-volume">
          Vol: $342.1M &nbsp;·&nbsp;
          <span class="market-change up">↑ +5.1% 7d</span>
        </div>
      </div>

      <div class="market-card">
        <div class="market-name">⚽ Real Madrid Wins UEFA Champions League 2026</div>
        <div class="market-odds">
          <div>
            <div class="odds-tag yes">32¢</div>
            <div class="odds-label">YES</div>
          </div>
          <div>
            <div class="odds-tag no">68¢</div>
            <div class="odds-label">NO</div>
          </div>
        </div>
        <div class="market-volume">
          Vol: $87.3M &nbsp;·&nbsp;
          <span class="market-change down">↓ -1.8% 7d</span>
        </div>
      </div>
    </div>
  </div>

  <!-- World Map -->
  <div class="section fade-in">
    <div class="section-title">Geopolitical Impact Map</div>
    <div class="map-container">
      <div class="map-tooltip" id="mapTooltip"></div>
      <svg class="map-svg" viewBox="0 0 1000 500" preserveAspectRatio="xMidYMid meet">
        <!-- Simplified world map paths -->
        <!-- North America -->
        <path class="highlight" d="M150,80 L280,60 L300,100 L310,160 L290,200 L250,220 L200,200 L160,170 L130,130 Z"
          data-region="United States"
          data-info="Key market: Senate Midterm Control (78% YES). 34 Senate seats up for election. Fed rate decision impacts USD globally."
          onmouseenter="showTooltip(event, this)" onmouseleave="hideTooltip()"/>
        <path d="M150,30 L280,20 L300,60 L280,60 L150,80 L120,60 Z"
          data-region="Canada"/>
        <path d="M160,220 L250,220 L240,270 L200,290 L160,260 Z"
          data-region="Mexico"/>

        <!-- South America -->
        <path d="M230,300 L290,280 L310,330 L300,400 L270,440 L240,420 L220,370 Z"
          data-region="South America"/>

        <!-- Europe -->
        <path class="highlight" d="M430,70 L530,50 L560,80 L550,130 L520,150 L470,140 L440,110 Z"
          data-region="Europe"
          data-info="UEFA Champions League market (Real Madrid 32%). EU economic conditions influence Fed policy decisions."
          onmouseenter="showTooltip(event, this)" onmouseleave="hideTooltip()"/>

        <!-- Africa -->
        <path d="M440,170 L530,160 L560,200 L550,320 L500,370 L450,340 L430,260 Z"
          data-region="Africa"/>

        <!-- Russia/Central Asia -->
        <path d="M560,40 L780,30 L820,80 L800,120 L700,130 L600,120 L560,80 Z"
          data-region="Russia"/>

        <!-- Middle East -->
        <path d="M560,130 L630,120 L650,160 L620,190 L570,180 Z"
          data-region="Middle East"/>

        <!-- East Asia -->
        <path class="highlight" d="M700,100 L800,90 L830,130 L810,180 L760,190 L720,170 L700,140 Z"
          data-region="East Asia"
          data-info="US-China trade negotiations could shift Fed rate expectations. Ongoing tariff discussions add volatility to financial markets."
          onmouseenter="showTooltip(event, this)" onmouseleave="hideTooltip()"/>

        <!-- Southeast Asia -->
        <path d="M740,200 L810,190 L840,230 L820,270 L770,260 L740,230 Z"
          data-region="Southeast Asia"/>

        <!-- Australia -->
        <path d="M800,330 L880,310 L920,350 L900,400 L840,400 L800,370 Z"
          data-region="Australia"/>
      </svg>
      <div class="map-legend">
        <div class="map-legend-item">
          <div class="map-legend-dot" style="background:rgba(108,92,231,0.5)"></div>
          High market impact region
        </div>
        <div class="map-legend-item">
          <div class="map-legend-dot" style="background:#1a1a2e"></div>
          Indirect / low impact
        </div>
      </div>
    </div>
  </div>

  <!-- Related News -->
  <div class="section fade-in">
    <div class="section-title">Key News & Sources</div>
    <div class="news-list">
      <a class="news-item" href="#">
        <div class="news-sentiment positive">📈</div>
        <div class="news-body">
          <div class="news-title">Fed Officials Signal Patience on Rate Cuts Amid Sticky Inflation</div>
          <div class="news-meta">
            <span>Reuters</span>
            <span>Mar 28, 2026</span>
          </div>
          <span class="news-tag">Fed Rate Decision</span>
        </div>
      </a>
      <a class="news-item" href="#">
        <div class="news-sentiment positive">📊</div>
        <div class="news-body">
          <div class="news-title">New Polling Shows Democrats Leading in 4 of 6 Key Senate Races</div>
          <div class="news-meta">
            <span>FiveThirtyEight</span>
            <span>Mar 27, 2026</span>
          </div>
          <span class="news-tag">Senate Midterms</span>
        </div>
      </a>
      <a class="news-item" href="#">
        <div class="news-sentiment neutral">⚽</div>
        <div class="news-body">
          <div class="news-title">Champions League Quarter-Final Draw Sets Up Real Madrid vs. Man City</div>
          <div class="news-meta">
            <span>UEFA.com</span>
            <span>Mar 25, 2026</span>
          </div>
          <span class="news-tag">Champions League</span>
        </div>
      </a>
      <a class="news-item" href="#">
        <div class="news-sentiment negative">⚠️</div>
        <div class="news-body">
          <div class="news-title">US-China Trade Talks Stall Over Tech Export Controls</div>
          <div class="news-meta">
            <span>Bloomberg</span>
            <span>Mar 26, 2026</span>
          </div>
          <span class="news-tag">Geopolitical Risk</span>
        </div>
      </a>
    </div>
  </div>

  <!-- Footer -->
  <div class="footer">
    <p>Generated by <a href="#">OpenClaw Research Visualizer</a> · Powered by AI</p>
    <p style="margin-top:4px">This is an AI-generated research report. Not financial advice.</p>
  </div>
</div>

<script>
// Toggle step details
function toggleDetails(stepEl) {
  const details = stepEl.querySelector('.step-details');
  if (details) details.classList.toggle('open');
}

// Map tooltip
function showTooltip(event, el) {
  const tooltip = document.getElementById('mapTooltip');
  const region = el.getAttribute('data-region');
  const info = el.getAttribute('data-info');
  if (!info) return;
  tooltip.innerHTML = `<strong>${region}</strong><br/>${info}`;
  tooltip.classList.add('visible');
  const rect = el.closest('.map-container').getBoundingClientRect();
  tooltip.style.left = (event.clientX - rect.left + 10) + 'px';
  tooltip.style.top = (event.clientY - rect.top - 60) + 'px';
}
function hideTooltip() {
  document.getElementById('mapTooltip').classList.remove('visible');
}

// Fade-in on scroll
const observer = new IntersectionObserver((entries) => {
  entries.forEach(e => {
    if (e.isIntersecting) {
      e.target.classList.add('visible');
      observer.unobserve(e.target);
    }
  });
}, { threshold: 0.1 });
document.querySelectorAll('.fade-in').forEach(el => observer.observe(el));

// Animate confidence bar
setTimeout(() => {
  const fill = document.querySelector('.confidence-fill');
  if (fill) fill.style.width = fill.dataset.target + '%';
}, 500);
</script>

</body>
</html>


path: demo/report-plain.html
content: <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Research Report — Polymarket Top Opportunities Analysis</title>
<meta property="og:title" content="Polymarket Top Opportunities Analysis">
<meta property="og:description" content="AI Research Report — 6 steps, 11 sources analyzed">
<meta name="twitter:card" content="summary">
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0a0a0f; --bg-card: #12121a; --bg-card-hover: #1a1a25;
  --border: #1e1e2e; --text: #e0e0e8; --text-dim: #8888a0; --text-muted: #555568;
  --accent: #6c5ce7; --accent-glow: rgba(108,92,231,0.3);
  --green: #00d2a0; --green-dim: rgba(0,210,160,0.15);
  --red: #ff6b6b; --red-dim: rgba(255,107,107,0.15);
  --blue: #4da6ff; --yellow: #ffd93d; --orange: #ff9f43;
  --radius: 12px; --radius-sm: 8px;
}
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; }
.container { max-width: 900px; margin: 0 auto; padding: 20px 16px 60px; }

.header { text-align: center; padding: 40px 0 30px; }
.header-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-glow); border: 1px solid rgba(108,92,231,0.4); border-radius: 20px; padding: 4px 14px; font-size: 12px; color: var(--accent); margin-bottom: 16px; letter-spacing: 0.5px; }
.header-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:0.4} }
.header h1 { font-size: clamp(22px,5vw,32px); font-weight: 700; margin-bottom: 8px; background: linear-gradient(135deg,#fff,#a0a0c0); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.header .subtitle { color: var(--text-dim); font-size: 14px; }
.header .meta { display: flex; justify-content: center; gap: 20px; margin-top: 16px; font-size: 12px; color: var(--text-muted); }
.header .meta span { display: flex; align-items: center; gap: 4px; }

.conclusion-card { background: linear-gradient(135deg,rgba(108,92,231,0.12),rgba(0,210,160,0.08)); border: 1px solid rgba(108,92,231,0.3); border-radius: var(--radius); padding: 24px; margin-bottom: 32px; position: relative; overflow: hidden; }
.conclusion-card::before { content: ''; position: absolute; top:0; left:0; right:0; height:2px; background: linear-gradient(90deg,var(--accent),var(--green)); }
.conclusion-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent); margin-bottom: 10px; }
.conclusion-text { font-size: 18px; font-weight: 600; line-height: 1.5; margin-bottom: 16px; }
.confidence-bar { display: flex; align-items: center; gap: 12px; }
.confidence-bar .label { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.confidence-track { flex: 1; height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.confidence-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg,var(--accent),var(--green)); transition: width 1.5s ease; }
.confidence-val { font-size: 14px; font-weight: 600; color: var(--green); }

.section { margin-bottom: 32px; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.timeline { position: relative; }
.timeline::before { content: ''; position: absolute; left: 18px; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg,var(--accent),var(--border)); }
.step { position: relative; padding-left: 48px; padding-bottom: 24px; cursor: pointer; }
.step:last-child { padding-bottom: 0; }
.step-dot { position: absolute; left: 10px; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); display: flex; align-items: center; justify-content: center; z-index: 1; transition: all 0.3s; }
.step-dot .inner { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); transition: all 0.3s; }
.step.active .step-dot { border-color: var(--green); box-shadow: 0 0 12px var(--green-dim); }
.step.active .step-dot .inner { background: var(--green); }
.step-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; transition: all 0.3s; }
.step:hover .step-card { background: var(--bg-card-hover); border-color: rgba(108,92,231,0.3); }
.step-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.step-tool { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; padding: 3px 10px; border-radius: 12px; font-weight: 600; }
.step-tool.search { background: rgba(77,166,255,0.12); color: var(--blue); }
.step-tool.api { background: rgba(0,210,160,0.12); color: var(--green); }
.step-tool.analyze { background: rgba(108,92,231,0.12); color: var(--accent); }
.step-tool.browse { background: rgba(255,159,67,0.12); color: var(--orange); }
.step-time { font-size: 11px; color: var(--text-muted); }
.step-query { font-size: 13px; color: var(--text-dim); margin-bottom: 6px; font-style: italic; }
.step-summary { font-size: 14px; line-height: 1.6; }
.step-details { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, margin 0.3s ease; }
.step-details.open { max-height: 500px; margin-top: 12px; }
.step-sources { padding-top: 12px; border-top: 1px solid var(--border); }
.step-sources .src-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.source-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; color: var(--blue); text-decoration: none; }
.source-item:hover { text-decoration: underline; }
.source-icon { width: 16px; height: 16px; border-radius: 4px; background: rgba(77,166,255,0.12); display: flex; align-items: center; justify-content: center; font-size: 9px; }

.chart-container { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.chart-title { font-size: 15px; font-weight: 600; }
.chart-legend { display: flex; gap: 16px; font-size: 12px; flex-wrap: wrap; }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.chart-svg { width: 100%; height: auto; }

.market-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 12px; }
.market-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; transition: all 0.3s; }
.market-card:hover { border-color: rgba(108,92,231,0.3); transform: translateY(-2px); }
.market-name { font-size: 14px; font-weight: 600; margin-bottom: 8px; line-height: 1.4; }
.market-odds { display: flex; gap: 8px; margin-bottom: 10px; }
.odds-tag { font-size: 20px; font-weight: 700; }
.odds-tag.yes { color: var(--green); }
.odds-tag.no { color: var(--red); }
.odds-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; }
.market-volume { font-size: 12px; color: var(--text-muted); }
.market-change { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 10px; }
.market-change.up { background: var(--green-dim); color: var(--green); }
.market-change.down { background: var(--red-dim); color: var(--red); }

.map-container { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; position: relative; }
.map-svg { width: 100%; height: auto; }
.map-svg path { fill: #1a1a2e; stroke: #2a2a40; stroke-width: 0.5; transition: fill 0.3s; }
.map-svg path.highlight { fill: rgba(108,92,231,0.4); stroke: var(--accent); }
.map-svg path.highlight:hover { fill: rgba(108,92,231,0.6); }
.map-tooltip { position: absolute; background: rgba(18,18,26,0.95); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; pointer-events: none; opacity: 0; transition: opacity 0.2s; z-index: 10; max-width: 220px; }
.map-tooltip.visible { opacity: 1; }
.map-legend { display: flex; gap: 16px; margin-top: 12px; justify-content: center; flex-wrap: wrap; }
.map-legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-dim); }
.map-legend-dot { width: 10px; height: 10px; border-radius: 3px; }

.news-list { display: flex; flex-direction: column; gap: 10px; }
.news-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; gap: 14px; align-items: flex-start; transition: all 0.3s; text-decoration: none; color: inherit; }
.news-item:hover { border-color: rgba(108,92,231,0.3); background: var(--bg-card-hover); }
.news-sentiment { flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.news-sentiment.positive { background: var(--green-dim); }
.news-sentiment.negative { background: var(--red-dim); }
.news-sentiment.neutral { background: rgba(255,255,255,0.06); }
.news-body { flex: 1; }
.news-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; line-height: 1.4; }
.news-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 12px; }
.news-tag { display: inline-block; background: rgba(108,92,231,0.12); color: var(--accent); font-size: 11px; padding: 2px 8px; border-radius: 8px; margin-top: 6px; }

.footer { text-align: center; padding: 32px 0 16px; font-size: 12px; color: var(--text-muted); }
.footer a { color: var(--accent); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

.fade-in { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

@media (max-width:600px) {
  .container { padding: 12px 12px 40px; }
  .header { padding: 24px 0 20px; }
  .conclusion-card { padding: 18px; }
  .conclusion-text { font-size: 16px; }
  .market-grid { grid-template-columns: 1fr; }
}
</style>
</head>
<body>
<div class="container">
  <div class="header fade-in">
    <div class="header-badge"><span class="dot"></span> Research Complete</div>
    <h1>Polymarket Top Opportunities Analysis</h1>
    <p class="subtitle">AI-powered deep research into highest probability markets</p>
    <div class="meta">
      <span>🕐 3m 42s</span>
      <span>📊 6 steps completed</span>
      <span>🔗 11 sources analyzed</span>
    </div>
  </div>

  
  <div class="conclusion-card fade-in">
    <div class="conclusion-label">Key Finding</div>
    <div class="conclusion-text">The three highest-confidence markets on Polymarket are US Midterm outcomes (Senate control at 78% YES), Fed rate decision for June 2026 (hold at 85%), and UEFA Champions League winner (Real Madrid at 32%). Combined analysis across news, polling data, and market volume suggests the Fed rate hold is the safest play.</div>
    
    <div class="confidence-bar">
      <span class="label">Research Confidence</span>
      <div class="confidence-track">
        <div class="confidence-fill" style="width:0%" data-target="87"></div>
      </div>
      <span class="confidence-val">87%</span>
    </div>
  </div>

  
  <div class="section fade-in">
    <div class="section-title">Research Process</div>
    <div class="timeline">
      
      <div class="step active" onclick="toggleDetails(this)">
        <div class="step-dot"><div class="inner"></div></div>
        <div class="step-card">
          <div class="step-header">
            <span class="step-tool search">🔍 Web Search</span>
            <span class="step-time">0:00 — 0:12</span>
          </div>
          <div class="step-query">Polymarket highest volume markets March 2026</div>
          <div class="step-summary">Found top 20 markets by trading volume. US political markets dominate with $450M+ total volume. Identified 3 categories: Politics, Finance, Sports.</div>
          
      <div class="step-details">
        <div class="step-sources">
          <div class="src-label">Sources</div>
          <a class="source-item" href="https://polymarket.com" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> Polymarket — Top Markets Dashboard
      </a>
<a class="source-item" href="https://theblock.co" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> The Block — Prediction Market Volumes Surge
      </a>
<a class="source-item" href="https://coindesk.com" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> CoinDesk — Polymarket March 2026 Overview
      </a>
        </div>
      </div>
        </div>
      </div>

      <div class="step active" onclick="toggleDetails(this)">
        <div class="step-dot"><div class="inner"></div></div>
        <div class="step-card">
          <div class="step-header">
            <span class="step-tool api">⚡ API Call</span>
            <span class="step-time">0:12 — 0:28</span>
          </div>
          <div class="step-query">Polymarket CLOB API — fetch top 50 markets by volume</div>
          <div class="step-summary">Retrieved real-time odds data for 50 markets. Filtered to markets with &gt;$10M volume and &gt;70% YES probability for &quot;safest bet&quot; analysis.</div>
          
      <div class="step-details">
        <div class="step-sources">
          <div class="src-label">Sources</div>
          <a class="source-item" href="https://docs.polymarket.com" target="_blank" rel="noopener">
        <span class="source-icon">🔌</span> Polymarket CLOB API v2
      </a>
        </div>
      </div>
        </div>
      </div>

      <div class="step active" onclick="toggleDetails(this)">
        <div class="step-dot"><div class="inner"></div></div>
        <div class="step-card">
          <div class="step-header">
            <span class="step-tool browse">🌐 Web Browse</span>
            <span class="step-time">0:28 — 1:05</span>
          </div>
          <div class="step-query">Browse FiveThirtyEight, Reuters, Bloomberg for corroborating data</div>
          <div class="step-summary">Cross-referenced prediction market odds with polling averages and expert forecasts. Senate control prediction aligns with FiveThirtyEight model (76% vs 78%).</div>
          
      <div class="step-details">
        <div class="step-sources">
          <div class="src-label">Sources</div>
          <a class="source-item" href="https://fivethirtyeight.com" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> FiveThirtyEight — 2026 Senate Forecast
      </a>
<a class="source-item" href="https://reuters.com" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> Reuters — Fed Rate Decision Preview
      </a>
<a class="source-item" href="https://bloomberg.com" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> Bloomberg — Champions League Odds Analysis
      </a>
        </div>
      </div>
        </div>
      </div>

      <div class="step active" onclick="toggleDetails(this)">
        <div class="step-dot"><div class="inner"></div></div>
        <div class="step-card">
          <div class="step-header">
            <span class="step-tool search">🔍 Web Search</span>
            <span class="step-time">1:05 — 1:35</span>
          </div>
          <div class="step-query">Fed June 2026 rate decision forecast CME FedWatch</div>
          <div class="step-summary">CME FedWatch tool shows 88.2% probability of rate hold, closely aligned with Polymarket's 85%. Market consensus is very strong — 12 of 14 surveyed economists predict hold.</div>
          
      <div class="step-details">
        <div class="step-sources">
          <div class="src-label">Sources</div>
          <a class="source-item" href="https://cmegroup.com/fedwatch" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> CME FedWatch Tool
      </a>
<a class="source-item" href="https://cnbc.com" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> CNBC — Economist Survey: June FOMC
      </a>
        </div>
      </div>
        </div>
      </div>

      <div class="step active" onclick="toggleDetails(this)">
        <div class="step-dot"><div class="inner"></div></div>
        <div class="step-card">
          <div class="step-header">
            <span class="step-tool analyze">🧠 Analysis</span>
            <span class="step-time">1:35 — 2:50</span>
          </div>
          <div class="step-query">Cross-correlate data sources, identify geopolitical risk factors</div>
          <div class="step-summary">Mapped geopolitical events that could shift odds: US-China trade talks (impact on Fed), EU elections (impact on Champions League scheduling), key Senate primaries in swing states. Risk-adjusted confidence: 87%.</div>
          
      <div class="step-details">
        <div class="step-sources">
          <div class="src-label">Sources</div>
          <a class="source-item" href="#" target="_blank" rel="noopener">
        <span class="source-icon">🧠</span> Internal cross-reference analysis
      </a>
<a class="source-item" href="https://cfr.org" target="_blank" rel="noopener">
        <span class="source-icon">📄</span> Council on Foreign Relations — US-China Trade Timeline
      </a>
        </div>
      </div>
        </div>
      </div>

      <div class="step active" onclick="toggleDetails(this)">
        <div class="step-dot"><div class="inner"></div></div>
        <div class="step-card">
          <div class="step-header">
            <span class="step-tool analyze">✅ Synthesis</span>
            <span class="step-time">2:50 — 3:42</span>
          </div>
          <div class="step-query">Generate final recommendation with confidence scoring</div>
          <div class="step-summary">Ranked top 3 markets by risk-adjusted confidence. Fed rate hold (85% YES) is safest due to strong multi-source consensus. Senate control (78% YES) has highest potential return. Champions League (32% YES for Real Madrid) is highest risk/reward.</div>
          
        </div>
      </div>
    </div>
  </div>

  
    <div class="section fade-in">
      <div class="section-title">Probability Trends (Last 30 Days)</div>
      
    <div class="chart-container">
      <div class="chart-header">
        <div class="chart-title">Market Odds Movement</div>
        <div class="chart-legend"><span><span class="legend-dot" style="background:#00d2a0"></span> Fed Rate Hold</span>
<span><span class="legend-dot" style="background:#6c5ce7"></span> Senate Control</span>
<span><span class="legend-dot" style="background:#ff9f43"></span> Real Madrid UCL</span></div>
      </div>
      <svg class="chart-svg" viewBox="0 0 800 300" preserveAspectRatio="xMidYMid meet">
        <defs><linearGradient id="greenGrad" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0%" stop-color="#00d2a0" stop-opacity="0.2"/>
      <stop offset="100%" stop-color="#00d2a0" stop-opacity="0"/>
    </linearGradient>
<linearGradient id="purpleGrad" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0%" stop-color="#6c5ce7" stop-opacity="0.2"/>
      <stop offset="100%" stop-color="#6c5ce7" stop-opacity="0"/>
    </linearGradient>
<linearGradient id="orangeGrad" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0%" stop-color="#ff9f43" stop-opacity="0.2"/>
      <stop offset="100%" stop-color="#ff9f43" stop-opacity="0"/>
    </linearGradient></defs>
        <line x1="55" y1="270" x2="780" y2="270" stroke="#1e1e2e" stroke-width="1"/><text x="47" y="274" fill="#555568" font-size="11" text-anchor="end">25%</text><line x1="55" y1="222" x2="780" y2="222" stroke="#1e1e2e" stroke-width="1"/><text x="47" y="226" fill="#555568" font-size="11" text-anchor="end">39%</text><line x1="55" y1="174" x2="780" y2="174" stroke="#1e1e2e" stroke-width="1"/><text x="47" y="178" fill="#555568" font-size="11" text-anchor="end">53%</text><line x1="55" y1="126" x2="780" y2="126" stroke="#1e1e2e" stroke-width="1"/><text x="47" y="130" fill="#555568" font-size="11" text-anchor="end">67%</text><line x1="55" y1="78" x2="780" y2="78" stroke="#1e1e2e" stroke-width="1"/><text x="47" y="82" fill="#555568" font-size="11" text-anchor="end">81%</text><line x1="55" y1="30" x2="780" y2="30" stroke="#1e1e2e" stroke-width="1"/><text x="47" y="34" fill="#555568" font-size="11" text-anchor="end">95%</text>
        <text x="55" y="295" fill="#555568" font-size="11" text-anchor="middle">Mar 1</text><text x="236.25" y="295" fill="#555568" font-size="11" text-anchor="middle">Mar 8</text><text x="417.5" y="295" fill="#555568" font-size="11" text-anchor="middle">Mar 15</text><text x="598.75" y="295" fill="#555568" font-size="11" text-anchor="middle">Mar 22</text><text x="780" y="295" fill="#555568" font-size="11" text-anchor="middle">Mar 31</text>
        <path d="M55,81.42857142857144 L158.57142857142856,74.57142857142858 L262.1428571428571,78 L365.7142857142857,67.71428571428572 L469.2857142857143,71.14285714285714 L572.8571428571429,67.71428571428572 L676.4285714285714,64.2857142857143 L780,64.2857142857143 L780,270 L55,270 Z"
        fill="url(#greenGrad)" opacity="0.5"/><polyline points="55,81.42857142857144 158.57142857142856,74.57142857142858 262.1428571428571,78 365.7142857142857,67.71428571428572 469.2857142857143,71.14285714285714 572.8571428571429,67.71428571428572 676.4285714285714,64.2857142857143 780,64.2857142857143" fill="none" stroke="#00d2a0" stroke-width="2.5"
      stroke-linecap="round" stroke-linejoin="round"/><circle cx="780" cy="64.2857142857143" r="5" fill="#00d2a0" opacity="0.9"/><text x="760" y="54.285714285714306" fill="#00d2a0" font-size="12" font-weight="600">85%</text><path d="M55,122.57142857142856 L158.57142857142856,115.7142857142857 L262.1428571428571,119.14285714285714 L365.7142857142857,105.42857142857142 L469.2857142857143,98.57142857142856 L572.8571428571429,95.14285714285714 L676.4285714285714,91.71428571428572 L780,88.28571428571428 L780,270 L55,270 Z"
        fill="url(#purpleGrad)" opacity="0.5"/><polyline points="55,122.57142857142856 158.57142857142856,115.7142857142857 262.1428571428571,119.14285714285714 365.7142857142857,105.42857142857142 469.2857142857143,98.57142857142856 572.8571428571429,95.14285714285714 676.4285714285714,91.71428571428572 780,88.28571428571428" fill="none" stroke="#6c5ce7" stroke-width="2.5"
      stroke-linecap="round" stroke-linejoin="round"/><circle cx="780" cy="88.28571428571428" r="5" fill="#6c5ce7" opacity="0.9"/><text x="760" y="78.28571428571428" fill="#6c5ce7" font-size="12" font-weight="600">78%</text><polyline points="55,259.7142857142857 158.57142857142856,256.2857142857143 262.1428571428571,266.57142857142856 365.7142857142857,252.85714285714286 469.2857142857143,256.2857142857143 572.8571428571429,249.42857142857142 676.4285714285714,252.85714285714286 780,246" fill="none" stroke="#ff9f43" stroke-width="2.5"
      stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="6,4"/><circle cx="780" cy="246" r="5" fill="#ff9f43" opacity="0.9"/><text x="760" y="236" fill="#ff9f43" font-size="12" font-weight="600">32%</text>
      </svg>
    </div>
    </div>

    <div class="section fade-in">
      <div class="section-title">Top Markets by Confidence</div>
      <div class="market-grid">
    
      <div class="market-card">
        <div class="market-name">🏛️ Fed Holds Rate at June 2026 FOMC</div>
        <div class="market-odds">
          <div><div class="odds-tag yes">85¢</div><div class="odds-label">YES</div></div>
          <div><div class="odds-tag no">15¢</div><div class="odds-label">NO</div></div>
        </div>
        <div class="market-volume">
          Vol: $128.5M &nbsp;·&nbsp;
          <span class="market-change up">↑ +3.2% 7d</span>
        </div>
      </div>

      <div class="market-card">
        <div class="market-name">🗳️ Democrats Control Senate After 2026 Midterms</div>
        <div class="market-odds">
          <div><div class="odds-tag yes">78¢</div><div class="odds-label">YES</div></div>
          <div><div class="odds-tag no">22¢</div><div class="odds-label">NO</div></div>
        </div>
        <div class="market-volume">
          Vol: $342.1M &nbsp;·&nbsp;
          <span class="market-change up">↑ +5.1% 7d</span>
        </div>
      </div>

      <div class="market-card">
        <div class="market-name">⚽ Real Madrid Wins UEFA Champions League 2026</div>
        <div class="market-odds">
          <div><div class="odds-tag yes">32¢</div><div class="odds-label">YES</div></div>
          <div><div class="odds-tag no">68¢</div><div class="odds-label">NO</div></div>
        </div>
        <div class="market-volume">
          Vol: $87.3M &nbsp;·&nbsp;
          <span class="market-change down">↓ -1.8% 7d</span>
        </div>
      </div>
  </div>
    </div>

    <div class="section fade-in">
      <div class="section-title">Geopolitical Impact Map</div>
      
    <div class="map-container">
      <div class="map-tooltip" id="mapTooltip"></div>
      <svg class="map-svg" viewBox="0 0 1000 500" preserveAspectRatio="xMidYMid meet">
        <path d="M150,80 L280,60 L300,100 L310,160 L290,200 L250,220 L200,200 L160,170 L130,130 Z" data-region="north_america"/>
<path class="highlight" d="M150,80 L280,60 L300,100 L310,160 L290,200 L250,220 L200,200 L160,170 L130,130 Z" data-region="United States" data-info="Key market: Senate Midterm Control (78% YES). 34 Senate seats up for election. Fed rate decision impacts USD globally." onmouseenter="showTooltip(event, this)" onmouseleave="hideTooltip()"/>
<path d="M150,30 L280,20 L300,60 L280,60 L150,80 L120,60 Z" data-region="canada"/>
<path d="M160,220 L250,220 L240,270 L200,290 L160,260 Z" data-region="mexico"/>
<path d="M230,300 L290,280 L310,330 L300,400 L270,440 L240,420 L220,370 Z" data-region="south_america"/>
<path class="highlight" d="M430,70 L530,50 L560,80 L550,130 L520,150 L470,140 L440,110 Z" data-region="Europe" data-info="UEFA Champions League market (Real Madrid 32%). EU economic conditions influence Fed policy decisions." onmouseenter="showTooltip(event, this)" onmouseleave="hideTooltip()"/>
<path d="M440,170 L530,160 L560,200 L550,320 L500,370 L450,340 L430,260 Z" data-region="africa"/>
<path d="M560,40 L780,30 L820,80 L800,120 L700,130 L600,120 L560,80 Z" data-region="russia"/>
<path d="M560,130 L630,120 L650,160 L620,190 L570,180 Z" data-region="middle_east"/>
<path class="highlight" d="M700,100 L800,90 L830,130 L810,180 L760,190 L720,170 L700,140 Z" data-region="East Asia" data-info="US-China trade negotiations could shift Fed rate expectations. Ongoing tariff discussions add volatility." onmouseenter="showTooltip(event, this)" onmouseleave="hideTooltip()"/>
<path d="M700,100 L800,90 L830,130 L810,180 L760,190 L720,170 L700,140 Z" data-region="china"/>
<path d="M740,200 L810,190 L840,230 L820,270 L770,260 L740,230 Z" data-region="southeast_asia"/>
<path d="M800,330 L880,310 L920,350 L900,400 L840,400 L800,370 Z" data-region="australia"/>

      </svg>
      <div class="map-legend">
        <div class="map-legend-item"><div class="map-legend-dot" style="background:rgba(108,92,231,0.5)"></div> High impact region</div>
        <div class="map-legend-item"><div class="map-legend-dot" style="background:#1a1a2e"></div> Low / indirect impact</div>
      </div>
    </div>
    </div>

    <div class="section fade-in">
      <div class="section-title">Key News &amp; Sources</div>
      <div class="news-list">
    
      <a class="news-item" href="#" target="_blank" rel="noopener">
        <div class="news-sentiment positive">📈</div>
        <div class="news-body">
          <div class="news-title">Fed Officials Signal Patience on Rate Cuts Amid Sticky Inflation</div>
          <div class="news-meta">
            <span>Reuters</span>
            <span>Mar 28, 2026</span>
          </div>
          <span class="news-tag">Fed Rate Decision</span>
        </div>
      </a>

      <a class="news-item" href="#" target="_blank" rel="noopener">
        <div class="news-sentiment positive">📈</div>
        <div class="news-body">
          <div class="news-title">New Polling Shows Democrats Leading in 4 of 6 Key Senate Races</div>
          <div class="news-meta">
            <span>FiveThirtyEight</span>
            <span>Mar 27, 2026</span>
          </div>
          <span class="news-tag">Senate Midterms</span>
        </div>
      </a>

      <a class="news-item" href="#" target="_blank" rel="noopener">
        <div class="news-sentiment neutral">📰</div>
        <div class="news-body">
          <div class="news-title">Champions League Quarter-Final Draw Sets Up Real Madrid vs. Man City</div>
          <div class="news-meta">
            <span>UEFA.com</span>
            <span>Mar 25, 2026</span>
          </div>
          <span class="news-tag">Champions League</span>
        </div>
      </a>

      <a class="news-item" href="#" target="_blank" rel="noopener">
        <div class="news-sentiment neutral">⚠️</div>
        <div class="news-body">
          <div class="news-title">US-China Trade Talks Stall Over Tech Export Controls</div>
          <div class="news-meta">
            <span>Bloomberg</span>
            <span>Mar 26, 2026</span>
          </div>
          <span class="news-tag">Geopolitical Risk</span>
        </div>
      </a>
  </div>
    </div>

  <div class="footer">
    <p>Generated by <a href="https://a2ui.me">OpenClaw Research Visualizer</a> · Powered by AI</p>
    <p style="margin-top:4px">This is an AI-generated research report. Not financial advice.</p>
  </div>
</div>

<script>
function toggleDetails(el){var d=el.querySelector('.step-details');if(d)d.classList.toggle('open')}
function showTooltip(e,el){var t=document.getElementById('mapTooltip'),r=el.getAttribute('data-region'),i=el.getAttribute('data-info');if(!i)return;t.innerHTML='<strong>'+r+'</strong><br/>'+i;t.classList.add('visible');var b=el.closest('.map-container').getBoundingClientRect();t.style.left=(e.clientX-b.left+10)+'px';t.style.top=(e.clientY-b.top-60)+'px'}
function hideTooltip(){document.getElementById('mapTooltip').classList.remove('visible')}
var obs=new IntersectionObserver(function(es){es.forEach(function(e){if(e.isIntersecting){e.target.classList.add('visible');obs.unobserve(e.target)}})},{threshold:0.1});
document.querySelectorAll('.fade-in').forEach(function(el){obs.observe(el)});
setTimeout(function(){var f=document.querySelector('.confidence-fill');if(f)f.style.width=f.dataset.target+'%'},500);
</script>
</body>
</html>

path: demo/sample-data.json
content: {
  "title": "Polymarket Top Opportunities Analysis",
  "subtitle": "AI-powered deep research into highest probability markets",
  "research_time": "3m 42s",
  "conclusion": {
    "text": "The three highest-confidence markets on Polymarket are US Midterm outcomes (Senate control at 78% YES), Fed rate decision for June 2026 (hold at 85%), and UEFA Champions League winner (Real Madrid at 32%). Combined analysis across news, polling data, and market volume suggests the Fed rate hold is the safest play.",
    "confidence": 0.87
  },
  "steps": [
    {
      "tool": "Web Search",
      "tool_label": "Web Search",
      "time_range": "0:00 — 0:12",
      "query": "Polymarket highest volume markets March 2026",
      "summary": "Found top 20 markets by trading volume. US political markets dominate with $450M+ total volume. Identified 3 categories: Politics, Finance, Sports.",
      "sources": [
        { "title": "Polymarket — Top Markets Dashboard", "url": "https://polymarket.com", "icon": "📄" },
        { "title": "The Block — Prediction Market Volumes Surge", "url": "https://theblock.co", "icon": "📄" },
        { "title": "CoinDesk — Polymarket March 2026 Overview", "url": "https://coindesk.com", "icon": "📄" }
      ]
    },
    {
      "tool": "API",
      "tool_label": "API Call",
      "time_range": "0:12 — 0:28",
      "query": "Polymarket CLOB API — fetch top 50 markets by volume",
      "summary": "Retrieved real-time odds data for 50 markets. Filtered to markets with >$10M volume and >70% YES probability for \"safest bet\" analysis.",
      "sources": [
        { "title": "Polymarket CLOB API v2", "url": "https://docs.polymarket.com", "icon": "🔌" }
      ]
    },
    {
      "tool": "Web Browse",
      "tool_label": "Web Browse",
      "time_range": "0:28 — 1:05",
      "query": "Browse FiveThirtyEight, Reuters, Bloomberg for corroborating data",
      "summary": "Cross-referenced prediction market odds with polling averages and expert forecasts. Senate control prediction aligns with FiveThirtyEight model (76% vs 78%).",
      "sources": [
        { "title": "FiveThirtyEight — 2026 Senate Forecast", "url": "https://fivethirtyeight.com", "icon": "📄" },
        { "title": "Reuters — Fed Rate Decision Preview", "url": "https://reuters.com", "icon": "📄" },
        { "title": "Bloomberg — Champions League Odds Analysis", "url": "https://bloomberg.com", "icon": "📄" }
      ]
    },
    {
      "tool": "Search",
      "tool_label": "Web Search",
      "time_range": "1:05 — 1:35",
      "query": "Fed June 2026 rate decision forecast CME FedWatch",
      "summary": "CME FedWatch tool shows 88.2% probability of rate hold, closely aligned with Polymarket's 85%. Market consensus is very strong — 12 of 14 surveyed economists predict hold.",
      "sources": [
        { "title": "CME FedWatch Tool", "url": "https://cmegroup.com/fedwatch", "icon": "📄" },
        { "title": "CNBC — Economist Survey: June FOMC", "url": "https://cnbc.com", "icon": "📄" }
      ]
    },
    {
      "tool": "Analysis",
      "tool_label": "Analysis",
      "time_range": "1:35 — 2:50",
      "query": "Cross-correlate data sources, identify geopolitical risk factors",
      "summary": "Mapped geopolitical events that could shift odds: US-China trade talks (impact on Fed), EU elections (impact on Champions League scheduling), key Senate primaries in swing states. Risk-adjusted confidence: 87%.",
      "sources": [
        { "title": "Internal cross-reference analysis", "url": "#", "icon": "🧠" },
        { "title": "Council on Foreign Relations — US-China Trade Timeline", "url": "https://cfr.org", "icon": "📄" }
      ]
    },
    {
      "tool": "Synthesis",
      "tool_label": "Synthesis",
      "time_range": "2:50 — 3:42",
      "query": "Generate final recommendation with confidence scoring",
      "summary": "Ranked top 3 markets by risk-adjusted confidence. Fed rate hold (85% YES) is safest due to strong multi-source consensus. Senate control (78% YES) has highest potential return. Champions League (32% YES for Real Madrid) is highest risk/reward.",
      "sources": []
    }
  ],
  "visualizations": [
    {
      "type": "line_chart",
      "section_title": "Probability Trends (Last 30 Days)",
      "data": {
        "title": "Market Odds Movement",
        "y_format": "percent",
        "y_min": 25,
        "y_max": 95,
        "x_labels": ["Mar 1", "Mar 8", "Mar 15", "Mar 22", "Mar 31"],
        "series": [
          { "name": "Fed Rate Hold", "values": [80, 82, 81, 84, 83, 84, 85, 85] },
          { "name": "Senate Control", "values": [68, 70, 69, 73, 75, 76, 77, 78] },
          { "name": "Real Madrid UCL", "values": [28, 29, 26, 30, 29, 31, 30, 32] }
        ]
      }
    },
    {
      "type": "market_cards",
      "section_title": "Top Markets by Confidence",
      "data": [
        { "name": "🏛️ Fed Holds Rate at June 2026 FOMC", "yes_price": 85, "no_price": 15, "volume": "128.5M", "change_7d": 3.2 },
        { "name": "🗳️ Democrats Control Senate After 2026 Midterms", "yes_price": 78, "no_price": 22, "volume": "342.1M", "change_7d": 5.1 },
        { "name": "⚽ Real Madrid Wins UEFA Champions League 2026", "yes_price": 32, "no_price": 68, "volume": "87.3M", "change_7d": -1.8 }
      ]
    },
    {
      "type": "world_map",
      "section_title": "Geopolitical Impact Map",
      "data": {
        "regions": [
          { "id": "united_states", "name": "United States", "info": "Key market: Senate Midterm Control (78% YES). 34 Senate seats up for election. Fed rate decision impacts USD globally." },
          { "id": "europe", "name": "Europe", "info": "UEFA Champions League market (Real Madrid 32%). EU economic conditions influence Fed policy decisions." },
          { "id": "east_asia", "name": "East Asia", "info": "US-China trade negotiations could shift Fed rate expectations. Ongoing tariff discussions add volatility." }
        ]
      }
    },
    {
      "type": "news_cards",
      "section_title": "Key News & Sources",
      "data": [
        { "title": "Fed Officials Signal Patience on Rate Cuts Amid Sticky Inflation", "source": "Reuters", "date": "Mar 28, 2026", "sentiment": "positive", "tag": "Fed Rate Decision", "url": "#" },
        { "title": "New Polling Shows Democrats Leading in 4 of 6 Key Senate Races", "source": "FiveThirtyEight", "date": "Mar 27, 2026", "sentiment": "positive", "tag": "Senate Midterms", "url": "#" },
        { "title": "Champions League Quarter-Final Draw Sets Up Real Madrid vs. Man City", "source": "UEFA.com", "date": "Mar 25, 2026", "sentiment": "neutral", "tag": "Champions League", "url": "#" },
        { "title": "US-China Trade Talks Stall Over Tech Export Controls", "source": "Bloomberg", "date": "Mar 26, 2026", "sentiment": "warning", "tag": "Geopolitical Risk", "url": "#" }
      ]
    }
  ]
}


path: worker/package.json
content: {
  "name": "openclaw-research-viz-worker",
  "version": "1.0.0",
  "private": true,
  "scripts": {
    "dev": "wrangler dev",
    "deploy": "wrangler deploy"
  },
  "devDependencies": {
    "@cloudflare/workers-types": "^4.20250327.0",
    "wrangler": "^4.0.0"
  }
}


Security scan verdicts — ClawScan: suspicious | static analysis: suspicious | VirusTotal: clean | SkillSpector: suspicious (CRITICAL)