/* ============================================================
   情报中枢 · 头部导航条（2026-11-01）
   一条粘在顶上的栏：左边项目图标 + 名字，右边按钮，下面一排栏目。
   栏目导航由 head-nav.js 从页面里挪进来，这里只管样式。
   ============================================================ */
:root{ --ph-hp:32px; --ph-head-h:84px; }
@media (max-width:1000px){ :root{ --ph-hp:22px } }
@media (max-width:650px){ :root{ --ph-hp:16px } }

/* 锚点跳转别被栏盖住（高度由 head-nav.js 写进 --ph-head-h） */
html{ scroll-padding-top:calc(var(--ph-head-h, 84px) + 6px) }

/* ---------- 栏体 ---------- */
body .shell > .page-head{
  position:sticky !important; top:0; z-index:30;
  display:flex !important; flex-wrap:wrap !important; align-items:center !important;
  column-gap:12px; row-gap:0;
  min-height:0 !important;
  margin:0 calc(var(--ph-hp) * -1) 14px !important;
  padding:7px var(--ph-hp) 0 !important;
  background:color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter:saturate(180%) blur(14px);
  backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid var(--line);
}
body .shell > .page-head.is-stuck{
  box-shadow:0 8px 22px color-mix(in srgb, var(--text) 7%, transparent);
}

/* ---------- 左：图标 + 名字 ---------- */
body .shell > .page-head > .ph-ident{
  display:flex; align-items:center; gap:9px; min-width:0;
}
body .shell > .page-head .ph-mark{
  width:26px; height:26px; flex:none; border-radius:8px;
  background:url("/assets/logos/atlas.png") center/cover no-repeat;
  box-shadow:0 0 0 1px color-mix(in srgb, var(--line) 85%, transparent);
}
body .shell > .page-head .title-line{ display:flex; align-items:center; gap:8px; min-width:0 }
body .shell > .page-head h1{
  font-size:19px !important; font-weight:700; letter-spacing:-.2px;
  margin:0 !important; line-height:1.3; white-space:nowrap;
}
body .shell > .page-head .tag{ font-size:10px; padding:1px 6px }

/* ---------- 右：动作按钮 ---------- */
body .shell > .page-head > .actions{
  margin-left:auto; display:flex; align-items:center; gap:6px; flex-wrap:wrap;
  padding-bottom:7px;
}
body .shell > .page-head > .actions button{ min-height:30px; padding:4px 10px; font-size:12px }
body .shell > .page-head > .actions > span{ font-size:11px; margin-right:2px }

/* ---------- 下：栏目导航 ---------- */
body .shell > .page-head > .section-nav{
  flex:0 0 100%; order:3;
  display:flex; align-items:stretch; gap:2px;
  margin:0 !important; padding:0 !important;
  min-height:0; border:0;
  overflow-x:auto; overflow-y:hidden; scrollbar-width:none;
}
body .shell > .page-head > .section-nav::-webkit-scrollbar{ display:none }
body .shell > .page-head > .section-nav a{
  flex:none; display:inline-flex; align-items:center;
  font-size:13.5px !important; font-weight:500; line-height:20px !important;
  padding:8px 10px 9px !important; margin:0 !important;
  color:var(--muted) !important; text-decoration:none;
  background:transparent; border:0 !important;
  border-bottom:2px solid transparent !important;
  border-radius:8px 8px 0 0;
  box-shadow:none !important; white-space:nowrap;
  transition:color .15s ease, background-color .15s ease, border-color .15s ease;
}
body .shell > .page-head > .section-nav a:hover{
  color:var(--text) !important;
  background:color-mix(in srgb, var(--text) 6%, transparent);
}
body .shell > .page-head > .section-nav a.active,
body .shell > .page-head > .section-nav a.is-current,
body .shell > .page-head > .section-nav a[aria-current]{
  color:var(--text) !important; font-weight:650;
  border-bottom-color:var(--accent) !important;
  background:transparent;
}

/* 视频情报整页阅读时，栏和导航照样在顶上 */
body.video-reading .shell > .page-head{ position:sticky !important }

/* ---------- 窄屏 ---------- */
@media (max-width:1000px){
  body .shell > .page-head{ column-gap:8px }
  body .shell > .page-head h1{ font-size:18px !important }
  body .shell > .page-head > .section-nav a{ font-size:13px !important; padding:7px 9px 8px !important }
}
@media (max-width:650px){
  body .shell > .page-head{
    flex-wrap:wrap !important; flex-direction:row !important;
    margin-bottom:10px !important; padding-top:6px !important;
  }
  body .shell > .page-head > .ph-ident{ flex:1 1 auto }
  body .shell > .page-head h1{ font-size:20px !important }
  body .shell > .page-head .ph-mark{ width:22px; height:22px; border-radius:7px }
  body .shell > .page-head > .actions{
    width:auto !important; flex-wrap:nowrap !important; padding-bottom:6px;
  }
  body .shell > .page-head > .actions button{ font-size:11px; min-height:28px; padding:3px 7px }
  body .shell > .page-head > .section-nav{ gap:0; margin:0 !important }
  body .shell > .page-head > .section-nav a{ font-size:12.5px !important; padding:7px 8px 8px !important }
}

