/* Screener with a decision log: recipe-specific styles (tokens from shared/kit.css) */

.ts { padding: 20px; display: grid; gap: 16px; min-height: 0; overflow: visible; }
.ts-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.ts-meta, .ts-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.ts-meta .chip { white-space: normal; max-width: 100%; }
.ts code { font-size: 0.92em; }
.ts-ep code { color: var(--green-hi); }
.ts-ep:hover code { color: var(--green-face); }

/* stepper */
.ts-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.ts-steps li {
  display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--bg-2); color: var(--muted); font: 600 13px/1.2 var(--font);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: border-color .2s, color .2s, background .2s;
}
.ts-steps li span {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font: 700 11px/1 var(--mono); background: var(--surface-2); color: var(--muted);
}
.ts-steps li.done { color: var(--fg-2); }
.ts-steps li.done span { background: var(--green-wash); color: var(--green-hi); }
.ts-steps li.current { color: var(--fg); border-color: rgba(92, 206, 20, 0.5); background: var(--green-wash); }
.ts-steps li.current span { background: var(--green-face); color: var(--green-ink); }
.ts-now { font-size: 12px; color: var(--muted); min-height: 1.4em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* panels */
.ts-body { display: grid; gap: 16px; }
.ts-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ts-panel {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r); padding: 18px;
  display: grid; gap: 14px; min-width: 0; transition: opacity .35s ease;
}
.ts-panel.ts-wait { opacity: 0.35; }
.ts-panel-head { display: grid; gap: 4px; }
.ts-panel-head h3 { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.ts-panel-head p { max-width: 820px; }
.ts-n {
  width: 24px; height: 24px; border-radius: 6px; display: inline-grid; place-items: center; flex-shrink: 0;
  font: 700 12px/1 var(--mono); color: var(--green-ink); background: var(--green-face);
}
.ts-hidden { display: none !important; }
@keyframes ts-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* logos */
.ts-logo { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; object-fit: cover; background: var(--surface-2); }
.ts-logo.lg { width: 36px; height: 36px; }
.ts-logo.sm { width: 22px; height: 22px; }
.ts-logo.xs { width: 16px; height: 16px; }
.ts-initials { display: inline-grid; place-items: center; font: 700 9px/1 var(--mono); color: var(--muted); }

/* decision badges (same look as the home page preview) */
.ts-dec { display: inline-block; font: 700 11px/1 var(--mono); padding: 5px 8px; border-radius: 5px; letter-spacing: .04em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ts-dec.buy { color: var(--green-ink); background: var(--green-face); }
.ts-dec.watch { color: #2b1d00; background: var(--amber); }
.ts-dec.avoid { color: #fff; background: #c43c48; }

/* 1. screen: scatter + table */
.ts-chart-wrap { display: grid; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 12px 12px 8px; animation: ts-in .35s ease both; }
.ts-scatter { width: 100%; height: auto; display: block; overflow: visible; }
.ts-scatter text { font: 500 11px var(--mono); fill: var(--muted); }
.ts-scatter text.ax { fill: var(--faint); }
.ts-scatter text.lbl { font: 700 12px var(--font); fill: var(--fg); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.ts-scatter .g { stroke: var(--border); }
.ts-scatter .o { fill: var(--faint); opacity: .7; }
.ts-scatter .o.stock { fill: #58a6ff; opacity: .6; }
.ts-scatter .ring { fill: var(--surface); stroke: var(--green-hi); stroke-width: 2; }
.ts-scatter .pi { fill: var(--green-face); }
.ts-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--muted); }
.ts-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ts-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.ts-legend i.dot { border-radius: 50%; background: var(--faint); }
.ts-legend i.dot.pick { background: var(--surface); box-shadow: inset 0 0 0 2px var(--green-hi); }
.ts-legend i.dot.stock { background: #58a6ff; opacity: .7; }
.ts-legend i.ln { width: 2px; height: 12px; background: linear-gradient(var(--amber) 50%, var(--green-face) 50%); }

.ts .table-scroll { background: var(--surface); }
.ts-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.ts-table th, .ts-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
.ts-table th { font: 500 11px/1 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.ts-table tbody tr:last-child td { border-bottom: 0; }
.ts-table .num { text-align: right; font-family: var(--mono); }
.ts-table tr.is-pick td { background: rgba(92, 206, 20, 0.04); }
.ts-pool { display: inline-flex; align-items: center; gap: 10px; }
.ts-pool > span { display: grid; }
.ts-pool small { font: 500 11px/1.3 var(--mono); color: var(--muted); }
.ts-linkbtn { background: none; border: 0; padding: 0; font: 500 13px/1.4 var(--font); color: var(--green-hi); cursor: pointer; }
.ts-linkbtn:hover { color: var(--green-face); }
.ts-tag {
  display: inline-block; font: 600 11px/1.3 var(--mono); padding: 3px 7px; border-radius: 5px;
  color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); white-space: nowrap;
}
.ts-lane-row th { padding-top: 14px; color: var(--fg-2); background: var(--bg-2); text-transform: none; letter-spacing: 0; font: 600 12px/1.2 var(--font); }
.ts-lane-row th small { font: 500 11px/1.2 var(--mono); color: var(--muted); margin-left: 6px; }
.ts-tag.pick { color: var(--green-hi); background: var(--green-wash); border-color: rgba(92, 206, 20, 0.25); }

/* 2. checks: token cards */
.ts-legend .sw, .ts-comp .sw { border-radius: 2px; }
.sw.hold { background: var(--green-hi); }
.sw.exit { background: var(--red); }
.sw.bot { background: var(--faint); }
.sw.never { background: var(--purple); }
.sw.other { background: var(--surface-2); }
.ts-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ts-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 14px; display: grid; gap: 12px; min-width: 0;
  animation: ts-in .35s ease both; transition: border-color .2s;
}
.ts-card.is-selected { border-color: rgba(128, 224, 56, 0.55); }
.ts-card-head {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto 96px; align-items: center; gap: 10px;
  background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.ts-card-name { display: grid; min-width: 0; }
.ts-card-name b { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.ts-kind { font: 600 10px/1 var(--mono); font-style: normal; text-transform: uppercase; letter-spacing: .05em; padding: 3px 5px; border-radius: 4px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); }
.ts-kind.stock { color: #8cc1ff; background: rgba(88, 166, 255, 0.12); border-color: rgba(88, 166, 255, 0.3); }
.ts-verdict { display: flex; align-items: flex-start; gap: 8px; margin: 0; font: 600 13px/1.35 var(--font); color: var(--fg); }
.ts-verdict i { flex: none; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--faint); }
.ts-verdict.buying i, .ts-verdict.holding i { background: var(--green-hi); }
.ts-verdict.mixed i, .ts-verdict.flat i { background: var(--amber); }
.ts-verdict.out i { background: var(--red); }
.ts-card-name small, .ts-card-price small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-card-price { display: grid; text-align: right; font: 600 13px/1.3 var(--mono); }
.ts-spark { width: 96px; height: 36px; display: block; }
.ts-block { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); min-width: 0; }
.ts-block-label { font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ts-block-label small { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--faint); margin-left: 6px; }
.ts-gate { color: var(--red); font-size: 12px; }

.ts-sec { display: grid; grid-template-columns: auto auto minmax(90px, 1fr) auto auto; align-items: center; gap: 12px; }
.ts-gt { display: inline-flex; align-items: center; gap: 8px; }
.ts-gt > span { display: grid; }
.ts-gt b { font: 700 16px/1 var(--mono); }
.ts-gt small, .ts-mini small, .ts-meter small { font: 500 10px/1.3 var(--mono); color: var(--muted); }
.ts-ring { width: 34px; height: 34px; }
.ts-auth { display: grid; gap: 2px; font: 600 12px/1.3 var(--mono); white-space: nowrap; }
.ts-auth .mid { color: var(--fg-2); }
.ts-meter { display: grid; gap: 4px; min-width: 0; }
.ts-meter-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.ts-meter-top b { font: 700 13px/1 var(--mono); }
.ts-meter-bar { position: relative; height: 8px; border-radius: 4px; background: var(--surface-2); }
.ts-meter-bar i { display: block; height: 100%; border-radius: 4px; background: #58a6ff; }
.ts-meter-bar i.bad { background: var(--red); }
.ts-meter-bar em { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--fg-2); border-radius: 1px; }
.ts-mini { display: grid; text-align: right; }
.ts-mini b { font: 700 13px/1.2 var(--mono); }

.ts-comp { display: flex; gap: 2px; height: 12px; border-radius: 4px; overflow: hidden; }
.ts-comp .sw { height: 100%; }
.ts-comp-n { display: flex; flex-wrap: wrap; gap: 4px 12px; font: 500 11px/1.3 var(--mono); }
.ts-wallets { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-wallet {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; font-size: 12px; color: var(--fg-2);
  background: var(--bg-2); border: 1px solid var(--border); white-space: nowrap;
}
.ts-wallet:hover { color: var(--fg); border-color: var(--border-strong); }
.ts-wallet .mono { font-size: 11px; color: var(--muted); }
.ts-wallet b { font-weight: 600; color: var(--fg); }
.ts-wallet em { font-style: normal; font: 700 10px/1 var(--mono); padding: 3px 5px; border-radius: 4px; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
.ts-wallet.holding em, .ts-wallet.accumulating em { color: var(--green-hi); background: var(--green-wash); }
.ts-wallet.exited em { color: var(--red); background: var(--red-wash); }

.ts-cols { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.ts-col { display: grid; justify-items: center; gap: 3px; }
.ts-col-bar { position: relative; width: 100%; max-width: 34px; height: 44px; border-radius: 4px; background: var(--surface-2); display: flex; align-items: flex-end; overflow: hidden; }
.ts-col-bar::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed rgba(223, 229, 236, 0.25); }
.ts-col-bar i { display: block; width: 100%; background: var(--amber); transition: height .3s; }
.ts-col.up i { background: var(--green-hi); }
.ts-col.down i { background: var(--red); }
.ts-col small { font: 500 10px/1 var(--mono); color: var(--muted); }
.ts-col b { font: 600 11px/1 var(--mono); }

/* 3. controls + score bars */
.ts-controls { display: grid; gap: 12px; }
.ts-controls fieldset { border: 1px solid var(--border); border-radius: var(--r); padding: 10px 12px 12px; margin: 0; display: grid; gap: 8px; min-width: 0; }
.ts-controls legend { font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 6px; }
.ts-slider { display: grid; grid-template-columns: 104px minmax(0, 1fr) 34px; align-items: center; gap: 10px; font-size: 13px; color: var(--fg-2); }
.ts-slider output { font: 600 13px/1 var(--mono); color: var(--fg); text-align: right; }
.ts-slider input { width: 100%; accent-color: var(--green-hi); min-width: 0; }
.ts-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-2); }
.ts-check input { accent-color: var(--green-hi); }
.ts-controls-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ts-counts { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ts-bars li { border-radius: var(--r-sm); }
.ts-bars li.is-selected { background: rgba(92, 206, 20, 0.07); }
.ts-bar-row {
  width: 100%; display: grid; grid-template-columns: 112px minmax(0, 1fr) 84px; align-items: center; gap: 10px;
  background: none; border: 0; padding: 6px; color: inherit; font: inherit; cursor: pointer; text-align: left; border-radius: var(--r-sm);
}
.ts-bar-row:hover { background: var(--surface-2); }
.ts-bar-row .ts-dec { justify-self: end; }
.ts-bar-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.ts-bar-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-bar { position: relative; display: flex; height: 14px; border-radius: 4px; background: var(--surface-2); }
.ts-bar i { display: block; height: 100%; transition: width .25s ease; }
.ts-bar i:first-child { border-radius: 4px 0 0 4px; }
.ts-bar em { position: absolute; top: -3px; bottom: -3px; width: 2px; border-radius: 1px; }
.ts-bar .ln-watch { left: var(--watch); background: var(--amber); }
.ts-bar .ln-buy { left: var(--buy); background: var(--green-face); }
.p-safety { background: #58a6ff; }
.p-smart_money { background: var(--purple); }
.p-momentum { background: var(--green-hi); }
.p-liquidity { background: #e6c07b; }

/* 4. decision log (rows like the home page preview) */
.ts-log { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }
.ts-log > li { border-bottom: 1px solid var(--border); min-width: 0; }
.ts-log > li:last-child { border-bottom: 0; }
.ts-log > li.is-selected { background: rgba(92, 206, 20, 0.06); }
.ts-log-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; list-style: none; }
.ts-log-row::-webkit-details-marker { display: none; }
.ts-log-row:hover { background: var(--surface-2); }
.ts-log-nm { display: grid; min-width: 0; }
.ts-log-nm b { font-weight: 650; }
.ts-log-nm small { font: 500 12px/1.35 var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-log-body { padding: 0 12px 12px 50px; display: grid; gap: 6px; }
.ts-rule { color: var(--fg-2); }
.ts-reasons { margin: 0; padding-left: 18px; color: var(--fg-2); display: grid; gap: 4px; }
.ts-reasons b { color: var(--fg); }

/* 5. telegram */
.ts-alert { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
.ts-alert-side { display: grid; gap: 12px; min-width: 0; }
.ts-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-chip {
  display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--mono); padding: 5px 10px 5px 6px; border-radius: 999px; cursor: pointer;
  color: var(--fg-2); background: var(--surface); border: 1px solid var(--border); position: relative;
}
.ts-chip::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.ts-chip.buy::after { background: var(--green-face); }
.ts-chip.watch::after { background: var(--amber); }
.ts-chip.avoid::after { background: var(--red); }
.ts-chip[aria-selected="true"] { color: var(--fg); border-color: rgba(128, 224, 56, 0.6); background: rgba(92, 206, 20, 0.1); }
.ts-tg { display: grid; gap: 12px; min-width: 0; }
.ts-send { font-size: 13px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--border); color: var(--fg-2); }
.ts-send.yes { border-color: rgba(92, 206, 20, 0.35); background: var(--green-wash); }
.ts-send.no { border-color: rgba(245, 177, 61, 0.3); background: var(--amber-wash); }
.ts-send b { color: var(--fg); }
.ts-phone { background: #0e1621; border: 1px solid #1f2b38; border-radius: 14px; overflow: hidden; }
.ts-phone.muted-card .ts-bubble { opacity: .85; }
.ts-phone-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #17212b; border-bottom: 1px solid #1f2b38; }
.ts-phone-head b { display: block; font-size: 14px; color: #fff; }
.ts-phone-head small { display: block; font-size: 12px; color: #6d7f8f; line-height: 1.2; }
.ts-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 700 14px/1 var(--font); color: var(--green-ink); background: var(--green-face); }
.ts-bubble {
  position: relative; margin: 14px 14px 16px; padding: 10px 12px 18px; background: #182533; color: #f5f5f5;
  border-radius: 12px 12px 12px 4px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; max-width: 100%;
}
.ts-bubble b { color: #fff; }
.ts-bubble code { font-size: 12.5px; color: #e6c07b; word-break: break-all; }
.ts-bubble a { color: #6ab3f3; }
.ts-bubble i { color: #a4b3c2; }
.ts-time { position: absolute; right: 10px; bottom: 5px; font-size: 11px; color: #6d7f8f; }
.ts-payload summary { cursor: pointer; color: var(--muted); }
.ts-json {
  margin: 8px 0 0; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-sm);
  font: 500 11.5px/1.5 var(--mono); color: var(--fg-2); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow: auto;
}

.ts-caveat { color: var(--muted); border-top: 1px solid var(--border); padding-top: 12px; }

/* below the demo */
.ts-prompts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ts-prompts li { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); font-size: 14px; color: var(--fg-2); }
.ts-prompts .copy-btn { flex-shrink: 0; }
.ts-more .endpoint-table a code { color: var(--green-hi); }

@media (prefers-reduced-motion: reduce) { .ts-card, .ts-chart-wrap { animation: none; } }
@media (max-width: 1100px) {
  .ts-sec { grid-template-columns: auto auto minmax(90px, 1fr); }
  .ts-sec .ts-mini { text-align: left; }
}
@media (max-width: 960px) {
  .ts-grid, .ts-alert, .ts-cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .ts { padding: 12px; gap: 12px; border-radius: var(--r); }
  .ts-panel { padding: 12px; }
  .ts-steps { gap: 4px; }
  .ts-steps li { padding: 6px; gap: 0; justify-content: center; font-size: 0; }
  .ts-steps li span { font-size: 11px; }
  .ts-steps li.current { font-size: 12px; gap: 6px; }
  .ts-card-head { grid-template-columns: auto minmax(0, 1fr) auto; }
  .ts-card-head .ts-spark { grid-column: 1 / -1; width: 100%; height: 32px; }
  .ts-sec { grid-template-columns: auto minmax(0, 1fr); }
  .ts-sec .ts-meter { grid-column: 1 / -1; }
  .ts-slider { grid-template-columns: 86px minmax(0, 1fr) 30px; }
  .ts-bar-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; }
  .ts-bar { grid-column: 1 / -1; grid-row: 2; }
  .ts-log-body { padding-left: 12px; }
  .ts-actions .btn { flex: 1; }
}

