/* ArenaTrade host clone — extracted from https://arenatrade.ai 2026-09-16.
   Tokens and the data-chain mechanism are documented in ../design-tokens.md */

/* ---------------------------------------------------------------- theme */

[data-chain="avalanche"] {
  --accent: #f0561e;
  --accent-dark: #cf4715;
  --accent-fg: #ffffff;
  --accent-rgb: 240, 86, 30;
  --up: #30d158;
  --down: #ff453a;
  --up-rgb: 48, 209, 88;
  --down-rgb: 255, 69, 58;
}

[data-chain="robinhood"] {
  --accent: #ccff00;
  --accent-dark: #a8d400;
  --accent-fg: #1f2123;
  --accent-rgb: 204, 255, 0;
  --up: #5ac53a;
  --down: #eb5d2a;
  --up-rgb: 90, 197, 58;
  --down-rgb: 235, 93, 42;
}

:root {
  --bg: #070709;
  --surface: rgba(255, 255, 255, 0.022);
  --surface-2: rgba(255, 255, 255, 0.035);
  --surface-sunk: rgba(0, 0, 0, 0.2);
  --line: rgba(255, 255, 255, 0.055);
  --line-2: rgba(255, 255, 255, 0.09);
  --hover: rgba(255, 255, 255, 0.05);
  --text: #ffffff;
  --text-bright: #f5f5f7;
  --text-muted: #9a9aa4;
  --sold: #e31b54;
  --header-h: 64px;
  --shell: 1244px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

/* ------------------------------------------------------------- reset */

*,
*::before,
*::after { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(160% 130% at 50% -35%, rgba(var(--accent-rgb), 0.08) 0, rgba(var(--accent-rgb), 0.035) 28%, rgba(var(--accent-rgb), 0.015) 55%, rgba(0, 0, 0, 0) 100%),
    radial-gradient(130% 120% at 108% 6%, rgba(var(--accent-rgb), 0.05) 0, rgba(var(--accent-rgb), 0.015) 45%, rgba(0, 0, 0, 0) 100%),
    radial-gradient(130% 130% at -8% 108%, rgba(var(--accent-rgb), 0.04) 0, rgba(var(--accent-rgb), 0.015) 45%, rgba(0, 0, 0, 0) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: Manrope, ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
}

img { display: block; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

a { color: inherit; text-decoration: none; }

input {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  outline: none;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 8px;
}

.num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ header */

#hdr {
  position: sticky;
  top: 0;
  z-index: 60;
}

.hdr {
  height: var(--header-h);
  background: rgba(8, 10, 13, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.14);
}

.hdr-in {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.brand .mark {
  width: 21px;
  height: 21px;
  flex: none;
  background: var(--accent);
  -webkit-mask: url(assets/arenatrade-mark.svg) center / contain no-repeat;
  mask: url(assets/arenatrade-mark.svg) center / contain no-repeat;
}
.brand .b-a { color: var(--accent); }
.brand .b-b { color: #fff; }

.mode-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  margin-left: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-bright);
}

.mode-toggle .ico { color: var(--accent); }
.mode-toggle .chev { color: var(--text-muted); }

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 auto;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.nav a {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.nav a:hover { color: var(--text-bright); }

.nav a[aria-current="page"] {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.18);
}

.hdr-right { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--text-muted);
}

.icon-btn:hover { background: var(--hover); color: var(--text-bright); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--text-bright);
}

.btn-ghost:hover { background: var(--hover); }

.btn-accent {
  background: var(--accent);
  color: var(--accent-fg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15), 0 1px 2px -1px rgba(0, 0, 0, 0.15);
}

.btn-accent:hover { background: var(--accent-dark); }
.btn-accent svg { color: var(--accent-fg); }

.chain-pick {
  position: relative;
}

.chain-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
}

.chain-btn:hover { background: var(--hover); }
.chain-btn img { width: 17px; height: 17px; border-radius: 999px; }
.chain-btn .chev { color: var(--text-muted); margin-left: 2px; }

.chain-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 226px;
  padding: 6px;
  border-radius: 12px;
  background: #0c0d0f;
  border: 1px solid var(--line-2);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
  display: none;
}

.chain-pick.open .chain-menu { display: block; }

