/* ============================================================
   售前工作台层样式:首页、能力选择、回答增强、会话情报面板
   颜色一律经 --c(能力色)派生,深浅主题共用一套规则
   ============================================================ */

/* ---------- 通用小件 ---------- */
.iconbtn {
  width: 32px; height: 32px; border-radius: var(--r-sm);
  display: inline-grid; place-items: center; color: var(--text-2);
  transition: background .15s var(--ease), color .15s var(--ease);
}
.iconbtn:hover { background: var(--surface-2); color: var(--brand); }
.topbar__acts { display: flex; gap: 2px; margin-left: 8px; }
body:not(.has-thread) #btnExport, body:not(.has-thread) #btnInsp { display: none; }

.wbbtn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px;
  border-radius: var(--r-pill); font-size: 13px; font-weight: 500;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.wbbtn svg { width: 13px; height: 13px; }
.wbbtn--ghost { border: 1px solid var(--border-strong); color: var(--text-2); background: var(--surface); }
.wbbtn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.wbbtn--primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.wbbtn--primary:hover { background: var(--brand-hover); transform: translateY(-1px); }

.capbadge {
  --c: var(--brand);
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px 0 7px;
  border-radius: var(--r-pill); font-size: 12px; font-weight: 600; white-space: nowrap;
  color: color-mix(in srgb, var(--c) 82%, var(--text));
  background: color-mix(in srgb, var(--c) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 26%, transparent);
}
.capbadge svg { width: 12px; height: 12px; }
.capbadge.is-mini { height: 19px; font-size: 11px; padding: 0 7px 0 5px; }
.capbadge.is-pulse { animation: capin .45s var(--ease-out) both; }
@keyframes capin { from { opacity: 0; transform: translateY(4px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- 侧栏:搜索、分组、会话状态 ---------- */
.rail__search {
  display: flex; align-items: center; gap: 7px; margin: 14px 12px 4px; padding: 0 10px; height: 32px;
  border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid transparent; color: var(--text-3);
  transition: border-color .15s, background .15s;
}
.rail__search:focus-within { border-color: var(--brand); background: var(--surface); }
.rail__search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 13px; }
.rail__group { padding: 12px 12px 4px; font-size: 11px; font-weight: 600; letter-spacing: .4px; color: var(--text-3); }
.sess__dot {
  --c: var(--brand);
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-right: 2px;
  background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 16%, transparent);
}
.sess.is-busy .sess__dot { animation: busy 1.1s ease-in-out infinite; }
@keyframes busy { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 8%, transparent); transform: scale(1.15); } }
.sess.is-unread .sess__label { font-weight: 650; color: var(--text); }
.sess.is-unread::after {
  content: '新'; font-size: 10px; font-weight: 700; color: #fff; background: var(--danger);
  border-radius: var(--r-pill); padding: 0 5px; line-height: 16px; margin-left: 4px; flex-shrink: 0;
}

