/* 首页新增模块与题材详情 Tab 的样式（沿用 pipeline.css 深色金色变量） */
.header-right .g-search { margin-right: 6px; }
.header-right .xj-btn { margin-right: 10px; }
.masthead nav button { white-space: nowrap; }
body.in-view .home-row, body.in-view .hot-themes, body.in-view .scope-line { display: none !important; }

/* 自选入口卡 + 小金点评 */
.home-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 14px 26px 0; }
.home-row:has(.ai-comment:not([hidden])) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.watch-entry, .ai-comment { border: 1px solid var(--line); background: linear-gradient(120deg, #15120a, var(--panel) 55%); padding: 14px 18px; display: grid; gap: 10px; align-content: start; }
.we-head { display: flex; align-items: baseline; gap: 10px; }
.we-head b { font-size: 16px; font-weight: 600; }
.we-head small { margin-left: auto; }
.we-go { margin-left: auto; border-color: #5a4a2a; color: var(--gold); padding: 4px 12px; font-size: 12px; }
.we-tip { color: var(--muted); font-size: 13px; line-height: 1.7; }
.watch-entry .vw-primary { justify-self: start; }
.we-kpis { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 12px; color: var(--muted); align-items: baseline; }
.we-kpis b { font: 600 22px/1.2 "SFMono-Regular", Consolas, monospace; color: var(--text); margin: 0 4px; }
.we-kpis b.we-gold { color: var(--gold); }
.we-lv { font-size: 12px; color: var(--muted); display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.we-list, .ac-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.we-list button { display: flex; gap: 8px; align-items: center; width: 100%; border: 0; border-radius: 0; padding: 6px 0; text-align: left; border-top: 1px solid #ffffff0d; }
.we-list b { font-weight: 400; font-size: 13px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.we-list small { flex: none; }
.ac-list li { font-size: 13px; line-height: 1.75; padding-left: 14px; position: relative; color: #d4d2cb; }
.ac-list li::before { content: ''; position: absolute; left: 0; top: .75em; width: 6px; height: 6px; background: var(--gold); border-radius: 50%; }
.ai-comment .xj-btn { justify-self: start; }

/* 热门题材卡 */
.hot-themes { padding: 16px 26px 14px; }
.ht-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ht-head h2 { font-size: 17px; font-weight: 600; margin-top: 3px; }
.ht-head h2 small { font-weight: 400; margin-left: 8px; }
.ht-all { font-size: 12px; }
.ht-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ht-card { border: 1px solid var(--line); background: var(--panel); padding: 10px 12px; display: grid; gap: 7px; cursor: pointer; text-align: left; }
.ht-card:hover, .ht-card:focus-visible { border-color: #6b5629; outline: none; }
.ht-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ht-top b { font-size: 14px; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-rank { font: 600 12px monospace; color: var(--gold); width: 18px; }
.ht-top .sub-star { padding: 0 4px; border: 0; color: var(--gold); font-size: 15px; }
.ht-nums { display: flex; gap: 14px; font-size: 11px; color: var(--muted); }
.ht-nums b { display: block; font: 600 15px/1.3 "SFMono-Regular", Consolas, monospace; color: var(--text); }
.ht-nums b.ht-imp { color: var(--gold); }
.ht-card .nl-bar { display: flex; height: 5px; }
.ht-mood { font-size: 10px; } .ht-mood i { font-style: normal; }
@media (max-width: 1200px) { .ht-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .home-row { padding: 12px 14px 0; grid-template-columns: minmax(0, 1fr) !important; }
  .hot-themes { padding: 14px 14px 10px; }
  .ht-head h2 small { display: block; margin: 2px 0 0; }
  .ht-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .ht-card { flex: 0 0 62%; scroll-snap-align: start; }
  .header-right .xj-btn { margin-right: 4px; padding: 4px 8px; }
  .header-right #connection, .header-right .live-dot { display: none; }
}

/* 重要资讯情绪 chip */
.key-chips { display: flex; gap: 6px; padding: 6px 14px 4px; flex-wrap: wrap; }
.key-chips button { font-size: 11px; padding: 2px 9px; border-radius: 10px; color: var(--muted); }
.key-chips button b { font-weight: 500; margin-left: 2px; }
.key-chips button.on { color: var(--gold); border-color: #6b5629; background: #1a150b; }
#key-feed[data-sent="看涨"] .key-row:not([data-sent="看涨"]), #key-feed[data-sent="中性"] .key-row:not([data-sent="中性"]), #key-feed[data-sent="看跌"] .key-row:not([data-sent="看跌"]),
#key-subs[data-sent="看涨"] .key-row:not([data-sent="看涨"]), #key-subs[data-sent="中性"] .key-row:not([data-sent="中性"]), #key-subs[data-sent="看跌"] .key-row:not([data-sent="看跌"]) { display: none; }

/* 折叠：处理步骤收为窄条，星图收起只保留标题与内容分类 */
.fold-btn { font-size: 11px; padding: 3px 9px; color: var(--muted); white-space: nowrap; }
.fold-engine-btn { position: absolute; top: 6px; right: 6px; z-index: 3; padding: 0 7px; font-size: 14px; line-height: 20px; }
.pipeline.fold-engine { grid-template-columns: minmax(300px, 31%) 44px minmax(0, 1fr) !important; }
.pipeline.fold-engine .engine-panel { margin: 0 8px; padding: 30px 0 10px; }
.pipeline.fold-engine .engine-panel > *:not(.fold-engine-btn):not(.engine-logo) { display: none; }
.pipeline.fold-engine .engine-logo { writing-mode: vertical-rl; font-size: 13px; letter-spacing: 4px; margin-top: 8px; }
.pipeline.fold-engine .engine-logo span { display: none; }
.pipeline.fold-engine .fold-engine-btn { position: static; margin: 0 auto; }
.pipeline.fold-cloud .graph-field { display: none; }
.pipeline.fold-cloud { height: auto !important; min-height: 0 !important; }
.pipeline.fold-cloud .raw-panel { height: 640px; }
@media (max-width: 900px) {
  .pipeline.fold-engine { grid-template-columns: 1fr 40px !important; }
  .pipeline.fold-cloud .raw-panel { height: 420px; }
}

/* 题材详情 */
.th-top { display: flex; justify-content: flex-end; gap: 8px; margin: -4px 0 10px; }
.th-kpis6 { grid-template-columns: repeat(3, auto) !important; }
.th-kpis b.th-gold { color: var(--gold); }
.th-cap { display: block; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
#th-pane-news .jx-bar { padding: 4px 0 2px; }
.tm-table { border-top: 1px solid var(--line); }
.tm-row { display: grid; grid-template-columns: minmax(120px, 1.4fr) 70px 78px 70px 70px minmax(110px, 1fr) 96px; gap: 8px; align-items: center; padding: 8px 2px; border-bottom: 1px solid #ffffff0d; font-size: 13px; }
.tm-head { color: var(--muted); font-size: 11px; position: sticky; top: -1px; background: var(--panel); z-index: 1; }
.tm-name b { display: block; font-weight: 500; } .tm-name small { font-size: 11px; }
.tm-name:hover b { color: var(--gold); }
.tm-num { text-align: right; font-family: "SFMono-Regular", Consolas, monospace; }
.tm-imp { color: var(--gold); font-weight: 600; }
.tm-mood { display: grid; gap: 3px; } .tm-mood .nl-bar { display: flex; height: 5px; background: #ffffff10; }
.tm-why { font-size: 11px; padding: 3px 6px; color: var(--muted); }
.tm-why-box { grid-column: 1 / -1; background: #ffffff06; border-left: 2px solid var(--gold); padding: 8px 12px; }
.tm-rel { font-size: 13px; line-height: 1.75; margin: 0 0 6px; }
.tm-rel span, .tm-ev > span { display: block; font-size: 11px; color: var(--gold); margin-bottom: 2px; }
.tm-rel.old { color: var(--muted); } .tm-rel.old span { color: var(--muted); }
@media (max-width: 900px) {
  .tm-row { grid-template-columns: minmax(0, 1fr) 70px 64px; }
  .tm-row > :nth-child(4), .tm-row > :nth-child(5), .tm-row > :nth-child(6) { display: none; }
  .tm-why { grid-column: 1 / -1; justify-self: start; }
  .th-kpis6 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
dialog .jx-row { color: var(--text); }
.we-list li { min-width: 0; } .we-list button { min-width: 0; overflow: hidden; } .watch-entry { min-width: 0; overflow: hidden; }

/* 补充需求：首页资讯内容分类移到资讯库 / 自选大事筛选；处理口径；题材卡关注重点 */
.tax-panel { display: none !important; }
.scope-line .scope-mid { flex: 1; text-align: center; }
.scope-rule { font-size: 10px; margin-left: 4px; }
.funnel .f-important strong { color: var(--gold); }
.ht-focus { font-size: 12px; color: #c8c6bf; line-height: 1.5; margin: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 36px; }
.ht-focus i { font-style: normal; font-size: 10px; color: var(--gold); border: 1px solid #5a4a2a; padding: 0 4px; margin-right: 5px; border-radius: 2px; }
.key-full { font-size: 11px; margin-left: auto; white-space: nowrap; }
.we-head small { margin-left: 4px; }
@media (max-width: 900px) {
  .we-head { flex-wrap: wrap; row-gap: 2px; }
  .we-head .eyebrow { display: none; }
  .we-head b { white-space: nowrap; }
  .we-head small { order: 3; flex-basis: 100%; margin-left: 0 !important; }
  .we-head .we-go { margin-left: auto; }
  .we-kpis { gap: 4px 14px; }
  .scope-line .scope-mid { text-align: left; }
}
.th-top { align-items: center; }
.th-upd { margin-right: auto; color: var(--muted); }
.th-notify.on { color: #15120a; background: var(--gold); border-color: #6b5629; }
/* 手机：题材详情为完整页面，不用弹层（补充需求第 8 节）；关闭后首页回到原浏览位置 */
@media (max-width: 900px) {
  dialog#detail { width: 100vw; max-width: 100vw; height: var(--vh, 100vh); max-height: var(--vh, 100vh); margin: 0; border: 0; border-radius: 0; inset: 0; }
  dialog#detail .dialog-heading { padding: 12px 14px; }
  dialog#detail #close-detail::before { content: '‹ 返回'; font-size: 14px; margin-right: 4px; }
  dialog#detail #close-detail { font-size: 0; }
  dialog#detail #close-detail::before { font-size: 14px; }
  .th-top { flex-wrap: wrap; }
  .th-upd { flex-basis: 100%; }
}
