/* @mole/site — omo-style terminal. no framework, no fonts fetched, no build. */

:root {
  --bg: #0a0b0d;
  --bg-panel: #0d0f13;
  --bg-cell: #0f1217;
  --bg-raised: #12151a;
  --border: #1c1f24;
  --border-soft: #16191e;

  --fg: #c2cad4;
  --fg-mid: #8b94a1;
  --fg-dim: #5c6572;
  --fg-faint: #434a55;

  --enter: #4ade80;
  --exit: #60a5fa;
  --refuse: #f87171;
  --stalk: #facc15;
  --read: #9ca3af;
  --note: #6b7280;

  --amber: #f59e0b;
  --chat: #c084fc;

  --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", "SFMono-Regular",
    Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

/* author display rules must never resurrect a [hidden] element */
[hidden] { display: none !important; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* faint CRT scanlines + vignette. decorative only. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.015) 0px,
    rgba(255, 255, 255, 0.015) 1px,
    transparent 1px,
    transparent 3px
  );
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.3) 100%);
}

::selection { background: rgba(74, 222, 128, 0.22); }

* { scrollbar-width: thin; scrollbar-color: #262b33 transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #262b33; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

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

/* ---------- header ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(10, 11, 13, 0.94);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }

.brand-logo {
  display: block;
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 6px rgba(74, 222, 128, 0.25));
}

.wordmark {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: #e5e9ee;
  text-shadow: 0 0 10px rgba(74, 222, 128, 0.18);
  white-space: nowrap;
}

.cursor {
  color: var(--enter);
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
  animation: blink 1.2s steps(1) infinite;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

.tag {
  font-size: 11px;
  color: var(--fg-dim);
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-x {
  flex: none;
  font-size: 13px;
  line-height: 1;
  color: var(--fg-dim);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 3px 7px;
  text-decoration: none;
}
.brand-x:hover {
  color: #e5e9ee;
  border-color: #2a2f37;
  text-decoration: none;
}

.foot-x { color: var(--fg-mid); white-space: nowrap; }
.foot-x:hover { color: #e5e9ee; }

.topbar-right { display: flex; align-items: center; gap: 10px; }

.chip {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--fg-mid);
  white-space: nowrap;
}

.mode-chip.mode-paper {
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.06);
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}
.mode-chip.mode-live {
  color: var(--enter);
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(74, 222, 128, 0.06);
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.3);
}

.halt-chip {
  color: var(--refuse);
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(248, 113, 113, 0.08);
  text-shadow: 0 0 8px rgba(248, 113, 113, 0.35);
}

.conn { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--fg-dim); }

.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-green {
  background: var(--enter);
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.7);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}
.dot-red {
  background: var(--refuse);
  box-shadow: 0 0 6px rgba(248, 113, 113, 0.6);
  animation: blinkred 1.4s ease-in-out infinite;
}
@keyframes blinkred { 50% { opacity: 0.35; } }

/* ---------- honesty banner (SIMULATION / PAPER) ---------- */

.sim-banner {
  padding: 8px 16px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.07);
  border-bottom: 1px solid rgba(245, 158, 11, 0.35);
  border-top: 1px solid rgba(245, 158, 11, 0.15);
}
.sim-banner[hidden] { display: none; }
.sim-word {
  font-weight: 700;
  letter-spacing: 0.18em;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}
/* real feed, simulated fills — same amber weight, distinct at a glance */
.sim-banner.banner-paper {
  border-left: 3px solid rgba(245, 158, 11, 0.6);
  padding-left: 13px;
}

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.panel {
  border: 1px solid var(--border);
  background: var(--bg-panel);
  border-radius: 4px;
  overflow: hidden;
}

