/* ============================================================
   demo.css —— 在线体验页：上传区 / 状态机结果卡 / 结果展示
   ============================================================ */

.demo-section { padding: 72px 0 88px; }

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 26px;
  align-items: start;
}

.panel-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  padding: 30px;
  box-shadow: var(--shadow-s);
}
.panel-card h2 { font-size: 19px; margin-bottom: 6px; }
.panel-card .panel-sub { font-size: 13.5px; color: var(--text-3); margin-bottom: 22px; }

/* ---------- 上传区 ---------- */
.drop-zone {
  position: relative;
  min-height: 320px;
  border: 2px dashed var(--line);
  border-radius: var(--r-m);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  overflow: hidden;
}
.drop-zone:hover { border-color: var(--brand); background: rgba(18, 224, 164, 0.04); }
.drop-zone.dragover { border-color: var(--brand); background: rgba(18, 224, 164, 0.09); }

.drop-zone .dz-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}
.drop-zone .dz-icon svg { width: 30px; height: 30px; }
.drop-zone .dz-title { font-size: 16px; font-weight: 600; }
.drop-zone .dz-hint { font-size: 13px; color: var(--text-3); line-height: 1.7; }

/* 已选图状态 */
.drop-zone.has-image {
  padding: 0;
  border-style: solid;
  border-color: var(--line);
  cursor: default;
  background: var(--ink);
}
.drop-zone.has-image:hover { border-color: var(--line); background: var(--ink); }
.drop-zone.has-image .dz-placeholder { display: none; }
.drop-zone:not(.has-image) .preview-wrap { display: none; }

.preview-wrap { position: relative; width: 100%; }
/* 预览图：容器用 aspect-ratio 锁定比例，图片 contain 填充，永不变形 */
.preview-wrap img, .preview-wrap canvas {
  width: 100%;
  max-height: 430px;
  object-fit: contain;
  display: block;
}
/* 画框 canvas：与 img 完全相同的布局盒（absolute + inset:0），
   JS 按图片实际渲染区域换算坐标后绘制，保证框与图严格对齐 */
#detCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
/* 结果图：等比缩放，不裁切不变形 */
[data-role="result-image"] {
  display: block;
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: contain;
  background: var(--ink);
  border-radius: 10px;
  margin-bottom: 12px;
}
.preview-meta {
  position: absolute;
  left: 12px; bottom: 12px;
  max-width: calc(100% - 24px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(10, 18, 32, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e6eefb;
  font-size: 12px;
  backdrop-filter: blur(6px);
}
.btn-replace {
  position: absolute;
  top: 12px; right: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(10, 18, 32, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #eaf1fc;
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.btn-replace:hover { border-color: var(--brand); color: var(--brand); }

.upload-actions { display: flex; gap: 12px; margin-top: 20px; }
.upload-actions .btn { flex: 1; }
.upload-actions .btn[disabled] { opacity: 0.45; pointer-events: none; }

.data-notice {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.7;
}
.data-notice svg { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--brand-deep); }

/* ---------- 开放能力选择 ---------- */
.cap-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.cap-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--white);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.cap-tab:hover { border-color: var(--brand); color: var(--brand-deep); }
.cap-tab.active {
  border-color: var(--brand-deep);
  background: var(--brand-soft);
  color: var(--brand-deep);
}
.cap-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-light);
  color: var(--text-3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.cap-badge--hot {
  background: linear-gradient(90deg, #ff4d4f, #f5222d);
  color: #fff;
}
/* 零样本近似徽标：开放词汇模型按场景提示词判定，非专用权重 */
.cap-badge--zs {
  background: rgba(255, 149, 0, 0.14);
  color: #ad6800;
  border: 1px solid rgba(255, 149, 0, 0.32);
}
.cap-item.active .cap-badge--zs {
  background: rgba(255, 149, 0, 0.9);
  color: #fff;
  border-color: transparent;
}
.cap-desc {
  margin: 0 0 20px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--bg-light);
  border-left: 3px solid var(--brand);
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.7;
}

/* ---------- 结果卡状态机 ---------- */
.result-body { min-height: 320px; display: flex; flex-direction: column; }
.result-state {
  display: none;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 16px 0;
}
.result-state.active { display: flex; }

.state-icon {
  width: 72px; height: 72px;
  border-radius: 20px;
  background: var(--bg-light);
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.state-icon svg { width: 32px; height: 32px; }
.state-title { font-size: 16px; font-weight: 600; }
.state-desc { font-size: 13px; color: var(--text-3); line-height: 1.8; }
/* 错误详情可能包含多行排查指引，保留换行并允许复制命令 */
.state-desc--error {
  white-space: pre-wrap;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-2);
  background: rgba(0, 0, 0, 0.03);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 8px;
  max-width: 100%;
  overflow-x: auto;
  user-select: text;
}

/* loading */
.spinner {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 4px solid var(--line);
  border-top-color: var(--brand);
  animation: demo-spin 0.9s linear infinite;
}
@keyframes demo-spin { to { transform: rotate(360deg); } }

/* 结果展示 */
.result-head { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.result-big {
  font-size: 92px;
  font-weight: 800;
  line-height: 1;
  color: var(--brand-deep);
  letter-spacing: -0.02em;
}
.result-name { font-size: 17px; font-weight: 600; }
.result-model { font-size: 12px; color: var(--text-3); }

.conf-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--bg-light);
  overflow: hidden;
  margin-top: 20px;
}
.conf-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-deep));
  transition: width 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.result-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  margin-top: 18px;
}
.rm-item {
  background: var(--bg-light);
  border-radius: 12px;
  padding: 13px 8px;
}
.rm-item .rm-k { font-size: 12px; color: var(--text-3); }
.rm-item .rm-v {
  font-size: 15px;
  font-weight: 700;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.result-tip { font-size: 12.5px; color: var(--text-3); line-height: 1.7; margin-top: 16px; }

/* 检测统计 chips（安全帽等检测类能力） */
.stat-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 16px;
}
.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--bg-light);
  color: var(--text-2);
}
.stat-chip .n { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-chip--ok { border-color: rgba(18, 185, 129, 0.4); background: rgba(18, 185, 129, 0.1); color: #0a8f66; }
.stat-chip--ok .n { color: #0a8f66; }
.stat-chip--warn { border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.09); color: #d43425; }
.stat-chip--warn .n { color: #d43425; }

/* 错误态 */
.state-icon.error { background: #fff1f0; color: #d4380d; }

/* ---------- 说明条（体验流程） ---------- */
.demo-flow {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.flow-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 20px 22px;
}
.flow-item .flow-num {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 流程卡配图：与步骤语义对应的实景缩略图 */
.flow-item .flow-thumb {
  flex: none;
  width: 78px; height: 78px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(13, 27, 51, 0.08);
  transition: transform 0.3s ease;
}
.flow-item:hover .flow-thumb { transform: scale(1.06); }
.flow-item h4 { font-size: 14.5px; margin-bottom: 4px; }
.flow-item p { font-size: 13px; color: var(--text-3); line-height: 1.7; }

@media (max-width: 960px) {
  .demo-grid { grid-template-columns: 1fr; }
  .demo-flow { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .flow-item .flow-thumb { width: 60px; height: 60px; }
}

/* ---------- 三大类板块选择 ---------- */
.cat-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.cat-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 12px;
  border: 2px solid var(--line);
  border-radius: var(--r-m);
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s ease;
}
.cat-tab:hover {
  border-color: var(--brand);
  background: rgba(18, 224, 164, 0.04);
}
.cat-tab.active {
  border-color: var(--brand);
  background: rgba(18, 224, 164, 0.08);
  box-shadow: 0 2px 12px rgba(18, 224, 164, 0.15);
}
.cat-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cat-icon svg { width: 22px; height: 22px; }
.cat-name { font-size: 14px; font-weight: 700; color: var(--text-1); }
.cat-count { font-size: 12px; color: var(--text-3); }

/* ---------- 能力列表 ---------- */
.cap-list {
  margin: 14px 0 22px;
}
.cap-group {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
}
.cap-group.active { display: grid; }
.cap-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--bg-light);
  border: 1px solid var(--line);
  cursor: default;
  transition: all 0.15s ease;
}
/* 可测能力项：可点击切换当前检测模型 */
.cap-item--runnable { cursor: pointer; }
.cap-item--runnable:hover {
  border-color: var(--brand);
  background: rgba(18, 224, 164, 0.06);
}
.cap-item.active {
  border-color: var(--brand);
  background: rgba(18, 224, 164, 0.10);
  color: var(--text-1);
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(18, 224, 164, 0.12);
}
.cap-badge {
  margin-left: auto;
  flex: none;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--brand-deep);
  background: rgba(18, 224, 164, 0.16);
}
/* 同行第二个徽标（如「零样本」）不再分剩余空间，紧跟第一个徽标靠右排列 */
.cap-badge + .cap-badge { margin-left: 0; }
.cap-item.active .cap-badge {
  color: #fff;
  background: var(--brand-deep);
}
.cap-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand);
  flex: none;
}

/* ---------- 当前检测能力提示 ---------- */
.cap-current {
  margin: -8px 0 20px;
  padding: 10px 14px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-2);
  background: rgba(18, 224, 164, 0.07);
  border: 1px dashed rgba(18, 224, 164, 0.45);
  border-radius: 8px;
}
.cap-current b { color: var(--brand-deep); }

