/* 基础元素与通用组件（表格、徽章、按钮、校验清单、流程图、报告、评测看板、物性实验室等）。颜色与尺寸来自 tokens.css。 */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--ink);
  background: var(--chrome);
  -webkit-font-smoothing: antialiased;
  overflow: auto;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: default; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
kbd {
  display: inline-block; font-family: var(--font); font-size: 10.5px; line-height: 15px; padding: 0 4px; color: var(--ink2);
  background: var(--field); border: 1px solid var(--line); border-bottom-width: 1.5px; border-radius: var(--r-sm); white-space: nowrap;
}
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.boot { padding: 40px; color: var(--ink2); font-size: var(--fs-md); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink3); }
.small { font-size: var(--fs-xs); }
.mono { font-family: var(--mono); font-size: var(--fs-xs); }
.nowrap { white-space: nowrap; }
.right { margin-left: auto; }
.ok { color: var(--success); }
.bad { color: var(--danger); }
.row { display: flex; align-items: center; gap: 6px; }
.row select { flex: 1; min-width: 0; }
.lbl { font-size: var(--fs-sm); color: var(--ink2); }
.sub-h { font-size: var(--fs-md); font-weight: 600; margin: 12px 0 6px; }
.page { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }

/* ---------------------------------------------------------------- 表单控件 */
select, input[type="number"], input[type="text"], textarea {
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 2px 6px; background: var(--field); color: var(--ink); min-width: 0; height: 24px;
}
textarea { height: auto; }
select:hover, input[type="number"]:hover, input[type="text"]:hover, textarea:hover { border-color: #b5b7bb; }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); margin: 0; }
input[type="range"] { accent-color: var(--accent); }

/* ---------------------------------------------------------------- 卡片、按钮、标签 */
.card { background: var(--field); border: 1px solid var(--card-edge); border-radius: var(--r); padding: 10px 12px; min-width: 0; }
.card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; min-height: 22px; }
.card-head h3 { font-size: var(--fs-md); font-weight: 600; color: var(--ink); }
.card-head h2 { font-size: var(--fs-lg); font-weight: 400; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 24px; padding: 0 12px;
  border: 1px solid #c5c7cb; background: #fdfdfd; color: var(--ink); border-radius: var(--r-sm); font-size: var(--fs-sm); line-height: 1; white-space: nowrap;
}
.btn:hover:not(:disabled) { background: var(--hover); border-color: var(--hover-edge); }
.btn:active:not(:disabled) { background: var(--press); border-color: var(--press-edge); }
.btn.primary { background: var(--accent); border-color: #2f7db6; color: #fff; }
.btn.primary:hover:not(:disabled) { background: #2f7db6; border-color: #286ca0; }
.btn:disabled { color: var(--ink4); background: var(--sunken); border-color: var(--line-soft); }
.btn.sm { height: 22px; padding: 0 8px; }
.btn.big { height: 28px; padding: 0 16px; font-size: var(--fs-md); }
.linkbtn { background: none; border: none; color: var(--accent-ink); padding: 0 2px; font-size: var(--fs-sm); text-align: left; }
.linkbtn:hover:not(:disabled) { text-decoration: underline; color: var(--accent); }
.linkbtn:disabled { color: var(--ink4); }

.chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border: 1px solid var(--line); background: var(--field);
  border-radius: var(--r-sm); font-size: var(--fs-sm); color: var(--ink); white-space: nowrap;
}
.chip:hover:not(:disabled) { background: var(--hover); border-color: var(--hover-edge); }
.chip.on { background: var(--sel); border-color: var(--press-edge); color: var(--ink); }
.chip:disabled { color: var(--ink4); }
.chip-n { margin-left: 2px; font-size: var(--fs-xs); color: var(--ink3); font-variant-numeric: tabular-nums; }
.chip-sep { width: 1px; height: 16px; background: var(--line); margin: 0 3px; }
.check { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-sm); color: var(--ink2); }
.check.disabled { color: var(--ink4); }

.seg-group, .speeds { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; flex: none; background: var(--field); }
.seg { border: none; background: none; height: 22px; padding: 0 9px; font-size: var(--fs-sm); border-right: 1px solid var(--line-soft); }
.seg:last-child { border-right: none; }
.seg:hover { background: var(--hover); }
.seg.on { background: var(--sel); }

