/* discover view styles — extends the .dhead/.trow/.tcard rules in terminal.css */

/* ── header ── */
.disc .dtabs button{white-space:nowrap}
.dfbtn{position:relative;width:38px;height:38px}
.dfbtn .fdot{position:absolute;top:7px;right:7px;width:7px;height:7px;border-radius:50%;background:var(--brand);
  box-shadow:0 0 0 2px var(--card-2);display:none}
.dfbtn.on{color:var(--brand-text);border-color:var(--brand-line);background:var(--brand-soft)}
.dfbtn.on .fdot{display:block;animation:ping 2s ease-out infinite}
.qb-box label{display:inline-flex;align-items:center;gap:5px;cursor:text}
.qb-box .qb-ic{display:none;color:var(--brand)}
.qb-box .qb-cur{color:var(--mute);font-weight:600;font-size:14px;padding-right:1px}
.qb-box input{width:62px}
.qb-box:focus-within{border-color:var(--brand-line);box-shadow:0 0 0 3px rgba(var(--brand-rgb),.08)}
.rail-all{display:inline-flex;width:16px;height:16px;align-items:center;justify-content:center;color:var(--text-2)}
.rail button[aria-pressed=true] .rail-all{color:var(--brand)}

/* ── table header: sort affordances ── */
.thead .shint{display:none;color:var(--faint);font-size:11px;margin-left:2px}
.thead .shint::before{content:"· "}
.thead [data-sort=age]:hover .shint,.thead [data-sort=age].sorted .shint{display:inline}
.thead .sarr{display:inline-flex;opacity:0;color:var(--faint);transition:opacity .15s,transform .2s var(--ease)}
.thead .sortable:hover .sarr{opacity:1}
.thead .sorted .sarr{opacity:1;color:var(--brand)}
.thead .sortable:focus-visible{outline-offset:4px;border-radius:4px}

/* ── pair cell ── */
.c-pair .pl1 .sym{flex:0 0 auto;min-width:0;max-width:calc(100% - 46px);overflow:hidden;text-overflow:ellipsis;transition:color .15s}
.c-pair .pl1 a.sym:hover{color:var(--brand-text)}
.c-pair .pl1 .nm{flex:0 1 auto}
.c-pair .pl1 .copy,.c-pair .pl1 .star{flex-shrink:0}
.c-pair .pl1 .psuf{color:var(--mute);font-weight:500}
.pl2 .age:empty{display:none}
.pl2r{display:flex;align-items:center;gap:9px;min-width:0;overflow:hidden;
  -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 16px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 16px),transparent)}   /* what doesn't fit fades out instead of being cut mid-number */
.pl2r .hold{display:inline-flex;align-items:center;gap:4px;color:var(--text-2)}
.pl2r .held{display:inline-flex;align-items:center;gap:4px;height:19px;padding:0 6px;border-radius:6px;font-size:11px;font-weight:600;
  color:var(--brand-text);background:var(--brand-soft);border:1px solid var(--brand-line)}
.pl2r .tag{height:18px;font-size:10px;letter-spacing:.04em}
.spk{display:flex;flex-shrink:0;align-self:center}
.c-pair .av{outline:1px solid rgba(255,255,255,.06);outline-offset:-1px}
.c-pair .lp-pump .av{outline:1.5px solid rgba(var(--up-rgb),.75);outline-offset:2px}
.c-pair .lp-bonk .av{outline:1.5px solid rgba(240,150,60,.8);outline-offset:2px}
.c-pair .lp-other .av{outline:1.5px solid var(--brand-line);outline-offset:2px}
.c-pair .av-wrap .chain{z-index:1}

