/* ============================================================
   客研所 Lens Institute · Manus 风格设计系统
   ─ 三原色：白 #FFFFFF / 灰 #F8F8F8 / 暖黑 #34322D
   ─ 字体：标题衬线（Libre Baskerville + 中文宋体）、正文 DM Sans
   ─ 语言：12-16px 圆角、柔和阴影 0 8px 24px、200ms ease-out
   ─ 色彩渐变仅用于 logo，界面其余部分保持纯色
   ============================================================ */
:root {
  /* 本应用只有浅色皮肤。显式声明可让浏览器别拿深色系统 UI
     （表单控件 / 滚动条 / 状态栏）来配这个浅色页面。 */
  color-scheme: light;
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-alt: #F8F8F8;
  --chip: #F1EFE9;
  --sunken: #F5F3ED;
  --line: #E8E5DE;
  --line-soft: #F1EFE9;

  --ink: #34322D;
  --ink-hover: #1A1917;
  --body-text: #45423C;
  --muted: #6B6862;
  --muted-soft: #948F86;

  --on-dark: #FFFFFF;

  --accent: #C9A24B;
  --accent-hover: #AE8B33;

  --good: #157F3C; --good-bg: #EAF4EE;
  --mid:  #6B6862; --mid-bg:  #F1EFE9;
  --warn: #8A6D1F; --warn-bg: #F8F1DD;
  --bad:  #C4302B; --bad-bg:  #FBEAE9;

  --shadow: 0 1px 2px rgba(52,50,45,0.04);
  --shadow-lift: 0 8px 24px rgba(52,50,45,0.08);

  --r-pill: 999px;
  --r-card: 16px;
  --r-sm: 10px;

  /* 首页 hero 搜索区统一宽度：主搜索框与下方三个按钮共用同一基准，绝不会不一致 */
  --hero-w: 620px;

  --ease: 200ms ease-out;

  --font-serif: "Libre Baskerville", "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
/* 关键：标签筛选用 row.hidden=true 隐藏行，但 .exec-row/.company-chip 设了
   display:flex，会盖过 UA 的 [hidden]{display:none}，导致筛选失效。这里强制兜底。 */
[hidden] { display: none !important; }
html { background: var(--bg); }

body {
  margin: 0; min-height: 100dvh;
  background: var(--bg); color: var(--body-text);
  font-family: var(--font-sans);
  font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

a { color: var(--ink); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--accent); }

/* 大标题用衬线，呼应 Manus 的编辑感与研究所调性；
   13-14px 的标签式小标题（.sec-title / .pp-h2）保持无衬线 */
.hero h1, .page-head h1, .co-title-row h1, .auth-title {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* ── 顶栏 ─────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 50;
  background: #FFFFFF;
  border-bottom: 1px solid var(--line);
}
.top-inner {
  max-width: 1160px; margin: 0 auto; padding: 0 24px;
  height: 60px; display: flex; align-items: center; gap: 28px;
}
.brand {
  font-weight: 800; font-size: 18px; letter-spacing: 0.01em; color: var(--ink);
  display: flex; align-items: center; gap: 9px; white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand-logo { height: 38px; width: auto; display: block; }
.brand-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--ink); position: relative; flex: none;
}
.brand-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1.5px solid var(--ink); opacity: 0.25;
}
.brand-sub {
  font-size: 11px; font-weight: 600; color: var(--muted-soft);
  letter-spacing: 0.14em; text-transform: uppercase; margin-left: 2px;
}
.tabs { display: flex; gap: 4px; flex: none; }
.tabs a {
  padding: 7px 16px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; color: var(--muted);
  transition: all 0.15s ease;
  white-space: nowrap;   /* 顶栏加信息条后横向更挤，禁止导航项折行 */
}
.tabs a:hover { color: var(--ink); background: var(--chip); }
.tabs a.active { color: var(--on-dark); background: var(--ink); }
/* 顶栏右侧：必须显式 flex —— 否则 .usermenu（div，块级）会换行，
   .top-inner 固定 60px 高时内容溢出到边框之上（实测：模型 chip 被顶到顶栏外）。*/
.top-right {
  margin-left: auto; display: flex; align-items: center; gap: 10px;
  flex: none;
}
/* 顶部模型标（改名 model-chip：原 llm-chip 与右下角"生成中"浮标同名，被其 display:none 覆盖导致不可见）*/
.model-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; color: var(--muted);
  background: var(--chip); border-radius: var(--r-pill); padding: 5px 12px;
}
.model-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-soft); }
.model-chip.ok .dot { background: var(--good); }
.model-chip.off .dot { background: var(--bad); }
/* 引擎切换下拉：外观融入 chip，去掉原生箭头换自定义 caret */
.model-select {
  -webkit-appearance: none; appearance: none;
  border: none; outline: none; background-color: transparent;
  color: inherit; font: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer; padding: 0 16px 0 1px; margin: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='currentColor' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 2px center;
}
.model-select:focus { color: var(--ink); }
.model-select option { color: #111; font-weight: 600; }
.model-custom {
  width: 170px; font-size: 12px; color: var(--ink, #111);
  border: 1.5px solid var(--line); border-radius: var(--r-pill);
  padding: 5px 12px; background: var(--surface); outline: none;
}
.model-custom:focus { border-color: var(--accent); }
/* 轻提示 toast */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(12px);
  background: var(--ink, #111); color: #fff; font-size: 13px; font-weight: 600;
  padding: 10px 18px; border-radius: var(--r-pill);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; z-index: 9999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── 主区 ─────────────────────────────────────── */
main { flex: 1; width: 100%; max-width: 1160px; margin: 0 auto; padding: 32px 24px 64px; }

.flash-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.flash {
  padding: 12px 18px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600;
  border: 1px solid var(--line);
}
.flash.ok { background: var(--good-bg); color: var(--good); border-color: rgba(21,127,60,0.25); }
.flash.error { background: var(--bad-bg); color: var(--bad); border-color: rgba(196,48,43,0.25); }

footer.site {
  border-top: 1px solid var(--line);
  padding: 18px 24px; text-align: center;
  font-size: 12px; color: var(--muted-soft);
}

/* ── 通用元件 ─────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); box-shadow: var(--shadow);
  transition: box-shadow var(--ease), border-color var(--ease), transform var(--ease);
}
/* 可交互卡片悬停：Manus 式轻抬升（非交互容器如 .pp-card 不抬升） */
.dim-card:not(.dim-missing):hover, .cap-card:hover, .intel-note:hover {
  box-shadow: var(--shadow-lift);
  border-color: rgba(52, 50, 45, 0.26);
}
.dim-card { transition: box-shadow var(--ease), border-color var(--ease); }
.intel-note { transition: box-shadow var(--ease), border-color var(--ease); }
.sec-title {
  font-size: 13px; font-weight: 800; color: var(--ink);
  letter-spacing: 0.12em; margin: 36px 0 14px;
  display: flex; align-items: center; gap: 10px;
}
.row-count {
  background: var(--chip); color: var(--muted);
  font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: var(--r-pill);
}
.empty { color: var(--muted-soft); font-size: 14px; padding: 14px 0; }
.empty a { text-decoration: underline; }

.badge {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 700; line-height: 1;
  padding: 4px 10px; border-radius: var(--r-pill); white-space: nowrap;
}
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.mid  { background: var(--mid-bg);  color: var(--mid); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad  { background: var(--bad-bg);  color: var(--bad); }
.badge.sm { font-size: 10px; padding: 3px 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 14px; font-weight: 700; line-height: 1;
  padding: 11px 20px; border-radius: var(--r-sm);
  border: 1.5px solid transparent; cursor: pointer;
  transition: all 0.15s ease; text-decoration: none;
}
.btn-dark { background: var(--ink); color: var(--on-dark); }
.btn-dark:hover { background: var(--ink-hover); color: var(--on-dark); transform: translateY(-1px); }
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--sunken); color: var(--ink); }
.btn-sm { font-size: 12px; padding: 7px 14px; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; }

.inline-form { display: inline-flex; }

/* 表单 */
input, select, textarea {
  font: inherit; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--r-sm); padding: 10px 14px; width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,162,75,0.18);
}
textarea { resize: vertical; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.stack-form { display: flex; flex-direction: column; gap: 14px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
/* 情报表单的 label 是行内的（label+input 同行），不受全局 column 影响 */
.intel-form .field-row label { flex-direction: row; }
.manual-box {
  border: 1px solid var(--line); border-radius: var(--r-card);
  background: var(--surface); margin: 14px 0; overflow: hidden;
}
.manual-box summary {
  cursor: pointer; padding: 14px 20px; font-weight: 700; font-size: 14px; color: var(--ink);
  list-style: none;
}
.manual-box summary::-webkit-details-marker { display: none; }
.manual-box summary::before { content: "+ "; color: var(--muted-soft); }
.manual-box[open] summary::before { content: "− "; }
.manual-box form { padding: 4px 20px 20px; }
.manual-box form { border-top: 1px dashed var(--line-soft); padding-top: 18px; margin: 0 0 0; }

/* ── 页头 ─────────────────────────────────────── */
.page-head { margin-bottom: 26px; }
.page-head h1 { font-size: 30px; font-weight: 700; color: var(--ink); margin: 10px 0 6px; letter-spacing: 0; }
.page-sub { color: var(--muted); font-size: 14.5px; margin: 0 0 8px; max-width: 760px; }
.back {
  font-size: 13px; font-weight: 700; color: var(--muted);
  display: inline-block; margin-bottom: 4px;
}
.back:hover { color: var(--accent); }

/* ── 首页 hero ────────────────────────────────── */
.hero { text-align: center; padding: 52px 0 44px; }
.hero h1 {
  font-size: 44px; font-weight: 700; color: var(--ink);
  font-family: var(--font-sans);
  letter-spacing: -0.01em; margin: 0 0 12px; line-height: 1.25;
}
.hero-sub { font-size: 17px; color: var(--muted); margin: 0 0 30px; }
.hero-sub .hl {
  background: rgba(52,50,45,0.13);
  background-size: 100% 38%;
  background-position: 0 100%;
  background-repeat: no-repeat;
  font-weight: 700; color: var(--ink);
}
/* ═══════════════════════════════════════════════════════
   Manus 风格统一搜索容器（flex column，兄弟元素天然等宽）
   ═══════════════════════════════════════════════════════ */
.manus-box {
  max-width: var(--hero-w);
  margin: 0 auto 16px;
}
/* 主搜索框：独立圆角容器（不再包裹下方三个按钮） */
.manus-inner {
  /* 自身也锁定同一宽度基准——即使脱离 .manus-box 也绝不变宽 */
  width: 100%;
  max-width: var(--hero-w);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.manus-inner:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,162,75,0.12), var(--shadow-lift);
}

/* ── 上层：搜索输入 + AI 建档按钮（flex row）── */
.manus-top {
  display: flex;
  align-items: stretch;
}
.manus-input-wrap {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}
.manus-box input[type="search"] {
  width: 100%;
  padding: 20px 22px;
  font-size: 16px;
  border: none;
  background: transparent;
  color: var(--ink);
  outline: none;
  font-family: var(--font-sans);
  /* 圆角与容器一致，去掉 overflow:hidden 后焦点环仍是圆角 */
  border-radius: 16px 0 0 16px;
}
.manus-box input[type="search"]::placeholder {
  color: var(--muted-soft);
}
.manus-top .btn.btn-dark {
  flex: 0 0 auto;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.03em;
  border-left: 1.5px solid var(--line);
  border-radius: 0 16px 16px 0;
}
/* 搜索历史下拉（点击空搜索框时展开） */
.sh-drop {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 40;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); box-shadow: var(--shadow-lift);
  overflow: hidden; text-align: left; padding-bottom: 6px;
}
.sh-head {
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em;
  color: var(--muted-soft); padding: 12px 18px 6px;
}
.sh-item { display: flex; align-items: center; padding: 0 8px 0 18px; font-size: 14px; color: var(--ink); }
.sh-item:hover { background: var(--sunken); }
.sh-link { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 10px;
  padding: 8px 0; color: inherit; text-decoration: none; }
.sh-q { font-weight: 700; color: var(--ink); }
.sh-meta { color: var(--muted-soft); font-size: 12.5px; }
.sh-time { margin-left: auto; color: var(--muted-soft); font-size: 11px; }
.sh-empty { padding: 14px 18px 10px; font-size: 13px; color: var(--muted-soft); }
/* 查询记录删除 ✕：默认隐形，悬停整行才出现 */
.sh-del-form { display: flex; align-items: center; margin: 0; }
.sh-del { border: none; background: none; cursor: pointer; color: var(--muted-soft);
  font-size: 12px; line-height: 1; padding: 6px 8px; border-radius: 6px; opacity: 0;
  transition: opacity .12s ease, color .12s ease, background .12s ease; }
.sh-item:hover .sh-del { opacity: 1; }
.sh-del:hover { color: var(--bad); background: rgba(0,0,0,0.05); }
/* 档案卡删除 ✕：卡片右下角，悬停卡片才出现 */
.company-chip-wrap { position: relative; }
.cc-del-form { position: absolute; bottom: 8px; right: 10px; margin: 0; z-index: 2; }
.cc-del { border: none; background: var(--surface); cursor: pointer; color: var(--muted-soft);
  font-size: 11px; line-height: 1; width: 22px; height: 22px; border-radius: 50%;
  box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .12s ease, color .12s ease; }
.company-chip-wrap:hover .cc-del { opacity: 1; }
.cc-del:hover { color: var(--bad); }
.hero-hint { font-size: 13px; color: var(--muted-soft); margin: 0; }

