/* BRAINDEAD — THE CORTEX
   One shared brain. Coins are neurons, trades are synapses, and the whole thing
   is barely alive. Single committed dark world; every colour is stated. */

:root {
  color-scheme: dark;

  /* one brain on life support: violet-black ward, magenta contrast dye,
     cyan monitors, and lime reserved for signs of life */
  --void: #06050c;
  --panel: rgba(15, 12, 26, 0.93);
  --solid: #100d1c;
  --edge: #2a2440;
  --edge-2: #1d1830;

  --magenta: #ff2e9a;
  --violet: #8b5cff;
  --cyan: #22e8ff;
  --pink: #ff6fd8;
  --indigo: #5b6bff;
  --lime: #c6f547;      /* vital signs only: EEG, buybacks, alive */
  --amber: #ffb020;     /* warnings only */

  --up: #4be38a;
  --down: #ff4d7d;

  --ink: #f2ecff;
  --mute: #a99dc4;
  --dim: #7a6f96;
  --faint: #4d4569;

  --glow-mag: 0 0 28px rgba(255, 46, 154, 0.55);
  --glow-vio: 0 0 28px rgba(139, 92, 255, 0.5);
  --glow-lime: 0 0 24px rgba(198, 245, 71, 0.45);

  --display: "Archivo Black", "Arial Black", "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --pixel: "Press Start 2P", var(--mono);

  --gutter: clamp(16px, 3vw, 30px);
  --max: 1520px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }
img { max-width: 100%; }

/* clip, not hidden: hidden makes body a scroll container and the sticky topbar stops sticking */
html, body { overflow-x: clip; }

:root {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

body {
  margin: 0;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(139, 92, 255, 0.16), transparent 60%),
    radial-gradient(90% 60% at 80% 100%, rgba(255, 46, 154, 0.12), transparent 60%),
    var(--void);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: var(--lime); text-decoration: none; }
a:hover { color: #e4ff90; }

button { font-family: var(--mono); cursor: pointer; }

:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

.sr {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ─── the living background ───────────────────────────────── */

#cortex {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.46;
}

.veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.03) 0 1px, transparent 1px 3px),
    radial-gradient(120% 90% at 50% 10%, transparent 35%, rgba(5,6,10,0.78) 100%);
}

.topbar, main, .foot, .toast { position: relative; z-index: 2; }

/* ─── top bar ─────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: rgba(5, 6, 10, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--edge);
}

.eegstrip {
  height: 34px;
  border-bottom: 1px solid var(--edge);
  background: #07080d;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-inline: var(--gutter);
  overflow: hidden;
}
#eeg { display: block; flex: 1 1 auto; height: 30px; min-width: 0; }
.eegstrip__read {
  font-family: var(--pixel);
  font-size: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.tape {
  height: 28px;
  border-bottom: 1px solid var(--edge);
  background: #07080d;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.tape__run {
  display: flex;
  gap: 24px;
  white-space: nowrap;
  padding-left: 14px;
  animation: tape 40s linear infinite;
  font-size: 11px;
}
@keyframes tape { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tape__item { display: inline-flex; gap: 6px; align-items: center; }
.tape__tk { color: var(--dim); }

.nav { display: flex; align-items: center; gap: 16px; height: 60px; }

.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand__name {
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: -0.03em;
  animation: rgbsplit 3.4s steps(1) infinite;
}
@keyframes rgbsplit {
  0%, 92% { text-shadow: none; }
  93% { text-shadow: -2px 0 var(--magenta), 2px 0 var(--cyan); }
  95% { text-shadow: 2px 0 var(--lime), -2px 0 var(--magenta); }
  97%, 100% { text-shadow: none; }
}

.nav__links { display: flex; gap: 3px; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; min-width: 0; }
.nav__links::-webkit-scrollbar { display: none; }

.nav__link {
  color: var(--mute);
  font-size: 12.5px;
  padding: 7px 10px;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 2px;
}
.nav__link:hover { color: var(--ink); background: rgba(255,255,255,0.05); }
.nav__link[aria-current="page"] {
  color: #fff;
  background: var(--magenta);
  border-color: var(--magenta);
  font-weight: 700;
  box-shadow: var(--glow-mag);
}

.nav__tools { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }

.iconlink {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--edge);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}
.iconlink:hover {
  color: #ffffff;
  border-color: var(--magenta);
  background: rgba(255, 46, 154, 0.14);
  box-shadow: var(--glow-mag);
}

.search {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--edge);
  background: rgba(10,13,19,0.8);
  padding: 0 10px; height: 36px; width: 200px;
}
.search input {
  background: none; border: 0; outline: none;
  color: var(--ink); font-family: var(--mono); font-size: 11.5px; width: 100%;
}
.search input::placeholder { color: var(--faint); }

.btn {
  height: 38px; padding: 0 16px;
  border: 1px solid var(--magenta);
  background: var(--magenta);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(255, 46, 154, 0.35);
  font-weight: 800; font-size: 12px; letter-spacing: 0.03em;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  position: relative;
}
.btn:hover { background: #ff54ae; box-shadow: var(--glow-mag); }
.btn--ghost { background: none; border-color: #2f3a48; color: var(--ink); }
.btn--ghost:hover { background: rgba(255,255,255,0.06); border-color: #46536b; box-shadow: none; }
.btn--sm { height: 30px; padding: 0 11px; font-size: 10.5px; }
.btn--lg { height: 50px; padding: 0 26px; font-size: 13.5px; }
.btn--block { width: 100%; }
.btn--danger { background: var(--down); border-color: var(--down); }
.btn--danger:hover { background: #ff7676; box-shadow: 0 0 22px rgba(255,92,92,0.45); }
.btn--mag { background: var(--magenta); border-color: var(--magenta); color: #05060a; }
.btn--mag:hover { background: #ff54ae; box-shadow: 0 0 26px rgba(255,46,154,0.5); }

/* ─── shared ──────────────────────────────────────────────── */

