/* Hype City: hl.eco-style live dashboard, Hyperliquid palette, editorial type */
:root {
  --bg: #03211c;
  --bg-deep: #021713;
  --panel-bg: rgba(151, 252, 228, 0.035);
  --line: rgba(151, 252, 228, 0.14);
  --line-soft: rgba(151, 252, 228, 0.07);
  --mint: #97fce4;
  --mint-dim: #4fbfae;
  --text: #eafff9;
  --text-dim: #8fb8ae;
  --red: #ff8080;
  --display: "Clash Display", "Inter", system-ui, sans-serif;
  --body: "Satoshi", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* The hidden attribute always wins, even over display rules on the class. */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  background: var(--bg-deep);
  overflow-x: clip;
}

body {
  font-family: var(--body);
  background:
    radial-gradient(ellipse 80% 50% at 70% -10%, rgba(151, 252, 228, 0.09), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  color: var(--text);
  line-height: 1.6;
  overflow-x: clip;
  padding-bottom: 76px; /* room for bottom nav on mobile */
}

.mono { font-family: var(--mono); }
.mono-dim { font-family: var(--mono); color: var(--text-dim); font-size: 0.78rem; }
.muted { opacity: 0.55; }
.up { color: var(--mint) !important; }
.down { color: var(--red) !important; }

/* ---------- Ticker ---------- */
.ticker-bar {
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
  height: 36px;
  display: flex;
  align-items: center;
  background: var(--bg-deep);
}
.ticker-track {
  display: inline-flex;
  gap: 3rem;
  white-space: nowrap;
  padding-left: 100%;
  animation: ticker-scroll 45s linear infinite;
}
.ticker-track.static { padding-left: 1.5rem; animation: none; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
.ticker-item {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}
.ticker-item b { color: var(--mint); font-weight: 600; }
.ticker-item .up { color: var(--mint); }
.ticker-item .down { color: var(--red); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(3, 33, 28, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.brand {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
}
.brand-dot {
  width: 7px;
  height: 7px;
  background: var(--mint);
  display: inline-block;
  box-shadow: 0 0 10px rgba(151, 252, 228, 0.9);
}
.nav-links { display: flex; align-items: center; gap: clamp(1.2rem, 3vw, 2.4rem); }
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--mint); }
.nav-join { color: var(--mint) !important; }

/* ---------- Views ---------- */
.view {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(1.2rem, 3vw, 2.5rem) clamp(1rem, 3vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2vw, 1.5rem);
}
.view[hidden] { display: none; }

/* ---------- Panels ---------- */
.panel {
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(1.2rem, 3vw, 1.8rem);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}
.panel-title {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--mint-dim);
}

/* Pill tab groups */
.pill-tabs, .tf-tabs {
  display: inline-flex;
  gap: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem;
}
.pill-tabs button, .tf-tabs button {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  background: none;
  border: none;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.pill-tabs button:hover, .tf-tabs button:hover { color: var(--text); }
.pill-tabs button.active, .tf-tabs button.active {
  background: rgba(151, 252, 228, 0.12);
  color: var(--mint);
}

/* ---------- Hero panel ---------- */
.hero-panel { padding-bottom: 0.8rem; }
.hero-price-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}
.kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--mint-dim);
  margin-bottom: 0.6rem;
}
.hero-price {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.hero-price > span:first-child {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1;
  letter-spacing: 0.01em;
}
.chip {
  font-family: var(--mono);
  font-size: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.3rem 0.6rem;
  color: var(--text-dim);
}
.chip.up { border-color: rgba(151, 252, 228, 0.35); }
.chip.down { border-color: rgba(255, 128, 128, 0.35); }
.hero-range { margin-top: 0.6rem; }
.hero-mini-stats { display: flex; gap: 2.2rem; flex-wrap: wrap; }

.stat { display: flex; flex-direction: column; gap: 0.35rem; }
.stat-label {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  color: var(--mint-dim);
}
.stat-value {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.65rem;
  color: var(--text);
  line-height: 1.1;
}
.stat-value.sm { font-size: 1.15rem; }
.stat-sub { margin-top: 0.15rem; }

.chart-controls { display: flex; justify-content: flex-end; margin-bottom: 0.6rem; }
.chart-wrap { width: 100%; }
.chart-wrap canvas { width: 100%; height: 320px; display: block; }

/* ---------- Stat grid ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(0.8rem, 2vw, 1.2rem);
}
.stat-cell { display: flex; flex-direction: column; gap: 0.4rem; }

/* ---------- Markets table ---------- */
.table-wrap { overflow-x: auto; }
.mkt-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.82rem;
  white-space: nowrap;
}
.mkt-table th {
  text-align: right;
  font-weight: 500;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mint-dim);
  padding: 0.5rem 0.9rem;
  border-bottom: 1px solid var(--line);
}
.mkt-table th:first-child, .mkt-table td:first-child { text-align: left; padding-left: 0.4rem; }
.mkt-table td {
  text-align: right;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-dim);
}
.mkt-table tr:last-child td { border-bottom: none; }
.mkt-table td.coin { color: var(--text); font-weight: 600; }
.mkt-table tbody tr { transition: background 0.15s; }
.mkt-table tbody tr:hover { background: rgba(151, 252, 228, 0.04); }