/* ---------- 输入区:能力选择器 ---------- */
.composer__inner { position: relative; }
.box { padding-left: 9px; }
.modebtn {
  --c: var(--brand);
  flex-shrink: 0; align-self: flex-end; display: inline-flex; align-items: center; gap: 5px;
  height: 34px; padding: 0 9px 0 10px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600;
  color: color-mix(in srgb, var(--c) 85%, var(--text));
  background: color-mix(in srgb, var(--c) 11%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 28%, transparent);
  transition: background .15s, transform .15s;
}
.modebtn:hover { background: color-mix(in srgb, var(--c) 18%, transparent); }
.modebtn svg:first-child { width: 14px; height: 14px; }
.modebtn svg:last-child { width: 11px; height: 11px; opacity: .6; }
.modebtn.is-auto { color: var(--text-2); background: var(--surface-2); border-color: var(--border); }
.box .attach { order: 0; }
.modebtn { order: -1; }
.pfbtn {
  flex-shrink: 0; align-self: flex-end; order: -1; display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 10px;
  border-radius: var(--r-pill); font-size: 12.5px; color: var(--text-3); border: 1px dashed var(--border-strong); max-width: 150px;
  transition: border-color .15s, color .15s, background .15s;
}
.pfbtn svg { width: 14px; height: 14px; flex-shrink: 0; }
.pfbtn__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pfbtn:hover { border-color: var(--sf-logo-blue); color: var(--sf-logo-blue); }
.pfbtn.is-set { border-style: solid; color: var(--sf-logo-blue); border-color: color-mix(in srgb, var(--sf-logo-blue) 35%, transparent); background: color-mix(in srgb, var(--sf-logo-blue) 7%, transparent); font-weight: 600; }
:root[data-theme="dark"] .pfbtn.is-set, :root[data-theme="dark"] .pfbtn:hover { color: var(--brand-ink); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.insp__edit { margin-left: auto; font-size: 11.5px; font-weight: 500; color: var(--brand); padding: 1px 6px; border-radius: var(--r-xs); }
.insp__edit:hover { background: var(--brand-soft); }
.insp__hint { font-size: 12px; color: var(--text-3); line-height: 1.6; }
.formbtn {
  flex-shrink: 0; align-self: flex-end; display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 11px;
  border-radius: var(--r-pill); font-size: 12.5px; color: var(--text-2); border: 1px dashed var(--border-strong);
  transition: border-color .15s, color .15s;
}
.formbtn:hover { border-color: var(--brand); color: var(--brand); }
.formbtn svg { width: 13px; height: 13px; }

.modemenu {
  position: absolute; left: 0; bottom: calc(100% - 2px); width: min(460px, 100%); max-height: min(440px, 60vh); overflow-y: auto;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-3);
  padding: 6px; z-index: 30; animation: rise .18s var(--ease-out) both;
}
.modemenu__head { padding: 8px 10px 6px; font-size: 12.5px; font-weight: 650; color: var(--text); }
.modemenu__head span { display: block; font-weight: 400; font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.modemenu__item {
  --c: var(--brand);
  width: 100%; display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: var(--r-md); text-align: left;
}
.modemenu__item:hover, .modemenu__item.is-hl { background: var(--surface-2); }
.modemenu__ic {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center;
  color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent);
}
.modemenu__txt { flex: 1; min-width: 0; }
.modemenu__txt b { display: block; font-size: 13px; font-weight: 600; }
.modemenu__txt small { display: block; font-size: 11.5px; color: var(--text-3); line-height: 1.5; margin-top: 1px; }
.modemenu__on { color: var(--c); padding-top: 6px; }
.modemenu__empty { padding: 14px; font-size: 12.5px; color: var(--text-3); text-align: center; }

/* ---------- 首页工作台 ---------- */
.home { position: relative; max-width: 1080px; margin: 0 auto; padding: 44px 28px 40px; }
.home__glow { position: absolute; inset: 0 0 auto 0; height: 360px; pointer-events: none; z-index: 0; }
.home__glow i {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55;
  animation: drift 16s ease-in-out infinite alternate;
}
.home__glow i:nth-child(1) { width: 340px; height: 240px; left: -40px; top: -60px; background: color-mix(in srgb, var(--sf-blue) 30%, transparent); }
.home__glow i:nth-child(2) { width: 300px; height: 220px; left: 38%; top: -90px; background: color-mix(in srgb, #6D5BD0 22%, transparent); animation-delay: -5s; }
.home__glow i:nth-child(3) { width: 320px; height: 220px; right: -60px; top: -40px; background: color-mix(in srgb, var(--sf-logo-green) 26%, transparent); animation-delay: -9s; }
:root[data-theme="dark"] .home__glow i { opacity: .32; }
@keyframes drift { to { transform: translate(40px, 26px) scale(1.12); } }
.home > section { position: relative; z-index: 1; }

.home__hero { animation: rise .5s var(--ease-out) both; margin-bottom: 30px; }
.home__hello {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2);
  padding: 4px 12px 4px 10px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid var(--border); backdrop-filter: blur(6px);
}
.home__hello::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 22%, transparent); }
.home__title { font-size: 32px; font-weight: 700; letter-spacing: -.5px; margin: 16px 0 8px; line-height: 1.25; }
.home__title span { background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home__sub { font-size: 14.5px; color: var(--text-2); max-width: 68ch; margin: 0 0 20px; line-height: 1.7; }
.home__stats { display: flex; flex-wrap: wrap; gap: 10px; }
.stat {
  display: flex; align-items: baseline; gap: 6px; padding: 9px 16px; border-radius: var(--r-md);
  background: color-mix(in srgb, var(--surface) 78%, transparent); border: 1px solid var(--border); backdrop-filter: blur(6px);
  animation: rise .5s var(--ease-out) both;
}
.stat b { font-size: 22px; font-weight: 700; letter-spacing: -.3px; background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: 12.5px; color: var(--text-2); }

.home__sec { margin-top: 30px; }
.home__h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.home__h h2 { font-size: 16px; font-weight: 650; margin: 0; }
.home__h span { font-size: 12.5px; color: var(--text-3); }

/* 场景工作流 */
.flows { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.flow {
  --c: var(--brand);
  position: relative; padding: 14px 14px 10px; border-radius: var(--r-lg); background: var(--surface);
  border: 1px solid var(--border); overflow: hidden; animation: rise .45s var(--ease-out) both;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.flow::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 20%, transparent)); }