.view { display: block; }
.view[hidden] { display: none !important; }

.section { padding-block: 30px; }
.section + .section { border-top: 1px solid var(--edge); }

.eyebrow { font-family: var(--pixel); font-size: 8px; color: var(--dim); }

.h2 { font-family: var(--display); font-size: clamp(19px, 2.5vw, 24px); letter-spacing: -0.025em; }

.lede { color: var(--mute); font-size: 13.5px; line-height: 1.65; max-width: 64ch; }

.live { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--lime); }
.dot { width: 6px; height: 6px; background: currentColor; display: inline-block; animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: 0.15; } }

.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.chip {
  height: 28px; padding: 0 11px;
  border: 1px solid #2f3a48; background: rgba(255,255,255,0.03);
  color: var(--mute); font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em;
}
.chip:hover { color: var(--ink); border-color: #46536b; }
.chip[aria-pressed="true"] { background: var(--magenta); border-color: var(--magenta); color: #fff; box-shadow: var(--glow-mag); }

.bar { height: 9px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.09); overflow: hidden; }
.bar > i { display: block; height: 100%; transition: width 0.6s ease; }

.panel { border: 1px solid var(--edge); background: var(--panel); backdrop-filter: blur(7px); padding: 17px; }
.panel h3 { font-size: 15.5px; font-weight: 800; margin-bottom: 6px; }
.panel p { font-size: 11.5px; color: var(--mute); line-height: 1.6; }
.panel__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.tag { font-family: var(--pixel); font-size: 9px; }

.note { font-size: 10.5px; color: var(--faint); line-height: 1.5; margin-top: 9px; }

/* ─── hero: the cortex ────────────────────────────────────── */

.hero { padding-block: 40px 30px; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 30px; align-items: center; }

.hero__flag {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid #2a3547; background: rgba(12,17,24,0.8);
  padding: 5px 10px; margin-bottom: 20px;
}
.hero__flag span:last-child { font-family: var(--pixel); font-size: 8px; color: var(--mute); }

/* display type is cut through with horizontal slits, like a scan line
   passing over it, and lit from behind */
.hero h1, .launch h1 {
  font-family: var(--display);
  font-size: clamp(40px, 8vw, 104px);
  line-height: 0.85;
  letter-spacing: -0.045em;
  background-image:
    repeating-linear-gradient(180deg, transparent 0 7px, rgba(6, 5, 12, 0.9) 7px 10px),
    linear-gradient(#ffffff, #d9cff5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 34px rgba(139, 92, 255, 0.45);
}
.lit {
  background-image:
    repeating-linear-gradient(180deg, transparent 0 7px, rgba(6, 5, 12, 0.9) 7px 10px),
    linear-gradient(92deg, var(--magenta), var(--pink), var(--violet), var(--cyan), var(--magenta));
  background-size: auto, 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: var(--glow-mag);
  animation: slide 7s linear infinite;
}
@keyframes slide {
  from { background-position: 0 0, 0% 50%; }
  to { background-position: 0 0, 300% 50%; }
}

.h2 { text-shadow: 0 0 22px rgba(139, 92, 255, 0.4); }

/* ─── phrase marquee ──────────────────────────────────────── */

.chiptape {
  height: 30px;
  border-bottom: 1px solid var(--edge);
  background: #0a0812;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.chiptape__run {
  display: flex;
  gap: 8px;
  white-space: nowrap;
  padding-left: 12px;
  animation: tape 34s linear infinite reverse;
}
.phrase {
  font-family: var(--pixel);
  font-size: 8px;
  padding: 5px 9px;
  letter-spacing: 0.02em;
  color: #06050c;
  flex-shrink: 0;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 26px; }

/* the mechanic, stated once, in the lab's own label type */
.promise {
  font-family: var(--pixel);
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--mute);
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--edge);
  background: rgba(255, 255, 255, 0.03);
  padding: 7px 11px;
}
.promise b { color: var(--magenta); }

