/* trend.css — the Trend & Channel page: a list of rows, each with its own candles and channel, and the big picture of one.
   common.css is the site's look and scan.css the filter chips / segmented controls / ticker card; this file is only the picture. */
.cntline{font-size:.85rem;color:var(--muted);margin:10px 2px 0}
.tr-tools{margin-top:4px}
.tr-layers label{display:inline-flex;align-items:center;gap:6px;margin-right:14px;font-size:.88rem;color:var(--text-2);cursor:pointer}
.tr-layers input{accent-color:var(--accent)}
.sw{display:inline-block;width:18px;height:0;border-top:2px solid var(--c);vertical-align:middle}
.sw.dash{border-top-style:dashed}
.warn{color:var(--warn)} .up{color:var(--up)} .dn{color:var(--dn)}

/* ── the list: one row per ticker, the picture first ─────────────────────── */
.tr-list{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);overflow:hidden}
.tr-row{display:grid;grid-template-columns:240px 150px 104px minmax(0,1fr);gap:6px 18px;align-items:center;padding:10px 16px;border-top:1px solid var(--line);cursor:pointer}
.tr-row:first-child{border-top:0}
.tr-row:hover{background:var(--surface-2)}
.tr-row:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.tr-id b{font-family:var(--mono);font-size:.92rem}
.tr-id span{display:block;color:var(--text-2);font-size:.82rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tr-id i{display:block;font-style:normal;color:var(--muted);font-size:.74rem}
.tr-id .st{margin-right:4px}
.tr-px{font-variant-numeric:tabular-nums;font-size:.84rem}
.tr-px b{display:block;font-size:.95rem}
.tr-px small{display:block;color:var(--muted);font-size:.76rem;line-height:1.5}
.tr-st{font-size:.82rem;color:var(--text-2);line-height:1.55;font-variant-numeric:tabular-nums}
.tr-st .ln{display:block}
.tr-st .k{display:inline-block;min-width:76px;color:var(--muted);font-size:.74rem;letter-spacing:.05em;text-transform:uppercase}
.tr-st .mu,.mu{color:var(--muted)}
.tr-st .live{float:right;margin-left:10px}
.livebadge{display:inline-block;min-width:22px;text-align:center;border-radius:6px;padding:0 6px;font-size:.78rem;color:var(--text-2);box-shadow:inset 0 0 0 1px var(--line)}
.livebadge.hi2{background:rgba(255,181,71,.14);color:var(--warn);box-shadow:inset 0 0 0 1px rgba(255,181,71,.45)}
/* where the close sits inside the channel: the bar is the channel, the tick is the close */
.gauge{display:inline-block;position:relative;width:54px;height:6px;border-radius:3px;background:var(--line-2);vertical-align:middle;margin:0 6px}
.gauge i{position:absolute;top:-3px;width:3px;height:12px;border-radius:1.5px;background:var(--text);transform:translateX(-1.5px)}
.gauge.out i{background:var(--warn)}
.tr-none{padding:34px 16px;text-align:center;color:var(--muted)}
.tr-more{margin:14px 0 0;text-align:center}

/* ── cards: the same picture, bigger, three across ───────────────────────── */
.tr-list.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;border:0;background:none;overflow:visible}
.tr-list.cards .tr-row{display:block;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);padding:12px 14px}
.tr-list.cards .tr-row:first-child{border-top:1px solid var(--line)}
.tr-list.cards .tr-row:hover{border-color:var(--line-2);background:var(--surface-2)}
.tr-list.cards .tr-id{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap;margin-top:8px}
.tr-list.cards .tr-id span,.tr-list.cards .tr-id i{display:inline}
.tr-list.cards .tr-px{margin:4px 0 6px}
.tr-list.cards .tr-px b,.tr-list.cards .tr-px small{display:inline;margin-right:10px}
@media(max-width:980px){.tr-list.cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.tr-list.cards{grid-template-columns:1fr}}
@media(max-width:860px){
  .tr-row{grid-template-columns:minmax(0,1fr) 120px;grid-template-areas:"ch ch" "id px" "st st"}
  .tr-row .tr-ch{grid-area:ch} .tr-row .tr-id{grid-area:id} .tr-row .tr-px{grid-area:px;text-align:right} .tr-row .tr-st{grid-area:st}
}

/* ── the drawing ─────────────────────────────────────────────────────────── */
svg.tc{display:block;width:100%;height:auto;overflow:visible}
.tc .up{fill:var(--up);stroke:var(--up)} .tc .dn{fill:var(--dn);stroke:var(--dn)}
.tc .wk{stroke-width:1}
.tc .fill{fill:var(--accent);fill-opacity:.1;stroke:none}
.tc .wall{stroke:var(--accent);stroke-width:1.5;fill:none}
.tc .inner{stroke:var(--accent);stroke-width:1;stroke-dasharray:4 3;fill:none;opacity:.75}
.tc .res{stroke:var(--c-levels);stroke-width:1.5;fill:none}
.tc .sup{stroke:var(--c-iv);stroke-width:1.5;fill:none}
.tc .abc{stroke:var(--c-side);stroke-width:1.4;stroke-dasharray:6 4;fill:none}
.tc .ext{opacity:.55;stroke-dasharray:2 3}
.tc .pt{fill:var(--bg);stroke-width:1.4}
.tc .pt.p-ch{stroke:var(--accent)} .tc .pt.p-res{stroke:var(--c-levels)} .tc .pt.p-sup{stroke:var(--c-iv)} .tc .pt.p-abc{stroke:var(--c-side)}
.tc .ax{fill:var(--muted);font-size:10.5px;font-family:var(--mono)}
.tc .gl{stroke:var(--line);stroke-width:1}
.tc .lastpx{stroke:var(--muted);stroke-dasharray:2 3;stroke-width:1}
.tc .tag{fill:var(--surface-2);stroke:var(--line-2)}
.tc .tagt{fill:var(--text);font-size:10.5px;font-family:var(--mono)}
.tc .hv line{stroke:var(--muted);stroke-width:1}
.tc .hvt{fill:var(--text);font-size:11px;font-family:var(--mono)}
.tc .abcl{fill:var(--c-side);font-size:10.5px;font-weight:700}

/* ── the big picture ─────────────────────────────────────────────────────── */
.modal .mbox.card-t.wide{width:min(980px,100%)}
.tr-legend{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:.84rem;color:var(--text-2);margin:8px 0 2px}
.tr-legend span{display:inline-flex;align-items:center;gap:7px}
.tr-head{margin:14px 0 4px;color:var(--text);font-size:1rem}
.tr-tab{width:100%;font-size:.84rem;font-variant-numeric:tabular-nums;border-collapse:collapse;margin-top:6px}
.tr-tab td,.tr-tab th{padding:7px 10px;border-bottom:1px solid var(--line);text-align:right;white-space:nowrap}
.tr-tab th{font-size:.7rem;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);font-weight:600}
.tr-tab td:first-child,.tr-tab th:first-child{text-align:left;color:var(--text)}
.tr-tab tr:last-child td{border-bottom:0}
.tr-wrap{overflow-x:auto}
