/* ================= 持仓同形训练（static/js/holdings.js） =================
   同全站：纸底、墨线、宋体标题、直角、墨金强调；红涨绿跌。 */
.hd-wrap { max-width: 1120px; margin: 0 auto; padding: 28px 0 56px; }
.hd-wrap.wide { max-width: none; padding-top: 8px; }
.hd-hero { padding: 18px 0 26px; border-bottom: 2px solid var(--rule); }
.hd-k, .hr-k, .hold-rx .k, .hold-rx-cta .k { font-size: 11px; letter-spacing: 0.2em; color: var(--gold); font-weight: 700; }
.hd-hero h1 { margin-top: 10px; font-family: var(--serif); font-weight: 900; font-size: 38px; line-height: 1.25; letter-spacing: 0.01em; }
.hd-hero h1 em { font-style: normal; color: var(--up); }
.hd-lede { margin-top: 14px; max-width: 46em; color: var(--text-2); font-size: 15px; line-height: 1.85; text-wrap: pretty; }
.hd-lede b { color: var(--text); }
.hd-legal, .hr-legal { margin-top: 26px; font-size: 12px; color: var(--text-3); line-height: 1.8; max-width: 60em; }

.hd-sec { margin-top: 34px; }
.hd-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid var(--rule); padding-bottom: 8px; margin-bottom: 0; }
.hd-sec-head h2 { font-family: var(--serif); font-weight: 900; font-size: 20px; }
.hd-sec-head h2 small { font-family: var(--sans); font-weight: 500; font-size: 13px; color: var(--text-3); margin-left: 6px; }
.hd-quota { font-size: 12px; color: var(--text-2); }
.hd-quota a { color: var(--gold); font-weight: 700; }
.hd-card { border: 1px solid var(--line-2); background: var(--paper); padding: 22px 24px; }
.hd-sec > .hd-card { border-top: 0; }
.hd-h3 { font-family: var(--serif); font-weight: 900; font-size: 17px; margin-bottom: 10px; }
.hd-empty { padding: 34px 0; color: var(--text-3); text-align: center; font-size: 14px; grid-column: 1 / -1; }
.hd-empty.sm { padding: 10px 0; text-align: left; }

/* 同意 */
.hd-consent { margin-top: 30px; max-width: 760px; }
.hd-consent h2 { font-family: var(--serif); font-weight: 900; font-size: 22px; margin-bottom: 14px; }
.hd-list { padding-left: 1.3em; display: grid; gap: 10px; color: var(--text-2); font-size: 14px; line-height: 1.75; }
.hd-list b { color: var(--text); }
.hd-check { display: flex; gap: 10px; align-items: center; margin: 22px 0 16px; font-size: 14px; cursor: pointer; }
.hd-check input { width: 16px; height: 16px; accent-color: var(--rule); }

/* 持仓卡 */
.hd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); border-left: 1px solid var(--line); }
.hc { position: relative; padding: 18px 20px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px; background: var(--paper); }
.hc-top { display: flex; justify-content: space-between; align-items: flex-start; }
.hc-name { font-family: var(--serif); font-weight: 900; font-size: 20px; line-height: 1.2; }
.hc-code { font-size: 12px; color: var(--text-3); letter-spacing: 0.08em; margin-top: 2px; }
.hc-trade { font-size: 12px; color: var(--text-2); letter-spacing: 0.04em; text-decoration: none; border-bottom: 1px solid var(--line-2); }
.hc-trade:hover { color: var(--text); border-color: var(--rule); }
.hc-pos { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 0; }
.hc-pos span { font-size: 15px; font-weight: 600; display: flex; flex-direction: column; }
.hc-pos i, .hd-pos-box i, .hr-row i { font-style: normal; font-size: 11px; color: var(--text-3); font-weight: 500; letter-spacing: 0.06em; }
.up { color: var(--up); } .down { color: var(--down); }
.hc-pat { display: flex; gap: 14px; align-items: center; }
.hc-spark { display: flex; flex-direction: column; gap: 2px; }
.hc-spark span { font-size: 10px; color: var(--text-4); letter-spacing: 0.04em; }
.hd-spark { display: block; }
.hc-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.hc-sum { font-size: 13px; color: var(--text-2); line-height: 1.7; }
.hc-cue { font-size: 13px; line-height: 1.7; background: var(--gold-soft); padding: 8px 10px; color: var(--text-2); }
.hc-cue b { color: var(--gold); margin-right: 4px; }
.hc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 4px; }
.hc-n { font-size: 12px; color: var(--text-3); }
.hc-done { font-size: 12px; color: var(--text-3); }
.hc-err { font-size: 13px; color: var(--text-3); }
.hc-del { position: absolute; right: 18px; bottom: -1px; opacity: 0; transition: opacity 0.2s; transform: translateY(100%); }
.hc:hover .hc-del { opacity: 1; }

