/* ================================================================
   首屏演示区（整块替换为「用电优化 Agent 决策台」参考稿）
   —— 独立命名空间 .jt2-*，不依赖旧的 jt-agent / jt-report / jtp 样式
   ================================================================ */

/* 浏览器外壳 */
.jt2-browser {
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #ffffff;
  box-shadow: 0 24px 48px -24px rgba(15, 23, 42, 0.16), 0 8px 16px -8px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

/* 浏览器顶栏 */
.jt2-browser-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.jt2-browser-dots {
  display: flex;
  gap: 0.4rem;
}
.jt2-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.jt2-dot--red { background: #ef4444; }
.jt2-dot--yellow { background: #f59e0b; }
.jt2-dot--green { background: #10b981; }
.jt2-browser-url {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  font-size: 0.75rem;
  color: #64748b;
  min-width: 0;
}
.jt2-browser-url svg { flex: none; color: #94a3b8; }
.jt2-browser-url span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jt2-browser-logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #0f172a;
  white-space: nowrap;
}
.jt2-browser-logo img {
  width: 20px;
  height: 20px;
}

/* 演示内容区 */
.jt-demo {
  background: #ffffff;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

/* 三栏：图标导航 / 对话面板 / 分析画布 */
.jt2-app {
  display: grid;
  grid-template-columns: 52px minmax(0, 360px) minmax(0, 1fr);
  align-items: stretch;
}
@media (max-width: 1279px) { .jt2-app { grid-template-columns: 48px minmax(0, 340px) minmax(0, 1fr); } }
@media (max-width: 1023px) { .jt2-app { grid-template-columns: minmax(0, 1fr); } }

/* ---------- ① 最左：图标导航 ---------- */
.jt2-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0.35rem;
  background: #ffffff;
  border-right: 1px solid rgba(15, 23, 42, 0.06);
}
.jt2-rail-top, .jt2-rail-bottom { display: flex; flex-direction: column; align-items: center; gap: 0.55rem; }
.jt2-rail button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.jt2-rail button svg { width: 18px; height: 18px; }
.jt2-rail button:hover { background: #f1f5f9; color: #64748b; }
.jt2-rail button.is-active { background: #ecfdf5; color: #059669; }
.jt2-rail button.is-active svg { fill: #d1fae5; }

/* ---------- ② 左：Agent 对话面板 ---------- */
.jt2-agent {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 430px;
  background: #ffffff;
  border-right: 1px solid rgba(15, 23, 42, 0.06);
  overflow: hidden;
}
.jt2-agent-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: #000000;
  letter-spacing: -0.01em;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.jt2-agent-head img {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
}
.jt2-chat {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.9rem 0.9rem 0.2rem;
}
.jt2-chat::-webkit-scrollbar { width: 4px; }
.jt2-chat::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* 需求卡 */
.jt2-req { background: #f1f5f9; border: 1px solid rgba(15, 23, 42, 0.06); border-radius: 12px; padding: 0.65rem 0.75rem; }
.jt2-req b { display: block; font-size: 13px; font-weight: 500; color: #000000; margin-bottom: 0.25rem; }
.jt2-req p { margin: 0; font-size: 12px; line-height: 1.65; color: #64748b; }

/* 气泡：Agent 灰色靠左，用户绿色靠右 */
.jt2-row { display: flex; align-items: flex-start; gap: 0.45rem; }
.jt2-row.is-user { justify-content: flex-end; }
.jt2-av {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 0.1rem;
  border-radius: 8px;
  border: 1px solid #d1fae5;
  background: #ecfdf5;
  color: #059669;
}
.jt2-av svg { width: 13px; height: 13px; }
.jt2-bub {
  margin: 0;
  padding: 0.45rem 0.7rem;
  border-radius: 14px 14px 14px 3px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12.5px;
  line-height: 1.55;
}
.jt2-pill {
  margin: 0;
  padding: 0.45rem 0.7rem;
  max-width: 92%;
  border-radius: 14px 14px 3px 14px;
  border: 1px solid #a7f3d0;
  background: rgba(209, 250, 229, 0.8);
  color: #064e3b;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.55;
}

/* 任务执行框 */
.jt2-task { margin-top: 0.2rem; background: rgba(236, 253, 245, 0.7); border: 1px solid #d1fae5; border-radius: 12px; padding: 0.6rem 0.7rem; display: flex; flex-direction: column; gap: 0.45rem; }
.jt2-task-head { display: flex; align-items: center; gap: 0.3rem; font-size: 12.5px; font-weight: 500; color: #047857; }
.jt2-task-head svg { width: 15px; height: 15px; flex: none; color: #059669; }
.jt2-task-bar { height: 6px; border-radius: 999px; background: #d1fae5; overflow: hidden; }
.jt2-task-bar i { display: block; height: 100%; width: 66%; border-radius: 999px; background: #10b981; transition: width 0.5s ease; }

/* 底部输入（圆形搜索框 + 绿色发送） */
.jt2-input {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.55rem 0.75rem 0.75rem;
  padding: 0.3rem 0.35rem 0.3rem 0.7rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.jt2-input:focus-within { border-color: #10b981; background: #ffffff; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12); }
.jt2-input > svg { width: 15px; height: 15px; flex: none; color: #94a3b8; }
.jt2-input > input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font: inherit; font-size: 12.5px; color: #334155; }
.jt2-input > input::placeholder { color: #94a3b8; }
.jt2-send {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 999px;
  background: #111111;          /* 发送按钮：与全站主按钮一致的黑色 */
  color: #ffffff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.jt2-send svg { width: 14px; height: 14px; }
.jt2-send:hover { background: #000000; transform: translateY(-1px); }

/* 分析画布 */
.jt2-canvas {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.2rem;
  min-width: 0;
  padding: 1.1rem 1.15rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.jt2-canvas > * { position: relative; z-index: 1; }
.jt2-stack { display: flex; flex-direction: column; gap: 1.2rem; }

/* 卡片：白底 + 细边 + 轻微悬停抬起（与首页一致） */
.jt2-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}
.jt2-card:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 185, 129, 0.25);
  box-shadow: 0 12px 24px -12px rgba(15, 23, 42, 0.08);
}

/* 卡头：左侧「基线」标签 + 右侧序号（.proof-card-top / .proof-tag / .proof-idx） */
.jt2-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
}
.jt2-tag {
  display: inline-flex;
  align-items: center;
  flex: none;
  padding: 0.25rem 0.55rem;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.jt2-tag s { text-decoration: none; }
.jt2-card:hover .jt2-tag {
  background: #ecfdf5;
  border-color: rgba(16, 185, 129, 0.25);
  color: #047857;
}
.jt2-summary .jt2-tag {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.08);
  color: #64748b;
}
.jt2-idx {
  position: relative;
  z-index: 1;
  flex: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: #cbd5e1;
}

/* 8 步求解轨道：序号节点 + 末节点结果高亮 */
.jt2-track { padding: 0.95rem 1rem 0.85rem; overflow-x: auto; scrollbar-width: none; }
.jt2-track::-webkit-scrollbar { display: none; }
.jt2-track-inner { display: flex; align-items: flex-start; min-width: 620px; }
.jt2-step { position: relative; flex: 1 1 0; text-align: center; }
.jt2-step i {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin: 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 500;
  font-style: normal;
  line-height: 1;
}
.jt2-step i svg { width: 12px; height: 12px; }
.jt2-step span { display: block; margin-top: 0.45rem; font-size: 11.5px; color: #64748b; white-space: nowrap; }
.jt2-step::after {
  content: "";
  position: absolute;
  top: 9.5px;
  left: calc(50% + 12px);
  right: calc(-50% + 12px);
  height: 1px;
  background: #e2e8f0;
}
.jt2-step:last-child::after { display: none; }
.jt2-step.is-end i {
  border-color: #10b981;
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}
.jt2-step.is-end span { color: #059669; font-weight: 500; }

/* 图形卡片 */
.jt2-chartcard { padding: 1rem 1.1rem 0.8rem; display: flex; flex-direction: column; gap: 0.9rem; }
.jt2-chart-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.4rem 1rem; }
.jt2-title-wrap { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.jt2-title { font-size: 14.5px; font-weight: 500; letter-spacing: -0.01em; color: #000000; }
/* 分段控件：与 .proof-tag 同款胶囊描边 */
.jt2-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.jt2-toggle button { border: none; background: transparent; border-radius: 999px; padding: 0.2rem 0.7rem; font-size: 11.5px; color: #64748b; cursor: pointer; transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease; }
.jt2-toggle button.is-active { background: #ffffff; color: #047857; font-weight: 500; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
.jt2-info { font-size: 11.5px; color: #94a3b8; }

/* 绘图区：零线居中，柱体向上下生长 */
.jt2-plot { position: relative; height: 232px; }
.jt2-zero { position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed #cbd5e1; }
.jt2-bars { position: absolute; inset: 0; display: flex; align-items: center; gap: 1px; }
.jt2-col { flex: 1 1 0; position: relative; height: 100%; }
.jt2-col b { position: absolute; left: 0; right: 0; border-radius: 3px; transition: height 0.3s ease, filter 0.2s ease; }
/* 柱体配色与「客户价值」板块的柱图一致：满高柱用品牌绿渐变，次级柱用浅绿 */
.jt2-col.is-up b { bottom: 50%; background: linear-gradient(180deg, #34d399, #10b981); }
.jt2-col.is-dn b { top: 50%; background: #a7f3d0; }
.jt2-col:hover b { filter: brightness(0.92); }
/* hover 气泡：显示时刻与动作功率 */
.jt2-col > em {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.9);
  color: #ffffff;
  font-style: normal;
  font-size: 10px;
  line-height: 1.4;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.jt2-col:hover > em { opacity: 1; }
.jt2-xaxis { display: flex; justify-content: space-between; font-size: 11.5px; color: #94a3b8; }
.jt2-legend { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.35rem 1.2rem; font-size: 11.5px; color: #475569; }
.jt2-lg { display: inline-flex; align-items: center; gap: 0.35rem; }
.jt2-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.jt2-dot--dis { background: #10b981; }
.jt2-dot--chg { background: #a7f3d0; }
/* 算法状态：绿色胶囊标签（.proof-tag 悬停态） */
.jt2-algo {
  padding: 0.22rem 0.5rem;
  border-radius: 8px;
  background: #ecfdf5;
  border: 1px solid rgba(16, 185, 129, 0.22);
  font-size: 11px;
  font-weight: 500;
  color: #047857;
}

/* ---------- 底部汇总：客户价值板块「大数字 + 单位 + 名称」结论卡 ---------- */
.jt2-summary {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  padding: 0.75rem 1.1rem 0.85rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 16px;
  background: #ffffff;
  transition: border-color 0.3s ease;
}
.jt2-summary:hover {
  border-color: rgba(16, 185, 129, 0.25);
}
.jt2-sum-main { position: relative; z-index: 1; min-width: 0; }
.jt2-sum-value {
  position: relative;
  z-index: 1;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.16rem;
  font-size: 1.35rem;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.jt2-sum-num {
  font-size: 1.1em;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  letter-spacing: -0.02em;
  color: #0d9488;
}
.jt2-sum-unit {
  font-size: 0.75em;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: #64748b;
}
/* 名称 + 降幅（对应 .proof-name） */
.jt2-sum-name {
  position: relative;
  z-index: 1;
  margin: 0.2rem 0 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: #64748b;
}
.jt2-sum-name em {
  font-style: normal;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  font-size: 11px;
  font-weight: 400;
  color: #047857;
}
/* 右侧明细 */
.jt2-sum-side {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  text-align: right;
}
.jt2-sum-line { margin: 0; font-size: 12px; letter-spacing: 0.01em; color: #64748b; }
.jt2-sum-line em { font-style: normal; font-weight: 500; color: #059669; }

/* 窄屏适配：导航转顶栏、画布留白收紧 */
@media (max-width: 1023px) {
  .jt2-rail {
    flex-direction: row;
    justify-content: space-between;
    padding: 0.45rem 0.7rem;
    border-right: none;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  }
  .jt2-rail-top, .jt2-rail-bottom { flex-direction: row; gap: 0.5rem; }
  .jt2-agent { border-right: none; border-bottom: 1px solid rgba(15, 23, 42, 0.06); min-height: 380px; }
  .jt2-canvas { padding: 0.9rem; }
}
@media (max-width: 639px) {
  .jt2-canvas { padding: 0.75rem; gap: 0.9rem; }
  .jt2-stack { gap: 0.9rem; }
  .jt2-plot { height: 180px; }
  .jt2-summary { padding: 0.7rem 0.85rem 0.8rem; }
  .jt2-sum-side { gap: 0.2rem; }
  .jt2-chart-head .jt2-tag { display: none; }   /* 窄屏优先保住标题与粒度切换 */
}
/* 尊重系统「减少动效」设置 */
@media (prefers-reduced-motion: reduce) {
  .jt2-card,
  .jt2-summary,
  .jt2-card::after,
  .jt2-summary::after { transition: none; }
}