.chain-menu .mh {
  padding: 6px 8px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.chain-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border-radius: 9px;
  text-align: left;
}

.chain-menu button:hover { background: var(--hover); }
.chain-menu img { width: 26px; height: 26px; border-radius: 999px; }
.chain-menu .cn { font-size: 13px; font-weight: 700; }
.chain-menu .cs { font-size: 11px; color: var(--text-muted); }

/* ------------------------------------------------------------ tickers */

.rails { padding-top: 10px; display: grid; gap: 8px; }

.rail {
  display: flex;
  align-items: center;
  height: 38px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.rail-tag {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
  height: 100%;
  padding: 0 12px;
  border-right: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
  color: var(--text-bright);
}

.rail-tag .ico { color: var(--accent); display: grid; place-items: center; }

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--up);
  box-shadow: 0 0 0 0 rgba(var(--up-rgb), 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 7px rgba(var(--up-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--up-rgb), 0); }
}

.rail-track {
  flex: 1;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
}

.rail-move {
  display: flex;
  width: max-content;
  animation: marquee 62s linear infinite;
}

.rail:hover .rail-move { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.rail-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--text-bright);
}

.rail-item img { width: 18px; height: 18px; border-radius: 999px; object-fit: cover; }
.rail-item .rank { color: var(--text-muted); font-weight: 800; }
.rail-item .up { color: var(--up); }
.rail-item .down { color: var(--down); }
.rail-item .addr { color: var(--text-muted); font-family: var(--mono); font-size: 11px; }
.rail-item .sold { color: var(--sold); }
.rail-item .bought { color: var(--up); }
.rail-item .sym { color: var(--accent); }

/* ---------------------------------------------------------- stat strip */

.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr) auto;
  align-items: center;
  margin-top: 8px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.stat { padding: 12px 18px; border-right: 1px solid var(--line); }
.stat:nth-child(5) { border-right: 0; }

.stat .l {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat .v { margin-top: 3px; font-size: 17px; font-weight: 800; letter-spacing: -0.3px; }

.live-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 16px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(var(--up-rgb), 0.1);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.7px;
  color: var(--up);
}

/* ------------------------------------------------------------ headings */

.h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 26px 0 14px;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.7px;
}

.h2 .live-chip { margin: 0; }

.row-between { display: flex; align-items: center; justify-content: space-between; }

/* ------------------------------------------------------- trending cards */

.trending {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.tcard {
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}

.tcard:hover { border-color: rgba(var(--accent-rgb), 0.35); transform: translateY(-2px); }

.tcard-art { position: relative; aspect-ratio: 1 / 0.78; overflow: hidden; }
.tcard-art img { width: 100%; height: 100%; object-fit: cover; }

.badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  backdrop-filter: blur(6px);
}

.badge-grad { background: rgba(0, 0, 0, 0.72); color: var(--up); }
.badge-live { background: rgba(0, 0, 0, 0.72); color: var(--accent); }

.rank-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  font-size: 10px;
  font-weight: 800;
  color: #fff;
}

.tcard-body { padding: 10px 12px 12px; }

.tcard-name { font-size: 13px; font-weight: 800; letter-spacing: -0.2px; }
.tcard-name span { color: var(--text-muted); font-weight: 700; margin-left: 5px; }

.tcard-mc {
  margin-top: 8px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.7px;
  color: var(--text-muted);
}

.tcard-val { display: flex; align-items: baseline; justify-content: space-between; margin-top: 2px; }
.tcard-val .v { font-size: 19px; font-weight: 800; letter-spacing: -0.5px; }
.tcard-val .d { font-size: 12px; font-weight: 700; }

.up { color: var(--up); }
.down { color: var(--down); }