/* the thought machine — the front door */

.think {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 26px;
  width: 100%;
}
.think__input {
  flex: 1 1 340px;
  min-width: 0;
  height: 58px;
  background: rgba(8, 11, 16, 0.92);
  border: 1px solid #39445a;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  padding: 0 16px;
  outline: none;
}
.think__input:focus { border-color: var(--magenta); box-shadow: 0 0 30px -6px var(--magenta); }
.think__input::placeholder { color: #5b6575; }
.think .btn { height: 58px; font-size: 14px; }

.hints { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hint { border: 1px solid var(--edge); background: rgba(255,255,255,0.03); color: var(--dim); font-size: 10.5px; padding: 5px 9px; }
.hint:hover { color: var(--ink); border-color: #46536b; }

/* $BRAINDEAD treasury */

.vault { display: flex; flex-direction: column; gap: 13px; }
.vault__status {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--pixel); font-size: 8px;
  border: 1px solid currentColor; padding: 4px 8px;
}
.vault__big {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.vault__rows { display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; }
.vault__row { display: flex; justify-content: space-between; gap: 10px; }
.vault__k { color: var(--dim); }
.vault__v { font-weight: 700; font-variant-numeric: tabular-nums; }
.vault__note { font-size: 10.5px; color: var(--mute); line-height: 1.55; }

.flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
}
.flow__step {
  border: 1px solid var(--edge);
  background: var(--panel);
  padding: 13px;
  position: relative;
}
.flow__step::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--c, var(--lime)); }
.flow__n { font-family: var(--pixel); font-size: 8px; color: var(--c, var(--lime)); margin-top: 3px; }
.flow__t { font-weight: 800; font-size: 13px; margin: 8px 0 5px; }
.flow__d { font-size: 11px; color: var(--mute); line-height: 1.5; }

/* brainrot scoring breakdown */

.score { display: flex; flex-direction: column; gap: 5px; margin-top: 11px; }
.score__row { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; }
.score__k { color: var(--mute); }
.score__v { font-weight: 700; font-variant-numeric: tabular-nums; }

.vitals { display: flex; flex-direction: column; gap: 13px; }
.vital__top { display: flex; justify-content: space-between; align-items: baseline; font-size: 11.5px; color: var(--mute); margin-bottom: 5px; }
.vital__v { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }

/* stat strip */

.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--edge); }
.strip__cell { padding: 16px var(--gutter); border-right: 1px solid var(--edge); }
.strip__cell:last-child { border-right: 0; }
.strip__k { font-size: 10px; color: var(--dim); letter-spacing: 0.07em; }
.strip__v { font-size: clamp(19px, 2.5vw, 26px); font-weight: 800; letter-spacing: -0.02em; margin-top: 5px; font-variant-numeric: tabular-nums; }
.strip__sub { font-size: 10.5px; color: var(--dim); margin-top: 3px; }

/* ─── the lobes ───────────────────────────────────────────── */

/* six lobes, always in full rows — never one stranded on its own line */
.lobes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
@media (max-width: 1180px) { .lobes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .lobes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.lobe {
  border: 1px solid var(--edge);
  background: var(--panel);
  backdrop-filter: blur(7px);
  padding: 12px;
  display: flex; flex-direction: column; gap: 7px;
  min-height: 112px;
  position: relative;
  overflow: hidden;
  text-align: left;
  color: var(--ink);
  width: 100%;
}
.lobe::before {
  content: "";
  position: absolute; inset: 0 auto auto 0;
  height: 3px; width: 100%;
  background: var(--c, var(--lime));
}
.lobe[data-firing="1"] { border-color: var(--c, var(--lime)); }
.lobe[data-firing="1"]::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--c, var(--lime));
  opacity: 0.12;
  animation: flash 0.5s ease-out forwards;
}
@keyframes flash { from { opacity: 0.3; } to { opacity: 0; } }

