/* DealDesk v3 · 机构交易台深色设计系统
   "Ink Terminal" —— Bloomberg 的信息密度 + Linear 的精致度 + BlackRock 的机构气质
   层级语言：
   L0 展示数字：56-68px / 800 / -0.02em —— 评分、核心现金数字，一眼定调
   L1 分区标题：12px / 600 / uppercase / 0.08em —— 分区 zoning（Linear 区块标签体）
   L2 KPI 数字：28-32px / 800 / tabular —— 卡片关键指标
   L3 数据正文：13px —— 高密度表格/字段
   L4 次要元信息：11px muted —— 来源、时间、hint
   装饰强调色只许一个：teal。语义色（涨跌/等级）除外。
*/
:root {
  --bg0: #060a13;
  --bg1: #0a0f1c;
  --surface: #0d1526;
  --surface2: #121c31;
  --surface3: #16223a;
  --line: #1d2a45;
  --line-soft: #152036;
  --ink: #e9eff9;
  --ink2: #a3b1c9;
  --muted: #64748f;
  --faint: #42506a;
  --teal: #2dd4bf;
  --teal-deep: #0d9488;
  --teal-ink: #042f2b;
  --teal-dim: rgba(45, 212, 191, .09);
  --teal-line: rgba(45, 212, 191, .28);
  --green: #34d399; --green-dim: rgba(52, 211, 153, .10); --green-line: rgba(52, 211, 153, .30);
  --blue: #60a5fa;  --blue-dim: rgba(96, 165, 250, .10);  --blue-line: rgba(96, 165, 250, .30);
  --amber: #fbbf24; --amber-dim: rgba(251, 191, 36, .10);  --amber-line: rgba(251, 191, 36, .32);
  --red: #f87171;   --red-dim: rgba(248, 113, 113, .10);   --red-line: rgba(248, 113, 113, .32);
  --radius: 6px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background:
    radial-gradient(1200px 320px at 50% -80px, rgba(45, 212, 191, .05), transparent 70%),
    var(--bg0);
  color: var(--ink);
  margin: 0; font-size: 14px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.num, td.num, th.num { font-variant-numeric: tabular-nums; }
::selection { background: rgba(45, 212, 191, .25); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1e2c47; border-radius: 6px; border: 2px solid var(--bg0); }
::-webkit-scrollbar-thumb:hover { background: #2a3c5e; }

/* ---------- 布局骨架 ---------- */
.layout { display: flex; min-height: 100vh; }
.side {
  width: 236px; flex: 0 0 236px; background: var(--bg1);
  border-right: 1px solid var(--line-soft);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 20;
}
.brand { display: flex; gap: 11px; align-items: center; padding: 18px 18px 16px; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--teal-line); background: var(--teal-dim);
  color: var(--teal); font-weight: 800; font-size: 16px;
  display: flex; align-items: center; justify-content: center; letter-spacing: -.02em;
}
.brand .bt { font-size: 15.5px; font-weight: 800; color: var(--ink); line-height: 1.3; letter-spacing: -.01em; }
.brand .bt small { display: block; font-size: 10.5px; font-weight: 500; color: var(--muted); letter-spacing: .06em; margin-top: 2px; }
.nav { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; flex: 1; }
.nav button, .nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 14px; border: 0; border-radius: 7px;
  background: transparent; color: var(--ink2); font-size: 13.5px; cursor: pointer; text-decoration: none; text-align: left;
  font-family: inherit; width: 100%; position: relative; transition: color .15s ease, background .15s ease;
}
.nav button:hover, .nav a:hover { background: rgba(148, 163, 184, .06); color: var(--ink); }
.nav button.on { background: rgba(45, 212, 191, .07); color: var(--ink); font-weight: 700; }
.nav button.on::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px;
  background: var(--teal); border-radius: 2px;
}
.nav .ni { color: var(--faint); font-size: 12px; width: 16px; text-align: center; flex: 0 0 16px; }
.nav button.on .ni { color: var(--teal); }
.nav em { font-style: normal; font-size: 10.5px; font-weight: 700; background: var(--surface3);
  color: var(--ink2); border-radius: 10px; padding: 1px 8px; margin-left: auto; font-variant-numeric: tabular-nums; }