/* ---------- Duo grid (orderbook + tape) ---------- */
.duo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.8rem, 2vw, 1.5rem);
}
.ob-summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.ob-levels { display: flex; flex-direction: column; gap: 3px; }
.ob-level {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.9;
}
.ob-side { position: relative; padding: 0 0.5rem; display: flex; justify-content: space-between; overflow: hidden; border-radius: 4px; }
.ob-side .bar { position: absolute; top: 0; bottom: 0; opacity: 0.14; }
.ob-side.bid .bar { right: 0; background: var(--mint); }
.ob-side.ask .bar { left: 0; background: var(--red); }
.ob-side span { position: relative; }
.ob-side.bid { color: var(--mint); }
.ob-side.ask { color: var(--red); }
.ob-side .sz { color: var(--text-dim); }

.live-dot-wrap { display: inline-flex; align-items: center; gap: 0.5rem; }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-dim);
}
.live-dot.on { background: var(--mint); box-shadow: 0 0 8px rgba(151, 252, 228, 0.8); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }

.tape { display: flex; flex-direction: column; gap: 0.15rem; min-height: 260px; max-height: 340px; overflow: hidden; }
.tape-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.9;
  padding: 0 0.4rem;
  border-radius: 4px;
  animation: tape-in 0.3s ease;
}
@keyframes tape-in { from { opacity: 0; transform: translateY(-4px); } }
.tape-row .px.B { color: var(--mint); }
.tape-row .px.A { color: var(--red); }
.tape-row .sz { text-align: right; color: var(--text-dim); }
.tape-row .tm { text-align: right; color: var(--text-dim); opacity: 0.6; }

/* ---------- Explorer ---------- */
.explorer-form { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.5rem; }
.explorer-input {
  flex: 1 1 320px;
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  outline: none;
  transition: border-color 0.2s;
}
.explorer-input:focus { border-color: var(--mint-dim); }
.explorer-input::placeholder { color: var(--text-dim); opacity: 0.6; }
.explorer-error { font-family: var(--mono); color: var(--red); font-size: 0.82rem; margin-top: 0.9rem; }
.section-head.slim { margin-bottom: 0; }
.pos-side { font-weight: 600; }

/* ---------- Buttons ---------- */
.btn-solid, .btn-line, .btn-dark {
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  padding: 0.9rem 1.9rem;
  border: none;
  cursor: pointer;
  border-radius: 12px;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-solid { background: var(--mint); color: var(--bg-deep); }
.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 0 34px rgba(151, 252, 228, 0.4); }
.btn-line {
  color: var(--text);
  border: 1px solid var(--line);
  background: none;
  display: inline-block;
}
.btn-line:hover { border-color: var(--mint); color: var(--mint); }
.btn-dark { display: inline-block; background: var(--bg-deep); color: var(--mint); }
.btn-dark:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(2, 23, 19, 0.45); }