.lobe__top { display: flex; align-items: center; gap: 7px; margin-top: 4px; }
.lobe__name { font-family: var(--pixel); font-size: 8.5px; color: var(--c, var(--lime)); }
.lobe__led { width: 7px; height: 7px; margin-left: auto; background: var(--faint); flex-shrink: 0; }
.lobe[data-firing="1"] .lobe__led { background: var(--c, var(--lime)); }
.lobe__job { font-size: 10.5px; color: var(--dim); line-height: 1.45; }
.lobe__out { margin-top: auto; font-size: 11px; line-height: 1.45; word-break: break-word; min-height: 30px; }
.lobe__out:empty::after { content: "quiet"; color: var(--faint); }

/* intrusive thoughts */

.thoughts { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--edge); background: rgba(8,10,15,0.94); max-height: 430px; overflow-y: auto; }

.thought {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 11px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--edge-2);
}
.thoughts > .thought:first-child { animation: drop 0.35s ease; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.thought:last-child { border-bottom: 0; }
.thought__who { font-family: var(--pixel); font-size: 8px; line-height: 1.6; }
.thought__body { min-width: 0; }
.thought__head { display: flex; flex-wrap: wrap; gap: 7px; align-items: baseline; font-size: 11.5px; margin-bottom: 3px; }
.thought__act { font-weight: 800; }
.thought__tk { font-weight: 700; }
.thought__amt { color: var(--mute); font-variant-numeric: tabular-nums; }
.thought__ago { color: var(--faint); font-size: 10px; margin-left: auto; }
.thought__say { font-size: 11.5px; color: var(--mute); line-height: 1.55; }

/* ─── cards ───────────────────────────────────────────────── */

.board { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 26px; align-items: start; }

.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 15px; }
.toolbar .live { margin-left: auto; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(252px, 1fr)); gap: 11px; }

.card {
  border: 1px solid var(--edge);
  background: var(--panel);
  backdrop-filter: blur(7px);
  padding: 13px;
  display: flex; flex-direction: column; gap: 10px;
  text-align: left; color: var(--ink); width: 100%;
  position: relative; overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--c, var(--lime));
}
.card:hover {
  border-color: var(--c, var(--lime));
  box-shadow: 0 0 0 1px var(--c, var(--lime)), 0 0 32px -8px var(--c, var(--lime));
}

.card__head { display: flex; gap: 10px; align-items: flex-start; margin-top: 3px; }
.avatar {
  width: 42px; height: 42px; flex-shrink: 0;
  display: grid; place-items: center;
  font-family: var(--pixel); font-size: 10px; color: #05060a;
  background-size: cover;
}
.card__id { flex: 1 1 auto; min-width: 0; }
.card__tk { display: flex; align-items: baseline; gap: 6px; font-weight: 800; font-size: 14px; }
.card__age { font-size: 10px; color: var(--dim); font-weight: 400; }
.card__name { font-size: 11px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__chg { font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; }

.spark { display: block; width: 100%; height: 32px; }

.metrics { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--edge-2); padding-top: 9px; font-size: 11px; }
.metrics__row { display: flex; justify-content: space-between; gap: 8px; }
.metrics__k { color: var(--mute); }
.metrics__v { font-weight: 700; font-variant-numeric: tabular-nums; }

.curve__top { display: flex; justify-content: space-between; font-size: 10px; color: var(--dim); margin-bottom: 4px; }
.curve .bar { height: 6px; }

.card__foot { display: flex; align-items: center; gap: 9px; }
.card__mc { font-size: 10.5px; color: var(--dim); font-variant-numeric: tabular-nums; }

/* ─── the three-column terminal ───────────────────────────── */

.pairs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; align-items: start; }

.col {
  border: 1px solid var(--edge);
  background: rgba(13, 10, 24, 0.82);
  display: flex;
  flex-direction: column;
  min-height: 180px;
  overflow: hidden;
}
.col__head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--edge);
  background: rgba(255, 255, 255, 0.03);
}
.col__head h3 { font-family: var(--pixel); font-size: 8.5px; }
.col__n { margin-left: auto; font-size: 10.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.col__list { display: flex; flex-direction: column; max-height: 640px; overflow-y: auto; }
.col__empty { padding: 16px 12px; font-size: 10.5px; color: var(--faint); line-height: 1.5; }

.pair {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--edge-2);
  color: var(--ink);
  position: relative;
}
.pair:last-child { border-bottom: 0; }
.pair:hover { background: rgba(255, 255, 255, 0.05); }
.pair__av { width: 36px; height: 36px; background-size: cover; flex-shrink: 0; }
.pair__mid { min-width: 0; }
.pair__tk { display: flex; gap: 6px; align-items: baseline; font-weight: 800; font-size: 12.5px; }
.pair__age { font-size: 9.5px; color: var(--dim); font-weight: 400; }
.pair__nm { font-size: 10px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pair__meta { display: flex; gap: 10px; font-size: 9.5px; color: var(--dim); margin-top: 4px; }
.pair__right { text-align: right; }
.pair__chg { font-weight: 800; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pair__mc { font-size: 9.5px; color: var(--dim); font-variant-numeric: tabular-nums; margin-top: 3px; }
.pair__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, 0.07); }
.pair__bar i { display: block; height: 100%; }
.pair--fresh { animation: drop 0.45s ease; }
.pair--mine { box-shadow: inset 3px 0 0 var(--lime); }

