/* ============================================================
   在线体验中心 —— 样式
   ------------------------------------------------------------
   与本站 style.css 共用 CSS 变量，保持视觉一致。
   ============================================================ */

/* ---------- 工具切换栏 ---------- */
.tool-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.tool-bar button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .18s;
  font-family: inherit;
}
.tool-bar button:hover { border-color: var(--brand-2); color: var(--brand); }
.tool-bar button.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 18px rgba(79, 70, 229, .26);
}

/* ---------- 工具容器 ---------- */
.tool-host {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}
.tl-pane-head { margin-bottom: 22px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.tl-pane-head h3 { margin: 0 0 8px; font-size: 21px; color: var(--ink); }
.tl-pane-head p { margin: 0; color: var(--ink-3); font-size: 14px; line-height: 1.75; }

.tl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.tl-col { min-width: 0; }

.tl-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  margin: 16px 0 10px;
  letter-spacing: .2px;
}
.tl-col > .tl-label:first-child { margin-top: 0; }

/* ---------- 表单元素 ---------- */
.tl-area {
  width: 100%;
  min-height: 200px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  font-size: 13px;
  line-height: 1.7;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  color: var(--ink);
  background: #fbfcfe;
  resize: vertical;
  box-sizing: border-box;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.tl-area:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(79, 70, 229, .1); background: #fff; }
.tl-area-sm { min-height: 130px; }

.tl-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }

.tl-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  border: 1px dashed var(--brand-2);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  cursor: pointer;
  background: var(--brand-soft);
}
.tl-file input { display: none; }

.tl-color {
  width: 46px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  padding: 3px;
}

.tl-select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  font-size: 13.5px;
  color: var(--ink);
  background: #fff;
  outline: none;
  font-family: inherit;
  cursor: pointer;
}
.tl-select-sm { width: auto; padding: 8px 10px; font-size: 13px; }
.tl-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); font-weight: 600; }

.tl-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tl-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.tl-form label:nth-child(1), .tl-form label:nth-child(2) { grid-column: span 1; }
.tl-input {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
  width: 100%;
}
.tl-input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(79, 70, 229, .1); }

/* ---------- 规则勾选 ---------- */
.tl-rules { list-style: none; padding: 0; margin: 0 0 16px; }
.tl-rules li { border-bottom: 1px dashed var(--line); }
.tl-rules li:last-child { border-bottom: none; }
.tl-rules label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 2px;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
}
.tl-rules input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }

/* ---------- 分段切换 ---------- */
.tl-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.tl-switch button {
  border: none;
  background: transparent;
  padding: 9px 20px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  font-family: inherit;
  transition: all .16s;
}
.tl-switch button.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }

/* ---------- 输出区 ---------- */
.tl-out { }
.tl-out-block { margin-top: 20px; }
.tl-empty {
  color: var(--ink-3);
  font-size: 13.5px;
  background: #f7f9fc;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 28px 18px;
  text-align: center;
  margin: 0;
}
.tl-note {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--ink-3);
  background: var(--brand-soft);
  border-left: 3px solid var(--brand-2);
  border-radius: 6px;
  padding: 9px 12px;
  line-height: 1.7;
}
.tl-ok {
  background: var(--ok-soft);
  color: #0f766e;
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 14px;
  font-weight: 600;
}

