/* 研究终端 · 美股 adapters (js/views/tc/us.js): ETF 轮动策略、个股领导力榜、资产轮动地图. Design variables only; signs use --rise / --fall. */
.tc-us { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tc-us > .tc-panel, .tc-us-two > .tc-panel, .tc-us-pair > .tc-panel { margin-top: 0; }
.tc-us-n, .tc-us .num { font-variant-numeric: tabular-nums; }
.tc-us .tc-stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }  /* stretch 4 tiles across, as the site does */
.tc-us-flat { color: var(--faint); }
.tc-us-tkr { font-family: var(--mono); font-weight: 560; color: var(--text); letter-spacing: 0.01em; }
.tc-us-tkr.ld { font-weight: 720; }
.tc-us-grp { margin-left: 6px; font-size: 11.5px; color: var(--faint); }
.tc-us-nowrap { white-space: nowrap; }
.tc-us-ph { font-size: 12px; color: var(--faint); margin-top: 2px; line-height: 1.6; }
.tc-us-foot { font-size: 11.5px; color: var(--faint); margin-top: 8px; line-height: 1.7; }
.tc-us-foot b { color: var(--text-2); }
.tc-us-note { margin: 12px 0 0; font-size: 12px; line-height: 1.75; color: var(--faint); }
.tc-us-note strong { color: var(--text); font-weight: 620; }
.tc-us-dim { opacity: 0.5; transition: opacity 0.15s; }
.tc-us .notice { align-items: center; flex-wrap: wrap; }
.tc-us .notice .btn { margin-left: 4px; }
.tc-us-md .prose { max-width: 820px; }

/* page head with the date navigator on the right (rotation) and the date bar (leaders) */
.tc-us-conf { opacity: 0.75; margin-left: 6px; font-variant-numeric: tabular-nums; }
.tc-us-datebar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tc-us-step { width: 30px; padding: 0; justify-content: center; font-size: 17px; line-height: 1; }
.tc-us-datebar select.tc-us-sel { width: auto; flex: none; min-height: 28px; height: 28px; padding: 0 8px; font-variant-numeric: tabular-nums; }
.tc-us-hint { font-size: 11.5px; color: var(--faint); }
.tc-us-loading { font-size: 11.5px; color: var(--muted); }

/* tracks and bars (score bars, diverging Δ bars) */
.tc-us-track { position: relative; flex: 1; min-width: 40px; height: 8px; border-radius: 2px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--border); }
.tc-us-fill { position: absolute; top: 0; bottom: 0; border-radius: 1px 4px 4px 1px; }
.tc-us-fill.pos { background: var(--rise); }
.tc-us-fill.neg { background: var(--fall); }
.tc-us-fill.toleft { border-radius: 4px 1px 1px 4px; }
.tc-us-fill.lead { background: color-mix(in srgb, var(--text) 70%, transparent); }
.tc-us-fill.rest { background: var(--faint); }
.tc-us-mid { position: absolute; top: -2px; bottom: -2px; left: 50%; width: 1px; background: var(--border-strong); }
.tc-us-cell { display: flex; align-items: center; gap: 8px; }
.tc-us-v { width: 38px; flex: none; text-align: right; font-variant-numeric: tabular-nums; }
.tc-us-v2 { width: 64px; flex: none; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* label chips (leaders) */
.tc-us-chip { display: inline-block; white-space: nowrap; font-size: 11.5px; line-height: 1.6; padding: 0 7px; border-radius: 5px;
  border: 1px solid var(--border-strong); background: var(--panel-2); color: var(--muted); }
.tc-us-chip[data-t="overheated"] { font-weight: 650; color: var(--rise); border-color: color-mix(in srgb, var(--rise) 55%, transparent); background: color-mix(in srgb, var(--rise) 18%, transparent); }
.tc-us-chip[data-t="confirmed_mainline"] { color: var(--rise); border-color: color-mix(in srgb, var(--rise) 30%, transparent); background: var(--rise-soft); }
.tc-us-chip[data-t="low_buy_trap"] { color: var(--fall); border-color: color-mix(in srgb, var(--fall) 30%, transparent); background: var(--fall-soft); }
/* small tags (rotation readout, regime drivers) */
.tc-us-tag { display: inline-block; white-space: nowrap; font-size: 11.5px; line-height: 1.7; padding: 0 6px; border-radius: 5px;
  border: 1px solid var(--border-strong); background: var(--panel-2); color: var(--muted); }
.tc-us-tag.risk { color: var(--fall); background: var(--fall-soft); border-color: color-mix(in srgb, var(--fall) 30%, transparent); }

/* folds */
.tc-us-fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; }
.tc-us-fold > summary::-webkit-details-marker { display: none; }
.tc-us-fold > summary::before { display: none; }
.tc-us-fold > summary > div { min-width: 0; }
.tc-us-fold > summary b { color: var(--text); font-weight: 640; }
.tc-us-chev { flex: none; color: var(--faint); font-size: 11px; transition: transform 0.15s; }
.tc-us-fold[open] .tc-us-chev { transform: rotate(180deg); }
.tc-us-foldbody { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 14px; }
.tc-us-legend { min-width: 560px; }
.tc-help-body .tc-us-legend { min-width: 0; }  /* in the ⓘ drawer: the legend fits the drawer */
.tc-us-legend td { vertical-align: top; font-size: 12.5px; }