/* positions + P&L */

.pos { display: flex; flex-direction: column; }
.pos__row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 9px; align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--edge-2);
  font-size: 11.5px;
}
.pos__av { width: 28px; height: 28px; background-size: cover; }
.pos__tk { font-weight: 800; }
.pos__sub { font-size: 9.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.pos__pnl { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.pos__pct { display: block; font-size: 9.5px; font-weight: 400; }
.pos__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; gap: 10px; }
.pos__big { font-size: clamp(20px, 3vw, 26px); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

@media (max-width: 1080px) { .pairs { grid-template-columns: minmax(0, 1fr); } }

/* rail */

.rail__block + .rail__block { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--edge); }
.rail__head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }

.mini { display: flex; flex-direction: column; gap: 9px; }
.mini__row { display: flex; align-items: center; gap: 9px; font-size: 11.5px; }
.mini__rank { width: 17px; color: var(--dim); font-size: 10.5px; }
.mini__swatch { width: 24px; height: 24px; flex-shrink: 0; }
.mini__name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini__pnl { color: var(--lime); font-weight: 800; font-variant-numeric: tabular-nums; }

/* ─── tables ──────────────────────────────────────────────── */

.tablewrap { overflow-x: auto; border: 1px solid var(--edge); background: rgba(9,12,17,0.94); }
table { width: 100%; min-width: 640px; border-collapse: collapse; }
caption { text-align: left; padding: 11px 13px; color: var(--mute); font-size: 11px; border-bottom: 1px solid var(--edge); }
th, td { padding: 10px 13px; text-align: left; font-size: 12px; }
thead th {
  font-size: 10px; color: var(--dim); font-weight: 400; letter-spacing: 0.06em;
  border-bottom: 1px solid var(--edge); background: #0b0e14;
  position: sticky; top: 0;
}
thead th button { background: none; border: 0; color: inherit; font: inherit; letter-spacing: inherit; padding: 0; display: inline-flex; align-items: center; gap: 5px; }
thead th button:hover { color: var(--ink); }
tbody tr { border-bottom: 1px solid var(--edge-2); }
tbody tr:hover { background: rgba(255,255,255,0.04); }
tbody tr:last-child { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; }

.pill { display: inline-block; padding: 2px 7px; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; border: 1px solid currentColor; }

/* ─── coin terminal ───────────────────────────────────────── */