.tcard-foot {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.tcard-foot span { display: flex; align-items: center; gap: 4px; }

/* ------------------------------------------------------------- controls */

.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.seg button {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.seg button:hover { color: var(--text-bright); }

.seg button[aria-pressed="true"] {
  color: var(--text-bright);
  background: rgba(255, 255, 255, 0.07);
}

.chips {
  display: flex;
  gap: 4px;
  padding: 6px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.chips button {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.chips button:hover { color: var(--text-bright); background: var(--hover); }

.chips button[aria-pressed="true"] {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.11);
}

/* --------------------------------------------------------- explore grid */

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.gcard {
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}

.gcard:hover { border-color: rgba(var(--accent-rgb), 0.35); transform: translateY(-2px); }
.gcard-art { position: relative; aspect-ratio: 1 / 0.62; overflow: hidden; }
.gcard-art img { width: 100%; height: 100%; object-fit: cover; }
.gcard-body { padding: 10px 12px 12px; }

.gcard-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.gcard-sym { font-size: 14px; font-weight: 800; letter-spacing: -0.2px; }
.gcard-nm { font-size: 11px; font-weight: 700; color: var(--text-muted); margin-top: 1px; }
.gcard-mc { font-size: 15px; font-weight: 800; letter-spacing: -0.3px; }
.gcard-d { font-size: 11px; font-weight: 700; text-align: right; margin-top: 1px; }

.gcard-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

.bar {
  height: 5px;
  margin-top: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.bar i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.bar.done i { background: var(--up); }

.gcard-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.gcard-foot span { display: flex; align-items: center; gap: 4px; }

/* -------------------------------------------------------- explore table */

.panel {
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

table { width: 100%; border-collapse: collapse; }

thead th {
  padding: 11px 14px;
  text-align: left;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

tbody td {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
  white-space: nowrap;
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255, 255, 255, 0.022); }

.cell-token { display: flex; align-items: center; gap: 10px; }
.cell-token img { width: 30px; height: 30px; border-radius: 999px; object-fit: cover; flex: none; }
.cell-token .s { font-size: 13px; font-weight: 800; }
.cell-token .n { font-size: 11px; font-weight: 700; color: var(--text-muted); }

.mini-bar { width: 78px; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: var(--accent); }
.mini-pct { font-size: 10px; font-weight: 800; color: var(--text-muted); margin-top: 4px; }

.muted { color: var(--text-muted); }
.mono { font-family: var(--mono); }

/* ------------------------------------------------------------ token page */

.tk-grid {
  display: grid;
  grid-template-columns: 1fr 364px;
  gap: 16px;
  align-items: start;
  margin-top: 14px;
}

.tk-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.tk-head > img { width: 44px; height: 44px; border-radius: 999px; object-fit: cover; flex: none; }
.tk-head .sym { font-size: 21px; font-weight: 900; letter-spacing: -0.5px; }
.tk-head .nm { font-size: 12px; font-weight: 700; color: var(--text-muted); }

.tk-facts { display: flex; margin-left: auto; gap: 26px; }
.tk-fact .l { font-size: 9px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-muted); }
.tk-fact .v { margin-top: 3px; font-size: 13px; font-weight: 800; display: flex; align-items: center; gap: 5px; }
.tk-fact .v img { width: 14px; height: 14px; border-radius: 999px; }

.chart {
  margin-top: 12px;
  height: 452px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.chart-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.chart-bar .sep { width: 1px; height: 16px; background: var(--line); }
.chart-bar .unit { color: var(--accent); }

.chart-body { flex: 1; display: flex; }

.chart-tools {
  width: 34px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  color: var(--text-muted);
}

.chart-plot { flex: 1; position: relative; padding: 10px 0 0 12px; }

.chart-label {
  position: absolute;
  top: 10px;
  left: 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-bright);
}

.chart-label em { font-style: normal; color: var(--text-muted); }

.chart-axis {
  width: 66px;
  border-left: 1px solid var(--line);
  padding: 22px 0 0 8px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  font-family: var(--mono);
}

.chart-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.chart-foot button { padding: 3px 7px; border-radius: 5px; }
.chart-foot button:hover { background: var(--hover); color: var(--text-bright); }
.chart-foot .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.chart-foot .auto { color: var(--accent); }

.tabs {
  display: flex;
  gap: 2px;
  margin-top: 12px;
  padding: 5px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  width: max-content;
}

.tabs button {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 13px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.tabs button[aria-pressed="true"] { color: var(--text-bright); background: rgba(255, 255, 255, 0.07); }

.trader { display: flex; align-items: center; gap: 9px; }
.trader img { width: 26px; height: 26px; border-radius: 999px; flex: none; }
.trader .n { font-size: 12px; font-weight: 800; }
.trader .h { font-size: 10px; font-weight: 700; color: var(--text-muted); font-family: var(--mono); }

.filt { color: rgba(255, 255, 255, 0.25); margin-left: 5px; vertical-align: -1px; }

/* -------------------------------------------------------------- rail */

.rail-col { display: grid; gap: 12px; }

.card {
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 14px;
}

.card-h { font-size: 12px; font-weight: 800; color: var(--text-bright); }

.bs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 11px;
  background: var(--surface-sunk);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.bs button {
  height: 34px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
}

.bs button[aria-pressed="true"][data-side="buy"] {
  color: var(--up);
  background: rgba(var(--up-rgb), 0.12);
  box-shadow: 0 0 0 1px rgba(var(--up-rgb), 0.15);
}

.bs button[aria-pressed="true"][data-side="sell"] {
  color: var(--down);
  background: rgba(var(--down-rgb), 0.12);
  box-shadow: 0 0 0 1px rgba(var(--down-rgb), 0.15);
}

.pay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0 7px;
}

.pay-head .l {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.7px;
  color: var(--text-muted);
}

.pay-head .route { font-size: 10px; font-weight: 700; color: rgba(255, 255, 255, 0.35); }

.pay-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.pay-toggle button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 800;
}

.pay-toggle button[aria-pressed="true"] {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: rgba(var(--accent-rgb), 0.3);
}

.pay-toggle img { width: 17px; height: 17px; border-radius: 999px; }

.connect-block { padding: 26px 0 8px; text-align: center; }
.connect-block .t { font-size: 14px; font-weight: 800; }
.connect-block .s { margin-top: 5px; font-size: 11px; font-weight: 600; color: var(--text-muted); }

.creator { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.creator img { width: 22px; height: 22px; border-radius: 999px; }
.creator .n { font-size: 13px; font-weight: 800; }
.creator .flag { margin-left: auto; color: var(--accent); }

.tf {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 12px;
  padding: 4px;
  border-radius: 10px;
  background: var(--surface-sunk);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.tf div { padding: 6px 0; border-radius: 7px; text-align: center; }
.tf div.on { background: rgba(255, 255, 255, 0.06); }
.tf .l { font-size: 10px; font-weight: 700; color: var(--text-muted); }
.tf .v { margin-top: 2px; font-size: 12px; font-weight: 800; }

.split { margin-top: 12px; }
.split .lbl { display: flex; justify-content: space-between; font-size: 10px; font-weight: 700; color: var(--text-muted); }
.split .val { display: flex; justify-content: space-between; margin-top: 2px; font-size: 12px; font-weight: 800; }
.split .val .r { color: var(--text-bright); }

.split-bar {
  display: flex;
  height: 5px;
  margin-top: 5px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.split-bar i:first-child { background: var(--up); }
.split-bar i:last-child { background: var(--down); }

.ca {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--surface-sunk);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

.ca .icons { margin-left: auto; display: flex; gap: 6px; color: var(--text-muted); }
.ca .icons a:hover { color: var(--accent); }

.grad-row { display: flex; align-items: center; justify-content: space-between; }
.grad-row .p { font-size: 12px; font-weight: 800; color: var(--accent); }

/* ----------------------------------------------------------- memescope */

.ms-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }

.ms-h {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.4px;
}

.ms-h .ico { color: var(--accent); display: grid; place-items: center; }

.ms-col { display: grid; gap: 8px; }

.ms-card {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 10px;
  padding-left: 34px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.15s;
}

.ms-card:hover { border-color: rgba(var(--accent-rgb), 0.3); }

.ms-pct {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 8px;
  border-right: 1px solid var(--line);
  font-size: 9px;
  font-weight: 800;
  color: var(--text-muted);
}

.ms-pct i {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 24px;
  width: 3px;
  border-radius: 999px;
  background: var(--accent);
}

.ms-card > img { width: 62px; height: 62px; border-radius: 10px; object-fit: cover; flex: none; }
.ms-body { flex: 1; min-width: 0; }
.ms-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ms-sym { font-size: 13px; font-weight: 800; }
.ms-sym span { color: var(--text-muted); font-weight: 700; margin-left: 5px; font-size: 11px; }
.ms-stat { font-size: 11px; font-weight: 700; text-align: right; color: var(--text-muted); }
.ms-stat b { color: var(--text-bright); font-weight: 800; }

.ms-addr {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}

.ms-meta { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: 10px; font-weight: 700; color: var(--text-muted); }
.ms-meta img { width: 16px; height: 16px; border-radius: 999px; }

.switch {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  flex: none;
  transition: background 0.15s;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  transition: transform 0.15s;
}

.switch[aria-pressed="true"] { background: var(--accent); }
.switch[aria-pressed="true"]::after { transform: translateX(14px); }

/* ---------------------------------------------------------------- swap */

.page-h { margin: 30px 0 4px; font-size: 30px; font-weight: 900; letter-spacing: -0.8px; }
.page-s { font-size: 13px; font-weight: 600; color: var(--text-muted); }

.swap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; max-width: 980px; }

.swap-card { border-radius: 14px; background: var(--surface); border: 1px solid var(--line); padding: 14px; }

.swap-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.swap-head .t { font-size: 14px; font-weight: 800; }

.tag {
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.swap-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--text-muted); }

.slip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  font-weight: 700;
}

.leg { position: relative; padding: 12px 14px; border-radius: 12px; background: var(--surface-sunk); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04); }

.leg-top { display: flex; justify-content: space-between; font-size: 9px; font-weight: 800; letter-spacing: 0.6px; color: var(--text-muted); }

.leg-main { display: flex; align-items: center; gap: 10px; margin-top: 6px; }

.amt { flex: 1; min-width: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.8px; }
.amt::placeholder { color: rgba(255, 255, 255, 0.3); }

.asset-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  flex: none;
}