/* 录入 */
.hd-tabs { display: flex; border-left: 1px solid var(--line-2); }
.hd-tabs button { padding: 11px 22px; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; color: var(--text-3);
  border: 1px solid var(--line-2); border-left: 0; border-bottom: 0; background: var(--paper-2); }
.hd-tabs button.on { background: var(--paper); color: var(--text); box-shadow: inset 0 2px 0 var(--rule); }
.hd-tabs button:disabled { opacity: 0.4; cursor: not-allowed; }
.shot-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 26px; }
.shot-guide h3 { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; margin: 0 0 8px; }
.shot-guide h3 + * { margin-bottom: 16px; }
.need { list-style: none; padding: 0; display: grid; gap: 6px; }
.need li { font-size: 14px; display: flex; gap: 10px; align-items: baseline; }
.need li::before { content: "■"; color: var(--gold); font-size: 9px; }
.need li.opt { color: var(--text-2); }
.need li.opt::before { color: var(--text-4); }
.need span { font-size: 12px; color: var(--text-3); }
.skip { font-size: 13px; color: var(--text-3); line-height: 1.7; }
.shot-demo { border: 1px solid var(--line-2); font-size: 12px; background: var(--paper-2); }
.shot-demo .row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; padding: 7px 12px; border-bottom: 1px solid var(--line); }
.shot-demo .row.h { color: var(--text-3); font-size: 11px; }
.shot-demo .row span { display: flex; flex-direction: column; }
.shot-demo i { font-style: normal; color: var(--text-4); font-size: 11px; }
.shot-demo .mark { outline: 1.5px solid var(--gold-2); outline-offset: 1px; width: fit-content; padding: 0 2px; }
.shot-demo .cap { padding: 6px 12px; font-size: 11px; color: var(--gold); }
.shot-drop { border: 1.5px dashed var(--line-2); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 30px 20px; text-align: center; cursor: pointer; min-height: 260px; transition: border-color 0.2s, background 0.2s; }
.shot-drop:hover, .shot-drop.over { border-color: var(--rule); background: var(--paper-2); }
.shot-drop.busy { pointer-events: none; }
.shot-drop.busy span { visibility: hidden; }
.shot-bar { display: block; width: 70%; max-width: 320px; height: 3px; background: var(--line-2); margin-top: 10px; overflow: hidden; }
.shot-bar em { display: block; height: 100%; width: 0; background: var(--gold, var(--rule)); transition: width .5s linear; }
.shot-drop.busy .shot-ico { animation: hd-spin 1.2s linear infinite; }
@keyframes hd-spin { to { transform: rotate(360deg); } }
.shot-ico { width: 48px; height: 48px; border: 1px solid var(--rule); display: grid; place-items: center; font-size: 22px; }
.shot-drop b { font-size: 15px; }
.shot-drop span { font-size: 12px; color: var(--text-3); max-width: 22em; }
.hd-table-wrap { margin-top: 22px; }
.hd-tip { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.hd-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hd-table th { font-size: 11px; color: var(--text-3); font-weight: 600; letter-spacing: 0.08em; text-align: left;
  border-bottom: 1px solid var(--rule); padding: 6px 6px; }
.hd-table td { border-bottom: 1px solid var(--line); padding: 4px 6px; }
.hd-table .r { text-align: right; }
.hd-table .muted { color: var(--text-3); }
.hd-table input { width: 100%; border: 1px solid transparent; background: transparent; padding: 7px 6px; font: inherit; color: var(--text); }
.hd-table input:hover { border-color: var(--line-2); }
.hd-table input:focus { outline: none; border-color: var(--rule); background: var(--paper); }
.hd-table input.r { text-align: right; }
.hd-table input.warn { background: #fbf3d9; border-color: var(--gold-2); }
.hd-table tr.iss td { font-size: 12px; color: var(--gold); border-bottom: 1px solid var(--line); padding: 2px 6px 8px; }
.hd-table-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.hd-wipe { margin-top: 34px; text-align: right; }

/* 操盘页 */
.hd-trade-head .hd-back { font-size: 12px; color: var(--text-3); text-decoration: none; margin-right: 12px; letter-spacing: 0.06em; }
.hd-trade-head .n { font-family: var(--serif); font-size: 26px; margin-right: 10px; }
.hd-pos-box { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); }
.hd-pos-box div { padding: 10px 12px; display: flex; flex-direction: column; border-bottom: 1px solid var(--line); }
.hd-pos-box div:nth-child(odd) { border-right: 1px solid var(--line); }
.hd-pos-box div:nth-last-child(-n+2) { border-bottom: 0; }
.hd-pos-box b { font-size: 18px; }
.hd-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 4px; }
.hd-form-row label { display: flex; flex-direction: column; font-size: 11px; color: var(--text-3); letter-spacing: 0.06em; gap: 3px; }
.hd-form-row label:last-child { grid-column: 1 / -1; }
.hd-form-row input, .panel-form textarea { border: 1px solid var(--line-2); background: var(--paper); padding: 8px 9px; font: inherit;
  font-size: 15px; color: var(--text); width: 100%; }
