:root {
  --bg: #000000;
  --panel: #080a08;
  --panel-2: #0d100d;
  --line: #20251f;
  --line-strong: #343b32;
  --text: #f2f4ef;
  --muted: #8f978b;
  --green: #c6f709;
  --green-dim: #7f9d08;
  --red: #ff6b69;
  --amber: #f1c75b;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
::selection { background: var(--green); color: #000; }

.app-shell { width: min(1500px, 100%); margin: 0 auto; padding: 0 26px; }
.topbar {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 38px; height: 38px; object-fit: cover; display: block; }
.brand-name { font-size: 16px; font-weight: 800; letter-spacing: .12em; line-height: 1; }
.brand-sub { margin-top: 5px; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; }
.network-tools { display: flex; align-items: center; gap: 8px; }
.network-readout { display: flex; align-items: center; gap: 8px; border-right: 1px solid var(--line); padding-right: 14px; margin-right: 4px; font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--muted); box-shadow: 0 0 0 3px rgba(143,151,139,.08); }
.status-dot.ok { background: var(--green); box-shadow: 0 0 0 3px rgba(198,247,9,.10); }
.status-dot.bad { background: var(--red); box-shadow: 0 0 0 3px rgba(255,107,105,.10); }

.button {
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 8px 12px;
  background: transparent;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 650;
}
.button:hover { border-color: #687064; }
.button.solid { background: var(--green); color: #000; border-color: var(--green); }
.button.solid:hover { background: #d4ff35; }
.button.ghost:hover { background: #0e110e; }
.button.grow { flex: 1; }

.search-panel { padding: 72px 0 45px; max-width: 910px; }
.eyebrow { color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
h1 { margin: 12px 0 12px; font-size: clamp(38px, 6vw, 72px); line-height: .98; letter-spacing: -.045em; max-width: 800px; }
h2 { margin: 6px 0 0; font-size: 21px; letter-spacing: -.02em; }
.search-panel > p { color: #aeb5aa; max-width: 650px; font-size: 15px; margin: 0 0 27px; }
.scan-form { display: grid; grid-template-columns: 1fr 112px; width: min(780px, 100%); border: 1px solid #454e40; border-radius: 5px; overflow: hidden; background: #050605; }
.scan-form:focus-within { border-color: var(--green); }
.scan-form input { width: 100%; height: 54px; border: 0; outline: 0; padding: 0 16px; color: var(--text); background: transparent; font-family: var(--mono); font-size: 14px; }
.scan-form input::placeholder { color: #636a60; }
.scan-button { border: 0; border-left: 1px solid #454e40; background: var(--green); color: #000; cursor: pointer; font-weight: 800; }
.scan-button:hover { background: #d4ff35; }
.scan-hint { display: flex; gap: 19px; margin-top: 10px; color: #697066; font-size: 11px; }
.scan-hint span::before { content: "·"; color: var(--green); margin-right: 6px; }

.market-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.strip-item { padding: 14px 0; display: flex; gap: 10px; align-items: baseline; }
.strip-item + .strip-item { border-left: 1px solid var(--line); padding-left: 18px; }
.strip-item span { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.strip-item strong { font-family: var(--mono); font-size: 12px; font-weight: 600; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 24px; padding: 36px 0; align-items: start; }
.market-section, .scanner-panel, .watch-section { border: 1px solid var(--line); background: var(--panel); }
.market-section { min-width: 0; }
.section-head { min-height: 76px; padding: 17px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.section-head.compact { min-height: 68px; }
.tabs { display: flex; align-items: center; gap: 1px; background: #111511; border: 1px solid var(--line); border-radius: 4px; padding: 2px; }
.tab { border: 0; background: transparent; color: #92998e; padding: 7px 10px; border-radius: 2px; cursor: pointer; font-size: 12px; }
.tab:hover { color: var(--text); }
.tab.active { background: #242b20; color: var(--green); }
.filter-row { min-height: 47px; display: flex; align-items: center; gap: 16px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.filter-row label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.filter-row select { border: 0; color: var(--text); background: transparent; outline: 0; cursor: pointer; font-family: var(--mono); font-size: 11px; }
.checkbox-label input { accent-color: var(--green); }
.filter-spacer { flex: 1; }

.table-wrap { overflow-x: auto; }
.market-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 11px; }
.market-table th { color: #697066; font-weight: 500; text-align: right; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.market-table th:first-child { text-align: left; padding-left: 18px; }
.market-table td { text-align: right; padding: 13px 12px; border-bottom: 1px solid #171b16; white-space: nowrap; }
.market-table td:first-child { text-align: left; padding-left: 18px; font-family: var(--sans); }
.market-table tbody tr { cursor: pointer; transition: background .12s ease; }
.market-table tbody tr:hover { background: #0d110c; }
.market-table tbody tr.selected { background: #11160f; box-shadow: inset 2px 0 var(--green); }
.token-cell { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.tiny-avatar { width: 28px; height: 28px; flex: 0 0 28px; border: 1px solid #333a31; background: #111410; display: grid; place-items: center; font-weight: 800; color: var(--green); overflow: hidden; border-radius: 50%; }
.tiny-avatar img { width: 100%; height: 100%; object-fit: cover; }
.token-cell strong { display: block; font-size: 12px; }
.token-cell span { display: block; color: #6f776b; font-size: 10px; margin-top: 1px; max-width: 112px; overflow: hidden; text-overflow: ellipsis; }
.change { font-family: var(--mono); }
.change.up { color: var(--green); }
.change.down { color: var(--red); }
.change.neutral { color: var(--muted); }
.row-open { border: 1px solid var(--line); background: transparent; border-radius: 3px; color: #b4bbb0; padding: 4px 7px; cursor: pointer; }
.row-open:hover { border-color: var(--green); color: var(--green); }
.loading-row td { text-align: left !important; color: var(--muted); height: 100px; }
.inline-error { margin: 14px 18px 18px; padding: 12px; border: 1px solid rgba(255,107,105,.25); background: rgba(255,107,105,.04); color: #ff9b99; font-size: 12px; }
.mobile-cards { display: none; }

.scanner-panel { position: sticky; top: 18px; min-height: 590px; }
.scanner-empty { min-height: 590px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: 24px; }
.scanner-empty .empty-mark { width: 74px; height: 74px; object-fit: cover; margin-bottom: auto; opacity: .55; }
.scanner-empty p { color: var(--muted); margin: 8px 0 0; max-width: 300px; }
.scanner-result { padding: 19px; }
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.token-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.token-avatar { width: 42px; height: 42px; border: 1px solid var(--line-strong); background: #111410; display: grid; place-items: center; color: var(--green); font-weight: 900; border-radius: 50%; overflow: hidden; }
.token-avatar img { width: 100%; height: 100%; object-fit: cover; }
.token-symbol { font-size: 17px; font-weight: 800; }
.token-name { color: var(--muted); font-size: 11px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { width: 31px; height: 31px; border: 1px solid var(--line); background: transparent; border-radius: 3px; cursor: pointer; color: var(--muted); font-size: 18px; }
.icon-button:hover { color: var(--text); border-color: #5f685b; }
.price-line { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 12px; }
.price-line strong { font-family: var(--mono); font-size: 27px; letter-spacing: -.03em; }
.chart-box { height: 116px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -19px; position: relative; overflow: hidden; background-image: linear-gradient(#121612 1px, transparent 1px); background-size: 100% 29px; }
.chart-box svg { width: 100%; height: 100%; display: block; }
.chart-loading, .chart-error { display: grid; height: 100%; place-items: center; color: #61695e; font-family: var(--mono); font-size: 10px; }
.chart-meta { position: absolute; left: 9px; top: 7px; color: #65705f; font-family: var(--mono); font-size: 9px; }
.risk-box { display: flex; align-items: end; justify-content: space-between; margin-top: 18px; }
.risk-box strong { display: block; font-size: 18px; margin-top: 3px; }
.risk-score { font-family: var(--mono); }
.risk-score span { font-size: 31px; font-weight: 800; }
.risk-score small { color: var(--muted); }
.risk-track { height: 3px; background: #1e231d; margin: 10px 0 7px; overflow: hidden; }
.risk-track span { display: block; height: 100%; width: 0; background: var(--green); transition: width .35s ease; }
.risk-note { color: #747c71; font-size: 10px; margin: 0 0 18px; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.metric-grid > div { padding: 11px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric-grid span, .contract-grid span { display: block; color: #6f776b; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.metric-grid strong, .contract-grid strong { display: block; font-family: var(--mono); font-size: 11px; margin-top: 4px; font-weight: 600; }
.contract-section { margin-top: 18px; }
.subhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; font-size: 11px; font-weight: 700; }
.contract-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.contract-grid > div { padding: 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.address-line { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 0; border-bottom: 1px solid var(--line); padding: 10px 2px; background: transparent; cursor: pointer; color: var(--muted); font-size: 10px; }
.address-line .mono { overflow: hidden; text-overflow: ellipsis; }
.address-line:hover { color: var(--green); }
.result-actions { display: flex; gap: 7px; margin-top: 15px; }

.watch-section { margin: 0 0 36px; }
.watchlist { min-height: 72px; display: grid; grid-template-columns: repeat(4, 1fr); }
.watch-empty { grid-column: 1 / -1; color: #6e756b; padding: 23px 18px; font-size: 12px; }
.watch-item { padding: 15px 18px; border-right: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; }
.watch-item:nth-child(4n) { border-right: 0; }
.watch-item:hover { background: #0d100d; }
.watch-item strong { display: block; }
.watch-item span { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.watch-remove { border: 0; background: transparent; color: #666d63; cursor: pointer; font-size: 18px; padding: 2px 5px; }
.watch-remove:hover { color: var(--red); }

footer { min-height: 112px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 120px 1fr auto; align-items: center; gap: 24px; color: #626961; font-size: 10px; }
footer > div:first-child { color: var(--text); font-weight: 800; letter-spacing: .14em; }
footer p { max-width: 690px; margin: 0; }
.footer-links { display: flex; gap: 16px; }
.footer-links a:hover { color: var(--green); }

.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 10px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; background: var(--green); color: #000; border-radius: 3px; padding: 9px 12px; font-size: 11px; font-weight: 750; transition: opacity .18s ease, transform .18s ease; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1100px) {
  .content-grid { grid-template-columns: 1fr; }
  .scanner-panel { position: relative; top: 0; min-height: 0; }
  .scanner-empty { min-height: 320px; }
  .watchlist { grid-template-columns: repeat(2, 1fr); }
  .watch-item:nth-child(2n) { border-right: 0; }
}

@media (max-width: 760px) {
  .app-shell { padding: 0 14px; }
  .topbar { height: 66px; }
  .brand-sub { display: none; }
  .network-readout { border: 0; padding: 0; margin: 0 4px 0 0; }
  .network-readout #rpcStatus, .network-readout #blockNumber { display: none; }
  #refreshBtn { display: none; }
  .search-panel { padding: 50px 0 34px; }
  h1 { font-size: 42px; max-width: 500px; }
  .search-panel > p { font-size: 14px; }
  .scan-form { grid-template-columns: 1fr 82px; }
  .scan-hint { flex-wrap: wrap; gap: 6px 12px; }
  .market-strip { grid-template-columns: 1fr 1fr; }
  .strip-item:nth-child(3) { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .strip-item:nth-child(4) { border-top: 1px solid var(--line); }
  .section-head { align-items: flex-start; flex-direction: column; }
  .tabs { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); }
  .filter-row { flex-wrap: wrap; padding-top: 9px; padding-bottom: 9px; }
  #feedSource { display: none; }
  .table-wrap { display: none; }
  .mobile-cards { display: block; }
  .mobile-card { padding: 15px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
  .mobile-card-head { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
  .mobile-card-price { text-align: right; font-family: var(--mono); }
  .mobile-card-price strong { display: block; font-size: 12px; }
  .mobile-card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 13px; }
  .mobile-card-stats span { color: var(--muted); font-size: 9px; display: block; }
  .mobile-card-stats strong { display: block; font-family: var(--mono); font-size: 10px; margin-top: 2px; }
  .watchlist { grid-template-columns: 1fr; }
  .watch-item, .watch-item:nth-child(2n), .watch-item:nth-child(4n) { border-right: 0; border-bottom: 1px solid var(--line); }
  footer { grid-template-columns: 1fr; gap: 11px; padding: 24px 0; }
  .footer-links { flex-wrap: wrap; }
}

/* header utilities */
.social-button {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.social-button:hover { border-color: var(--green); color: var(--green); background: #0e110e; }
.social-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: square; }
.coin-nav { min-width: 72px; color: var(--green); }
.coin-nav:hover { border-color: var(--green); }

/* $RUXIO coin page */
.coin-page main { padding: 58px 0 40px; }
.coin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 36px;
  align-items: end;
  min-height: 390px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 38px;
}
.coin-kicker { display: flex; align-items: center; gap: 9px; font-family: var(--mono); color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.coin-kicker .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.coin-title { margin: 13px 0 10px; font-size: clamp(72px, 11vw, 150px); line-height: .82; letter-spacing: -.075em; }
.coin-title .dollar { color: var(--green); font-weight: 500; }
.coin-sub { max-width: 560px; color: #959d91; font-size: 14px; margin: 25px 0 0; }
.coin-actions { display: grid; gap: 8px; }
.coin-buy { min-height: 56px; font-size: 14px; font-weight: 850; letter-spacing: .02em; }
.coin-buy.disabled { opacity: .45; pointer-events: none; }
.ca-box { border: 1px solid var(--line); background: var(--panel); padding: 14px; }
.ca-box label { display: block; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .12em; margin-bottom: 8px; }
.ca-row { display: flex; align-items: center; gap: 9px; }
.ca-row code { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 11px; color: #c5cbc1; }
.copy-mini { flex: 0 0 auto; border: 0; background: transparent; color: var(--green); cursor: pointer; font-size: 10px; padding: 3px; }
.coin-setup { border: 1px solid #3e4838; background: #090c08; padding: 14px; }
.coin-setup strong { font-size: 12px; }
.coin-setup p { color: var(--muted); font-size: 10px; margin: 4px 0 10px; }
.coin-setup-form { display: grid; grid-template-columns: 1fr auto; border: 1px solid var(--line-strong); }
.coin-setup-form input { min-width: 0; height: 38px; border: 0; outline: 0; background: transparent; padding: 0 10px; font-family: var(--mono); font-size: 10px; }
.coin-setup-form button { border: 0; border-left: 1px solid var(--line-strong); background: var(--green); color: #000; padding: 0 11px; font-size: 10px; font-weight: 800; cursor: pointer; }
.coin-market { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--line); }
.coin-stat { padding: 18px 14px 18px 0; min-width: 0; }
.coin-stat + .coin-stat { border-left: 1px solid var(--line); padding-left: 17px; }
.coin-stat span { display: block; color: #727a70; font-family: var(--mono); font-size: 9px; letter-spacing: .08em; }
.coin-stat strong { display: block; margin-top: 5px; font-family: var(--mono); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin-body { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; padding: 34px 0 0; }
.coin-panel { border: 1px solid var(--line); background: var(--panel); }
.coin-panel-head { min-height: 59px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.coin-panel-head h2 { font-size: 16px; margin: 0; }
.coin-chart { min-height: 330px; position: relative; overflow: hidden; background-image: linear-gradient(#111511 1px, transparent 1px); background-size: 100% 66px; }
.coin-chart svg { width: 100%; height: 330px; display: block; }
.coin-chart-empty { min-height: 330px; display: grid; place-items: center; color: #65705f; font-family: var(--mono); font-size: 10px; text-align: center; padding: 30px; }
.coin-contract-list { margin: 0; }
.coin-contract-list > div { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 14px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.coin-contract-list > div:last-child { border-bottom: 0; }
.coin-contract-list dt { color: #737b70; font-size: 10px; }
.coin-contract-list dd { margin: 0; font-family: var(--mono); font-size: 10px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin-link-row { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.coin-link-row a { padding: 13px 15px; text-align: center; font-size: 10px; font-weight: 750; }
.coin-link-row a + a { border-left: 1px solid var(--line); }
.coin-link-row a:hover { color: var(--green); }
.coin-status { color: var(--muted); font-family: var(--mono); font-size: 9px; }

@media (max-width: 900px) {
  .coin-hero, .coin-body { grid-template-columns: 1fr; }
  .coin-hero { min-height: 0; }
  .coin-market { grid-template-columns: repeat(3, 1fr); }
  .coin-stat:nth-child(4) { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .coin-stat:nth-child(5), .coin-stat:nth-child(6) { border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .coin-nav { min-width: 0; padding: 8px 9px; }
  .social-button { width: 34px; height: 34px; }
  .coin-page main { padding-top: 36px; }
  .coin-hero { padding-bottom: 28px; gap: 27px; }
  .coin-title { font-size: 70px; }
  .coin-market { grid-template-columns: repeat(2, 1fr); }
  .coin-stat:nth-child(3), .coin-stat:nth-child(5) { border-left: 0; padding-left: 0; }
  .coin-stat:nth-child(3), .coin-stat:nth-child(4), .coin-stat:nth-child(5), .coin-stat:nth-child(6) { border-top: 1px solid var(--line); }
  .coin-stat:nth-child(4) { border-left: 1px solid var(--line); padding-left: 17px; }
  .coin-setup-form { grid-template-columns: 1fr; }
  .coin-setup-form button { height: 36px; border-left: 0; border-top: 1px solid var(--line-strong); }
}

/* Solana scan actions */
.result-actions { flex-wrap: wrap; }
.result-actions .button { min-width: 76px; }