.asset-btn:hover { background: rgba(255, 255, 255, 0.08); }
.asset-btn .ico { position: relative; flex: none; }
.asset-btn .ico > img { width: 26px; height: 26px; border-radius: 999px; }

.chain-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  border: 2px solid #0b0c0e;
}

.asset-btn .s { font-size: 13px; font-weight: 800; text-align: left; }
.asset-btn .c { font-size: 10px; font-weight: 700; color: var(--text-muted); }

.leg-usd { margin-top: 4px; font-size: 11px; font-weight: 700; color: var(--text-muted); }

.pcts { display: flex; gap: 5px; justify-content: flex-end; margin-top: 10px; }

.pcts button {
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
}

.pcts button:hover { color: var(--text-bright); background: rgba(255, 255, 255, 0.09); }

.flip {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: -14px auto;
  border-radius: 10px;
  background: #15171a;
  border: 3px solid #0a0b0d;
  color: var(--text-muted);
}

.flip:hover { color: var(--text-bright); }

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  margin-top: 14px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 14px;
  font-weight: 800;
}

.cta:hover { background: var(--accent-dark); }
.cta[disabled] { opacity: 0.45; cursor: not-allowed; }

.cta-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-bright);
  border: 1px solid var(--line);
}

.cta-ghost:hover { background: rgba(255, 255, 255, 0.1); }