/* ---------- 统计卡 ---------- */
.tl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 16px; }
.tl-stat {
  background: linear-gradient(160deg, #f7f9ff, #eef3ff);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
}
.tl-stat small { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 5px; }
.tl-stat b { display: block; font-size: 20px; color: var(--brand-deep); line-height: 1.2; letter-spacing: -.4px; }
.tl-stat em { font-style: normal; font-size: 11.5px; color: var(--ink-3); }

/* ---------- 表格 ---------- */
.tl-tablebox { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.tl-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tl-table th, .tl-table td { padding: 9px 11px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tl-table th { background: #f4f7fd; color: var(--ink-2); font-weight: 700; font-size: 12px; }
.tl-table tbody tr:last-child td { border-bottom: none; }
.tl-table td { color: var(--ink-2); }
.tl-table .tl-fixed { background: #ecfdf5; color: #047857; font-weight: 600; }
.tl-more { font-size: 12px; color: var(--ink-3); margin: 8px 0 0; }

/* ---------- 修正清单 ---------- */
.tl-fixlist { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tl-fixlist span {
  font-size: 12px;
  background: var(--ok-soft);
  color: #0f766e;
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 600;
}

/* ---------- 图表 ---------- */
.tl-chart {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: #fff;
  margin-bottom: 16px;
}

/* ---------- 评分 ---------- */
.tl-score { display: flex; align-items: center; gap: 20px; margin-bottom: 18px; }
.tl-score-num { font-size: 52px; font-weight: 800; line-height: 1; letter-spacing: -2px; }
.tl-score-num small { font-size: 15px; font-weight: 600; margin-left: 3px; letter-spacing: 0; }
.tl-score-txt { font-size: 14px; color: var(--ink-2); font-weight: 700; }
.tl-score-txt em { display: block; font-style: normal; font-size: 13px; font-weight: 500; color: var(--ink-3); margin-top: 5px; }

/* ---------- 维度条 ---------- */
.tl-dims { margin-bottom: 18px; }
.tl-dim { display: grid; grid-template-columns: 68px 1fr 48px; align-items: center; gap: 12px; margin-bottom: 9px; font-size: 13px; color: var(--ink-2); }
.tl-dim b { text-align: right; font-size: 13px; color: var(--ink); }
.tl-bar { height: 8px; background: #eef1f7; border-radius: 999px; overflow: hidden; }
.tl-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .5s ease; }

/* ---------- 问题清单 ---------- */
.tl-issues { list-style: none; padding: 0; margin: 0; }
.tl-issues li {
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 9px;
  background: #fff;
}
.tl-issues li b { display: block; font-size: 13.5px; margin-bottom: 5px; }
.tl-issues li p { margin: 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }
.tl-issues li.lv-hi { border-left-color: #ef4444; background: #fff7f7; }
.tl-issues li.lv-hi b { color: #b91c1c; }
.tl-issues li.lv-mid { border-left-color: #f59e0b; background: #fffdf5; }
.tl-issues li.lv-mid b { color: #b45309; }
.tl-issues li.lv-lo { border-left-color: #10b981; background: #f6fffb; }
.tl-issues li.lv-lo b { color: #047857; }

/* ---------- 问答 ---------- */
.tl-quiz { list-style: none; padding: 0; margin: 0 0 20px; }
.tl-quiz > li { border-bottom: 1px dashed var(--line); padding: 14px 0; }
.tl-quiz > li:last-child { border-bottom: none; }
.tl-q { font-size: 14px; color: var(--ink); font-weight: 600; margin-bottom: 10px; line-height: 1.65; }
.tl-q b { color: var(--brand); margin-right: 4px; }
.tl-ans { display: flex; flex-wrap: wrap; gap: 9px; }
.tl-ans label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
  cursor: pointer;
  background: #fff;
  transition: all .16s;
}
.tl-ans label:hover { border-color: var(--brand-2); }
.tl-ans input { accent-color: var(--brand); cursor: pointer; margin: 0; }
.tl-ans label:has(input:checked) { background: var(--brand-soft); border-color: var(--brand-2); color: var(--brand-deep); font-weight: 600; }

/* ---------- 巡检结果 ---------- */
.tl-check { list-style: none; padding: 0; margin: 0; }
.tl-check li { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 9px; background: #fff; }
.tl-ck-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex: 0 0 auto; }
.tl-check li.ok .tl-ck-dot { background: #10b981; }
.tl-check li.warn .tl-ck-dot { background: #f59e0b; }
.tl-check li.bad .tl-ck-dot { background: #ef4444; }
.tl-check b { font-size: 13.5px; color: var(--ink); }
.tl-check em { font-style: normal; font-size: 12px; font-weight: 700; margin-left: 8px; }
.tl-check li.ok em { color: #047857; }
.tl-check li.warn em { color: #b45309; }
.tl-check li.bad em { color: #b91c1c; }
.tl-check p { margin: 5px 0 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }

/* ---------- 代码块 ---------- */
.tl-code {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 12.5px;
  line-height: 1.75;
  overflow-x: auto;
  margin: 0 0 12px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  white-space: pre-wrap;
  word-break: break-all;
}
.tl-code-tall { max-height: 340px; overflow-y: auto; }
.tl-http { font-size: 13px; font-weight: 700; color: #334155; margin-bottom: 10px; padding: 10px 14px; background: #ecfdf5; border-radius: var(--radius-sm); }
.tl-http b { color: #047857; }
.tl-http span { float: right; font-weight: 500; color: var(--ink-3); }
.tl-http-err { background: #fef2f2; }
.tl-http-err b { color: #b91c1c; }

/* ---------- 报告 ---------- */
.tl-report { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 20px; background: #fff; }
.tl-report h4 { margin: 0 0 6px; font-size: 17px; color: var(--ink); }
.tl-rp-meta { font-size: 12px; color: var(--ink-3); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.tl-report h5 { margin: 20px 0 9px; font-size: 14px; color: var(--brand-deep); padding-left: 10px; border-left: 3px solid var(--brand-2); }
.tl-report p { margin: 0 0 10px; font-size: 13.5px; color: var(--ink-2); line-height: 1.85; }
.tl-rp-list { margin: 0; padding-left: 20px; }
.tl-rp-list li { font-size: 13.5px; color: var(--ink-2); line-height: 1.9; }

/* ---------- 页尾采购引导 ---------- */
.tool-tail {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #eef4ff, #f7f9ff);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.tool-tail b { display: block; font-size: 15px; color: var(--ink); margin-bottom: 5px; }
.tool-tail span { font-size: 13px; color: var(--ink-3); }

/* ---------- 提示浮层 ---------- */
.tool-tip {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translate(-50%, 20px);
  background: rgba(15, 23, 42, .93);
  color: #fff;
  font-size: 13.5px;
  padding: 11px 20px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: all .25s;
  z-index: 4000;
}
.tool-tip.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .tool-host { padding: 18px; }
  .tl-grid { grid-template-columns: 1fr; gap: 18px; }
  .tl-form { grid-template-columns: 1fr; }
  .tl-score-num { font-size: 42px; }
  .tl-score { gap: 14px; }
  .tool-tail { flex-direction: column; align-items: flex-start; }
  .tl-dim { grid-template-columns: 56px 1fr 42px; }
}
