/* ── astradev — activity-log console ──────────────────────────────────────
   Terminal aesthetic: near-black ground, soft rounded panels, one green
   accent reserved for anything that is alive (status, prompt, picks). */

:root {
  --bg:        #070807;
  --bg-elev:   #0b0d0b;
  --bg-elev2:  #101310;
  --fg:        #dfe4df;
  --dim:       #8b938b;
  --faint:     #565d56;
  --line:      rgba(255,255,255,.07);
  --line2:     rgba(255,255,255,.12);
  --acc:       #7ee787;
  --acc-soft:  #a9d9ad;
  --acc-deep:  #4bb85c;
  --glow:      rgba(126,231,135,.32);
  --red:       #ff6b6b;
  --r:         14px;
  --r-sm:      8px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--acc-soft); text-decoration: none; }
a:hover { color: var(--acc); }
.dim { color: var(--dim); }
b { color: var(--fg); }
em { color: var(--acc-soft); font-style: normal; }

/* ambience — a faint green wash, nothing more */
.fx-glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 50% 45% at 12% 30%, rgba(126,231,135,.055), transparent 68%),
    radial-gradient(ellipse 75% 55% at 78% 0%, rgba(255,255,255,.035), transparent 72%);
}

/* ── HUD ── */
.hud {
  position: relative; z-index: 1; height: 100vh;
  display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 0;
}

.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 11px 16px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--bg-elev);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.3; }
.brand-name { font-weight: 700; letter-spacing: 3.4px; font-size: 13px; color: var(--fg); }
.brand-name::before { content: ">_ "; color: var(--acc); letter-spacing: 0; }
.brand-sub { font-size: 9px; color: var(--faint); letter-spacing: 1.4px; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; }
.topbar-counter { color: var(--faint); }
.topbar-right a { color: var(--dim); cursor: pointer; }
.topbar-right a:hover { color: var(--acc); }
.topbar-right a#chip-voice.on { color: var(--acc); }

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

/* uptime — sits above the deep-analysis column */
.uptime-box {
  flex: none; display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-elev);
}
.uptime-k { font-size: 8.5px; letter-spacing: 2.2px; text-transform: uppercase; color: var(--faint); }
#uptime-counter { font-size: 11.5px; color: var(--acc); letter-spacing: .4px; }

/* grid */
.grid {
  flex: 1; min-height: 0; padding-bottom: 12px;
  display: grid; grid-template-columns: 254px 238px 1fr 238px 238px; gap: 12px;
}
.rail { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; scrollbar-width: none; min-height: 0; }
.rail::-webkit-scrollbar { display: none; }

/* core visual — generated spiral galaxy (see galaxy.js) */
.core {
  position: relative; flex: none; /* never let the rail squash the square */
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, #0d120e, #070807 70%);
}
.core canvas { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; }
.core-tag {
  position: absolute; left: 12px; bottom: 10px;
  font-size: 7.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--faint);
  pointer-events: none;
}

/* panels */
.panel { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-elev); padding: 13px 14px; }
.panel.grow { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.panel-h {
  font-size: 8.5px; letter-spacing: 2.2px; text-transform: uppercase; color: var(--dim);
  margin-bottom: 12px; display: flex; align-items: center;
}
.panel-h::before { content: ">_"; color: var(--acc); margin-right: 7px; letter-spacing: 0; }
.ph-note { color: var(--faint); letter-spacing: 1px; margin-left: auto; }

/* confidence — no dial, just the particle number (conf.js) and its caption */
.conf { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 2px 0 4px; }
.conf canvas { display: block; width: 120px; height: 40px; }
.conf-label { font-size: 7px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--faint); }

