/* AXIOM Pro token page � rebuilt from 01-ANSEM-token-page.pdf */
.ax {
  --ax-bg: #010206;
  --ax-bg2: #000b11;
  --ax-bg3: #070d14;
  --ax-elev: #0b1118;
  --ax-line: #151c24;
  --ax-line2: #1c2430;
  --ax-text: #f3f5f7;
  --ax-muted: #7a8494;
  --ax-dim: #5a6470;
  --ax-mint: #04c294;
  --ax-mint-2: #01c08d;
  --ax-ink: #04140c;
  --ax-red: #f6465d;
  --ax-red-soft: #e5484d;
  --ax-sell: #3b1315;
  --ax-blue: #2979ff;
  --ax-blue-btn: #2167f1;
  --ax-yellow: #f0c14b;
  height: 100%;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: grid;
  grid-template-rows: 52px 72px minmax(0, 1fr) 32px;
  grid-template-columns: minmax(0, 1fr);
  background: var(--ax-bg);
  color: var(--ax-text);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  overflow: hidden;
}

.ax button, .ax input { font-family: inherit; color: inherit; }
.ax svg { display: block; }

/* ---------- NAV ---------- */
.ax-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px 0 12px;
  border-bottom: 1px solid var(--ax-line);
  background: #010206;
  min-width: 0;
}
.ax-menu {
  display: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #171f28;
  border-radius: 8px;
  background: #0c1219;
  color: #c5ccd6;
  cursor: pointer;
  place-items: center;
  flex: 0 0 auto;
}
.ax-menu svg { width: 16px; height: 16px; }
.ax-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  text-decoration: none;
}
.ax-brand img, .ax-brand svg {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  background: #000;
}
.ax-brand b {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #f4f6f8;
}
.ax-brand em {
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ax-blue);
  margin: 2px 0 0 -2px;
}
.ax-links {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: 10px;
  flex: 0 1 auto;
  min-width: 0;
}
.ax-links a {
  color: #c5ccd6;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.ax-links a:hover { color: #fff; }
.ax-nav-search {
  margin-left: auto;
  width: min(280px, 22vw);
  min-width: 0;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 999px;
  background: #0c1219;
  border: 1px solid #171f28;
}
.ax-nav-search svg { width: 14px; height: 14px; color: #6b7380; flex: 0 0 auto; }
.ax-nav-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 12px;
  color: #d5dbe3;
  text-overflow: ellipsis;
}
.ax-nav-search input::placeholder { color: #6a7380; }
.ax-kbd {
  font-size: 10px;
  color: #5c6570;
  border: 1px solid #2a323c;
  border-radius: 4px;
  padding: 1px 5px;
  line-height: 1.2;
}
.ax-deposit {
  height: 32px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--ax-blue-btn);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.ax-ico-row {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #c4cad3;
}
.ax-ico-row button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: inherit;
  width: 18px;
  height: 18px;
}
.ax-wallet {
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 10px 0 12px;
  gap: 10px;
  border-radius: 999px;
  background: #0c1219;
  border: 1px solid #171f28;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.ax-wallet span { color: #dbe0e6; }
.ax-wallet em { font-style: normal; color: #9aa3ae; font-weight: 500; }
.ax-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #10b981);
}

/* ---------- TOKEN BAR ---------- */
.ax-token {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 12px;
  border-bottom: 1px solid var(--ax-line);
  background: #00080e;
  min-width: 0;
  overflow: hidden;
}
.ax-ident {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 0 1 220px;
  padding-right: 16px;
}
.ax-ident img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #111;
}
.ax-ident-txt { min-width: 0; }
.ax-ident-top {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.1;
}
.ax-ident-top strong {
  font-size: 15px;
  font-weight: 800;
}
.ax-ident-top .nm {
  font-size: 12px;
  color: var(--ax-muted);
  font-weight: 600;
}
.ax-check {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ax-blue);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.ax-check svg { width: 8px; height: 8px; }
.ax-rank {
  font-size: 10px;
  font-weight: 800;
  background: var(--ax-yellow);
  color: #111;
  border-radius: 4px;
  padding: 1px 5px;
  line-height: 1.3;
}
.ax-ident-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  color: #8b939e;
  font-size: 11px;
}
.ax-ident-sub i { display: inline-flex; align-items: center; gap: 4px; font-style: normal; }
.ax-ident-sub svg { width: 12px; height: 12px; }
.ch {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 3px;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 4px solid currentColor;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
  vertical-align: middle;
}