/* ---------- 开放词汇检测测试区（独立板块） ---------- */
.vlm-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 2px dashed var(--line);
}
.vlm-header {
  margin-bottom: 20px;
}
.vlm-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.vlm-title svg {
  width: 28px; height: 28px;
  color: var(--brand-deep);
}
.vlm-title h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-1);
}
.vlm-desc {
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.7;
}
.vlm-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 26px;
  align-items: start;
}
.vlm-description {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--bg-light);
  border-radius: var(--r-m);
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--text-2);
  border-left: 3px solid var(--brand);
}
/* 视频推理区：视频预览（与 img/canvas 同盒，contain 不裁切） */
.preview-wrap video {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0a1220;
  border-radius: var(--r-s);
}
/* 视频推理区：时序事件时间线 */
.vlm-timeline { margin: 2px 0 4px; }
.vlm-tl-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 10px;
}
.vlm-tl-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.vlm-tl-item {
  position: relative;
  padding: 0 0 12px 20px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
}
.vlm-tl-item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(42, 155, 224, 0.16);
}
.vlm-tl-item::after {
  content: "";
  position: absolute;
  left: 7.5px;
  top: 17px;
  bottom: 2px;
  width: 1px;
  background: var(--line);
}
.vlm-tl-item:last-child { padding-bottom: 2px; }
.vlm-tl-item:last-child::after { display: none; }
.vlm-tl-item--idle::before {
  background: #b9c5d4;
  box-shadow: none;
}
.vlm-tl-time {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(42, 155, 224, 0.1);
  color: var(--brand-deep);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.vlm-tl-item--idle .vlm-tl-time {
  background: #eef2f7;
  color: #7b8aa0;
}
.vlm-tl-summary {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.7;
}
@media (max-width: 960px) {
  .vlm-grid { grid-template-columns: 1fr; }
}

/* ---------- 三大类独立分区（与 vlm-section 一致） ---------- */
.cat-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 2px dashed var(--line);
}
.cat-section:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.cat-header { margin-bottom: 20px; }
.cat-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.cat-title svg {
  width: 28px; height: 28px;
  color: var(--brand-deep);
  flex: none;
}
.cat-title h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-1);
}
.cat-count-badge {
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(18, 224, 164, 0.16);
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.cat-desc {
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.7;
}
.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 26px;
  align-items: start;
}
.cat-grid .cap-list {
  margin: 6px 0 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
}
.cat-grid .panel-card h2 { margin-top: 0; }
.cat-grid .panel-card h2 + .panel-sub { margin-bottom: 14px; }
.cat-grid .panel-card .cap-list + h2 { margin-top: 22px; }
@media (max-width: 960px) {
  .cat-grid { grid-template-columns: 1fr; }
  .cat-grid .cap-list { grid-template-columns: 1fr; }
}

/* ============================================================
   排版优化（202610141600）：Hero 精简 / 能力总览条 / 三分区色条
   ============================================================ */

/* Hero 区精简：压缩上下留白，让首屏更快看到能力总览 */
.page-hero { padding: 36px 0 20px; }
.page-hero h1 { font-size: 30px; margin-bottom: 6px; }
.page-hero .lead { font-size: 14.5px; line-height: 1.7; margin: 0; }