.flow:hover { border-color: color-mix(in srgb, var(--c) 40%, var(--border)); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.flow__head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.flow__ic { width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.flow__head b { display: block; font-size: 14px; font-weight: 650; }
.flow__head small { display: block; font-size: 11.5px; color: var(--text-3); line-height: 1.45; margin-top: 2px; }
.flow__steps { list-style: none; margin: 0; padding: 0; position: relative; }
.flow__steps::before { content: ''; position: absolute; left: 13px; top: 12px; bottom: 12px; width: 1.5px; background: color-mix(in srgb, var(--c) 22%, var(--border)); }
.flow__step {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 5px 4px; border-radius: var(--r-sm); text-align: left;
  font-size: 12.5px; color: var(--text-2); position: relative; transition: background .15s, color .15s;
}
.flow__step:hover { background: color-mix(in srgb, var(--c) 8%, transparent); color: var(--text); }
.flow__no {
  width: 19px; height: 19px; margin-left: 4px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  font-size: 10.5px; font-weight: 700; color: var(--c); background: var(--surface); border: 1.5px solid color-mix(in srgb, var(--c) 45%, transparent);
  position: relative; z-index: 1; transition: background .15s, color .15s;
}
.flow__step:hover .flow__no { background: var(--c); color: #fff; border-color: var(--c); }
.flow__t { flex: 1; min-width: 0; }
.flow__cap { --c: var(--brand); font-size: 10.5px; color: color-mix(in srgb, var(--c) 80%, var(--text-3)); opacity: 0; transition: opacity .15s; white-space: nowrap; }
.flow__step:hover .flow__cap { opacity: 1; }

/* 能力矩阵 */
.captiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.captile {
  --c: var(--brand);
  position: relative; padding: 14px 14px 12px; border-radius: var(--r-lg); background: var(--surface);
  border: 1px solid var(--border); display: flex; flex-direction: column; animation: rise .45s var(--ease-out) both;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.captile::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(420px 140px at 0% 0%, color-mix(in srgb, var(--c) 10%, transparent), transparent 70%);
}
.captile:hover { border-color: color-mix(in srgb, var(--c) 45%, var(--border)); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.captile:hover::after { opacity: 1; }
.captile__top { display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; }
.captile__ic {
  width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 62%, #fff));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--c) 30%, transparent);
}
.captile__ic svg { width: 17px; height: 17px; }
.captile__name { flex: 1; min-width: 0; }
.captile__name b { display: block; font-size: 14px; font-weight: 650; }
.captile__name small { display: block; font-size: 11px; color: var(--text-3); margin-top: 1px; }
.captile__use {
  display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--c);
  opacity: 0; transform: translateX(-4px); transition: opacity .18s, transform .18s;
}
.captile:hover .captile__use { opacity: 1; transform: none; }
.captile__desc { font-size: 12.5px; color: var(--text-2); line-height: 1.6; margin: 9px 0 10px; flex: 1; }
.captile__ex { display: flex; flex-direction: column; gap: 6px; position: relative; z-index: 1; }
.exq {
  text-align: left; font-size: 12px; color: var(--text-2); padding: 6px 10px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid transparent; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: background .15s, border-color .15s, color .15s;
}
.exq:hover { background: color-mix(in srgb, var(--c) 8%, var(--surface)); border-color: color-mix(in srgb, var(--c) 35%, transparent); color: var(--text); }
.exq--form { display: inline-flex; align-items: center; gap: 6px; color: var(--c); font-weight: 600; background: transparent; border: 1px dashed color-mix(in srgb, var(--c) 40%, transparent); }
.exq--form svg { width: 12px; height: 12px; }

/* 最近会话 */
.recents { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.recent {
  text-align: left; padding: 11px 12px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 5px; transition: border-color .15s, box-shadow .15s;
}
.recent:hover { border-color: var(--border-strong); box-shadow: var(--shadow-1); }
.recent b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent__meta { font-size: 11.5px; color: var(--text-3); }
.recent__caps { display: flex; flex-wrap: wrap; gap: 4px; }

/* ---------- 消息:能力标签、回答头 ---------- */
.msg--user { flex-direction: column; align-items: flex-end; gap: 5px; }
.msg__cap {
  --c: var(--brand);
  font-size: 11px; font-weight: 600; color: color-mix(in srgb, var(--c) 80%, var(--text-2));
  padding: 1px 8px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--c) 10%, transparent);
}
.anshead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; min-height: 22px; }
.anshead__meta { font-size: 12px; color: var(--text-3); }
.anshead__forced { font-size: 10.5px; color: var(--text-3); border: 1px solid var(--border); border-radius: var(--r-xs); padding: 0 5px; }
.anshead__route { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.anshead__route i {
  width: 34px; height: 4px; border-radius: 2px; position: relative; overflow: hidden; background: var(--surface-3);
}
.anshead__route i::after {
  content: ''; position: absolute; inset: 0; width: 40%; border-radius: inherit; background: var(--brand-gradient);
  animation: scan 1.1s ease-in-out infinite;
}
@keyframes scan { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* 参数卡 */
.taskcard {
  --c: var(--brand);
  margin: 14px 0 4px; padding: 10px 12px 12px; border-radius: var(--r-md);
  background: color-mix(in srgb, var(--c) 5%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 22%, var(--border));
}
.taskcard__head { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: color-mix(in srgb, var(--c) 80%, var(--text)); margin-bottom: 8px; }
.taskcard__head b { font-weight: 650; }
.taskcard__head span { margin-left: auto; font-size: 11.5px; color: var(--text-3); }
.taskcard__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--border); font-size: 12px; transition: border-color .15s, transform .15s;
}
.pchip span { color: var(--text-3); }
.pchip b { font-weight: 600; color: var(--text); }
.pchip:hover { border-color: var(--c); transform: translateY(-1px); }
.pchip.is-miss { border-style: dashed; border-color: color-mix(in srgb, var(--warn) 55%, transparent); background: color-mix(in srgb, var(--warn) 8%, var(--surface)); }
.pchip.is-miss span { color: var(--warn); font-weight: 600; }
.pchip.is-form { color: var(--c); border-style: dashed; }
.pchip.is-form b { color: var(--c); }
.pchip svg { width: 12px; height: 12px; }

/* 表格工具条 */
.tbltools { display: flex; align-items: center; gap: 4px; margin: 4px 0 -4px; }
.tbltools__n { font-size: 11.5px; color: var(--text-3); margin-right: auto; }
.tbltools__b {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: var(--r-xs);
  font-size: 11.5px; color: var(--text-3); transition: background .15s, color .15s;
}
.tbltools__b:hover { background: var(--surface-2); color: var(--brand); }
.tbltools__b svg { width: 12px; height: 12px; }

/* 下一步 */
.nexts {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 14px; padding-top: 12px;
  border-top: 1px dashed var(--border); animation: rise .4s var(--ease-out) both;
}
.nexts__label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-3); margin-right: 2px; }
.nexts__label svg { width: 12px; height: 12px; }
.nextchip {
  --c: var(--brand);
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r-pill);
  font-size: 12.5px; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
}
.nextchip svg { width: 12px; height: 12px; color: var(--c); }
.nextchip:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 7%, var(--surface)); transform: translateY(-1px); box-shadow: var(--shadow-1); }
.nextchip.is-flow { border-color: color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 9%, var(--surface)); font-weight: 600; }
.nextchip__flow { font-size: 10.5px; font-weight: 700; color: #fff; background: var(--c); border-radius: var(--r-pill); padding: 1px 7px; }

/* ---------- 表单弹窗 ---------- */
.wbform { position: fixed; inset: 0; z-index: 120; display: none; place-items: center; }
.wbform.is-on { display: grid; }
.wbform__mask { position: absolute; inset: 0; background: rgba(9,18,32,.42); backdrop-filter: blur(3px); animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.wbform__panel {
  position: relative; width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto;
  background: var(--bg-elevated); border-radius: var(--r-xl); border: 1px solid var(--border); box-shadow: var(--shadow-3);
  padding: 20px 22px 18px; animation: rise .25s var(--ease-out) both;
}
.wbform__head { --c: var(--brand); display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; margin-bottom: 16px; }
.wbform__head svg { width: 18px; height: 18px; color: var(--c); grid-row: span 2; }
.wbform__head b { font-size: 16px; font-weight: 650; }
.wbform__head span { font-size: 12px; color: var(--text-3); }
.wbform__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.wbfield { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--text-2); }
.wbfield i { color: var(--danger); font-style: normal; }
.wbfield input, .wbfield select {
  height: 36px; padding: 0 11px; border-radius: var(--r-sm); border: 1px solid var(--border-strong);
  background: var(--surface); font-size: 13.5px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.wbfield input:focus, .wbfield select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.wbform__preview {
  margin-top: 14px; padding: 9px 12px; border-radius: var(--r-sm); background: var(--surface-2);
  font-size: 12.5px; color: var(--text-2); line-height: 1.55; min-height: 36px;
}
.wbform__foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* ---------- 表格放大 ---------- */
.tblzoom { position: fixed; inset: 0; z-index: 120; display: none; place-items: center; }
.tblzoom.is-on { display: grid; }
.tblzoom__mask { position: absolute; inset: 0; background: rgba(9,18,32,.5); }
.tblzoom__panel {
  position: relative; width: calc(100vw - 48px); height: calc(100vh - 48px); background: var(--bg-elevated);
  border-radius: var(--r-lg); box-shadow: var(--shadow-3); padding: 44px 18px 18px; animation: rise .22s var(--ease-out) both;
}
.tblzoom__x { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--text-2); }
.tblzoom__x:hover { background: var(--surface-2); }
.tblzoom__body { height: 100%; overflow: auto; }
.tblzoom__body .md-tablewrap { margin: 0; }

/* ---------- 右侧会话情报 ---------- */
.insp {
  width: 300px; flex-shrink: 0; display: none; flex-direction: column; background: var(--bg-elevated);
  border-left: 1px solid var(--border); min-height: 0;
}
.insp__top { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 12px 0 18px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.insp__top b { font-size: 13.5px; font-weight: 650; }
.insp__body { flex: 1; overflow-y: auto; padding: 6px 16px 20px; }
.insp__empty { font-size: 12.5px; color: var(--text-3); line-height: 1.7; padding: 16px 2px; }
.insp__sec { padding: 14px 0; border-bottom: 1px solid var(--border); animation: rise .3s var(--ease-out) both; }
.insp__sec:last-child { border-bottom: none; }
.insp__sec h3 { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; color: var(--text-2); margin: 0 0 10px; letter-spacing: .3px; }
.insp__sec h3 svg { width: 12px; height: 12px; }
.insp__sec h3 em { font-style: normal; font-weight: 500; color: var(--text-3); margin-left: auto; font-size: 11.5px; }
.insp__kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.insp__kpi { padding: 8px 8px 7px; border-radius: var(--r-sm); background: var(--surface-2); text-align: center; }
.insp__kpi b { display: block; font-size: 17px; font-weight: 700; color: var(--text); line-height: 1.3; }
.insp__kpi span { font-size: 11px; color: var(--text-3); }
.insp__caps { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 3px; }
.insp__n { font-style: normal; font-size: 11px; color: var(--text-3); margin-right: 6px; }
.insp__flow { list-style: none; margin: 0; padding: 0; }
.insp__flow button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 5px 4px; border-radius: var(--r-sm); font-size: 12.5px; color: var(--text-2); text-align: left; }
.insp__flow button:hover { background: var(--surface-2); color: var(--text); }
.insp__fno { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; border: 1.5px solid var(--border-strong); color: var(--text-3); flex-shrink: 0; }
.insp__flow .is-done .insp__fno { background: var(--success); border-color: var(--success); color: #fff; }
.insp__flow .is-done button { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--border-strong); }
.insp__flow .is-cur .insp__fno { border-color: var(--brand); color: var(--brand); }
.insp__slots { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; margin: 0; font-size: 12.5px; }
.insp__slots dt { color: var(--text-3); }
.insp__slots dd { margin: 0; color: var(--text); font-weight: 500; word-break: break-all; }
.insp__slots dd.is-miss { color: var(--warn); }
.insp__files, .insp__srcs { display: flex; flex-direction: column; gap: 5px; }
.insp__file, .insp__src {
  display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: var(--r-sm); background: var(--surface-2);
  font-size: 12px; color: var(--text); text-decoration: none; text-align: left; border: 1px solid transparent; transition: border-color .15s;
}
.insp__file:hover, .insp__src:hover { border-color: var(--brand); }
.insp__file span, .insp__src span {
  font-size: 9.5px; font-weight: 700; padding: 2px 4px; border-radius: 3px; color: #fff; background: var(--brand); flex-shrink: 0;
}
.insp__src span { background: var(--text-3); }
.insp__file b, .insp__src b { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.insp__file svg { width: 12px; height: 12px; color: var(--brand); flex-shrink: 0; }
.insp__src i { font-style: normal; font-size: 11px; color: var(--text-3); }
.insp__exp { display: flex; gap: 8px; }

/* 宽屏:有会话时常驻,可收起;停靠来源预览时让位 */
@media (min-width: 1360px) {
  body.has-thread:not(.insp-off):not(.has-srcdock) .insp { display: flex; }
}
/* 窄屏:抽屉 */
@media (max-width: 1359px) {
  body.insp-open .insp {
    display: flex; position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; width: min(340px, 92vw);
    box-shadow: var(--shadow-3); animation: slidein .25s var(--ease-out) both;
  }
}
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .flows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .captiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recents { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .home { padding: 26px 16px 28px; }
  .home__title { font-size: 24px; }
  .home__sub { font-size: 13.5px; }
  .home__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat { padding: 7px 12px; }
  .stat b { font-size: 18px; }
  .flows, .captiles, .recents { grid-template-columns: minmax(0, 1fr); }
  .flow__cap { opacity: 1; }
  .captile__use { opacity: 1; transform: none; }
  .modebtn__name { display: none; }
  .modebtn { padding: 0 8px; }
  .formbtn span, .pfbtn__name { display: none; }
  .pfbtn { padding: 0 9px; }
  .formbtn { padding: 0 9px; }
  .wbform__grid { grid-template-columns: minmax(0, 1fr); }
  .topbar__acts { margin-left: 4px; }
}

/* ---------- 算力结论卡(M3 的 HW 尾标) ---------- */
.verdict {
  --v: #6D5BD0;
  margin: 2px 0 16px; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface);
  overflow: hidden; box-shadow: var(--shadow-2); animation: rise .35s var(--ease-out) both;
}
.verdict__lbl { display: block; font-size: 11px; font-weight: 600; letter-spacing: .4px; color: var(--text-3); margin-bottom: 6px; }
.verdict__top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; border-bottom: 1px solid var(--border); }
.verdict__top > div { padding: 13px 15px; border-left: 1px solid var(--border); min-width: 0; }
.verdict__top > div:first-child { border-left: none; background: linear-gradient(135deg, color-mix(in srgb, var(--v) 9%, var(--surface)), var(--surface)); }
.verdict__big { font-size: 30px; font-weight: 750; letter-spacing: -.8px; line-height: 1.1; }
.verdict__big small { font-size: 13.5px; font-weight: 600; letter-spacing: 0; color: var(--text-2); margin-left: 4px; white-space: nowrap; }
.verdict__mid { font-size: 19px; font-weight: 700; line-height: 1.2; }
.verdict__mid small { font-size: 12px; font-weight: 500; color: var(--text-3); margin-left: 3px; }
.verdict__sub { font-size: 11.5px; color: var(--text-3); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.verdict__mem { padding: 12px 15px 12px; border-bottom: 1px solid var(--border); }
.verdict__stack { display: flex; gap: 2px; height: 12px; border-radius: 6px; overflow: hidden; margin: 2px 0 8px; }
.verdict__stack i, .verdict__legend i { display: block; }
.verdict .w { background: var(--v); }
.verdict .kv { background: color-mix(in srgb, var(--v) 55%, #fff); }
.verdict .act { background: color-mix(in srgb, var(--v) 25%, #fff); }
.verdict__legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-2); }
.verdict__legend span { display: inline-flex; align-items: center; gap: 6px; }
.verdict__legend i { width: 8px; height: 8px; border-radius: 2px; }
.verdict__legend b { color: var(--text); font-weight: 650; }
.verdict__link { display: flex; align-items: flex-start; gap: 8px; padding: 10px 15px; font-size: 12.5px; color: var(--text-2); border-bottom: 1px solid var(--border); }
.verdict__link svg { flex-shrink: 0; margin-top: 3px; }
.verdict__link b { font-weight: 650; color: var(--text); margin-right: 6px; }
.verdict__link.is-ok svg { color: var(--success); }
.verdict__link.is-warn { background: color-mix(in srgb, var(--warn) 8%, var(--surface)); }
.verdict__link.is-warn svg { color: var(--warn); }
.verdict__link.is-unk svg { color: var(--text-3); }
.verdict__alt { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 9px 15px; font-size: 12px; color: var(--text-3); border-bottom: 1px solid var(--border); }
.verdict__alt b { color: var(--text-2); font-weight: 600; }
.verdict__cases { padding: 11px 15px 12px; background: var(--surface-2); }
.verdict__ch { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.verdict__ch svg { color: var(--success); }
.verdict__ch b { font-size: 12.5px; font-weight: 650; }
.verdict__ch small { font-size: 11.5px; color: var(--text-3); }
.vcase { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--border); font-size: 12px; }
.vcase:first-of-type { border-top: none; }
.vcase__t { font-size: 10.5px; font-weight: 700; text-align: center; padding: 2px 0; border-radius: 5px; background: var(--surface-3); color: var(--text-2); }
.vcase__t.t-internal { background: color-mix(in srgb, var(--sf-logo-blue) 12%, transparent); color: var(--sf-logo-blue); }
.vcase__t.t-official { background: color-mix(in srgb, #0369A1 12%, transparent); color: #0369A1; }
:root[data-theme="dark"] .vcase__t.t-internal, :root[data-theme="dark"] .vcase__t.t-official { color: var(--brand-ink); }
.vcase__b { color: var(--text-2); line-height: 1.5; min-width: 0; }
.vcase__b a { color: var(--brand); margin-left: 4px; }
.vcase__fit { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; white-space: nowrap; }
.vcase__fit.is-ok { color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); }
.vcase__fit.is-warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.vcase__fit.is-unk { color: var(--text-3); background: var(--surface-3); }
@media (max-width: 640px) {
  .verdict__top { grid-template-columns: 1fr 1fr; }
  .verdict__top > div:nth-child(3) { border-left: none; }
  .verdict__top > div:nth-child(n+3) { border-top: 1px solid var(--border); }
  .vcase { grid-template-columns: 1fr auto; }
  .vcase__t { grid-column: 1 / -1; justify-self: start; padding: 2px 8px; }
}