.ax-split {
  width: 1px;
  align-self: stretch;
  margin: 12px 0;
  background: #1a222c;
  flex: 0 0 1px;
}

.ax-px {
  padding: 0 18px;
  min-width: 0;
  flex: 0 1 150px;
}
.ax-px b {
  display: block;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.ax-px b.is-neg, .ax-chg.is-neg { color: var(--ax-red); }
.ax-px b.is-pos, .ax-chg.is-pos { color: var(--ax-mint); }
.ax-px-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.ax-chg {
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.ax-pair {
  margin-top: 3px;
  font-size: 11px;
  color: var(--ax-muted);
}

.ax-stats {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 18px;
  flex: 1 1 auto;
  min-width: 0;
}
.ax-stat { min-width: 0; }
.ax-stat small {
  display: block;
  color: var(--ax-muted);
  font-size: 11px;
  margin-bottom: 3px;
}
.ax-stat b {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ax-ca-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  color: #e8edf2;
}
.ax-ca-btn svg { width: 12px; height: 12px; color: #9aa3ae; }

.ax-flow {
  margin-left: auto;
  padding: 0 4px 0 16px;
  min-width: 0;
  flex: 0 1 280px;
}
.ax-flow-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 11px;
  color: var(--ax-muted);
}
.ax-flow-top b { color: #e8edf2; font-weight: 700; }
.ax-flow-mid {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  font-size: 11px;
}
.ax-flow-mid .g { color: var(--ax-mint); }
.ax-flow-mid .r { color: var(--ax-red); }
.ax-ratio {
  margin-top: 6px;
  height: 4px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--ax-red);
  display: flex;
}
.ax-ratio i {
  display: block;
  height: 100%;
  background: var(--ax-mint);
  width: 62%;
}

/* ---------- MAIN ---------- */
.ax-main {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(300px, 328px);
  grid-template-areas: "tools center right";
  min-width: 0;
  min-height: 0;
}

.ax-tools {
  grid-area: tools;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-right: 1px solid var(--ax-line);
  background: #00080e;
  color: #8b939e;
}
.ax-tools button {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.ax-tools button.is-on { color: var(--ax-blue); }
.ax-tools svg { width: 16px; height: 16px; }
.ax-tools .sp { flex: 1; }

.ax-center {
  grid-area: center;
  display: grid;
  grid-template-rows: 36px minmax(220px, 1.35fr) minmax(140px, 0.65fr);
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--ax-line);
}
.view-classic .ax-live { display: none !important; }
.view-stream .ax-center {
  grid-template-rows: 32px minmax(200px, 1.1fr) minmax(200px, 1fr) minmax(120px, 0.65fr);
}
.ax-live {
  --ax-chat-w: 200px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(72px, 92px) minmax(168px, var(--ax-chat-w));
  gap: 8px;
  min-height: 0;
  min-width: 0;
  padding: 8px 8px 8px;
  background: #00080e;
  border-bottom: 1px solid var(--ax-line);
}
.ax-live .stream-tile { height: 100%; min-height: 0; border-radius: 8px; }
.ax-live-dev { position: relative; }
.ax-live-pill {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 4px #000;
}
.ax-live-pill .live {
  background: #e11d2e;
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.06em;
  border-radius: 3px;
  padding: 2px 6px;
}
.ax-live-pill .watch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #f3f5f7;
}
.ax-live-pill .watch svg { width: 12px; height: 12px; }
.ax-live-holders {
  display: grid;
  grid-template-rows: 1fr 1fr 1fr;
  gap: 8px;
  min-height: 0;
}
.ax-activity {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--ax-line);
  border-radius: 8px;
  background: #070b10;
  overflow: hidden;
}
.ax-chat-resizer {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  z-index: 4;
  cursor: col-resize;
  touch-action: none;
}
.ax-chat-resizer::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 3px;
  height: 28px;
  border-radius: 2px;
  background: #2a3440;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.ax-chat-resizer:hover::after,