/* 领导层进出 / pills */
.tc-us-ev { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 10px; }
.tc-us-evhd { font-size: 12.5px; font-weight: 640; margin-bottom: 7px; }
.tc-us-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-us-pill { display: inline-flex; align-items: baseline; gap: 5px; font-size: 12px; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--panel-2); white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.tc-us-pill b { font-family: var(--mono); font-weight: 620; color: var(--text); }
.tc-us-quiet { font-size: 13px; color: var(--muted); padding: 12px 18px; }
/* 投机观察池: one line per name — ticker, score, 5-day change */
.tc-us-specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 18px; }
.tc-us-spec { display: flex; align-items: baseline; gap: 8px; padding: 5px 2px; border-bottom: 1px solid var(--border); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tc-us-spec .tc-us-tkr { flex: 1; min-width: 0; }
.tc-us-spec .tc-us-v { width: auto; color: var(--text-2); }

/* movers: 相对强度加速 / 衰减 (also the macro breadth lists) */
.tc-us-pair, .tc-us-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tc-us-mvhd { font-size: 14px; font-weight: 640; color: var(--text); }
.tc-us-mvhd.up { color: var(--rise); } .tc-us-mvhd.down { color: var(--fall); }
.tc-us-mvrows { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
.tc-us-mv { display: flex; align-items: center; gap: 9px; font-size: 12.5px; min-width: 0; }
.tc-us-mvname { width: 150px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-us-mvname b { font-family: var(--mono); font-weight: 620; color: var(--text); }
.tc-us-mvname span { margin-left: 6px; font-size: 11.5px; color: var(--faint); }
.tc-us-mvval { width: 72px; flex: none; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* boards */
.tc-us-boardhd { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 10px; flex-wrap: wrap; }
.tc-us-boardhd > b { color: var(--text); font-weight: 640; font-size: 14px; }
.tc-us-boardhd > .tc-info { margin-right: auto; align-self: center; }  /* the ⓘ sits by its title; the key stays right */
.tc-us-keys { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.tc-us-sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; }
.tc-us-sw.lead { background: color-mix(in srgb, var(--text) 70%, transparent); }
.tc-us-sw.rest { background: var(--faint); margin-left: 6px; }
.tc-us-bar2, .tc-us-controls { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin: 12px 0 8px; }
.tc-us-bar2 { justify-content: space-between; }
.tc-us-controls .tc-seg { flex-wrap: wrap; }
.tc-us-sortlbl { font-size: 11.5px; color: var(--faint); margin-right: -8px; }
.tc-us-cnt { margin-left: auto; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tc-us-fhint { margin: 0 0 8px; }
.tc-table.tc-us-board { min-width: 780px; }
.tc-table.tc-us-rot { min-width: 880px; }
.tc-table.tc-us-board td { font-size: 12.5px; padding-top: 7px; padding-bottom: 7px; }
.tc-table.tc-us-board th, .tc-table.tc-us-tbl th { text-transform: none; letter-spacing: 0; }
.tc-us-emptyrow { text-align: center; color: var(--muted); padding: 28px 12px !important; }
.tc-us-spark { display: block; width: 96px; height: 22px; }
.tc-us-spark path { fill: none; stroke: var(--faint); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.tc-us-spark circle { fill: var(--faint); }
.tc-us-spark.is-up path { stroke: var(--rise); } .tc-us-spark.is-up circle { fill: var(--rise); }

/* rotation board rows, expansion, 90-day track */
.tc-us-row { cursor: pointer; }
.tc-us-row:hover td, .tc-us-row.open td { background: var(--accent-soft); }
.tc-us-row:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: -2px; }
.tc-us-readout { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; white-space: normal; min-width: 180px; }
.tc-us-lb { color: var(--text-2); }
.tc-us-caret { color: var(--faint); font-size: 10px; display: inline-block; transition: transform 0.15s; }
.tc-us-row.open .tc-us-caret { transform: rotate(180deg); }
.tc-table tr.tc-us-exp > td { background: var(--panel-2); padding: 0; white-space: normal; }
.tc-us-cq { container-type: inline-size; }
.tc-us-t90box { position: sticky; left: 0; width: 100cqw; max-width: 100%; padding: 10px 16px 14px; }  /* stays in view inside the scrolling table */
.tc-us-t90hd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 12px; margin-bottom: 4px; }
.tc-us-t90hd b { color: var(--text); font-weight: 640; }
.tc-us-t90hd span { color: var(--faint); font-variant-numeric: tabular-nums; }
.tc-us-t90hd span.up { color: var(--rise); } .tc-us-t90hd span.down { color: var(--fall); }
.tc-us-t90 { min-height: 190px; }
.tc-us-trackmsg { padding: 6px 0 10px; font-size: 12px; color: var(--faint); }
.tc-us-trackmsg.down { color: var(--fall); }
.tc-us-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px 16px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.tc-us-kv > div { display: flex; flex-direction: column; min-width: 0; }
.tc-us-kv span { font-size: 11.5px; color: var(--muted); }
.tc-us-kv b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tc-us-kv b.up { color: var(--rise); } .tc-us-kv b.down { color: var(--fall); }
.tc-us-reason { margin-top: 8px; font-size: 12px; overflow-wrap: anywhere; }
.tc-us-reason code { color: var(--text-2); }
.tc-us-drivers { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; margin-top: -4px; }
.tc-us-knote { flex-basis: 100%; font-size: 11.5px; }

/* macro background */
.tc-us-macro .tc-us-mhd { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 16px 0 8px; }
.tc-us-macro .tc-us-mhd:first-of-type { margin-top: 2px; }
.tc-us-macro .tc-us-mhd b { color: var(--text); font-weight: 640; font-size: 13px; }
.tc-us-macro .tc-us-mhd .small b { font-size: inherit; }
.tc-us-breadth { margin-top: 10px; }
.tc-us-breadth .tc-us-mvname { width: 120px; }
.tc-us-dma { flex: none; width: 92px; text-align: right; font-size: 11.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ETF 轮动 */
.tc-us-rule { font-size: 13px; line-height: 1.8; }
.tc-us-rule b { color: var(--text); }
.tc-us-sub { margin-top: 4px; color: var(--muted); }
.tc-us-bts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.tc-us-bt { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; background: var(--panel-2); min-width: 0; }
.tc-us-bt.main { border-color: var(--accent-ring); box-shadow: 0 0 0 3px var(--accent-soft); }
.tc-us-btk { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.tc-us-bt.main .tc-us-btk { color: var(--accent); }
.tc-us-btr { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; line-height: 1.8; color: var(--muted); }
.tc-us-btr span { white-space: nowrap; }
.tc-us-btr b { color: var(--text); font-variant-numeric: tabular-nums; }
.tc-us-btr b.down { color: var(--fall); }
.tc-us-chart { min-height: 120px; }
.tc-us-chart .tc-ts-legend span.up, .tc-us-chart .tc-ts-legend span.down { font-weight: 600; }
.tc-us-lgnote { color: var(--text-2); font-weight: 600; }
.tc-us-carrier { font-size: 11px; color: var(--faint); white-space: normal; }
.tc-table.tc-us-tbl td { font-size: 13px; padding-top: 8px; padding-bottom: 8px; }
.tc-table td.tc-us-wrap { white-space: normal; min-width: 220px; line-height: 1.55; }
.tc-us-pend td { background: var(--accent-soft); }
.tc-us-side { display: inline-block; font-size: 11.5px; line-height: 1.6; padding: 0 7px; border-radius: 5px; border: 1px solid currentColor; white-space: nowrap; }
.tc-us-zero { display: inline-block; font-size: 11.5px; color: var(--faint); border: 1px solid var(--border); border-radius: 5px; padding: 0 7px; }
.tc-us-k { font-size: 12px; color: var(--faint); }
.tc-us-big { font-size: 16px; font-weight: 700; color: var(--text); margin: 2px 0 8px; font-variant-numeric: tabular-nums; }
.tc-us-res { font-size: 13px; margin-bottom: 8px; }
.tc-us-res b { color: var(--text); }
.tc-us-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; margin-bottom: 4px; }
.tc-us-keep { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.tc-us-sentinel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 12.5px; }
.tc-us-warnline { flex-basis: 100%; color: var(--warn); font-size: 12px; }
.tc-us-asof { font-size: 13px; margin-bottom: 6px; color: var(--text-2); }
.tc-us-acc { color: var(--accent); }

@media (max-width: 900px) {
  .tc-us-pair { grid-template-columns: minmax(0, 1fr); }
  .tc-us-cnt { margin-left: 0; }
}
@media (max-width: 720px) {
  .tc-us-two, .tc-us-ev { grid-template-columns: minmax(0, 1fr); }
  .tc-us-mvname { width: 118px; }
  .tc-us-breadth .tc-us-mvname { width: 96px; }
  .tc-us-dma { width: 78px; }
  .tc-us-bts { grid-template-columns: minmax(0, 1fr); }
  .tc-us-bt { display: grid; grid-template-columns: auto repeat(3, auto); align-items: baseline; gap: 2px 12px; }
  .tc-us-btk { margin: 0; }
  .tc-us-btr { justify-content: flex-start; gap: 4px; }
}
@media (max-width: 420px) {
  .tc-us-bt { grid-template-columns: 1fr 1fr 1fr; }
  .tc-us-btk { grid-column: 1 / -1; }
  .tc-us-btr { flex-direction: column; gap: 0; line-height: 1.5; }
  .tc-us-btr span { font-size: 11.5px; }
  .tc-us-mvval { width: 64px; }
  .tc-us-hint { flex-basis: 100%; }
}

.tc-us-more { display: block; margin: 12px auto 0; }
