:root {
  --bg: #000;
  --panel: #050805;
  --line: #133a1c;
  --fg: #33ff66;
  --fg-dim: #1f9c40;
  --muted: #3f6b4a;
  --amber: #ffb000;
  --red: #ff3b3b;
  --cyan: #3ee8ff;
  --glow: 0 0 6px rgba(51, 255, 102, 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
}

body {
  min-height: 100vh;
  padding: 16px;
  max-width: 1400px;
  margin: 0 auto;
  text-shadow: var(--glow);
}

/* CRT scanlines + vignette */
.crt {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background:
    repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,0,0,0.25) 3px),
    radial-gradient(ellipse at center, rgba(0,0,0,0) 60%, rgba(0,0,0,0.6) 100%);
}

::selection { background: var(--fg); color: #000; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

button, select, input {
  font: inherit;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--line);
  text-shadow: inherit;
}
button { cursor: pointer; padding: 4px 10px; }
button:hover, button:focus-visible { background: var(--fg); color: #000; text-shadow: none; outline: none; }
select { padding: 3px 6px; background: #000; }
select option { background: #000; }

/* header */
.top {
  border: 1px solid var(--line);
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: flex-end;
  justify-content: space-between;
}
.logo {
  margin: 0;
  font-size: 11px;
  line-height: 1.1;
  color: var(--fg);
  overflow-x: auto;
  max-width: 100%;
}
.status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: var(--fg-dim);
  font-size: 12px;
}
.status b { color: var(--fg); font-weight: 700; }
.clock { color: var(--amber); text-shadow: 0 0 6px rgba(255,176,0,.5); }
.dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
  vertical-align: middle;
}
.dot.ok { background: var(--fg); box-shadow: 0 0 8px var(--fg); animation: pulse 2s infinite; }
.dot.err { background: var(--red); box-shadow: 0 0 8px var(--red); }
@keyframes pulse { 50% { opacity: .35; } }

/* prompt */
.prompt {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  border: 1px solid var(--line);
  padding: 8px 12px;
}
.prompt label { white-space: nowrap; }
.prompt .user { color: var(--fg); font-weight: 700; }
.prompt .path { color: var(--cyan); }
.prompt input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  caret-color: var(--fg);
  caret-shape: block;
}
.prompt input::placeholder { color: var(--muted); text-shadow: none; }

/* tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.tab { border-bottom: 0; color: var(--fg-dim); }
.tab.active { background: var(--fg); color: #000; text-shadow: none; }

/* panels */
.panel {
  display: none;
  border: 1px solid var(--line);
  padding: 12px 16px 16px;
  background: var(--panel);
  min-height: 420px;
}
.panel.active { display: block; }
.panel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 10px;
}
.panel-head h2 { margin: 0; font-size: 14px; letter-spacing: 1px; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--fg-dim); }
.controls label { display: flex; gap: 6px; align-items: center; }

.muted { color: var(--muted); text-shadow: none; }
.small { font-size: 12px; margin: 0 0 10px; }
.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { padding: 5px 10px; text-align: left; border-bottom: 1px dashed var(--line); }
th {
  color: var(--fg-dim);
  font-weight: 400;
  border-bottom: 1px solid var(--fg-dim);
  user-select: none;
}
th[data-sort] { cursor: pointer; }
th[data-sort]:hover { color: var(--fg); }
th.sorted::after { content: " ▼"; }
th.sorted.asc::after { content: " ▲"; }
.num { text-align: right; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: rgba(51,255,102,.08); }
tbody tr.flash { animation: flash 1.2s ease-out; }
@keyframes flash { from { background: rgba(255,176,0,.25); } to { background: transparent; } }

.tok { display: flex; align-items: center; gap: 8px; }
.tok img { width: 18px; height: 18px; border-radius: 2px; filter: saturate(.6); }
.tok .sym { font-weight: 700; }
.tok .name { color: var(--muted); max-width: 160px; overflow: hidden; text-overflow: ellipsis; text-shadow: none; }

.up { color: var(--fg); }
.down { color: var(--red); text-shadow: 0 0 6px rgba(255,59,59,.45); }
.amber { color: var(--amber); text-shadow: 0 0 6px rgba(255,176,0,.45); }
.cyan { color: var(--cyan); }

.score { display: inline-block; min-width: 3ch; text-align: right; font-weight: 700; }
.score.hot { color: #000; background: var(--fg); padding: 0 4px; text-shadow: none; }
.score.warm { color: var(--amber); }
.score.cold { color: var(--muted); }

.tag {
  display: inline-block;
  font-size: 11px;
  padding: 0 4px;
  margin-left: 4px;
  border: 1px solid currentColor;
  line-height: 1.4;
}

/* scanner */
.scan-results { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.scan-results button { font-size: 12px; }
.report pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.report .box {
  border: 1px solid var(--fg-dim);
  padding: 12px 16px;
  margin-bottom: 12px;
}
.report .box h3 { margin: 0 0 8px; font-size: 14px; }
.report .grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 4px 24px;
}
.report .kv { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--line); padding: 2px 0; }
.report .kv span:first-child { color: var(--fg-dim); }
.report .flags { display: flex; flex-wrap: wrap; gap: 6px; }
.report .flags .tag { margin: 0; font-size: 12px; padding: 1px 6px; }
.report .links { display: flex; flex-wrap: wrap; gap: 12px; }
.report .addr { word-break: break-all; color: var(--muted); }
.report .verdict { font-size: 15px; font-weight: 700; }