.side-foot { padding: 12px 16px 16px; border-top: 1px solid var(--line-soft); font-size: 11px; color: var(--faint); }
.tophap { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 8px; color: var(--ink2); }
.tophap .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: 0 0 7px; }
.tophap.ok .dot { background: var(--green); box-shadow: 0 0 6px rgba(52, 211, 153, .7); }
.tophap.warn .dot { background: var(--amber); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 15;
  background: rgba(10, 15, 28, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
  padding: 10px 22px; display: flex; gap: 14px; align-items: center;
}
/* 房源直达 command bar：全站最显眼的动作入口 */
.intake-hero { display: flex; gap: 8px; align-items: center; flex: 1; max-width: 940px; }
.ih-label {
  font-size: 10.5px; font-weight: 800; color: var(--teal); white-space: nowrap;
  letter-spacing: .12em; text-transform: uppercase;
}
.intake-hero input {
  flex: 1; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px;
  background: var(--surface); color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  min-width: 0; transition: border-color .15s ease, box-shadow .15s ease;
}
.intake-hero input::placeholder { font-family: "Inter", -apple-system, "PingFang SC", sans-serif; color: var(--faint); }
.intake-hero input:focus { outline: none; border-color: var(--teal-deep); box-shadow: 0 0 0 3px rgba(45, 212, 191, .14); }
/* 智能输入框：检测 chip（粘贴链接/命令/地址的意图推断展示） */
.ih-wrap { position: relative; flex: 1; display: flex; min-width: 0; }
.ih-wrap input { flex: 1; }
.ih-chip {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--teal-deep);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .28);
  font-size: 13px;
}
.ih-chip[hidden] { display: none; }
.ih-chip .ck { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.ih-chip .ck .badge { font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 800; }
.ih-chip .badge.com { background: rgba(45, 212, 191, .15); color: var(--teal); }
.ih-chip .badge.res { background: rgba(96, 165, 250, .15); color: #60a5fa; }
.ih-chip .badge.cmd { background: rgba(250, 204, 21, .15); color: #facc15; }
.ih-chip .cd { color: var(--ink2); }
.ih-chip .ca { display: flex; gap: 8px; margin-left: auto; }
.ih-chip .ca .btn { min-height: 44px; padding: 10px 16px; }
.ih-chip .cx { border: 0; background: transparent; color: var(--muted); font-size: 16px; cursor: pointer; min-width: 44px; min-height: 44px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.clock { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: .04em; }

/* 演示数据横幅 */
.demo-banner {
  display: flex; align-items: center; gap: 10px;
  background: var(--teal-dim); border-bottom: 1px solid var(--teal-line);
  color: var(--ink2); font-size: 12px; padding: 7px 22px;
}
.demo-banner .db-tag {
  font-size: 10px; font-weight: 800; letter-spacing: .1em; color: var(--teal);
  border: 1px solid var(--teal-line); border-radius: 4px; padding: 1px 7px; white-space: nowrap;
}
.demo-banner button {
  margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer;
  font-size: 14px; line-height: 1; padding: 2px 6px; font-family: inherit;
}
.demo-banner button:hover { color: var(--ink); }

#app { padding: 22px 22px 32px; max-width: 1560px; width: 100%; margin: 0 auto; }
.foot { padding: 12px 22px 28px; font-size: 11px; color: var(--faint); max-width: 1560px; margin: 0 auto; width: 100%; letter-spacing: .01em; }

/* ---------- 通用组件 ---------- */
.btn {
  padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface2);
  font-size: 13.5px; cursor: pointer; font-family: inherit; color: var(--ink); white-space: nowrap;
  transition: border-color .15s ease, background .15s ease, transform .05s ease;
}
.btn:hover { border-color: #2c3f63; background: var(--surface3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--teal-deep); border-color: var(--teal-deep); color: #fff; font-weight: 700; }
.btn.primary:hover { background: #0fa08f; border-color: #0fa08f; }
.btn.danger { color: var(--red); border-color: var(--red-line); background: var(--red-dim); }
.btn.sm { padding: 5px 11px; font-size: 12.5px; border-radius: 7px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.big { padding: 12px 26px; font-size: 15px; }

.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); }
.sec-t { font-size: 12px; font-weight: 600; margin: 0 0 12px; display: flex; align-items: center; gap: 8px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sec-t .more { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--muted); }
.zone { margin-bottom: 20px; }
.micro { font-size: 11px; color: var(--faint); letter-spacing: .04em; }
.muted { color: var(--muted); }

/* 等级徽章：tint 底 + 彩色字 + hairline 边，不再是实心色块 */
.badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 30px;
  font-weight: 800; border-radius: 7px; padding: 2px 10px; font-size: 14px;
  border: 1px solid; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.badge.A { color: var(--green); background: var(--green-dim); border-color: var(--green-line); }
.badge.B { color: var(--blue); background: var(--blue-dim); border-color: var(--blue-line); }
.badge.C { color: var(--amber); background: var(--amber-dim); border-color: var(--amber-line); }
.badge.否决, .badge.D { color: var(--red); background: var(--red-dim); border-color: var(--red-line); }
.badge.big { font-size: 26px; padding: 8px 20px; border-radius: 10px; letter-spacing: 0; }

/* 可信度芯片 */
.conf { display: inline-block; font-size: 10.5px; font-weight: 600; border-radius: 20px; padding: 2px 10px;
  border: 1px solid; white-space: nowrap; letter-spacing: .03em; }
.conf.high { color: var(--green); border-color: var(--green-line); background: var(--green-dim); }
.conf.mid { color: var(--blue); border-color: var(--blue-line); background: var(--blue-dim); }
.conf.low { color: var(--amber); border-color: var(--amber-line); background: var(--amber-dim); }
.conf.seller { color: var(--amber); border-color: var(--amber-line); background: transparent; border-style: dashed; }
.conf.manual { color: var(--muted); border-color: var(--line); background: rgba(148, 163, 184, .06); }
.st { display: inline-block; font-size: 11px; font-weight: 600; border-radius: 20px; padding: 2px 10px; white-space: nowrap; }
.st.ok { color: var(--green); background: var(--green-dim); }
.st.bad { color: var(--red); background: var(--red-dim); }
.st.warn { color: var(--amber); background: var(--amber-dim); }
.st.idle { color: var(--muted); background: rgba(148, 163, 184, .08); }

/* ---------- Zone 1: Insights 横幅 ---------- */
.insight {
  border-radius: var(--radius); padding: 15px 18px; margin-bottom: 18px; display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line-soft); border-left: 2px solid var(--faint);
}
.insight .ic {
  width: 30px; height: 30px; border-radius: 8px; flex: 0 0 30px;
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800;
  background: rgba(148, 163, 184, .08); color: var(--muted); border: 1px solid var(--line-soft);
}
.insight.good { border-left-color: var(--teal); }
.insight.good .ic { background: var(--teal-dim); border-color: var(--teal-line); color: var(--teal); }
.insight.warn { border-left-color: var(--amber); }
.insight.warn .ic { background: var(--amber-dim); border-color: var(--amber-line); color: var(--amber); }
.insight.bad { border-left-color: var(--red); }
.insight.bad .ic { background: var(--red-dim); border-color: var(--red-line); color: var(--red); }
.insight .t { font-size: 14.5px; font-weight: 700; margin-bottom: 3px; letter-spacing: -.01em; }
.insight .t .num { color: var(--teal); }
.insight .d { font-size: 12.5px; color: var(--muted); }
.insight .act { margin-left: auto; flex: 0 0 auto; align-self: center; }

/* ---------- Zone 2: KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 20px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 14px 16px 12px; position: relative; overflow: hidden;
  transition: border-color .15s ease;
}
.kpi:hover { border-color: var(--line); }
.kpi::before { content: ""; position: absolute; top: 0; left: 14px; right: 14px; height: 1px;
  background: var(--kc, transparent); opacity: .55; }
.kpi .k { font-size: 10.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px;
  letter-spacing: .09em; text-transform: uppercase; }
.kpi .v { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .v small { font-size: 13px; font-weight: 600; color: var(--faint); letter-spacing: 0; }
.kpi .s { font-size: 11.5px; color: var(--faint); margin-top: 5px; }
.kpi .v.neg { color: var(--red); } .kpi .v.pos { color: var(--green); }
.kpi .v.hl { color: var(--teal); }

/* ---------- Zone 3: 主区 + 右 rail ---------- */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 304px; gap: 16px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); }
.panel-h { padding: 14px 18px 11px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel-h h2 { font-size: 13px; font-weight: 700; margin: 0; letter-spacing: .06em; text-transform: uppercase; color: var(--ink2); }
.panel-h h2 .cnt { color: var(--faint); font-weight: 600; letter-spacing: 0; }
.panel-b { padding: 6px 0 4px; }

/* 高密度表格 */
table.data { width: 100%; border-collapse: collapse; font-size: 13px; background: transparent; }
table.data th, table.data td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line-soft); }
table.data thead th {
  background: rgba(10, 15, 28, .6); font-size: 10.5px; color: var(--muted); font-weight: 700;
  white-space: nowrap; letter-spacing: .08em; text-transform: uppercase;
  position: sticky; top: 0; user-select: none;
}
table.data thead th.sortable { cursor: pointer; }
table.data thead th.sortable:hover { color: var(--teal); }
table.data tbody tr { transition: background .12s ease; }
table.data tbody tr:hover { background: var(--surface2); }
table.data tbody tr.rowlink { cursor: pointer; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data td .nm { font-weight: 600; letter-spacing: -.01em; }
table.data td .ad { font-size: 11.5px; color: var(--faint); font-weight: 400; display: block; margin-top: 1px; }
table.data tr.base td { background: var(--blue-dim); font-weight: 700; }
.tbl-wrap { overflow-x: auto; }
.tbl-tools { display: flex; gap: 8px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.tbl-tools input[type=search] {
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 7px; font-size: 12.5px; width: 210px;
  font-family: inherit; background: var(--bg1); color: var(--ink);
}
.tbl-tools input[type=search]:focus { outline: none; border-color: var(--teal-deep); }
.seg { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 7px 14px; font-size: 12.5px; cursor: pointer;
  font-family: inherit; color: var(--muted); transition: all .15s ease; }
.seg button.on { background: var(--teal-deep); color: #fff; font-weight: 700; }
.seg button:not(.on):hover { color: var(--ink); background: rgba(148, 163, 184, .06); }

/* 右 rail */
.rail .panel { margin-bottom: 14px; }
.feed { list-style: none; margin: 0; padding: 6px 0; max-height: 380px; overflow-y: auto; }
.feed li { display: flex; gap: 10px; padding: 10px 18px; font-size: 12.5px; border-bottom: 1px solid var(--line-soft); }
.feed li:last-child { border-bottom: 0; }
.feed .fdot { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex: 0 0 7px; }
.feed .ft { margin-left: auto; color: var(--faint); font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.feed .fx { color: var(--muted); font-size: 11.5px; }
.src-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 18px; font-size: 12.5px; border-bottom: 1px solid var(--line-soft); }
.src-row:last-child { border-bottom: 0; }
.src-row .sn { color: var(--ink2); }

/* ---------- Detail hero ---------- */
.dhero {
  background: linear-gradient(180deg, var(--surface2), var(--surface));
  border: 1px solid var(--line-soft); border-radius: 14px;
  padding: 24px 26px; margin-bottom: 18px; position: relative; overflow: hidden;
}
.dhero::before { content: ""; position: absolute; top: 0; left: 26px; right: 26px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(45, 212, 191, .5), transparent); }
.dhero-top { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.dhero .score-big { font-size: 64px; font-weight: 800; letter-spacing: -.03em; line-height: 1;
  font-variant-numeric: tabular-nums; }
.dhero .score-big small { font-size: 17px; color: var(--faint); font-weight: 600; letter-spacing: 0; }
.dhero h1 { font-size: 20px; margin: 0 0 4px; letter-spacing: -.01em; }
.dhero .addr { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dhero .dmeta { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.dhero-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 20px; padding-top: 18px;
  border-top: 1px solid var(--line-soft); }
.dhero-metrics .hm .k { font-size: 10.5px; font-weight: 700; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.dhero-metrics .hm .v { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin-top: 3px; }
.dhero-metrics .hm .v small { font-size: 12px; color: var(--faint); font-weight: 600; }
.dhero-metrics .hm .v.neg { color: var(--red); } .dhero-metrics .hm .v.pos { color: var(--green); }
.dhero-metrics .hm .v.hl { color: var(--teal); }
.veto-banner { border-radius: 10px; padding: 12px 16px; margin: 14px 0 0; font-size: 13px; border: 1px solid; background: var(--surface); }
.veto-banner.bad { border-color: var(--red-line); background: var(--red-dim); }
.veto-banner.bad b { color: var(--red); }
.veto-banner.good { border-color: var(--green-line); background: var(--green-dim); }
.veto-banner.good b { color: var(--green); }
.veto-banner.warn { border-color: var(--amber-line); background: var(--amber-dim); }
.veto-banner.warn b { color: var(--amber); }
.veto-banner ul { margin: 7px 0 0; padding-left: 18px; color: var(--ink2); }
.veto-banner li { margin: 3px 0; }

/* 页签 */
.dtabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.dtabs button {
  border: 0; background: none; padding: 11px 18px; font-size: 13.5px; cursor: pointer;
  color: var(--muted); font-family: inherit; border-bottom: 2px solid transparent; margin-bottom: -1px;
  white-space: nowrap; transition: color .15s ease;
}
.dtabs button:hover { color: var(--ink); }
.dtabs button.on { color: var(--teal); font-weight: 700; border-bottom-color: var(--teal); }

/* 测算指标网格 */
.metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 4px 0 6px; }
.metric { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px 14px;
  transition: border-color .15s ease; }
.metric:hover { border-color: var(--line); }
.metric.hero { border-top: 2px solid var(--teal-deep); }
.metric .k { font-size: 10.5px; font-weight: 600; color: var(--muted); letter-spacing: .05em; }
.metric .v { font-size: 22px; font-weight: 800; margin-top: 3px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.metric .v small { font-size: 12px; color: var(--faint); font-weight: 600; }
.v.neg { color: var(--red); } .v.pos { color: var(--green); }
.neg { color: var(--red); } .pos { color: var(--green); }

/* 评分维度折叠 */
.dim { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; margin: 8px 0; overflow: hidden; }
.dim summary { display: flex; align-items: center; gap: 12px; padding: 12px 15px; cursor: pointer; list-style: none; transition: background .12s ease; }
.dim summary::-webkit-details-marker { display: none; }
.dim summary:hover { background: var(--surface2); }
.dim .dl { font-size: 13.5px; font-weight: 600; }
.dim .dp { margin-left: auto; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink2); }
.dim .bar { height: 6px; background: #1a2740; border-radius: 4px; overflow: hidden; width: 130px; flex: 0 0 130px; }
.dim .bar > div { height: 100%; background: linear-gradient(90deg, var(--teal-deep), var(--teal)); border-radius: 4px; transition: width .5s ease; }
.dim .dd { font-size: 12.5px; color: var(--muted); border-top: 1px dashed var(--line); margin: 0 15px; padding: 10px 0 13px; }
.dim .chev { color: var(--faint); font-size: 11px; transition: transform .15s ease; }
.dim[open] .chev { transform: rotate(90deg); }

/* ---------- Intake 视图 ---------- */
.pipe-steps { display: flex; gap: 0; margin: 18px 0; overflow-x: auto; }
.pstep { flex: 1; min-width: 132px; text-align: center; position: relative; padding: 0 8px; }
.pstep .n { width: 32px; height: 32px; border-radius: 50%; background: var(--surface3); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; margin-bottom: 7px;
  border: 1px solid var(--line); font-variant-numeric: tabular-nums; transition: all .2s ease; }
.pstep .t { font-size: 12px; font-weight: 600; color: var(--ink2); }
.pstep .s { font-size: 11px; color: var(--faint); }
.pstep.run .n { background: var(--teal-dim); border-color: var(--teal-line); color: var(--teal); animation: pulse 1.4s infinite; }
.pstep.run .t { color: var(--teal); }
.pstep.done .n { background: var(--green-dim); border-color: var(--green-line); color: var(--green); }
.pstep.fail .n { background: var(--red-dim); border-color: var(--red-line); color: var(--red); }
.pstep.skip .n { background: var(--amber-dim); border-color: var(--amber-line); color: var(--amber); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, .35); } 50% { box-shadow: 0 0 0 7px rgba(45, 212, 191, 0); } }
/* 骨架微光 */
.sk { position: relative; overflow: hidden; background: var(--surface2); border-radius: 6px; }
.sk::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, .09), transparent);
  animation: shimmer 1.6s infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.logbox { background: #080d18; color: #9db1cc; border: 1px solid var(--line-soft); border-radius: 10px; padding: 13px 17px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; max-height: 260px; overflow-y: auto; }
.logbox .ok { color: #6ce9a6; } .logbox .bad { color: #fda29b; } .logbox .wr { color: #fec84b; }
details.fold { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; margin: 10px 0; }
details.fold summary { padding: 12px 16px; cursor: pointer; font-size: 13px; font-weight: 600; list-style: none; display: flex; gap: 8px; align-items: center; transition: background .12s ease; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary:hover { background: var(--surface2); }
details.fold .fb { padding: 4px 16px 15px; }
.kvline { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.kvline:last-child { border-bottom: 0; }
.kvline .kk { color: var(--muted); flex: 0 0 150px; font-size: 12.5px; }
.kvline .vv { font-weight: 600; font-variant-numeric: tabular-nums; }
.kvline .src { margin-left: auto; text-align: right; }

/* ---------- 表单 ---------- */
.form-sec { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
.form-sec > h3 { margin: 0 0 12px; font-size: 13px; font-weight: 700; color: var(--teal); display: flex; align-items: center; gap: 8px; letter-spacing: .04em; }
.form-sec > h3 .cnt { font-size: 11px; color: var(--faint); font-weight: 400; letter-spacing: 0; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px 14px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.field input, .field select { width: 100%; padding: 8px 11px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 13.5px; font-family: inherit; background: var(--bg1); color: var(--ink);
  font-variant-numeric: tabular-nums; transition: border-color .15s ease, box-shadow .15s ease; }
.field input:focus, .field select:focus { outline: none; border-color: var(--teal-deep); box-shadow: 0 0 0 3px rgba(45, 212, 191, .12); }
.field input.autofill { border-color: var(--green-line); background: var(--green-dim); }
.field .hint { font-size: 11px; color: var(--faint); margin-top: 3px; }
.field .srctag { font-size: 10.5px; color: var(--green); font-weight: 600; }
.field.check label { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 13.5px; cursor: pointer; }
.field.check input { width: auto; accent-color: var(--teal-deep); }
.toolbar { display: flex; gap: 10px; margin-bottom: 15px; flex-wrap: wrap; align-items: center; }
.toolbar .spacer { flex: 1; }

.empty { text-align: center; color: var(--faint); padding: 48px 10px; font-size: 13.5px; }
.empty .big { font-size: 34px; margin-bottom: 10px; color: var(--line); }
.spinner { display: inline-block; width: 15px; height: 15px; border: 2px solid var(--line); border-top-color: var(--teal);
  border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 对比表 */
.cmp-table td:first-child, .cmp-table th:first-child {
  position: sticky; left: 0; background: var(--surface); font-weight: 600; z-index: 1; color: var(--ink2);
}
.cmp-table td.hl { color: var(--teal); font-weight: 700; }

/* ---------- 移动端 390 ---------- */
@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; }
  .cols > * { min-width: 0; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .dhero-metrics { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .layout { flex-direction: column; }
  .side { width: 100%; flex: none; height: auto; position: static; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .brand { padding: 12px 14px 10px; }
  .nav { flex-direction: row; overflow-x: auto; padding: 4px 8px 10px; }
  .nav button, .nav a { white-space: nowrap; width: auto; padding: 8px 12px; font-size: 13px; }
  .nav button.on::before { display: none; }
  .nav button.on { background: rgba(45, 212, 191, .1); }
  .nav em { margin-left: 4px; }
  .side-foot { display: none; }
  .topbar { flex-direction: column; align-items: stretch; padding: 10px 12px; gap: 8px; }
  .intake-hero { flex-wrap: wrap; max-width: none; }
  .ih-wrap { flex: 1 1 100%; order: 2; }
  .ih-label { order: 1; } .intake-hero .btn { order: 1; min-height: 44px; }
  .ih-chip { position: static; margin-top: 8px; }
  .top-right { display: none; }
  .demo-banner { padding: 7px 12px; }
  #app { padding: 14px 12px 24px; }
  .dhero { padding: 18px; }
  .dhero .score-big { font-size: 48px; }
  .dhero-metrics .hm .v { font-size: 21px; }
  .kpi .v { font-size: 24px; }
  .pipe-steps { gap: 0; }
  .pstep { min-width: 104px; }
  .tbl-tools input[type=search] { width: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  .pstep.run .n, .spinner, .sk::after { animation: none; }
  * { transition: none !important; }
}