.empty { display: grid; place-items: center; gap: 8px; padding: 74px 20px; text-align: center; }
.empty .ico { color: rgba(255, 255, 255, 0.2); }
.empty .t { font-size: 14px; font-weight: 800; }
.empty .s { font-size: 11px; font-weight: 600; color: var(--text-muted); max-width: 230px; line-height: 1.55; }

/* -------------------------------------------------------------- launch */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent);
}

.launch-grid { display: grid; grid-template-columns: 1fr 340px; gap: 18px; margin-top: 20px; align-items: start; }

.step { display: flex; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }

.step .n {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  flex: none;
}

.step .t { font-size: 12px; font-weight: 800; }
.step .s { margin-top: 3px; font-size: 11px; font-weight: 600; line-height: 1.55; color: var(--text-muted); }

.launch-on {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.launch-on img { width: 26px; height: 26px; border-radius: 999px; }
.launch-on .l { font-size: 8px; font-weight: 800; letter-spacing: 0.8px; color: var(--text-muted); }
.launch-on .v { font-size: 13px; font-weight: 800; }

/* --------------------------------------------------------------- modals */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(3px);
}

.scrim.open { display: grid; }

.modal {
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: #101114;
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.modal-h { display: flex; align-items: flex-start; gap: 12px; padding: 16px 16px 12px; }
.modal-h .t { font-size: 16px; font-weight: 800; letter-spacing: -0.3px; }
.modal-h .s { margin-top: 3px; font-size: 11px; font-weight: 600; color: var(--text-muted); }
.modal-h .x { margin-left: auto; color: var(--text-muted); }
.modal-h .x:hover { color: var(--text-bright); }
.modal-b { padding: 0 16px 16px; overflow-y: auto; }

.hint {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--text-muted);
}