/* ---------- 2026-11-02：页头对齐内容、连接 + 统计同一行 ----------
   外层项目栏已有名称/类型，嵌入模式隐藏页内项目名块；
   本机已连接、5 项统计、操作按钮排在同一行；页头与卡片同宽、纯底色，不再像浮框。 */
body .shell > .page-head{
  margin:0 0 14px !important;
  padding:7px 0 0 !important;
  background:var(--bg) !important;
  -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
}
body .shell > .page-head.is-stuck{ box-shadow:none !important }
body.embedded .shell > .page-head > .ph-ident{ display:none !important }
body.embedded .shell > .page-head > .actions{ margin-left:0 !important; flex:1 1 auto !important; flex-wrap:wrap !important; row-gap:4px }
body .shell > .page-head > .actions > #head-stats{
  display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 14px;
  margin:0 4px 0 12px; padding:0 0 0 12px; flex:0 0 auto;
  border-left:1px solid var(--line);
}
body .shell > .page-head > .actions > #head-stats > div{
  display:inline-flex; align-items:baseline; gap:4px; line-height:1.2; min-width:0;
}
body .shell > .page-head > .actions > #head-stats b{
  font-size:13px; font-weight:650; color:var(--accent);
  font-variant-numeric:tabular-nums; white-space:nowrap;
}
body .shell > .page-head > .actions > #head-stats span{
  font-size:10px; color:var(--muted); white-space:nowrap;
}
body.embedded .shell > .page-head > .actions > #quick-find{ margin-left:auto }
@media (max-width:650px){
  body .shell > .page-head > .actions > #head-stats{ gap:3px 10px; margin-left:6px }
  body .shell > .page-head > .actions > #head-stats b{ font-size:12px }
  body .shell > .page-head > .actions > #head-stats span{ font-size:9px }
}

/* ---------- 2026-11-02：详情与关键词改成中间大弹窗 ---------- */
body #drawer{
  inset:0 !important; margin:auto !important;
  width:min(920px,92vw) !important; height:auto !important; max-height:88dvh !important;
  border-radius:18px !important; overflow:auto !important;
  box-shadow:0 24px 80px rgba(0,0,0,.28) !important;
}
body #drawer .drawer-head{
  position:sticky; top:0; z-index:3;
  background:var(--panel); border-bottom:1px solid var(--line);
}
body #drawer .drawer-head span{ font-weight:600 }

/* 关键词弹窗顶部：「今天采集到 N 条」 */
.kw-live{margin:0 0 18px;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:var(--panel2)}
.kw-live-head{display:flex;align-items:baseline;gap:8px;font-size:11px;color:var(--muted);margin-bottom:6px}
.kw-live-head b{font-size:18px;color:var(--accent);font-variant-numeric:tabular-nums}
.kw-live-list{display:flex;flex-direction:column}
.kw-live-row{display:flex;align-items:baseline;gap:10px;width:100%;padding:7px 0;border:0;border-top:1px solid var(--line);background:none !important;text-align:left;color:var(--text);cursor:pointer;min-height:0}
.kw-live-row:first-child{border-top:0}
.kw-live-row b{flex:1;min-width:0;font-size:13px;font-weight:600;line-height:1.45}
.kw-live-row small{font-size:10px;color:var(--muted);white-space:nowrap}
.kw-live-row:hover b{color:var(--accent)}
.kw-live-empty{margin:4px 0 0;font-size:12px;color:var(--muted)}

/* 2026-11-02：视频线索在当前窗口播放 */
.inline-player{display:flex;justify-content:center;background:#000;border-radius:14px;overflow:hidden}
.inline-player iframe{width:100%;aspect-ratio:16/9;max-height:66vh;border:0;display:block;background:#000}
.inline-player-meta{display:flex;flex-direction:column;gap:4px;margin-top:10px;font-size:11px;color:var(--muted)}
.inline-player-meta strong{font-size:14px;color:var(--text);line-height:1.45}
.inline-player-meta a{color:var(--accent);font-size:11px;width:fit-content}

/* 2026-11-02：详情里的「读全文」 */
.read-full{margin:20px 0 0;padding-top:14px;border-top:1px solid var(--line)}
.read-full-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.read-full-btn{padding:7px 14px;border:1px solid var(--line);border-radius:9px;background:var(--panel);color:var(--text);font-size:12.5px;font-weight:600;cursor:pointer}
.read-full-btn:hover{border-color:var(--accent);color:var(--accent)}
.read-full-src{font-size:10px;color:var(--muted)}
.read-full-body{margin-top:10px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--panel2);max-height:48vh;overflow:auto}
.read-full-meta{font-size:10px;color:var(--muted);margin-bottom:8px}
.read-full-text{margin:0;white-space:pre-wrap;word-break:break-word;font-size:12.5px;line-height:1.75;font-family:inherit;color:var(--text)}
.read-full-err{margin:0;font-size:12px;color:var(--bad)}
