/* 由 tools/port_story.py 从原文 <style> 自动生成，作用域 .cvi-story */
.cvi-story{--ink:#1f2933;--muted:#5f6c7b;--bg:#f7f5f0;--card:#fff;--accent:#b4472b;--accent2:#1f5f8b;--gold:#c99a2e;--green:#2f7d5b;--line:#e4dfd3;}
.cvi-story, .cvi-story *{box-sizing:border-box}
.cvi-story{margin:0;background:var(--bg);color:var(--ink);font-family:"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans CJK SC","Source Han Sans SC",sans-serif;line-height:1.85;font-size:16.5px}
.cvi-story header.hero{background:linear-gradient(135deg,#1d2b3a 0%,#2c4a63 60%,#7a3b26 100%);color:#fff;padding:56px 24px 44px}
.cvi-story .wrap{max-width:1020px;margin:0 auto;padding:0 22px}
.cvi-story .hero .issue{letter-spacing:.25em;font-size:13px;opacity:.8}
.cvi-story .hero h1{font-family:"Songti SC","STSong","Noto Serif CJK SC","Source Han Serif SC",serif;font-size:38px;line-height:1.35;margin:10px 0 8px}
.cvi-story .hero .sub{font-size:18px;opacity:.92}
.cvi-story .paperbox{margin-top:22px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.25);border-radius:12px;padding:14px 18px;font-size:14.5px}
.cvi-story .paperbox a{color:#ffd9a8}
.cvi-story nav.toc{position:sticky;top:0;z-index:10;background:rgba(247,245,240,.96);backdrop-filter:blur(6px);border-bottom:1px solid var(--line)}
.cvi-story nav.toc .wrap{display:flex;gap:4px;overflow-x:auto;padding:8px 22px}
.cvi-story nav.toc a{white-space:nowrap;text-decoration:none;color:var(--muted);font-size:14px;padding:4px 10px;border-radius:20px}
.cvi-story nav.toc a:hover{background:#ebe5d8;color:var(--ink)}
.cvi-story section{padding:34px 0 10px}
.cvi-story h2{font-family:"Songti SC","STSong","Noto Serif CJK SC",serif;font-size:27px;border-left:6px solid var(--accent);padding-left:14px;margin:10px 0 18px}
.cvi-story h3{font-size:19px;margin:26px 0 8px;color:var(--accent2)}
.cvi-story p{margin:10px 0}
.cvi-story .lead{font-size:18px;color:#3a4652}
.cvi-story .num{font-family:"SF Mono",Menlo,Consolas,monospace;color:var(--accent);font-weight:600;white-space:nowrap}
.cvi-story .card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:18px 20px;margin:18px 0;box-shadow:0 2px 10px rgba(0,0,0,.03)}
.cvi-story .kp{background:linear-gradient(180deg,#fffaf0,#fff);border:1px solid #ecd9a8;border-left:6px solid var(--gold);border-radius:12px;padding:14px 18px;margin:20px 0}
.cvi-story .kp .tag{display:inline-block;background:var(--gold);color:#fff;font-size:12.5px;border-radius:4px;padding:1px 8px;margin-right:8px;letter-spacing:.05em}
.cvi-story .kp h4{display:inline;font-size:17px;margin:0}
.cvi-story .kp p,.cvi-story .kp li{font-size:15.5px}
.cvi-story .kp .formula{font-family:"Cambria Math","Latin Modern Math","Times New Roman",serif;background:#fbf4e2;border-radius:6px;padding:6px 10px;margin:8px 0;overflow-x:auto;white-space:nowrap;font-size:16px}
.cvi-story .warn{background:#fff3f0;border:1px solid #f0c4b8;border-left:6px solid var(--accent);border-radius:12px;padding:12px 18px;margin:18px 0;font-size:15.5px}
.cvi-story .note{font-size:13.5px;color:var(--muted)}
.cvi-story .badge-real{display:inline-block;background:#e3f1ea;color:var(--green);border:1px solid #b6dcc8;border-radius:4px;font-size:12.5px;padding:0 7px;margin-left:6px}
.cvi-story .badge-demo{display:inline-block;background:#fdecea;color:#b3261e;border:1px solid #f2b8b5;border-radius:4px;font-size:12.5px;padding:0 7px;margin-left:6px;font-weight:700}
.cvi-story .badge-re{display:inline-block;background:#e8f0f8;color:var(--accent2);border:1px solid #bcd3e8;border-radius:4px;font-size:12.5px;padding:0 7px;margin-left:6px}
.cvi-story .chartbox{position:relative;height:360px}
.cvi-story .ctrl{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:8px 0 10px;font-size:14px}
.cvi-story .ctrl button{border:1px solid var(--line);background:#faf8f3;border-radius:18px;padding:3px 12px;cursor:pointer;font-size:13.5px;font-family:inherit}
.cvi-story .ctrl button.on{background:var(--accent2);color:#fff;border-color:var(--accent2)}
.cvi-story .ctrl label{cursor:pointer}
.cvi-story table{border-collapse:collapse;width:100%;font-size:14.5px;margin:8px 0}
.cvi-story th,.cvi-story td{border-bottom:1px solid var(--line);padding:6px 8px;text-align:center}
.cvi-story th{background:#f1ece1;font-weight:600}
.cvi-story td:first-child,.cvi-story th:first-child{text-align:left}
.cvi-story .flow{display:flex;flex-wrap:wrap;align-items:stretch;gap:0;margin:16px 0}
.cvi-story .flow .step{flex:1 1 150px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px;text-align:center;position:relative;margin:6px 16px 6px 0}
.cvi-story .flow .step:not(:last-child)::after{content:"➜";position:absolute;right:-17px;top:40%;color:var(--accent);font-size:16px}
.cvi-story .flow .step b{display:block;font-size:24px;color:var(--accent);font-family:Menlo,monospace}
.cvi-story .flow .step>span{font-size:13.5px;color:var(--muted)}
.cvi-story .timeline{position:relative;margin:20px 0 10px;padding:0 0 0 26px;border-left:3px solid #d8cdb5}
.cvi-story .timeline .ev{position:relative;margin:0 0 16px}
.cvi-story .timeline .ev::before{content:"";position:absolute;left:-34px;top:7px;width:13px;height:13px;border-radius:50%;background:var(--accent2);border:3px solid #fff;box-shadow:0 0 0 2px var(--accent2)}
.cvi-story .timeline .ev .t{font-weight:700;color:var(--accent2)}
.cvi-story .grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
@media(max-width:760px){.cvi-story .grid2{grid-template-columns:1fr}
.cvi-story .hero h1{font-size:28px}}
.cvi-story .mech{border-radius:12px;padding:14px;border:1px solid var(--line);background:#fff}
.cvi-story .mech h4{margin:0 0 6px}
.cvi-story .verdict{display:inline-block;font-size:13px;border-radius:4px;padding:1px 8px;margin-top:6px}
.cvi-story .v-yes{background:#e3f1ea;color:var(--green)}
.cvi-story .v-no{background:#fdecea;color:#b3261e}
.cvi-story .v-mid{background:#fff4d6;color:#8a6500}
.cvi-story details{background:#fff;border:1px solid var(--line);border-radius:10px;padding:10px 14px;margin:10px 0}
.cvi-story details summary{cursor:pointer;font-weight:600}
.cvi-story .q{counter-increment:q}
.cvi-story footer{margin-top:40px;padding:26px 0 50px;border-top:1px solid var(--line);font-size:13.5px;color:var(--muted)}
.cvi-story .kpindex{display:flex;flex-wrap:wrap;gap:6px}
.cvi-story .kpindex a{font-size:13px;text-decoration:none;background:#fbf4e2;border:1px solid #ecd9a8;color:#7a5a12;border-radius:14px;padding:2px 10px}
.cvi-story .statline{display:flex;flex-wrap:wrap;gap:12px;margin:14px 0}
.cvi-story .stat{flex:1 1 180px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px 14px}
.cvi-story .stat b{display:block;font-size:26px;color:var(--accent);font-family:Menlo,monospace}
.cvi-story .stat>span{font-size:13.5px;color:var(--muted)}
.cvi-story .plot{width:100%;height:100%}
.cvi-story img.mplfig{display:block;max-width:100%;height:auto;margin:0 auto}
.cvi-story .kp .formula{font-family:inherit;white-space:normal}
:where(.cvi-story) .katex{font-size:1.05em}
:where(.cvi-story) .katex-display{margin:.3em 0;overflow-x:auto;overflow-y:hidden;padding:2px 0}
.cvi-story .formula .katex-display{margin:0}
.cvi-story .tw{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:8px 0}
.cvi-story .tw table{margin:0;min-width:520px}
.cvi-story .stat>b .katex,.cvi-story .flow .step>b .katex{font-size:1em;color:inherit}
.cvi-story details.tech{font-size:13px;color:var(--muted);background:transparent;border:none;padding:0}
@media(max-width:600px){.cvi-story{font-size:15.5px}
.cvi-story .wrap{padding:0 14px}
.cvi-story .card,.cvi-story .kp{padding:12px 12px}
.cvi-story h2{font-size:22px}
.cvi-story .hero h1{font-size:26px}
.cvi-story .flow .step{margin-right:0;flex-basis:100%}
.cvi-story .flow .step:not(:last-child)::after{content:"⬇";right:auto;left:50%;top:auto;bottom:-15px}
.cvi-story .flow .step{margin-bottom:14px}
.cvi-story .chartbox{height:340px!important}}
.cvi-story .plain{background:#fff8ec;border-left:4px solid #e3a24a;padding:9px 13px;margin:8px 0 10px;border-radius:4px;line-height:1.8}
.cvi-story .plain>b.pl{color:#a5621c;margin-right:6px}
.cvi-story .figbox{margin:4px 0}
.cvi-story .ctrl button.go{background:var(--accent);color:#fff;border-color:var(--accent)}
.cvi-story .pmfunds{display:flex;flex-wrap:wrap;gap:5px;margin:8px 0 4px}
.cvi-story .pmfunds span{font-size:12.5px;line-height:1.5;border:1px solid var(--line);border-radius:12px;padding:1px 8px;background:#faf8f3;transition:background .15s,color .15s}
.cvi-story .pmfunds span.pick{background:var(--gold);color:#fff;border-color:var(--gold)}
.cvi-story .pmfunds span.real{box-shadow:inset 0 0 0 2px var(--accent)}
.cvi-story .pmstats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:10px 0}
.cvi-story .pmstats .stat{padding:8px 12px;min-width:0}
.cvi-story .pmstats .stat b{font-size:18px;white-space:nowrap;overflow-wrap:normal}
.cvi-story .pmstats .pmex b{color:#1f2933}
.cvi-story .pmconv{height:250px;margin-top:6px}
@media(max-width:600px){.cvi-story .pmstats{grid-template-columns:repeat(2,minmax(0,1fr))}
.cvi-story .pmstats .stat{padding:7px 9px}
.cvi-story .pmstats .stat b{font-size:15px;white-space:normal;word-break:keep-all}
.cvi-story .pmconv{height:240px}}