/* ============================================================
   企业动态 · 持续跟踪工作台
   ------------------------------------------------------------
   视觉方向：编辑部情报台——低装饰、高信息密度、强刊头，
   证据与观点用底色 / 边框硬区分。

   2026-09-14 重构（frontend-design）：
   1. 去掉蓝紫渐变与发光（技能明令禁止的「通用 AI 风格」）
   2. 建立真实字阶（原先把 11-14px 堆在一起，层级差不足）
   3. 收敛圆角与嵌套底色（原来卡内再套块、到处圆角）
   4. 移动端重新设计，不是把桌面压窄
   5. 公司名从页脚提到刊头，成为卡片第一眼
   6. AI 面板移出 <a>，根治「点解读却跳转」
   ============================================================ */

:root {
  /* ---- 颜色：先功能，后效果 ---- */
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #eef0f4;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;

  --text: #101828;
  --text-2: #475467;
  --text-3: #98a2b3;

  --ink: #1d2939;              /* 品牌墨色（取代原蓝紫渐变） */
  --accent: #1f5eff;
  --accent-soft: #eff4ff;
  --accent-line: rgba(31, 94, 255, .30);

  /* 重要程度：色 + 底，但从不只靠颜色（永远同时有文字标签） */
  --p0: #b42318;  --p0-bg: #fef3f2;  --p0-line: #fecdca;
  --p1: #b54708;  --p1-bg: #fff6ed;  --p1-line: #f5d9b8;
  --p2: #8a6a08;  --p2-bg: #fdfaeb;  --p2-line: #ecdca4;
  --p3: #667085;  --p3-bg: #f2f4f7;  --p3-line: #e4e7ec;

  --up: #067647;    --up-bg: #ecfdf3;
  --down: #b42318;  --down-bg: #fef3f2;
  --mixed: #5925a8; --mixed-bg: #f4f0ff;

  /* AI 解读（观点，非证据）：石墨灰，刻意不用彩色，避免被误读为结论 */
  --ai-line: #98a2b3;
  --ai-bg: #fafbfc;

  /* ---- 字阶：真实差异，不是只改粗细 ---- */
  --fs-brand: 19px;
  --fs-title: 16.5px;
  --fs-h: 15px;
  --fs-body: 13.5px;
  --fs-sm: 12.5px;
  --fs-xs: 11.5px;
  --fs-micro: 10.5px;

  /* ---- 间距 ---- */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px;
  --gap: 16px;

  /* ---- 圆角：收敛，避免「到处大圆角」 ---- */
  --r-lg: 10px;
  --r-md: 7px;
  --r-sm: 5px;

  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-hover: 0 2px 4px rgba(16, 24, 40, .06), 0 8px 20px rgba(16, 24, 40, .08);
}

* { box-sizing: border-box; }

/* 关键：display 声明会覆盖 UA 的 [hidden]{display:none}，必须显式兜底 */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

.wrap { max-width: 1560px; margin: 0 auto; padding: 0 var(--s5); }

/* 键盘可达：统一 focus 环，别只给输入框 */
:where(a, button, select, input, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ---------------- 头部 ---------------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s5); padding-top: 13px; padding-bottom: 13px;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 0 0 auto; }

/* 纯色墨块。原先是蓝紫渐变 + 发光阴影——那是技能点名的「通用 AI 风格」 */
.brand-mark {
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: #fff; font-weight: 700; font-size: 16px;
  display: grid; place-items: center;
  letter-spacing: .5px;
}

.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-title {
  font-size: var(--fs-brand); font-weight: 700;
  letter-spacing: -.3px; line-height: 1.2; color: var(--text);
}
.brand-sub { font-size: var(--fs-xs); color: var(--text-3); line-height: 1.3; }

