:root {
  --paper: #d7d7d5;
  --ink: #0a0a0a;
  --night: #050505;
  --white: #f2f2f0;
  --mute: #8a8a88;
  --dim: #4a4a48;
  --line: rgba(242, 242, 240, 0.12);
  --wide: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --pad: clamp(16px, 2.2vw, 28px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--night);
  color: var(--white);
  font-family: var(--wide);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@media (hover: hover) and (pointer: fine) { body, a, button, input, th { cursor: none; } }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; }

/* grain overlay across everything */
.grain {
  position: fixed; inset: -50%; z-index: 50; pointer-events: none; opacity: .09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* crosshair cursor */
.cursor { position: fixed; left: 0; top: 0; width: 24px; height: 24px; margin: -12px 0 0 -12px; z-index: 100; pointer-events: none; mix-blend-mode: difference; transition: width .2s, height .2s, margin .2s; }
.cursor span { position: absolute; background: #fff; }
.cursor span:nth-child(1) { left: 0; top: 50%; width: 7px; height: 1px; }
.cursor span:nth-child(2) { right: 0; top: 50%; width: 7px; height: 1px; }
.cursor span:nth-child(3) { top: 0; left: 50%; width: 1px; height: 7px; }
.cursor span:nth-child(4) { bottom: 0; left: 50%; width: 1px; height: 7px; }
.cursor i { position: absolute; left: 50%; top: 50%; width: 2px; height: 2px; margin: -1px 0 0 -1px; background: #fff; }
.cursor.hot { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
.cursor.hot i { width: 10px; height: 10px; margin: -5px 0 0 -5px; background: transparent; border: 1px solid #fff; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* header */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 40; display: grid; grid-template-columns: 1fr auto 1fr; align-items: start;
  padding: 18px var(--pad); mix-blend-mode: difference; color: #fff; font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-stretch: 125%; letter-spacing: .02em; justify-self: start; }
.brand .mark { width: 20px; height: 20px; transition: transform .6s; }
.brand:hover .mark { transform: rotate(45deg); }
.nav { display: flex; gap: 24px; }
.nav a { position: relative; padding-bottom: 4px; }
.nav a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: currentColor; transition: right .3s; }
.nav a:hover::after, .nav a.on::after { right: 0; }
.status { justify-self: end; display: grid; justify-items: end; gap: 6px; }
.live em { font-style: normal; }
.dot { display: inline-block; width: 6px; height: 6px; margin-right: 8px; background: #fff; vertical-align: 1px; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.updated { opacity: .6; font-family: var(--mono); font-size: 11px; letter-spacing: 0; text-transform: none; }
@media (max-width: 720px) {
  .top { grid-template-columns: auto 1fr; row-gap: 10px; }
  .nav { grid-column: 1 / -1; grid-row: 2; gap: 16px; font-size: 11px; }
  .status .updated { display: none; }
}

/* hero */
.hero { position: relative; height: 88svh; min-height: 600px; background: var(--paper); color: var(--ink); overflow: hidden; }
#rays { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scroll { text-transform: uppercase; letter-spacing: .14em; font-size: 11px; animation: nudge 2s infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }

.tip { position: absolute; z-index: 5; pointer-events: none; opacity: 0; transform: translate(14px, 14px); transition: opacity .15s;
  background: var(--ink); color: var(--white); font-family: var(--mono); font-size: 11px; line-height: 1.6; padding: 10px 12px; min-width: 180px; white-space: nowrap; }
.tip b { font-family: var(--wide); font-stretch: 125%; font-size: 13px; letter-spacing: .04em; display: block; margin-bottom: 4px; }
.tip.show { opacity: 1; }
.dark-tip { background: var(--white); color: var(--ink); }

/* signal line */
.signal { position: relative; height: 70svh; min-height: 420px; background: var(--night); }
#line { position: absolute; inset: 0; width: 100%; height: 100%; }
.signal-stats { position: absolute; left: 0; right: 0; bottom: 10%; display: flex; justify-content: center; gap: clamp(20px, 6vw, 90px); flex-wrap: wrap; padding: 0 var(--pad); }
.stat { text-align: center; }
.stat b { display: block; font-stretch: 125%; font-weight: 700; font-size: clamp(22px, 3.4vw, 44px); letter-spacing: -.01em; }
.stat span { font-size: 10px; text-transform: uppercase; letter-spacing: .16em; color: var(--mute); }

/* blocks */
.dark { background: var(--night); color: var(--white); }
.block { padding: 80px var(--pad) 60px; }
.block-head { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(260px, 420px); gap: 40px; align-items: end; margin-bottom: 40px; }
h2 { font-stretch: 125%; font-weight: 800; text-transform: uppercase; font-size: clamp(44px, 8vw, 120px); line-height: .88; letter-spacing: -.02em; }
h3 { font-stretch: 125%; font-weight: 700; text-transform: uppercase; font-size: 13px; letter-spacing: .12em; margin-bottom: 18px; }
h3.inline { margin: 0; }
.lede { color: var(--mute); font-size: 15px; line-height: 1.5; }
.note { color: var(--dim); font-size: 12px; margin-top: 18px; max-width: 760px; line-height: 1.5; }
.muted { color: var(--dim); }
@media (max-width: 760px) { .block-head { grid-template-columns: 1fr; gap: 16px; } }

.controls { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.seg { display: inline-flex; border: 1px solid var(--line); }
.seg button { padding: 9px 14px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); transition: color .2s, background .2s; }
.seg button.on { background: var(--white); color: var(--ink); }
.seg button:not(.on):hover { color: var(--white); }
input[type=search], .wallet-form input {
  background: transparent; border: 1px solid var(--line); color: var(--white); padding: 9px 12px; font-family: var(--mono); font-size: 12px; min-width: 200px; outline: none;
}
input:focus { border-color: var(--white); }

/* tables */
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
.grid { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12px; }
.grid th { position: sticky; top: 0; background: var(--night); text-align: right; font-family: var(--wide); font-weight: 600; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); padding: 14px 12px; white-space: nowrap; user-select: none; }
.grid th[data-k]:hover { color: var(--white); }
.grid th.sorted { color: var(--white); }
.grid th.sorted.desc::after { content: ' ↓'; }
.grid th.sorted.asc::after { content: ' ↑'; }
.grid td { text-align: right; padding: 11px 12px; border-top: 1px solid var(--line); white-space: nowrap; }
.grid .l { text-align: left; }
.grid tbody tr { transition: background .15s; }
.grid tbody tr:hover { background: rgba(242,242,240,.05); }
.grid tbody tr.flash { animation: flash 1.6s; }
@keyframes flash { 0%, 40% { background: rgba(242,242,240,.22); } }
.mkt { font-family: var(--wide); font-stretch: 125%; font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.lev { color: var(--dim); font-size: 10px; margin-left: 6px; }
.pos { color: var(--white); }
.neg { color: var(--mute); }
.apr-cell { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.apr-bar { position: relative; width: 70px; height: 3px; background: rgba(242,242,240,.08); }
.apr-bar i { position: absolute; top: 0; bottom: 0; background: var(--white); }
.apr-bar i.n { background: transparent; border: 1px solid var(--mute); top: -1px; bottom: -1px; }
.apr-bar::before { content: ''; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--dim); }
.big { font-weight: 500; font-size: 13px; }
.empty { padding: 40px 12px; color: var(--dim); text-align: center; }

/* smart money constellation */
.smart { position: relative; }
.constellation-wrap { position: relative; height: 100svh; min-height: 620px; overflow: hidden; }
#stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.const-title { position: absolute; left: var(--pad); bottom: 40px; pointer-events: none; }
.const-title p { color: var(--mute); font-size: 13px; margin-top: 14px; max-width: 340px; line-height: 1.5; }

.smart-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 50px; }
@media (max-width: 900px) { .smart-grid { grid-template-columns: 1fr; } }
.bars { display: grid; gap: 2px; }
.bar-row { width: 100%; text-align: left; display: grid; grid-template-columns: 90px 1fr 120px; gap: 14px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11px; }
.bar-row .mkt { font-size: 12px; }
.bar-split { position: relative; height: 8px; display: flex; }
.bar-split .L { background: var(--white); }
.bar-split .S { border: 1px solid var(--mute); }
.bar-meta { text-align: right; color: var(--mute); }
.feed { list-style: none; font-family: var(--mono); font-size: 11px; max-height: 520px; overflow: auto; }
.feed li { display: grid; grid-template-columns: 60px 1fr auto; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.feed time { color: var(--dim); }
.feed .act { text-transform: uppercase; letter-spacing: .06em; }
.trader { font-family: var(--wide); font-weight: 600; font-size: 12px; text-decoration: underline; text-decoration-color: var(--dim); text-underline-offset: 3px; }
.trader:hover { text-decoration-color: var(--white); }
.chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); padding: 2px 6px; font-size: 10px; }
.chip.L { background: var(--white); color: var(--ink); border-color: var(--white); }

/* wallet */
.wallet-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.wallet-form input { flex: 1; min-width: 260px; font-size: 14px; padding: 14px 16px; }
.wallet-form button { padding: 14px 22px; background: var(--white); color: var(--ink); text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 700; }
.wallet-summary { display: flex; gap: clamp(20px, 5vw, 70px); flex-wrap: wrap; margin-bottom: 30px; }
.wallet-summary .stat { text-align: left; }
.addr { font-family: var(--mono); color: var(--mute); font-size: 12px; margin-bottom: 18px; word-break: break-all; }

.foot { display: flex; justify-content: space-between; padding: 30px var(--pad) 40px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); border-top: 1px solid var(--line); }

/* ---------- v2: usability ---------- */
.hero-bottom { position: absolute; left: var(--pad); right: var(--pad); bottom: 20px; z-index: 2; }
.opps-head { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(10,10,10,.55); margin-bottom: 10px; }
.opps-head em { font-style: normal; color: rgba(10,10,10,.35); }
.opps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(10,10,10,.18); border: 1px solid rgba(10,10,10,.18); }
.opp { display: grid; gap: 4px; text-align: left; padding: 14px 16px; background: var(--paper); color: var(--ink); transition: background .2s, color .2s; }
.opp:hover { background: var(--ink); color: var(--white); }
.opp-coin { font-stretch: 125%; font-weight: 800; font-size: 15px; letter-spacing: .02em; }
.opp-apr { font-family: var(--mono); font-size: 22px; font-weight: 500; }
.opp-apr small { font-size: 10px; opacity: .6; }
.opp-line { font-family: var(--mono); font-size: 11px; opacity: .7; }
@media (max-width: 900px) { .opps { grid-template-columns: repeat(2, 1fr); } .hero-axis-txt { display: none; } }

.controls.sticky { position: sticky; top: var(--hdr, 60px); z-index: 12; background: var(--night); padding: 12px 0; margin-bottom: 0; border-bottom: 1px solid var(--line); }
.toggle { border: 1px solid var(--line); padding: 9px 14px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.toggle.on { background: var(--white); color: var(--ink); border-color: var(--white); }
.toggle:not(.on):hover { color: var(--white); }
.countdown { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--mute); }
@media (min-width: 1200px) {
  #funding .table-wrap { overflow: visible; border-top: 0; }
  #fundingTable th { top: calc(var(--hdr, 60px) + var(--ctl, 60px)); z-index: 11; }
}

.star { font-size: 14px; color: var(--dim); padding: 2px 4px; line-height: 1; }
.star.on, .star:hover { color: var(--white); }
.c-star { width: 28px; text-align: center !important; padding-right: 0 !important; }
#fundingTable tbody tr[data-coin] { cursor: pointer; }
@media (hover: hover) and (pointer: fine) { #fundingTable tbody tr[data-coin] { cursor: none; } }
#fundingTable tr.open { background: rgba(242,242,240,.06); }
tr.detail > td { padding: 28px 12px 34px; background: rgba(242,242,240,.03); white-space: normal; text-align: left; }
.detail-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; font-family: var(--wide); }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-head { display: flex; justify-content: space-between; align-items: baseline; }
.detail-head h3 { margin-bottom: 12px; }
.spark { width: 100%; height: 140px; display: block; border-bottom: 1px solid var(--line); }
.spark .zero { stroke: var(--dim); stroke-dasharray: 3 4; }
.spark .ln { fill: none; stroke: var(--white); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.spark .area { fill: rgba(242,242,240,.07); }
.spark text { fill: var(--mute); font-family: var(--mono); font-size: 10px; }
.detail-stats { display: flex; gap: 34px; flex-wrap: wrap; margin-top: 18px; }
.detail-stats .stat { text-align: left; }
.detail-stats .stat b { font-size: 22px; }
.whale-list { list-style: none; font-family: var(--mono); font-size: 11px; }
.whale-list li { display: grid; grid-template-columns: 1fr auto auto auto auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.btn { display: inline-block; padding: 11px 16px; background: var(--white); color: var(--ink); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.btn.ghost { background: transparent; color: var(--white); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--white); }
.legs { display: inline-flex; gap: 6px; }

.smart-stats { font-family: var(--mono); font-size: 11px; color: var(--dim); margin-left: auto; }
.consensus { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cons { display: grid; gap: 6px; text-align: left; padding: 20px; background: var(--night); transition: background .2s; }
.cons:hover { background: #151515; }
.cons-num { font-stretch: 125%; font-weight: 800; font-size: 44px; line-height: 1; }
.cons-num small { font-size: 18px; color: var(--mute); }
.cons-txt { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.cons-meta { font-family: var(--mono); font-size: 11px; color: var(--mute); }

.bar-row:hover .mkt { text-decoration: underline; }
.tag { font-family: var(--mono); font-size: 9px; border: 1px solid var(--dim); color: var(--mute); padding: 1px 4px; margin-left: 6px; }

.my { margin-bottom: 40px; }
.my-list { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.my-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); padding: 6px 6px 6px 10px; }
.my-chip button { color: var(--mute); padding: 0 4px; }
.my-chip button:hover { color: var(--white); }
#myFeed { max-height: 360px; }
.wallet-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.wallet-top .addr { margin: 0 auto 0 0; }

/* mobile: tables become cards */
@media (max-width: 720px) {
  .controls.sticky { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 8px; }
  .controls.sticky::-webkit-scrollbar { display: none; }
  .controls.sticky > * { flex: none; }
  .controls.sticky input[type=search] { min-width: 150px; }
  .countdown { margin-left: 0; }
  .opp-line + .opp-line { display: none; }
  .opp { padding: 12px; }
  .opp-apr { font-size: 18px; }
  .grid.cards thead { display: none; }
  .grid.cards tbody tr:not(.detail) { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; padding: 14px 4px; border-top: 1px solid var(--line); position: relative; }
  .grid.cards td { border: 0; padding: 0; text-align: left; white-space: normal; }
  .grid.cards td[data-l]::before { content: attr(data-l); display: block; font-family: var(--wide); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 2px; }
  .grid.cards td.c-star { position: absolute; right: 4px; top: 12px; width: auto; }
  .grid.cards td.l:nth-child(2), .grid.cards td[data-l="Market"] { grid-column: 1 / -1; }
  .grid.cards td[data-l="Market"]::before, .grid.cards td[data-l="Top positions"]::before { display: none; }
  .grid.cards td[data-l="Top positions"] { grid-column: 1 / -1; }
  .grid.cards td.empty { grid-column: 1 / -1; }
  .apr-bar { display: none; }
  .whale-list li { grid-template-columns: 1fr auto auto; }
  .whale-list li > :nth-child(4) { display: none; }
  .detail-stats { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .dot, .scroll { animation: none; }
  html { scroll-behavior: auto; }
}
@media (max-width: 720px) {
  .grid.cards td[data-l="#"] { display: none; }
  .grid.cards td[data-l="Trader"] { grid-column: 1 / -1; }
  .grid.cards td[data-l="Trader"]::before { display: none; }
}

.top { transition: background .25s, border-color .25s; border-bottom: 1px solid transparent; }
.top.solid { mix-blend-mode: normal; background: rgba(5,5,5,.94); border-bottom-color: var(--line); padding-bottom: 14px; }
@supports (backdrop-filter: blur(6px)) { .top.solid { background: rgba(5,5,5,.8); backdrop-filter: blur(8px); } }

/* ---------- v3: trading ---------- */
.status { grid-auto-flow: row; }
.wbtn { justify-self: end; border: 1px solid currentColor; padding: 7px 12px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-family: var(--wide); }
.wbtn:hover { background: #fff; color: #000; }
.top.solid .wbtn:hover { background: var(--white); color: var(--ink); }
.mini { border: 1px solid var(--line); padding: 3px 8px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--white); font-family: var(--wide); white-space: nowrap; }
.mini:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.legs { align-items: center; }
.btn.inv { background: transparent; color: var(--white); border: 1px solid var(--white); }
.btn.inv:hover { background: var(--white); color: var(--ink); }
.btn[disabled] { opacity: .35; }
.whale-list li { grid-template-columns: 1fr auto auto auto auto auto; }

body.modal-open { overflow: hidden; }
.ticket-wrap { position: fixed; inset: 0; z-index: 70; background: rgba(5,5,5,.72); display: flex; align-items: center; justify-content: center; padding: 16px; }
.ticket-wrap[hidden] { display: none; }
.ticket { width: min(460px, 100%); max-height: calc(100svh - 32px); overflow: auto; background: var(--night); color: var(--white); border: 1px solid var(--line); padding: 22px; font-family: var(--wide); }
.tk-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.tk-head h3 { margin: 0; font-size: 22px; letter-spacing: .02em; }
.tk-head small { font-family: var(--mono); font-size: 11px; color: var(--mute); font-weight: 400; letter-spacing: 0; text-transform: none; margin-left: 6px; }
.tk-x { font-size: 22px; color: var(--mute); padding: 0 4px; }
.tk-x:hover { color: var(--white); }
.tk-ctx { font-family: var(--mono); font-size: 11px; color: var(--mute); border-left: 2px solid var(--white); padding: 6px 10px; margin-bottom: 14px; line-height: 1.5; }
.tk-side { display: grid; grid-template-columns: 1fr 1fr; width: 100%; margin-bottom: 14px; }
.tk-side button { padding: 12px; font-size: 12px; }
.tk-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.tk-row input { width: 140px; background: transparent; border: 1px solid var(--line); color: var(--white); font-family: var(--mono); font-size: 14px; padding: 8px 10px; text-align: right; outline: none; }
.tk-row input:focus { border-color: var(--white); }
.tk-row .seg button { padding: 7px 10px; }
.tk-sum { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 14px 0; padding-top: 14px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12px; }
.tk-sum dt { color: var(--mute); }
.tk-sum dd { text-align: right; }
.tk-acct { color: var(--mute); margin-left: 6px; }
.tk-steps { list-style: none; display: grid; gap: 8px; margin-bottom: 10px; }
.tk-steps li { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--line); padding: 10px 12px; font-size: 12px; }
.tk-steps li.ok { color: var(--mute); }
.tk-steps .btn { padding: 8px 12px; }
.tk-note, .tk-foot { font-family: var(--mono); font-size: 10px; color: var(--dim); line-height: 1.6; }
.tk-foot { margin-top: 14px; }
.tk-warn { font-family: var(--mono); font-size: 11px; color: var(--white); border: 1px dashed var(--mute); padding: 8px 10px; margin: 10px 0; line-height: 1.5; }
.tk-warn a, .tk-done a { text-decoration: underline; }
.tk-done { font-family: var(--mono); font-size: 12px; background: var(--white); color: var(--ink); padding: 10px 12px; margin: 10px 0; }
.btn.wide { width: 100%; padding: 14px; font-size: 12px; }
@media (max-width: 720px) { .wbtn { padding: 6px 9px; } .whale-list li { grid-template-columns: 1fr auto auto auto; } .whale-list li > :nth-child(5) { display: none; } }

.wbtn.on { text-transform: none; letter-spacing: .02em; font-family: var(--mono); }
@media (max-width: 720px) { .status .live { display: none; } }

/* ---------- v4: trade tab, tp/sl, carry, alerts ---------- */
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }
.alerts { display: inline-flex; }
.alerts select { background: var(--night); color: var(--mute); border: 1px solid var(--line); border-left: 0; font-family: var(--mono); font-size: 11px; padding: 0 8px; outline: none; }
.mini.strong { border-color: var(--white); }
.acts { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.tk-tpsl { border-top: 1px solid var(--line); margin-top: 4px; }
.tk-tpsl .tk-row { border-top: 0; padding-bottom: 4px; }
.tk-chips { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding-bottom: 8px; }
.tk-chips em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--mute); margin-left: auto; }
.tk-chips em.bad { color: var(--white); text-decoration: underline dashed; }
.tk-wallets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.tk-wallets .btn { text-align: center; }
.trade-empty { border: 1px solid var(--line); padding: 30px; display: grid; gap: 18px; justify-items: start; max-width: 620px; }
.trade-empty p { color: var(--mute); line-height: 1.6; }
.trade-setup { border: 1px solid var(--line); padding: 18px; margin-bottom: 30px; max-width: 620px; }
.tpsl-edit { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; align-items: center; max-width: 720px; }
.tpsl-edit label { display: contents; }
.tpsl-edit label span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.tpsl-edit input { background: transparent; border: 1px solid var(--line); color: var(--white); font-family: var(--mono); font-size: 14px; padding: 8px 10px; outline: none; max-width: 200px; }
.tpsl-edit input:focus { border-color: var(--white); }
.tpsl-edit .tk-chips { grid-column: 2; padding: 0; }
.tpsl-btns { grid-column: 1 / -1; display: flex; gap: 10px; margin-top: 6px; }
.tpsl-edit .tk-note { grid-column: 1 / -1; }
#trade .wallet-summary .stat b { font-size: clamp(20px, 2.6vw, 32px); }
@media (max-width: 720px) {
  .tpsl-edit { grid-template-columns: 1fr; }
  .tpsl-edit .tk-chips { grid-column: 1; }
  .alerts select { padding: 0 4px; }
}

/* WalletConnect */
.tk-alt { margin: 12px 0 0; text-align: center; }
button.link { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; letter-spacing: .04em; color: inherit; opacity: .65; text-decoration: underline; text-underline-offset: 3px; }
button.link:hover { opacity: 1; }
.trade-empty .tk-alt { text-align: left; }
.trade-empty .btn.wide { width: auto; }
body.wc-open, body.wc-open * { cursor: auto !important; }
body.wc-open .cursor { display: none; }
w3m-modal, wcm-modal, appkit-modal { cursor: auto; }

/* ---------- trading terminal ---------- */
.term { border: 1px solid var(--line); margin-bottom: 48px; }
.term-bar { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); }
.term-pick { position: relative; border-right: 1px solid var(--line); }
.term-coin { height: 100%; padding: 14px 18px; font-family: var(--wide); font-weight: 800; font-size: 20px; letter-spacing: .02em; color: var(--white); white-space: nowrap; }
.term-coin small { font-size: 12px; color: var(--mute); font-weight: 600; margin-left: 2px; }
.term-coin i { font-style: normal; font-size: 11px; color: var(--mute); margin-left: 6px; }
.term-list { position: absolute; left: -1px; top: 100%; z-index: 30; width: min(440px, 92vw); background: var(--night); border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.term-list[hidden] { display: none; }
.term-list input { width: 100%; padding: 12px 14px; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: var(--white); font: 13px var(--mono); outline: none; }
.term-lh, .term-list li { display: grid; grid-template-columns: 1.1fr 1fr .8fr 1fr; gap: 8px; padding: 8px 14px; font: 11px var(--mono); }
.term-lh { color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.term-list ul { list-style: none; max-height: 340px; overflow: auto; }
.term-list li { cursor: pointer; color: var(--mute); }
.term-list li b { color: var(--white); font-weight: 600; }
.term-list li:hover, .term-list li.on { background: rgba(242,242,240,.06); }
.term-list li span:not(:first-child) { text-align: right; }
.term-stats { display: flex; gap: 28px; align-items: center; padding: 10px 18px; overflow-x: auto; scrollbar-width: none; }
.term-stats div { display: flex; flex-direction: column; gap: 3px; white-space: nowrap; }
.term-stats span { font: 10px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.term-stats b { font: 600 13px var(--mono); color: var(--white); }
.term-stats b.neg { color: var(--mute); }
.term-main { display: grid; grid-template-columns: minmax(0, 1fr) 230px 360px; min-height: 560px; }
.term-chart { position: relative; display: flex; flex-direction: column; border-right: 1px solid var(--line); min-width: 0; }
.term-tools { display: flex; padding: 8px; border-bottom: 1px solid var(--line); }
.term-tools .seg button { padding: 6px 10px; }
#tmChart { flex: 1; width: 100%; min-height: 420px; display: block; cursor: crosshair; }
.term-book { border-right: 1px solid var(--line); font: 11px var(--mono); padding: 8px 0; display: flex; flex-direction: column; }
.term-book .muted { padding: 12px; }
.book-h, .term-book li { display: grid; grid-template-columns: 1.2fr 1fr 1fr; padding: 3px 12px; position: relative; }
.book-h { color: var(--dim); text-transform: uppercase; font-size: 10px; letter-spacing: .08em; padding-bottom: 6px; }
.book-h span:not(:first-child), .term-book li span:not(:first-child) { text-align: right; }
.term-book ul { list-style: none; }
.term-book li { cursor: pointer; color: var(--mute); }
.term-book li span { position: relative; }
.term-book li i { position: absolute; right: 0; top: 1px; bottom: 1px; background: rgba(242,242,240,.07); }
.term-book li.b span:first-child { color: var(--white); }
.term-book li.a span:first-child { color: #9d9d9b; }
.term-book li.a i { background: rgba(138,138,136,.1); }
.term-book li:hover { background: rgba(242,242,240,.05); }
.book-mid { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 12px; margin: 4px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.book-mid b { font-size: 15px; color: var(--white); }
.book-mid span { color: var(--dim); font-size: 10px; }
.ticket.dock { width: auto; max-height: none; border: 0; padding: 18px; overflow: visible; }
.ticket.dock .tk-x { display: none; }
.ticket.dock .tk-foot { font-size: 10px; }
.term-sub { font-family: var(--wide); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 18px; }
@media (max-width: 1180px) {
  .term-main { grid-template-columns: minmax(0, 1fr) 340px; }
  .term-book { display: none; }
}
@media (max-width: 820px) {
  .term-main { grid-template-columns: 1fr; }
  .term-chart { border-right: 0; border-bottom: 1px solid var(--line); }
  #tmChart { min-height: 320px; height: 320px; flex: none; }
  .term-stats { gap: 18px; }
  .term-coin { font-size: 17px; padding: 12px 14px; }
}