.ax-chat-resizer:focus-visible::after,
body.is-resizing-chat .ax-chat-resizer::after {
  opacity: 1;
}
body.is-resizing-chat {
  cursor: col-resize;
  user-select: none;
}
body.is-resizing-chat iframe,
body.is-resizing-chat canvas {
  pointer-events: none;
}
.ax-activity header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 650;
  color: #e8edf2;
  border-bottom: 1px solid var(--ax-line);
}
.ax-activity header svg { width: 14px; height: 14px; color: #7a8494; }
#liveActivity {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 6px 10px;
}
.act-line {
  display: grid;
  grid-template-columns: 58px minmax(64px, 0.85fr) minmax(0, 1.5fr);
  gap: 8px;
  align-items: center;
  height: 22px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
}
.act-line em { color: #6b7280; font-style: normal; font-variant-numeric: tabular-nums; }
.act-line b {
  color: #c5ccd4;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
}
.act-line span { color: #d5dbe3; overflow: hidden; text-overflow: ellipsis; }
.act-line .tok { color: var(--ax-mint); font-style: normal; font-weight: 700; }
.ax-activity-join {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 8px 10px 10px;
  color: var(--ax-mint);
  font-size: 12px;
  font-weight: 700;
}
.ax-activity-join svg { width: 14px; height: 14px; }

.ax-chart-head {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
  border-bottom: 1px solid var(--ax-line);
  background: #00080e;
  font-size: 12px;
  color: var(--ax-muted);
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
}
.tf {
  display: flex;
  align-items: center;
  gap: 2px;
}
.tf button {
  background: none;
  border: 1px solid transparent;
  color: var(--ax-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.2;
}
.tf button.is-on {
  color: var(--ax-blue);
  border-color: var(--ax-blue);
}
.ax-chart-head .sep {
  width: 1px;
  height: 14px;
  background: #243040;
  margin: 0 8px;
}
.ax-chart-head .ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ax-muted);
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 12px;
  padding: 0 4px;
}
.ax-chart-head .ghost svg { width: 13px; height: 13px; }
.ax-head-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.ax-tog { color: var(--ax-muted); font-size: 12px; white-space: nowrap; }
.ax-tog .on { color: var(--ax-blue); font-weight: 650; }

.ax-chart {
  position: relative;
  min-height: clamp(220px, 36vh, 520px);
  height: 100%;
  background: #000b11;
  overflow: hidden;
}
.ax-chart canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  touch-action: none;
  cursor: grab;
}

.ax-trades {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  background: #00080e;
  border-top: 1px solid var(--ax-line);
  overflow: hidden;
}
.ax-tabs {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 12px;
  height: 32px;
  border-bottom: 1px solid var(--ax-line);
  flex: 0 0 auto;
}
.ax-tabs button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  height: 32px;
  color: var(--ax-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}
.ax-tabs button.is-on {
  color: var(--ax-blue);
  border-bottom-color: var(--ax-blue);
}
.ax-cols, .trades-body .row {
  display: grid;
  grid-template-columns: 72px 44px 1fr 1fr 1fr 1.1fr 1.35fr 36px;
  gap: 4px;
  padding: 0 12px;
  font-variant-numeric: tabular-nums;
  font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}
.ax-cols {
  height: 22px;
  align-items: center;
  color: var(--ax-muted);
  font-size: 10px;
  letter-spacing: 0.04em;
  font-family: Inter, sans-serif;
  flex: 0 0 auto;
}
.trades-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.trades-body .row {
  align-items: center;
  height: 22px;
  font-size: 11px;
  color: #c5ccd4;
}
.trades-body .row.is-buy, .trades-body .row.is-buy span.num { color: var(--ax-mint); }
.trades-body .row.is-sell, .trades-body .row.is-sell span.num { color: var(--ax-red); }
.trades-body .row .t { color: var(--ax-muted); }
.trades-body .row .mk { color: #c5ccd4; display: inline-flex; align-items: center; gap: 4px; }
.trades-body .row span:last-child {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7a8494;
}
.trades-body .row.trades-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  color: var(--ax-muted);
  font-size: 12px;
  grid-column: 1 / -1;
}

