/* 持股研判页（/holdings）——暗色终端风格，与观点研判页同一套视觉 token；
   跟随全局主题（html.theme-dark 切换明暗两套变量），样式全部 .hd- 前缀；
   观点流区域复用 mx-views.css 的 .mxv-feed-* 类，仅在 .hd-feed 作用域注入 --mxv-* 变量 */
/* 观点流与聚合卡：mx-views.css 的 .mxv-feed-*/.mxv-stockcard/.mxv-ratio 等类靠 --mxv-*
   变量取色，这里在 .hd-root 作用域注入同一套变量值（明暗两套），不复制其样式规则 */
.hd-root{--mxv-panel:#ffffff;--mxv-card:#f6f8fd;--mxv-soft:#e9eef9;--mxv-soft-line:#ccd6ec;
  --mxv-line:#d9e1f2;--mxv-sep:#e3e9f5;--mxv-rail:#d4dded;--mxv-hover:#eaf0fb;--mxv-btn-line:#b7c6e8;
  --mxv-strong:#17203a;--mxv-text:#2a3550;--mxv-muted:#55648a;--mxv-faint:#8b98b8;
  --mxv-accent:#2e6bff;--mxv-accent-deep:#1f4fd6;
  --mxv-bull:#d8384f;--mxv-bull-deep:#a02538;--mxv-bull-soft:#fcedee;--mxv-bull-line:#f0bcc2;--mxv-bull-text:#c22a40;
  --mxv-bear:#0ca678;--mxv-bear-deep:#0b7d59;--mxv-bear-soft:#e2f6ee;--mxv-bear-line:#9adbc4;--mxv-bear-text:#067a56;
  --mxv-gold:#8a6d1a;--mxv-gold-soft:#faf0d7;
  --hd-bg:#eef1f8;--hd-panel:#ffffff;--hd-card:#f6f8fd;
  --hd-soft:#e9eef9;--hd-soft-line:#ccd6ec;--hd-line:#d9e1f2;--hd-sep:#e3e9f5;
  --hd-hover:#eaf0fb;--hd-btn-line:#b7c6e8;
  --hd-strong:#17203a;--hd-text:#2a3550;--hd-muted:#55648a;--hd-faint:#8b98b8;
  --hd-accent:#2e6bff;--hd-accent-deep:#1f4fd6;
  --hd-bull:#d8384f;--hd-bull-soft:#fcedee;--hd-bull-line:#f0bcc2;--hd-bull-text:#c22a40;
  --hd-bear:#0ca678;--hd-bear-soft:#e2f6ee;--hd-bear-line:#9adbc4;--hd-bear-text:#067a56;
  --hd-topic:#8a6d1a;--hd-topic-soft:#faf0d7;
  background:var(--hd-bg);color:var(--hd-text);min-height:calc(100vh - 120px);
  padding:10px 12px 90px;font-size:13px;position:relative;}
