/* 個股頁「六燈號健診」（ETF 四燈號，精簡版）：紅＝佳、黃＝中、綠＝弱（台股紅漲綠跌習慣）；點燈號旁的箭頭展開計分項目 */
.sp-page > #sp_health { order: -1; margin-bottom: 18px; }
.sp-hc { --good: #f0443a; --mid: #f5c542; --bad: #16b36b; --na: #5f6778; padding-top: 14px !important; padding-bottom: 14px !important; }
.sp-hc .up { color: var(--up); font-style: normal; } .sp-hc .dn { color: var(--dn); font-style: normal; }
.sp-hc .good { --c: var(--good); } .sp-hc .mid { --c: var(--mid); } .sp-hc .bad { --c: var(--bad); } .sp-hc .na { --c: var(--na); }
.sp-hc-top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 10px; }
.sp-hc-top h3 { margin: 0; font-size: 17px; color: var(--text); }
.sp-hc-tot { font-size: 14px; color: #b7bdc8; }
.sp-hc-tot b { font-size: 17px; color: var(--c); font-variant-numeric: tabular-nums; margin: 0 3px; }
.sp-hc-tot em { font-style: normal; color: var(--c); font-weight: 700; }
.sp-hc-top small { margin-left: auto; font-size: 12px; color: var(--mute); }
.sp-hc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sp-hc-grid.n6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1100px) { .sp-hc-grid.n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sp-hc-rank { font-size: 13px; color: var(--mute); }
.sp-hc-rank b { color: var(--text); }
.sp-hc-rank i { font-style: normal; margin: 0 2px; }
.sp-hc-rank a { color: var(--mute); text-decoration: underline; text-decoration-color: rgba(127,127,127,.45); text-underline-offset: 3px; font-variant-numeric: tabular-nums; }
.sp-hc-rank a:hover { color: var(--acc); text-decoration-color: currentColor; }
.sp-hc-l { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.sp-hc-l:hover, .sp-hc-l.on { border-color: var(--acc, #3b82f6); border-top-color: var(--c); }
.sp-hc-l:focus-visible { outline: 2px solid var(--acc, #3b82f6); }
.sp-hc-l i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 8px var(--c); }
.sp-hc-l b { font-size: 14.5px; color: var(--text); white-space: nowrap; }
.sp-hc-l span { margin-left: auto; font-size: 14px; font-weight: 700; color: var(--c); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sp-hc-l u { text-decoration: none; font-size: 11px; color: var(--mute); transition: transform .15s; flex: none; }
.sp-hc-l.on u { transform: rotate(180deg); color: var(--text); }
.sp-hc-det { margin-top: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.sp-hc-det[hidden] { display: none; }
.sp-hc-det h4 { margin: 0 0 6px; font-size: 14.5px; color: var(--text); }
.sp-hc-det ul { list-style: none; margin: 0; padding: 0; }
.sp-hc-det li { display: flex; gap: 10px; padding: 5px 0 5px 16px; border-top: 1px solid var(--grid); position: relative; font-size: 13px; }
.sp-hc-det li::before { content: '·'; position: absolute; left: 3px; top: 4px; color: var(--mute); }
.sp-hc-det li.p::before { content: '▲'; color: var(--good); font-size: 9px; top: 8px; }
.sp-hc-det li.n::before { content: '▼'; color: var(--bad); font-size: 9px; top: 8px; }
.sp-hc-det li span { flex: none; width: 9em; color: var(--mute); }
.sp-hc-det li em { font-style: normal; color: var(--text); overflow-wrap: anywhere; }
.sp-hc-g, .sp-hc-na { margin: 0 0 6px; font-size: 12.5px; color: var(--mute); }
.sp-hc-d, .sp-hc-note { margin: 8px 0 0; font-size: 12px; color: var(--mute); line-height: 1.6; }
@media (max-width: 700px) {
  .sp-hc-grid, .sp-hc-grid.n6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .sp-hc-top small { margin-left: 0; width: 100%; }
  .sp-hc-det li { flex-direction: column; gap: 0; }
  .sp-hc-det li span { width: auto; }
}
.sp-hc-rk { margin-left: 8px; color: var(--acc); text-decoration: none; white-space: nowrap; } .sp-hc-rk:hover { text-decoration: underline; }

/* 雷達圖（本股 vs 同產業平均）放在燈號左邊；燈號改 3 欄 x 2 列 */
.sp-hc-body.rd { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 14px; align-items: center; }
.sp-hc-body.rd .sp-hc-grid.n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sp-hc-rd svg { display: block; width: 100%; max-width: 250px; height: auto; margin: 0 auto; overflow: visible; }
.sp-hc-rl { font-size: 10.5px; fill: var(--mute); } .sp-hc-rl tspan { fill: var(--text); font-weight: 700; }
.sp-hc-lg { margin: 2px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 10px; font-size: 11.5px; color: var(--mute); }
.sp-hc-lg span { display: inline-flex; align-items: center; gap: 4px; }
.sp-hc-lg i { display: inline-block; width: 14px; height: 0; border-top: 2px solid #da291c; }
.sp-hc-lg i.b { border-top: 2px dashed #8a857c; }
.sp-hc-lg em { font-style: normal; }
@media (max-width: 700px) {
  .sp-hc-body.rd { grid-template-columns: minmax(0, 1fr); }
  .sp-hc-body.rd .sp-hc-grid.n6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-hc-rd svg { max-width: 260px; }
}