/* ---------- Marquee ---------- */
.marquee {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
  padding: 0.9rem 0;
  margin: 1.5rem calc(-1 * clamp(1rem, 3vw, 3rem)) 0;
}
.marquee-track {
  display: inline-flex;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.34em;
  color: var(--mint-dim);
  text-transform: uppercase;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Editorial sections ---------- */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section.slim-top { padding-top: 1rem; }
.section-head { margin-bottom: 3rem; }
.section-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--mint-dim);
  display: block;
  margin-bottom: 1.2rem;
}
.section h2, .section-head h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4.5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: 0.005em;
}
.section-sub { color: var(--text-dim); max-width: 560px; margin-top: 1.2rem; }

.rows { border-top: 1px solid var(--line); }
.row {
  display: flex;
  gap: clamp(1.5rem, 5vw, 5rem);
  padding: 2.4rem 0.5rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.25s, padding-left 0.25s;
}
.row:hover { background: rgba(151, 252, 228, 0.03); padding-left: 1.2rem; }
.row-num {
  font-family: var(--display);
  font-weight: 600;
  font-size: 2.6rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--mint-dim);
  flex: 0 0 3.5rem;
}
.row-body h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.35rem;
  margin-bottom: 0.45rem;
}
.row-body p { color: var(--text-dim); max-width: 560px; font-size: 0.98rem; }

/* Bot */
.bot-grid {
  display: grid;
  grid-template-columns: minmax(300px, 520px) 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.terminal {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-deep);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.terminal-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line-soft);
}
.t-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(151, 252, 228, 0.25); }
.terminal-title {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-left: 0.6rem;
  letter-spacing: 0.12em;
}
.terminal-body {
  padding: 1.4rem 1.3rem 1.6rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 2.1;
  color: var(--text-dim);
}
.t-user, .t-bot { display: inline-block; min-width: 3.2em; color: var(--mint-dim); margin-right: 0.5em; }
.t-bot { color: var(--mint); }
.t-accent { color: var(--mint); }
.t-cursor { color: var(--mint); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.bot-copy p { color: var(--text-dim); font-size: 1.02rem; max-width: 480px; margin-bottom: 2rem; }
.bot-copy .mono {
  color: var(--mint);
  font-size: 0.9em;
  background: rgba(151, 252, 228, 0.08);
  padding: 0.1em 0.45em;
  border-radius: 6px;
}

/* Link lists (Learn) */
.learn-group {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--mint-dim);
  margin: 3rem 0 1rem;
}
.link-list { border-top: 1px solid var(--line); }
.link-row {
  display: grid;
  grid-template-columns: minmax(140px, 280px) 1fr auto;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.4rem 0.5rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background 0.25s, padding-left 0.25s;
}
.link-row:hover { background: rgba(151, 252, 228, 0.03); padding-left: 1.2rem; }
.link-row:hover .link-arrow { transform: translate(3px, -3px); color: var(--mint); }
.link-name { font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--text); }
.link-note { color: var(--text-dim); font-size: 0.9rem; }
.link-arrow { color: var(--mint-dim); font-size: 1.1rem; transition: transform 0.2s, color 0.2s; }

/* ---------- Join ---------- */
.join {
  background: var(--mint);
  color: var(--bg-deep);
  text-align: center;
  padding: clamp(4rem, 8vw, 6.5rem) 1.5rem;
  border-radius: 22px;
  margin-top: 1rem;
}
.join-kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  margin-bottom: 1.4rem;
  color: rgba(2, 23, 19, 0.65);
}
.join-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
}
.join-sub { margin: 1.4rem auto 2.6rem; max-width: 420px; color: rgba(2, 23, 19, 0.75); font-weight: 500; }