.meta-row { display: flex; justify-content: space-between; margin: 10px 2px; font-size: 10px; font-weight: 700; color: var(--text-muted); }
.foot-note { margin-top: 9px; text-align: center; font-size: 10px; font-weight: 600; color: rgba(255, 255, 255, 0.3); }

.search {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--surface-sunk);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.055);
  color: var(--text-muted);
}

.search input { flex: 1; font-size: 13px; font-weight: 600; }
.search input::placeholder { color: var(--text-muted); }

.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0; }

.mini-seg { display: flex; gap: 3px; }

.mini-seg button {
  padding: 5px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.mini-seg button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.1); color: var(--text-bright); }

.asset-list { max-height: 320px; overflow-y: auto; margin: 0 -4px; }

.asset-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 10px;
  text-align: left;
}

.asset-row:hover { background: var(--hover); }
.asset-row .ico { position: relative; flex: none; }
.asset-row .ico > img { width: 32px; height: 32px; border-radius: 999px; object-fit: cover; }
.asset-row .s { font-size: 13px; font-weight: 800; }
.asset-row .n { font-size: 10px; font-weight: 700; color: var(--text-muted); }
.asset-row .r { margin-left: auto; text-align: right; }
.asset-row .r .a { font-size: 13px; font-weight: 800; }
.asset-row .r .u { font-size: 10px; font-weight: 700; color: var(--text-muted); }

.wallets { display: grid; gap: 7px; }

.wallet {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
}

.wallet:hover { background: rgba(255, 255, 255, 0.07); }
.wallet .mark { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; font-weight: 900; flex: none; }
.wallet .count { margin-left: auto; font-size: 10px; font-weight: 700; color: var(--text-muted); }

.socials { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin: 12px 0; }

.social {
  display: grid;
  place-items: center;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.social:hover { background: rgba(255, 255, 255, 0.09); }

.or { display: flex; align-items: center; gap: 10px; margin: 14px 0; font-size: 10px; font-weight: 800; color: var(--text-muted); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.email {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--surface-sunk);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13px;
  font-weight: 600;
}

.email::placeholder { color: var(--text-muted); }

.footer {
  margin-top: 46px;
  padding: 22px 0 34px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.28);
  display: flex;
  justify-content: space-between;
}


/* ------------------------------------------------- attribute-driven colour */
/* Anything per-instance that used to need an inline style lives here instead,
   so a privacy extension stripping inline styles cannot flatten the page. */

.chain-dot[data-chain-dot="robinhood"] { background: #ccff00; }
.chain-dot[data-chain-dot="avalanche"] { background: #e84142; }

.max-link { color: var(--accent); }

.wallet-plain {
  margin-top: 7px;
  background: none;
  border: 0;
  justify-content: flex-start;
}

.wallet-plain:hover { background: rgba(255, 255, 255, 0.04); }

.wallet .mark[data-wallet="metamask"] { background: #f6851b; color: #fff; }
.wallet .mark[data-wallet="coinbase"] { background: #0052ff; color: #fff; }
.wallet .mark[data-wallet="walletconnect"] { background: #3b99fc; color: #fff; }

/* --------------------------------------------------------------- narrower */
/* The host collapses its header well before this; the clone only has to not
   overflow on the way down to its 1440 target. */

@media (max-width: 1180px) {
  .mode-toggle span:not(.ico):not(.chev) { display: none; }
  .nav a span { display: none; }
  .nav a { padding: 0 10px; }
}

@media (max-width: 1040px) {
  .btn-ghost span,
  .chain-btn > span:not(.chev) { display: none; }
  .chain-btn { padding: 0 7px; }
}