/* ── 下层：三个按钮 + 单字段弹层（独立块，与主搜索框同宽）── */
.manus-extra {
  margin-top: 14px;
  /* 自身锁定同一宽度基准并居中——不依赖父容器，绝不会比主搜索框宽 */
  width: 100%;
  max-width: var(--hero-w);
  margin-left: auto;
  margin-right: auto;
}
.manus-tabs {
  display: flex;
  gap: 10px;
}
.manus-tab {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all var(--ease);
}
/* 标签文案占满剩余宽度，过长时省略号，保证 ✕ 图标始终可见 */
.manus-tab .tab-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 已填写时出现的 ✕ 清空图标 */
.manus-tab .tab-clear {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: -4px;
  border-radius: 50%;
  background: rgba(21,127,60,0.14);
  color: var(--good);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
/* 关键：display:inline-flex 会覆盖 UA 的 [hidden]{display:none}，必须显式补回 */
.manus-tab .tab-clear[hidden] { display: none; }
.manus-tab .tab-clear:hover {
  background: var(--good);
  color: #fff;
}
.manus-tab:hover {
  border-color: var(--ink);
  color: var(--ink);
}
/* 激活按钮：金色描边 + 浅金底，明确当前选中项 */
.manus-tab.is-active {
  border-color: var(--accent);
  color: var(--ink);
  background: rgba(201,162,75,0.10);
  box-shadow: 0 0 0 3px rgba(201,162,75,0.12);
}
/* 弹层容器：与 .manus-tabs 同宽，position:relative 供动画 */
.manus-panels {
  position: relative;
  margin-top: 12px;
}
.manus-panel {
  display: none;
  animation: manusPop 0.18s ease both;
}
.manus-panel.is-active {
  display: block;
}
@keyframes manusPop {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* 输入 + 确认按钮横排 */
.manus-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.manus-input-row input[type="text"] {
  flex: 1 1 0;
  min-width: 0;
  padding: 11px 15px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-card);
  font-size: 14px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.manus-input-row input[type="text"]::placeholder {
  color: var(--muted-soft);
  font-size: 13px;
}
.manus-input-row input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,162,75,0.15);
}
/* 确认（打勾）按钮 */
.manus-confirm {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  color: var(--good);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--ease);
  padding: 0;
}
.manus-confirm:hover {
  background: var(--good-bg);
  border-color: var(--good);
}
/* 清空（✕）按钮 */
.manus-clear {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--ease);
  padding: 0;
}
.manus-clear:hover {
  background: var(--bad-bg);
  border-color: var(--bad);
  color: var(--bad);
}
/* 按钮已填入内容：文字变深、加个淡绿底暗示"已填写" */
.manus-tab.is-filled {
  color: var(--ink);
  border-color: var(--good);
  background: rgba(21,127,60,0.06);
}

/* 画像页：客户补充信息 · AI 分析 */
.brief-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px; margin: 14px 0 4px; }
.brief-card { padding: 18px 20px; }
.brief-raw { font-size: 13px; color: var(--muted); margin: 10px 0 4px; line-height: 1.5; }
.brief-raw .brief-k { display: inline-block; margin-right: 8px; font-size: 11px;
  font-weight: 800; letter-spacing: 0.08em; color: var(--muted-soft); }

/* ── AI 补充信息区视觉提升 ──────────────────────────────── */
.brief-section { margin-top: 40px; margin-bottom: 0; }

/* 标题：金色竖线装饰 */
.brief-section .sec-title {
  position: relative;
  padding-left: 16px;
  margin-bottom: 18px;
}
.brief-section .sec-title::before {
  content: '';
  position: absolute;
  left: 0; top: 3px; bottom: 3px;
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* 卡片悬停抬升 */
.brief-section .brief-card {
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.brief-section .brief-card:hover {
  box-shadow: var(--shadow-lift);
  border-color: rgba(52, 50, 45, 0.12);
}

/* 卡片标题：左侧金色短装饰 */
.brief-section .brief-card .dim-title h3 {
  font-size: 14px; font-weight: 700; color: var(--ink);
  padding-left: 12px;
  border-left: 2px solid var(--accent);
  line-height: 1.5;
}

.brief-section .dim-head { margin-bottom: 2px; }

/* "录入"标签改为填充式 badge */
.brief-section .brief-k {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  margin-right: 8px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--chip);
  border-radius: var(--r-pill);
  line-height: 1.5;
}

/* AI 分析摘要：左竖线装饰 */
.brief-section .dim-summary {
  border-left: 2px solid var(--accent);
  padding-left: 14px;
  background: var(--sunken);
  border-radius: var(--r-sm);
  padding: 10px 14px 10px 14px;
  font-size: 14px; color: var(--ink); font-weight: 600;
}

/* 子项列表 */
.brief-section .it { padding-top: 6px; }
.brief-section .it:first-child { padding-top: 0; }
.brief-section .it-cat-inline { font-size: 12px; font-weight: 700; color: var(--ink); }
.brief-section .it-value-inline { font-size: 13.5px; color: var(--body-text); }
.brief-section .it-bullets-inline { font-size: 13.5px; color: var(--body-text); }
.brief-section .it-evidence-inline { font-size: 11px; color: var(--muted-soft); }

/* AI 建档徽标 */
.co-badges .badge.mid:last-child { font-weight: 700; letter-spacing: 0.03em; }

/* 拜访准备包：客户背景补充 callout */
.pp-brief { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 2px; }
.pp-brief-h { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; color: var(--muted-soft); }
.pp-brief-item { background: var(--sunken); border-radius: var(--r-pill);
  padding: 4px 12px; font-size: 13px; color: var(--ink); }

/* ── 首页：滚动情报条（紧贴顶栏，全宽长横线） ──────────────────────── */
.feed-ticker {
  display: flex; align-items: center; gap: 10px;
  margin: 0; padding: 0;
  background: var(--surface); border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0; overflow: hidden;
  box-shadow: none;
}
.ticker-label {
  flex: 0 0 auto; padding: 10px 14px;
  font-size: 13px; font-weight: 800; color: var(--ink);
  background: var(--sunken); border-right: 1px solid var(--line-soft);
  white-space: nowrap;
}
.ticker-track {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 24px;
  padding: 8px 14px; overflow: hidden; white-space: nowrap;
  mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
}
.ticker-item {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; font-size: 13px; color: var(--muted);
  transition: color 0.15s;
}
.ticker-item:hover { color: var(--ink); }
.ticker-item .tpill {
  font-size: 10px; font-weight: 700; padding: 2px 6px;
  border-radius: 4px; white-space: nowrap;
}
.ticker-company {
  font-weight: 700; color: var(--ink); white-space: nowrap;
}
.ticker-title {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 300px;
}
.ticker-more {
  flex: 0 0 auto; padding: 10px 14px;
  font-size: 12px; font-weight: 700; color: var(--accent);
  text-decoration: none; white-space: nowrap;
  border-left: 1px solid var(--line-soft); background: var(--sunken);
}
.ticker-more:hover { color: var(--ink); }

@media (max-width: 720px) {
  .ticker-title { max-width: 120px; }
  .ticker-label, .ticker-more { padding: 8px 10px; font-size: 12px; }
}

/* ── 首页：四栏等宽 ────────────────────────────────────
   「三等分锁死」：右侧三个模块(已有档案/高管变动/招标)各自 1fr，宽度恒等；
   「左侧我的档案」用固定 240px 的更窄一栏。
   gap 收紧到 16px（之前 28px）以便 1400px 容器能放下 4 列且每列可读。 */
.home-grid {
  display: grid;
  grid-template-columns: 240px 1fr 1fr 1fr;
  gap: 16px;
  align-items: start;
}

/* 首页用更宽的 main 容器，给 4 列更多横向空间；其它页面仍按 1160px。
   顶栏同步加宽，否则导航会被新增的信息条挤成竖排换行。 */
.page-home main,
.page-home .top-inner { max-width: 1400px; }

/* 四栏统一：等高 + 栏内滚动 + 栏目头随栏固定。
   - 用固定 height（不是 max-height）：内容少的那栏也会被撑满到同样高度，
     三栏顶边 / 底边严格对齐、整体「锁定」，不会因某栏条目少而短一截。
   - 四栏规则相同，鼠标在任何一栏上滑动，滚动行为一致。 */
.home-col {
  position: sticky;
  top: 92px;
  height: calc(100vh - 108px);
  min-height: 480px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
/* 标题 / 筛选区间距三栏统一，保证三条列表的起始位置齐平 */
.home-col > .sec-title { margin: 0 0 12px; }
.home-col > .filter-row,
.home-col > .exec-filter { margin: 0 0 12px; }
.home-col > .company-grid,
.home-col > .exec-list,
.home-col > .tender-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--muted-soft) var(--sunken);
  padding-right: 4px;
}

/* 「已有档案」列：强制 2 列（双卡片位）—— 不论栏多宽都正好 2 张卡片一行。
   卡片宽度会更窄、字号更小，确保 2 张仍可读。 */
.home-col > .company-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 2px 4px 2px 0;
  align-content: start;
}
/* 双列下卡片更紧凑：公司名 14px、维度信息单行、padding 收紧 */
.home-col > .company-grid .company-chip {
  padding: 12px 12px;
  gap: 4px;
}
.home-col > .company-grid .cc-name { font-size: 14px; }
.home-col > .company-grid .cc-meta { font-size: 12px; }
.home-col > .company-grid .cc-dims { font-size: 11px; }
/* 双列下类型 pill 缩小一点避免占满一行 */
.home-col > .company-grid .tpill { width: 56px; font-size: 9.5px; padding: 2px 2px; }
/* 关键：grid item 本身也要 min-width:0 —— .company-chip 设了 min-width:0，
   但外层 .company-chip-wrap 没有，长公司名会撑破 1fr 轨道造成整页横向溢出。
   （实测：390px 下每张卡溢出 6px。） */
.home-col > .company-grid > .company-chip-wrap { min-width: 0; }
/* 显式可见滚动条：默认 Mac/WebKit 用隐藏式浮层滚动条，档案多时看不出能滚、以为被截断。
   给三栏加常驻可见滚动条，明确"可下拉"。 */
.home-col > .company-grid::-webkit-scrollbar,
.home-col > .exec-list::-webkit-scrollbar,
.home-col > .tender-list::-webkit-scrollbar { width: 10px; }
.home-col > .company-grid::-webkit-scrollbar-track,
.home-col > .exec-list::-webkit-scrollbar-track,
.home-col > .tender-list::-webkit-scrollbar-track { background: var(--sunken); border-radius: 8px; }
.home-col > .company-grid::-webkit-scrollbar-thumb,
.home-col > .exec-list::-webkit-scrollbar-thumb,
.home-col > .tender-list::-webkit-scrollbar-thumb {
  background: var(--muted-soft); border-radius: 8px; border: 2px solid var(--sunken);
}
.home-col > .company-grid::-webkit-scrollbar-thumb:hover,
.home-col > .exec-list::-webkit-scrollbar-thumb:hover,
.home-col > .tender-list::-webkit-scrollbar-thumb:hover { background: var(--muted); }
/* align-content: start 在上面 .company-grid 双列规则里已设置（紧贴栏内可滚区域规则）*/
/* 空态：在锁定高度的栏内垂直居中，避免半空中挂着一段空白 */
.home-col > .exec-empty {
  flex: 1 1 auto; display: flex; flex-direction: column;
  align-items: center; justify-content: center; margin: 0;
}

/* 企业类型标签：工业风——统一灰度阶梯，不同深浅区分行业，不引入彩色。
   银行最深 → 其他最浅，白字保证可读性。 */
