/* RKT ACADEMY - trading-terminal pieces shared by the games: chart, round markers, detail cards, position badge, order bar, feeds.
 * Colours come from the existing tokens; the terminal look is layout and density, not a new palette. */
.terminal { display: grid; gap: 8px; }
.terminal.tc-full { position: fixed; inset: 0; z-index: 95; background: var(--bg); padding: calc(var(--safe-t, 0px) + 6px) max(8px, var(--safe-r, 0px)) calc(var(--safe-b, 0px) + 8px) max(8px, var(--safe-l, 0px)); grid-template-rows: auto minmax(0, 1fr) auto; overflow: auto; }
body.chart-full { overflow: hidden; }

.tchart { display: flex; flex-direction: column; height: clamp(300px, 46svh, 460px); background: #0b1016; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; min-height: 0; }
.terminal.tc-full .tchart { height: auto; min-height: 0; }
.tc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--line); min-height: 40px; }
.tc-info { display: flex; flex-wrap: wrap; gap: 2px 10px; font-family: var(--f-mono); font-size: .68rem; color: var(--dim); min-width: 0; line-height: 1.35; }
.tc-info b { color: var(--text); font-weight: 600; } .tc-info b.up { color: var(--good); } .tc-info b.down { color: var(--bad); } .tc-info .ti-t { color: var(--text2); }
@media (max-width: 420px) { .tc-info .ti-v { display: none; } }
.tc-tools { display: flex; gap: 4px; flex: none; }
.tc-btn { min-width: 36px; min-height: 36px; padding: 0 8px; background: var(--panel2); color: var(--text2); border: 1px solid var(--line2); border-radius: 8px; font: 700 .8rem var(--f-mono); cursor: pointer; touch-action: manipulation; }
.tc-btn:hover { color: var(--text); border-color: var(--dim); } .tc-btn.tc-live { color: var(--accent); border-color: var(--accent); }
.tc-plot { position: relative; flex: 1; min-height: 0; touch-action: pan-y; cursor: crosshair; }
.tc-canvas { position: absolute; inset: 0; display: block; }
.tc-markers { position: absolute; inset: 0; pointer-events: none; }