/* ---- 统计 = 可点的筛选入口 ---- */
.header-stats { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.stat {
  display: flex; flex-direction: column; align-items: center; gap: 0;
  min-width: 58px; padding: 5px 10px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-family: inherit; color: var(--text);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.stat:hover { background: var(--surface-2); border-color: var(--border-strong); }
.stat b {
  font-size: 15px; font-weight: 700; line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.stat span { font-size: var(--fs-micro); color: var(--text-3); line-height: 1.3; }

.stat.is-active {
  background: var(--ink); border-color: var(--ink);
}
.stat.is-active b, .stat.is-active span { color: #fff; }

.stat.s-p0 b { color: var(--p0); }
.stat.s-p1 b { color: var(--p1); }
.stat.s-p2 b { color: var(--p2); }
.stat.s-p3 b { color: var(--p3); }
.stat.s-p0.is-active { background: var(--p0); border-color: var(--p0); }
.stat.s-p1.is-active { background: var(--p1); border-color: var(--p1); }
.stat.s-p2.is-active { background: var(--p2); border-color: var(--p2); }
.stat.s-p3.is-active { background: var(--p3); border-color: var(--p3); }
.stat.s-company.is-active { background: var(--accent); border-color: var(--accent); }

/* ---------------- 研究待办条 ---------------- */

.todo-bar {
  background: #fffaf3;
  border-bottom: 1px solid #f2ddc2;
}
.todo-inner {
  display: flex; align-items: center; gap: 10px;
  padding-top: 9px; padding-bottom: 9px; flex-wrap: wrap;
}
.todo-label {
  flex: 0 0 auto;
  font-size: var(--fs-micro); font-weight: 800; letter-spacing: .6px;
  color: #b54708; background: #fff;
  border: 1px solid #f2c795; border-radius: 999px;
  padding: 2px 9px;
}
.todo-text { font-size: var(--fs-sm); color: #8a4a10; line-height: 1.5; }
.todo-text b { font-weight: 800; color: #b54708; font-variant-numeric: tabular-nums; }
.todo-text .sep { color: #d9b18c; margin: 0 6px; }
.todo-actions { margin-left: auto; display: flex; gap: 6px; flex: 0 0 auto; }

/* ---------------- 工具栏 ---------------- */

.toolbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 61px; z-index: 20;
}

.toolbar-inner {
  display: flex; flex-direction: column; align-items: stretch; gap: 9px;
  padding-top: 10px; padding-bottom: 10px;
}

.toolbar-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.search-box { position: relative; flex: 1 1 260px; min-width: 180px; max-width: 400px; }
.search-box svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; fill: none; stroke: var(--text-3);
  stroke-width: 2; stroke-linecap: round;
}
.search-box input {
  width: 100%; height: 36px; padding: 0 12px 0 34px;
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--surface); color: var(--text); font-size: var(--fs-body);
  font-family: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}
.search-box input::placeholder { color: var(--text-3); }
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31, 94, 255, .12); }

.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.chip {
  height: 30px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text-2); font-size: var(--fs-sm); font-weight: 600;
  font-family: inherit; transition: all .15s;
}
.chip:hover { background: var(--surface-2); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-p0.is-active { background: var(--p0); border-color: var(--p0); }
.chip-p1.is-active { background: var(--p1); border-color: var(--p1); }
.chip-p2.is-active { background: var(--p2); border-color: var(--p2); }
.chip-p3.is-active { background: var(--p3); border-color: var(--p3); }

.selects { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.selects select {
  height: 32px; padding: 0 28px 0 10px; border-radius: var(--r-md);
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); font-size: var(--fs-sm); font-family: inherit; cursor: pointer;
  appearance: none; outline: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 14px;
}
.selects select:focus { border-color: var(--accent); }

.view-tabs {
  display: flex; gap: 2px; padding: 3px; margin-left: auto;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-md); flex: 0 0 auto;
}
.vtab {
  height: 28px; padding: 0 14px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--text-2);
  font-family: inherit; font-size: var(--fs-sm); font-weight: 600;
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.vtab:hover { color: var(--text); }
.vtab.is-active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16,24,40,.10); }

.filter-toggle { display: none; margin-left: auto; flex: 0 0 auto; }

/* ---------------- 按钮 ---------------- */

.btn {
  height: 36px; padding: 0 16px; border-radius: var(--r-md); cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); font-size: var(--fs-body); font-weight: 600;
  font-family: inherit; transition: all .15s;
}
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #1a4fd6; }
.btn-sm { height: 30px; padding: 0 12px; font-size: var(--fs-sm); border-radius: var(--r-sm); }

/* ---------------- 瀑布流 ---------------- */

.masonry { position: relative; margin: var(--s5) 0 var(--s2); }

