/* BJF Crypto Correlation Matrix — v1.1.0 */
.bjfcm{--navy:#0A1628;--navy2:#142640;--gold:#C9A84C;--gold2:#E5C46B;--ink:#1a2332;--muted:#5b6575;--cream:#F4F1E6;--line:#e3e0d6;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;color:var(--ink);font-size:15px;line-height:1.55;
  border:1px solid var(--line);border-radius:10px;background:#fff;padding:18px 18px 14px;margin:18px 0 26px;box-shadow:0 2px 14px rgba(10,22,40,.06)}
.bjfcm *,.bjfcm *::before,.bjfcm *::after{box-sizing:border-box}
.bjfcm button{font:inherit;cursor:pointer}
.bjfcm-empty{padding:18px;border:1px dashed var(--line);border-radius:8px;color:var(--muted);font-size:14px}

.bjfcm-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:6px 16px;margin-bottom:12px}
.bjfcm-title{font-size:19px;font-weight:800;color:var(--navy);letter-spacing:-.2px}
.bjfcm-meta{font-size:12.5px;color:var(--muted);display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.bjfcm-sep{opacity:.5}
.bjfcm-live{display:inline-flex;align-items:center;gap:5px;font-weight:700;color:#0F7B5F;text-transform:uppercase;font-size:11px;letter-spacing:1px}
.bjfcm-dot{width:7px;height:7px;border-radius:50%;background:#0F7B5F;box-shadow:0 0 0 0 rgba(15,123,95,.5);animation:bjfcm-pulse 2s infinite}
.bjfcm.is-stale .bjfcm-live{color:#b36b00}.bjfcm.is-stale .bjfcm-dot{background:#b36b00;animation:none}
@keyframes bjfcm-pulse{0%{box-shadow:0 0 0 0 rgba(15,123,95,.45)}70%{box-shadow:0 0 0 7px rgba(15,123,95,0)}100%{box-shadow:0 0 0 0 rgba(15,123,95,0)}}

.bjfcm-markets{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 8px}
.bjfcm-mkt{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);background:#fff;color:var(--navy);border-radius:999px;padding:6px 14px;font-size:13.5px;font-weight:700;line-height:1.2;transition:background .15s,color .15s,border-color .15s}
.bjfcm-mkt small{font-weight:600;font-size:10.5px;color:var(--muted);background:var(--cream);border-radius:999px;padding:1px 6px}
.bjfcm-mkt:hover{border-color:var(--gold);background:var(--cream)}
.bjfcm-mkt.is-active{background:var(--navy);border-color:var(--navy);color:#fff;box-shadow:0 1px 4px rgba(10,22,40,.25)}
.bjfcm-mkt.is-active small{color:var(--navy);background:var(--gold2)}
.bjfcm-src{font-size:12.5px;color:var(--muted);margin:0 0 10px}

.bjfcm-controls{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin:4px 0 8px}
.bjfcm-tabs{display:inline-flex;background:var(--cream);border-radius:8px;padding:3px;gap:2px}
.bjfcm-tab{display:flex;flex-direction:column;align-items:center;border:0;background:transparent;color:var(--ink);padding:6px 12px;border-radius:6px;font-weight:700;font-size:14px;line-height:1.1;transition:background .15s,color .15s}
.bjfcm-tab small{font-weight:500;font-size:10.5px;color:var(--muted);margin-top:2px;letter-spacing:.2px}
.bjfcm-tab:hover{background:rgba(201,168,76,.18)}
.bjfcm-tab.is-active{background:var(--navy);color:#fff;box-shadow:0 1px 4px rgba(10,22,40,.25)}
.bjfcm-tab.is-active small{color:var(--gold2)}
.bjfcm-right{display:flex;align-items:center;gap:12px}
.bjfcm-switch{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--muted);cursor:pointer;user-select:none}
.bjfcm-switch input{accent-color:var(--navy);width:15px;height:15px;margin:0}
.bjfcm-btn{border:1px solid var(--line);background:#fff;color:var(--navy);border-radius:6px;padding:6px 11px;font-size:13px;font-weight:700}
.bjfcm-btn:hover{border-color:var(--gold);background:var(--cream)}
.bjfcm-hint{font-size:13px;color:var(--muted);margin:0 0 10px}

.bjfcm-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:8px;border:1px solid var(--line);position:relative}
.bjfcm-table{border-collapse:separate;border-spacing:0;width:100%;min-width:640px;table-layout:fixed;font-size:12.5px;font-variant-numeric:tabular-nums}
.bjfcm-table th,.bjfcm-table td{padding:0;height:34px;text-align:center;vertical-align:middle;border-right:1px solid rgba(255,255,255,.55);border-bottom:1px solid rgba(255,255,255,.55);white-space:nowrap;overflow:hidden}
.bjfcm-table thead th{background:var(--navy);color:#fff;font-weight:700;font-size:11px;letter-spacing:.2px;position:sticky;top:0;z-index:2;border-right-color:rgba(255,255,255,.12);border-bottom:2px solid var(--gold)}
.bjfcm-table thead th.bjfcm-corner{text-align:left;padding-left:10px;font-size:10.5px;color:var(--gold2);letter-spacing:1px;text-transform:uppercase}
.bjfcm-table th[scope=row],.bjfcm-table thead th.bjfcm-corner{width:64px;min-width:64px;position:sticky;left:0;z-index:3;background:var(--navy);color:#fff}
.bjfcm-table thead th.bjfcm-corner{z-index:4}
.bjfcm-rowbtn{border:0;background:transparent;color:#fff;font-weight:700;font-size:11.5px;letter-spacing:.3px;width:100%;height:34px;padding:0 6px;text-align:left;padding-left:10px}
.bjfcm-rowbtn:hover,.bjfcm-table th[scope=row].is-sorted .bjfcm-rowbtn{color:var(--gold2)}
.bjfcm-table th[scope=row].is-sorted .bjfcm-rowbtn::after{content:" ▸";font-size:10px}
.bjfcm-cell{cursor:pointer;transition:transform .08s;font-weight:600}
.bjfcm-cell:hover{outline:2px solid var(--navy);outline-offset:-2px;position:relative;z-index:1}
.bjfcm-cell.is-selected{outline:2px solid var(--gold);outline-offset:-2px;position:relative;z-index:1}
.bjfcm-cell.is-hl{box-shadow:inset 0 0 0 1px rgba(10,22,40,.25)}
.bjfcm-diag{background:#2b3a52;color:#c9cfd9;font-weight:600}
.bjfcm-table.is-compact th[data-sym].is-hidden,.bjfcm-table.is-compact td.is-hidden,.bjfcm-table.is-compact tr.is-hidden{display:none}

.bjfcm-legend{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted);margin:8px 0 2px}
.bjfcm-grad{display:inline-block;width:150px;height:9px;border-radius:5px;background:linear-gradient(90deg,#B83B2E 0%,#F4F1E6 50%,#0F7B5F 100%)}
.bjfcm-legend-note{margin-left:auto}

.bjfcm-detail{margin:14px 0 4px;border:1px solid var(--line);border-left:4px solid var(--gold);border-radius:8px;background:#fbfaf6;padding:14px 16px}
.bjfcm-detail[hidden]{display:none}
.bjfcm-dhead{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.bjfcm-dtitle{font-size:17px;font-weight:800;color:var(--navy)}
.bjfcm-dtitle small{font-weight:500;color:var(--muted);font-size:12.5px;margin-left:8px}
.bjfcm-dclose{border:0;background:transparent;color:var(--muted);font-size:20px;line-height:1;padding:2px 6px}
.bjfcm-dclose:hover{color:var(--navy)}
.bjfcm-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin:8px 0 12px}
.bjfcm-stat{background:#fff;border:1px solid var(--line);border-radius:7px;padding:9px 11px}
.bjfcm-stat b{display:block;font-size:19px;color:var(--navy);line-height:1.15;font-variant-numeric:tabular-nums}
.bjfcm-stat span{font-size:11.5px;color:var(--muted);text-transform:uppercase;letter-spacing:.6px}
.bjfcm-stat small{display:block;font-size:12px;color:var(--muted);margin-top:2px}
.bjfcm-wins{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 10px}
.bjfcm-win{display:inline-flex;flex-direction:column;align-items:center;min-width:64px;border:1px solid var(--line);border-radius:6px;padding:5px 8px;background:#fff;font-size:12px;color:var(--muted)}
.bjfcm-win b{font-size:14px;color:var(--ink);font-variant-numeric:tabular-nums}
.bjfcm-charts{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.bjfcm-chart{background:#fff;border:1px solid var(--line);border-radius:7px;padding:8px 10px 6px}
.bjfcm-chart h4{margin:0 0 4px;font-size:12px;color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:.6px}
.bjfcm-chart svg{display:block;width:100%;height:120px}
.bjfcm-chart .bjfcm-ck{font-size:11.5px;color:var(--muted);display:flex;gap:12px;margin-top:4px}
.bjfcm-ck i{display:inline-block;width:10px;height:3px;border-radius:2px;margin-right:4px;vertical-align:middle}
.bjfcm-loading{color:var(--muted);font-size:13px;padding:10px 0}

.bjfcm-top{margin-top:16px}
.bjfcm-top-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 14px;margin-bottom:6px}
.bjfcm-top h3{margin:0;font-size:16px;color:var(--navy);font-weight:800;border:0;padding:0;display:block}
.bjfcm-top-sub{font-size:12.5px;color:var(--muted)}
.bjfcm-top-scroll{overflow-x:auto}
.bjfcm-top-table{width:100%;border-collapse:collapse;font-size:13.5px;min-width:560px;font-variant-numeric:tabular-nums}
.bjfcm-top-table th{background:var(--cream);color:var(--navy);font-size:11.5px;text-transform:uppercase;letter-spacing:.5px;padding:7px 9px;text-align:left;border-bottom:2px solid var(--gold)}
.bjfcm-top-table td{padding:7px 9px;border-bottom:1px solid var(--line)}
.bjfcm-top-table tbody tr{cursor:pointer}
.bjfcm-top-table tbody tr:hover td{background:#fbfaf6}
.bjfcm-top-table tbody tr.is-selected td{background:#fff7e3}
.bjfcm-pair{font-weight:700;color:var(--navy)}
.bjfcm-badge{display:inline-block;font-size:11px;font-weight:700;padding:2px 8px;border-radius:999px;letter-spacing:.3px}
.bjfcm-badge.is-calm{background:#e6f3ee;color:#0F7B5F}
.bjfcm-badge.is-warm{background:#fff1d6;color:#b36b00}
.bjfcm-badge.is-hot{background:#fbe3df;color:#B83B2E}
.bjfcm-badge.is-na{background:#eceae3;color:var(--muted)}
td.is-hot{color:#B83B2E;font-weight:700}td.is-warm{color:#b36b00;font-weight:700}

.bjfcm-basis{margin-top:20px}
.bjfcm-basis .bjfcm-top-head{margin-bottom:6px}
.bjfcm-basis .bjfcm-top-table tbody tr{cursor:default}
.bjfcm-basis .bjfcm-top-table tbody tr:hover td{background:transparent}
.bjfcm-basis-table td.is-pos{color:#0F7B5F;font-weight:700}
.bjfcm-basis-table td.is-neg{color:#B83B2E;font-weight:700}
.bjfcm-basis-note{font-size:12px;color:var(--muted);margin:8px 0 0}
.bjfcm-fund{font-size:12.5px;color:var(--muted);margin:-4px 0 12px}
.bjfcm-fund b{color:var(--ink);font-variant-numeric:tabular-nums}
.bjfcm-fund .is-pos{color:#0F7B5F}.bjfcm-fund .is-neg{color:#B83B2E}
.bjfcm-stat b.is-pending{color:var(--muted);font-weight:500}

.bjfcm-foot{font-size:12px;color:var(--muted);margin:14px 0 0;line-height:1.5}

@media (max-width:640px){
  .bjfcm{padding:14px 12px 12px;border-radius:8px}
  .bjfcm-title{font-size:17px}
  .bjfcm-tab{padding:6px 9px;font-size:13px}
  .bjfcm-table{min-width:560px}
  .bjfcm-table th,.bjfcm-table td{height:31px;font-size:11.5px}
  .bjfcm-charts{grid-template-columns:1fr}
  .bjfcm-legend-note{margin-left:0;flex-basis:100%}
}