.coinhead {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  padding-block: 15px; border-bottom: 1px solid var(--edge);
}
.coinhead__id { display: flex; align-items: center; gap: 12px; }
.coinhead__tk { font-family: var(--display); font-size: 20px; letter-spacing: -0.02em; }
.coinhead__addr { display: flex; align-items: center; gap: 7px; margin-top: 3px; font-size: 10.5px; color: var(--dim); }
.iconbtn { width: 22px; height: 20px; display: grid; place-items: center; background: none; border: 1px solid var(--edge); padding: 0; }
.iconbtn:hover { border-color: #46536b; }
.coinhead__px { display: flex; align-items: baseline; gap: 10px; }
.coinhead__px b { font-size: clamp(20px, 3vw, 27px); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

.kpis { display: flex; flex-wrap: wrap; border: 1px solid var(--edge); margin-left: auto; background: rgba(9,12,17,0.93); }
.kpi { padding: 7px 15px; border-right: 1px solid var(--edge); }
.kpi:last-child { border-right: 0; }
.kpi__k { font-size: 9.5px; color: var(--dim); letter-spacing: 0.06em; }
.kpi__v { font-size: 14px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }

.terminal { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }

.chartbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-block: 9px; border-bottom: 1px solid var(--edge); }
.ohlc { margin-left: auto; font-size: 10.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.ohlc b { color: var(--ink); font-weight: 400; }

.chartbox { padding-block: 10px; }
#chart { display: block; width: 100%; height: 400px; }
#volume { display: block; width: 100%; height: 62px; }

.tabs { display: flex; }
.tab { flex: 1 1 0; height: 40px; border: 1px solid #2f3a48; background: rgba(255,255,255,0.03); color: var(--mute); font-weight: 800; font-size: 12.5px; }
.tab[aria-pressed="true"].tab--buy { background: var(--lime); border-color: var(--lime); color: #05060a; }
.tab[aria-pressed="true"].tab--sell { background: var(--down); border-color: var(--down); color: #05060a; }

.field { margin-top: 12px; }
.field__label { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; color: var(--dim); letter-spacing: 0.07em; margin-bottom: 6px; }
.input {
  width: 100%; height: 44px;
  background: rgba(10,13,19,0.85); border: 1px solid #2f3a48;
  color: var(--ink); font-family: var(--mono); font-size: 13.5px; padding: 0 12px; outline: none;
}
.input:focus { border-color: var(--lime); }
.input--big { height: 48px; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.input--accent { color: var(--lime); font-weight: 800; }

.inputrow { display: flex; align-items: center; border: 1px solid #2f3a48; background: rgba(10,13,19,0.85); padding-right: 12px; }
.inputrow .input { border: 0; background: none; }
.inputrow__unit { font-size: 12px; color: var(--dim); }

.presets { display: flex; gap: 6px; margin-top: 8px; }
.presets .chip { flex: 1 1 0; }

.readout { display: flex; flex-direction: column; gap: 5px; margin-top: 13px; font-size: 11px; }
.readout__row { display: flex; justify-content: space-between; gap: 10px; }
.readout__k { color: var(--dim); }
.readout__v { font-weight: 700; font-variant-numeric: tabular-nums; }

.panelblock + .panelblock { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--edge); }

.holders { display: flex; flex-direction: column; gap: 8px; }
.holder { display: flex; align-items: center; gap: 9px; font-size: 11.5px; }
.holder__n { width: 18px; color: var(--dim); font-size: 10.5px; }
.holder__who { flex: 1 1 auto; min-width: 0; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.holder__bar { width: 60px; height: 6px; background: rgba(255,255,255,0.07); flex-shrink: 0; }
.holder__bar i { display: block; height: 100%; }
.holder__pct { width: 40px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

.trades { border-top: 1px solid var(--edge); }
.trades__head { display: flex; align-items: center; gap: 11px; padding-block: 11px; flex-wrap: wrap; }

/* ─── scan / launch ───────────────────────────────────────── */

.scan { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 18px; }
.scan__input {
  flex: 1 1 320px; min-width: 0; height: 50px;
  background: rgba(10,13,19,0.85); border: 1px solid #2f3a48;
  color: var(--ink); font-family: var(--mono); font-size: 14px; padding: 0 14px; outline: none;
}
.scan__input:focus { border-color: var(--magenta); box-shadow: 0 0 26px -6px var(--magenta); }
.scan__input::placeholder { color: var(--faint); }

.hints { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hint { border: 1px solid var(--edge); background: rgba(255,255,255,0.03); color: var(--dim); font-size: 10.5px; padding: 5px 9px; }
.hint:hover { color: var(--ink); border-color: #46536b; }

.scanout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 20px; margin-top: 24px; align-items: start; }

.launch { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.launch h1 { font-family: var(--display); font-size: clamp(32px, 5.2vw, 54px); line-height: 0.9; letter-spacing: -0.04em; }

.formgrid { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 13px; }

.vibes { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 7px; }
.vibe { height: 44px; padding: 0 9px; border: 1px solid #2f3a48; background: rgba(255,255,255,0.03); color: var(--mute); font-size: 10px; font-weight: 700; }
.vibe:hover { color: var(--ink); }
.vibe[aria-pressed="true"] { border-color: var(--lime); background: rgba(198,245,71,0.12); color: var(--lime); }

.drop {
  width: 100%; min-height: 100px;
  border: 1px dashed #3a4554; background: rgba(10,13,19,0.7);
  color: var(--dim); font-size: 10.5px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 10px;
}
.drop:hover { border-color: var(--lime); color: var(--mute); }

.slider { width: 100%; accent-color: var(--lime); margin: 4px 0 0; }

.timeline { display: flex; flex-direction: column; gap: 10px; }
.timeline__row { display: flex; gap: 12px; }
.timeline__at { width: 48px; flex-shrink: 0; color: var(--lime); font-size: 10.5px; }
.timeline__d { font-size: 11.5px; color: var(--mute); line-height: 1.5; }

.warn { border: 1px solid #4a3a1e; background: rgba(28,22,10,0.8); padding: 13px; display: flex; gap: 9px; font-size: 11px; color: #e0bd7c; line-height: 1.6; }
.warn svg { flex-shrink: 0; margin-top: 2px; }

.receipt { border: 1px solid #23503a; background: rgba(10,26,20,0.85); padding: 13px; font-size: 11.5px; color: #9fe9ba; line-height: 1.6; }

/* ─── strategies / how ────────────────────────────────────── */

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); gap: 12px; }

.statrow { display: flex; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--edge-2); margin-top: 13px; padding-top: 11px; font-size: 11px; color: var(--dim); }
.statrow b { font-variant-numeric: tabular-nums; }

.step__n { font-family: var(--pixel); font-size: 17px; margin-bottom: 11px; }
.step h3 { font-size: 13.5px; }

.faq { display: flex; flex-direction: column; border: 1px solid var(--edge); background: rgba(9,12,17,0.94); }
.faq details { border-bottom: 1px solid var(--edge-2); }
.faq details:last-child { border-bottom: 0; }
.faq summary { padding: 13px 15px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.faq summary::marker { color: var(--lime); }
.faq p { padding: 0 15px 14px; font-size: 11.5px; color: var(--mute); line-height: 1.65; max-width: 72ch; }

/* ─── footer / toast ──────────────────────────────────────── */

.foot { border-top: 1px solid var(--edge); background: rgba(6,8,12,0.9); padding-block: 22px; }
.foot__in { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.foot__name { font-family: var(--display); font-size: 14px; }
.foot__tag { font-size: 11px; color: var(--dim); }
.foot__note { font-size: 10.5px; color: var(--faint); max-width: 58ch; line-height: 1.55; }

.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%); z-index: 200;
  border: 1px solid var(--lime); background: #10160a; color: var(--lime);
  font-size: 12px; padding: 10px 16px; max-width: calc(100vw - 32px); text-align: center;
}
.toast[hidden] { display: none !important; }

/* ══════════════════════════════════════════════════════════
   THE LAB — motion, micro-interactions and specimen dressing.
   Presentation only: nothing below changes what the site does.
   ══════════════════════════════════════════════════════════ */

:root {
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --fast: 140ms;
  --med: 280ms;
}

/* ── the scanner sweep: a line passes down the page, like something
      is being imaged, every twelve seconds ── */
.veil::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 140px;
  background: linear-gradient(180deg,
    transparent,
    rgba(255, 46, 154, 0.05) 45%,
    rgba(255, 46, 154, 0.16) 50%,
    rgba(255, 46, 154, 0.05) 55%,
    transparent);
  animation: sweepdown 12s linear infinite;
}
@keyframes sweepdown {
  0% { transform: translateY(-160px); opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { transform: translateY(100vh); opacity: 0; }
}

/* ── focus: a proper halo, not a hairline ── */
:focus-visible {
  outline: 2px solid var(--magenta);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(255, 46, 154, 0.18);
}

/* ── buttons: press, and a light that passes across on hover ── */
.btn {
  position: relative;
  overflow: hidden;
  transition: background var(--fast) var(--ease),
              box-shadow var(--fast) var(--ease),
              transform var(--fast) var(--ease);
}
.btn::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-18deg);
  transition: left 520ms var(--ease);
}
.btn:hover::after { left: 130%; }
.btn:active { transform: translateY(1px) scale(0.985); }

.chip, .vibe, .hint, .tab, .iconlink, .iconbtn {
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease),
              border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease),
              transform var(--fast) var(--ease);
}
.chip:active, .vibe:active, .hint:active, .tab:active { transform: translateY(1px); }
.iconlink:hover { transform: translateY(-1px); }

/* ── navigation: a line draws in under the hovered item ── */
.nav__link { position: relative; transition: color var(--fast) var(--ease); }
.nav__link::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px; bottom: 4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--med) var(--ease);
}
.nav__link:hover::after { transform: scaleX(1); }
.nav__link[aria-current="page"]::after { display: none; }

/* ── section headings get a specimen tag ── */
.eyebrow { position: relative; padding-left: 15px; display: inline-block; }
.eyebrow::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 7px; height: 7px;
  margin-top: -3px;
  background: var(--magenta);
  box-shadow: 0 0 10px var(--magenta);
}

/* ── live values flash when they move ── */
@keyframes flash-up {
  from { background-color: rgba(75, 227, 138, 0.32); }
  to { background-color: transparent; }
}
@keyframes flash-down {
  from { background-color: rgba(255, 77, 125, 0.32); }
  to { background-color: transparent; }
}
.flash-up { animation: flash-up 800ms var(--ease); }
.flash-down { animation: flash-down 800ms var(--ease); }

/* ── pair rows: lift, and the specimen turns toward you ── */
.pair { transition: background var(--fast) var(--ease), transform var(--fast) var(--ease); }
.pair:hover { transform: translateX(3px); }
.pair__av { transition: transform var(--med) var(--ease), filter var(--med) var(--ease); }
.pair:hover .pair__av { transform: scale(1.08) rotate(-3deg); filter: saturate(1.35) brightness(1.1); }
.pair__bar i { transition: width 600ms var(--ease); }

.col__list .pair { animation: rise 360ms var(--ease) backwards; }
.col__list .pair:nth-child(1) { animation-delay: 0ms; }
.col__list .pair:nth-child(2) { animation-delay: 40ms; }
.col__list .pair:nth-child(3) { animation-delay: 80ms; }
.col__list .pair:nth-child(4) { animation-delay: 120ms; }
.col__list .pair:nth-child(5) { animation-delay: 160ms; }
.col__list .pair:nth-child(6) { animation-delay: 200ms; }
.col__list .pair:nth-child(n+7) { animation-delay: 240ms; }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* a coin under 24s old keeps a live ring on it */
.pair--fresh::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--cyan);
  animation: freshfade 2.6s var(--ease) forwards;
  pointer-events: none;
}
@keyframes freshfade { to { opacity: 0; } }

/* ── column heads get a pulse while data is moving ── */
.col__head { position: relative; }
.col__head::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  opacity: 0.35;
  animation: scanbar 3.4s linear infinite;
}
@keyframes scanbar {
  0% { transform: scaleX(0); transform-origin: left; opacity: 0; }
  40% { opacity: 0.5; }
  100% { transform: scaleX(1); transform-origin: left; opacity: 0; }
}