/* pump callout — generated blurb a supporter can paste on pump.fun */
.co-box {
  font-size: 10px; line-height: 1.6; color: var(--acc-soft); min-height: 96px;
  background: var(--bg-elev2); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 11px; white-space: pre-wrap; word-break: break-word;
  user-select: text; -webkit-user-select: text;
}
.co-box.empty { color: var(--faint); }
.co-box.busy { color: var(--dim); }
.co-box.recycled { border-color: rgba(255,255,255,.14); }
.co-foot { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.co-chars { font-size: 8px; letter-spacing: 1px; color: var(--faint); margin-right: auto; }
.co-chars.over { color: var(--red); }
.co-note {
  display: flex; gap: 7px; align-items: flex-start; margin-top: 8px; padding: 7px 9px;
  font-size: 8.5px; line-height: 1.5; letter-spacing: .4px;
  border: 1px solid rgba(255,255,255,.10); border-radius: var(--r-sm);
  background: rgba(255,255,255,.03); color: var(--dim);
}
.co-note::before { content: "!"; flex: none; color: var(--acc-deep); font-weight: 700; }
.co-note b { color: var(--acc-soft); font-weight: 700; }
.co-btn {
  font: inherit; font-size: 8.5px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase;
  cursor: pointer; padding: 7px 11px; border-radius: var(--r-sm);
  border: 1px solid var(--line2); background: var(--bg-elev2); color: var(--dim);
  transition: color .15s, border-color .15s, background .15s;
}
.co-btn:hover:not(:disabled) { color: var(--acc); border-color: rgba(126,231,135,.4); background: rgba(126,231,135,.08); }
.co-btn.primary { color: var(--acc); border-color: rgba(126,231,135,.35); background: rgba(126,231,135,.06); }
.co-btn.primary:hover:not(:disabled) { background: rgba(126,231,135,.14); }
.co-btn:disabled { opacity: .4; cursor: default; }
.rail-foot { margin-top: auto; font-size: 9px; color: var(--faint); letter-spacing: .6px; padding: 4px 2px; }

/* conviction — calibrated per-signal score (see the ASTRA paper, §05) */
.scoring { display: flex; flex-direction: column; gap: 11px; max-height: 220px; overflow-y: auto; scrollbar-width: none; }
.scoring::-webkit-scrollbar { display: none; }
.sc-row { display: flex; flex-direction: column; gap: 5px; }
.sc-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 9.5px; gap: 8px; }
.sc-name { color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-name.warm { color: var(--acc-soft); }
.sc-name.hit { color: var(--acc); font-weight: 700; }
.sc-pct { font-weight: 700; color: var(--faint); flex: none; }
.sc-pct.warm { color: var(--acc-soft); }
.sc-pct.hit { color: var(--acc); }
.sc-bar-wrap { height: 3px; background: rgba(255,255,255,.06); border-radius: 3px; overflow: hidden; }
.sc-bar { height: 100%; border-radius: 3px; background: var(--faint); transition: width .5s ease; }
.sc-bar.warm { background: var(--acc-deep); }
.sc-bar.hit { background: var(--acc); box-shadow: 0 0 10px var(--glow); }

/* ── console (center) — the activity log ── */
.stream {
  display: flex; flex-direction: column; min-height: 0;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-elev); overflow: hidden;
}
.stream-h {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--line);
  font-size: 8.5px; letter-spacing: 2.4px; text-transform: uppercase;
}
.sh-l { color: var(--dim); }
.sh-l::before { content: ">_"; color: var(--acc); margin-right: 8px; letter-spacing: 0; }
.sh-r { color: var(--faint); display: inline-flex; align-items: center; gap: 7px; }
.sh-r::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--acc); box-shadow: 0 0 8px var(--acc); animation: pulse 2.4s infinite;
}

.term-out { flex: 1; overflow-y: auto; padding: 16px 18px 20px; scrollbar-width: none; font-size: 11.5px; }
.term-out::-webkit-scrollbar { display: none; }