.panel-head {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--fg-dim);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cols {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.empty {
  padding: 20px 12px;
  color: var(--fg-dim);
  font-size: 12px;
  font-style: italic;
  text-align: center;
}
.empty[hidden] { display: none; }

/* ---------- stream ---------- */

.stream-frame {
  aspect-ratio: 16 / 9;
  max-height: 420px;
  width: 100%;
  background:
    radial-gradient(ellipse at center, #0b0d10 0%, #07080a 100%);
  display: grid;
  place-items: center;
  position: relative;
}
.stream-frame video { width: 100%; height: 100%; object-fit: contain; background: #000; }

.stream-offline { text-align: center; }
.stream-glyph {
  font-size: 18px;
  color: #22262d;
  margin-bottom: 8px;
  animation: blinkred 3s ease-in-out infinite;
}
.stream-title {
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.stream-note { margin-top: 6px; font-size: 11px; color: var(--fg-faint); letter-spacing: 0.06em; }

/* ---------- equity strip ---------- */

.equity {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.stat { background: var(--bg-panel); padding: 10px 12px; min-width: 0; }
.stat-label {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--fg-dim);
  text-transform: uppercase;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-value {
  font-size: 15px;
  color: #d5dce4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* chain truth reads differently from the paper ledger beside it */
.stat-chain { box-shadow: inset 2px 0 0 rgba(74, 222, 128, 0.55); }
.stat-chain .stat-value { color: var(--enter); }

.stat-cap { color: var(--fg-dim); font-size: 12px; }
.stat-cap span { color: var(--fg-mid); }
.stat-sub {
  font-size: 10.5px;
  color: var(--fg-dim);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pos { color: var(--enter) !important; text-shadow: 0 0 8px rgba(74, 222, 128, 0.25); }
.neg { color: var(--refuse) !important; text-shadow: 0 0 8px rgba(248, 113, 113, 0.25); }

/* ---------- positions table ---------- */

.table-scroll { overflow-x: auto; }

table.positions { width: 100%; border-collapse: collapse; font-size: 12px; }
table.positions th {
  text-align: left;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--fg-dim);
  font-weight: 400;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.positions td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}
table.positions tr:last-child td { border-bottom: none; }
table.positions tr:hover td { background: rgba(255, 255, 255, 0.015); }
th.num, td.num { text-align: right; }

.pos-ticker { color: #d5dce4; }
.upnl-pct { color: var(--fg-dim); margin-left: 6px; font-size: 11px; }
td .upnl-pct.pos, td .upnl-pct.neg { font-size: 11px; }

/* ---------- badges / chips ---------- */

.badge {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.12em;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid;
  vertical-align: 1px;
}
.badge-paper {
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.07);
}
.badge-src {
  color: var(--fg-dim);
  border-color: var(--border);
  background: var(--bg-cell);
  text-transform: lowercase;
}
.badge-chat {
  color: var(--chat);
  border-color: rgba(192, 132, 252, 0.5);
  background: rgba(192, 132, 252, 0.08);
  text-shadow: 0 0 8px rgba(192, 132, 252, 0.35);
}

.tx-link { font-size: 11px; white-space: nowrap; }

/* mint links -> pump.fun coin page. deliberately quiet: the ticker keeps its
   own color, a dotted rule is the only hint until hover. */
/* single-class specificity so the ticker's own color still wins over `a` */
.mint-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted rgba(160, 170, 184, 0.4);
}
.mint-link:hover {
  color: #e5e9ee;
  text-decoration: none;
  border-bottom-style: solid;
  border-bottom-color: rgba(245, 158, 11, 0.75);
}
.mint-link:focus-visible { outline: 1px solid var(--fg-dim); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.chip-ev {
  font-size: 10px;
  color: #99a3b1;
  border: 1px solid #232830;
  background: var(--bg-cell);
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- conviction board ---------- */

.cand { padding: 10px 12px; border-bottom: 1px solid var(--border-soft); }
.cand:last-child { border-bottom: none; }

.cand-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cand-ticker { color: #d5dce4; font-size: 13px; }
.cand-status {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.status-watching { color: var(--read); }
.status-stalking { color: var(--stalk); text-shadow: 0 0 8px rgba(250, 204, 21, 0.3); }
.status-entered { color: var(--enter); text-shadow: 0 0 8px rgba(74, 222, 128, 0.3); }
.status-refused { color: var(--refuse); text-shadow: 0 0 8px rgba(248, 113, 113, 0.3); }

.cand-dots { margin-left: auto; font-size: 12px; letter-spacing: 3px; white-space: nowrap; }
.dots-on { color: var(--stalk); text-shadow: 0 0 7px rgba(250, 204, 21, 0.45); }
.dots-off { color: #2a2f37; }
.cand-dots .none { color: var(--fg-faint); letter-spacing: 0; }

.cand-lines { margin-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.kv { display: flex; gap: 8px; font-size: 11.5px; min-width: 0; }
.kv-label {
  flex: none;
  width: 86px;
  color: var(--fg-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 10px;
  padding-top: 1px;
}
.kv-value { color: var(--fg-mid); overflow-wrap: anywhere; }

/* ---------- decision log ---------- */

.log-panel { display: flex; flex-direction: column; }
.log-head { padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap; }

.log-title { display: inline-flex; align-items: baseline; gap: 10px; min-width: 0; }

/* liveness: counts of the rows loaded in this client, nothing more */
.log-count {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--fg-faint);
  white-space: nowrap;
}
.log-count.bump { animation: count-bump 0.7s ease-out; }
@keyframes count-bump {
  from { color: #d5dce4; }
  to { color: var(--fg-faint); }
}

.tabs { display: flex; gap: 4px; }
.tab {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--fg-dim);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 3px 8px;
  cursor: pointer;
}
.tab:hover { color: var(--fg-mid); }
.tab.active {
  color: #d5dce4;
  border-color: var(--border);
  background: var(--bg-raised);
}

.log-scroll { overflow-y: auto; max-height: min(74vh, 780px); }

.row { padding: 9px 12px; border-bottom: 1px solid var(--border-soft); }
.row:hover { background: rgba(255, 255, 255, 0.015); }

.row-refuse {
  border-left: 2px solid var(--refuse);
  background: rgba(248, 113, 113, 0.04);
  padding-left: 10px;
}
.row-refuse:hover { background: rgba(248, 113, 113, 0.07); }

.row-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.row-right { margin-left: auto; display: inline-flex; align-items: baseline; gap: 8px; }

.verb-chip {
  display: inline-block;
  min-width: 54px;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--fg-mid);
  flex: none;
}
.verb-ENTER .verb-chip  { color: var(--enter);  border-color: rgba(74, 222, 128, 0.4);  background: rgba(74, 222, 128, 0.06);  text-shadow: 0 0 8px rgba(74, 222, 128, 0.35); }
.verb-EXIT .verb-chip   { color: var(--exit);   border-color: rgba(96, 165, 250, 0.4);  background: rgba(96, 165, 250, 0.06);  text-shadow: 0 0 8px rgba(96, 165, 250, 0.35); }
.verb-REFUSE .verb-chip { color: var(--refuse); border-color: rgba(248, 113, 113, 0.45); background: rgba(248, 113, 113, 0.07); text-shadow: 0 0 8px rgba(248, 113, 113, 0.4); }
.verb-STALK .verb-chip  { color: var(--stalk);  border-color: rgba(250, 204, 21, 0.4);  background: rgba(250, 204, 21, 0.06);  text-shadow: 0 0 8px rgba(250, 204, 21, 0.35); }
.verb-READ .verb-chip   { color: var(--read);   border-color: rgba(156, 163, 175, 0.35); background: rgba(156, 163, 175, 0.05); }
.verb-NOTE .verb-chip   { color: var(--note);   border-color: rgba(107, 114, 128, 0.35); background: rgba(107, 114, 128, 0.05); }

.row-ts { font-size: 11px; color: var(--fg-dim); flex: none; }
.row-ticker { color: #d5dce4; }

.thesis {
  margin-top: 4px;
  font-style: italic;
  color: #a7b0bc;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.row-refuse .thesis { color: #c4a7a7; }

/* ---------- actuator view (stream stage until P1 device video) ---------- */

.stream-frame.has-actuator {
  aspect-ratio: auto;
  max-height: none;
  display: block;
  padding: 12px 12px 16px;
}

.actuator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.act-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px 12px;
  flex-wrap: wrap;
}
.act-badge {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.06);
  border-radius: 3px;
  padding: 2px 8px;
  /* wraps rather than forcing the stage wider than the panel on narrow screens */
  max-width: 100%;
}
.act-note {
  font-size: 10px;
  color: var(--fg-faint);
  letter-spacing: 0.08em;
  padding-top: 3px;
  white-space: nowrap;
}

/* -- cloud device panel (real phone screen snapshots) -- */

.act-row {
  display: flex;
  gap: 26px;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  /* without this the row takes its max-content width (both phones side by side)
     and spills out of the panel instead of wrapping */
  max-width: 100%;
}

.device-panel {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.device-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--fg-dim);
  text-transform: uppercase;
}
.device-shot {
  width: 272px;
  height: 600px;
  object-fit: cover;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: #000;
  box-shadow:
    0 0 44px rgba(96, 165, 250, 0.05),
    0 12px 40px rgba(0, 0, 0, 0.5);
}
.device-note { font-size: 10px; color: var(--fg-faint); letter-spacing: 0.08em; }

@media (max-width: 700px) {
  .device-shot { width: 216px; height: 480px; border-radius: 22px; }
}

/* -- phone -- */

.phone {
  flex: none;
  width: 290px;
  height: 600px;
  border-radius: 36px;
  border: 1px solid var(--border);
  background: #14171c;
  padding: 10px;
  box-shadow:
    0 0 44px rgba(74, 222, 128, 0.06),
    0 12px 40px rgba(0, 0, 0, 0.5);
}
.phone-screen {
  height: 100%;
  border-radius: 27px;
  background: #101216;
  border: 1px solid var(--border-soft);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 0 34px rgba(74, 222, 128, 0.04);
}

.phone-status {
  flex: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px 7px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
  border-bottom: 1px solid var(--border-soft);
}
.act-mode { color: var(--amber); }

.phone-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* -- idle -- */

.act-idle {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 0 14px;
}
.act-idle-logo {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
  opacity: 0.35;
  filter: drop-shadow(0 0 10px rgba(74, 222, 128, 0.2));
}
.act-idle-line { font-size: 11px; color: var(--fg-dim); letter-spacing: 0.1em; }
.act-idle-cands { font-size: 10px; color: var(--fg-faint); letter-spacing: 0.08em; }

/* -- scenes -- */

.act-scene {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 12px 16px;
}

.act-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-raised);
  padding: 14px 12px;
  animation: act-slide 0.35s ease-out;
}
@keyframes act-slide {
  from { transform: translateX(46px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.act-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.act-card-ticker {
  font-size: 21px;
  color: #e5e9ee;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.act-card-verb {
  flex: none;
  font-size: 9px;
  letter-spacing: 0.14em;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--fg-mid);
}
.act-verb-ENTER  { color: var(--enter);  border-color: rgba(74, 222, 128, 0.4);   background: rgba(74, 222, 128, 0.06); }
.act-verb-EXIT   { color: var(--exit);   border-color: rgba(96, 165, 250, 0.4);   background: rgba(96, 165, 250, 0.06); }
.act-verb-REFUSE { color: var(--refuse); border-color: rgba(248, 113, 113, 0.45); background: rgba(248, 113, 113, 0.07); }

.act-card-refused { border-color: rgba(248, 113, 113, 0.45); }
.act-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-7deg);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.26em;
  padding: 3px 10px 3px 14px;
  color: var(--refuse);
  border: 2px solid rgba(248, 113, 113, 0.85);
  border-radius: 4px;
  background: rgba(13, 15, 19, 0.72);
  text-shadow: 0 0 12px rgba(248, 113, 113, 0.45);
  animation: act-stamp 0.28s ease-out;
}
@keyframes act-stamp {
  from { transform: translate(-50%, -50%) rotate(-7deg) scale(1.7); opacity: 0; }
  to { transform: translate(-50%, -50%) rotate(-7deg) scale(1); opacity: 1; }
}

.act-damn {
  margin-top: 12px;
  border-left: 2px solid var(--refuse);
  background: rgba(248, 113, 113, 0.05);
  color: #c4a7a7;
  font-size: 11px;
  padding: 6px 8px;
  overflow-wrap: anywhere;
  animation: act-fade 0.3s ease-out;
}
@keyframes act-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* -- action button + tap -- */

.act-btn {
  position: relative;
  overflow: hidden;
  margin-top: auto;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 10px;
  border-radius: 9px;
  border: 1px solid;
  user-select: none;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: transform 0.12s ease, background 0.12s ease;
  animation: act-fade 0.3s ease-out 0.3s backwards;
}
.act-btn-buy {
  color: var(--enter);
  border-color: rgba(74, 222, 128, 0.5);
  background: rgba(74, 222, 128, 0.08);
  text-shadow: 0 0 10px rgba(74, 222, 128, 0.35);
}
.act-btn-sell {
  color: var(--exit);
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(96, 165, 250, 0.08);
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.35);
}
.act-btn.act-pressed { transform: scale(0.97); }
.act-btn-buy.act-pressed { background: rgba(74, 222, 128, 0.2); }
.act-btn-sell.act-pressed { background: rgba(96, 165, 250, 0.2); }

.act-tap {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.4);
  pointer-events: none;
  animation: act-ripple 0.55s ease-out forwards;
}
@keyframes act-ripple {
  from { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.28); opacity: 1; }
  to { box-shadow: 0 0 0 40px rgba(255, 255, 255, 0); opacity: 0; }
}

/* -- fill status + stalk toast -- */

.act-fill {
  margin-top: auto;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #d5dce4;
  animation: act-fade 0.25s ease-out;
}
.act-fill-pending { color: var(--fg-dim); }
.act-fill + .act-btn { margin-top: 10px; }

.act-toast {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  max-width: calc(100% - 28px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--stalk);
  border: 1px solid rgba(250, 204, 21, 0.4);
  background: rgba(16, 18, 22, 0.92);
  border-radius: 999px;
  padding: 4px 12px;
  animation: act-fade 0.2s ease-out;
}

/* -- callout bar (the voice) -- */

.act-callout {
  width: min(460px, 100%);
  display: flex;
  align-items: baseline;
  gap: 10px;
  border: 1px solid var(--border);
  border-left-width: 2px;
  border-radius: 3px;
  background: var(--bg-cell);
  padding: 8px 12px;
  min-height: 36px;
}
.callout-ENTER  { border-left-color: var(--enter); }
.callout-EXIT   { border-left-color: var(--exit); }
.callout-REFUSE { border-left-color: var(--refuse); }
.callout-STALK  { border-left-color: var(--stalk); }
.act-callout-prefix {
  flex: none;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-faint);
}
.act-callout-line { font-size: 12px; color: #a7b0bc; overflow-wrap: anywhere; }
.act-callout-line.dim { color: var(--fg-faint); }

@media (max-width: 700px) {
  .phone { width: 230px; height: 480px; border-radius: 30px; padding: 8px; }
  .phone-screen { border-radius: 23px; }
  .act-card-ticker { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .act-card, .act-stamp, .act-damn, .act-btn, .act-tap, .act-fill, .act-toast {
    animation: none;
  }
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: var(--fg-dim);
  flex-wrap: wrap;
}
.wallet { color: var(--fg-mid); overflow-wrap: anywhere; user-select: all; }
.foot-note { letter-spacing: 0.04em; }
.tick { color: var(--fg-faint); white-space: nowrap; }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .cols { grid-template-columns: 1fr; }
  /* 8 stats divide evenly into 4 and 2 columns, so no filler cell is needed */
  .equity { grid-template-columns: repeat(4, 1fr); }
  .log-scroll { max-height: 60vh; }
}

@media (max-width: 640px) {
  .equity { grid-template-columns: repeat(2, 1fr); }
  .topbar { flex-wrap: wrap; }
  .tag { display: none; }
  .footer { flex-direction: column; align-items: flex-start; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor, .dot-green, .dot-red, .stream-glyph, .log-count.bump { animation: none; }
}