/* ---------- Bottom nav ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  justify-content: space-around;
  padding: 0.6rem 0.5rem calc(0.6rem + env(safe-area-inset-bottom));
  background: rgba(2, 23, 19, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line-soft);
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  padding: 0.3rem 1.4rem;
  border-radius: 12px;
  transition: color 0.2s, background 0.2s;
}
.bottom-nav a.active { color: var(--mint); background: rgba(151, 252, 228, 0.08); }
.bn-icon { font-size: 1rem; }

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-deep);
  padding: 3rem 1.5rem 3.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.82rem;
}
.footer p { max-width: 620px; margin: 0 auto 0.6rem; }

/* ---------- Responsive ---------- */
@media (min-width: 861px) {
  body { padding-bottom: 0; }
  .bottom-nav { display: none; }
}
@media (max-width: 860px) {
  .duo-grid { grid-template-columns: 1fr; }
  .bot-grid { grid-template-columns: 1fr; }
  .nav-links a:not(.nav-join) { display: none; }
}
@media (max-width: 640px) {
  .link-row { grid-template-columns: 1fr auto; row-gap: 0.3rem; padding: 1.2rem 0.5rem; }
  .link-note { grid-column: 1 / -1; }
  .row { gap: 1.2rem; }
  .row-num { flex: 0 0 2.4rem; font-size: 1.9rem; }
  .hero-mini-stats { gap: 1.4rem; }
  .chart-wrap canvas { height: 240px; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track, .marquee-track, .t-cursor, .live-dot.on { animation: none; }
  .ticker-track { padding-left: 1.5rem; }
  html { scroll-behavior: auto; }
}

/* ---------- Icon buttons ---------- */
.icon-btn {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--text-dim);
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.icon-btn:hover { color: var(--mint); border-color: var(--mint-dim); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.8rem; border-radius: 9px; }
.mlm-link { color: var(--mint-dim) !important; }
.mlm-link.active, .mlm-link:hover { color: var(--mint) !important; }

/* ---------- Drawer ---------- */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(2, 23, 19, 0.6);
  backdrop-filter: blur(4px);
}
.drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(300px, 85vw);
  background: var(--bg);
  border-left: 1px solid var(--line);
  padding: 2.2rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.drawer a {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
  padding: 0.55rem 0;
  transition: color 0.2s;
}
.drawer a:hover { color: var(--mint); }
.drawer hr { border: none; border-top: 1px solid var(--line); margin: 1rem 0; }
.drawer-action {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  cursor: pointer;
  text-align: left;
  transition: color 0.2s, border-color 0.2s;
}
.drawer-action:hover { color: var(--mint); border-color: var(--mint-dim); }

/* ---------- Search overlay ---------- */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(2, 23, 19, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  padding: 12vh 1rem 0;
}
.search-box {
  width: min(560px, 100%);
  height: fit-content;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.search-input {
  width: 100%;
  font-family: var(--body);
  font-size: 1.05rem;
  color: var(--text);
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 1.3rem;
  outline: none;
}
.search-input::placeholder { color: var(--text-dim); opacity: 0.6; }
.search-results { max-height: 46vh; overflow-y: auto; }
.search-row {
  display: grid;
  grid-template-columns: 74px 1fr;
  grid-template-areas: "type label" "type hint";
  gap: 0 0.9rem;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line-soft);
  padding: 0.75rem 1.3rem;
  cursor: pointer;
}
.search-row:hover { background: rgba(151, 252, 228, 0.05); }
.search-type { grid-area: type; font-size: 0.62rem; letter-spacing: 0.14em; color: var(--mint-dim); align-self: center; }
.search-label { grid-area: label; color: var(--text); font-weight: 600; font-size: 0.95rem; }
.search-hint { grid-area: hint; font-size: 0.72rem; }
.search-empty { padding: 1.2rem 1.3rem; }
.search-hint-bar { padding: 0.6rem 1.3rem; border-top: 1px solid var(--line-soft); font-size: 0.68rem; }

/* ---------- MLM Mode ---------- */
.mlm-head-panel .panel-head { align-items: flex-start; }
.mlm-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.05;
  margin: 0.4rem 0 0.6rem;
}
.mlm-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.mini-stat-row { display: flex; gap: 2.2rem; flex-wrap: wrap; margin-top: 1rem; }
.poscard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(0.8rem, 2vw, 1.2rem);
}
.pos-card-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.1rem;
  font-weight: 600;
}
.pos-card-head .coin { color: var(--text); font-size: 1.05rem; }
.pos-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.9rem 1.2rem;
}
.lvs-grid { display: flex; gap: 3rem; }
.lvs-col { display: flex; flex-direction: column; gap: 0.3rem; font-family: var(--display); font-weight: 600; font-size: 1.2rem; }
.bal-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.45rem 0;
}
.bal-bar {
  height: 7px;
  border-radius: 4px;
  background: rgba(151, 252, 228, 0.08);
  overflow: hidden;
}
.bal-bar span { display: block; height: 100%; background: var(--mint); border-radius: 4px; }
.bal-val { font-size: 0.75rem; color: var(--text-dim); }
.big-card .big-head {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}
.big-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.4rem 1rem;
  font-size: 0.75rem;
}
.disclaimer-line { text-align: center; padding: 0.5rem 0 1.5rem; font-size: 0.72rem; opacity: 0.7; }