.panel-form textarea { font-size: 13px; resize: vertical; }
.hd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hd-chip { border: 1px solid var(--line-2); padding: 6px 10px; font-size: 13px; color: var(--text-2); background: var(--paper); }
.hd-chip:hover { border-color: var(--rule); color: var(--text); }
.hd-chip.on { background: var(--rule); color: var(--paper); border-color: var(--rule); }
.hd-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.hd-two > .hd-card + .hd-card { border-left: 0; }
.hd-log { list-style: none; padding: 0; }
.hd-log li { display: grid; grid-template-columns: 26px 92px 1fr; gap: 4px 10px; align-items: baseline; padding: 9px 0;
  border-bottom: 1px solid var(--line); font-size: 13px; }
.hd-log .why { grid-column: 2 / -1; color: var(--text-3); font-size: 12px; }
.hd-log .why i { font-style: normal; }
.hd-log .side { width: 22px; height: 22px; display: grid; place-items: center; color: var(--paper); font-size: 12px; font-weight: 700; }
.hd-log .side.buy { background: var(--up); } .hd-log .side.sell { background: var(--down); }

/* 首页卡片 */
.hold-rx:empty { display: none; }
.hold-rx { margin-top: 0; border: 1px solid var(--rule); border-top: 0; }
.hold-rx-cta { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; align-items: center; padding: 16px 24px;
  text-decoration: none; color: var(--text); background: repeating-linear-gradient(135deg, var(--paper) 0 12px, var(--paper-2) 12px 24px); }
.hold-rx-cta b { font-family: var(--serif); font-weight: 900; font-size: 18px; grid-column: 1; }
.hold-rx-cta .go { grid-column: 2; grid-row: 1 / 3; font-size: 13px; font-weight: 700; color: var(--gold); white-space: nowrap; }
.hold-rx-cta:hover b { text-decoration: underline; text-underline-offset: 4px; }
.hold-rx-in { padding: 14px 24px 16px; display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; }
.hold-rx-in ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 0; }
.hold-rx-in li { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.hold-rx-in li b { font-family: var(--serif); font-size: 15px; }
.hold-rx-in li .n { color: var(--text-3); font-size: 12px; }
.hold-rx-in .go { font-size: 13px; font-weight: 700; color: var(--gold); text-decoration: none; white-space: nowrap; }

/* 结算复盘 */
.hold-review { padding: 22px 24px; border: 1px solid var(--rule); }
.hold-review h3 { font-family: var(--serif); font-weight: 900; font-size: 19px; line-height: 1.5; margin-top: 6px; }
.hold-review h3 b { color: var(--gold); }
.hr-row { display: flex; flex-wrap: wrap; margin-top: 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hr-row div { padding: 10px 18px 10px 0; margin-right: 18px; display: flex; flex-direction: column; }
.hr-row b { font-size: 20px; }
.hr-strip { width: 100%; height: auto; margin-top: 14px; display: block; overflow: visible; }
.hr-read { margin-top: 12px; font-size: 14px; line-height: 1.8; color: var(--text-2); }

/* 盘面矩阵：持仓 / 自选 切换 */
.mx-src { display: flex; gap: 12px; align-items: center; margin: 0 0 12px; flex-wrap: wrap; }
.seg-lite { display: inline-flex; border: 1px solid var(--line-2); }
.seg-lite button { padding: 6px 14px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--text-3); }
.seg-lite button.on { background: var(--rule); color: var(--paper); }
.mx-src-tip { font-size: 12px; color: var(--gold); font-weight: 700; text-decoration: none; }
.hd-cell-meta { position: absolute; left: 10px; bottom: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.hd-cell-meta i { font-style: normal; font-size: 10px; padding: 1px 5px; border: 1px solid currentColor; opacity: 0.8; }
.hd-cell-meta i.go { background: rgba(17, 17, 16, 0.82); color: #fbfaf7; border-color: transparent; opacity: 1; }

@media (max-width: 760px) {
  .hd-hero h1 { font-size: 28px; }
  .hd-grid { grid-template-columns: 1fr; }
  .shot-grid, .hd-two { grid-template-columns: 1fr; }
  .hd-two > .hd-card + .hd-card { border-left: 1px solid var(--line-2); border-top: 0; }
  .hc-del { opacity: 1; position: static; transform: none; align-self: flex-end; }
  .hold-rx-cta { grid-template-columns: 1fr; }
  .hold-rx-cta .go { grid-column: 1; grid-row: auto; }
  .hold-rx-in { grid-template-columns: 1fr; }
  .hd-table th:nth-child(1), .hd-table td:nth-child(1) { display: none; }
}
.hd-table input::placeholder { color: var(--text-4); }