/* round markers: avatar disc, identity ring by kind (in the SVG), B/S badge and a green or red outer ring by side */
.mk { position: absolute; left: 0; top: 0; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; pointer-events: auto; will-change: transform; animation: mkPop .26s var(--ease) both; transition: transform .22s var(--ease); }
.mk::before { content: ''; position: absolute; inset: -8px; border-radius: 50%; }
.mk svg { display: block; width: 100%; height: 100%; border-radius: 50%; }
.mk.buy { box-shadow: 0 0 0 2px var(--good), 0 2px 8px rgba(0,0,0,.5); } .mk.sell { box-shadow: 0 0 0 2px var(--bad), 0 2px 8px rgba(0,0,0,.5); }
.mk-b { position: absolute; right: -4px; bottom: -4px; width: 14px; height: 14px; display: grid; place-items: center; border-radius: 50%; font: 800 .52rem var(--f-mono); font-style: normal; color: #0b0e12; border: 1.5px solid #0b1016; }
.mk.buy .mk-b { background: var(--good); } .mk.sell .mk-b { background: var(--bad); }
.mk-n { position: absolute; left: -4px; top: -5px; min-width: 15px; height: 15px; padding: 0 3px; display: grid; place-items: center; border-radius: 8px; background: var(--text); color: #0b0e12; font: 800 .58rem var(--f-mono); font-style: normal; }
.mk.mk-post { border-radius: 8px; background: #0f1722; box-shadow: 0 0 0 1.5px var(--fact), 0 2px 8px rgba(0,0,0,.5); display: grid; place-items: center; } .mk-x { font: 800 .78rem var(--f-display); color: var(--fact); }
.mk:focus-visible { outline: 3px solid var(--fact); outline-offset: 3px; }
@keyframes mkPop { from { opacity: 0; scale: .4; } to { opacity: 1; scale: 1; } }

.tc-pos { position: absolute; left: 8px; bottom: calc(17% + 26px); display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; padding: 4px 9px; max-width: calc(100% - 80px); background: rgba(15,22,32,.92); border: 1px solid var(--line2); border-left-width: 3px; border-radius: 8px; line-height: 1.3; pointer-events: none; z-index: 3; }
.tc-pos small { font: 600 .55rem var(--f-mono); letter-spacing: .12em; color: var(--dim); } .tc-pos b { font: 700 .82rem var(--f-display); } .tc-pos em { font: 600 .7rem var(--f-mono); font-style: normal; }
.tc-pos.good { border-left-color: var(--good); } .tc-pos.good em { color: var(--good); } .tc-pos.bad { border-left-color: var(--bad); } .tc-pos.bad em { color: var(--bad); }

.tc-card { position: absolute; z-index: 6; width: 260px; padding: 12px; background: var(--raise); border: 1px solid var(--line2); border-radius: 12px; box-shadow: 0 14px 36px rgba(0,0,0,.6); font-size: .82rem; animation: mkPop .18s var(--ease) both; }
@media (max-width: 559px) { .tc-card { position: fixed; left: 8px !important; right: 8px; top: auto !important; bottom: calc(env(safe-area-inset-bottom, 0px) + 10px); width: auto; max-height: 56svh; overflow: auto; z-index: 130; } }
.tc-x { position: absolute; right: 6px; top: 6px; width: 36px; height: 36px; background: none; border: 0; color: var(--dim); font-size: 1rem; cursor: pointer; border-radius: 8px; } .tc-x:hover { color: var(--text); background: var(--panel2); }
.tcc-head { display: flex; align-items: center; gap: 8px; padding-right: 34px; margin-bottom: 8px; } .tcc-head b { font: 700 .92rem var(--f-display); min-width: 0; overflow-wrap: anywhere; }
.tcc-head em { margin-left: auto; font: 800 .62rem var(--f-mono); font-style: normal; letter-spacing: .08em; padding: 2px 7px; border-radius: 999px; }
.tcc-head.buy em { background: var(--good-soft); color: var(--good); } .tcc-head.sell em { background: var(--bad-soft); color: var(--bad); } .tcc-head.post em { background: var(--fact-soft); color: var(--fact); }
.tcc-av { display: block; width: 34px; height: 34px; flex: none; }
.tcc-rows { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; } .tcc-rows dt { color: var(--dim); font: 600 .66rem var(--f-mono); letter-spacing: .06em; text-transform: uppercase; padding-top: 2px; } .tcc-rows dd { margin: 0; color: var(--text); font-family: var(--f-mono); font-size: .78rem; overflow-wrap: anywhere; }
.tcc-back { margin-top: 10px; } .tcc-h { display: block; font: 700 .86rem var(--f-display); margin: 0 34px 8px 0; }
.tcc-list { display: grid; gap: 4px; max-height: 220px; overflow: auto; }
.tcc-li { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 8px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-size: .78rem; cursor: pointer; text-align: left; } .tcc-li span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; } .tcc-li em { font: 700 .66rem var(--f-mono); font-style: normal; } .tcc-li.buy em { color: var(--good); } .tcc-li.sell em { color: var(--bad); } .tcc-li.post em { color: var(--fact); }

.tc-card.hidden, .tc-pos.hidden, .tc-btn.hidden { display: none; }

/* ---- Rug Escape terminal layout ---- */
.rug-terminal { --tm-gap: 8px; }
.tm-top { display: grid; gap: 8px; }
.tm-l { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tm-tok { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; } .tm-tok b { font: 700 1.25rem var(--f-display); } .tm-tok span { color: var(--dim); font-size: .85rem; }
.tm-sim { font: 700 .56rem var(--f-mono); font-style: normal; letter-spacing: .12em; padding: 2px 6px; border: 1px solid var(--line2); border-radius: 999px; color: var(--dim); }
.tm-mcap { display: flex; align-items: baseline; gap: 8px; } .tm-mcap small { font: 600 .6rem var(--f-mono); letter-spacing: .12em; color: var(--dim); } .tm-mcap b { font: 700 1.5rem var(--f-display); font-variant-numeric: tabular-nums; } .tm-mcap em { font: 700 .85rem var(--f-mono); font-style: normal; }
.tm-mcap .up, .tm-mcap em.up { color: var(--good); } .tm-mcap .down, .tm-mcap em.down { color: var(--bad); }
.tm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } .tm-stats .tm-st:nth-child(n+4) { display: none; } @media (min-width: 720px) { .tm-stats { grid-template-columns: repeat(6, 1fr); } .tm-stats .tm-st:nth-child(n+4) { display: block; } }
.tm-st { padding: 5px 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; min-width: 0; } .tm-st small { display: block; font: 600 .54rem var(--f-mono); letter-spacing: .1em; color: var(--dim); } .tm-st b { font: 600 .78rem var(--f-mono); white-space: nowrap; } .tm-st.bad b { color: var(--bad); } .tm-st.good b { color: var(--good); }
.tm-chartwrap { position: relative; } .terminal.tc-full .tm-chartwrap { min-height: 0; display: flex; flex-direction: column; } .terminal.tc-full .tm-chart { flex: 1; min-height: 0; display: flex; flex-direction: column; } .terminal.tc-full .tm-chart.tchart { height: auto; }
.tm-decision { position: absolute; inset: auto 8px 8px 8px; z-index: 8; padding: 14px; background: rgba(16,21,27,.97); border: 1px solid var(--accent); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.65); animation: mkPop .2s var(--ease) both; }
.tm-decision.hidden { display: none; } .tm-decision h3 { margin: 0 0 6px; font-size: 1.05rem; } .tm-decision p { margin: 0 0 10px; color: var(--text2); font-size: .88rem; }
.tm-dec-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } .tm-dec-btns .btn { flex-direction: column; gap: 2px; padding: 8px 6px; min-height: 52px; line-height: 1.1; } .tm-dec-btns small { font: 500 .6rem var(--f-mono); opacity: .8; letter-spacing: 0; }
.tm-ctl { display: grid; gap: 8px; }
.tm-posrow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tm-c { padding: 5px 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; min-width: 0; } .tm-c small { display: block; font: 600 .5rem var(--f-mono); letter-spacing: .06em; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tm-c b { font: 600 .78rem var(--f-mono); white-space: nowrap; } .tm-c.good b { color: var(--good); } .tm-c.bad b { color: var(--bad); }
.tm-exp { height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; } .tm-exp i { display: block; height: 100%; background: linear-gradient(90deg, var(--good), var(--warn) 60%, var(--bad)); transition: width .25s var(--ease); }
.tm-order { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .tm-side { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.tm-btn { display: grid; gap: 1px; align-content: center; justify-items: center; min-height: 50px; padding: 4px 2px; border: 1px solid var(--line2); border-radius: 10px; font-family: var(--f-display); cursor: pointer; touch-action: manipulation; color: #0b0e12; }
.tm-btn b { font-size: .8rem; line-height: 1.1; } .tm-btn small { font: 500 .56rem var(--f-mono); opacity: .85; }
.tm-btn.buy { background: var(--good); border-color: transparent; } .tm-btn.sell { background: var(--bad); border-color: transparent; color: #fff; } .tm-btn[disabled] { opacity: .35; cursor: not-allowed; filter: grayscale(.6); } .tm-btn:not([disabled]):active { transform: translateY(1px); }
.tm-ff { justify-self: start; } .tm-ff.hidden { display: none; }
.tm-low { display: grid; gap: 6px; } .tm-tabs { display: flex; gap: 4px; overflow-x: auto; } .tm-tab { min-height: 40px; padding: 0 12px; background: var(--panel); color: var(--dim); border: 1px solid var(--line); border-radius: 8px; font: 600 .74rem var(--f-mono); cursor: pointer; white-space: nowrap; } .tm-tab.sel { color: var(--text); border-color: var(--accent); }
.tm-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; min-height: 150px; max-height: 240px; overflow: auto; } .tm-list { list-style: none; margin: 0; padding: 4px 0; }
.tm-row { display: flex; align-items: flex-start; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--line); font-size: .8rem; } .tm-row:last-child { border-bottom: 0; } .tm-row em { margin-left: auto; font: 500 .66rem var(--f-mono); font-style: normal; color: var(--dim); flex: none; }
.tm-tx { flex: 1; min-width: 0; overflow-wrap: anywhere; color: var(--text2); } .tm-tx small { display: block; color: var(--dim); font: 500 .62rem var(--f-mono); } .tm-tx b { color: var(--text); }
.tm-av { display: block; width: 30px; height: 30px; flex: none; } .tm-ic { flex: none; width: 18px; text-align: center; }
.tm-row.alert.l1 { color: var(--warn); } .tm-row.alert.l2, .tm-row.read.l2, .tm-row.read.l3 { color: var(--bad); } .tm-row.read b { font: 700 .8rem var(--f-mono); } .tm-row.quiet { color: var(--dim); }
.tm-row.chat b { font: 600 .7rem var(--f-mono); color: var(--fact); flex: none; max-width: 9ch; overflow: hidden; text-overflow: ellipsis; }
.tm-row.tx b { font: 700 .72rem var(--f-mono); flex: none; } .tm-row.tx.buy b { color: var(--good); } .tm-row.tx.sell b { color: var(--bad); } .tm-row.tx .tm-tx { font-family: var(--f-mono); font-size: .72rem; }
.tm-k { flex: none; font: 800 .54rem var(--f-mono); letter-spacing: .06em; padding: 2px 5px; border-radius: 4px; background: var(--panel2); color: var(--text2); } .tm-k.k-kol { color: #a99cf5; } .tm-k.k-dev { color: var(--warn); } .tm-k.k-whale { color: var(--fact); } .tm-k.k-smart { color: var(--good); } .tm-k.k-sniper { color: #ff9b5c; } .tm-k.k-insider { color: var(--bad); } .tm-k.k-player { color: var(--accent); } .tm-k.k-bot { color: var(--dim); } .tm-k.k-flow { color: var(--dim); }
.tm-replay { margin: 10px 0; }
.terminal.tc-full .tm-low, .terminal.tc-full .tm-top .tm-stats { display: none; }
@media (max-width: 380px) { .tm-btn b { font-size: .72rem; } }

/* home hero preview: SVG candles + non-interactive avatar markers */
.hp-chart { position: relative; height: 150px; } .hp-chart .hp-svg, .hp-chart .hp-svg svg { height: 100%; }
.hp-mk { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; box-shadow: 0 0 0 2px var(--good); } .hp-mk.sell { box-shadow: 0 0 0 2px var(--bad); } .hp-mk svg { display: block; width: 100%; height: 100%; border-radius: 50%; }

.rug-terminal .tchart { height: clamp(250px, 36svh, 400px); }
.rug-terminal .tm-top { gap: 6px; } .rug-terminal .tm-ctl { gap: 6px; }
@media (min-width: 900px) and (min-height: 760px) { .rug-terminal .tchart { height: clamp(300px, 44svh, 480px); } }

.tm-ticker { min-height: 28px; padding: 5px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; font: 500 .74rem var(--f-mono); color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tm-ticker.alert { color: var(--warn); border-color: rgba(229,180,69,.4); }
.tm-event { position: absolute; left: 8px; right: 8px; top: 48px; z-index: 7; padding: 8px 12px; border-radius: 10px; font: 800 .78rem var(--f-mono); letter-spacing: .04em; text-align: center; pointer-events: none; background: rgba(16,21,27,.95); border: 1px solid var(--line2); animation: mkPop .22s var(--ease) both; }
.tm-event.bad { color: #fff; background: var(--bad); border-color: transparent; } .tm-event.good { color: #0b0e12; background: var(--good); border-color: transparent; } .tm-event.warn { color: var(--warn); border-color: var(--warn); } .tm-event.hidden { display: none; }
.tm-ticker:empty { display: none; }

.candle .tchart { height: clamp(220px, 34svh, 340px); }

.bot .tchart { height: clamp(190px, 27svh, 280px); margin: 8px 0; }

.risk .tchart { height: clamp(230px, 34svh, 360px); }
.risk .risk-chart { margin-bottom: 8px; }

/* ---- Slippage Lab order panel ---- */
.order-panel { display: grid; gap: 10px; padding: 12px; background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; }
.op-head { display: flex; justify-content: space-between; align-items: baseline; } .op-head b { font: 800 .8rem var(--f-mono); letter-spacing: .1em; color: var(--good); } .op-head span { color: var(--dim); font: 500 .72rem var(--f-mono); }
.op-amt { display: flex; align-items: baseline; justify-content: space-between; } .op-amt small { font: 600 .6rem var(--f-mono); letter-spacing: .12em; color: var(--dim); } .op-amt b { font: 700 1.5rem var(--f-display); font-variant-numeric: tabular-nums; }
.op-rows { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.op-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 7px 10px; background: var(--panel2); } .op-k { font-size: .8rem; color: var(--text2); } .op-k small { display: block; font: 500 .62rem var(--f-mono); color: var(--dim); } .op-row b { font: 600 .8rem var(--f-mono); text-align: right; white-space: nowrap; }
.op-row.bad b { color: var(--bad); } .op-row.good b { color: var(--good); }
.order-panel .seg.n6 { grid-template-columns: repeat(6, 1fr); }
.op-exec { display: grid; gap: 8px; margin: 8px 0; } .op-status { font: 800 .85rem var(--f-mono); letter-spacing: .06em; padding: 8px 12px; border-radius: 8px; } .op-status.filled { background: var(--good-soft); color: var(--good); } .op-status.failed { background: var(--bad-soft); color: var(--bad); }
.slip-exec .tchart, .op-exec .tchart { height: 200px; }

/* Narrative Radar: feed tabs, Telegram room, wallet rows */
.nar-tabs { display: flex; gap: 6px; }
.nar-tab { flex: 1; min-height: 44px; padding: 6px 8px; font: 700 .72rem var(--f-mono); letter-spacing: .04em; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.nar-tab.on { color: var(--text); border-color: var(--g-narrative, #6fa8ff); background: color-mix(in srgb, var(--g-narrative, #6fa8ff) 14%, var(--panel)); }
.nar-stat { font: .72rem var(--f-mono); padding: 2px 2px 0; }
.tg-msg, .tg-pin, .wal-row { padding: 8px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.tg-msg p, .tg-pin p { margin: 3px 0 0; font-size: .88rem; } .tg-pin small { font: .66rem var(--f-mono); color: var(--muted); }
.tg-msg.shill { border-left: 3px solid var(--warn, #ffb454); } .tg-msg.question { border-left: 3px solid var(--g-narrative, #6fa8ff); }
.wal-row { display: grid; grid-template-columns: 44px 1fr auto auto; gap: 8px; align-items: center; font: .78rem var(--f-mono); min-height: 40px; }
.wal-row.buy b { color: var(--good); } .wal-row.sell b { color: var(--bad); }
.nar-chart { min-width: 0; }
.nar-chart.tchart { height: clamp(210px, 30svh, 320px); }

/* Wallet Detective: facts vs hypotheses, concentration bar */
.facts { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.facts li { padding: 7px 10px; border-radius: 8px; background: var(--panel2); border-left: 3px solid var(--good); font-size: .84rem; }
.facts li.fact-hypothesis { border-left-color: var(--warn, #ffb454); }
.facts li b { font: 700 .64rem var(--f-mono); letter-spacing: .06em; margin-right: 6px; color: var(--dim); }
.conc { display: grid; gap: 4px; } .conc small { font: .66rem var(--f-mono); color: var(--dim); }
.conc-bar { display: flex; gap: 2px; min-height: 44px; border-radius: 10px; overflow: hidden; }
.conc-seg { min-width: 30px; border: 0; color: #0b1016; font: 700 .7rem var(--f-mono); cursor: pointer; }
.conc-seg.s0 { background: #6fa8ff; } .conc-seg.s1 { background: #4cd69a; } .conc-seg.s2 { background: #e5b445; } .conc-seg.s3 { background: #c792ff; } .conc-seg.s4 { background: #ff8a65; } .conc-seg.s5 { background: #4fd1c5; }