/* 能力总览条 */
.cap-overview-bar { padding: 0 0 8px; text-align: center; }
.cap-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.cap-overview-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 28px 26px;
  min-height: 260px;
  background: #0f172a;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.cap-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(10, 18, 32, 0.28);
  border-color: rgba(255, 255, 255, 0.35);
}
.cap-overview-card.is-active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(42, 155, 224, 0.4), 0 16px 36px rgba(10, 18, 32, 0.3);
}
.cap-overview-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.cap-overview-mask {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(8, 12, 24, 0.1) 0%, rgba(8, 12, 24, 0.45) 50%, rgba(8, 12, 24, 0.85) 100%);
}
.cap-overview-text { position: relative; z-index: 2; }
.cap-overview-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  letter-spacing: 0.5px;
}
.cap-overview-count {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 6px;
  line-height: 1.4;
}
.cap-overview-tip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  padding: 10px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(42, 155, 224, 0.2), rgba(42, 155, 224, 0.1));
  border: 1.5px solid rgba(42, 155, 224, 0.5);
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-deep);
  text-align: center;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  animation: cap-tip-breathe 2.6s ease-in-out infinite;
}
.cap-overview-tip::before {
  content: "↑";
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
  animation: cap-tip-arrow 1.5s ease-in-out infinite;
}
@keyframes cap-tip-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(42, 155, 224, 0.22); }
  50% { box-shadow: 0 0 0 7px rgba(42, 155, 224, 0); }
}
@keyframes cap-tip-arrow {
  0%, 100% { transform: translateY(1px); }
  50% { transform: translateY(-4px); }
}

/* 返回总览按钮 */
.section-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 14px;
  padding: 7px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.section-back:hover {
  color: var(--brand-deep);
  border-color: var(--brand);
}

/* 分区隐藏时占位 */
[data-section][hidden] { display: none !important; }

/* 三个分区左侧色条（园区绿 / 工业蓝 / OCR 橙） */
.cat-section {
  position: relative;
  padding-left: 22px;
}
.cat-section::before {
  content: '';
  position: absolute;
  left: 0; top: 36px; bottom: 4px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--brand), var(--brand-deep));
}
.cat-section[data-cat-section="industrial"]::before {
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
}
.cat-section[data-cat-section="ocr"]::before {
  background: linear-gradient(180deg, #f97316, #c2410c);
}
.cat-section:first-of-type {
  padding-left: 0;
}
.cat-section:first-of-type::before {
  display: none;
}

/* 分区标题图标容器配色（与总览条一致） */
.cat-title > svg {
  width: 44px; height: 44px;
  padding: 11px;
  box-sizing: border-box;
  border-radius: 12px;
  background: rgba(18, 185, 129, 0.14);
  color: #0a8f66;
  flex: none;
}
.cat-section[data-cat-section="industrial"] .cat-title > svg {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}
.cat-section[data-cat-section="ocr"] .cat-title > svg {
  background: rgba(249, 115, 22, 0.12);
  color: #ea580c;
}

/* 能力列表桌面端改 3 列，更紧凑 */
.cat-grid .cap-list {
  grid-template-columns: repeat(3, 1fr);
  gap: 6px 10px;
}
@media (max-width: 1280px) {
  .cat-grid .cap-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .cat-grid .cap-list { grid-template-columns: 1fr; }
}

/* 上传区微调：更轻量 */
.drop-zone {
  min-height: 240px;
  background: linear-gradient(180deg, rgba(18, 224, 164, 0.025), transparent 60%);
}

/* 结果大字号加渐变 */
.result-big {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* panel-card 圆角与阴影微调 */
.panel-card {
  border-radius: 16px;
  box-shadow: 0 2px 14px rgba(10, 18, 32, 0.05);
}

/* 总览条移动端 */
@media (max-width: 768px) {
  .cap-overview { grid-template-columns: 1fr; gap: 12px; }
  .cap-overview-card { min-height: 180px; padding: 20px; }
  .cap-overview-title { font-size: 18px; }
  .cap-overview-count { font-size: 12.5px; }
  .cap-overview-tip { font-size: 14.5px; padding: 9px 16px; }
}
@media (min-width: 769px) and (max-width: 1100px) {
  .cap-overview { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   边缘实时监测演示区
   ============================================================ */

/* 边缘分区左侧色条（紫色） */
.cat-section[data-cat-section="edge"]::before,
#cat-edge.cat-section::before {
  background: linear-gradient(180deg, #8b5cf6, #6d28d9);
}
#cat-edge.cat-section .cat-title > svg {
  background: rgba(139, 92, 246, 0.12);
  color: #7c3aed;
}

/* 边缘演示容器 */
.edge-demo-container { margin-bottom: 32px; }
.edge-demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  align-items: start;
}
@media (max-width: 960px) {
  .edge-demo-grid { grid-template-columns: 1fr; }
}

/* 视频包裹区 */
.edge-video-wrap {
  position: relative;
  border-radius: var(--r-m);
  overflow: hidden;
  background: #0a1220;
  aspect-ratio: 16 / 9;
}
.edge-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 视频覆盖层（未播放时显示） */
.edge-video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 32, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: opacity 0.3s ease;
}
.edge-video-overlay.hidden { opacity: 0; pointer-events: none; }
.edge-overlay-content {
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
}
.edge-overlay-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}
.edge-overlay-icon svg { width: 28px; height: 28px; }
.edge-overlay-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.edge-overlay-desc { font-size: 13px; color: rgba(255, 255, 255, 0.6); }