/* a log row: [session.NN] › text */
.ln { display: flex; gap: 10px; white-space: pre-wrap; word-break: break-word; padding: 1.5px 0; animation: fadein .28s ease both; }
@keyframes fadein { from{opacity:0; transform:translateY(3px)} to{opacity:1; transform:none} }
.ln .sess { flex: none; color: var(--faint); font-size: 10.5px; min-width: 84px; }
.ln .chev { flex: none; color: var(--acc-deep); }
.ln .body { min-width: 0; flex: 1; }
.ln.cont .sess, .ln.cont .chev { visibility: hidden; }
.ln.gap { margin-top: 12px; }
.ln.verdict {
  margin: 6px 0; padding: 9px 12px; border-radius: var(--r-sm);
  background: rgba(126,231,135,.045); border: 1px solid rgba(126,231,135,.12);
}
.ac { color: var(--acc-soft); }
.gold, .hl { color: var(--acc); font-weight: 700; }
.err { color: var(--red); }
.t { color: var(--faint); }
.ln a { text-decoration: underline; text-underline-offset: 3px; }
.says { color: var(--fg); }
.says .tag { color: var(--acc); font-weight: 700; letter-spacing: 1.2px; }
.obs { color: var(--acc); font-weight: 700; letter-spacing: .6px; }
.banner { color: var(--acc); font-weight: 700; letter-spacing: 6px; font-size: 18px; }
.you .tag { color: var(--dim); font-weight: 700; }
.help-k { color: var(--acc-soft); }

/* command line — sits between the log header and the log itself */
.term-in {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-elev2);
}
.term-in .prompt { flex: none; font-size: 11.5px; color: var(--acc); font-weight: 700; letter-spacing: .4px; }
.term-in .prompt .tilde, .term-in .prompt .chev { color: var(--acc-deep); font-weight: 400; }
.term-in input {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: none;
  font-family: var(--mono); font-size: 11.5px; color: var(--fg); padding: 4px 0;
}
.term-in input::placeholder { color: var(--faint); }
.key-btn {
  flex: none; display: grid; place-items: center; width: 30px; height: 26px;
  border: 1px solid var(--line2); border-radius: var(--r-sm); background: var(--bg-elev2);
  color: var(--dim); font-size: 11px; cursor: pointer; font-family: var(--mono);
  transition: color .15s, border-color .15s, background .15s;
}
.key-btn:hover { color: var(--acc); border-color: rgba(126,231,135,.4); background: rgba(126,231,135,.08); }

