#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Luciferase B 版重排：删除完整对比表/底部摘要，突出验证数据、性能优势、产品信息。"""
import base64, os
ROOT='/Users/liuxinyuan/Desktop/Hermes输出-工作类'
LOGO=base64.b64encode(open('/tmp/luc_logo.png','rb').read()).decode()
REACT=base64.b64encode(open('/tmp/luc_reaction.jpg','rb').read()).decode()
QR=base64.b64encode(open('/Users/liuxinyuan/work/公司资料/试用装申请.png','rb').read()).decode()
OUT=os.path.join(ROOT,'对外物料/Luciferase_A4_优化版B_数据看板_20261027.html')

html=f'''<!DOCTYPE html><html lang="zh-CN"><head><meta charset="utf-8">
<title>Luciferase 产品资料｜验证数据与性能优势</title>
<style>
@page{{size:A4;margin:0}}
*{{box-sizing:border-box;margin:0;padding:0}}
html,body{{width:210mm;height:297mm;overflow:hidden}}
body{{font-family:"PingFang SC","Microsoft YaHei",-apple-system,sans-serif;color:#17324d;background:#fff;-webkit-print-color-adjust:exact;print-color-adjust:exact}}
.page{{width:210mm;height:297mm;padding:8mm 10mm 7mm;display:flex;flex-direction:column;position:relative;
background:radial-gradient(circle at 96% 3%,rgba(26,115,232,.10),transparent 18%),radial-gradient(circle at 3% 97%,rgba(30,142,90,.08),transparent 16%),#fff}}
.top{{display:flex;align-items:center;gap:3mm;border-bottom:.6pt solid #dbe6f0;padding-bottom:1.4mm;flex:0 0 auto}}
.top img{{height:8mm}}
.top .sl{{margin-left:auto;font-size:6.8pt;color:#1565c0;letter-spacing:.9pt}}
h1{{font-size:26pt;line-height:1.05;letter-spacing:.2pt;color:#0b3f7a}}
h2{{font-size:9pt;color:#0b3f7a;margin:0 0 1mm;display:flex;align-items:center;gap:2mm}}
h2:before{{content:"";width:1.2mm;height:3.4mm;background:#1a73e8;border-radius:.6mm}}
.small{{font-size:6.2pt;color:#5f7183;line-height:1.42}}
.hero{{margin-top:1.6mm;height:34mm;display:flex;align-items:flex-end;gap:4mm;border-bottom:2.5pt solid #1a73e8;padding-bottom:1.8mm;flex:0 0 auto}}
.hero .tag2{{font-size:6.3pt;color:#1a73e8;letter-spacing:.9pt;font-weight:600}}
.hero h1{{margin-top:.3mm}}
.hero h1 span{{font-size:12pt;font-weight:400;color:#415a70}}
.hero .sub{{font-size:8.1pt;color:#5f7183;margin-top:.7mm}}
.hero .code{{margin-left:auto;text-align:right;font-size:7pt;color:#415a70;line-height:1.55}}
.hero .code b{{font-size:10pt;color:#0b3f7a}}
.main{{display:grid;grid-template-columns:1.03fr .97fr;gap:3mm;height:205mm;margin-top:2.2mm;flex:0 0 auto}}
.left{{display:flex;flex-direction:column;gap:2mm;height:100%}}
.box{{border:.6pt solid #dbe6f0;border-radius:2mm;padding:2mm 2.6mm;background:#fff}}
.reaction img{{width:100%;display:block;margin-top:.4mm}}
.reaction .eq{{font-size:6pt;color:#415a70;margin-top:.6mm;line-height:1.38}}
.apps{{display:grid;grid-template-columns:repeat(3,1fr);gap:1.4mm;margin-top:.6mm}}
.app{{background:#f3f8fe;border-radius:1.2mm;padding:2mm 1.2mm;text-align:center;font-size:6pt;color:#5f7183;line-height:1.28}}
.app b{{display:block;color:#1a73e8;font-size:6.9pt;margin-bottom:.2mm}}
.app em{{display:block;font-style:normal;color:#17456e;font-size:6.2pt}}
.appbox{{display:flex;flex-direction:column}}
.flow{{margin-top:auto;display:grid;grid-template-columns:1fr 1fr;gap:1.4mm;padding-top:2mm}}
.flow div{{background:#f3f8fe;border-radius:1.2mm;padding:1.4mm 1.8mm;font-size:6pt;color:#41647f}}
.flow b{{color:#1a73e8;font-size:6.4pt;margin-right:1mm}}
.samples{{display:flex;flex-wrap:wrap;gap:1.2mm;padding-top:1.8mm}}
.samples span{{font-size:5.9pt;color:#41647f;background:#eaf4ff;border-radius:1mm;padding:.6mm 1.6mm}}
.method{{margin-top:auto;background:rgba(255,255,255,.07);border:1px solid rgba(140,243,255,.16);border-radius:1.5mm;padding:2mm 2.2mm;display:grid;grid-template-columns:1fr 1fr;gap:1.4mm 2mm}}
.method b{{display:block;font-size:6pt;color:#9ff4ff}}
.method span{{display:block;font-size:5.8pt;color:#dff6ff;line-height:1.35}}
.perfbox{{flex:1;display:flex;flex-direction:column;justify-content:center}}
.prow{{padding:1.8mm 0;border-bottom:.5pt solid #e3edf6}}
.prow:last-child{{border-bottom:0}}
.prow b{{display:block;font-size:7.6pt;color:#0b3f7a}}
.prow span{{display:block;font-size:6.1pt;color:#5f7183;line-height:1.4;margin-top:.5mm}}
.prow em{{font-style:normal;color:#1a73e8;font-weight:700}}
table{{width:100%;border-collapse:collapse;font-size:6.5pt}}
th{{background:#eaf3fd;color:#17456e;text-align:left;padding:.85mm 1.2mm;border:.5pt solid #cfe0ef;font-weight:600}}
td{{padding:.85mm 1.2mm;border:.5pt solid #dbe6f0;vertical-align:top}}
td b{{color:#0b2a4a}}
.forms2{{display:flex;gap:1.6mm;margin-top:1.4mm}}
.forms2 .f{{flex:1;background:#f3f8fe;border-radius:1.2mm;padding:1.5mm;text-align:center;font-size:6pt;color:#5f7183}}
.forms2 .f b{{display:block;font-size:7.2pt;color:#17456e;margin-bottom:.2mm}}
.dash{{background:linear-gradient(160deg,#0b2f57,#0e4d8a 55%,#1264b8);border-radius:2.4mm;color:#fff;padding:3mm 3.2mm;display:flex;flex-direction:column;gap:2mm;height:100%}}
.dash .ttl{{font-size:8.8pt;letter-spacing:.6pt;opacity:.97;display:flex;align-items:baseline;gap:2mm}}
.dash .ttl span{{font-size:5.9pt;opacity:.7;letter-spacing:0;margin-left:auto}}
.dash .row{{display:flex;gap:2mm}}
.metric{{flex:1;background:rgba(255,255,255,.11);border:1px solid rgba(255,255,255,.2);border-radius:1.5mm;padding:2mm 1.8mm}}
.metric b{{display:block;font-size:20pt;line-height:1.02}}
.metric span{{font-size:6.1pt;opacity:.9;line-height:1.3;display:block;margin-top:.2mm}}
.metric .cmp{{font-size:5.8pt;opacity:.72;margin-top:.6mm}}
.chartbox{{background:rgba(255,255,255,.97);border-radius:1.5mm;padding:1.8mm 2.1mm}}
.chartbox .ct{{font-size:6.6pt;color:#17456e;font-weight:600;margin-bottom:.5mm}}
.chartbox svg{{width:100%;height:auto;display:block}}
.chartbox.sig svg{{max-height:31mm}}
.chartbox.ret svg{{max-height:63mm}}
.note{{font-size:5.9pt;opacity:.82;line-height:1.4}}
.perf{{display:grid;grid-template-columns:repeat(3,1fr);gap:2.4mm;height:28mm;margin-top:2mm;flex:0 0 auto}}
.perf .p{{background:#f3f8fe;border:.5pt solid #d7e6f7;border-radius:1.8mm;padding:2.2mm 2.6mm;display:flex;flex-direction:column;justify-content:center}}
.perf .p b{{font-size:8.2pt;color:#0b3f7a}}
.perf .p span{{font-size:6.1pt;color:#5f7183;line-height:1.4;margin-top:.8mm}}
.perf .p em{{font-style:normal;color:#1a73e8;font-weight:700}}
.footer{{margin-top:auto;border-top:.6pt solid #dbe6f0;padding-top:1.2mm;display:flex;align-items:center;gap:3.5mm;flex:0 0 auto}}
.footer .qr{{width:15mm;flex:0 0 15mm;display:flex;flex-direction:column;align-items:center;gap:.5mm}}
.footer .qr img{{width:11.5mm;height:11.5mm;object-fit:contain;display:block}}
.footer .vt{{font-size:5.4pt;color:#415a70;line-height:1;white-space:nowrap}}
.footer .info{{font-size:6.2pt;line-height:1.5;color:#415a70}}.footer .info b{{color:#0b3f7a;font-size:6.9pt}}
.footer .slogan{{margin-left:auto;text-align:right;font-size:6.1pt;color:#1565c0;letter-spacing:.5pt}}
</style></head><body><div class="page">
<div class="top"><img src="data:image/png;base64,{LOGO}"><span class="sl">守护生命健康，缔造美好生活</span></div>

<div class="hero"><div><div class="tag2">RECOMBINANT FIREFLY LUCIFERASE</div>
<h1>Luciferase <span>萤火虫荧光素酶</span></h1>
<div class="sub">基因工程改造 · 高信号 · 耐温稳 · 可冻干</div></div>
<div class="code"><b>E800系列</b><br>1 mg/mL<br>甘油液体 / 冻干粉</div></div>

<div class="main">
  <div class="left">
    <div class="box"><h2>产品信息</h2>
      <table>
        <tr><th style="width:22%">产品</th><td><b>Luciferase</b></td><th style="width:18%">货号</th><td><b>E800系列</b></td></tr>
        <tr><th>规格</th><td><b>1 mg/mL</b></td><th>形式</th><td>甘油液体 / 冻干粉</td></tr>
      </table>
      <div class="forms2"><div class="f"><b>甘油液体</b>1 mg/mL</div><div class="f"><b>冻干粉</b>稳定 / 定制</div><div class="f"><b>定制</b>浓度/缓冲/规格</div></div>
      <p class="small" style="margin-top:1.2mm">保存：−20℃ 长期保存，避免反复冻融；冻干粉按说明书复溶。</p>
    </div>

    <div class="box"><h2>反应原理</h2><div class="reaction"><img src="data:image/jpeg;base64,{REACT}"><div class="eq">D-Luciferin + ATP + O₂ → Oxyluciferin + AMP + CO₂ + PPi + 光（Mg²⁺ 参与）</div></div></div>

    <div class="box appbox"><h2>应用方向</h2><div class="apps">
      <div class="app"><b>ATP</b><em>检测与定量</em>细胞、微生物</div>
      <div class="app"><b>REPORT</b><em>报告基因</em>启动子活性</div>
      <div class="app"><b>CELL</b><em>活力/代谢</em>增殖与毒性</div>
      <div class="app"><b>KIT</b><em>试剂盒开发</em>核心酶原料</div>
      <div class="app"><b>IVD</b><em>体外诊断原料</em>发光体系</div>
      <div class="app"><b>RESEARCH</b><em>分子生物学</em>基因表达</div>
    </div></div>

    <div class="box perfbox"><h2>性能优势</h2>
      <div class="prow"><b>信号更强 · 用量更省</b><span>同酶量下 RLU 约为竞品 <em>3 倍</em>；同等信号要求下可减少酶用量。</span></div>
      <div class="prow"><b>耐温更稳 · 运输更宽容</b><span>37℃ 7 天 <em>74%</em>、25℃ 7 天 <em>77%</em>；冻干后性能稳定。</span></div>
      <div class="prow"><b>形式灵活 · 按需定制</b><span>甘油液体 / 冻干粉；浓度、缓冲体系、规格可定制。</span></div>
    </div>

    <div class="box"><h2>检测体系</h2><p class="small">底物 D-Luciferin · 辅因子 ATP / Mg²⁺ · 读出 化学发光 RLU</p></div>
  </div>

  <div class="dash">
    <div class="ttl">验证数据 / VALIDATION <span>同酶量对比</span></div>
    <div class="row">
      <div class="metric"><b>3×</b><span>荧光信号</span><div class="cmp">Luciferase vs Supplier N</div></div>
      <div class="metric"><b>74%</b><span>37℃ 7 天活力</span><div class="cmp">竞品 40%</div></div>
      <div class="metric"><b>77%</b><span>25℃ 7 天活力</span><div class="cmp">竞品 55%</div></div>
    </div>
    <div class="chartbox sig"><div class="ct">相对信号（同酶量）</div>
      <svg viewBox="0 0 300 90">
        <rect x="0" y="10" width="230" height="24" rx="4" fill="#1a73e8"/><text x="240" y="28" font-size="14" fill="#0b3f7a" font-weight="700">100</text>
        <rect x="0" y="50" width="76" height="24" rx="4" fill="#c7d3df"/><text x="86" y="68" font-size="14" fill="#7b8ea2">33</text>
        <text x="0" y="88" font-size="8" fill="#415a70">Luciferase</text><text x="160" y="88" font-size="8" fill="#7b8ea2">Supplier N</text>
      </svg></div>
    <div class="chartbox ret"><div class="ct">7 天活力保留（%）</div>
      <svg viewBox="0 0 300 210">
        <line x1="22" y1="175" x2="292" y2="175" stroke="#dbe6f0"/>
        <line x1="22" y1="60" x2="292" y2="60" stroke="#eef3f8"/>
        <rect x="42" y="66" width="30" height="109" rx="3" fill="#1a73e8"/><text x="45" y="59" font-size="11" fill="#0b3f7a" font-weight="700">74</text>
        <rect x="76" y="116" width="30" height="59" rx="3" fill="#c7d3df"/><text x="79" y="109" font-size="11" fill="#7b8ea2">40</text>
        <rect x="138" y="60" width="30" height="115" rx="3" fill="#1a73e8"/><text x="141" y="53" font-size="11" fill="#0b3f7a" font-weight="700">77</text>
        <rect x="172" y="93" width="30" height="82" rx="3" fill="#c7d3df"/><text x="175" y="86" font-size="11" fill="#7b8ea2">55</text>
        <rect x="234" y="43" width="30" height="132" rx="3" fill="#1a73e8"/><text x="237" y="36" font-size="11" fill="#0b3f7a" font-weight="700">90</text>
        <rect x="268" y="48" width="24" height="127" rx="3" fill="#c7d3df"/><text x="268" y="41" font-size="11" fill="#7b8ea2">88</text>
        <text x="45" y="195" font-size="8" fill="#415a70">37℃</text><text x="141" y="195" font-size="8" fill="#415a70">25℃</text><text x="237" y="195" font-size="8" fill="#415a70">4℃</text>
        <text x="104" y="208" font-size="7" fill="#7b8ea2">本品</text><text x="184" y="208" font-size="7" fill="#7b8ea2">竞品</text>
      </svg></div>
    <div class="note">加速稳定性：4℃/25℃/37℃、0/2/4/7 天；信号为化学发光 RLU，活力以 0 天为 100%。竞品为 Supplier N。</div>
    <div class="method"><div><b>检测体系</b><span>化学发光 RLU</span></div><div><b>对照</b><span>Supplier N，同酶量</span></div><div><b>条件</b><span>4℃ / 25℃ / 37℃</span></div><div><b>判读</b><span>0 天活力 = 100%</span></div></div>
  </div>
</div>

<div class="footer"><div class="qr"><img src="data:image/png;base64,{QR}"><span class="vt">扫码申请试用</span></div>
<div class="info"><b>珠海宝锐生物科技有限公司</b><br>0756-8699969 ｜ marketing@biori.com ｜ www.biori.com<br>广东省珠海市香洲区水岸一路 88 号</div>
<div class="slogan">BIORI BIOTECH<br>守护生命健康，缔造美好生活</div></div>
</div></body></html>'''
open(OUT,'w',encoding='utf-8').write(html)
print('saved',OUT,len(html))