.badge {
  display: inline-flex; align-items: center; gap: 3px; height: 18px; padding: 0 6px; border-radius: var(--r-sm);
  font-size: var(--fs-xs); line-height: 1; white-space: nowrap; border: 1px solid transparent; font-weight: 400;
}
.badge.sm { height: 16px; padding: 0 5px; }
.b-icon { font-style: normal; font-size: 10px; line-height: 1; }
.b-ok { background: var(--success-bg); color: var(--success); border-color: var(--success-edge); }
.b-run { background: var(--info-bg); color: var(--accent-ink); border-color: var(--info-edge); }
.b-run .b-icon { animation: blink 1.2s infinite; }
.b-bad { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-edge); }
.b-warn { background: var(--warning-bg); color: var(--warning-ink); border-color: var(--warning-edge); }
.b-wait { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-edge); }
.b-mute { background: var(--sunken); color: var(--ink2); border-color: var(--line-soft); }

.lvl {
  display: inline-block; font-size: 10.5px; font-weight: 600; padding: 0 4px; border-radius: var(--r-sm);
  background: #e8eaee; color: #3b4250; line-height: 16px; white-space: nowrap; border: 1px solid #d6d9de;
}
.lvl.bad { background: var(--caution-bg); color: var(--caution-ink); border-color: var(--caution-edge); }
.mode-tag { font-size: var(--fs-xs); padding: 0 5px; border-radius: var(--r-sm); line-height: 17px; background: var(--sunken); color: var(--ink2); white-space: nowrap; }
.mode-live { background: var(--info-bg); color: var(--accent-ink); }
.mode-replay { background: #e5f5f8; color: #16788f; }
.tag { display: inline-block; font-size: 10.5px; line-height: 15px; padding: 0 4px; border-radius: var(--r-sm); background: var(--sunken); color: var(--ink2); border: 1px solid var(--line-soft); margin-left: 4px; }
.tag.warn { background: var(--caution-bg); color: var(--caution-ink); border-color: var(--caution-edge); }

.src { display: inline-block; font-size: 10.5px; line-height: 15px; padding: 0 4px; border-radius: var(--r-sm); border: 1px solid; white-space: nowrap; }
.src.sm { margin-left: 4px; }
.src-rule { color: #33507a; background: #eef3fa; border-color: #c9d6ea; }
.src-llm { color: var(--brand); background: var(--brand-soft); border-color: var(--brand-edge); }
.src-knowledge { color: #0b6e5c; background: #e7f6f2; border-color: #b9e3d9; }
.src-user { color: var(--caution-ink); background: var(--caution-bg); border-color: var(--caution-edge); }
.legend-src { margin-left: auto; display: inline-flex; gap: 4px; }
.kid { font-family: var(--mono); font-size: 10.5px; color: #0b6e5c; background: #e7f6f2; border: 1px solid #b9e3d9; padding: 0 3px; border-radius: var(--r-sm); white-space: nowrap; }

.notice { padding: 5px 9px; border-radius: var(--r-sm); font-size: var(--fs-sm); border: 1px solid; }
.card .notice { margin-top: 6px; }
.notice.info { background: var(--info-bg); border-color: var(--info-edge); color: var(--accent-ink); }
.notice.warn { background: var(--warning-bg); border-color: var(--warning-edge); color: var(--warning-ink); }
.notice.error { background: var(--danger-bg); border-color: var(--danger-edge); color: var(--danger); }
.hint { font-size: var(--fs-xs); color: var(--ink3); margin-top: 6px; }
.hint.warn { color: var(--warning-ink); }
.hint.error { color: var(--danger); }

.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
  padding: 24px 16px; color: var(--ink2); background: var(--panel); border: 1px dashed var(--line); border-radius: var(--r);
}
.empty.compact { padding: 10px 12px; }
.empty-title { font-size: var(--fs-md); color: var(--ink2); }
.empty-text { font-size: var(--fs-sm); color: var(--ink3); max-width: 520px; }
.empty .btn { margin-top: 6px; }
.swatch { display: inline-block; width: 9px; height: 9px; border-radius: 1px; margin-right: 4px; vertical-align: -1px; flex: none; }

/* ---------------------------------------------------------------- 表格 */
.table-wrap, .tbl-scroll { overflow: auto; max-width: 100%; }
.table-wrap.tall { max-height: 460px; border: 1px solid var(--line-soft); }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); background: var(--field); }
.tbl th {
  text-align: left; font-weight: 400; color: var(--ink2); background: var(--thead); padding: 3px 7px; height: 22px;
  border-bottom: 1px solid var(--line); border-right: 1px solid var(--line-soft); white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
.tbl th:last-child { border-right: none; }
.tbl td { padding: 2px 7px; height: 22px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl.dense td { padding: 1px 6px; height: 20px; }
.tbl.dense th { padding: 2px 6px; height: 20px; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tbody tr:hover td { background: var(--hover); }
.tbl tr.sel td { background: var(--sel) !important; }
.tbl tr.ll td { background: #fff8e8; }
.tbl tr.sub td { border-top: none; padding-top: 0; }
.tbl.streams tbody tr { cursor: default; }
.tbl.sortable th { user-select: none; }
.tbl.sortable th:hover { color: var(--ink); background: #e8e8e9; }
.sort-arrow { font-size: 9px; color: var(--accent); }
.role { display: inline-block; font-size: 10.5px; padding: 0 4px; border-radius: var(--r-sm); background: var(--sunken); color: var(--ink2); margin-left: 2px; line-height: 15px; }
.role-feed { background: #e8f1fb; color: #2456a6; }
.role-product { background: #e7f5ef; color: #1d6b57; }
.role-tear { background: #f3eafb; color: #7a3d9a; }
.role-makeup { background: var(--caution-bg); color: var(--caution-ink); }

/* 参数可信度 */
.grade {
  display: inline-flex; min-width: 18px; height: 16px; align-items: center; justify-content: center; padding: 0 3px;
  border-radius: var(--r-sm); font-weight: 600; font-size: 10.5px; border: 1px solid transparent; line-height: 1;
}
.grade.sm { min-width: 16px; height: 15px; font-size: 10px; }
.grade-A { background: var(--success-bg); color: var(--success); border-color: var(--success-edge); }
.grade-B { background: #e6f0fb; color: #1f5fa8; border-color: #bcd5f0; }
.grade-C { background: var(--sunken); color: #4b5563; border-color: var(--line); }
.grade-D { background: var(--warning-bg); color: var(--warning-ink); border-color: var(--warning-edge); }
.grade-X { background: var(--sunken); color: var(--ink3); }
.row-est td { background: #fffaf0; }
.est-note { font-size: 10.5px; color: var(--warning-ink); margin-top: 1px; white-space: nowrap; }
.pv { display: inline-block; margin-right: 10px; white-space: nowrap; font-family: var(--font); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.src-cell { min-width: 200px; }
.grade-legend { margin-top: 6px; font-size: var(--fs-xs); color: var(--ink3); display: flex; align-items: center; flex-wrap: wrap; gap: 3px; }
.grade-legend .grade { margin-left: 8px; margin-right: 1px; }
.grade-legend .grade:first-child { margin-left: 0; }

/* ---------------------------------------------------------------- 图表与提示框 */
.echart { width: 100%; min-width: 0; position: relative; }
.tt-head { font-weight: 600; margin-bottom: 3px; color: var(--ink); white-space: nowrap; }
.tt-row { display: flex; align-items: center; gap: 4px; line-height: 1.6; white-space: nowrap; }
.tt-label { color: var(--ink2); flex: 1; }
.tt-val { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); margin-left: 12px; }
.tt-key { display: inline-block; width: 8px; height: 8px; border-radius: 1px; margin-right: 3px; flex: none; }
.tt-sub { margin-top: 3px; font-size: var(--fs-xs); color: var(--ink2); }
.tt-sub.muted { color: var(--ink3); }
.ternary { display: flex; flex-direction: column; min-height: 0; }
.readout { font-size: var(--fs-xs); padding: 2px 8px 0; height: 22px; font-variant-numeric: tabular-nums; color: var(--ink2); white-space: nowrap; overflow: hidden; }
.readout span { margin-right: 10px; }

/* ---------------------------------------------------------------- 关键指标、校验清单、时间线 */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.kpi { border: 1px solid var(--card-edge); border-radius: var(--r); padding: 6px 9px; background: var(--field); }
.kpi-bad { border-color: var(--danger-edge); background: #fff8f8; }
.kpi-name { color: var(--ink3); font-size: var(--fs-xs); }
.kpi-value { font-size: var(--fs-xl); font-weight: 300; margin: 0; font-variant-numeric: tabular-nums; line-height: 1.3; }
.kpi-unit { font-size: var(--fs-xs); color: var(--ink3); margin-left: 3px; }
.kpi-meta { font-size: var(--fs-xs); color: var(--ink2); display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 3px; font-variant-numeric: tabular-nums; }

.vlist-head { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); }
.vlist-items { list-style: none; padding: 0; margin: 4px 0 0; }
.vlist-items li { display: flex; gap: 7px; padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.vlist-items li:last-child { border-bottom: none; }
.v-icon {
  width: 15px; height: 15px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 9.5px; color: #fff; flex: none; margin-top: 1px; font-weight: 700;
}
.pass .v-icon { background: var(--success); }
.fail .v-icon { background: var(--danger); }
.v-body { min-width: 0; }
.v-name { font-size: var(--fs-sm); }
.fail .v-name { color: var(--danger); font-weight: 600; }
.v-val { font-size: var(--fs-xs); color: var(--ink2); word-break: break-word; }
.v-th { color: var(--ink3); }

.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; position: relative; padding-bottom: 8px; }
.tl-item:not(:last-child)::before { content: ""; position: absolute; left: 9px; top: 21px; bottom: 1px; width: 1px; background: var(--line); }
.tl-dot {
  width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; border: 1px solid var(--line); background: var(--field); color: var(--ink3); flex: none;
}
.tl-running .tl-dot { border-color: var(--accent); color: var(--accent); }
.tl-done .tl-dot { background: var(--success); border-color: var(--success); color: #fff; }
.tl-failed .tl-dot { background: var(--danger); border-color: var(--danger); color: #fff; }
.tl-repaired .tl-dot { background: var(--warning-bg); border-color: var(--warning-edge); color: var(--warning-ink); }
.tl-body { min-width: 0; padding-top: 1px; }
.tl-title { display: flex; align-items: baseline; gap: 6px; }
.tl-name { font-weight: 600; }
.tl-pending .tl-name { color: var(--ink3); font-weight: 400; }
.tl-dur, .tl-state { margin-left: auto; font-size: var(--fs-xs); color: var(--ink3); white-space: nowrap; }
.tl-sum { font-size: var(--fs-xs); color: var(--ink2); margin-top: 1px; word-break: break-word; }

/* 事件日志、决策卡、诊断卡（旧组件，保留样式） */
.evlog-box { overflow: auto; border: 1px solid var(--line-soft); font-size: var(--fs-sm); background: var(--field); min-height: 100px; }
.evlog-more, .evlog-empty { padding: 6px 8px; color: var(--ink3); font-size: var(--fs-xs); }
.ev { display: grid; grid-template-columns: 60px 58px 40px minmax(0, 1fr); gap: 6px; padding: 2px 8px; border-bottom: 1px solid var(--line-soft); align-items: baseline; }
.ev-t { font-family: var(--mono); font-size: 10.5px; color: var(--ink3); text-align: right; }
.ev-type { font-size: 10.5px; padding: 0 4px; border-radius: var(--r-sm); text-align: center; background: var(--sunken); color: var(--ink2); }
.ev-step { font-size: var(--fs-xs); color: var(--ink3); }
.ev-msg { word-break: break-word; min-width: 0; }
.ev.sev-warn { background: #fffcf0; }
.ev.sev-error { background: #fff6f6; }
.ev-detail { margin: 3px 0; padding: 5px 7px; background: var(--sunken); font-family: var(--mono); font-size: 10.5px; white-space: pre-wrap; word-break: break-word; max-height: 200px; overflow: auto; }
.evlog-foot { font-size: var(--fs-xs); margin-top: 3px; }
.dec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.dec-card { border: 1px solid var(--card-edge); border-left: 3px solid var(--accent); border-radius: var(--r); padding: 6px 9px; background: var(--field); min-width: 0; }
.dec-top { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.dec-what { font-size: var(--fs-xs); color: var(--ink3); }
.dec-value { font-size: var(--fs-md); font-weight: 600; margin: 2px 0; word-break: break-word; }
.dec-reason { font-size: var(--fs-xs); color: var(--ink2); }
.diag-list { display: flex; flex-direction: column; gap: 6px; }
.diag-card { border: 1px solid var(--card-edge); border-radius: var(--r); padding: 7px; background: var(--field); }
.diag-flow { display: grid; grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr) 18px minmax(0, 1fr); }
.diag-cell { background: var(--sunken); border-radius: var(--r-sm); padding: 5px 8px; min-width: 0; }
.diag-cell.act { background: var(--info-bg); }
.diag-k { font-size: var(--fs-xs); color: var(--ink3); }
.diag-v { font-size: var(--fs-sm); word-break: break-word; }
.diag-arrow { display: flex; align-items: center; justify-content: center; color: var(--ink4); }
.diag-foot { display: flex; gap: 10px; margin-top: 4px; font-size: var(--fs-xs); }

/* ---------------------------------------------------------------- 流程图（画在渐变画布上） */
.pfd { position: relative; width: 100%; }
.pfd-svg { width: 100%; height: 100%; display: block; user-select: none; }
.pfd-aux polyline { fill: none; stroke: #8b9098; stroke-width: 1.4; }
.pfd-hit { fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; }
.pfd-line { fill: none; stroke: #4d5560; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
.pfd-edge.internal .pfd-line { stroke: #8b9098; stroke-width: 1.3; }
.pfd-edge.recycle .pfd-line { stroke: #7a52c7; stroke-dasharray: 7 4; }
.pfd-edge.hov .pfd-line { stroke-width: 2.6; }
.pfd-edge.sel .pfd-line { stroke: var(--accent); stroke-width: 3; stroke-dasharray: none; }
.col-body { fill: url(#pfd-col-grad); stroke: #4d5560; stroke-width: 1.5; }
.col-tick { stroke: #b9c0ca; stroke-width: 1; }
.pfd-node.type-column { cursor: pointer; }
.pfd-node.type-column:hover .col-body { stroke-width: 2.2; }
.pfd-node.st-converged .col-body { stroke: #1f8a3a; }
.pfd-node.st-failed .col-body { stroke: var(--danger); stroke-width: 2.2; }
.pfd-node.st-running .col-body { stroke: var(--accent); stroke-width: 2.2; animation: blink 1.2s infinite; }
.pfd-node.st-pending .col-body { stroke: #9aa1ab; stroke-dasharray: 4 3; }
.node-label { font-size: 12.5px; font-weight: 600; fill: var(--ink); }
.node-label.small { font-size: 11px; font-weight: 400; }
.node-sub { font-size: 10.5px; fill: var(--ink2); }
.st-text-converged { fill: var(--success); }
.st-text-failed { fill: var(--danger); }
.st-text-running { fill: var(--accent); }
.st-text-pending { fill: var(--ink3); }
.dec-body { fill: #ffffff; stroke: #4d5560; stroke-width: 1.5; }
.dec-interface { stroke: var(--c-orange); stroke-width: 1.3; stroke-dasharray: 4 3; }
.hx-body { fill: #ffffff; stroke: #4d5560; stroke-width: 1.5; }
.hx-zig { fill: none; stroke: #4d5560; stroke-width: 1.3; stroke-linejoin: round; }
.tag-body { fill: #f3f5f8; stroke: #6b7280; stroke-width: 1.1; }
.pfd-node.type-feed .tag-body { fill: #e8f1fb; stroke: #4a86c5; }
.pfd-node.type-product .tag-body { fill: #e9f6f0; stroke: #3f8f7b; }
.tag-text { font-size: 11.5px; font-weight: 600; fill: var(--ink); }
.unit-body { fill: #ffffff; stroke: #4d5560; stroke-width: 1.4; }
.pfd-elabel { font-size: 11.5px; fill: #374151; paint-order: stroke; stroke: #f4f8ff; stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.pfd-elabel.internal { fill: #6b7280; font-size: 10.5px; }
.pfd-elabel.recycle { fill: #6a43b5; }
.pfd-elabel.sel { fill: var(--accent-ink); font-weight: 700; }
.pfd-tip {
  position: absolute; z-index: 10; min-width: 200px; max-width: 260px; background: var(--field); border: 1px solid var(--line);
  border-radius: var(--r-sm); box-shadow: var(--shadow-pop); padding: 6px 9px; font-size: var(--fs-xs); pointer-events: none;
}
.lg-line { display: inline-block; width: 18px; height: 0; border-top: 1.6px solid #4d5560; margin: 0 3px 0 8px; vertical-align: middle; }
.lg-line.rec { border-top: 1.6px dashed #7a52c7; }
.lg-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin: 0 3px 0 8px; border: 1.6px solid; background: var(--field); vertical-align: -1px; }
.lg-dot.st-converged { border-color: #1f8a3a; }
.lg-dot.st-running { border-color: var(--accent); }
.lg-dot.st-pending { border-color: #9aa1ab; border-style: dashed; }
.lg-dot.st-failed { border-color: var(--danger); }

/* ---------------------------------------------------------------- 报告（Markdown） */
.md { line-height: 1.7; font-size: var(--fs-md); color: #23272e; overflow-wrap: break-word; max-width: 900px; }
.md h1 { font-size: var(--fs-xl); font-weight: 300; margin: 2px 0 10px; color: var(--ink); }
.md h2 { font-size: var(--fs-lg); font-weight: 600; margin: 16px 0 6px; padding-bottom: 3px; border-bottom: 1px solid var(--line-soft); color: var(--accent-title); }
.md h3 { font-size: var(--fs-md); margin: 12px 0 4px; }
.md p { margin: 5px 0; }
.md ul, .md ol { padding-left: 20px; margin: 5px 0; }
.md table { border-collapse: collapse; margin: 8px 0; font-size: var(--fs-sm); display: block; overflow-x: auto; max-width: 100%; }
.md th, .md td { border: 1px solid var(--line); padding: 2px 8px; }
.md th { background: var(--thead); font-weight: 400; color: var(--ink2); }
.md code { background: var(--sunken); padding: 0 3px; border-radius: var(--r-sm); font-family: var(--mono); font-size: var(--fs-xs); }
.md pre { background: var(--sunken); padding: 8px 10px; overflow: auto; border: 1px solid var(--line-soft); }
.md pre code { background: none; padding: 0; }
.md blockquote { border-left: 3px solid var(--line); margin: 6px 0; padding: 1px 10px; color: var(--ink2); }
.md img { max-width: 100%; }
.md hr { border: none; border-top: 1px solid var(--line-soft); margin: 12px 0; }
.art-list { list-style: none; padding: 0; margin: 0; }
.art-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.art-list li:last-child { border-bottom: none; }
.notes { margin: 0; padding-left: 20px; font-size: var(--fs-sm); line-height: 1.65; color: var(--ink2); }
.notes li { margin: 3px 0; }
.notes.sm { font-size: var(--fs-xs); padding-left: 18px; }

/* ---------------------------------------------------------------- 相图、物性实验室 */
.phase-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 10px; align-items: start; }
.sp-table td, .sp-table th { padding-left: 5px; padding-right: 5px; }
.sp-phases { white-space: normal; line-height: 1.5; }
.map-legend { margin-top: 4px; line-height: 1.6; }
.sp-kind { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #5b6472; margin-right: 5px; vertical-align: 1px; }
.sp-kind.het { background: var(--c-orange); }
.lab-form { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; }
.fld { display: flex; flex-direction: column; gap: 3px; min-width: 190px; }
.fld select { width: 100%; }
.fld.sm { min-width: 0; width: 120px; }
.fld.sm input { width: 100%; }
.swap { margin-bottom: 1px; }

/* ---------------------------------------------------------------- 评测看板 */
.bench-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bench-head h2 { font-size: var(--fs-lg); font-weight: 400; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 7px; }
.tile { background: var(--field); border: 1px solid var(--card-edge); border-radius: var(--r); padding: 7px 10px; display: flex; flex-direction: column; }
.tile-k { font-size: var(--fs-xs); color: var(--ink3); }
.tile-v { font-size: 22px; font-weight: 300; margin: 0; font-variant-numeric: tabular-nums; line-height: 1.3; }
.tile-sub { font-size: var(--fs-xs); color: var(--ink2); }
.tile-req { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 5px; font-size: var(--fs-xs); }
/* 评测看板的对照实验：条长 = 成功题数 / 总题数；蓝色是完整做法，灰色是对照（关掉某项能力，或不用大模型） */
.cmp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 10px; }
.cmp { padding: 8px 10px 9px; border: 1px solid var(--card-edge); border-radius: var(--r); background: var(--field); }
.cmp-t { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.cmp-s { margin: 1px 0 7px; font-size: var(--fs-xs); color: var(--ink3); }
.cmp-r { display: grid; grid-template-columns: minmax(130px, 44%) minmax(0, 1fr) 58px; align-items: center; column-gap: 8px; min-height: 24px; font-size: var(--fs-sm); }
.cmp-l { color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-b { height: 10px; overflow: hidden; background: var(--sunken); border-radius: 0 4px 4px 0; }
.cmp-b i { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
.cmp-r.off .cmp-b i { background: #9aa0a8; }
.cmp-v { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); }
.cmp-n { margin-top: 7px; font-size: var(--fs-xs); line-height: 1.5; color: var(--ink3); }
.tbl tr.main td { font-weight: 600; }

/* 旧会话视图里的条带（保留） */
.strip-main { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.strip-title { font-size: var(--fs-md); }
.strip-meta { display: flex; gap: 14px; color: var(--ink2); margin-top: 4px; font-size: var(--fs-xs); flex-wrap: wrap; }
.strip-text { margin-top: 6px; padding: 6px 8px; background: var(--sunken); font-size: var(--fs-sm); }
.callout { border-left: 3px solid var(--warning); }
.feas-list { margin: 0; padding-left: 18px; color: var(--ink2); }
.stat-row { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.stat-k { font-size: var(--fs-xs); color: var(--ink3); }
.stat-v { font-size: var(--fs-md); font-weight: 600; font-variant-numeric: tabular-nums; }
.scrub { flex: 1; min-width: 120px; accent-color: var(--accent); }

@keyframes blink { 50% { opacity: 0.4; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(54, 140, 203, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(54, 140, 203, 0); }
  100% { box-shadow: 0 0 0 0 rgba(54, 140, 203, 0); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* ---------------------------------------------------------------- 访问码（在线演示部署时，后端设了 SEPAGENT_ACCESS_CODE） */
.acc-mask { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; background: rgba(32, 33, 36, 0.38); }
.acc-box { width: 380px; max-width: calc(100vw - 32px); background: var(--field); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-pop); overflow: hidden; }
.acc-head { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; background: var(--chrome); border-bottom: 1px solid var(--line); font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.acc-logo { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 3px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; }
.acc-body { padding: 14px 16px 6px; display: flex; flex-direction: column; gap: 10px; }
.acc-t { font-size: var(--fs-sm); color: var(--ink2); line-height: 1.6; }
.acc-l { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-xs); color: var(--ink3); }
.acc-in { height: 28px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 2px 8px; background: var(--field); font-size: var(--fs-md); letter-spacing: 1px; }
.acc-in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.acc-err { min-height: 18px; font-size: var(--fs-xs); color: var(--danger); }
.acc-foot { display: flex; align-items: center; gap: 8px; padding: 8px 16px 14px; }
.acc-note { font-size: var(--fs-xs); color: var(--ink3); margin-right: auto; }
.acc-btn { height: 28px; padding: 0 18px; border: 1px solid var(--brand); background: var(--brand); color: #fff; border-radius: var(--r-sm); font-size: var(--fs-sm); }
.acc-btn:hover:not(:disabled) { filter: brightness(1.12); }
.acc-btn:disabled { opacity: 0.55; }