/* ---------- Supply + depth cards ---------- */
.supply-grid { display: flex; gap: 2.2rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.depth-row { display: flex; gap: 2.2rem; flex-wrap: wrap; margin: 0.9rem 0 1.1rem; }
.depth-bar-track {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 128, 128, 0.18);
  overflow: hidden;
}
.depth-bar { display: block; height: 100%; background: var(--mint); border-radius: 4px; width: 0; transition: width 0.6s; }
.depth-mids { display: flex; justify-content: space-between; margin-top: 0.6rem; }
.depth-mids b { color: var(--text); font-weight: 500; }

/* ---------- Projects ---------- */
.proj-cats { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1.6rem; }
.proj-cats button {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--text-dim);
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.42rem 0.95rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.proj-cats button:hover { color: var(--text); }
.proj-cats button.active { color: var(--mint); border-color: var(--mint-dim); background: rgba(151, 252, 228, 0.07); }
.cat-n { opacity: 0.55; margin-left: 0.2rem; }
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1rem;
}
.proj-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.3rem 1.4rem;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
.proj-card:hover { border-color: rgba(151, 252, 228, 0.35); transform: translateY(-2px); }
.proj-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; }
.proj-name { font-family: var(--display); font-weight: 600; font-size: 1.05rem; color: var(--text); }
.proj-cat { font-size: 0.6rem; letter-spacing: 0.16em; color: var(--mint-dim); white-space: nowrap; }
.proj-desc { color: var(--text-dim); font-size: 0.88rem; }
.proj-x { font-size: 0.72rem; }

/* ---------- Chip strip ---------- */
.chip-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.2rem 0 0.4rem;
}
.chip-strip button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--text-dim);
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 1.05rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.2s;
}
.chip-strip button span { font-family: var(--mono); font-size: 0.85em; opacity: 0.8; }
.chip-strip button:hover { color: var(--text); border-color: var(--mint-dim); }
.chip-strip button.active {
  color: var(--mint);
  background: rgba(151, 252, 228, 0.1);
  border-color: var(--mint-dim);
  box-shadow: 0 0 18px rgba(151, 252, 228, 0.15);
}

/* ---------- Top grid (chart + side stack) ---------- */
.top-grid { display: grid; grid-template-columns: 1fr; gap: clamp(0.8rem, 2vw, 1.2rem); }
@media (min-width: 1020px) {
  .top-grid { grid-template-columns: 3fr 2fr; align-items: stretch; }
  .top-grid.single { grid-template-columns: 1fr; }
}
.mkt-table tbody tr.clickable, .heat-tile.clickable { cursor: pointer; }
.side-stack { display: flex; flex-direction: column; gap: clamp(0.8rem, 2vw, 1.2rem); }
.side-stack .panel { flex: 1; }
.big-number {
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

/* ---------- Nav CTA ---------- */
.btn-cta {
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--bg-deep) !important;
  background: var(--mint);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.15s;
}
.btn-cta:hover { box-shadow: 0 0 20px rgba(151, 252, 228, 0.45); transform: translateY(-1px); }
@media (max-width: 1100px) { .btn-cta { display: none; } }

/* ---------- Trio grid ---------- */
.trio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: clamp(0.8rem, 2vw, 1.2rem);
}