/* ── numbers / info / action ── */
.c-mc .mcv{display:inline-block;border-radius:5px;padding:0 3px;margin:0 -3px}
.c-tx .bs,.c-liq .bs,.c-vol .bs{font-size:12px}
.c-info{min-width:0}
.c-info .chips{display:grid;grid-template-columns:repeat(3,max-content);max-width:none}
.c-act .qbtn,.c-act .sbtn{width:100%;padding:0 10px;white-space:nowrap}
.c-act .qbtn{height:36px;font-size:13.5px}
.c-act .sbtn span,.c-act .qbtn span{overflow:hidden;text-overflow:ellipsis}
.trow.is-perp .c-act .qbtn{background:var(--up-soft);color:var(--up);border-color:var(--up-line)}
.trow.is-perp .c-act .qbtn:hover{background:var(--up);color:#03160b}

/* ── motion: first load streams in, later arrivals glow ── */
.tbody .trow.enter{animation:rowin .8s var(--ease) backwards;animation-delay:calc(var(--i,0) * 32ms)}
.tbody .trow.enter .spark path:last-child{stroke-dasharray:420;animation:sdraw .8s var(--ease) backwards;animation-delay:calc(var(--i,0) * 32ms + 80ms)}
.tbody .trow.enter .spark path:first-of-type{animation:fade .8s ease-out backwards;animation-delay:calc(var(--i,0) * 32ms + 160ms)}
@keyframes rowin{0%{opacity:0;transform:translateY(8px)}55%,100%{opacity:1;transform:none}}
@keyframes sdraw{0%{stroke-dashoffset:420}100%{stroke-dashoffset:0}}
.tbody .trow.newrow{animation:rownew 1.8s var(--ease)}
@keyframes rownew{0%{opacity:.3;transform:translateX(-10px);background:rgba(var(--brand-rgb),.16);box-shadow:inset 3px 0 0 var(--brand)}
  18%{opacity:1;transform:none}100%{background:rgba(var(--brand-rgb),0);box-shadow:inset 3px 0 0 rgba(var(--brand-rgb),0)}}

/* ── skeleton rows ── */
.tskel .trow{cursor:default}
.tskel .trow:hover{background:transparent}
.tskel .trow::before{display:none}
.skrow .skel{display:block}
.skrow .pmeta{gap:9px}
.sk-av{width:52px;height:52px;border-radius:var(--r-lg);flex-shrink:0}
.sk-a{height:15px}
.sk-b{height:12px}
.sk-sp{width:86px;height:30px;flex-shrink:0;opacity:.6}
.sk-n{width:62px;height:15px}
.sk-m{width:46px;height:11px}
.sk-ch{width:210px;height:50px;border-radius:8px;opacity:.7}
.sk-btn{height:36px;border-radius:var(--r)}

/* ── empty / error state ── */
.dmsg{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;text-align:center;
  padding:64px 24px 76px;color:var(--mute);font-size:13px;animation:rise .4s var(--ease)}
.dmsg > b{color:var(--text);font-size:17px;font-weight:650;letter-spacing:-.015em}
.dmsg p{margin:0;max-width:500px;line-height:1.6}
.dmsg p b{color:var(--text-2);font-weight:600}
.dmsg p .ic{vertical-align:-2px;color:var(--warn)}
.dmsg code{display:block;margin:12px auto 0;max-width:460px;padding:7px 10px;border-radius:8px;background:var(--bg-2);
  border:1px solid var(--line);font:11.5px/1.5 var(--mono);color:var(--text-2);word-break:break-word}
.dmsg .dm-note{display:block;margin-top:8px;color:var(--warn)}
.dmsg .mb{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin-top:10px}

/* ── next page ── */
.dmore{display:flex;align-items:center;justify-content:center;gap:12px;padding:18px 16px 22px;color:var(--faint);font-size:12px;
  border-top:1px solid var(--line)}
.dmore .btn{min-width:150px}

/* ── footer strip ── */
.tfoot{min-height:38px}
.tf-l,.tf-r{display:flex;align-items:center;gap:8px;min-width:0;white-space:nowrap}
.tf-l{flex-shrink:0}
.tf-r{flex:1 1 auto;justify-content:flex-end}
.tf-l b{color:var(--text-2);font-weight:600}
.tf-sep{color:var(--line-2)}
.tf-u{display:inline-flex;align-items:center;gap:4px}
.tf-u .upd.warn{color:var(--warn)}
.tf-rf{display:inline-flex;color:var(--faint);border-radius:5px;padding:3px;transition:color .15s,background .15s}
.tf-rf:hover{color:var(--text);background:var(--hover)}
.tf-rf.spin .ic{animation:spin .8s linear infinite}
.tf-l .fx button{color:var(--brand-text);font-weight:600;font-size:12px}
.tf-l .fx button:hover{text-decoration:underline}
.tf-r{overflow:hidden;gap:12px}
.srcs-k{color:var(--faint)}
.tf-r .src{display:inline-flex;align-items:center;gap:6px;color:var(--mute)}
.tf-r .src::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--up);box-shadow:0 0 6px rgba(var(--up-rgb),.55)}