.theme-dark .hd-root{--mxv-panel:#0f1626;--mxv-card:#101a2e;--mxv-soft:#101c33;--mxv-soft-line:#23375f;
  --mxv-line:#1e2a45;--mxv-sep:#16203a;--mxv-rail:#1a2a4d;--mxv-hover:#131d33;--mxv-btn-line:#2a3f6e;
  --mxv-strong:#f2f6ff;--mxv-text:#c9d6f0;--mxv-muted:#8ea3c8;--mxv-faint:#4a5a78;
  --mxv-accent:#5b8cff;--mxv-accent-deep:#2e6bff;
  --mxv-bull:#ff5d6c;--mxv-bull-deep:#c2334a;--mxv-bull-soft:#2a1218;--mxv-bull-line:#5c2330;--mxv-bull-text:#ff8090;
  --mxv-bear:#2ee6a8;--mxv-bear-deep:#177a56;--mxv-bear-soft:#0f241d;--mxv-bear-line:#1d4a38;--mxv-bear-text:#5fe8bd;
  --mxv-gold:#ffd66b;--mxv-gold-soft:#241c0e;
  --hd-bg:#0b0f1a;--hd-panel:#0f1626;--hd-card:#101a2e;
  --hd-soft:#101c33;--hd-soft-line:#23375f;--hd-line:#1e2a45;--hd-sep:#16203a;
  --hd-hover:#131d33;--hd-btn-line:#2a3f6e;
  --hd-strong:#f2f6ff;--hd-text:#c9d6f0;--hd-muted:#8ea3c8;--hd-faint:#4a5a78;
  --hd-accent:#5b8cff;--hd-accent-deep:#2e6bff;
  --hd-bull:#ff5d6c;--hd-bull-soft:#2a1218;--hd-bull-line:#5c2330;--hd-bull-text:#ff8090;
  --hd-bear:#2ee6a8;--hd-bear-soft:#0f241d;--hd-bear-line:#1d4a38;--hd-bear-text:#5fe8bd;
  --hd-topic:#ffd66b;--hd-topic-soft:#241c0e;}
.hd-root *{box-sizing:border-box;}

/* 观点流面板底色沿用总览面板色 */
.hd-feed{background:var(--mxv-panel);}
/* 依据原帖展开：行尾「依据 N/收起」指示随行高亮，展开面板缩进展示 */
.mxv-feed-item.has-ev{cursor:pointer;padding-right:56px;}
.mxv-feed-item.has-ev:hover{background:var(--mxv-hover);}
.mxv-feed-item.has-ev::after{content:"依据 " attr(data-ev);position:absolute;right:8px;top:50%;
  transform:translateY(-50%);font-size:11px;color:var(--mxv-accent);
  border:1px solid var(--mxv-btn-line);border-radius:4px;padding:0 5px;background:var(--mxv-soft);}
.mxv-feed-item.has-ev.open::after{content:"收起 ▴";}
/* 标签快讯行：同一行网格，行尾「全文/收起」指示，点击展开帖文全文 */
.mxv-feed-item.has-post{cursor:pointer;padding-right:56px;}
.mxv-feed-item.has-post:hover{background:var(--mxv-hover);}
.mxv-feed-item.has-post::after{content:"全文";position:absolute;right:8px;top:50%;
  transform:translateY(-50%);font-size:11px;color:var(--mxv-accent);
  border:1px solid var(--mxv-btn-line);border-radius:4px;padding:0 5px;background:var(--mxv-soft);}
.mxv-feed-item.has-post.open::after{content:"收起 ▴";}
.hd-feed .hd-ev{margin:2px 0 6px;display:flex;flex-direction:column;gap:5px;}
.hd-ev-item{background:var(--hd-card);border:1px solid var(--hd-sep);border-radius:6px;padding:6px 9px;}
.hd-ev-meta{color:var(--hd-faint);font-size:11px;margin-bottom:2px;}
.hd-ev-content{color:var(--hd-muted);font-size:12px;line-height:1.5;white-space:pre-wrap;
  overflow-wrap:anywhere;}
.hd-feed-sub{color:var(--mxv-faint);font-weight:400;font-size:12px;margin-left:8px;}
.hd-more-wrap{display:flex;justify-content:center;padding-top:8px;}
.hd-feed-tabs{margin-left:auto;flex:none;}
.hd-feed-tabs .hd-seg-btn{padding:2px 10px;}

/* 顶部面板：关注列表（紧凑） */
.hd-panel{background:var(--hd-panel);border:1px solid var(--hd-line);border-radius:10px;
  padding:8px 12px 10px;margin-bottom:8px;}
.hd-panel-head{display:flex;align-items:center;gap:8px;margin-bottom:6px;flex-wrap:wrap;}
.hd-panel-head b{color:var(--hd-strong);font-size:14px;}
.hd-hint{color:var(--hd-faint);font-size:11px;}
.hd-pills{margin-left:auto;display:flex;gap:6px;align-items:center;}
.hd-pill{background:var(--hd-soft);border:1px solid var(--hd-soft-line);border-radius:6px;
  padding:1px 8px;font-size:11px;color:var(--hd-muted);}
.hd-dot{width:7px;height:7px;border-radius:50%;display:inline-block;margin-right:4px;}
.hd-dot.sse{background:var(--hd-faint);}
.hd-dot.sse.on{background:var(--hd-accent);box-shadow:0 0 6px rgba(91,140,255,.8);}

/* 添加行：共用一个搜索框（个股/板块自动识别）+ 添加按钮紧跟其后，不定宽铺满 */
.hd-add{display:flex;flex-direction:column;gap:5px;margin-bottom:8px;}
.hd-add-fields{display:flex;gap:6px;flex-wrap:wrap;align-items:center;}
.hd-add-name{position:relative;flex:0 1 300px;min-width:0;}
.hd-root input{background:var(--hd-card);border:1px solid var(--hd-line);border-radius:6px;
  color:var(--hd-strong);padding:4px 9px;font-size:13px;min-width:0;}
.hd-root input:focus{outline:none;border-color:var(--hd-accent);}
.hd-add-name input{width:100%;}
.hd-seg{display:inline-flex;border:1px solid var(--hd-btn-line);border-radius:6px;overflow:hidden;}
.hd-seg-btn{background:transparent;border:none;color:var(--hd-muted);padding:4px 12px;
  cursor:pointer;font-size:12px;}
.hd-seg-btn.on{background:var(--hd-accent);color:#fff;}
.hd-sug{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:60;
  background:var(--hd-panel);border:1px solid var(--hd-line);border-radius:8px;
  box-shadow:0 10px 30px rgba(0,0,0,.25);max-height:240px;overflow:auto;}
.hd-sug-item{display:flex;justify-content:space-between;gap:10px;width:100%;text-align:left;
  background:none;border:none;border-bottom:1px solid var(--hd-sep);color:var(--hd-text);
  padding:6px 10px;cursor:pointer;font-size:12px;}
.hd-sug-item:last-child{border-bottom:none;}
.hd-sug-item:hover{background:var(--hd-hover);}
.hd-sug-item b{color:var(--hd-strong);font-weight:600;}
.hd-sug-item span{color:var(--hd-faint);font-variant-numeric:tabular-nums;}
.hd-btn{background:var(--hd-soft);border:1px solid var(--hd-btn-line);color:var(--hd-strong);
  border-radius:6px;padding:4px 10px;cursor:pointer;font-size:12px;white-space:nowrap;}
.hd-btn:hover{border-color:var(--hd-accent);}
.hd-btn.primary{background:var(--hd-accent);border-color:var(--hd-accent-deep);color:#fff;}
.hd-btn.primary:disabled{opacity:.5;cursor:not-allowed;}
.hd-btn.sm{padding:1px 7px;font-size:11px;}
/* 删除按钮：低调灰（不抢视觉），悬停才显露危险色 */
.hd-btn.ghost{background:transparent;border-color:transparent;color:var(--hd-faint);}
.hd-btn.ghost:hover{color:var(--hd-bull-text);border-color:var(--hd-bull-line);background:var(--hd-bull-soft);}

/* 关注列表两栏（左个股/右板块），栏内一行两个 */
.hd-cols{display:grid;grid-template-columns:1fr 1fr;column-gap:22px;position:relative;}
.hd-cols::before{content:"";position:absolute;top:2px;bottom:2px;left:50%;width:1px;background:var(--hd-sep);}
.hd-col{min-width:0;}
.hd-col-head{color:var(--hd-strong);font-size:12px;font-weight:600;margin:2px 0 6px;}
.hd-col-head span{color:var(--hd-faint);font-weight:400;margin-left:4px;}
.hd-grid{display:grid;grid-template-columns:1fr 1fr;gap:5px 8px;}
.hd-item{background:var(--hd-card);border:1px solid var(--hd-sep);border-radius:6px;
  padding:4px 8px;min-width:0;}
.hd-item-main{display:flex;align-items:center;gap:5px;min-width:0;}
.hd-name{color:var(--hd-strong);font-weight:600;font-size:13px;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap;}
.hd-item-ops{margin-left:auto;display:flex;gap:4px;flex:none;}
.hd-badge{display:inline-block;border-radius:4px;padding:0 5px;font-size:10px;line-height:1.7;flex:none;}
.hd-badge.stock{background:var(--hd-bull-soft);color:var(--hd-bull-text);border:1px solid var(--hd-bull-line);}
.hd-badge.topic{background:var(--hd-topic-soft);color:var(--hd-topic);border:1px solid transparent;}
.hd-empty-sm{color:var(--hd-faint);font-size:12px;padding:6px 2px;}

/* 聚合卡区：总览卡网格（同 mx-views「大V观点总览」auto-fill 网格）；
   卡体/占比条/名单行直接用 .mxv-stockcard/.mxv-ratio 类取色，这里只补 button 形态适配 */
.hd-cards-wrap{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:10px;
  margin-bottom:8px;}
.hd-card{display:block;width:100%;text-align:left;font:inherit;color:var(--mxv-text);}
.hd-card.active{border-color:var(--hd-accent);box-shadow:0 0 0 1px var(--hd-accent);}
.hd-card .n b{color:var(--mxv-strong);font-weight:700;}
.hd-card .names{display:block;}

@media (max-width: 760px){
  .hd-root{padding:8px 8px 90px;}
  .hd-cols{grid-template-columns:1fr;column-gap:0;}
  .hd-cols::before{display:none;}
  .hd-col + .hd-col{margin-top:10px;}
}