/* ---------- Floating dock ---------- */
.dock {
  position: fixed;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  gap: 0.5rem;
  background: rgba(2, 23, 19, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.dock-main {
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
  background: rgba(151, 252, 228, 0.08);
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.4rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.dock-main:hover { background: rgba(151, 252, 228, 0.16); color: var(--mint); }
.dock-search {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--text-dim);
  background: none;
  border: none;
  border-radius: 50%;
  width: 40px;
  cursor: pointer;
  transition: color 0.2s;
}
.dock-search:hover { color: var(--mint); }
@media (max-width: 860px) {
  .dock { bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* ---------- Dashboards overlay ---------- */
.dash-overlay {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(2, 23, 19, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 1rem;
}
@media (min-width: 861px) { .dash-overlay { align-items: center; } }
.dash-box {
  width: min(720px, 100%);
  max-height: 80vh;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.4rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.dash-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.1rem; }
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.7rem;
}
.dash-grid button {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: left;
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}
.dash-grid button:hover { border-color: var(--mint-dim); transform: translateY(-2px); }
.dash-grid b { font-family: var(--display); font-weight: 600; font-size: 1rem; color: var(--text); }
.dash-grid span { font-size: 0.78rem; color: var(--text-dim); line-height: 1.4; }

/* ---------- Markets board controls + heatmap ---------- */
.mkt-controls { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.heatmap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.heat-tile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  min-width: 86px;
  flex-grow: 1;
}
.heat-tile.xl { flex-basis: 30%; min-height: 108px; }
.heat-tile.lg { flex-basis: 20%; min-height: 92px; }
.heat-tile.md { flex-basis: 12%; min-height: 76px; }
.heat-tile.sm { flex-basis: 8%; min-height: 62px; }
.heat-coin { font-family: var(--display); font-weight: 600; font-size: 0.95rem; color: var(--text); }
.heat-pct { font-family: var(--mono); font-size: 0.78rem; }
.heat-vol { font-size: 0.66rem; }

/* ---------- Watchlist ---------- */
.watchlist { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.watch-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.watch-load {
  font-size: 0.72rem;
  color: var(--text-dim);
  background: none;
  border: none;
  padding: 0.35rem 0.3rem 0.35rem 0.8rem;
  cursor: pointer;
}
.watch-load:hover { color: var(--mint); }
.watch-del {
  font-size: 0.6rem;
  color: var(--text-dim);
  background: none;
  border: none;
  padding: 0.35rem 0.7rem 0.35rem 0.3rem;
  cursor: pointer;
  opacity: 0.6;
}
.watch-del:hover { color: var(--red); opacity: 1; }

/* ---------- Learn tabs ---------- */
.learn-tabs { margin-bottom: 0.5rem; }

/* ---------- Light theme ---------- */
:root[data-theme="light"] {
  --bg: #f2faf7;
  --bg-deep: #e6f4ee;
  --panel-bg: rgba(9, 84, 68, 0.04);
  --line: rgba(9, 84, 68, 0.18);
  --line-soft: rgba(9, 84, 68, 0.09);
  --mint: #0a7a60;
  --mint-dim: #0e9474;
  --text: #082820;
  --text-dim: #47695e;
  --red: #cc4444;
}
:root[data-theme="light"] body {
  background:
    radial-gradient(ellipse 80% 50% at 70% -10%, rgba(10, 122, 96, 0.08), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}
:root[data-theme="light"] .brand-dot { box-shadow: 0 0 8px rgba(10, 122, 96, 0.5); }
:root[data-theme="light"] .nav { background: rgba(242, 250, 247, 0.85); }
:root[data-theme="light"] .ticker-bar { background: var(--bg-deep); }
:root[data-theme="light"] .terminal { background: #08201a; }
:root[data-theme="light"] .terminal-body { color: #8fb8ae; }
:root[data-theme="light"] .terminal .t-bot,
:root[data-theme="light"] .terminal .t-accent,
:root[data-theme="light"] .terminal .t-cursor { color: #97fce4; }
:root[data-theme="light"] .terminal .t-user { color: #4fbfae; }
:root[data-theme="light"] .btn-solid { background: var(--mint); color: #f2faf7; }
:root[data-theme="light"] .join { background: #0a7a60; color: #f2faf7; }
:root[data-theme="light"] .join-kicker { color: rgba(242, 250, 247, 0.7); }
:root[data-theme="light"] .join-sub { color: rgba(242, 250, 247, 0.8); }
:root[data-theme="light"] .btn-dark { background: #06342a; color: #b8f5e4; }
:root[data-theme="light"] .bottom-nav { background: rgba(242, 250, 247, 0.92); }
:root[data-theme="light"] .drawer { background: var(--bg); }
:root[data-theme="light"] .search-box { background: var(--bg); }
:root[data-theme="light"] .dock { background: rgba(242, 250, 247, 0.9); }
:root[data-theme="light"] .dash-box { background: var(--bg); }