/* ── filters dropdown (rendered by UI.dropdown inside .dd) ── */
.dfl{width:300px;max-width:calc(100vw - 32px);padding:2px 2px 0}
.dfl-h{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:4px 7px 9px;border-bottom:1px solid var(--line);margin-bottom:2px}
.dfl-h b{font-size:13.5px;font-weight:600;color:var(--text)}
.dfl-h span{color:var(--faint);font-size:11.5px}
.dfl-g{padding:8px 7px}
.dfl-k{display:block;font-size:12px;color:var(--text-2);margin-bottom:6px;font-weight:500}
.dfl-k span{color:var(--faint);font-weight:400}
.dfl .field-sm{height:34px}
.dfl-q{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;margin-top:6px}
.dfl-q button{height:24px;border-radius:6px;border:1px solid var(--line-2);color:var(--mute);font-size:11.5px;font-weight:600;transition:all .15s}
.dfl-q button:hover{color:var(--text);border-color:#33363f}
.dfl-q button[aria-pressed=true]{color:var(--brand-text);border-color:var(--brand-line);background:var(--brand-soft)}
.dfl .check{padding:7px 7px;align-items:flex-start;gap:9px}
.dfl .check input{margin:2px 0 0;flex-shrink:0}
.dfl .check span{display:flex;flex-direction:column;gap:1px;color:var(--text)}
.dfl .check small{color:var(--faint);font-size:11.5px;line-height:1.4}
.dfl-f{display:flex;justify-content:space-between;gap:8px;padding:9px 7px 7px;border-top:1px solid var(--line);margin-top:4px}

/* ── responsive: the table follows its own width (dock open or not) ── */
@container view (max-width:1500px){
  .disc .dtabs{gap:18px}
  .disc .dtabs button{font-size:18px}
}
@container view (max-width:1060px){
  .disc .dtabs{gap:14px}
  .disc .dtabs button{font-size:16.5px}
}
@container view (max-width:860px){
  .c-pair.pinfo{gap:10px}
  .c-act .qbtn{font-size:12.5px}
  .tfoot .tf-r{display:none}
}
@container view (max-width:640px){
  .disc .dhead{margin-bottom:10px;gap:8px}
  .disc .dtabs{width:100%;overflow-x:auto;padding:11px 2px 4px;margin-top:-9px;scrollbar-width:none;
    -webkit-mask-image:linear-gradient(90deg,#000 80%,transparent);mask-image:linear-gradient(90deg,#000 80%,transparent)}
  .disc .dtabs::-webkit-scrollbar{display:none}
  .disc .dtabs button{font-size:16px}
  .disc .dtools{width:100%;gap:6px;flex-wrap:nowrap}
  .disc .tfs button{padding:0 7px;font-size:13px}
  .disc .qb-box{flex:1;min-width:0}
  .disc .qb-box label{padding:0 4px 0 11px}
  .disc .qb-box .qb-ic{display:inline-flex}
  .disc .qb-box .qb-lt{display:none}
  .disc .qb-box input{flex:1;width:auto;min-width:28px}
  .disc .qb-box .presets button{padding:0 8px}
  .disc .dbody{gap:10px}
  .disc .rail button{flex-shrink:0;padding:0 10px}
  .disc .tbody .trow{min-height:76px}
  .c-pair.pinfo{gap:10px}
  .c-pair .pl1 .sym{font-size:14.5px;flex-shrink:1;max-width:100%}
  .c-pair .pl1 .copy,.c-pair .pl1 .star{display:none}
  .c-pair .pl2{gap:7px}
  .c-pair .pl2 .age{font-size:12.5px}
  .pl2r{gap:7px}
  .pl2r .held{display:none}
  .c-mc.cnum{font-size:14px}
  .c-act .qbtn{height:32px;font-size:12.5px;padding:0 6px;gap:3px}
  .c-act .qbtn .bw{display:none}
  .c-act .sbtn{height:26px;font-size:11px;padding:0 4px;gap:3px}
  .c-act .sbtn .ic{display:none}
  .tfoot{padding:8px 12px}
}
@container dtable (max-width:600px){
  .disc .trow{--tc-mc:78px;--tc-act:84px}
}

/* ═══════════════ Trenches → Streams (ui-streams.js) ═══════════════ */
.dtabs .dlive{display:inline-block;width:7px;height:7px;margin-right:7px;border-radius:50%;background:var(--down);vertical-align:2px;
  box-shadow:0 0 0 3px rgba(var(--down-rgb),.16)}
.dstreams{flex:1;min-height:0;overflow:auto;scrollbar-width:thin}
.st{display:flex;flex-direction:column;gap:22px;padding:2px 0 20px}
.st-player{border:1px solid var(--line);border-radius:var(--r-lg);background:var(--card);overflow:hidden}
.st-ph{display:flex;align-items:center;gap:8px;padding:7px 8px 7px 12px;border-bottom:1px solid var(--line);font-size:13px}
.st-ph .mute{font-size:12px}
.st-po{margin-left:auto;display:inline-flex;align-items:center;gap:5px;color:var(--mute);font-size:12px}
.st-po:hover{color:var(--text)}
.st-frame{position:relative;aspect-ratio:16/9;max-height:60vh;background:#000}
.st-frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.st-sec{display:flex;flex-direction:column;gap:10px}
.st-h{display:flex;align-items:center;gap:10px;min-height:28px}
.st-h h2{margin:0;font-size:15px;font-weight:600}
.st-n{font:500 12px var(--mono);color:var(--text-2)}
.st-src{margin-left:auto;color:var(--faint);font-size:11.5px;white-space:nowrap}
.st-rf{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:6px;color:var(--mute)}
.st-rf:hover{background:var(--hover);color:var(--text)}
.st-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(232px,1fr));gap:12px}
.st-card{display:flex;flex-direction:column;min-width:0;border:1px solid var(--line);border-radius:var(--r-lg);background:var(--card);overflow:hidden;transition:border-color .15s}
.st-card:hover{border-color:var(--line-2)}
.st-thumb{position:relative;display:block;width:100%;aspect-ratio:16/9;background:var(--bg-2);overflow:hidden}
.st-th{display:block;width:100%;height:100%;object-fit:cover}
.st-th.gone,.st-av.gone{visibility:hidden}
.st-live{position:absolute;left:8px;top:8px;height:18px;padding:0 6px;border-radius:4px;background:var(--down);color:#fff;font:600 10px/18px var(--sans);letter-spacing:.04em}
.st-v{position:absolute;left:8px;bottom:8px;display:inline-flex;align-items:center;gap:4px;height:20px;padding:0 6px;border-radius:4px;background:rgba(6,7,11,.8);color:#fff;font:500 11px var(--mono)}
.st-v:empty{display:none}
.st-play{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;opacity:0;background:rgba(6,7,11,.35);transition:opacity .15s}
.st-thumb:hover .st-play,.st-thumb:focus-visible .st-play{opacity:1}
.st-m{display:flex;gap:10px;min-width:0;padding:10px 12px 0}
.st-av{width:32px;height:32px;flex-shrink:0;border-radius:8px;object-fit:cover;background:var(--card-2)}
.st-avr{border-radius:50%}
.st-avl{display:flex;align-items:center;justify-content:center;color:var(--text-2);font-weight:600}
.st-mt{flex:1;min-width:0}
.st-mt b{font-size:13px;font-weight:600}
.st-sym{margin-left:6px;color:var(--mute);font:500 11.5px var(--mono)}
.st-mt p{margin:3px 0 0;color:var(--mute);font-size:12px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.st-f{display:flex;align-items:center;gap:6px;margin-top:auto;padding:10px 12px 12px}
.st-mc{margin-right:auto;color:var(--mute);font-size:12px;white-space:nowrap}
.st-mc b{color:var(--text);font:500 12px var(--mono)}
.st-msg{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:16px;border:1px dashed var(--line-2);border-radius:var(--r-lg);color:var(--mute);font-size:12.5px;line-height:1.5}
.st-msg b{color:var(--text-2);font-size:13px}
.st-msg code{font-size:11.5px}
.st-msg .btn{margin-top:4px}
.st-sk{padding-bottom:12px}
.st-skt{display:block;aspect-ratio:16/9;border-radius:0}
.st-skl{display:block;width:70%;height:11px;margin:10px 12px 0}
.st-skl.s{width:45%}
/* channels */
.st-add{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.st-add .inp{height:34px}
.st-plat{width:112px}
.st-add input{flex:1;min-width:200px;max-width:420px}
.st-err{flex-basis:100%;color:var(--down);font-size:12px}
.st-err:empty{display:none}
.st-list{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:var(--r-lg);background:var(--card);overflow:hidden}
.st-list > .st-msg{border:0;border-radius:0}
.st-row{display:flex;align-items:center;gap:10px;padding:9px 10px 9px 12px;border-bottom:1px solid var(--line)}
.st-row:last-child{border-bottom:0}
.st-pf{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;border-radius:6px;color:#fff;font:700 12px var(--sans)}
.st-pf.kick{background:#53fc18;color:#0b0c10}
.st-pf.twitch{background:#9146ff}
.st-pf.youtube{background:#ff0033;font-size:9px}
.st-rn{display:flex;flex-direction:column;gap:1px;flex:1;min-width:0}
.st-rn b{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.st-rn span{color:var(--mute);font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.st-cs{display:inline-flex;align-items:center;gap:6px;color:var(--mute);font-size:12px;white-space:nowrap}
.st-cs.on{color:var(--text)}
.st-cs i{width:7px;height:7px;border-radius:50%;background:var(--down)}
.st-ext,.st-rm{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:6px;color:var(--mute)}
.st-ext:hover,.st-rm:hover{background:var(--hover);color:var(--text)}
.st-fine{margin:0;color:var(--faint);font-size:11.5px}
@container view (max-width:640px){
  .st-grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:8px}
  .st-f .btn-ghost{display:none}
  .st-src{display:none}
  /* the form: platform and channel on one line, the button under them */
  .st-plat{width:96px}
  .st-add input{flex:1 1 140px;min-width:0;max-width:none}
  .st-add .btn{flex:1 1 100%;justify-content:center;height:34px}
  /* a channel: the live state goes under the name instead of squeezing it */
  .st-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto auto;grid-template-areas:"pf rn play ext rm" "pf cs play ext rm";column-gap:10px;row-gap:3px}
  .st-row > .st-pf{grid-area:pf}
  .st-row > .st-rn{grid-area:rn}
  .st-row > .st-cs{grid-area:cs;font-size:11.5px}
  .st-row > [data-play]{grid-area:play}
  .st-row > .st-ext{grid-area:ext}
  .st-row > .st-rm{grid-area:rm}
}