/* creations (right rail) */
.creations { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; scrollbar-width: none; }
.creations::-webkit-scrollbar { display: none; }
.cr {
  display: flex; gap: 10px; align-items: center; padding: 9px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-elev2);
  transition: border-color .15s, background .15s, transform .15s;
}
.cr:hover { border-color: rgba(126,231,135,.35); background: rgba(126,231,135,.05); transform: translateX(-2px); }
.cr img { width: 38px; height: 38px; object-fit: cover; border-radius: var(--r-sm); flex: none; background: var(--bg-elev2); }
.cr-b { min-width: 0; flex: 1; }
.cr-t { color: var(--acc); font-weight: 700; font-size: 11px; }
.cr-n { color: var(--fg); font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-m { font-size: 8.5px; color: var(--faint); display: flex; justify-content: space-between; gap: 6px; }
.cr-m .win { color: var(--acc); }
.cr-m .loss { color: var(--red); }
.cr-empty { color: var(--faint); font-size: 10.5px; padding: 12px 2px; }

/* corpus intake — every new mint on pump.fun, not just ours */
.pf-meta {
  display: flex; align-items: center; gap: 6px; margin: -2px 0 10px;
  font-size: 8.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--faint);
}
.pf-meta::before {
  content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%;
  background: var(--faint);
}
.pf-meta.live::before { background: var(--acc); box-shadow: 0 0 7px var(--acc); animation: pulse 2.4s infinite; }
.pf-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; scrollbar-width: none; }
.pf-list::-webkit-scrollbar { display: none; }
.pf-row {
  display: flex; align-items: baseline; gap: 7px; padding: 6px 8px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-elev2);
}
.pf-row:hover { border-color: rgba(126,231,135,.3); }
.pf-t { flex: none; max-width: 44%; color: var(--acc); font-weight: 700; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-n { flex: 1; min-width: 0; color: var(--dim); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-a { flex: none; color: var(--faint); font-size: 8.5px; }
.pf-row.fresh { animation: pf-in 1.4s ease-out both; }
@keyframes pf-in {
  0% { background: rgba(126,231,135,.18); border-color: rgba(126,231,135,.5); }
  100% { background: var(--bg-elev2); border-color: var(--line); }
}

/* deep analysis (far right rail) */
.deep-out { overflow-y: auto; display: flex; flex-direction: column; scrollbar-width: none; font-size: 10px; }
.deep-out::-webkit-scrollbar { display: none; }
.dp-row { padding: 10px 0; border-top: 1px solid var(--line); }
.dp-row:first-child { border-top: 0; padding-top: 0; }
.dp-head { display: flex; justify-content: space-between; gap: 6px; font-size: 8.5px; }
.dp-metric { color: var(--acc); letter-spacing: 1.2px; text-transform: uppercase; font-weight: 700; }
.dp-who { color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 9px; }
.dp-verdict { margin-top: 5px; color: #b9c0b9; line-height: 1.55; }

/* ── ROADMAP (roadmap.html) — hairlines, no boxes ── */
.rm { max-width: 780px; margin: 0 auto; padding: 0 8px 90px; }

/* the field stays pinned while the phases scroll past it — otherwise the
   numeral would morph off-screen, exactly when it means something */
.rm-hero {
  position: sticky; top: 0; z-index: 2; margin: 0 0 8px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.rm-hero canvas { display: block; width: 100%; height: 168px; }
.rm-kicker {
  position: absolute; left: 0; bottom: 10px;
  font-size: 8.5px; letter-spacing: 3px; text-transform: uppercase; color: var(--faint);
}

.rm-phase { padding: 26px 0; border-top: 1px solid var(--line); }
.rm-phase:first-of-type { border-top: 0; }
.rm-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.rm-n { flex: none; width: 30px; font-size: 10px; letter-spacing: 2px; color: var(--faint); transition: color .4s ease; }
.rm-name { font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--dim); font-weight: 700; transition: color .4s ease; }
.rm-phase.active .rm-n, .rm-phase.active .rm-name { color: var(--acc); }
.rm-s {
  margin-left: auto; flex: none; font-size: 8px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--faint);
}
.rm-s.ok { color: var(--acc); }
.rm-s.wip { color: var(--acc-soft); }

.rm-p { margin: 0 0 12px 42px; font-size: 11px; color: var(--dim); }
.rm-list { list-style: none; margin: 0; padding: 0 0 0 42px; display: flex; flex-direction: column; gap: 10px; }
.rm-list li { display: flex; gap: 11px; font-size: 11.5px; line-height: 1.65; color: #99a199; }
.rm-list b { color: var(--fg); font-weight: 700; }
.rm-list i { flex: none; width: 5px; height: 5px; margin-top: 7px; border: 1px solid var(--faint); border-radius: 50%; }
.rm-list i.ok { background: var(--acc); border-color: var(--acc); box-shadow: 0 0 8px var(--glow); }
.rm-list i.wip { background: var(--acc-deep); border-color: var(--acc-deep); }

.rm-note { margin: 40px 0 0; padding-top: 24px; border-top: 1px solid var(--line); font-size: 11px; color: var(--dim); }

@media (max-width: 620px) {
  .rm-hero canvas { height: 132px; }
  .rm-list, .rm-p { padding-left: 0; margin-left: 0; }
}

.sub { margin-top: -6px; margin-bottom: 18px; font-size: 11px; }
.center { text-align: center; }

.foot {
  position: relative; z-index: 1; border-top: 1px solid var(--line);
  padding: 26px; text-align: center; font-size: 10.5px; color: var(--dim);
  display: flex; flex-direction: column; gap: 5px;
}

/* ── WHITEPAPER (whitepaper.html) ── */
.topbar-right .nav-wp { color: var(--acc-soft); }
.topbar-right .nav-wp:hover { color: var(--acc); }

.wp-page { position: relative; z-index: 1; padding: 14px 16px 0; }
.wp-page .topbar { margin-bottom: 44px; }
.wp { max-width: 840px; margin: 0 auto; padding: 0 8px 96px; }

.wp-title { margin-bottom: 38px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.wp-title h1 { margin: 8px 0 12px; font-size: 31px; letter-spacing: 11px; color: var(--acc); font-weight: 700; }
.wp-sub { margin: 0; color: var(--dim); font-size: 10.5px; letter-spacing: 1.3px; }
.wp-lede { font-size: 13px; color: #c3cac3; margin: 0 0 50px; }
.wp-lede em { color: var(--acc-soft); }

.wp-sec { display: grid; grid-template-columns: 56px 1fr; gap: 0 18px; margin-bottom: 44px; }
.wp-n { font-size: 10px; color: var(--faint); letter-spacing: 1px; padding-top: 3px; }
.wp-sec h2 { margin: 0 0 15px; font-size: 12px; letter-spacing: 2.6px; text-transform: uppercase; color: var(--fg); }
.wp-sec h3 {
  margin: 26px 0 11px; font-size: 9px; letter-spacing: 2.2px; text-transform: uppercase;
  color: var(--acc); font-weight: 700;
}
.wp-sec p { margin: 0 0 13px; color: #a9b0a9; }
.wp-sec p:last-child { margin-bottom: 0; }
.wp-sec b { color: var(--fg); }
.wp-sec em { color: var(--acc-soft); font-style: normal; }
.wp-sec sub { font-size: .75em; }

.wp-vars { display: flex; flex-direction: column; gap: 8px; margin: 0 0 15px; }
.wp-vars span { display: block; font-size: 11px; line-height: 1.55; color: #99a199; padding-left: 13px; border-left: 1px solid var(--line2); }
.wp-vars b { color: var(--acc-soft); font-weight: 700; }

.wp-rule {
  margin: 18px 0; padding: 15px 16px; text-align: center;
  border: 1px solid rgba(126,231,135,.22); border-radius: var(--r-sm);
  background: rgba(126,231,135,.05); color: var(--acc); font-size: 12px; letter-spacing: .6px;
}
.wp-quote {
  margin: 20px 0 0; padding: 2px 0 2px 15px; border-left: 2px solid var(--acc-deep);
  color: var(--fg) !important;
}

.wp-map { margin-top: 60px; padding-top: 30px; border-top: 1px solid var(--line); }
.wp-map p { color: #a9b0a9; margin: 0 0 13px; }
.wp-map b { color: var(--fg); }
.wp-map-row { font-size: 11px; color: var(--dim) !important; line-height: 2; }
.wp-map-row span { color: var(--faint); }

@media (max-width: 620px) {
  .wp-sec { grid-template-columns: 1fr; gap: 6px; }
  .wp-title h1 { font-size: 23px; letter-spacing: 7px; }
}

@media (max-width: 1560px) {
  /* deep analysis drops out first; the remaining tracks are rail · intake · log · creations */
  .grid { grid-template-columns: 252px 244px 1fr 244px; }
  .rail.far { display: none; }
}
@media (max-width: 1240px) {
  .grid { grid-template-columns: 250px 1fr 272px; }
  .rail.intake { display: none; }
}
@media (max-width: 1020px) {
  .grid { grid-template-columns: 1fr; }
  .rail { display: none; }
  .hud { height: auto; }
  .stream { height: 70vh; }
  .ln .sess { min-width: 70px; }
}
@media (max-width: 620px) {
  .topbar-counter { display: none; }
}