/* ── empty states: a flatline that draws itself ── */
.col__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  text-align: center;
  padding: 30px 16px;
}
.col__empty svg path { stroke-dasharray: 220; stroke-dashoffset: 220; animation: drawline 2.4s var(--ease) infinite; }
@keyframes drawline {
  0% { stroke-dashoffset: 220; }
  55%, 100% { stroke-dashoffset: 0; }
}

/* ── skeleton shimmer for anything waiting ── */
.skel {
  background-image: linear-gradient(90deg,
    rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.04));
  background-size: 300% 100%;
  animation: shimmer 1.3s linear infinite;
  color: transparent !important;
}
@keyframes shimmer { to { background-position: -300% 0; } }

.skel-row { height: 12px; margin-bottom: 9px; }
.skel-row:nth-child(2) { width: 72%; }
.skel-row:nth-child(3) { width: 54%; }

/* the crew is working: the station glows while it thinks */
.lobe[data-state="busy"] { border-color: var(--amber); }

/* ── panels lift slightly on hover, like slides on a tray ── */
.panel, .col, .tablewrap { transition: border-color var(--med) var(--ease), box-shadow var(--med) var(--ease); }
.col:hover { border-color: #3b3358; }

/* ── cards ── */
.card { transition: border-color var(--fast) var(--ease), box-shadow var(--med) var(--ease), transform var(--fast) var(--ease); }
.card:hover { transform: translateY(-2px); }

/* ── tables feel like readouts ── */
tbody tr { transition: background var(--fast) var(--ease); }

/* ── the thought box: the lab's one input ── */
.think__input {
  transition: border-color var(--fast) var(--ease), box-shadow var(--med) var(--ease), background var(--fast);
}
.think__input:hover { border-color: #4b4272; }

/* ─── responsive ──────────────────────────────────────────── */

@media (max-width: 1180px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .board { grid-template-columns: minmax(0, 1fr); }
  .terminal { grid-template-columns: minmax(0, 1fr); }
  .launch { grid-template-columns: minmax(0, 1fr); }
  .scanout { grid-template-columns: minmax(0, 1fr); }
  .kpis { margin-left: 0; }
}

@media (max-width: 1060px) {
  .search { display: none; }
}

/* on a narrow screen the whole viewport is the reading area */
@media (max-width: 860px) {
  #cortex { opacity: 0.3; }
}

@media (max-width: 860px) {
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip__cell:nth-child(2) { border-right: 0; }
  .strip__cell:nth-child(-n+2) { border-bottom: 1px solid var(--edge); }
  #chart { height: 290px; }
  .thought { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .thought__ago { margin-left: 0; }
}

@media (max-width: 620px) {
  .tape { display: none; }   /* keep the sticky header affordable on a phone */
  .nav { height: auto; padding-block: 10px; flex-wrap: wrap; gap: 9px; }
  .nav__links { order: 3; width: 100%; }
  .nav__tools { margin-left: auto; }
  .formgrid { grid-template-columns: minmax(0, 1fr); }
  .kpis { width: 100%; }
  .kpi { flex: 1 1 33%; }
  #chart { height: 240px; }
  .eegstrip__read { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  /* everything holds still, and nothing stays hidden by a paused animation */
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .lit { background-position: 0 50%; }
  .veil::after { display: none; }
  .col__empty svg path { stroke-dashoffset: 0; }
  .col__list .pair { opacity: 1; }
  .pair--fresh::before { display: none; }
  .skel { background-image: none; background-color: rgba(255, 255, 255, 0.07); }
  * { scroll-behavior: auto !important; }
}