/* ---------- RIGHT PANEL ---------- */
.ax-right {
  grid-area: right;
  min-width: 0;
  max-width: 328px;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: #05080c;
  overflow: auto;
}
.ax-trade {
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--ax-line);
}
.ax-sides {
  display: grid;
  grid-template-columns: 1fr 1fr 18px;
  gap: 8px;
  align-items: center;
}
.ax-sides button {
  height: 34px;
  border: 0;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.ax-sides .buy { background: var(--ax-mint); color: var(--ax-ink); }
.ax-sides .sell { background: var(--ax-sell); color: var(--ax-red); }
.ax-sides .buy:not(.is-on) { background: #0d2a24; color: var(--ax-mint); }
.ax-sides .sell.is-on { background: var(--ax-red); color: #1a0406; }
.ax-sides .more { background: none; border: 0; color: #8b939e; cursor: pointer; padding: 0; }

.ax-otype {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
  border-bottom: 1px solid var(--ax-line);
}
.ax-otype button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--ax-muted);
  font-size: 13px;
  padding: 8px 0 7px;
  cursor: pointer;
}
.ax-otype .end { margin-left: auto; display: flex; align-items: center; gap: 6px; color: #9aa3ae; font-size: 12px; font-weight: 650; }
.ax-otype .end svg { width: 14px; height: 14px; }
.ax-otype button.is-on { color: #e8edf2; border-bottom-color: #e8edf2; }

.ax-amt {
  margin-top: 10px;
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--ax-line2);
  border-radius: 6px;
  background: #070c12;
}
.ax-amt label {
  font-size: 11px;
  color: var(--ax-muted);
  letter-spacing: 0.04em;
  margin-right: 8px;
}
.ax-amt input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 16px;
  font-weight: 600;
}
.ax-amt .sol {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}
.ax-amt .sol svg { width: 14px; height: 14px; }

.ax-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr) 28px;
  gap: 6px;
  margin-top: 8px;
}
.ax-presets button {
  height: 28px;
  border: 1px solid var(--ax-line2);
  border-radius: 5px;
  background: #070c12;
  color: #d5dbe3;
  font-size: 12px;
  cursor: pointer;
}
.ax-presets button.is-on { border-color: var(--ax-mint); color: var(--ax-mint); }
.ax-presets .pen { display: grid; place-items: center; color: #8b939e; }

.ax-adv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 8px;
  color: var(--ax-muted);
  font-size: 11px;
  padding: 0 2px;
}
.ax-adv span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
  border-right: 1px solid var(--ax-line);
  padding: 4px 0;
}
.ax-adv span:last-child { border-right: 0; }
.ax-adv svg { width: 12px; height: 12px; }
.ax-adv b { color: #c5ccd4; font-weight: 650; }
.ax-adv .on { color: var(--ax-text); }
.ax-adv-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--ax-muted);
  cursor: pointer;
}
.ax-adv-check i {
  width: 13px;
  height: 13px;
  border: 1px solid #3a4450;
  border-radius: 2px;
  flex: 0 0 auto;
}

.ax-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  margin-top: 12px;
  border-radius: 999px;
  background: var(--ax-mint);
  color: var(--ax-ink);
  font-size: 15px;
  font-weight: 800;
}
.ax-join {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  margin-top: 8px;
  border-radius: 999px;
  border: 1px solid var(--ax-mint);
  color: var(--ax-mint);
  font-size: 14px;
  font-weight: 700;
  background: transparent;
}
.ax-join svg { width: 16px; height: 16px; }

