/* Research-terminal adapters · BTC 资金面 (js/views/tc/funds.js): ETF 盘前雷达, ETF 溢价策略, USDT 汇率模型.
   Theme variables only; direction colours via --rise / --fall so the 红涨绿跌 switch applies. */
.tc-fd { display: flex; flex-direction: column; gap: 16px; min-width: 0; font-variant-numeric: tabular-nums; }
.tc-fd > .tc-panel, .tc-fd > .tc-island { margin-top: 0; }
.tc-fd .num { font-variant-numeric: tabular-nums; }
.tc-fd .up, .tc-fd-panel .up { color: var(--rise); }
.tc-fd .down, .tc-fd-panel .down { color: var(--fall); }
.tc-fd .mute, .tc-fd-panel .mute, .tc-fd-muted { color: var(--muted); }
.tc-fd-ink { color: var(--text); }

/* page head (the site's own; replaces the generic one) */
.tc-fd-cadence { font-size: 12px; color: var(--faint); }

/* panels */
.tc-fd-head { margin-bottom: 12px; }
.tc-fd-head > b { font-size: 14px; }
.tc-fd-right { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tc-fd-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.tc-fd-row .spacer { flex: 1; }
.tc-fd-lab { font-size: 12px; color: var(--muted); letter-spacing: 0.01em; line-height: 1.6; }
.tc-fd-lab b { color: var(--text); font-weight: 600; }
.tc-fd-line { margin-top: 2px; }
.tc-fd-split { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; }
.tc-fd-note { font-size: 12px; line-height: 1.8; color: var(--muted); margin-top: 10px; }
.tc-fd-note b { color: var(--text); font-weight: 600; }
.tc-fd-foot { font-size: 11.5px; line-height: 1.7; color: var(--muted); margin-top: 8px; }
.tc-fd-foot b { color: var(--text-2); }
.tc-fd-hint { font-size: 11.5px; color: var(--faint); }
.tc-fd-wait { padding: 18px 4px; font-size: 12.5px; color: var(--faint); text-align: center; }
.tc-fd-warn, .tc-fd-stale { color: var(--warn); }
.tc-fd-invalid { border-left: 3px solid var(--warn); background: var(--warn-soft); padding: 9px 14px; margin: 0 0 12px; font-size: 12.5px;
  color: var(--text-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; overflow-wrap: anywhere; }
.tc-fd-invalid b { color: var(--text); }
.tc-fd-ctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.tc-fd-chart { min-height: 120px; }
.tc-fd-t { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* the verdict hero */
.tc-fd-hero { display: flex; align-items: center; gap: 12px 32px; flex-wrap: wrap; margin: 14px 0 10px; }
.tc-fd-hero > div { min-width: 0; }
.tc-fd-fig { font-size: 52px; line-height: 1.08; font-weight: 680; letter-spacing: -0.025em; color: var(--text); font-variant-numeric: tabular-nums; }
.tc-fd-fig.up { color: var(--rise); } .tc-fd-fig.down { color: var(--fall); } .tc-fd-fig.mute { color: var(--muted); } .tc-fd-fig.faint { color: var(--faint); }
.tc-fd-say { font-size: 14px; line-height: 1.75; color: var(--text); margin-top: 8px; }
.tc-fd-say b { font-weight: 640; }
.tc-fd-herotext { flex: 1 1 280px; }
.tc-fd-state { font-size: 15px; font-weight: 620; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tc-fd-state .tc-fd-muted { font-size: 12.5px; font-weight: 400; }

/* Z gauge: seven bands −3…+3, a pin at today's Z */
.tc-fd-gauge { position: relative; margin-top: 18px; }
.tc-fd-track { position: relative; height: 10px; border-radius: 5px; overflow: hidden; background: var(--panel-2); }
.tc-fd-b { position: absolute; top: 0; bottom: 0; }
.tc-fd-b.n3 { background: color-mix(in srgb, var(--fall) 55%, transparent); }
.tc-fd-b.n2 { background: color-mix(in srgb, var(--fall) 32%, transparent); }
.tc-fd-b.n1 { background: color-mix(in srgb, var(--fall) 15%, transparent); }
.tc-fd-b.z0 { background: var(--border-strong); }
.tc-fd-b.p1 { background: color-mix(in srgb, var(--rise) 15%, transparent); }
.tc-fd-b.p2 { background: color-mix(in srgb, var(--rise) 32%, transparent); }
.tc-fd-b.p3 { background: color-mix(in srgb, var(--rise) 55%, transparent); }
.tc-fd-pin { position: absolute; top: -4px; height: 18px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--text); box-shadow: 0 0 0 2px var(--panel); }
.tc-fd-ticks { position: relative; height: 16px; margin-top: 6px; font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tc-fd-ticks span { position: absolute; top: 0; white-space: nowrap; }
.tc-fd-fold { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 14px; padding: 7px 0; background: none; border: 0;
  border-bottom: 1px solid var(--border); cursor: pointer; font: inherit; font-size: 12.5px; color: var(--muted); text-align: left; }
.tc-fd-fold:hover { color: var(--text); }
.tc-fd-fold-ic { display: inline-block; font-size: 9px; line-height: 1; color: var(--faint); transition: transform 0.15s var(--ease); }
.tc-fd-fold-ic.on { transform: rotate(90deg); }
.tc-fd-fold-now { margin-left: auto; color: var(--faint); }
table.tc-fd-key { width: 100%; font-size: 12.5px; }
.tc-fd-key th { font-size: 11px; font-weight: 500; color: var(--faint); text-transform: none; letter-spacing: 0; padding: 8px 10px 5px 0; }
.tc-fd-key td { padding: 7px 10px 7px 0; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.tc-fd-key th:first-child, .tc-fd-key td:first-child { padding-left: 0; }
.tc-fd-key th:last-child, .tc-fd-key td:last-child { padding-right: 0; }
.tc-fd-key td.z { color: var(--text); font-variant-numeric: tabular-nums; }
.tc-fd-key tr.on td { background: var(--accent-soft); }
.tc-fd-key tr.on td.z { font-weight: 640; }
.tc-fd-key tr.base td { border-top: 1px solid var(--border-strong); border-bottom: 0; font-size: 12px; color: var(--faint); }
.tc-fd-key tbody tr:hover { background: transparent; }
.tc-fd-sw2 { display: inline-flex; width: 26px; height: 8px; border-radius: 4px; overflow: hidden; margin-right: 9px; vertical-align: middle; }
.tc-fd-sw2 i { flex: 1; }
.tc-fd-sw2.s3 i:first-child { background: color-mix(in srgb, var(--fall) 55%, transparent); } .tc-fd-sw2.s3 i:last-child { background: color-mix(in srgb, var(--rise) 55%, transparent); }
.tc-fd-sw2.s2 i:first-child { background: color-mix(in srgb, var(--fall) 32%, transparent); } .tc-fd-sw2.s2 i:last-child { background: color-mix(in srgb, var(--rise) 32%, transparent); }
.tc-fd-sw2.s1 i:first-child { background: color-mix(in srgb, var(--fall) 15%, transparent); } .tc-fd-sw2.s1 i:last-child { background: color-mix(in srgb, var(--rise) 15%, transparent); }
.tc-fd-sw2.s0 i { background: var(--border-strong); }

/* small cards (nowcast points, strategy books) */
.tc-fd-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.tc-fd-cards.wide { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tc-fd-card { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--panel-2); min-width: 0; }
.tc-fd-cardv { margin-top: 6px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tc-fd-cardbig { font-size: 20px; font-weight: 660; color: var(--text); }
.tc-fd-cardbig.up { color: var(--rise); } .tc-fd-cardbig.down { color: var(--fall); } .tc-fd-cardbig.mute { color: var(--muted); }
.tc-fd-cardv .tc-fd-muted { font-size: 13px; }
.tc-fd-cardh { margin-top: 4px; font-size: 11.5px; color: var(--faint); line-height: 1.6; }
.tc-fd-cardwait { margin-top: 6px; font-size: 14px; color: var(--faint); }
.tc-fd-bline { margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.7; overflow-wrap: anywhere; }
.tc-fd-lock { display: inline-flex; align-items: center; padding: 0 7px; border-radius: 6px; border: 1px dashed var(--border-strong); color: var(--faint);
  font-size: 12px; font-weight: 500; line-height: 19px; white-space: nowrap; }
.tc-fd-cardbig .tc-fd-lock { font-size: 13px; }
.tc-fd-lockline { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); }

/* premium snapshot */
.tc-fd-eq { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; margin-top: 2px; }
.tc-fd-eqv { font-size: 30px; font-weight: 680; line-height: 1.15; letter-spacing: -0.02em; color: var(--text); }
.tc-fd-eqv.up { color: var(--rise); } .tc-fd-eqv.down { color: var(--fall); }
.tc-fd-eqr { font-size: 12px; color: var(--faint); }
.tc-fd-sep { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.tc-fd-sep .tc-fd-chart, .tc-fd-sep .tc-fd-wait { margin-top: 6px; }

/* "凭什么信它" divider and the archive panels under it */
.tc-fd-rule { display: flex; align-items: center; gap: 14px; margin: 4px 0 -4px; }
.tc-fd-rule::before, .tc-fd-rule::after { content: ""; height: 1px; background: var(--border); flex: 1; }
.tc-fd-rule span { font-size: 12px; color: var(--faint); white-space: nowrap; }
.tc-fd-arch .tc-fd-head > b { font-size: 13.5px; color: var(--text-2); }
.tc-fd-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; }
.tc-fd-pager .btn:disabled { opacity: 0.4; }
.tc-fd-score td b { color: var(--text); font-weight: 650; }

/* strategy page */
.tc-fd-bar { margin-bottom: 12px; }
.tc-fd-bar .tc-fd-right { text-align: right; }
.tc-fd-sub { margin: 16px 0 8px; gap: 10px; }
.tc-fd-sub > .tc-fd-lab { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.tc-fd-eqc { min-height: 290px; }
.tc-fd-ledger { max-height: 420px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.tc-fd-ledger th { z-index: 1; }

/* USDT model */
.tc-fd-keyrow { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 12px; color: var(--muted); margin: 4px 0 8px; line-height: 1.6; }
.tc-fd-sw { display: inline-block; width: 14px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 3px; border: 1px solid transparent; }
.tc-fd-sw + .tc-fd-sw { margin-right: 6px; }
.tc-fd-sw.up1 { background: color-mix(in srgb, var(--rise) 20%, transparent); border-color: var(--rise); }
.tc-fd-sw.up2 { background: color-mix(in srgb, var(--rise) 48%, transparent); border-color: var(--rise); }
.tc-fd-sw.down1 { background: color-mix(in srgb, var(--fall) 20%, transparent); border-color: var(--fall); }
.tc-fd-sw.down2 { background: color-mix(in srgb, var(--fall) 48%, transparent); border-color: var(--fall); }
.tc-fd-sw.cb { background: color-mix(in srgb, var(--faint) 30%, transparent); border-color: var(--faint); margin-right: 6px; }
.tc-fd-panes { display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: 11.5px; color: var(--faint); margin-bottom: 6px; }
.tc-fd-panes b { color: var(--muted); font-weight: 600; margin-right: 2px; }
.tc-fd-uc { min-height: 500px; }
.tc-fd-stats tr.tc-fd-all td { border-top: 2px solid var(--border-strong); }
.tc-fd-stats td.tc-fd-strong { font-weight: 640; color: var(--text); }

/* risk footer */
.tc-fd-risk { font-size: 11.5px; line-height: 1.8; color: var(--faint); border-top: 1px solid var(--border); padding-top: 12px; }
.tc-fd-risk b { color: var(--muted); }

@media (max-width: 720px) {
  .tc-fd-fig { font-size: 40px; }
  .tc-fd-eqv { font-size: 26px; }
  .tc-fd-hero { gap: 10px 22px; }
  .tc-fd-cadence { padding-top: 0; }
  .tc-fd-bar .tc-fd-right { text-align: left; flex-basis: 100%; }
  .tc-fd-bar .spacer { display: none; }
  .tc-fd-uc { min-height: 480px; }
  .tc-fd-key td, .tc-fd-key th { font-size: 11.5px; }
}

/* ETF 盘前雷达: the site's ● 自动 15s / ⟳ 刷新 at the right of the page head; quiet chart hints */
.tc-fd-cadence:has(.tc-fd-auto) { display: inline-flex; align-items: center; gap: 6px; }
.tc-fd-auto { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--panel); color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; box-shadow: var(--shadow-sm); }
.tc-fd-auto i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.tc-fd-auto.on { color: var(--text); }
.tc-fd-auto.on i { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 15%, transparent); }
.tc-fd-auto:hover { border-color: var(--accent-ring); }
.tc-fd-refresh { height: 30px; font-size: 12.5px; }
.tc-fd-hint { color: var(--faint); font-size: 11.5px; }
.tc-fd-hnote { font-size: 12px; line-height: 1.7; color: var(--muted); margin: 6px 0 8px; }
/* USDT 汇率模型 readings: six tiles as 3 × 2 on wide screens (six in a row cut their labels) */
.tc-fd-six .tc-stats { grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }
@media (max-width: 560px) { .tc-fd-six .tc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