/* LIVE 角标 */
.edge-live-badge {
  position: absolute;
  top: 12px; left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  z-index: 3;
}
.edge-live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: edge-live-pulse 1.2s ease-in-out infinite;
}
@keyframes edge-live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* 事件面板状态机 */
.edge-event-panel {
  min-height: 320px;
  display: flex;
  flex-direction: column;
}
.edge-state {
  display: none;
  flex: 1;
  flex-direction: column;
  gap: 14px;
}
.edge-state.active { display: flex; }

/* 统计行 */
.edge-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.edge-stat-item {
  background: var(--bg-light);
  border-radius: 12px;
  padding: 14px 8px;
  text-align: center;
}
.edge-stat-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-deep);
  font-variant-numeric: tabular-nums;
}
.edge-stat-label {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 2px;
}

/* 事件列表 */
.edge-event-list {
  flex: 1;
  overflow-y: auto;
  max-height: 320px;
  margin-top: 4px;
}
.edge-event-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.5;
  animation: edge-event-in 0.35s ease-out;
}
@keyframes edge-event-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.edge-event-time {
  flex: none;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.edge-event-label {
  font-weight: 600;
  color: var(--text-1);
}
.edge-event-label--warn {
  color: #d4380d;
}
.edge-event-conf {
  margin-left: auto;
  flex: none;
  font-size: 11.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* 演示结束提示 */
.edge-done-note {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--bg-light);
  border-left: 3px solid #8b5cf6;
  font-size: 12.5px;
  color: var(--text-3);
  text-align: center;
}

/* 边缘 vs 云端对比 */
.edge-compare {
  margin: 28px 0;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
}
.edge-compare-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
}
.edge-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 768px) {
  .edge-compare-grid { grid-template-columns: 1fr; }
}
.edge-compare-item {
  padding: 18px;
  border-radius: 12px;
  background: var(--bg-light);
  border: 1px solid var(--line);
}
.edge-compare-item--highlight {
  background: rgba(139, 92, 246, 0.05);
  border-color: rgba(139, 92, 246, 0.3);
}
.edge-compare-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--bg-light);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}
.edge-compare-item--highlight .edge-compare-badge {
  background: rgba(139, 92, 246, 0.15);
  color: #7c3aed;
}
.edge-compare-item ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.edge-compare-item li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
}
.edge-compare-item li .ck {
  flex: none;
  font-weight: 600;
  color: var(--text-1);
}
.edge-compare-item--highlight li .ck {
  color: #7c3aed;
}

/* 支持硬件平台 */
.edge-platforms {
  margin: 24px 0;
  text-align: center;
}
.edge-platforms-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
}
.edge-platform-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.edge-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  transition: border-color 0.2s, color 0.2s;
}
.edge-chip:hover {
  border-color: #8b5cf6;
  color: #7c3aed;
}
.edge-chip--more {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.3);
  color: #7c3aed;
}

/* 工作流程 */
.edge-workflow {
  margin: 28px 0 12px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
}
.edge-workflow-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}
.edge-workflow-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.edge-wf-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--bg-light);
  border-radius: 12px;
  border: 1px solid var(--line);
  min-width: 160px;
}
.edge-wf-num {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 9px;
  background: rgba(139, 92, 246, 0.14);
  color: #7c3aed;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.edge-wf-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.edge-wf-text strong {
  font-size: 13.5px;
  color: var(--text-1);
}
.edge-wf-text span {
  font-size: 12px;
  color: var(--text-3);
}
.edge-wf-arrow {
  flex: none;
  width: 24px; height: 24px;
  color: var(--text-3);
}
.edge-wf-arrow svg { width: 100%; height: 100%; }

@media (max-width: 960px) {
  .edge-workflow-steps {
    flex-direction: column;
    gap: 6px;
  }
  .edge-wf-arrow {
    transform: rotate(90deg);
  }
  .edge-wf-step { width: 100%; }
}