/* log */
.log {
  margin: 0;
  max-height: 60vh;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.log .t { color: var(--muted); }

.foot {
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  text-shadow: none;
}

@media (max-width: 640px) {
  body { padding: 16px; font-size: 12px; }
  .logo { font-size: 7px; }
  .prompt button { display: none; }
  .prompt .user { display: none; }
  th, td { padding: 4px 6px; }
  .tok .name { display: none; }
}

/* copy CA */
button.copy {
  font-size: 10px;
  padding: 0 4px;
  line-height: 1.5;
  color: var(--fg-dim);
  border-color: var(--line);
}
button.copy.copied, button.ca-copy.copied { background: var(--fg); color: #000; text-shadow: none; }
.ca-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 8px 0 6px;
  padding: 8px 10px;
  border: 1px dashed var(--fg-dim);
  background: rgba(51,255,102,.04);
}
.ca-label { color: #000; background: var(--amber); padding: 0 6px; font-weight: 700; text-shadow: none; }
.ca { flex: 1; min-width: 0; word-break: break-all; color: var(--fg); font-family: inherit; }
button.ca-copy { border-color: var(--fg); font-weight: 700; }

/* brand */
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; max-width: 100%; }
.cat {
  width: 96px;
  height: auto;
  flex: none;
  mix-blend-mode: screen; /* black background drops out, no box edge */
}

/* charts */
.chart-frame {
  position: relative;
  width: 100%;
  height: 460px;
  border: 1px solid var(--line);
  background: #000;
}
.chart-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.chart-viewer { margin-bottom: 12px; }
.chart-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-weight: 700; }
tbody tr.selected { background: rgba(51,255,102,.14); box-shadow: inset 2px 0 0 var(--fg); }

@media (max-width: 640px) {
  .cat { width: 52px; }
  .brand { gap: 8px; }
  .chart-frame { height: 360px; }
}
.small-link { font-size: 11px; font-weight: 400; }

/* rate my CA */
.rate-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
  border: 1px solid var(--fg-dim);
}
.rate-form input { flex: 1; min-width: 0; border: 0; outline: none; padding: 4px 0; }
.rate-form input::placeholder { color: var(--muted); text-shadow: none; }
.rate-form button { border-color: var(--fg); font-weight: 700; }
.report .rating { display: flex; gap: 20px; align-items: flex-start; }
.rating-main { flex: 1; min-width: 0; }
.grade {
  flex: none;
  width: 110px;
  height: 110px;
  display: grid;
  place-items: center;
  font-size: 54px;
  font-weight: 700;
  border: 2px solid currentColor;
  box-shadow: 0 0 14px currentColor inset, 0 0 10px currentColor;
}
.rating .verdict { margin: 6px 0; }
.why { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.why li { border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.why-text { color: var(--fg-dim); padding-left: 4ch; display: inline-block; }

@media (max-width: 640px) {
  .report .rating { flex-direction: column; gap: 10px; }
  .grade { width: 80px; height: 80px; font-size: 38px; }
  .rate-form button { padding: 4px 6px; }
}

/* meters + token image */
.meter {
  display: inline-block;
  max-width: 100%;
  height: 14px;
  padding: 2px;
  border: 1px solid currentColor;
  vertical-align: middle;
  flex: none;
}
.meter > span {
  display: block;
  height: 100%;
  background: repeating-linear-gradient(90deg, currentColor 0 6px, transparent 6px 8px);
  filter: drop-shadow(0 0 4px currentColor);
}
.meter.muted { color: var(--muted); }
.score-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 8px 0 4px; }
.part { display: inline-flex; align-items: center; gap: 8px; }
.rating-art { display: flex; gap: 12px; flex: none; }
.tok-img {
  position: relative;
  width: 110px;
  height: 110px;
  flex: none;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  background: #000;
  overflow: hidden;
  font-size: 44px;
  font-weight: 700;
  color: var(--muted);
}
.tok-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) {
  .tok-img { width: 80px; height: 80px; font-size: 32px; }
  .meter { width: 160px !important; }
  .part .meter { width: 70px !important; }
}

/* live SOL ticker: top-right corner of the header */
.top { position: relative; }
.sol-ticker {
  position: absolute;
  top: 12px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.sol-logo { width: 20px; height: auto; display: block; }
#solPrice { font-size: 14px; color: var(--fg); }
#solPrice.tick-up { animation: tickUp .9s ease-out; }
#solPrice.tick-down { animation: tickDown .9s ease-out; }
@keyframes tickUp { from { color: #fff; text-shadow: 0 0 12px var(--fg); } }
@keyframes tickDown { from { color: var(--red); text-shadow: 0 0 12px var(--red); } }
.sol-chg { font-size: 11px; }

/* safety badge */
.safety-badge {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid currentColor;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 0 8px currentColor inset;
}

@media (max-width: 640px) {
  /* no room beside the logo: own row, right-aligned above it */
  .sol-ticker { position: static; order: -1; width: 100%; justify-content: flex-end; margin-bottom: -6px; }
}