.ax-pnl {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--ax-line);
  padding: 8px 4px 10px;
}
.ax-pnl > div {
  padding: 0 8px;
  min-width: 0;
}
.ax-pnl > div + div { border-left: 1px solid var(--ax-line); }
.ax-pnl small {
  display: block;
  color: var(--ax-muted);
  font-size: 11px;
  margin-bottom: 4px;
}
.ax-pnl b {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ax-pnl b svg { width: 11px; height: 11px; flex: 0 0 auto; }
.ax-pnl .g { color: var(--ax-mint); }
.ax-pnl .r { color: var(--ax-red); }

.ax-ptabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--ax-line);
}
.ax-ptabs button {
  background: none;
  border: 0;
  color: #9aa3ae;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
}
.ax-ptabs button.is-on {
  background: #1a2744;
  color: #7ea6ff;
}
.ax-ptabs-ico {
  margin-left: auto;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: #1a2744;
  color: #9ec0ff;
  display: grid;
  place-items: center;
}
.ax-ptabs-ico svg { width: 12px; height: 12px; }

.ax-info {
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--ax-line);
}
.ax-info h3, .ax-banner-wrap h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #c5ccd4;
  margin-bottom: 10px;
}
.ax-info h3 .ch, .ax-banner-wrap h3 .ch { color: var(--ax-muted); font-size: 9px; }
.ax-refresh {
  margin-left: auto;
  background: none;
  border: 0;
  color: #8b939e;
  width: 16px;
  height: 16px;
  padding: 0;
  cursor: pointer;
}
.ax-refresh svg { width: 14px; height: 14px; }
.ax-tgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}
.ax-tgrid > div {
  border: 1px solid var(--ax-line);
  border-radius: 6px;
  padding: 8px 8px 7px;
  min-width: 0;
}
.ax-tgrid svg {
  width: 13px;
  height: 13px;
  color: #8b939e;
  margin-bottom: 4px;
}
.ax-tgrid b {
  display: block;
  font-size: 13px;
  font-weight: 750;
  color: #e8edf2;
  line-height: 1.2;
}
.ax-tgrid small {
  display: block;
  color: var(--ax-muted);
  font-size: 10px;
  margin-top: 2px;
}
.ax-tgrid .is-neg svg, .ax-tgrid .is-neg b { color: var(--ax-red); }
.ax-tgrid .is-pos svg, .ax-tgrid .is-pos b { color: var(--ax-mint); }

.ax-ca-bar, .ax-da-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid var(--ax-line);
  border-radius: 6px;
  background: #070c12;
  color: #d5dbe3;
  font-size: 11px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  text-align: left;
}
.ax-ca-bar svg, .ax-da-bar svg { width: 13px; height: 13px; color: #8b939e; flex: 0 0 auto; }
.ax-ca-bar .end, .ax-da-bar .end { margin-left: auto; display: inline-flex; gap: 8px; }
.ax-da-bar .end svg { width: 13px; height: 13px; }
.ax-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 11px;
  color: #c5ccd4;
  flex-wrap: wrap;
}
.ax-meta .crown {
  background: #1d3a8a;
  color: #f0c14b;
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
}
.ax-meta .soln, .ax-meta .ago { display: inline-flex; align-items: center; gap: 4px; color: #9aa3ae; }
.ax-meta svg { width: 12px; height: 12px; }

.ax-banner-wrap { padding: 8px 12px 12px; }
.ax-banner {
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--ax-line);
  background: #05070a;
  aspect-ratio: 548 / 150;
}
.ax-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ax-reused {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 650;
  color: #e8edf2;
}
.ax-reused span { color: #9aa3ae; }

/* ---------- FOOTER ---------- */
.ax-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 12px;
  border-top: 1px solid var(--ax-line);
  background: #00080e;
  font-size: 11px;
  min-width: 0;
  overflow: hidden;
}
.ax-global {
  height: 20px;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  background: #5a1518;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.ax-global .ch {
  border-top-color: #fff;
}
.ax-stable {
  color: var(--ax-mint);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ax-stable i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ax-mint);
}
.ax-foot-icos {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #9aa3ae;
}
.ax-foot-icos svg { width: 13px; height: 13px; }
.ax-tickers {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
  font-variant-numeric: tabular-nums;
}
.ax-tickers b { font-weight: 650; margin-right: 4px; }
.ax-tickers .g { color: var(--ax-mint); }
.ax-tickers .r { color: var(--ax-red); }

