/* hst-tools.css · 图表库、交互式报告与在线作图工具共用样式（基于 v2.css 变量；在 v2.css 之后加载） */

/* ---------- 图表（hstcharts.js） ---------- */
.hstc{position:relative;width:100%;min-width:0;font-family:var(--font,system-ui,sans-serif);color:var(--ink,#15202b)}
.hstc-stage{position:relative;width:100%;min-width:0;overflow:hidden;touch-action:pan-y;outline:none;user-select:none;-webkit-user-select:none}
.hstc-stage:focus-visible{box-shadow:0 0 0 3px rgba(46,169,160,.35);border-radius:4px}
.hstc-layer{position:absolute;left:0;top:0;line-height:0}
.hstc-layer svg{display:block;overflow:visible;font-family:inherit}
.hstc-canvas{pointer-events:none}
.hstc-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 12px;margin-top:8px}
.hstc-legend{display:flex;flex-wrap:wrap;gap:4px 6px;min-width:0}
.hstc-key{display:inline-flex;align-items:center;gap:6px;font:inherit;font-size:12.5px;line-height:1.3;color:var(--ink,#15202b);background:#fff;border:1px solid var(--line,#e3e8ef);border-radius:999px;padding:3px 10px 3px 8px;cursor:pointer;max-width:100%;text-align:left}
.hstc-key:hover{border-color:var(--teal,#2ea9a0)}
.hstc-key i{flex:none;width:10px;height:10px;border-radius:50%;display:inline-block;box-sizing:border-box}
.hstc-key.off{color:var(--mute,#7b8794);background:var(--paper,#f5f7fa);text-decoration:line-through}
.hstc-key.off i{opacity:.3}
.hstc-zoom{display:flex;align-items:center;gap:4px;margin-left:auto}
.hstc-hint{font-size:12px;color:var(--mute,#7b8794);margin-right:4px}
.hstc-btn{font:inherit;font-size:13px;min-width:30px;height:28px;padding:0 8px;border:1px solid var(--line-2,#cfd7e2);border-radius:6px;background:#fff;color:var(--navy,#0b2545);cursor:pointer}
.hstc-btn:hover{border-color:var(--navy,#0b2545)}
.hstc-btn[hidden]{display:none}
.hstc-tip{position:absolute;display:none;z-index:5;pointer-events:none;max-width:260px;background:rgba(11,37,69,.95);color:#fff;font-size:12.5px;line-height:1.5;padding:7px 10px;border-radius:6px;box-shadow:0 4px 14px rgba(11,37,69,.18);word-break:break-word}
.hstc-tip b{color:#fff;font-weight:600}
.hstc-tip .hstc-tip-m{color:rgba(255,255,255,.75)}
.hstc-sw{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:5px;vertical-align:middle}
.hstc-hl{position:absolute;display:none;border:2px solid var(--navy,#0b2545);border-radius:50%;pointer-events:none;box-sizing:border-box;background:rgba(255,255,255,.25)}
.hstc-guide{position:absolute;display:none;width:0;border-left:1px dashed var(--slate,#4b5665);pointer-events:none}
.hstc-brush{position:absolute;display:none;border:1px solid var(--teal,#2ea9a0);background:rgba(46,169,160,.12);pointer-events:none}
@media (max-width:600px){.hstc-hint{display:none}}
@media (hover:none){.hstc-hint{display:none}}

/* ---------- 交互式报告（hst-report-viewer.js） ---------- */
.hstr{min-width:0}
.hstr-head{padding:8px 0 18px;border-bottom:1px solid var(--line)}
.hstr-title{font-size:32px;margin:6px 0 8px;color:var(--navy)}
.hstr-sub{color:var(--slate);font-size:16.5px;margin:0 0 14px}
.hstr-meta{display:flex;flex-wrap:wrap;gap:8px 28px;margin:0;font-size:14px}
.hstr-meta>div{display:flex;gap:8px;min-width:0}
.hstr-meta dt{color:var(--mute);font-weight:500;margin:0}
.hstr-meta dd{margin:0;color:var(--ink);font-weight:600;overflow-wrap:anywhere}
.hstr-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:22px 0 8px}
.hstr-kpi{border:1px solid var(--line);border-radius:var(--radius);padding:14px 16px;background:#fff}
.hstr-kpi .n{font-size:26px;font-weight:700;color:var(--navy);line-height:1.2;font-variant-numeric:tabular-nums}
.hstr-kpi .l{font-size:13px;color:var(--slate);margin-top:4px}
.hstr-toc{display:flex;flex-wrap:wrap;gap:6px;margin:18px 0 4px;position:sticky;top:0;z-index:4;background:rgba(255,255,255,.96);padding:8px 0;border-bottom:1px solid var(--line)}
.hstr-toc a{font-size:13px;font-weight:600;color:var(--navy);border:1px solid var(--line-2);border-radius:999px;padding:4px 12px;text-decoration:none;white-space:nowrap}
.hstr-toc a:hover{border-color:var(--teal);color:var(--teal-ink)}
.hstr-sec{padding:30px 0 6px;scroll-margin-top:56px}
.hstr-sec>h2{font-size:24px;margin:0 0 16px;color:var(--navy)}
.hstr-text p{color:var(--slate);font-size:15.5px;margin:0 0 12px;max-width:860px}
.hstr-text.hstr-note{background:var(--teal-soft);border-left:4px solid var(--teal);border-radius:0 var(--radius-s) var(--radius-s) 0;padding:12px 16px;margin:0 0 16px}
.hstr-text.hstr-note p{color:var(--teal-ink);margin:0 0 6px}
.hstr-text.hstr-quote{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:14px 18px;margin:0 0 16px}
.hstr-text.hstr-quote p{margin:0;font-size:14.5px}
.hstr-list{margin:0 0 16px;max-width:860px}
.hstr-fig{margin:0 0 22px;border:1px solid var(--line);border-radius:var(--radius);background:#fff;padding:14px 16px 12px;min-width:0}
.hstr-ftitle{font-weight:600;color:var(--navy);font-size:15.5px;margin:0 0 10px}
.hstr-fig figcaption{font-size:13.5px;color:var(--slate);margin-top:10px;padding-top:10px;border-top:1px solid var(--line)}
.hstr-chart-host{min-width:0}
.hstr-ctools{display:flex;gap:6px;justify-content:flex-end;margin-top:8px}
.hstr-cbtn,.hstr-pbtn{font:inherit;font-size:12.5px;font-weight:600;color:var(--navy);background:#fff;border:1px solid var(--line-2);border-radius:999px;padding:4px 12px;cursor:pointer}
.hstr-cbtn:hover,.hstr-pbtn:hover:not(:disabled){border-color:var(--teal);color:var(--teal-ink)}
.hstr-pbtn{border-radius:6px;min-width:34px;font-size:15px;padding:2px 8px}
.hstr-pbtn:disabled{opacity:.4;cursor:default}
.hstr-img img{display:block;width:100%;height:auto;max-width:860px;margin:0 auto}
.hstr-tblock{margin:0 0 24px;min-width:0}
.hstr-ttools{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;justify-content:space-between;margin-bottom:8px}
.hstr-filter{font:inherit;font-size:14px;border:1px solid var(--line-2);border-radius:8px;padding:7px 10px;width:220px;max-width:100%;color:var(--ink);background:#fff}
.hstr-filter:focus{outline:none;border-color:var(--teal);box-shadow:0 0 0 3px rgba(46,169,160,.18)}
.hstr-dl{font-size:13.5px;font-weight:600;color:var(--teal-ink)}
.hstr-t{font-size:13.5px}
.hstr-t th{padding:0}
.hstr-sort{font:inherit;font-weight:600;color:var(--navy);background:none;border:none;padding:9px 12px;cursor:pointer;text-align:left;width:100%;white-space:nowrap}
.hstr-sort::after{content:" ↕";color:var(--mute);font-weight:400}
th[aria-sort=ascending] .hstr-sort::after{content:" ↑";color:var(--teal-ink)}
th[aria-sort=descending] .hstr-sort::after{content:" ↓";color:var(--teal-ink)}
.hstr-t td{padding:8px 12px;overflow-wrap:anywhere}
.hstr-t td.num{font-variant-numeric:tabular-nums;white-space:nowrap}
.hstr-empty{text-align:center;color:var(--mute)}
.hstr-pager{display:flex;align-items:center;gap:10px;justify-content:flex-end;margin-top:8px;font-size:13px;color:var(--slate)}
.hstr-tcap{font-size:13.5px;color:var(--slate);margin:8px 0 0}
.hstr-dls{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.hstr-nolink{font-size:13.5px;color:var(--slate);overflow-wrap:anywhere}
.hstr-dls .v2-btn{padding:9px 16px;font-size:14px}

/* ---------- 交互式报告独立页 ---------- */
.hsti-top{border-bottom:1px solid var(--line);background:#fff}
.hsti-top .container{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:60px;flex-wrap:wrap;padding-top:8px;padding-bottom:8px}
.hsti-top img{height:34px;width:auto;display:block}
.hsti-links{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:14px}
.hsti-links a{color:var(--navy);text-decoration:none;font-weight:500}
.hsti-links a:hover{color:var(--teal-ink)}
.hsti-main{padding:22px 0 56px}
.hsti-foot{border-top:1px solid var(--line);padding:22px 0 30px;font-size:13.5px;color:var(--slate);background:var(--paper)}
.hsti-foot p{margin:0 0 6px}

/* ---------- 在线作图工具 ---------- */
.hstt-layout{display:grid;grid-template-columns:minmax(0,360px) minmax(0,1fr);gap:22px;align-items:start}
.hstt-panel{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:18px 18px 16px;min-width:0}
.hstt-panel h3{font-size:16px;margin:0 0 10px;color:var(--navy)}
.hstt-panel+.hstt-panel{margin-top:14px}
.hstt-field{margin:0 0 12px;min-width:0}
.hstt-field label,.hstt-field .lab{display:block;font-size:13.5px;font-weight:600;color:var(--navy);margin:0 0 5px}
.hstt-field .help{font-size:12.5px;color:var(--mute);margin:4px 0 0}
.hstt-field input[type=number],.hstt-field input[type=text],.hstt-field select,.hstt-field textarea{width:100%;box-sizing:border-box;font:inherit;font-size:14px;border:1px solid var(--line-2);border-radius:8px;padding:8px 10px;color:var(--ink);background:#fff}
.hstt-field textarea{min-height:150px;font-family:var(--mono);font-size:12.5px;line-height:1.5;resize:vertical;white-space:pre;overflow:auto}
.hstt-field input:focus,.hstt-field select:focus,.hstt-field textarea:focus{outline:none;border-color:var(--teal);box-shadow:0 0 0 3px rgba(46,169,160,.18)}
.hstt-field input[type=file]{font-size:13px;max-width:100%}
.hstt-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.hstt-check{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--ink);margin:0 0 10px}
.hstt-btns{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 12px}
.hstt-btns .v2-btn{padding:9px 14px;font-size:14px}
.hstt-msg{font-size:13.5px;color:var(--slate);margin:6px 0 0;min-height:1.2em}
.hstt-msg.err{color:#b3261e}
.hstt-preview{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:16px;min-width:0}
.hstt-preview h3{font-size:16px;margin:0 0 10px;color:var(--navy)}
.hstt-stats{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.hstt-stats span{font-size:13px;font-weight:600;color:var(--navy);background:var(--paper);border:1px solid var(--line);border-radius:999px;padding:3px 11px}
.hstt-empty{padding:48px 12px;text-align:center;color:var(--mute);font-size:14.5px;border:1px dashed var(--line-2);border-radius:var(--radius)}
.hstt-export{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.hstt-export .v2-btn{padding:9px 14px;font-size:14px}
.hstt-privacy{display:flex;gap:10px;align-items:flex-start}
.hstt-cards .v2-card h3 a{color:inherit;text-decoration:none}
.hstt-cards .v2-card .v2-actions{margin-top:auto;padding-top:8px}

/* 报告图表的调整控件（阈值、配色、点大小）与联动表 */
.hstr-ctl:empty{display:none}
.hstr-vctl{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:8px 16px;margin:0 0 10px;padding:10px 12px;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius-s)}
.hstr-crow{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px 14px;min-width:0}
.hstr-cf{display:flex;flex-direction:column;gap:3px;font-size:12.5px;font-weight:600;color:var(--navy);min-width:0}
.hstr-cf input[type=number],.hstr-cf select{font:inherit;font-weight:400;font-size:14px;border:1px solid var(--line-2);border-radius:6px;padding:5px 8px;background:#fff;color:var(--ink);width:110px;max-width:100%}
.hstr-cf select{width:auto;max-width:220px}
.hstr-cf input[type=range]{width:130px;accent-color:var(--teal)}
.hstr-counts{display:flex;flex-wrap:wrap;gap:6px}
.hstr-cnt{font-size:13px;font-weight:600;border-radius:999px;padding:3px 10px;background:#fff;border:1px solid var(--line);color:var(--ink);font-variant-numeric:tabular-nums}
.hstr-cnt-up{border-color:#e8a3ab}.hstr-cnt-down{border-color:#9dbfe6}
.hstr-ctools{flex-wrap:wrap;align-items:flex-start}
.hstr-adjust{margin-right:auto;font-size:13px;min-width:0}
.hstr-adjust summary{cursor:pointer;font-weight:600;color:var(--navy);padding:4px 2px}
.hstr-adjust .hstr-crow{padding:8px 0 4px}
.hstr-link{display:flex;align-items:center;gap:6px;font-size:13.5px;color:var(--ink);flex:1 1 260px}
.hstr-link input{accent-color:var(--teal);width:16px;height:16px;flex:none}
@media (max-width:900px){.hstt-layout{grid-template-columns:minmax(0,1fr)}}
@media (max-width:600px){
  .hstr-title{font-size:25px}
  .hstr-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hstr-kpi .n{font-size:22px}
  .hstr-fig{padding:12px 10px 10px}
  .hstr-sec>h2{font-size:21px}
  .hstr-toc{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .hstr-filter{width:100%}
  .hstt-row{grid-template-columns:1fr}
}
@media print{.hstr-toc,.hstr-ctools,.hstc-bar .hstc-zoom,.hstr-ttools input{display:none}}
/* ---------- r5 工具运行时（hsttools.js）与工具总览 · A1 追加 ---------- */
.hstt-tool{min-width:0}
.hstt-crumb{font-size:13.5px;color:var(--mute);margin:0 0 10px}
.hstt-crumb a{color:var(--teal-ink,#1f8d85);text-decoration:none}
.hstt-crumb a:hover{text-decoration:underline}
.hstt-input+.hstt-input{border-top:1px dashed var(--line);padding-top:12px;margin-top:4px}
.hstt-exnote{font-size:12.5px;color:var(--teal-ink,#1f8d85);background:var(--teal-soft,#eef7f6);border-radius:6px;padding:6px 10px;margin:0 0 6px}
.hstt-exnote[hidden]{display:none}
.hstt-sub{font-size:13px;font-weight:700;color:var(--slate);margin:6px 0 8px;text-transform:none}
.hstt-colwarn{color:#9a5b00!important}
.hstt-colwarn[hidden]{display:none}
.hstt-field[hidden]{display:none}
.hstt-cbf{margin-bottom:6px}
.hstt-cbf .hstt-check{margin:0}
.hstt-field input[type=range]{width:100%;accent-color:var(--teal,#2ea9a0)}
.hstt-rangev{font-weight:600;color:var(--teal-ink,#1f8d85);font-variant-numeric:tabular-nums}
.hstt-field input[type=color]{width:56px;height:34px;padding:2px;border:1px solid var(--line-2);border-radius:8px;background:#fff}
.hstt-cols{max-height:180px;overflow:auto;border:1px solid var(--line-2);border-radius:8px;padding:6px 10px;background:#fff}
.hstt-cols .hstt-check{margin:2px 0;font-size:13.5px;overflow-wrap:anywhere}
.hstt-colbtns{display:flex;gap:6px;margin:0 0 6px}
.hstt-mini{font:inherit;font-size:12px;font-weight:600;color:var(--navy);background:#fff;border:1px solid var(--line-2);border-radius:999px;padding:2px 10px;cursor:pointer}
.hstt-mini:hover{border-color:var(--teal)}
.hstt-stats span.tone-up{color:#a3283a;border-color:#efc5cc;background:#fbeef0}
.hstt-stats span.tone-down{color:#1d5aa6;border-color:#c5d8f1;background:#eef4fb}
.hstt-warn{list-style:none;margin:0 0 12px;padding:8px 12px;background:#fff8e6;border:1px solid #f1dca6;border-radius:8px;font-size:13px;color:#7a5200}
.hstt-warn[hidden]{display:none}
.hstt-warn li+li{margin-top:4px}
.hstt-chart{min-width:0}
.hstt-slot+.hstt-slot,.hstt-box+.hstt-slot,.hstt-slot+.hstt-box{margin-top:18px}
.hstt-export:empty{display:none}
.hstt-tables{min-width:0}
.hstt-tbl{margin-top:16px;min-width:0}
.hstt-tblcap{font-size:13px;color:var(--slate);margin:0 0 6px}
.hstt-tblcap b{color:var(--navy)}
.hstt-tbl .v2-table-wrap{max-height:420px;overflow:auto;border:1px solid var(--line);border-radius:8px}
.hstt-table{font-size:12.5px;border-top:0;border-bottom:0}
.hstt-table th,.hstt-table td{padding:6px 10px;white-space:nowrap;font-variant-numeric:tabular-nums}
.hstt-table th{position:sticky;top:0;background:#fff;z-index:1}
.hstt-texts:empty{display:none}
.hstt-textout{margin-top:14px}
.hstt-out{width:100%;box-sizing:border-box;min-height:180px;font-family:var(--mono);font-size:12.5px;line-height:1.5;border:1px solid var(--line-2);border-radius:8px;padding:8px 10px;white-space:pre;overflow:auto;resize:vertical;background:var(--paper,#f5f7fa);color:var(--ink)}
.hstt-h{font-size:16px;color:var(--navy);margin:18px 0 8px}
.hstt-method{font-size:14.5px}
/* 总览 */
.hstt-hub{min-width:0}
.hstt-search{margin:0 0 14px;max-width:560px}
.hstt-search label{display:block;font-size:13.5px;font-weight:600;color:var(--navy);margin:0 0 6px}
.hstt-search input{width:100%;box-sizing:border-box;font:inherit;font-size:15px;border:1px solid var(--line-2);border-radius:999px;padding:10px 16px;background:#fff;color:var(--ink)}
.hstt-search input:focus{outline:none;border-color:var(--teal);box-shadow:0 0 0 3px rgba(46,169,160,.18)}
.hstt-chips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 22px}
.hstt-chip{font:inherit;font-size:13.5px;font-weight:600;color:var(--navy);background:#fff;border:1px solid var(--line-2);border-radius:999px;padding:6px 14px;cursor:pointer;max-width:100%;text-align:left}
.hstt-chip span{color:var(--mute);font-weight:500;margin-left:2px}
.hstt-chip:hover{border-color:var(--teal)}
.hstt-chip[aria-pressed=true]{background:var(--navy);border-color:var(--navy);color:#fff}
.hstt-chip[aria-pressed=true] span{color:rgba(255,255,255,.75)}
.hstt-pinned,.hstt-catsec{margin:0 0 28px}
.hstt-pinned[hidden],.hstt-catsec[hidden],.hstt-tcard[hidden],.hstt-none[hidden]{display:none}
.hstt-pinned h3,.hstt-catsec h3{font-size:18px;color:var(--navy);margin:0 0 12px;scroll-margin-top:80px}
.hstt-cardgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px}
.hstt-tcard{display:flex;flex-direction:column;gap:6px;min-width:0;background:#fff;border:1px solid var(--line);border-radius:var(--radius,10px);padding:14px 16px;text-decoration:none;color:inherit;transition:border-color .15s,box-shadow .15s}
a.hstt-tcard:hover{border-color:var(--teal);box-shadow:0 4px 14px rgba(11,37,69,.08)}
.hstt-tcard h4{font-size:15.5px;margin:0;color:var(--navy);overflow-wrap:anywhere}
.hstt-tcard p{font-size:13.5px;margin:0;color:var(--slate);line-height:1.55}
.hstt-tag{align-self:flex-start;font-size:11.5px;font-weight:600;color:var(--teal-ink,#1f8d85);background:var(--teal-soft,#eef7f6);border-radius:999px;padding:2px 9px}
.hstt-tcard.soon{background:var(--paper,#f5f7fa);border-style:dashed;cursor:default}
.hstt-tcard.soon h4,.hstt-tcard.soon p{color:var(--mute)}
.hstt-tag.soon{color:var(--mute);background:#e9edf2}
.hstt-none{font-size:14.5px;color:var(--mute);padding:20px 0}
@media (max-width:600px){
  .hstt-cardgrid{grid-template-columns:minmax(0,1fr)}
  .hstt-chips{gap:6px}
  .hstt-chip{font-size:13px;padding:5px 11px}
}
/* ---------- /r5 工具运行时 ---------- */

/* ---------- 交互式报告预览模式（hst-report-viewer.js 1.1.0，opts.preview / report.preview；只作用于 .hstr-preview 之下，非预览页面不受影响） ---------- */
.hstr-pvbar{display:block;margin:0 0 14px;padding:10px 14px;background:#fff8e6;border:1px solid #f3dfa6;border-left:4px solid #d99a00;border-radius:var(--radius-s,8px);color:#6b4e00;font-size:14px;line-height:1.5}
.hstr-pvbar strong{color:#5a4100}
.hstr-preview .hstc-stage::after{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;z-index:4;background-repeat:repeat;background-size:300px 170px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'300'%20height%3D'170'%3E%3Ctext%20x%3D'150'%20y%3D'90'%20text-anchor%3D'middle'%20transform%3D'rotate(-24%20150%2085)'%20font-family%3D'Inter%2C%20Arial%2C%20Noto%20Sans%20CJK%20SC%2C%20PingFang%20SC%2C%20Microsoft%20YaHei%2C%20sans-serif'%20font-size%3D'17'%20font-weight%3D'600'%20fill%3D'%230b2545'%20fill-opacity%3D'0.12'%3E%E9%A2%84%E8%A7%88%20PREVIEW%3C%2Ftext%3E%3C%2Fsvg%3E")}
.hstr-preview .hstr-ctools:empty{display:none}
.hstr-pnote{font-size:13px;color:var(--slate);margin:6px 0 0}
