/* 個股頁「財務報表」卡片（#sp_fs，inc/fs.php、assets/js/sp-fs.js） */
.sp-page > #sp_fs { order: 6; }
/* 在 EPS 預估分頁列裡時（inc/stock-page.php #sp_ev）：同一張卡、標題由分頁代替 */
.sp-page[data-ev]:not([data-ev="fs"]) > #sp_fs { display: none; }
.sp-page[data-ev] > #sp_fs > .sp-sp-card { border-top: 0; border-radius: 0 0 12px 12px; }
.sp-page[data-ev] > #sp_fs .hd h2 { font-size: 0; }
.sp-page[data-ev] > #sp_fs .hd h2 small { font-size: 12.5px; margin-left: 0; }

/* 系列顏色（圖、圖例、提示框共用）；瑞士風格另外一組，圖表區加 sw-keep 不讓 sp-swiss.js 改色 */
.sp-fs { --fb1: #4e8cff; --fb2: #2dd4bf; --fb3: #f5c542; --fl1: #f5c542; --fl2: #a78bfa; --fl3: #ff7a59; }
html.sp-sw .sp-fs { --fb1: #111; --fb2: #da291c; --fb3: #a9a49a; --fl1: #111; --fl2: #8a857c; --fl3: #da291c; }
.sp-fs rect.b1 { fill: var(--fb1); } .sp-fs rect.b2 { fill: var(--fb2); } .sp-fs rect.b3 { fill: var(--fb3); }
.sp-fs polyline.l1, .sp-fs polyline.l2, .sp-fs polyline.l3 { fill: none; stroke-width: 1.8; }
.sp-fs polyline.l1 { stroke: var(--fl1); } .sp-fs polyline.l2 { stroke: var(--fl2); } .sp-fs polyline.l3 { stroke: var(--fl3); }
html.sp-sw .sp-fs polyline.l1 { stroke-dasharray: 4 3; }
.sp-fs circle.l1 { fill: var(--fl1); } .sp-fs circle.l2 { fill: var(--fl2); } .sp-fs circle.l3 { fill: var(--fl3); }
.sp-fs i.b1 { background: var(--fb1); } .sp-fs i.b2 { background: var(--fb2); } .sp-fs i.b3 { background: var(--fb3); }
.sp-fs i.l1 { background: var(--fl1); } .sp-fs i.l2 { background: var(--fl2); } .sp-fs i.l3 { background: var(--fl3); }
.sp-fs i.l1, .sp-fs i.l2, .sp-fs i.l3 { height: 3px !important; }

.sp-fs-chs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.sp-fs-ch { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px 6px; min-width: 0; }
.sp-fs-ch h3 { font-size: 14px; color: var(--text, #fff); margin: 0 0 4px; font-weight: 700; }
.sp-fs-leg { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 11.5px; color: var(--mute); margin-bottom: 4px; }
.sp-fs-leg span { display: inline-flex; align-items: center; gap: 4px; }
.sp-fs-leg i, .sp-fs-tip i { display: inline-block; width: 10px; height: 8px; border-radius: 2px; vertical-align: middle; margin-right: 4px; }
.sp-fs-plot { position: relative; cursor: crosshair; touch-action: pan-y; }
.sp-fs-plot svg { display: block; width: 100%; height: auto; }
.sp-fs-plot .gr { stroke: var(--grid, #2a3040); stroke-width: 1; }
.sp-fs-plot .gr.z { stroke: var(--mute); }
.sp-fs-plot .ax { font-size: 9.5px; fill: var(--mute); font-variant-numeric: tabular-nums; }
.sp-fs-plot .hl { fill: var(--text, #fff); fill-opacity: .07; }
.sp-fs-tip { position: absolute; top: 0; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; font-size: 12px; line-height: 1.6; color: var(--text); white-space: nowrap; pointer-events: none; z-index: 2; font-variant-numeric: tabular-nums; }
.sp-fs-tip[hidden] { display: none; }
.sp-fs-tip .dt { color: var(--mute); font-size: 11.5px; }
.sp-fs-tip span { color: var(--mute); }

.sp-fs-st { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 8px; overflow-x: auto; scrollbar-width: none; }
.sp-fs-st::-webkit-scrollbar { display: none; }
.sp-fs-st button { flex: none; background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--mute); padding: 6px 12px 7px; margin-bottom: -1px; font-size: 13.5px; cursor: pointer; box-shadow: none; }
.sp-fs-st button.on { color: var(--text); border-bottom-color: var(--acc); font-weight: 700; }
.sp-fs-tw { overflow-x: auto; }
.sp-fs-tw .tbl { min-width: 100%; }
.sp-sp .sp-fs-tw .tbl th.l { text-align: left; position: sticky; left: 0; background: var(--card); z-index: 1; min-width: 120px; }
.sp-fs-tw .tbl td, .sp-fs-tw .tbl thead th { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sp-fs-tw .tbl tbody th { font-weight: 400; color: var(--mute); }
.sp-fs-tw .tbl tr.k th, .sp-fs-tw .tbl tr.k td { color: var(--text); font-weight: 700; }
.sp-fs-tw .tbl td > span:not([class]) { color: var(--mute); font-size: 12px; }
.sp-fs .sp-up { color: var(--U, #f0443a); }
.sp-fs .sp-dn { color: var(--D, #16b36b); }
.sp-fs .na { color: var(--mute); }
.sp-fs-note { font-size: 12px; color: var(--mute); line-height: 1.7; margin: 12px 0 0; }
@media (max-width: 900px) { .sp-fs-chs { grid-template-columns: 1fr; } }