@media (max-width: 1360px) {
  .ax-menu { display: grid; }
  .ax-links {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 12px;
    z-index: 30;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    min-width: 180px;
    padding: 8px;
    border: 1px solid var(--ax-line);
    border-radius: 10px;
    background: #0b1118;
    box-shadow: 0 12px 32px rgba(0,0,0,0.45);
  }
  .ax-nav.is-menu-open .ax-links { display: flex; }
  .ax-links a { padding: 8px 10px; border-radius: 6px; }
  .ax-links a:hover { background: #121a22; }
  .ax-flow { flex-basis: 220px; }
}

@media (max-width: 1200px) {
  .ax-ico-row { display: none; }
  .ax-wallet em { display: none; }
  .ax-stats { gap: 14px; padding: 0 10px; }
  .ax-main { grid-template-columns: 44px minmax(0, 1fr) minmax(280px, 312px); }
  .ax-tickers span:last-child { display: none; }
}

@media (max-width: 1100px) {
  html, body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .app, .ax {
    height: auto;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: visible;
  }
  .ax {
    grid-template-rows: 52px auto minmax(0, auto) auto;
  }
  .ax-token {
    flex-wrap: wrap;
    height: auto;
    min-height: 72px;
    row-gap: 8px;
    padding: 8px 12px;
    overflow: visible;
  }
  .ax-split { display: none; }
  .ax-ident, .ax-px, .ax-stats, .ax-flow {
    flex: 1 1 auto;
    padding-left: 0;
    padding-right: 12px;
  }
  .ax-flow { margin-left: 0; min-width: 180px; }
  .ax-main {
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-areas:
      "tools center"
      "right right";
    /* auto rows — avoid forced 78vh that stretches the chart oddly */
    grid-template-rows: auto auto;
  }
  .ax-center { border-right: 0; }
  .ax-right {
    max-width: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border-top: 1px solid var(--ax-line);
    overflow: visible;
  }
  .ax-trade, .ax-pnl, .ax-ptabs, .ax-info, .ax-banner-wrap {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
  }
  .ax-info {
    border-left: 0;
    border-bottom: 1px solid var(--ax-line);
    min-height: 0;
  }
  .ax-trades {
    min-height: 160px;
    overflow-x: auto;
  }
  .ax-cols, .trades-body, .trades-body .row { min-width: 580px; }
  .view-stream .ax-center {
    grid-template-rows: 36px minmax(180px, 32vh) minmax(240px, 42vh) minmax(160px, 28vh);
  }
  .view-classic .ax-center {
    grid-template-rows: 36px minmax(220px, 38vh) minmax(160px, auto);
  }
  .trades-body {
    min-height: 120px;
    max-height: min(32vh, 300px);
  }
  .ax-chart-head > .ghost:nth-child(n+5) { display: none; }
}

@media (max-width: 860px) {
  .ax-chat-resizer { display: none; }
  .ax-live {
    grid-template-columns: minmax(0, 1.8fr) minmax(88px, 0.7fr);
    grid-template-rows: minmax(160px, 1fr) minmax(150px, 0.72fr);
  }
  .ax-live-dev { grid-column: 1; grid-row: 1; }
  .ax-live-holders { grid-column: 2; grid-row: 1; }
  .ax-activity { grid-column: 1 / -1; grid-row: 2; }
  .view-stream .ax-center {
    grid-template-rows: 36px minmax(180px, auto) minmax(240px, 38vh) minmax(150px, 26vh);
  }
  .ax-deposit, .ax-wallet { display: none; }
  .ax-nav-search { width: min(100%, 220px); }
  .ax-head-right { display: none; }
  .ax-tickers { display: none; }
  .ax-foot { height: auto; min-height: 32px; padding: 6px 12px; flex-wrap: wrap; overflow: visible; }
  .ax-cols, .trades-body, .trades-body .row { min-width: 580px; }
  .ax-trades { overflow-x: auto; }
}

@media (max-width: 640px) {
  .ax-tools { display: none; }
  .ax-main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "center"
      "right";
    grid-template-rows: auto auto;
  }
  .ax-right {
    display: flex;
    flex-direction: column;
    max-width: none;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
  .ax-trade {
    padding: 12px 14px 14px;
  }
  .ax-trade, .ax-pnl, .ax-ptabs, .ax-info, .ax-banner-wrap {
    grid-column: auto;
    grid-row: auto;
  }
  .ax-info { border-left: 0; border-bottom: 1px solid var(--ax-line); }
  .ax-nav { gap: 8px; padding: 0 10px; }
  .ax-brand b { font-size: 13px; }
  .ax-nav-search { margin-left: 0; flex: 1 1 auto; width: auto; min-width: 0; }
  .ax-kbd { display: none; }
  .ax-ident { flex: 1 1 100%; }
  .ax-stats { gap: 10px; overflow-x: auto; }
  .ax-live {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(168px, 42vw) minmax(96px, auto) minmax(150px, auto);
    height: auto;
  }
  .ax-live-dev, .ax-live-holders, .ax-activity {
    grid-column: 1;
    grid-row: auto;
  }
  .ax-live-holders {
    grid-template-rows: none;
    grid-template-columns: 1fr 1fr 1fr;
    min-height: 96px;
  }
  .view-stream .ax-center {
    grid-template-rows: 36px minmax(160px, auto) minmax(240px, 40vh) minmax(160px, auto);
  }
  .view-classic .ax-center {
    grid-template-rows: 36px minmax(200px, 36vh) minmax(140px, auto);
  }
  .ax-chart-head {
    padding: 0 8px;
    gap: 2px;
  }
  .ax-chart-head .sep,
  .ax-chart-head > .ghost { display: none; }
  .tf button { padding: 4px 8px; font-size: 11px; min-height: 32px; }
  .ax-tabs { gap: 12px; overflow-x: auto; }
  .ax-tabs button { flex: 0 0 auto; white-space: nowrap; }
  .popup-card { border-radius: 12px; }
  .pop-sub { white-space: normal; }
  .ax-nav-search input,
  .ax-amt input,
  #tokenSearch { font-size: 16px; }
  .ax-cta, .ax-join, .ax-deposit { min-height: 44px; }
  .ax-sides {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .ax-sides .more { display: none; }
  .ax-otype {
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .ax-otype .end { display: none; }
  .ax-presets {
    grid-template-columns: repeat(4, 1fr);
  }
  .ax-presets .pen { display: none; }
  .ax-adv {
    flex-wrap: wrap;
    gap: 0;
  }
  .ax-adv span {
    flex: 1 1 45%;
    border-right: 0;
    border-bottom: 1px solid var(--ax-line);
    justify-content: flex-start;
    padding: 8px 4px;
  }
  .ax-pnl {
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 10px 8px 12px;
  }
  .ax-pnl > div {
    padding: 8px 10px;
  }
  .ax-pnl > div + div { border-left: 0; }
  .ax-pnl > div:nth-child(odd) { border-right: 1px solid var(--ax-line); }
  .ax-pnl > div:nth-child(-n+2) { border-bottom: 1px solid var(--ax-line); }
  .ax-pnl b { font-size: 13px; white-space: normal; }
  .ax-ptabs {
    overflow-x: auto;
    gap: 2px;
    -webkit-overflow-scrolling: touch;
  }
  .ax-ptabs button {
    flex: 0 0 auto;
    padding: 8px 10px;
    min-height: 36px;
  }
  .ax-ptabs-ico { display: none; }
  .ax-trades { overflow-x: auto; }
  .ax-cols, .trades-body, .trades-body .row { min-width: 560px; }
  .trades-body {
    min-height: 100px;
    max-height: min(36vh, 280px);
  }
}

@media (max-width: 420px) {
  .ax-live-pill .watch { display: none; }
  .ax-ident img { width: 30px; height: 30px; }
  .ax-px b { font-size: 16px; }
  .ax-ident-top .nm { display: none; }
  .ax-presets button { min-width: 44px; min-height: 36px; }
}