.t-bank { --type-c: #2F2F2F; }
.t-ins  { --type-c: #4C4C4C; }
.t-sec  { --type-c: #6A6A6A; }
.t-fund { --type-c: #3E3E3E; }
.t-am   { --type-c: #565656; }
.t-trust { --type-c: #262626; }
.t-fintech { --type-c: #5E5E5E; }
.t-other { --type-c: #707070; }

/* 类型筛选行：单色 pill，激活态用墨色（彩色信号只出现在卡片标签上） */
.filter-row {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px;
}
.fpill {
  font-size: 12.5px; font-weight: 700; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 6px 14px; cursor: pointer;
  transition: all 0.15s ease; font-family: var(--font-sans);
}
.fpill b { font-weight: 800; color: var(--muted-soft); margin-left: 2px; }
.fpill:hover { border-color: var(--ink); color: var(--ink); }
.fpill.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.fpill.is-on b { color: rgba(255, 255, 255, 0.65); }
a.fpill { text-decoration: none; display: inline-block; }

/* 行业 / 分类标签：轻量描边款（原实心深底块，首页满屏标签太压视线）。
   保留统一的 80px 固定宽 + 居中 + 省略号兜底，只把「实心填充」换成
   1px 描边 + 同色文字——信息不变，视觉重量大幅下降。 */
.tpill {
  flex: none; width: 80px;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700; letter-spacing: 0.03em;
  color: var(--type-c, #6B6862);
  background: transparent;
  border: 1px solid var(--type-c, #6B6862);
  border-radius: var(--r-card); padding: 2px 4px;
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 信息流分组小标题：一行一个分类，取代逐行的重复标签（密度主因） */
.feed-group + .feed-group { margin-top: 14px; }
.feed-group-h {
  display: flex; align-items: center; gap: 7px;
  padding: 4px 0 7px; border-bottom: 1px solid var(--line-soft);
  margin-bottom: 4px;
}
.tg-dot {
  width: 8px; height: 8px; border-radius: 2px; flex: none;
  background: var(--type-c, #6B6862);
}
.fg-name {
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.04em;
  color: var(--muted);
}
.fg-count { font-size: 10.5px; color: var(--muted-soft); }

/* 全局 .company-grid：在首页内已重写为「强制 2 列」；其它页面（搜索/客户页）
   仍走 auto-fill 自由列数。 */
.company-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.company-chip {
  display: flex; flex-direction: column; gap: 5px;
  min-width: 0;  /* 关键：否则长文字(min-width:auto)会撑开 1fr 轨道，导致同排卡片宽度不一 */
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 16px 18px; box-shadow: var(--shadow);
  transition: all 0.15s ease;
}
.company-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); color: var(--ink); }
.cc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.cc-name { flex: 1 1 auto; min-width: 0; font-weight: 800; font-size: 16px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-meta { font-size: 12.5px; color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-dims { font-size: 11px; font-weight: 700; color: var(--muted-soft); font-family: "JetBrains Mono", monospace; }

/* ── 右栏：高管变动（当日） ─────────────────────── */
.exec-title-row { display: flex; align-items: center; gap: 8px; }
.exec-date { font-size: 11px; color: var(--muted-soft); margin-left: auto; }
/* 「更新中」状态内联在标题行里（原来是独立一段，会把该栏列表整体顶下去、三栏错位） */
.exec-date-live { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.exec-date-live .llm-spin { width: 11px; height: 11px; border-width: 2px; margin: 0; flex: none; }
.exec-history-link {
  font-size: 12px; font-weight: 700; color: var(--muted);
  text-decoration: none; padding: 2px 4px;
}
.exec-history-link:hover { color: var(--ink); }
.exec-updating {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 14px; font-size: 12.5px; color: var(--muted);
}
.exec-updating .llm-spin {
  width: 14px; height: 14px; border-width: 2px; margin: 0; flex: none;
}
.exec-actions { display: flex; gap: 8px; margin: 0 0 14px; flex-wrap: wrap; }
.exec-list { display: flex; flex-direction: column; }
.exec-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 2px; border-bottom: 1px solid var(--line-soft);
}
.exec-row:last-child { border-bottom: none; }
.exec-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.exec-who { font-size: 13.5px; font-weight: 800; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.exec-who em { font-style: normal; font-weight: 600; color: var(--muted); margin-left: 6px; }
.exec-org { font-size: 12px; color: var(--muted-soft); line-height: 1.6; }
.exec-note { display: block; font-size: 11px; color: var(--muted-soft); opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exec-link { display: inline-block; margin-top: 3px; font-size: 11px; font-weight: 700; color: var(--accent); text-decoration: none; }
.exec-link:hover { text-decoration: underline; }
.exec-ops { display: flex; gap: 6px; flex: none; }

/* 新版高管变动字段：英文名 / 官方标记 / 原→新职务 / 生效日期 / 信源 */
.exec-en { font-style: normal; font-size: 11px; font-weight: 600; color: var(--muted-soft); margin-left: 5px; }
.exec-badge {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: var(--r-pill);
  font-size: 10px; font-weight: 700; line-height: 1.5; vertical-align: middle;
  color: var(--good); background: var(--good-bg); border: 1px solid rgba(21,127,60,0.25);
}
.exec-badge.warn { color: var(--muted); background: var(--bg); border-color: var(--line); }
/* 自媒体（微信公众号 / 小红书）：琥珀色，与官方（绿）、媒体（灰）区分，提示需二次核实 */
.exec-badge.self { color: var(--warn); background: var(--warn-bg); border-color: rgba(138,109,31,0.3); }
.exec-legend { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; opacity: 0.9; }
.exec-legend .exec-badge { font-style: normal; margin-left: 0; }
.exec-legend .exec-badge.self { margin-left: 0; }
.exec-move { margin-left: 8px; color: var(--muted); font-weight: 600; }
.exec-eff, .exec-src { margin-left: 8px; opacity: 0.9; }
.exec-toolbar { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; flex-wrap: wrap; }
.exec-runmsg { font-size: 11px; color: var(--muted-soft); }

/* 招标 / 中标面板（首页最右栏 + 独立页共用） */
.tender-list { display: flex; flex-direction: column; }
.tender-row {
  display: flex; flex-direction: column; align-items: stretch; gap: 6px;
  padding: 12px 2px; border-bottom: 1px solid var(--line-soft);
}
.tender-row:last-child { border-bottom: none; }
/* 标签置于顶部、统一 80px 宽（与档案 / 高管变动一致），文字独占下方整行，不被长标签压缩 */
.tender-row .tpill { width: 80px; align-self: flex-start; }
.tender-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tender-name { font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tender-meta { font-size: 12px; color: var(--muted); line-height: 1.6; }
.tender-status {
  display: inline-block; font-weight: 800; color: var(--ink);
  background: var(--sunken); border-radius: 2px; padding: 1px 6px; margin-right: 4px;
}
.tender-vendor { font-size: 12px; color: var(--muted-soft); }
.tender-note { font-size: 12px; color: var(--muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tender-link {
  font-size: 11.5px; font-weight: 700; color: var(--accent);
  text-decoration: none; align-self: flex-start;
}
.tender-link:hover { text-decoration: underline; }

/* 历史页 */
.exec-datebar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.exec-row-page { padding: 14px 2px; }
.exec-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.exec-filter .fpill { font-family: var(--font-mono); letter-spacing: 0.04em; }

.exec-empty {
  border: 1px dashed var(--line); border-radius: var(--r-card);
  padding: 30px 24px; text-align: center; background: var(--surface);
}
.exe-title { font-size: 14px; font-weight: 800; color: var(--muted); margin: 0 0 8px; }
.exe-sub { font-size: 12.5px; color: var(--muted-soft); margin: 0; line-height: 1.7; }

@media (max-width: 1100px) {
  /* 窄屏单列：取消固定高度与栏内滚动，4 栏统一回到整页滚动 */
  .page-home main,
  .page-home .top-inner { max-width: 1160px; }
  .home-grid { grid-template-columns: 1fr; }
  .home-col {
    position: static; top: auto;
    height: auto; min-height: 0; display: block;
  }
  .home-col > .company-grid,
  .home-col > .exec-list,
  .home-col > .tender-list { overflow: visible; padding-right: 0; padding-top: 0; }
  .home-col > .sec-title { margin: 26px 0 12px; }
  /* 顶栏在此断点就要换行：新增的日期/城市/头衔信息条让 .top-right 涨到 ~665px，
     而 .top-right 是 flex:none 不收缩，只有让 .tabs 折到第二行才放得下。 */
  .top-inner { height: auto; min-height: 56px; flex-wrap: wrap; gap: 8px 10px; padding: 8px 14px; }
  .tabs { order: 3; width: 100%; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs-sep { display: none; }
  .top-right { gap: 6px; }
  .top-info { height: 26px; padding: 0 9px; font-size: 11.5px; }
}

/* ── 顶部信息条：日期 / 城市 / 头衔 ─────────────────────────
   与右上「模型 chip + 个人账户」并列；非空字段才显示，整体不喧宾夺主。 */
.top-info {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 12px;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.top-info-date { color: var(--ink); }
.top-info-date .top-info-wd {
  font-style: normal; font-weight: 700;
  color: var(--accent); margin-left: 4px;
}
.top-info:hover { border-color: var(--muted-soft); color: var(--ink); }
/* 顶栏高度 60px：30px chip 上下正好各 15px 留白 */

/* ── 首页：左侧「我的档案」卡 ─────────────────────────────
   「双卡片位」= 上下两片：身份卡（头像+名+头衔+邮箱）+ 统计卡（档案/情报/检索）
   两片紧贴栏顶，不再撑满整栏；下方空白可作为「呼吸」以避免视觉拥挤。 */
.home-profile .profile-id-card {
  border: 1px solid var(--line); border-radius: var(--r-card);
  background: var(--surface); padding: 18px 16px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  box-shadow: var(--shadow);
}
.home-profile .profile-id-card .pic-avatar { flex: none; }
.home-profile .profile-id-card .pic-meta {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  text-align: center;
}
.home-profile .pic-name { font-family: var(--font-serif); font-weight: 700; font-size: 18px; color: var(--ink); line-height: 1.3; }
.home-profile .pic-title { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.home-profile .pic-sub { font-size: 11px; color: var(--muted-soft); }
.home-profile .pic-loc { font-size: 12px; color: var(--ink); margin-top: 2px; }
.home-profile .pic-email { font-size: 11px; color: var(--muted-soft); margin-top: 4px;
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.home-profile .pic-email .mono { font-size: 11px; }
.home-profile .pic-vf {
  display: inline-block; padding: 1px 6px; border-radius: var(--r-pill);
  font-size: 10px; font-weight: 700; color: var(--warn);
  background: var(--warn-bg); border: 1px solid rgba(138,109,31,0.3);
}
.home-profile .pic-vf.ok { color: var(--good); background: var(--good-bg); border-color: rgba(21,127,60,0.25); }

.home-profile .profile-stats-card {
  margin-top: 12px;
  border: 1px solid var(--line); border-radius: var(--r-card);
  background: var(--surface-alt);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: var(--shadow);
}
.home-profile .psc-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.home-profile .psc-num { font-size: 20px; font-weight: 700; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.home-profile .psc-lbl { font-size: 12px; color: var(--muted); }
.home-profile .psc-edit {
  margin-top: 4px;
  font-size: 12px; font-weight: 700; color: var(--muted);
  text-decoration: none; align-self: flex-start;
}
.home-profile .psc-edit:hover { color: var(--ink); }

/* ── 解析确认页 ───────────────────────────────── */
.resolve-tip { color: var(--muted); font-size: 14.5px; margin: 0 0 16px; }
.resolve-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.resolve-card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 20px 22px; box-shadow: var(--shadow); transition: all 0.15s ease;
}
.resolve-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); color: var(--ink); border-color: var(--ink); }
.rc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rc-name { font-weight: 800; font-size: 16px; color: var(--ink); }
.rc-meta { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
.rc-group { font-size: 12.5px; color: var(--muted-soft); }
.rc-go { font-size: 13px; font-weight: 700; color: var(--accent); margin-top: 4px; }
.resolve-alt { margin: 22px 0 12px; font-size: 14px; color: var(--muted); }
.resolve-alt a { text-decoration: underline; }

.no-match {
  text-align: center; padding: 46px 24px;
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-card);
}
.nm-title { font-size: 20px; font-weight: 800; color: var(--ink); margin: 0 0 6px; }
.nm-sub { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.no-match .manual-box { text-align: left; margin-top: 26px; }

/* ── 客户画像页 ───────────────────────────────── */
.co-head { margin-bottom: 8px; }
.co-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.co-title-row h1 { font-size: 30px; font-weight: 700; color: var(--ink); margin: 0; letter-spacing: 0; }
.co-badges { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.alias-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; }
.alias-cap { font-size: 12px; font-weight: 700; color: var(--muted-soft); letter-spacing: 0.08em; }
.alias-chip {
  font-size: 12px; font-weight: 600; color: var(--muted);
  background: var(--chip); padding: 3px 11px; border-radius: var(--r-pill);
}
.action-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 20px 0 0; }
/* 行内表单（如「重新生成画像」按钮）在 action-row 内不应再带块级上边距，否则会比同行按钮低一截 */
.action-row > .inline-form { margin-top: 0; align-self: center; }
.dim-progress { font-size: 12px; color: var(--muted-soft); }

/* 双瀑布（masonry · 方案B「看板栏」）：JS 按"当前最矮列"逐张塞卡片（保持维度顺序），
   再把左右两栏拉成等高——两栏做成极淡的面板，短栏底部留出的是「面板留白」而非卡片留白，
   参差被面板收进去，看起来是有意为之。无 JS 时退化为单列，照常可读。卡片本身设计规范不变。*/
.dim-grid { display: flex; flex-direction: column; gap: 16px; }
.dim-grid.is-cols { flex-direction: row; align-items: flex-start; gap: 16px; }
.dim-grid .masonry-col,
.intel-list .masonry-col {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  background: var(--sunken); border: 1px solid var(--line-soft);
  border-radius: var(--r-card); padding: 14px;
}
.dim-grid .masonry-col { gap: 16px; }
.dim-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 20px 22px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 12px;
  /* 兜底：卡片内任何长串（长 URL、无空格长词）都不得横向顶出卡片边界。
     该属性可继承，且会让 flex 子项的 min-content 收到 1 个字符，
     从而「宁可折行，也不溢出」。对不含超长词的文本没有任何视觉影响。 */
  overflow-wrap: anywhere;
}
.dim-card.dim-missing { background: transparent; border-style: dashed; box-shadow: none; opacity: 0.75; }
.dim-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dim-title h3 { margin: 0; font-size: 16px; font-weight: 800; color: var(--ink); }
.dim-desc { font-size: 12px; color: var(--muted-soft); display: block; margin-top: 3px; }
.dim-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.dim-summary {
  margin: 0; font-size: 14px; color: var(--ink); font-weight: 600;
  background: var(--sunken); border-radius: var(--r-sm); padding: 10px 14px;
}
.it-list { display: flex; flex-direction: column; gap: 6px; }
.it { border-top: 1px solid var(--line-soft); padding-top: 6px; }
.it:first-child { border-top: none; padding-top: 0; }

/* ── 置信度色点：替代逐条 badge，用首字 + 色彩，极紧凑 ── */
.conf-dot { font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: var(--r-pill);
  line-height: 15px; white-space: nowrap; display: inline-block; margin-left: 4px; vertical-align: middle; }
.conf-dot.good { background: var(--good-bg); color: var(--good); }
.conf-dot.mid { background: var(--mid-bg); color: var(--mid); }
.conf-dot.warn { background: var(--warn-bg); color: var(--warn); }
.conf-dot.bad { background: var(--bad-bg); color: var(--bad); }

/* ── 单条目内联行：纯 inline 文本流，长文本自然换行不分裂 ── */
.it.is-single-row { font-size: 13.5px; line-height: 1.7; }
/* 子类名：仍保持「与：」贴在一起。这里**只去掉 nowrap、不加 inline-block**——
   inline-block 会改变行盒高度（实测 16px → 20px，并把后文右推 2px），是可见回归；
   而 white-space:normal 对短 label 与 nowrap 完全等价（label 是行首元素，放得下就不会断），
   只有 label 本身长过整行时才会折行 —— 这正是我们要的兜底。 */
.it-cat-inline { font-size: 12px; font-weight: 700; color: var(--accent); }
.it-cat-inline::after { content: "："; color: var(--muted-soft); }
.it-value-inline { color: var(--body-text); }
.it-bullets-inline { color: var(--body-text); }
/* 证据（来源）内联尾缀：紧紧跟在值末尾显示，不单独占一行。
   ⚠️ 这里绝对不能再加 white-space:nowrap：nowrap 的内联盒是「不可断行的整体」，
   来源名一长（例：华西证券基金投顾资质那句「中国证监会官网《关于同意…试点的函》及…半年报」）
   就会整段顶出卡片右边界——手机端窄卡片必然命中，PC 上同样溢出。
   ⚠️ 也不能只把 nowrap 去掉：那样它会退化成普通文本框，
   在值那一行末尾只挤得下一个「⌕」时就从字中间断开（实测：7px + 66px 两段），很难看。
   正确语义 =「整段优先，实在放不下才折行」：inline-block 是原子盒，
   放得下就整段跟在值末尾，放不下就整体挪到下一行，宽过整行才在内部折行（max-width 兜底）。 */
.it-evidence-inline { font-size: 11px; color: var(--muted-soft); margin-left: 6px;
  display: inline-block; max-width: 100%; vertical-align: baseline;
  line-height: 1.3; overflow-wrap: anywhere; }
.it-evidence-inline::before { content: "⌕ "; }

/* ── 多条目组：子类标题 + 紧凑子条目 ── */
.it-group { border-top: 1px solid var(--line-soft); padding-top: 6px; margin-bottom: 2px; }
.it-group:first-child { border-top: none; padding-top: 0; }
.it-group.is-other .it-group-title { color: var(--muted); }
/* 单条目组不需要分隔线 */
.it-group.is-single { border-top: none; padding-top: 0; }
.it-group-title { font-size: 12.5px; font-weight: 700; color: var(--accent);
  margin: 0 0 4px; letter-spacing: 0.03em;
  display: flex; align-items: center; gap: 5px; }
.it-count { font-size: 10px; font-weight: 700; color: var(--muted-soft);
  background: var(--sunken); border-radius: var(--r-pill); padding: 0 5px;
  line-height: 14px; font-variant-numeric: tabular-nums; }
/* 多条目组内的子条目 */
.it.is-sub { border-top: none; padding: 3px 0 3px 10px;
  border-left: 2px solid var(--line-soft); margin-bottom: 2px;
  display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.it.is-sub:last-child { margin-bottom: 0; }
.it.is-sub .it-value { font-size: 13px; color: var(--body-text); }
.it.is-sub .it-evidence-inline { font-size: 10.5px; }
/* value 内含并列要点（A；B；C）时拆成子弹点 */
.it-bullets { margin: 2px 0 0; padding-left: 14px; }
.it-bullets li { font-size: 13px; color: var(--body-text); line-height: 1.55; }
.it-bullets li + li { margin-top: 2px; }
.it-bullets li::marker { color: var(--accent); }
/* 分组模式 */
.it-list.is-grouped { gap: 8px; }
.it-list.is-grouped > .it-group:first-child { padding-top: 0; }
.dim-foot { font-size: 11px; color: var(--muted-soft); margin-top: auto; }
.dim-empty { font-size: 13.5px; color: var(--muted-soft); margin: 0; }
.dim-empty p { margin: 0 0 4px; }
.dim-empty-hint { font-size: 12px; }

/* ── 私有情报 · 团队沉淀 ── */
.intel-section { margin-top: 40px; }
.intel-tip { font-size: 13px; color: var(--muted-soft); margin: 0 0 18px; line-height: 1.6; }

/* 表单：紧凑两栏布局 */
.intel-form { padding: 18px 20px; }
.intel-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; }
.intel-form .field-row label { font-size: 12px; font-weight: 700; color: var(--muted); display: flex; flex-direction: row; align-items: center; gap: 8px; }
.intel-form .field-row select, .intel-form .field-row input {
  flex: 1; font-size: 13.5px; padding: 6px 10px; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--surface-alt); font-family: var(--font-sans);
}
.intel-form > label { font-size: 12px; font-weight: 700; color: var(--muted); display: block; margin-bottom: 6px; }
.intel-form > textarea {
  width: 100%; font-size: 13.5px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--surface-alt); font-family: var(--font-sans);
  line-height: 1.5; resize: vertical;
}
.intel-form .btn { margin-top: 12px; }

/* 情报卡片：紧凑列表流 */
.intel-list { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.intel-list.is-cols { flex-direction: row; align-items: flex-start; gap: 10px; }
.intel-list .masonry-col { gap: 10px; }
.intel-note { padding: 14px 16px; }
.intel-note.verified { border-color: rgba(21,127,60,0.35); background: var(--good-bg); }
.in-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.in-top > form, .in-top > .in-actions { margin-left: auto; }
.in-actions { display: flex; align-items: center; gap: 6px; }
/* 删除类按钮：描边红字，hover 才变实心，避免误触的视觉噪音 */
.btn-danger-o {
  background: var(--surface); color: var(--bad); border-color: rgba(196,48,43,0.35);
}
.btn-danger-o:hover { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
.in-dim { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.in-author { font-size: 11.5px; color: var(--muted-soft); }
.in-author::before { content: "·"; margin-right: 4px; }
.in-content { font-size: 14px; color: var(--body-text); margin: 8px 0 4px; line-height: 1.6; }
.in-time { font-size: 10.5px; color: var(--muted-soft); }

.prop-list { list-style: none; margin: 0; padding: 0; }
.prop-list li {
  display: flex; align-items: baseline; gap: 12px;
  padding: 10px 2px; border-bottom: 1px solid var(--line-soft); font-size: 14.5px;
}
.prop-list a { font-weight: 700; }

/* ── 能力库 ───────────────────────────────────── */
.cap-add { margin-bottom: 20px; }
.cap-add form { padding-top: 18px; }
.cap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.cap-card { padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.cap-card.cap-off { opacity: 0.55; }
.cap-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cap-head h3 { margin: 0; font-size: 16.5px; font-weight: 800; color: var(--ink); }
.cap-vp { margin: 0; font-size: 14px; color: var(--body-text); }
.cap-meta { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.cap-meta dt { font-size: 11px; font-weight: 800; color: var(--muted-soft); letter-spacing: 0.08em; }
.cap-meta dd { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.cap-edit { border-top: 1px dashed var(--line-soft); padding-top: 10px; }
.cap-edit summary {
  cursor: pointer; font-size: 13px; font-weight: 700; color: var(--muted); list-style: none;
}
.cap-edit summary::-webkit-details-marker { display: none; }
.cap-edit summary:hover { color: var(--accent); }
.cap-edit form { padding-top: 14px; }

/* ── 方案生成页 ───────────────────────────────── */
.prop-builder { padding: 24px 26px; }
.prop-builder .sec-title { margin-top: 0; }
.cap-checks { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.cap-check {
  display: flex; gap: 14px; align-items: flex-start;
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
  padding: 14px 16px; cursor: pointer; transition: all 0.15s ease;
  background: var(--surface);
}
.cap-check:hover { border-color: var(--muted-soft); }
.cap-check:has(input:checked) { border-color: var(--ink); background: var(--surface); }
.cap-check input[type="checkbox"] {
  width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--ink); cursor: pointer;
}
.ck-body { display: flex; flex-direction: column; gap: 3px; }
.ck-name { font-weight: 800; font-size: 15px; color: var(--ink); }
.ck-vp { font-size: 13.5px; color: var(--muted); }
.ck-fit { font-size: 12px; color: var(--muted-soft); }
.gen-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line-soft); padding-top: 18px; }
.gen-note { font-size: 12.5px; color: var(--muted-soft); }

/* ── 拜访准备包 ───────────────────────────────── */
.pp-co { font-weight: 800; text-decoration: underline; }
.pp-card { padding: 24px 26px; margin-bottom: 18px; }
.pp-h2 {
  font-size: 14px; font-weight: 800; color: var(--ink); letter-spacing: 0.1em;
  margin: 0 0 16px; display: flex; align-items: baseline; gap: 12px;
}
.pp-h2-sub { font-size: 12px; font-weight: 600; color: var(--muted-soft); letter-spacing: 0; }
.op-headline {
  font-size: 19px; font-weight: 700; color: var(--ink); line-height: 1.5;
  margin: 0 0 18px; padding: 14px 18px; background: var(--sunken); border-radius: var(--r-sm);
}
.op-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.op-col h4 {
  margin: 0 0 8px; font-size: 12px; font-weight: 800; color: var(--muted);
  letter-spacing: 0.1em;
}
.op-list { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--body-text); }
.op-list li { margin: 6px 0; }
.op-list.op-q li { font-weight: 600; }

.mm-list { display: flex; flex-direction: column; gap: 14px; }
.mm-row { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.mm-cap {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--ink); color: var(--on-dark);
  padding: 10px 16px; font-weight: 800; font-size: 14.5px;
}
.mm-cap-name { flex: 1; }
.mm-cap .badge { background: rgba(255,255,255,0.16); color: var(--on-dark); }
.mm-cap .badge.good { background: rgba(255,255,255,0.16); }
.mm-grid { display: grid; grid-template-columns: 1fr 1fr; }
.mm-cell { padding: 12px 16px; font-size: 13.5px; color: var(--body-text); border-top: 1px solid var(--line-soft); }
.mm-cell:nth-child(2) { border-left: 1px solid var(--line-soft); }
.mm-cell.mm-pitch { grid-column: 1 / -1; background: var(--sunken); font-weight: 600; color: var(--ink); }
.mm-k {
  display: block; font-size: 11px; font-weight: 800; color: var(--muted-soft);
  letter-spacing: 0.1em; margin-bottom: 4px;
}

.pp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pp-two .pp-card { margin-bottom: 18px; }
.q-list { margin: 0; padding-left: 22px; font-size: 14px; }
.q-list li { margin: 9px 0; }
.q-list li::marker { font-weight: 800; color: var(--ink); }

.obj-list { display: flex; flex-direction: column; gap: 12px; }
.obj-item { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.obj-q {
  background: var(--bad-bg); color: var(--bad); font-weight: 700; font-size: 13.5px;
  padding: 10px 14px;
}
.obj-a { padding: 10px 14px; font-size: 13.5px; color: var(--body-text); }

.disclaimer {
  text-align: center; font-size: 12px; color: var(--muted-soft);
  padding: 10px 0 0; border-top: 1px dashed var(--line); margin: 8px 0 0;
}

/* ── 响应式 ───────────────────────────────────── */
@media (max-width: 900px) {
  .home-grid, .pp-two, .op-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .top-inner { gap: 14px; padding: 0 16px; }
  .brand-sub { display: none; }
  /* 窄屏也显示模型标，只是省掉「provider · 」前缀，只留型号（如 glm-4.6），省空间 */
  .model-chip .llm-provider { display: none; }
  main { padding: 24px 16px 48px; }
  .mm-grid { grid-template-columns: 1fr; }
  .mm-cell:nth-child(2) { border-left: none; }
}

/* ── LLM 长任务加载遮罩 ── */
.llm-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(17, 17, 17, 0.5);
  display: none; align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
}
.llm-overlay.on { display: flex; }
.llm-box {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 30px 40px;
  text-align: center;
  max-width: 420px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}
.llm-spin {
  width: 34px; height: 34px;
  border: 3px solid var(--line);
  border-top-color: var(--ink);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: llmspin 0.9s linear infinite;
}
@keyframes llmspin { to { transform: rotate(360deg); } }
.llm-title { font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.llm-timer { font-size: 13px; color: var(--muted); }
.llm-note { font-size: 12px; color: var(--muted); margin-top: 12px; line-height: 1.7; }

/* 遮罩可关闭：右上角 × + 关闭后右下角的小角标（点击可把遮罩调回） */
.llm-box { position: relative; }
.llm-close {
  position: absolute; top: 8px; right: 10px;
  width: 26px; height: 26px; padding: 0;
  background: transparent; border: none; color: var(--muted);
  font-size: 20px; line-height: 1; cursor: pointer; border-radius: 6px;
}
.llm-close:hover { background: var(--sunken); color: var(--ink); }
.llm-chip {
  position: fixed; right: 18px; bottom: 18px; z-index: 9998;
  display: none; align-items: center; gap: 8px;
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: 999px;
  padding: 8px 14px; font-size: 12px; font-weight: 700;
  cursor: pointer; box-shadow: var(--shadow-lift);
}
.llm-chip.on { display: inline-flex; }
.llm-chip:hover { background: var(--sunken); }
.llm-chip-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ink); flex: none; animation: llmchip 1s ease-in-out infinite;
}
@keyframes llmchip { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ── 后台画像生成横幅（详情页内嵌，非阻塞：可继续浏览/操作，完成后自动刷新）── */
.gen-banner {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1.5px solid var(--ink);
  border-radius: var(--r-card); padding: 14px 18px; margin: 0 0 18px;
  box-shadow: var(--shadow-lift);
}
.gen-banner .llm-spin { width: 22px; height: 22px; border-width: 2.5px; margin: 0; flex: none; }
.gen-text { min-width: 0; }
.gen-title { font-size: 14.5px; font-weight: 800; color: var(--ink); }
.gen-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.gen-banner.gen-done { border-color: #1E7B34; }
.gen-banner.gen-err { border-color: #B3261E; }
.gen-banner.gen-err .gen-title { color: #B3261E; }

/* ── 用户体系：登录 / 注册 / 账户 ─────────────────── */
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--sunken); color: var(--ink); }

.auth-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 20px; }
.auth-card {
  width: 100%; max-width: 420px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 36px 32px; box-shadow: var(--shadow-lift);
}
.auth-head { text-align: center; margin-bottom: 26px; }
.auth-mark { width: 40px; height: 40px; margin-bottom: 12px; }
.auth-title { font-size: 22px; font-weight: 700; margin: 0 0 6px; color: var(--ink); }
.auth-sub { font-size: 14px; color: var(--muted); margin: 0; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.field input { width: 100%; }
.auth-submit { margin-top: 4px; width: 100%; }
.auth-foot { text-align: center; font-size: 13px; color: var(--muted); margin: 18px 0 0; }
.auth-foot a { color: var(--accent); font-weight: 600; }

/* ── 登录方式切换：密码 / 手机号验证码 ─────────────── */
.auth-tabs { display: flex; gap: 6px; margin-bottom: 22px; background: var(--sunken);
  border: 1px solid var(--line); border-radius: var(--r-pill); padding: 4px; }
.auth-tab { flex: 1; border: 0; background: transparent; color: var(--muted);
  font-size: 13.5px; font-weight: 600; padding: 9px 0; border-radius: var(--r-pill);
  cursor: pointer; transition: background .15s, color .15s; }
.auth-tab:hover { color: var(--ink); }
.auth-tab.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.auth-pane { margin: 0; }
.auth-note { font-size: 12px; color: var(--muted); margin: 12px 0 0; line-height: 1.6; }

/* ── 行内字段（输入框 + 获取验证码按钮）─────────────── */
.field-inline { display: flex; gap: 8px; align-items: stretch; }
.field-inline input { flex: 1; min-width: 0; }
.field-inline .sms-send { flex: 0 0 auto; white-space: nowrap; }
.sms-send { min-width: 108px; }

/* ── 验证码 / 操作提示 ───────────────────────────── */
.sms-hint { font-size: 12.5px; line-height: 1.5; margin: 2px 0 0; padding: 8px 10px;
  border-radius: var(--r-sm); border: 1px solid var(--line); }
.sms-hint-ok  { color: var(--good); background: var(--good-bg); border-color: transparent; }
.sms-hint-err { color: var(--bad);  background: var(--bad-bg);  border-color: transparent; }

.user-chip {
  font-size: 13px; font-weight: 600; color: var(--ink);
  background: var(--chip); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: var(--r-pill);
}
.user-chip:hover { color: var(--ink); background: var(--sunken); }
.logout-form { display: inline-flex; }

/* ============================================================
   账户体系 v2：头像 / 用户菜单 / 认证表单 / 个人资料 / 管理页
   ============================================================ */

/* ── 徽标语义色（b-* 前缀，与既有 .badge.good 并存）─────── */
.badge.b-ok   { background: var(--good-bg); color: var(--good); }
.badge.b-warn { background: var(--warn-bg); color: var(--warn); }
.badge.b-bad  { background: var(--bad-bg);  color: var(--bad); }
.badge.b-info { background: #EAF1FB; color: #1D4ED8; }
.badge.b-dark { background: var(--ink); color: var(--on-dark); }

/* ── 提示块 ───────────────────────────────────────────── */
.notice {
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 12px 14px; font-size: 13px; line-height: 1.65;
  background: var(--surface-alt); color: var(--body-text);
}
.notice.ok    { background: var(--good-bg); border-color: rgba(21,127,60,0.25); color: var(--good); }
.notice.error { background: var(--bad-bg);  border-color: rgba(196,48,43,0.25); color: var(--bad); }
.notice.warn  { background: var(--warn-bg); border-color: rgba(138,109,31,0.28); color: var(--warn); }
.notice + .auth-foot { margin-top: 16px; }
.flash.warn { background: var(--warn-bg); color: var(--warn); border-color: rgba(138,109,31,0.28); }

/* ── 头像 ─────────────────────────────────────────────── */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  flex: none; border-radius: 50%; object-fit: cover; overflow: hidden;
  background: var(--chip); color: var(--on-dark);
  font-weight: 700; letter-spacing: 0.01em; user-select: none;
}
.avatar-fallback { background: var(--av-color, var(--ink)); }
.avatar-sm { width: 26px; height: 26px; font-size: 11px; }
.avatar-md { width: 32px; height: 32px; font-size: 12.5px; }
.avatar-lg { width: 44px; height: 44px; font-size: 16px; }
.avatar-xl { width: 88px; height: 88px; font-size: 32px; }
.avatar-xl-wrap { position: relative; width: 88px; height: 88px; }

/* ── 顶部用户菜单 ─────────────────────────────────────── */
.usermenu { position: relative; }
.usermenu-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 4px 10px 4px 4px;
  cursor: pointer; font-family: inherit;
  transition: background var(--ease), border-color var(--ease);
}
.usermenu-btn:hover { background: var(--sunken); border-color: var(--muted-soft); }
.usermenu-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.usermenu-name { font-size: 12.5px; font-weight: 600; color: var(--ink); max-width: 120px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usermenu-sub { font-size: 10px; color: var(--muted-soft); }
.usermenu-caret { width: 12px; height: 12px; color: var(--muted-soft); flex: none; }
.usermenu-pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 120;
  min-width: 250px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-card);
  box-shadow: var(--shadow-lift); padding: 8px; overflow: hidden;
}
.usermenu-pop a, .usermenu-pop button {
  display: block; width: 100%; text-align: left; font-family: inherit;
  font-size: 13px; color: var(--ink); padding: 9px 11px;
  border: none; background: none; border-radius: var(--r-sm);
  cursor: pointer; transition: background var(--ease);
}
.usermenu-pop a:hover, .usermenu-pop button:hover { background: var(--sunken); color: var(--ink); }
.usermenu-pop form { margin: 0; }
.um-head { display: flex; align-items: center; gap: 12px; padding: 8px 10px 10px; }
.um-id { min-width: 0; }
.um-name { font-size: 14px; font-weight: 700; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-mail { font-size: 11.5px; color: var(--muted-soft); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-vf {
  display: inline-block; margin-left: 6px; padding: 1px 6px; font-size: 10px;
  border-radius: var(--r-pill); background: var(--warn-bg); color: var(--warn);
}
.um-vf.ok { background: var(--good-bg); color: var(--good); }
.um-sep { height: 1px; background: var(--line-soft); margin: 6px 4px; }
.um-logout { color: var(--bad) !important; }
.um-logout:hover { background: var(--bad-bg) !important; }
.tabs-sep { width: 1px; height: 16px; background: var(--line); margin: 0 4px; }

/* ── 未验证邮箱横幅 ───────────────────────────────────── */
.verify-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  max-width: 1100px; margin: 0 auto 18px; padding: 12px 16px;
  background: var(--warn-bg); border: 1px solid rgba(138,109,31,0.28);
  border-radius: var(--r-card); font-size: 13px; color: var(--warn);
}
.verify-banner form { margin: 0; }
.vb-icon {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  background: var(--warn); color: #fff; font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.vb-text { flex: 1; min-width: 220px; line-height: 1.6; }

/* ── 认证表单补充 ─────────────────────────────────────── */
.field-note { font-size: 11.5px; color: var(--muted-soft); line-height: 1.5; }
.field .req { font-style: normal; font-size: 10px; font-weight: 700;
  color: var(--bad); background: var(--bad-bg); padding: 1px 6px;
  border-radius: var(--r-pill); margin-left: 6px; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-top: -4px; }
.auth-link { font-size: 12.5px; color: var(--accent); font-weight: 600; }
.check { display: inline-flex; flex-direction: row; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--muted); cursor: pointer; }
.check input { width: auto; margin: 0; accent-color: var(--ink); flex: none; }
.check-block { align-items: flex-start; line-height: 1.55; }
.check-block input { margin-top: 2px; }
.pw-meter { display: block; height: 4px; border-radius: var(--r-pill);
  background: var(--line-soft); overflow: hidden; margin-top: 2px; }
.pw-meter > i {
  display: block; height: 100%; width: 0; border-radius: var(--r-pill);
  background: var(--line); transition: width var(--ease), background var(--ease);
}
.pw-meter > i[data-score="0"] { width: 20%; background: var(--bad); }
.pw-meter > i[data-score="1"] { width: 40%; background: var(--bad); }
.pw-meter > i[data-score="2"] { width: 60%; background: var(--warn); }
.pw-meter > i[data-score="3"] { width: 80%; background: var(--accent); }
.pw-meter > i[data-score="4"] { width: 100%; background: var(--good); }

/* ── 个人资料页 ───────────────────────────────────────── */
.acct-wrap { max-width: 1100px; margin: 0 auto; padding: 8px 0 40px;
  display: flex; flex-direction: column; gap: 18px; }
.acct-hero { display: flex; gap: 24px; align-items: flex-start; padding: 24px 26px; }
.ah-left { display: flex; flex-direction: column; align-items: center; gap: 10px; flex: none; }
.avatar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  justify-content: center; max-width: 200px; }
.file-btn { cursor: pointer; }
.avatar-note { max-width: 200px; text-align: center; }
.ah-right { min-width: 0; flex: 1; }
.ah-name { font-size: 24px; font-weight: 700; margin: 2px 0 6px; color: var(--ink);
  font-family: var(--font-serif); }
.ah-sub { font-size: 13px; color: var(--muted); margin: 0 0 10px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ah-dot { color: var(--muted-soft); }
.ah-bio { font-size: 13.5px; color: var(--body-text); margin: 0 0 14px; line-height: 1.7; }
.ah-meta { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); }
.ah-meta strong { color: var(--ink); }

.acct-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.acct-grid .card { padding: 22px 24px; }
.acct-wide { grid-column: 1 / -1; }
.sec-title { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0 0 4px;
  display: flex; align-items: center; gap: 8px; }
.sec-sub { font-size: 12.5px; color: var(--muted); margin: 0 0 16px; line-height: 1.6; }
.sec-count { font-size: 11px; font-weight: 600; color: var(--muted);
  background: var(--chip); border-radius: var(--r-pill); padding: 1px 8px; }
.sub-title { font-size: 13px; font-weight: 700; color: var(--ink);
  margin: 22px 0 6px; }
.stack-form { display: flex; flex-direction: column; gap: 14px; }
.stack-form .btn { align-self: flex-start; }
.form-row { display: flex; gap: 12px; align-items: flex-start; }
.form-row .field { flex: 1; }
.field-narrow { flex: 0 0 96px !important; }
.inline-form { display: inline-flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.fold { margin-top: 14px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.fold > summary { font-size: 12.5px; font-weight: 600; color: var(--muted);
  cursor: pointer; list-style: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: "▸ "; color: var(--muted-soft); }
.fold[open] > summary::before { content: "▾ "; }
.fold > summary:hover { color: var(--ink); }
.fold .stack-form { margin-top: 14px; }
.admin-note { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.admin-note a { color: var(--accent); font-weight: 600; }

/* ── 基本资料卡视觉提升 ─────────────────────────────────── */
#info .sec-title {
  position: relative;
  padding-left: 16px;
  margin-bottom: 6px;
}
#info .sec-title::before {
  content: '';
  position: absolute;
  left: 0; top: 3px; bottom: 3px;
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
}
#info .sec-sub { padding-left: 16px; margin-bottom: 22px; }

#info .field > span {
  font-size: 12px;
  font-weight: 600;
  color: var(--body-text);
  letter-spacing: 0.03em;
  padding-left: 2px;
}
#info .field input,
#info .field textarea {
  background: var(--sunken);
  border-color: transparent;
  padding: 12px 15px;
  font-size: 14px;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
#info .field input::placeholder,
#info .field textarea::placeholder {
  color: var(--muted-soft);
  font-weight: 400;
}
#info .field input:hover,
#info .field textarea:hover {
  background: var(--surface);
  border-color: var(--line);
}
#info .field input:focus,
#info .field textarea:focus {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,162,75,0.14);
}
#info .field textarea { min-height: 80px; }

/* 双列行：登录信息 & 个人信息 */
#info .form-row { display: flex; gap: 14px; }
#info .form-row .field { flex: 1; }

/* 分隔线：登录 ↔ 个人 */
.form-divider {
  height: 1px;
  border: 0;
  margin: 2px 0 12px;
  background: var(--line-soft);
}

/* 保存按钮整体 */
#info .stack-form > .btn-dark {
  align-self: flex-end;
  margin-top: 4px;
  min-width: 110px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 10px 28px;
  letter-spacing: 0.04em;
  transition: background 0.15s, transform 0.15s;
}
#info .stack-form > .btn-dark:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* ── 登录设备 ─────────────────────────────────────────── */
.dev-list { display: flex; flex-direction: column; }
.dev-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--line-soft);
}
.dev-row:last-child { border-bottom: none; }
.dev-main { min-width: 0; }
.dev-name { font-size: 13.5px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dev-meta { font-size: 11.5px; color: var(--muted-soft); font-family: var(--font-mono); }

/* ── 安全活动 ─────────────────────────────────────────── */
.act-list { list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; }
.act-row {
  display: grid; grid-template-columns: 130px 1fr auto; gap: 12px;
  align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
}
.act-row:last-child { border-bottom: none; }
.act-row.empty { display: block; color: var(--muted-soft); }
.act-label { font-weight: 600; color: var(--ink); }
.act-detail { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.act-time { color: var(--muted-soft); white-space: nowrap; }

/* ── 管理页 ───────────────────────────────────────────── */
.admin-wrap { max-width: 1240px; margin: 0 auto; padding: 8px 0 40px; }
.admin-head { display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-title { font-size: 24px; font-weight: 700; margin: 0 0 4px; color: var(--ink);
  font-family: var(--font-serif); }
.admin-sub { font-size: 13px; color: var(--muted); margin: 0; }
.search-mini { margin: 0; }
.search-mini input { min-width: 220px; }
.table-card { padding: 0; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted);
  text-transform: none; padding: 12px 16px; border-bottom: 1px solid var(--line);
  background: var(--surface-alt); white-space: nowrap;
}
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft);
  vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table.compact th, .data-table.compact td { padding: 9px 12px; }
.th-act, .td-act { text-align: right; }
.ucell { display: flex; align-items: center; gap: 10px; }
.ucell-av { display: inline-flex; flex: none; }
.ucell-id { min-width: 0; display: flex; flex-direction: column; }
.ucell-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.ucell-sub { font-size: 11px; color: var(--muted-soft); }
.act-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.act-btns form { margin: 0; }
.btn-xs { font-size: 11.5px; padding: 4px 10px; }
.small { font-size: 12px; }
.dim { color: var(--muted-soft); }
.code-block {
  font-family: var(--font-mono); font-size: 11.5px; line-height: 1.7;
  background: var(--sunken); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 12px 14px; margin: 0;
  overflow-x: auto; white-space: pre; color: var(--body-text);
}
.outbox { list-style: none; margin: 0 0 12px; padding: 0;
  display: flex; flex-direction: column; gap: 10px; }
.outbox li { border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 12px; background: var(--surface-alt); }
.ob-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ob-link { display: block; font-size: 11px; color: var(--accent);
  word-break: break-all; margin-bottom: 4px; }

/* ── 错误页 ───────────────────────────────────────────── */
.error-card { text-align: center; }
.error-code {
  font-family: var(--font-serif); font-size: 46px; line-height: 1;
  font-weight: 700; color: var(--line); margin-bottom: 10px;
}
.error-actions { display: flex; gap: 10px; justify-content: center; margin-top: 22px; }

@media (max-width: 900px) {
  .acct-grid { grid-template-columns: minmax(0, 1fr); }
  .acct-hero { flex-direction: column; align-items: center; text-align: center; }
  .ah-sub, .ah-meta { align-items: center; }
  .ah-bio { text-align: center; }
}

/* ── 共享顶栏的窄屏适配 ───────────────────────────────────────────────
   实测 390px 下 .top-right 会把整行推出视口（scrollWidth 449 > 390），
   故窄屏把导航折到第二行并可横向滚动，顶栏高度改为自适应。 */
@media (max-width: 760px) {
  .top-inner {
    height: auto; min-height: 56px; flex-wrap: wrap;
    gap: 8px 10px; padding: 8px 14px;
  }
  .brand-logo { height: 30px; }
  .tabs {
    order: 3; width: 100%; gap: 2px;
    overflow-x: auto; scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { white-space: nowrap; padding: 6px 10px; }
  .tabs-sep { display: none; }
  .top-right { gap: 6px; }
  .model-chip { padding: 4px 9px; }
  .model-select { max-width: 92px; }
  .model-custom { width: 116px; }
  /* 窄屏：日期 + 城市 + 头衔 chip 折到第二行，缩 padding 让顶栏仍在一行内 */
  .top-info { height: 26px; padding: 0 8px; font-size: 11.5px; }
  .top-info-date .top-info-wd { display: none; }
  .verify-banner { margin-inline: 14px; }
}

@media (max-width: 600px) {
  .usermenu-meta { display: none; }
  /* 极窄屏：顶栏只保留日期，城市/头衔收进头像下拉里（那里本来就有邮箱与身份） */
  .top-info-city, .top-info-title { display: none; }
  .top-right { flex-wrap: wrap; justify-content: flex-end; }
  .act-row { grid-template-columns: 1fr auto; }
  .act-detail { display: none; }
  .form-row { flex-direction: column; }
  .field-narrow { flex: 1 !important; }
}

/* ── 全局情报浮窗（Manus 风格：暖黑 FAB + 白面板 + 柔和阴影）── */
.intel-dock {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
}
.intel-fab {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--ink); color: var(--on-dark);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(52, 50, 45, 0.28);
  transition: transform var(--ease), box-shadow var(--ease);
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.intel-fab:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 32px rgba(52, 50, 45, 0.34);
}
.intel-fab.dragging { transition: none; cursor: grabbing; transform: scale(1.1); }
.intel-fab svg { width: 22px; height: 22px; }

.intel-panel {
  position: fixed; width: 372px; max-width: calc(100vw - 32px);
  max-height: min(560px, 74vh);
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 16px 48px rgba(52, 50, 45, 0.22);
  opacity: 0; transform: translateY(8px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
}
.intel-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.ip-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 16px; border-bottom: 1px solid var(--line-soft); flex: none;
}
.ip-title {
  font-size: 13px; font-weight: 800; letter-spacing: 0.1em; color: var(--ink);
}
.ip-close {
  background: none; border: none; cursor: pointer;
  font-size: 20px; line-height: 1; color: var(--muted-soft); padding: 2px 6px;
}
.ip-close:hover { color: var(--ink); }
.ip-tabs { display: flex; gap: 4px; padding: 10px 12px 0; flex: none; }
.ip-tab {
  flex: 1; text-align: center; font: 700 13px var(--font-sans);
  color: var(--muted); background: none; border: none; cursor: pointer;
  padding: 7px 0; border-bottom: 2px solid transparent;
  transition: color var(--ease), border-color var(--ease);
}
.ip-tab:hover { color: var(--ink); }
.ip-tab.active { color: var(--ink); border-bottom-color: var(--ink); }

.ip-body { overflow-y: auto; padding: 12px 14px 14px; }
.ip-load { text-align: center; color: var(--muted-soft); font-size: 13px; padding: 22px 0; }
.ip-note {
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 12px; margin-bottom: 10px; background: var(--surface);
}
.ip-note.verified { border-color: rgba(21, 127, 60, 0.4); }
.ipn-top {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11px;
}
.ipn-co { font-weight: 800; color: var(--ink); font-size: 12.5px; }
.ipn-co:hover { text-decoration: underline; color: var(--ink); }
.ipn-meta { color: var(--muted-soft); }
.ipn-time { color: var(--muted-soft); font-size: 10px; margin-left: auto; }
.ipn-text { font-size: 13px; color: var(--body-text); margin: 6px 0 0; line-height: 1.55; }
.ipn-actions { margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.ipn-verify {
  font: 700 11px var(--font-sans); color: var(--muted);
  background: var(--chip); border: none; padding: 4px 11px;
  border-radius: var(--r-pill); cursor: pointer;
  transition: all var(--ease);
}
.ipn-verify:hover { color: var(--ink); background: var(--sunken); }
.ipn-verify.v { color: var(--good); background: var(--good-bg); }
.ipn-verify[disabled] { opacity: 0.5; cursor: wait; }
.ipn-del {
  font: 700 11px var(--font-sans); color: var(--muted-soft);
  background: transparent; border: none; padding: 4px 9px;
  border-radius: var(--r-pill); cursor: pointer; margin-left: auto;
  transition: all var(--ease);
}
.ipn-del:hover { color: var(--bad); background: var(--bad-bg); }
.ipn-del[disabled] { opacity: 0.5; cursor: wait; }

.ip-form {
  display: flex; flex-direction: column; gap: 11px;
  padding: 14px 16px 16px; overflow-y: auto;
}
.ipf-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.ip-form .btn { align-self: flex-start; }

@media (max-width: 600px) {
  .intel-dock { right: 16px; bottom: 16px; }
  .intel-fab { width: 48px; height: 48px; }
  .intel-panel { max-height: 68vh; }
}

/* ═══════════════════════ 滚动情报库 ═══════════════════════ */
.feed-page body { background: var(--sunken); }

.feed-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  margin-bottom: 18px;
}

.feed-filter {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.feed-filter .fpill small {
  margin-left: 4px; font-weight: 400; opacity: 0.7;
}

.feed-actions {
  display: flex; align-items: center; gap: 10px; margin-left: auto;
}

.feed-select {
  font-family: var(--font-sans); font-size: 13px; font-weight: 600;
  padding: 6px 10px; border: 1.5px solid var(--line);
  border-radius: var(--r-pill); background: var(--surface);
  color: var(--ink); cursor: pointer; outline: none;
  transition: border-color 0.15s;
}
.feed-select:focus { border-color: var(--accent); }

.feed-sub-btn { flex: 0 0 auto; font-size: 13px; }

.feed-status {
  font-size: 12px; color: var(--muted-soft); margin-bottom: 16px;
  padding: 6px 12px; background: var(--surface);
  border: 1px solid var(--line-soft); border-radius: var(--r-sm);
  display: inline-block;
}

/* ── 双瀑布布局 ── */
.feed-waterfall {
  display: flex; gap: 16px; align-items: flex-start;
  min-height: 300px;
}
.fw-col {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 16px;
}

/* ── 情报卡片 ── */
.fw-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 16px 18px;
  box-shadow: var(--shadow); break-inside: avoid;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.fw-card:hover {
  box-shadow: var(--shadow-lift); border-color: var(--ink-soft);
}

.fw-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.fw-type {
  flex: 0 0 auto;
}
.fw-company {
  font-size: 12px; font-weight: 600; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 各类型徽章色 */
.tpill.exec_change { background: rgba(180,67,218,0.12); color: #8B2FC9; }
.tpill.penalty { background: rgba(220,38,38,0.10); color: #B91C1C; }
.tpill.business { background: rgba(21,127,60,0.12); color: #157F3C; }
.tpill.bidding { background: rgba(234,179,8,0.14); color: #A07800; }
.tpill.financial_report { background: rgba(37,99,235,0.10); color: #1D4ED8; }
.tpill.org_change { background: rgba(107,114,128,0.12); color: #4B5563; }
.tpill.new_license { background: rgba(16,185,129,0.12); color: #059669; }
.tpill.new_business { background: rgba(245,158,11,0.14); color: #B45309; }
.tpill.new_system { background: rgba(99,102,241,0.10); color: #4338CA; }
.tpill.financing { background: rgba(236,72,153,0.10); color: #BE185D; }
.tpill.recruitment { background: rgba(59,130,246,0.10); color: #2563EB; }
.tpill.general { background: rgba(107,114,128,0.08); color: #6B7280; }

.fw-body { margin-bottom: 12px; }

.fw-title {
  display: block; font-size: 15px; font-weight: 700; line-height: 1.5;
  color: var(--ink); text-decoration: none; margin-bottom: 6px;
  overflow-wrap: break-word;
}
.fw-title:hover { color: var(--accent); text-decoration: underline; }

.fw-summary {
  font-size: 13px; line-height: 1.65; color: var(--muted);
  overflow-wrap: break-word;
}

.fw-foot {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--muted-soft);
  padding-top: 10px; border-top: 1px solid var(--line-soft);
}
.fw-source {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100px;
}
.fw-date { white-space: nowrap; }
.fw-link {
  margin-left: auto; color: var(--accent); text-decoration: none;
  font-weight: 600; white-space: nowrap;
}
.fw-link:hover { text-decoration: underline; }

/* ── 空状态 ── */
.fw-empty {
  grid-column: 1 / -1; text-align: center; padding: 48px 24px;
}
.fw-empty-icon { font-size: 48px; margin-bottom: 12px; }
.fw-empty-title {
  font-size: 18px; font-weight: 700; color: var(--muted); margin: 0 0 6px;
}
.fw-empty-sub {
  font-size: 14px; color: var(--muted-soft); line-height: 1.7; margin: 0;
}

/* ── 订阅弹窗 ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.modal-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 0;
  max-width: 480px; width: 90vw; max-height: 80vh;
  box-shadow: 0 16px 48px rgba(0,0,0,0.18);
  display: flex; flex-direction: column;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px 0;
}
.modal-head h3 { margin: 0; font-size: 17px; font-weight: 800; color: var(--ink); }
.modal-close {
  background: none; border: none; font-size: 22px; color: var(--muted);
  cursor: pointer; padding: 0 2px; line-height: 1;
}
.modal-close:hover { color: var(--ink); }

.modal-body { padding: 16px 22px; overflow-y: auto; }

.sub-types-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.sub-type-item {
  display: flex !important; flex-direction: row !important;
  align-items: center; gap: 8px;
  padding: 8px 12px; border: 1px solid var(--line-soft);
  border-radius: var(--r-sm); cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  transition: border-color 0.15s, background 0.15s;
}
.sub-type-item:hover { border-color: var(--accent); }
.sub-type-item input[type=checkbox] { margin: 0; flex: 0 0 auto; }

.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 22px 20px;
  border-top: 1px solid var(--line-soft);
}

/* ── 响应式 ── */
@media (max-width: 720px) {
  .feed-bar { flex-direction: column; align-items: stretch; }
  .feed-actions { margin-left: 0; flex-wrap: wrap; }
  .feed-actions .feed-select { flex: 1; min-width: 0; }
  .sub-types-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .feed-waterfall { gap: 10px; }
  .fw-card { padding: 12px 14px; }
}

/* ═══════════════ 组织架构维度 · 高管实名 ═══════════════ */
/* 渲染在「组织架构」维度卡片内部（不再单独开区块）。类名统一加 xexec- 前缀，
   避免与高管变动页的 .exec-row/.exec-link/.exec-list 等既有类互相覆盖。 */
.xexec {
  margin-top: 4px; padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  display: flex; flex-direction: column; gap: 12px;
}
.xexec-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.xexec-title {
  margin: 0; font-size: 13px; font-weight: 800; color: var(--ink);
  letter-spacing: 0.02em;
}
.xexec-hint { font-size: 11px; color: var(--muted-soft); }
.xexec-head .badge { margin-left: auto; }
.xexec-empty {
  margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--muted);
  background: var(--sunken); border-radius: var(--r-sm); padding: 10px 12px;
}

.xexec-list { display: flex; flex-direction: column; }
.xexec-item {
  display: flex; gap: 11px;
  padding: 12px 0; border-top: 1px solid var(--line-soft);
}
.xexec-item:first-child { border-top: none; padding-top: 2px; }
.xexec-item.is-lead { opacity: 0.72; }
.xexec-avatar {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 15px; font-weight: 700;
}
.xexec-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.xexec-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.xexec-name { font-size: 14.5px; font-weight: 800; color: var(--ink); }
.xexec-role {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em;
  padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--chip); color: var(--muted);
}
.xexec-role.r-chairman { background: var(--warn-bg); color: var(--warn); }
.xexec-role.r-gm { background: var(--mid-bg); color: var(--ink); }
.xexec-role.r-wealth_mgmt { background: var(--good-bg); color: var(--good); }
.xexec-pos { font-size: 12.5px; font-weight: 600; color: var(--body-text); }
.xexec-bio { font-size: 12px; color: var(--muted); line-height: 1.65; }
.xexec-view {
  font-size: 12.5px; line-height: 1.72; color: var(--body-text);
  background: var(--sunken); border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 8px 11px;
}
.xexec-view.none {
  background: transparent; border-left: none; padding: 0;
  color: var(--muted-soft); font-size: 12px;
}
.xexec-src { font-size: 10.5px; color: var(--muted-soft); }
.xexec-note {
  font-size: 10.5px; color: var(--muted-soft);
  padding-top: 5px; border-top: 1px dashed var(--line);
}
.xexec-foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border-top: 1px solid var(--line-soft); padding-top: 12px;
}
.xexec-foot .inline-form { margin-top: 0; }
.xexec-tip { font-size: 10.5px; color: var(--muted-soft); }

/* 进度条：用 class 控制显隐。
   ⚠️ 不能给元素加 hidden 属性——style.css 顶部有 `[hidden]{display:none!important}`，
   !important 会压过 .show，横幅永远不显示（实测踩过：搜集中用户看不到任何反馈）。 */
.exec-banner {
  display: none; align-items: center; gap: 11px;
  border: 1.5px solid var(--ink); border-radius: var(--r-sm);
  padding: 10px 12px; background: var(--surface-alt);
}
.exec-banner.show { display: flex; }
.exec-banner.err  { border-color: var(--bad);  background: var(--bad-bg); }
.exec-banner.done { border-color: var(--good); background: var(--good-bg); }
.exec-banner .llm-spin { width: 17px; height: 17px; border-width: 2px; margin: 0; flex: none; }
.exec-banner-text { min-width: 0; }
.exec-banner-title { font-size: 12.5px; font-weight: 800; color: var(--ink); }
.exec-banner-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

@media (max-width: 600px) {
  .xexec-item { gap: 9px; }
  .xexec-avatar { width: 30px; height: 30px; font-size: 13px; }
}

/* ── PWA 安装提示横幅 ─────────────────────────────── */
.pwa-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px 14px 20px;
  background: var(--ink); color: var(--on-dark);
  box-shadow: 0 -4px 24px rgba(52,50,45,0.2);
  transform: translateY(100%); opacity: 0;
  transition: transform 300ms ease-out, opacity 300ms ease-out;
  max-width: 560px; margin: 0 auto;
  border-radius: var(--r-card) var(--r-card) 0 0;
}
.pwa-banner.show { transform: translateY(0); opacity: 1; }
.pwa-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pwa-title { font-size: 14px; font-weight: 700; }
.pwa-sub { font-size: 12px; opacity: 0.7; }
.pwa-steps { font-size: 12px; opacity: 0.8; margin-top: 4px; line-height: 1.5; }
.pwa-close {
  background: none; border: none; color: var(--on-dark);
  opacity: 0.5; font-size: 22px; cursor: pointer; padding: 4px 8px;
  flex-shrink: 0;
}
.pwa-close:hover { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════════════
   App 模式（已安装到桌面 / 主屏）专属改造
   ─ 触发：<html class="is-app">，由 base.html <head> 的早期脚本按
     display-mode: standalone / fullscreen / navigator.standalone 判定后打上。
   ─ ⚠️ 全部规则都以 html.is-app 为前缀 → PC 浏览器（无该类名）完全不受影响。
   ─ 目标：① 顶部不再出现深色状态/标题栏，白底连成一片，提升全屏感；
           ② 导航从顶栏移到底部，成为 4 个带图标的 Tab。
   ═══════════════════════════════════════════════════════════════════════ */

/* ── ① 顶部：白底铺满状态栏，顶栏不再画分隔线 ────────────────────────── */
/* padding-top 吸收刘海/状态栏高度（桌面 env() 恒为 0），避免内容被遮住 */
html.is-app header.top {
  border-bottom: none;
  padding-top: env(safe-area-inset-top, 0px);
}
/* 导航已移到底部，顶栏不再承载 tab；admin 入口仍在右上角头像菜单里 */
html.is-app header.top .tabs { display: none; }
/* 腾掉导航后顶栏更宽松，收紧间距让品牌 / 信息条 / 模型 / 头像稳在一行 */
html.is-app .top-inner { gap: 14px; }

/* ── ② 底部 Tab 栏 ──────────────────────────────────────────────────── */
.app-tabs { display: none; }

html.is-app .app-tabs {
  display: flex;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html.is-app .app-tabs a {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 7px 2px 6px; min-height: 52px;
  font-size: 11px; font-weight: 600; line-height: 1.1;
  color: var(--muted-soft);
  -webkit-tap-highlight-color: transparent;
  transition: color var(--ease);
}
html.is-app .app-tabs svg { width: 23px; height: 23px; flex: none; }
/* 覆盖全局 a:hover{color:var(--accent)}，底部 Tab 悬停不该变金色 */
html.is-app .app-tabs a:hover { color: var(--muted); }
html.is-app .app-tabs a:active { background: var(--chip); }
html.is-app .app-tabs a.active,
html.is-app .app-tabs a.active:hover { color: var(--ink); }
html.is-app .app-tabs a.active svg { stroke-width: 2; }
/* 宽窗口（Mac 桌面 App 窗口等）：4 个 Tab 拉满整屏会显得空散，
   收成居中的浮动胶囊，手机上仍是通栏 */
@media (min-width: 760px) {
  html.is-app .app-tabs {
    max-width: 540px; margin: 0 auto;
    border-left: 1px solid var(--line); border-right: 1px solid var(--line);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -2px 16px rgba(52, 50, 45, 0.06);
  }
}

/* ── ③ 给 Tab 栏让位 ────────────────────────────────────────────────── */
/* body 是 box-sizing:border-box + min-height:100dvh，padding-bottom 不会撑出多余滚动 */
html.is-app body { padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px)); }
html.is-app main { padding-bottom: 32px; }

/* ── ④ 浮动元素整体上移，避免被 Tab 栏压住 ─────────────────────────── */
html.is-app .intel-dock { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
html.is-app .llm-chip { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
html.is-app .toast { bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }

/* ═══════════════════════════════════════════════════════════════════════
   移动端首页重排（≤ 760px）
   ─ 唯一的触发条件是「视口宽度」，与 html.is-app（已安装到桌面）互相独立
     → 手机浏览器和已安装 App 拿到同一套版式。
   ─ ⚠️ PC 网页端（视口 > 760px）完全不进入本区块，一行都不受影响。
   ─ 四项改动：
     ① 去掉「滚动情报」横条
     ② 顶栏去掉日期 chip；模型选择与 logo 同行，并吃掉剩余宽度（名字不再截断）
     ③ 头像收到模型选择右侧、同一行，只留图标
     ④ 首页去掉「我的档案」栏目
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 760px) {

  /* ── ① 滚动情报条 ──────────────────────────────────────────────────
     窄屏上一条横向跑马灯既挤又难读，情报内容在「情报库」里有完整列表，
     这里整条不显示（DOM 保留，PC 端照旧）。
     注：display:none 时 clientWidth / scrollWidth 都是 0，index.html 里那段
     跑马灯脚本的 `scrollWidth > clientWidth + 10` 自然不成立，不会空跑。 */
  .feed-ticker { display: none; }

  /* ── ② 顶栏的日期 / 城市 / 头衔 chip 一并让位 ─────────────────────
     日期信息量低却占一枚胶囊；城市与头衔本来就在「我的 → 个人资料」里。
     三者都收掉后，顶栏只剩「logo · 模型 · 头像」三件套。 */
  .top-info { display: none; }

  /* ── ②③ 首行三件套：logo · 模型选择（撑满）· 头像 ─────────────────
     .top-inner 保持 flex-wrap：品牌与 .top-right 排第一行；.tabs 因
     order:3 + width:100% 自动落到第二行（与改前一致，未受影响）。 */
  .top-inner { flex-wrap: wrap; gap: 8px 10px; padding: 8px 14px;
               height: auto; min-height: 56px; }
  .brand { flex: none; }
  .brand-logo { height: 28px; }
  .top-right {
    order: 2;                  /* 排在 .tabs（order:3）之前 → 与 logo 同行 */
    flex: 1 1 auto;
    min-width: 0;
    margin-left: auto;
    flex-wrap: wrap;           /* 「自定义…」输入框可独占下一行而不挤爆首行 */
    justify-content: flex-end;
    gap: 8px;
  }
  /* 模型 chip 吃掉 logo 与头像之间的全部剩余宽度 → 长模型名不再被截断 */
  .model-chip { flex: 1 1 auto; min-width: 0; padding: 5px 12px; }
  .model-select { flex: 1 1 auto; min-width: 0; width: 100%;
                  max-width: none; font-size: 12.5px; }
  /* 选「自定义…」时出现的模型 ID 输入框：独占一行 */
  .model-custom { flex: 1 0 100%; width: auto; order: 3; }

  /* 头像只留图标：姓名/身份在「我的」Tab 与下拉面板里都有 */
  .usermenu { flex: none; }
  .usermenu-meta, .usermenu-caret { display: none; }
  .usermenu-btn { padding: 4px; }

  /* ── ④ 首页「我的档案」栏目 ───────────────────────────────────────
     个人资料已可从右上头像菜单 / 底部「我的」进入，首页不再重复占位，
     把首屏空间全部留给「已有档案 / 高管变动 / 招标」。 */
  .home-profile { display: none; }

  /* 少了一栏，栏目标题的上边距也收紧一档，首屏更紧凑 */
  .page-home .home-col > .sec-title { margin: 22px 0 10px; }
}

/* ============================================================
   能力库：参考公司分组（2026-09-14）
   能力库从「一屏平铺卡片」改为「参考公司 → 服务卡片」两层，
   每家参考公司一个区块，卡片落在其下的网格里。
   ============================================================ */
.ref-block { margin-bottom: 36px; }
.ref-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px 18px; flex-wrap: wrap;
  padding-bottom: 12px; margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.ref-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.ref-title h2 {
  margin: 0; font-family: var(--font-serif); font-size: 19px; font-weight: 700; color: var(--ink);
}
.ref-note { font-size: 12.5px; color: var(--muted-soft); }
.ref-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* 删除按钮包在 <form class="inline-form"> 里，而 .inline-form 带 margin-top:12px。
   父级 align-items:center 居中的是「外边距盒」(28+12=40px)，可见按钮因此比
   同排的「+ 服务卡片」低 6px。这里清零外边距，与 .cap-flags 的处理一致。 */
.ref-tools .inline-form { margin-top: 0; }
.ref-count {
  font-size: 12px; color: var(--muted); padding: 4px 10px;
  background: var(--chip); border-radius: var(--r-pill); white-space: nowrap;
}
.ref-fold > summary { cursor: pointer; list-style: none; }
.ref-fold > summary::-webkit-details-marker { display: none; }
.ref-fold > summary:hover { transform: translateY(-1px); }
.ref-form {
  display: flex; flex-direction: column; gap: 14px;
  margin-top: 14px; padding: 18px 20px; max-width: 760px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
}
.ref-fold .ref-form > .btn { align-self: flex-start; }
.ref-block .cap-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* 折叠表单底部「保存 + 取消」并排。
   父级 .stack-form / .ref-form 是 flex 列，所以要显式 align-self 才不会被拉满宽；
   内部按钮再 align-self:center 覆盖 `.stack-form .btn{align-self:flex-start}`，
   避免两个按钮高度不同时顶部对齐错位。 */
.form-actions {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  align-self: flex-start;
}
.form-actions > .btn { align-self: center; }

/* 卡片右上角：状态 + 删除并排，避免换行错位 */
.cap-flags { display: flex; align-items: center; gap: 8px; flex: none; }
.cap-flags .inline-form { margin-top: 0; }

/* 方案生成页：勾选项按参考公司分组 */
.cc-group + .cc-group { margin-top: 18px; }
.cc-group-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.06em;
  color: var(--muted-soft); margin-bottom: 8px;
}
.cc-count {
  font-size: 11px; font-weight: 700; color: var(--muted);
  background: var(--chip); border-radius: var(--r-pill); padding: 2px 8px;
}

@media (max-width: 760px) {
  .ref-head { gap: 12px; }
  .ref-title h2 { font-size: 17px; }
  .ref-tools { width: 100%; }
  .ref-fold > summary { font-size: 11.5px; padding: 6px 12px; }
  .ref-block .cap-grid { grid-template-columns: 1fr; }
}

/* ── 管理看板 ────────────────────────────────────────────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.dash-card {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-card); padding: 18px 16px; text-align: center;
  display: flex; flex-direction: column; gap: 4px;
  transition: border-color 200ms ease-out;
}
.dash-card:hover { border-color: var(--accent); }
.dash-num { font-size: 28px; font-weight: 700; color: var(--ink); font-family: var(--font-serif); }
.dash-label { font-size: 12px; color: var(--muted); }

.dash-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.dash-panel { padding: 20px 22px; }
.dash-h3 { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0 0 14px; }
.mt-20 { margin-top: 20px; }

.dash-stats {
  display: flex; gap: 28px; flex-wrap: wrap;
}
.dash-stats > div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.dash-big { font-size: 24px; font-weight: 700; color: var(--accent); font-family: var(--font-serif); }
.dash-sml { font-size: 11px; color: var(--muted); }

.dash-bars {
  display: flex; gap: 6px; align-items: flex-end; min-height: 80px;
}
.dash-bar-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex: 1; min-width: 32px;
}
.dash-bar-val { font-size: 11px; font-weight: 600; color: var(--ink); }
.dash-bar {
  width: 18px; background: var(--accent); opacity: 0.75;
  border-radius: 3px 3px 0 0; min-height: 2px;
  transition: opacity 200ms ease-out;
}
.dash-bar-item:hover .dash-bar { opacity: 1; }
.dash-bar-date { font-size: 10px; color: var(--muted-soft); }

.dash-adopt {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.dash-adopt-item { display: flex; flex-direction: column; gap: 5px; }
.dash-adopt-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; color: var(--body-text);
}
.dash-adopt-num { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.dash-adopt-track {
  height: 8px; background: var(--surface-alt); border-radius: 4px; overflow: hidden;
}
.dash-adopt-fill {
  height: 100%; background: var(--accent); border-radius: 4px;
  transition: width 400ms ease-out;
}

.ta-right { text-align: right; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 760px) {
  .dash-row { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}

/* ── 维度卡片追问 ────────────────────────────────────────────────── */
/* 卡片底部「追问」胶囊按钮：始终可见，触摸友好 */
.dim-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-wrap: wrap;
}
.dim-ask-pill {
  display: inline-flex; align-items: center; gap: 4px;
  cursor: pointer; font-size: 11.5px; font-weight: 600;
  color: var(--on-dark); background: var(--accent);
  border: none; border-radius: var(--r-pill);
  padding: 5px 12px; line-height: 1.5;
  box-shadow: 0 1px 3px rgba(201,162,75,0.35), 0 1px 2px rgba(52,50,45,0.08);
  transition: all 200ms ease-out; -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.dim-ask-pill:hover {
  background: var(--accent-hover);
  box-shadow: 0 3px 10px rgba(201,162,75,0.4), 0 1px 3px rgba(52,50,45,0.12);
  transform: translateY(-1px);
}
.dim-ask-pill:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(201,162,75,0.3);
}

/* 追问输入区：常驻在对话列表底部（刷新后仍在这里，不必再回维度卡片找入口） */
.dim-ask-form {
  margin-top: 16px; border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 14px 16px;
  background: var(--surface-alt);
}
.dim-ask-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; flex-wrap: wrap; margin-bottom: 10px;
}
/* 注意：全局 `label { display:flex; flex-direction:column }`（见文件上方表单样式）
   会把 label 里的内容竖着堆起来。这两个都是横向排的「标签+控件」，必须显式
   声明 flex-direction:row，否则勾选框会跑到文字上方去。 */
.dim-ask-pick {
  display: inline-flex; flex-direction: row; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 400; color: var(--muted);
}
.dim-ask-pick select {
  -webkit-appearance: none; appearance: none;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink);
  background-color: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 5px 26px 5px 12px; margin: 0;
  cursor: pointer; max-width: 230px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236B6862' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  transition: border-color var(--ease);
}
.dim-ask-pick select:hover, .dim-ask-pick select:focus {
  border-color: var(--accent); outline: none;
}
.dim-ask-pick select option { color: #111; font-weight: 500; }
/* 这两行是「文字标签 + 控件」的横排，两边都不能被挤：
   全局 `label` 规则是竖排 flex，不给 span 加 flex:none + nowrap 的话，
   标签会被压成两行（曾出现「追问 / 维度」竖着排、勾选框跑到文字上方）。 */
.dim-ask-pick > span,
.dim-ctx-toggle > span { flex: none; white-space: nowrap; }
.dim-ask-body { display: flex; gap: 10px; align-items: flex-end; }
.dim-ask-body textarea {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 12px; font-size: 13px; resize: vertical;
  font: inherit; font-size: 13px; line-height: 1.5; background: var(--surface);
}
.dim-ask-body textarea:focus { outline: none; border-color: var(--accent); }

.dim-ask-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-top: 10px;
}
/* 上下文承接开关：轻量勾选行。
   注意别再做成「选中就整块填成金色」的胶囊 —— 它会比旁边的「提问」按钮还抢眼，
   看起来像第二个主按钮。选中态只用勾 + 文字加重来表达。 */
.dim-ctx-toggle {
  display: inline-flex; flex-direction: row; align-items: center; gap: 7px;
  cursor: pointer; font-size: 12px; font-weight: 400; color: var(--muted);
  user-select: none; transition: color var(--ease);
}
.dim-ctx-toggle:hover { color: var(--ink); }
.dim-ctx-toggle input {
  flex: none; width: 15px; height: 15px; margin: 0; cursor: pointer;
  accent-color: var(--accent);
}
.dim-ctx-toggle:has(input:checked) { color: var(--ink); font-weight: 600; }
.dim-ctx-hint { color: var(--muted-soft); font-size: 11.5px; }
.dim-ask-kbd { color: var(--muted-soft); font-size: 11.5px; }
/* 窄屏：维度下拉收窄，省掉快捷键提示（手机没有物理键盘） */
@media (max-width: 760px) {
  .dim-ask-pick select { max-width: 150px; }
  .dim-ask-kbd { display: none; }
}

/* loading 态 */
.dim-ask-loading {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; font-size: 13px; color: var(--muted);
}
.dim-spin { width: 14px; height: 14px; flex: none; }

/* 错误提示（解答本身已直接追加到上方对话列表，不再有独立结果区） */
.dim-ask-error {
  margin-top: 12px; font-size: 13px; color: var(--bad);
  background: var(--bad-bg); border-radius: var(--r-sm); padding: 8px 12px;
}
.dimq-new { animation: dimq-fade-in 400ms ease-out; }
@keyframes dimq-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dimq-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.dimq-item { padding: 16px 18px; }
.dimq-top {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.dimq-model { font-size: 11px; color: var(--muted-soft); }
.dimq-time { font-size: 11px; color: var(--muted-soft); margin-left: auto; }
/* 「承接前文」标记：该条解答当时把历史问答作为上下文读了进去 */
.dimq-ctx {
  font-size: 10.5px; font-weight: 700; color: var(--accent);
  background: var(--warn-bg); border-radius: var(--r-pill); padding: 2px 8px;
  white-space: nowrap;
}
.dimq-q, .dimq-a {
  font-size: 13.5px; line-height: 1.7; color: var(--body-text);
  display: flex; gap: 8px; margin-top: 6px;
}
.dimq-tag {
  flex: none; font-size: 11px; font-weight: 700; color: var(--on-dark);
  background: var(--ink); border-radius: var(--r-sm);
  padding: 2px 6px; height: 20px; line-height: 16px;
}
.dimq-tag-a { background: var(--accent); }

/* 追问条目操作按钮（删除 / 反映到卡片） */
.dimq-item-acts {
  margin-left: auto; display: flex; gap: 6px; flex: none;
}
.dimq-act-btn {
  font: inherit; font-size: 11px; font-weight: 500;
  border: 0.5px solid var(--line); background: var(--surface);
  color: var(--muted); cursor: pointer;
  padding: 3px 8px; border-radius: var(--r-pill);
  -webkit-tap-highlight-color: transparent;
  transition: border-color var(--ease), color var(--ease), background var(--ease);
}
.dimq-act-btn:hover { border-color: var(--accent); color: var(--ink); }
.dimq-act-btn:active { background: var(--chip); }
.dimq-del:hover { border-color: var(--bad); color: var(--bad); }
.dimq-reflect:hover { border-color: var(--accent); color: var(--accent); }

/* 卡片底部「修改」胶囊（与「追问」并排） */
.dim-edit-pill {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  box-shadow: none !important;
}
.dim-edit-pill:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  transform: translateY(-1px);
}
.dimq-edit-title {
  font-size: 14px; font-weight: 600; color: var(--ink);
  margin-right: auto;
}

/* ── 手机端：维度卡片「分享成图」 ────────────────────────────────────
   手机端每张维度卡片多一个「分享」按钮：把这一张卡重排成竖版海报 PNG，
   通过系统分享面板直接发到微信（不支持时降级为长按保存浮层）。
   桌面端 .dim-share 恒为 display:none —— 布局与改动前逐像素一致，
   所以 PC 端无需任何回归改动。 */
/* ★ 必须 display:contents：让这个「分享 + 追问」的包裹层从盒树里消失，
   两个按钮直接成为 .dim-foot 的 flex item —— 桌面端分享按钮是 display:none，
   于是追问胶囊仍是 .dim-foot 唯一的 item，几何与加分享功能之前**逐像素一致**。
   若给它 display:flex，它会多出一个盒子，把 .dim-foot 的高度从 28.13 压到 27.25，
   PC 端整页卡片高度都会跟着变（实测 0.88px，级联到瀑布流后错开 3.5px）。 */
.dim-foot-acts { display: contents; }
.dim-share {
  display: none; align-items: center; gap: 4px;
  cursor: pointer; font-family: var(--font-sans);
  font-size: 11.5px; font-weight: 600; line-height: 1.5;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-pill);
  /* 上下各 4px（而非 5px）：多出的 1px 边框要靠这里补回来，
     才能和「追问」胶囊严格等高（11.5×1.5 + 8 + 2 = 27.25） */
  padding: 4px 12px;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--ease), border-color var(--ease);
}
.dim-share:hover { border-color: var(--accent); color: var(--ink); }
.dim-share:active { background: var(--chip); }
.dim-share[disabled] { opacity: .55; }
.dim-share svg { flex: none; }
/* 生成中的小转圈（按钮内，替换掉图标位置） */
.cs-spin {
  width: 11px; height: 11px; flex: none; border-radius: 50%;
  border: 1.6px solid var(--line); border-top-color: var(--accent);
  animation: cs-rot 700ms linear infinite;
}
@keyframes cs-rot { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  /* 只有手机端出现：与「追问」胶囊同高，两颗并排不打架 */
  .dim-share { display: inline-flex; }
}

/* 分享浮层（降级路径：微信内置浏览器 / 旧 Safari 不支持系统级文件分享） */
.cs-sheet { position: fixed; inset: 0; z-index: 220; display: none; }
.cs-sheet.show { display: block; }
.cs-mask { position: absolute; inset: 0; background: rgba(26,25,23,0.8); }
.cs-panel {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(92vw, 450px); max-height: 90vh; overflow: auto;
  background: var(--surface); border-radius: 18px; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.42);
}
.cs-hint { margin: 0; font-size: 13.5px; font-weight: 700; color: var(--ink); text-align: center; }
.cs-hint span { display: block; margin-top: 3px; font-size: 12px; font-weight: 400; color: var(--muted); }
.cs-shot {
  display: block; width: 100%; height: auto; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-alt);
}
.cs-btns { display: flex; gap: 10px; }
.cs-btns .btn { flex: 1; text-align: center; justify-content: center; }

/* ── 追问弹出窗 ────────────────────────────────────────────────── */
.dimq-modal {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
}
.dimq-modal-overlay {
  position: absolute; inset: 0;
  background: rgba(26,25,23,0.55);
  backdrop-filter: blur(2px);
}
.dimq-modal-panel {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  width: min(92vw, 640px); max-height: 85vh;
  background: var(--surface); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  overflow: hidden;
}
.dimq-modal-header {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 16px; border-bottom: 0.5px solid var(--line);
  background: var(--surface);
}
.dimq-modal-header .dim-ask-pick { margin: 0; }
.dimq-modal-header .dim-ctx-hint { margin-left: auto; }
.dimq-modal-close {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: none; border-radius: var(--r-sm);
  background: transparent; color: var(--muted); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--ease), color var(--ease);
}
.dimq-modal-close:hover { background: var(--surface-alt); color: var(--ink); }
.dimq-modal-close:active { background: var(--chip); }

.dimq-modal-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 16px; min-height: 120px;
}
.dimq-modal-body .dimq-list { margin-top: 0; }
.dimq-modal-body .empty { padding: 24px 0; text-align: center; }

.dimq-modal-footer {
  flex: none; padding: 14px 16px; border-top: 0.5px solid var(--line);
  background: var(--surface);
}
.dimq-modal-footer .dim-ask-form {
  margin-top: 0; border: none; padding: 0; background: transparent;
}
.dimq-modal-footer .dim-ask-error { margin-top: 8px; }
.dimq-modal-footer .dim-ask-loading { margin-top: 8px; }

/* 模式切换标签 */
.dimq-mode-tabs {
  display: flex; gap: 0; margin-bottom: 10px;
  border-bottom: 0.5px solid var(--line);
}
.dimq-mode-tab {
  flex: none; border: none; background: transparent;
  font: inherit; font-size: 12.5px; font-weight: 500;
  color: var(--muted); cursor: pointer;
  padding: 6px 14px; border-bottom: 2px solid transparent;
  margin-bottom: -0.5px; transition: color var(--ease), border-color var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.dimq-mode-tab:hover { color: var(--ink); }
.dimq-mode-tab.active {
  color: var(--ink); border-bottom-color: var(--accent); font-weight: 600;
}
.dimq-mode-panel { display: none; }
.dimq-mode-panel.active { display: block; }

/* 浮动「追问记录」按钮：弹窗关闭后随时重新打开 */
.dimq-reopen {
  position: fixed; right: 20px; bottom: 24px; z-index: 150;
  width: 48px; height: 48px; border: none; border-radius: 50%;
  background: var(--accent); color: var(--on-dark);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(201,162,75,0.45), 0 2px 6px rgba(52,50,45,0.15);
  -webkit-tap-highlight-color: transparent;
  transition: transform 200ms ease-out, box-shadow 200ms ease-out;
}
.dimq-reopen:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201,162,75,0.5), 0 3px 8px rgba(52,50,45,0.18);
}
.dimq-reopen:active { transform: translateY(0); }

@media (max-width: 760px) {
  .dimq-modal-panel { width: 100vw; max-height: 100vh; border-radius: 0; }
  .dimq-modal-header .dim-ctx-hint { display: none; }
  .dimq-reopen { right: 16px; bottom: 16px; }
}
