// Bilingual copy dictionary — CN is the primary voice; EN is parallel.
const COPY = {
  nav: {
    features:  { zh: '功能', en: 'Features' },
    flow:      { zh: '工作流', en: 'How it works' },
    interfaces:{ zh: '界面', en: 'Interfaces' },
    agent:     { zh: 'Agent + MCP', en: 'Agent + MCP' },
    pricing:   { zh: '定价', en: 'Pricing' },
    faq:       { zh: '常见问题', en: 'FAQ' },
    install:   { zh: '安装到 Chrome', en: 'Add to Chrome' },
    free:      { zh: '免费', en: 'Free' },
  },
  hero: {
    eyebrow: { zh: '为学生和研究者打造', en: 'Built for students & researchers' },
    title1:  { zh: '标记任意网页,', en: 'Mark any page,' },
    title2:  { zh: '让 AI 解释给你听。', en: 'let AI explain it.' },
    lede: {
      zh: 'LumiNote 是一个 Chrome 扩展 —— 在任何网页或 PDF 上选中文字或图像, 获得分层的 AI 解释, 把生成的"记忆卡"拖到你的玻璃质感灵感板上.',
      en: 'A Chrome extension that turns any selection on any page — text, image, PDF — into a layered AI explanation, then files it as a memory card on your own glassmorphic moodboard.',
    },
    cta:     { zh: '添加到 Chrome', en: 'Add to Chrome' },
    subcta:  { zh: '观看 2 分钟演示', en: 'Watch 2-min demo' },
    meta:    { zh: '免费 · Chrome / Edge / Brave · 不需要账号就能开始', en: 'Free · Chrome / Edge / Brave · No account required to start' },
  },
  stats: [
    { num: '3',        zh: '层解释深度',        en: 'Explain depths' },
    { num: '50/day',   zh: 'Pro 额度, AI 调用', en: 'Pro AI calls/day' },
    { num: '∞',        zh: '玻璃卡, 无限灵感板',   en: 'Cards per moodboard' },
    { num: 'MCP',      zh: 'Claude / Cursor 直连', en: 'Native Claude / Cursor' },
  ],
  demo: {
    eyebrow: { zh: '动手试试', en: 'Try it here' },
    title: { zh: '选中下面任意一句, 看 LumiNote 怎么工作.', en: 'Select any sentence below to see LumiNote in action.' },
    hint: { zh: '↑ 用鼠标划选一段文字, Mark 气泡会出现', en: '↑ Drag to select text, the Mark bubble appears' },
    articleTitle: { zh: '生物时间的几何', en: 'The geometry of biological time' },
    byline: { zh: 'Nature · 2026 年 4 月 · 7 分钟阅读', en: 'Nature · April 2026 · 7 min read' },
    passages: {
      zh: [
        '在漫长的演化历程中, 光的节律决定了行为的节律. 植物朝着太阳倾斜, 人类随着日出醒来. 昼夜节律以大约 24 小时为周期组织行为, 由光设定, 每个清晨重置. 看似是习惯的东西, 其实往往是一只钟.',
        '这套机制比动物更古老. PER 和 CRY 蛋白之间的几个反馈回路, 从蓝细菌到皮层神经元, 都几乎精确地以一天为周期在滴答作响. 它们每天会偏差几分钟; 光线在每个黎明到来时将它们重置.',
        '打乱这个信号 —— 倒班工作, 时差, 斯德哥尔摩没有光的一月 —— 会把身体的内部日推出与外部日的相位. 下游代价以毫克皮质醇, 几分认知表现, 以及几年的预期寿命来衡量.',
      ],
      en: [
        'For most of evolutionary history, the rhythm of light defined the rhythm of behavior. Plants tilt to the sun; humans wake with it. Circadian rhythms organize behavior on roughly 24-hour cycles, set by light and reset every morning. What looks like a habit is, very often, a clock.',
        'The mechanism turns out to be older than animals. A handful of feedback loops between proteins called PER and CRY tick at almost exactly a day, in cells from cyanobacteria to cortical neurons. They are wrong by a few minutes a day; light arrives every dawn to reset them.',
        'Disrupting that signal — shift work, jet lag, an unlit January in Stockholm — pushes the body\'s internal day out of phase with the external one. The downstream costs are measured in milligrams of cortisol, points of cognitive performance, and years of life expectancy.',
      ],
    },
  },
  flow: {
    eyebrow: { zh: '工作流', en: 'How it works' },
    title: { zh: '从一次划选, 到你自己的知识图谱.', en: 'From one selection to your own knowledge graph.' },
    steps: [
      { n: '01',
        zh_t: '标记 (Mark)',  en_t: 'Mark',
        zh: '在任何网页或 PDF 选中文字或图像. 绿色气泡贴着选区浮现, 点一下就是一次标记.',
        en: 'Select text or an image on any page or PDF. A green pill floats next to the selection. Click it to mark.',
      },
      { n: '02',
        zh_t: '解释 (Explain)',  en_t: 'Explain',
        zh: 'AI 卡片从右下角滑入. 分三层: 一句话简介, 详细语境, 深度阅读. 可切换, 可追问.',
        en: 'An AI card slides in from the bottom-right. Three depths: brief, detailed, deep. Switch any time, ask follow-ups.',
      },
      { n: '03',
        zh_t: '灵感板 (Moodboard)',  en_t: 'Moodboard',
        zh: '一次"保存", 记忆卡落到你的玻璃灵感板上. 随意拖拽, 分组, 标签, 导出为 PNG 或 JSON.',
        en: 'One Save, and the memory card lands on your glassmorphic moodboard. Drag, group, tag, export as PNG or JSON.',
      },
    ],
  },
  gallery: {
    eyebrow: { zh: '八个界面, 一个记忆层', en: 'Eight surfaces, one memory layer' },
    title: { zh: '你遇见 LumiNote 的每一个地方.', en: 'Every surface where you meet LumiNote.' },
    items: [
      { zh_t: '工具栏弹窗', en_t: 'Toolbar Popup', zh: '400×600 的迷你笔记本. Today / Calendar / Moodboards 三档, 搜索在顶部.', en: '400×600 mini notebook. Today / Calendar / Moodboards, search at the top.' },
      { zh_t: '标记气泡', en_t: 'Mark Bubble',    zh: '贴选区浮现的绿色药丸. 单击 Mark, 长按选择深度.', en: 'Green pill that floats next to your selection. Click to mark, long-press for depth.' },
      { zh_t: '解释卡片', en_t: 'Explain Card',    zh: '在页面右下角的玻璃卡. 三层深度切换, 流式输出, 一键保存.', en: 'Glass card bottom-right of the page. Three-depth toggle, streaming output, one-click save.' },
      { zh_t: '完整笔记本', en_t: 'Full Notebook',  zh: '一整页的 Today / Calendar / Day 时间线, 右侧是灵感板边栏和嵌入设置.', en: 'A full-page Today / Calendar / Day timeline, moodboard sidebar, embedded settings.' },
      { zh_t: '灵感板画布', en_t: 'Moodboard Canvas', zh: '玻璃卡的无限画布. 多选, 拖拽, 导出. 22px 圆角, 三层阴影.', en: 'Infinite glass-card canvas. Multi-select, drag, export. 22px radius, three shadow layers.' },
      { zh_t: 'Agent 面板', en_t: 'Agent Panel',   zh: '从右侧滑入. 可以读写你的记忆库, 行内显示工具调用回执.', en: 'Slides in from the right. Reads and writes your memory store; inline tool-call receipts.' },
      { zh_t: '设置 / 订阅', en_t: 'Settings',       zh: '云同步, AI 额度, 计划对比, 自定义 AI. 长得像 MD3, 但更克制.', en: 'Cloud sync, AI quota, plan compare, custom AI. MD3-flavored, more restrained.' },
      { zh_t: 'PDF 阅读器', en_t: 'PDF Viewer',    zh: '自托管的 pdf.js. 浮动按钮: 写笔记, 截图, 打开设置.', en: 'Self-hosted pdf.js. Floating action button: note, screenshot, settings.' },
    ],
  },
  agent: {
    eyebrow: { zh: '对 Claude / Cursor 开放', en: 'Open to Claude & Cursor' },
    title: { zh: '你的记忆, 任何 AI 都读得到.', en: 'Your memory, readable by any AI.' },
    lede: {
      zh: 'LumiNote 内置 Agent 可以读写同一个记忆库. 同样的 MCP 服务器也暴露给 Claude Desktop, Cursor, 和任何 MCP 兼容客户端 —— 让 AI 和你在同一份笔记上工作.',
      en: 'The built-in Agent reads and writes the same memory store. The same MCP server is exposed to Claude Desktop, Cursor, and any MCP-compatible client — so AI and you work from the same notes.',
    },
    tools: [
      { name: 'search_memories', zh: '按关键词、标签、时间筛选', en: 'filter by text, tag, time' },
      { name: 'read_memory',     zh: '按 id 读取单条记忆',     en: 'read a memory by id' },
      { name: 'create_memory',   zh: '写入新的记忆卡',          en: 'write a new memory card' },
      { name: 'add_moodboard_card', zh: '把记忆加到灵感板',    en: 'add memory to a moodboard' },
      { name: 'list_moodboards', zh: '列出所有灵感板',          en: 'list all moodboards' },
    ],
  },
  pricing: {
    eyebrow: { zh: '定价', en: 'Pricing' },
    title: { zh: '选一个适合你的计划.', en: 'Choose your plan.' },
    sub: { zh: '对比功能, 挑一个最合适的. 随时可以在 Customer Portal 取消.', en: 'Compare features and pick the one that fits you. Cancel anytime from the Customer Portal.' },
    monthly: { zh: '月付', en: 'Monthly' },
    yearly: { zh: '年付', en: 'Yearly' },
    save: { zh: '省 25%', en: 'save 25%' },
  },
  faq: {
    eyebrow: { zh: '常见问题', en: 'FAQ' },
    title: { zh: '问得最多的几个问题.', en: 'Most-asked questions.' },
    items: [
      { q_zh: '我的标记和笔记存在哪里?', q_en: 'Where is my data stored?',
        a_zh: '本地优先. 所有记忆首先写入浏览器本地存储. 登录后可以启用云同步 (免费档也支持), 数据采用端到端加密传输, 存在 Supabase 管理的 Postgres 上 (新加坡或法兰克福, 取决于你).',
        a_en: 'Local-first. Every memory is written to the browser first. Once signed in, you can turn on cloud sync (free tier included) — encrypted in transit, stored on Supabase-managed Postgres in Singapore or Frankfurt, your choice.' },
      { q_zh: 'AI 调用用的是哪家模型?', q_en: 'Which AI models power Explain?',
        a_zh: '免费和 Pro 默认用 gpt-4o-mini. 你也可以在设置里接入自己的 API Key —— 兼容 OpenAI, Anthropic Claude, Google Gemini, DeepSeek, 和任何 OpenAI 兼容端点. 用自己的 Key 不消耗额度.',
        a_en: 'Free and Pro default to gpt-4o-mini. In Settings you can plug in your own API key — OpenAI, Anthropic Claude, Google Gemini, DeepSeek, and any OpenAI-compatible endpoint. Your key, your quota.' },
      { q_zh: 'MCP 服务器怎么接入 Claude Desktop?', q_en: 'How do I connect the MCP server to Claude?',
        a_zh: '设置 → 集成 → 复制 MCP 配置片段, 粘贴到 claude_desktop_config.json. 重启 Claude Desktop, 你的记忆库就出现在工具面板里. Cursor / Cody / 其他 MCP 客户端同理.',
        a_en: 'Settings → Integrations → copy the MCP snippet, paste it into claude_desktop_config.json, restart Claude Desktop. Your memories show up in the tool panel. Cursor / Cody / other MCP clients work the same way.' },
      { q_zh: '可以离线用吗?', q_en: 'Can I use it offline?',
        a_zh: '基础的标记, 保存, 浏览笔记本, 整理灵感板 —— 都可以离线. AI 解释需要联网. 离线时你的操作会排队, 联网后自动同步.',
        a_en: 'Marking, saving, browsing the notebook, arranging the moodboard — all offline. Explain needs a network. Offline actions queue and auto-sync when you come back.' },
      { q_zh: '免费档有什么限制?', q_en: 'What are the limits on Free?',
        a_zh: '3 个灵感板, 每天 3 次内建 AI 调用. 记忆数量不限. 升级 Pro 去掉灵感板上限, 每天 50 次 AI, 还能拿到 Deep Think 和自动标签.',
        a_en: '3 moodboards, 3 built-in AI calls per day. Memories are unlimited. Upgrade to Pro for unlimited boards, 50 calls/day, Deep Think, and auto-tagging.' },
      { q_zh: '数据可以导出吗?', q_en: 'Can I export my data?',
        a_zh: '随时. Settings → Export 可以导出全部记忆为 JSON, 单个灵感板为 PNG 或 Markdown. 离开时带走你的东西 —— 这是默认行为, 不是功能.',
        a_en: 'Any time. Settings → Export gives you all memories as JSON, single moodboards as PNG or Markdown. Take your stuff when you leave — it\'s the default, not a feature.' },
    ],
  },
  privacy: {
    eyebrow: { zh: '你的数据, 属于你', en: 'Your data, yours' },
    title: { zh: '本地优先, 加密同步, 随时导出.', en: 'Local-first, encrypted sync, export any time.' },
    bullets: [
      { zh_t: '本地优先', en_t: 'Local-first',
        zh: '每一次标记都先写进浏览器. 没有网络也能工作, 断网也不丢东西.',
        en: 'Every mark lands in your browser first. Works offline, nothing lost when the network dies.' },
      { zh_t: '端到端加密同步', en_t: 'E2E encrypted sync',
        zh: '打开云同步, 传输全程 TLS, 存储使用 Supabase 管理的 Postgres. 服务器看不到明文内容.',
        en: 'Cloud sync uses TLS end-to-end, stored on Supabase Postgres. The server never sees plaintext content.' },
      { zh_t: '一键全量导出', en_t: 'One-click export',
        zh: 'JSON 导出全部记忆, PNG / Markdown 导出灵感板. 带着你的数据走, 不问为什么.',
        en: 'JSON for all memories, PNG / Markdown for any moodboard. Take it and go — no questions.' },
      { zh_t: '自带 API Key', en_t: 'Bring your own key',
        zh: '不想用我们的 AI 额度? 接入 OpenAI / Claude / Gemini / DeepSeek 任意兼容端点, 流量不经过我们.',
        en: 'Don\'t want our quota? Plug in OpenAI / Claude / Gemini / DeepSeek — traffic never touches us.' },
    ],
  },
  footer: {
    tagline: { zh: '标记, 理解, 记住. 在任何网页.', en: 'Mark, understand, remember. On any page.' },
    product: { zh: '产品', en: 'Product' },
    company: { zh: '公司', en: 'Company' },
    legal:   { zh: '条款', en: 'Legal' },
    copyright: { zh: '© 2026 LumiNote. 新加坡制造.', en: '© 2026 LumiNote. Made in Singapore.' },
  }
};

// Helper: t(key, lang) with dot path
const t = (obj, lang) => (obj && obj[lang]) || (obj && obj.en) || '';

Object.assign(window, { COPY, t });