.card {
  position: absolute; top: 0; left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, border-color .2s;
  opacity: 0;
  animation: cardIn .3s ease forwards;
}
@keyframes cardIn { from { opacity: 0; } to { opacity: 1; } }
.card:hover { box-shadow: var(--shadow-hover); border-color: var(--border-strong); }

/* 左侧等级色条：让 P0 在扫视时先跳出来，又不靠纯色块压住内容 */
.card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--p3);
}
.card[data-level="P0"]::before { background: var(--p0); }
.card[data-level="P1"]::before { background: var(--p1); }
.card[data-level="P2"]::before { background: var(--p2); }

/* ---- 刊头：公司名置顶 ---- */
.card-head {
  display: flex; align-items: center; gap: var(--s2);
  padding: 11px 14px 0 16px;
}
.co { display: flex; align-items: center; gap: 7px; min-width: 0; flex: 1 1 auto; }
.co-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.co-name {
  font-size: var(--fs-h); font-weight: 700; letter-spacing: -.2px;
  color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-date {
  flex: 0 0 auto;
  font-size: var(--fs-xs); color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* ---- 正文链接：只包内容，AI 面板在外面 ---- */
.card-link {
  display: block; color: inherit; text-decoration: none;
  padding: 9px 14px 0 16px;
}
.card-link:hover .card-title { color: var(--accent); }

.card-badges { display: flex; align-items: center; gap: 5px; margin-bottom: 7px; flex-wrap: wrap; }

.badge {
  display: inline-flex; align-items: center; height: 20px;
  padding: 0 7px; border-radius: var(--r-sm);
  font-size: var(--fs-micro); font-weight: 700; letter-spacing: .2px;
}
.badge-p0 { background: var(--p0-bg); color: var(--p0); }
.badge-p1 { background: var(--p1-bg); color: var(--p1); }
.badge-p2 { background: var(--p2-bg); color: var(--p2); }
.badge-p3 { background: var(--p3-bg); color: var(--p3); }
.badge-up { background: var(--up-bg); color: var(--up); }
.badge-down { background: var(--down-bg); color: var(--down); }
.badge-mixed { background: var(--mixed-bg); color: var(--mixed); }
.badge-neutral { background: var(--surface-3); color: var(--text-3); }
.badge-planned { background: var(--accent-soft); color: var(--accent); border: 1px dashed var(--accent-line); }
.badge-status { background: var(--surface); color: var(--text-2); border: 1px solid var(--border-strong); }
.badge-status.is-todo { background: #fff6ed; color: #b54708; border-color: #f2c795; }
.badge-status.is-active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.badge-status.is-done { background: var(--surface-3); color: var(--text-3); }
.badge-holding { background: var(--surface-3); color: var(--text-2); }
.badge-holding.is-core { background: var(--accent-soft); color: #1d4ed8; border: 1px solid var(--accent-line); }

.card-title {
  margin: 0 0 8px;
  font-size: var(--fs-title); font-weight: 700; line-height: 1.42;
  letter-spacing: -.2px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .15s;
}

/* ---- 要点 = 证据：浅蓝实底 + 左色条 ---- */
.card-key {
  position: relative;
  margin: 0 0 9px;
  padding: 9px 11px 8px 12px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-left: 3px solid var(--accent);
}
.key-mark {
  display: inline-block; margin-bottom: 4px;
  padding: 0 5px; border-radius: 3px;
  background: rgba(31, 94, 255, .14); color: #1d4ed8;
  font-size: var(--fs-micro); font-weight: 800; letter-spacing: .5px;
  line-height: 1.5;
}
.key-text {
  margin: 0;
  font-size: var(--fs-body); font-weight: 600; line-height: 1.6;
  color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical;
  overflow: hidden;
}
.key-trace { display: block; margin-top: 4px; font-size: var(--fs-micro); color: var(--text-3); }

.card-key.is-compact { margin-bottom: 6px; padding: 7px 10px 6px 11px; }
.card-key.is-compact .key-text { font-size: var(--fs-sm); -webkit-line-clamp: 3; }
.card-key.is-compact .key-mark { margin-bottom: 2px; }

.card-summary {
  margin: 0;
  font-size: var(--fs-sm); line-height: 1.62; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 有要点时，摘要退居为复核指引——它本来就是按事件类型生成的行动建议 */
.card-summary.is-guidance { font-size: var(--fs-xs); line-height: 1.58; color: var(--text-3); -webkit-line-clamp: 3; }
.card-summary.is-guidance b { color: var(--text-2); font-weight: 700; margin-right: 4px; }

.card-action {
  margin-top: 9px; padding: 8px 10px;
  background: var(--mixed-bg);
  border-left: 3px solid var(--mixed);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: var(--fs-xs); line-height: 1.6; color: #4b2f92;
}
.card-action b {
  display: block; margin-bottom: 2px;
  font-size: var(--fs-micro); font-weight: 800; letter-spacing: .6px; color: var(--mixed);
}

/* ---- AI 解读 = 观点：石墨灰 + 虚线，刻意与「要点」的蓝色实底区分 ----
   两者性质完全不同，混在一起就是污染底稿：
     要点   = 从原文提取的事实，可溯源到页码（证据）
     AI 解读 = 本地模型的定性推理（观点，非证据）
   虚线是有意的——提示「临时、未证实」。 */
.card-ai {
  margin: 10px 14px 0 16px;
  padding: 9px 11px 10px;
  border: 1px dashed var(--ai-line);
  border-radius: var(--r-sm);
  background: var(--ai-bg);
}
.card-ai[data-state="empty"] {
  padding: 7px 10px;
  border-style: dashed;
  background: transparent;
}
.ai-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.ai-mark {
  display: inline-flex; align-items: center;
  padding: 0 6px; height: 17px; border-radius: 3px;
  background: var(--ink); color: #fff;
  font-size: var(--fs-micro); font-weight: 800; letter-spacing: .5px;
}
.ai-tag { font-size: var(--fs-micro); color: var(--text-3); letter-spacing: .1px; }
.ai-btn {
  margin-left: auto; flex: 0 0 auto;
  height: 22px; padding: 0 9px;
  border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text-2);
  font-size: var(--fs-micro); font-weight: 700; font-family: inherit;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.ai-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.card-ai.is-loading .ai-btn { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.ai-out {
  margin: 7px 0 0;
  font-size: var(--fs-sm); line-height: 1.72; color: var(--text-2);
  white-space: pre-wrap;
}
.ai-out[hidden] { display: none !important; }
.card-ai.is-loading .ai-out { color: var(--text-3); }
.ai-empty { margin: 0; font-size: var(--fs-micro); color: var(--text-3); }

.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 10px; padding: 9px 14px 11px 16px;
  border-top: 1px solid var(--border);
  font-size: var(--fs-micro); color: var(--text-3);
}
.card-source { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-rel { flex: 0 0 auto; font-variant-numeric: tabular-nums; }

/* ---------------- 加载更多 ---------------- */

.load-more {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  padding: var(--s5) 0 var(--s7);
}
.sentinel { width: 100%; height: 1px; }
.load-more-hint { font-size: var(--fs-sm); color: var(--text-3); }

/* ---------------- 状态页 ---------------- */

.state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: var(--s7) var(--s5); gap: var(--s2);
}
.state h2 { margin: 0; font-size: 17px; font-weight: 700; }
.state p { margin: 0 0 12px; font-size: var(--fs-body); color: var(--text-2); max-width: 460px; }

.skeleton-grid {
  display: grid; gap: var(--gap); width: 100%;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.sk-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden; padding: 14px 16px;
}
.sk-key { height: 58px; border-radius: var(--r-sm); background: var(--surface-3); margin-bottom: 10px; }
.sk-line {
  height: 10px; margin: 10px 0; border-radius: 5px;
  background: linear-gradient(90deg, #eef0f3 25%, #e3e6ea 37%, #eef0f3 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}
.sk-line.w60 { width: 60%; }
.sk-line.w40 { width: 40%; }
.sk-line.w85 { width: 85%; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------------- Footer ---------------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: var(--s4) 0;
  font-size: var(--fs-sm); color: var(--text-3);
}
.site-footer .wrap { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------------- 时间轴分隔条 ---------------- */

.divider {
  position: absolute; top: 0; left: 0;
  display: flex; align-items: center; gap: 10px; height: 32px;
  pointer-events: none;
}
.divider-label {
  flex: 0 0 auto; font-size: var(--fs-body); font-weight: 800;
  color: var(--text); letter-spacing: .2px; white-space: nowrap;
}
.divider-sub {
  flex: 0 0 auto; font-size: var(--fs-xs); font-weight: 600; color: var(--text-3);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.divider-line { flex: 1 1 auto; height: 1px; background: var(--border-strong); }
.divider.is-planned .divider-label { color: var(--accent); }
.divider.is-planned .divider-line {
  background: repeating-linear-gradient(90deg, var(--accent-line) 0 6px, transparent 6px 12px);
}

/* ---------------- 紧凑列表 ---------------- */

.listview { margin: var(--s5) 0 var(--s2); }

.lgroup-head { display: flex; align-items: center; gap: 10px; padding: 0 2px 9px; margin-top: var(--s5); }
.lgroup-head:first-child { margin-top: 0; }
.lgroup-head .divider-label { font-size: var(--fs-body); }
.lgroup-head .divider-line { flex: 1 1 auto; height: 1px; background: var(--border-strong); }
.lgroup-head.is-planned .divider-label { color: var(--accent); }
.lgroup-head.is-planned .divider-line {
  background: repeating-linear-gradient(90deg, var(--accent-line) 0 6px, transparent 6px 12px);
}

.lrow {
  margin-bottom: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.lrow:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }

/* 链接只包三列内容；AI 面板作为兄弟节点在下方，点不到跳转 */
.lrow-link {
  display: grid; grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 14px; align-items: start;
  padding: 12px 14px;
  color: inherit; text-decoration: none;
}

.lrow-left { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.lrow-date { font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.lrow-rel { font-size: var(--fs-micro); color: var(--text-3); }

.lrow-main { min-width: 0; }
.lrow-co {
  display: flex; align-items: center; gap: 6px; margin-bottom: 3px;
  font-size: var(--fs-sm); font-weight: 700; color: var(--text);
}
.lrow-co .co-dot { width: 6px; height: 6px; flex: 0 0 6px; }
.lrow-title {
  margin: 0 0 5px; font-size: var(--fs-body); font-weight: 700; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lrow-link:hover .lrow-title { color: var(--accent); }
.lrow-sum {
  margin: 0; font-size: var(--fs-sm); line-height: 1.58; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lrow-sum.is-guidance { font-size: var(--fs-xs); color: var(--text-3); }
.lrow-action {
  margin-top: 5px; font-size: var(--fs-xs); line-height: 1.55; color: #4b2f92;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lrow-action b { font-weight: 800; color: var(--mixed); }

.lrow-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: 0 0 auto; max-width: 180px; }
.lrow-badges { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.lrow-src {
  font-size: var(--fs-micro); color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.lrow-ai { padding: 0 14px 12px 112px; }
.lrow-ai .card-ai { margin: 0; }

/* ---------------- 公司概览 ---------------- */

.companyview {
  display: grid; gap: 14px; margin: var(--s5) 0 var(--s2);
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}

.ccard {
  display: flex; flex-direction: column; gap: 9px;
  padding: 14px 15px; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
  font-family: inherit; color: inherit;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.ccard:hover { border-color: var(--border-strong); box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.ccard.is-core { border-left: 3px solid var(--accent); }

.ccard-head { display: flex; align-items: center; gap: 7px; }
.ccard-head .co-dot { width: 8px; height: 8px; flex: 0 0 8px; }
.ccard-name {
  font-size: var(--fs-title); font-weight: 700; letter-spacing: -.2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ccard-head .badge { margin-left: auto; flex: 0 0 auto; }

.ccard-stats { display: flex; gap: 14px; font-size: var(--fs-xs); color: var(--text-3); }
.ccard-stats b {
  font-size: var(--fs-title); font-weight: 800; color: var(--text);
  font-variant-numeric: tabular-nums; margin-right: 3px;
}
.ccard-stats .is-todo b { color: #b54708; }
.ccard-stats .is-p0 b { color: var(--p0); }

.ccard-bar { display: flex; height: 5px; border-radius: 3px; overflow: hidden; background: var(--surface-3); }
.ccard-bar i { display: block; height: 100%; min-width: 2px; }

.ccard-latest {
  display: flex; gap: 7px; align-items: baseline;
  padding-top: 8px; border-top: 1px solid var(--border);
  font-size: var(--fs-xs); color: var(--text-2);
}
.ccard-latest .ccard-date { flex: 0 0 auto; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ccard-latest .ccard-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
   响应式
   ------------------------------------------------------------
   移动端是重新设计，不是把桌面压窄：
   - 头部压缩，统计变成可横向滑动的筛选条
   - 卡片刊头（公司名）放大，成为第一眼信息
   - 正文与元信息重新排序，不是简单堆叠
   ============================================================ */

@media (max-width: 1180px) {
  .toolbar { position: static; }
  .selects { margin-left: 0; width: 100%; }
  .search-box { max-width: none; }
}

@media (max-width: 820px) {
  .wrap { padding: 0 var(--s4); }
  :root { --gap: 14px; }

  .header-inner { flex-direction: column; align-items: stretch; gap: 9px; padding-top: 10px; padding-bottom: 10px; }

  /* 统计：一行横向滚动，不换行堆成两排 */
  .header-stats {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin: 0 calc(-1 * var(--s4));
    padding: 0 var(--s4);
    scroll-snap-type: x proximity;
  }
  .header-stats::-webkit-scrollbar { display: none; }
  .stat {
    flex: 0 0 auto; min-width: 54px;
    scroll-snap-align: start;
  }
  .stat b { font-size: 14.5px; }

  .toolbar-row { gap: 8px; }
  .search-box { flex: 1 1 100%; max-width: none; }
  .view-tabs { flex: 1 1 auto; margin-left: 0; }
  .vtab { flex: 1 1 0; padding: 0 8px; }
  .filter-toggle { display: inline-flex; align-items: center; margin-left: 0; }

  .toolbar-row.is-filters { display: none; }
  .toolbar-row.is-filters.is-open { display: flex; }
  .chips { width: 100%; }
  .selects select { flex: 1 1 auto; min-width: 0; }

  .card-head { padding: 10px 12px 0 14px; }
  .co-name { font-size: var(--fs-title); }
  .card-link { padding: 8px 12px 0 14px; }
  .card-ai { margin: 9px 12px 0 14px; }
  .card-foot { padding: 8px 12px 10px 14px; }
  .card-title { font-size: 15.5px; }

  .lrow-link { grid-template-columns: 64px minmax(0, 1fr); padding: 11px 12px; }
  .lrow-right { grid-column: 1 / -1; align-items: flex-start; max-width: none; }
  .lrow-badges { justify-content: flex-start; }
  .lrow-ai { padding: 0 12px 11px 12px; }

  .companyview { grid-template-columns: 1fr; gap: 12px; }
  .divider { height: 28px; }
  .divider-sub { display: none; }
}

@media (max-width: 480px) {
  .brand-sub { display: none; }
  .brand-mark { width: 30px; height: 30px; flex: 0 0 30px; font-size: 15px; }
  .brand-title { font-size: 17px; }
  .todo-actions { margin-left: 0; width: 100%; }
  .todo-actions .btn { flex: 1 1 0; }
  .card-title { font-size: 15px; }
  .key-text { font-size: var(--fs-sm); }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .card { animation: none; opacity: 1; transition: none; }
  .sk-line { animation: none; }
  .ccard { transition: none; }
  * { scroll-behavior: auto !important; }
}

/* ============================================================
   监控企业清单面板
   ------------------------------------------------------------
   桌面端是居中对话框，手机端是底部抽屉。
   刻意不用大圆角/毛玻璃/阴影堆叠 —— 与页面其余部分保持同一套语言：
   细边框 + 极轻阴影 + 7~10px 圆角。
   ============================================================ */

.wl-open { margin-left: auto; flex: 0 0 auto; }

.sheet { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 24px; }
.sheet[hidden] { display: none; }
.sheet-mask { position: absolute; inset: 0; background: rgba(16, 24, 40, .44); }

.sheet-panel {
  position: relative; display: flex; flex-direction: column;
  width: 100%; max-width: 560px; max-height: 86vh;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 10px; box-shadow: 0 20px 50px rgba(16, 24, 40, .20);
  animation: sheet-in .16s ease-out;
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.sheet-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 18px 14px; border-bottom: 1px solid var(--border);
}
.sheet-head-text { min-width: 0; flex: 1; }
.sheet-title { margin: 0; font-size: var(--fs-title); font-weight: 700; color: var(--text); letter-spacing: -.2px; }
.sheet-sub { margin: 3px 0 0; font-size: var(--fs-xs); color: var(--text-3); line-height: 1.45; }
.sheet-x {
  flex: 0 0 auto; width: 30px; height: 30px; margin: -2px -4px 0 0;
  border: 1px solid transparent; border-radius: var(--r-md); background: none;
  color: var(--text-3); font-size: 21px; line-height: 1; cursor: pointer;
  font-family: inherit; transition: all .15s;
}
.sheet-x:hover { background: var(--bg); color: var(--text); }

.sheet-body { padding: 16px 18px 20px; overflow-y: auto; }

/* ---- 口令 ---- */
.wl-gate { display: flex; flex-direction: column; gap: 12px; }
.wl-hint { margin: 0; font-size: var(--fs-sm); color: var(--text-3); line-height: 1.6; }

.wl-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.wl-field > label { font-size: var(--fs-xs); font-weight: 600; color: var(--text-2, var(--text-3)); }
.wl-field input, .wl-field select {
  height: 36px; padding: 0 11px; width: 100%;
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--surface); color: var(--text);
  font-size: var(--fs-body); font-family: inherit; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.wl-field input:focus, .wl-field select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31, 94, 255, .12);
}
.wl-row { display: flex; gap: 10px; }
.wl-row > .wl-field { flex: 1 1 0; }

/* ---- 添加区 ---- */
.wl-add { display: flex; flex-direction: column; gap: 12px; }
.wl-more { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg); }
.wl-more > summary {
  padding: 9px 12px; cursor: pointer; list-style: none;
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-2, var(--text-3));
  user-select: none;
}
.wl-more > summary::-webkit-details-marker { display: none; }
.wl-more > summary::before { content: '▸ '; display: inline-block; transition: transform .15s; }
.wl-more[open] > summary::before { transform: rotate(90deg); }
.wl-more-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding: 4px 12px 13px; border-top: 1px solid var(--border);
}
.wl-more-grid .wl-field.is-wide { grid-column: 1 / -1; }

/* ---- 反馈 ---- */
.wl-msg { margin: 0; font-size: var(--fs-sm); line-height: 1.5; border-radius: var(--r-md); padding: 9px 12px; }
.wl-msg.is-err { background: var(--p0-bg); color: var(--p0); border: 1px solid var(--p0-line); }
.wl-msg.is-ok { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); }
.wl-msg[hidden] { display: none; }

/* ---- 列表 ---- */
.wl-list { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 14px; }
.wl-list-head {
  display: flex; align-items: baseline; gap: 6px;
  font-size: var(--fs-sm); color: var(--text-3); margin-bottom: 10px;
}
.wl-list-head b { color: var(--text); font-size: var(--fs-body); }
.wl-items { display: flex; flex-direction: column; }
.wl-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--border);
}
.wl-item:last-child { border-bottom: none; }
.wl-item-main { flex: 1; min-width: 0; }
.wl-item-name { display: block; font-weight: 600; font-size: var(--fs-body); color: var(--text); }
.wl-item-meta { display: block; font-size: var(--fs-xs); color: var(--text-3); margin-top: 2px; }
.wl-del {
  flex: 0 0 auto; height: 28px; padding: 0 11px;
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--surface); color: var(--text-3);
  font-size: var(--fs-xs); font-family: inherit; cursor: pointer; transition: all .15s;
}
.wl-del:hover { border-color: var(--p0-line); background: var(--p0-bg); color: var(--p0); }
.wl-del[disabled] { opacity: .5; cursor: default; }

.wl-loading { padding: 28px 0; text-align: center; color: var(--text-3); font-size: var(--fs-sm); }

@media (max-width: 820px) {
  /* 手机端改成底部抽屉：拇指够得着，也不遮住半屏 */
  .sheet { padding: 0; align-items: flex-end; }
  .sheet-panel { max-width: none; max-height: 92vh; border-radius: 12px 12px 0 0; border-bottom: none; }
  .sheet-body { padding-bottom: 26px; }
  .wl-open { margin-left: 0; }
  .wl-more-grid { grid-template-columns: 1fr; }
}
