/* STEP 8 — black iOS look, Robinhood/Phantom level */
:root {
  --bg: #000000;
  --elevated: #111113;
  --card: #161618;
  --line: #232327;
  --text: #ffffff;
  --muted: #8e8e93;
  --green: #00d35a;
  --green-dim: rgba(0, 211, 90, 0.18);
  --red: #ff453a;
  --orange: #ff9f0a;
  --cyan: #64d2ff;
  --blue: #0a84ff;
  --gutter: 16px;
  --tab-h: 68px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --radius-card: 20px;
  --font: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--text);
  font-family: var(--font);
  min-height: 100%;
  min-height: 100dvh;
  overscroll-behavior: none;
  overflow-x: hidden;
}
body {
  padding-top: var(--safe-top);
  /* room for tab bar + Safari bottom chrome */
  padding-bottom: calc(var(--tab-h) + var(--safe-bottom) + 12px);
  font-size: 16px;
  line-height: 1.35;
  font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }

#app { min-height: 100%; }
.view { display: none; padding: 0 0 24px; }
.view.active { display: block; }
.view.overlay.active { display: block; position: relative; z-index: 20; background: var(--bg); min-height: 100dvh; }

/* NAV */
.nav {
  display: flex; align-items: center; gap: 10px;
  padding: 8px var(--gutter) 4px;
  position: sticky; top: 0; z-index: 5;
  background: rgba(0,0,0,.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.avatar {
  width: 36px; height: 36px; min-width: 44px; min-height: 44px;
  border-radius: 50%; background: linear-gradient(135deg, #2a2a2e, #111);
  border: 1px solid var(--line); font-size: 12px; font-weight: 700;
  display: grid; place-items: center;
}
.nav-title {
  flex: 1; text-align: left; font-size: 17px; font-weight: 650;
  min-height: 44px;
}
.nav-title .chev { color: var(--muted); font-weight: 400; }
.nav-actions { display: flex; gap: 2px; }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  color: var(--text); position: relative;
}
.icon-btn .dot {
  position: absolute; top: 10px; right: 10px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); border: 2px solid var(--bg);
}

.page-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px var(--gutter) 8px;
  position: sticky; top: 0; z-index: 5;
  background: rgba(0,0,0,.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.page-head h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.back { width: 44px; height: 44px; font-size: 28px; line-height: 1; color: var(--blue); }

/* HERO / ODOMETER */
.home-hero { padding: 8px var(--gutter) 4px; }
.mode-row { margin-bottom: 6px; }
.badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
}
.badge.paper { color: #9ecbff; border-color: #27405f; background: rgba(41,98,255,.12); }
.badge.live { color: var(--green); border-color: #1f4d38; background: var(--green-dim); }

.odometer {
  font-size: 66px;
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  line-height: 1.05;
  white-space: nowrap;
}
.odometer .odo-cur {
  display: inline-block;
  margin-right: 0.18em;
  font-variant-numeric: normal;
  font-feature-settings: normal;
  letter-spacing: 0;
}
.odometer .odo-amt {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0;
}
.odometer .digit {
  display: inline-block; overflow: hidden; height: 1em; vertical-align: bottom;
  width: 0.58em; text-align: center;
}
.odometer .digit span {
  display: block; transition: transform 600ms cubic-bezier(.2,.8,.2,1);
}
.odometer .digit i {
  font-style: normal; display: block; height: 1em;
  font-variant-numeric: tabular-nums;
}
.odometer .sep {
  display: inline-block; vertical-align: bottom;
  width: auto; min-width: 0.28em; text-align: center;
  padding: 0 1px;
}
.odometer .sep.dollar { min-width: 0.55em; margin-right: 2px; padding: 0; }
.odometer .sep.comma { min-width: 0.28em; }
.odometer .sep.dot { min-width: 0.28em; }

.hero-meta {
  display: flex; align-items: center; gap: 10px;
  margin-top: 6px; font-variant-numeric: tabular-nums;
}
.today { font-size: 15px; font-weight: 600; color: var(--muted); }
.today.up { color: var(--green); }
.today.down { color: var(--red); }
.mult-pill {
  font-size: 13px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  background: var(--green-dim); color: var(--green);
}

/* CHART */
.chart-card {
  margin: 12px var(--gutter) 8px;
  background: var(--card);
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  padding: 10px 8px 8px;
  box-sizing: border-box;
  max-width: calc(100% - 2 * var(--gutter));
  overflow: hidden;
}
canvas.chart { width: 100%; height: 200px; display: block; }
.coin-chart-card {
  display: block;
  margin: 0 var(--gutter) 8px;
  width: auto;
  box-sizing: border-box;
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--line);
  overflow: hidden;
}
.coin-chart {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: 220px;
  margin: 0 !important;
  box-sizing: border-box;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.ranges {
  display: flex; gap: 4px; justify-content: space-between;
  padding: 6px 4px 2px;
}
.ranges button {
  flex: 1; min-height: 40px; min-width: 44px;
  border-radius: 10px; color: var(--muted);
  font-size: 15px; font-weight: 650;
}
.ranges button.active { background: #2a2a2e; color: var(--text); }

/* CAROUSEL — width viewport-32, start-snap so next card peeks ~16px */
.carousel {
  display: flex; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 12px 0 8px 16px;
  scroll-padding-left: 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.agent-card {
  flex: 0 0 calc(100vw - 32px);
  width: calc(100vw - 32px);
  aspect-ratio: 504 / 470;
  border-radius: calc(42 * (100vw - 32px) / 504);
  background: linear-gradient(160deg, #1c1c1e 0%, #0d0d0f 100%);
  border: 1px solid var(--line);
  padding: 20px 20px 18px;
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  box-sizing: border-box;
}
.agent-card::after {
  content: ""; position: absolute; inset: auto -20% -40% -20%; height: 60%;
  background: radial-gradient(ellipse at center, rgba(0,211,90,.12), transparent 70%);
  pointer-events: none;
}
.agent-card .agent-name {
  font-size: 13px; color: var(--muted); font-weight: 650;
  letter-spacing: .08em; text-transform: uppercase;
}
.agent-card .agent-status {
  font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.agent-card .agent-status.cyan { color: var(--cyan); }
.agent-card .agent-sub { color: var(--muted); font-size: 15px; margin-top: 4px; line-height: 1.35; }
.agent-card .agent-foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 12px; }

.kill-feed {
  list-style: none; margin: 12px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
  overflow: hidden; flex: 1;
}
.kill-feed .kill {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 14px; color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(142,142,147,.7);
  opacity: 0.85;
}
.kill-feed .kill .kill-name {
  font-variant-numeric: tabular-nums; font-weight: 600; color: #a1a1a6;
  flex: 0 0 auto;
}
.kill-feed .kill .kill-reason { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kill-feed .kill.muted { text-decoration: none; opacity: 0.6; }

.layer-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px;
  margin-top: 14px; flex: 1;
}
.layer-chip {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 10px; font-size: 12px;
}
.layer-chip .ln {
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  background: #222; color: var(--cyan); font-size: 11px; font-weight: 700;
}
.layer-chip .lb { color: var(--text); font-weight: 600; font-size: 12px; line-height: 1.2; }

.score-ring { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; gap: 8px; margin-top: 8px; }

.trade-bars {
  display: flex; align-items: flex-end; gap: 6px;
  height: 88px; margin-top: auto; padding-top: 16px;
}
.trade-bars .bar {
  flex: 1; border-radius: 6px 6px 2px 2px;
  background: #2a2a2e; min-height: 8px;
}
.trade-bars .bar.on { background: linear-gradient(180deg, #64d2ff, #0a84ff); }

.mono-pill {
  font-family: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;
  font-size: 13px; font-weight: 600;
  padding: 6px 10px; border-radius: 8px;
  background: #222226;
}
.mono-pill.red { color: var(--red); }
.mono-pill.green { color: var(--green); }

.tag {
  font-size: 12px; padding: 5px 9px; border-radius: 8px;
  background: #222226; color: var(--muted); font-weight: 600;
}
.tag.red { color: var(--red); }
.tag.green { color: var(--green); }
.tag.cyan { color: var(--cyan); }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 16px var(--gutter) 4px;
}
.section-head h2 { margin: 0; font-size: 20px; font-weight: 700; }
.linkish { color: var(--blue); font-size: 14px; font-weight: 600; min-height: 44px; padding: 0 4px; }

/* ACTIVITY */
.activity { list-style: none; margin: 0; padding: 0 var(--gutter); }
.activity li {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  min-height: 44px;
}
.activity .title { font-size: 16px; font-weight: 650; }
.activity .sub { font-size: 14px; color: var(--muted); }
.activity .val { font-size: 15px; font-variant-numeric: tabular-nums; font-weight: 600; align-self: center; }
.activity .val.up { color: var(--green); }
.activity .val.down { color: var(--red); }

.empty, .error-state {
  text-align: center; color: var(--muted);
  padding: 48px var(--gutter);
}
.error-title { color: var(--text); font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.error-sub { font-size: 14px; margin-bottom: 20px; }

/* AGENTS TAB — full-width pipeline cards */
.agents-list {
  padding: 0 var(--gutter) 24px;
  display: flex; flex-direction: column; gap: 14px;
}
.agent-panel {
  --agent: #64d2ff;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 16px 12px;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
}
.agent-panel .ap-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.agent-panel .ap-title {
  display: flex; align-items: center; gap: 8px;
  min-width: 0; flex: 1;
}
.agent-panel .ap-accent {
  width: 4px; height: 22px; border-radius: 2px;
  background: var(--agent); flex: 0 0 auto;
}
.agent-panel .ap-name {
  margin: 0; font-size: 20px; font-weight: 700;
  letter-spacing: -0.02em; text-align: left;
  color: var(--text);
}
.agent-panel .status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--muted); flex: 0 0 auto;
}
.agent-panel .status-dot.on { background: var(--green); box-shadow: 0 0 8px rgba(0,211,90,.45); }
.agent-panel .status-dot.off { background: var(--orange); }
.agent-panel .ap-status {
  font-size: 14px; color: var(--muted); font-weight: 600;
}
.agent-panel .ap-switch-wrap { flex: 0 0 auto; }
.agent-panel .ap-switch {
  display: inline-block; width: 46px; height: 28px; border-radius: 999px;
  background: #3a3a3e; position: relative;
  opacity: 0.85;
}
.agent-panel .ap-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #ddd;
  transition: transform 160ms ease;
}
.agent-panel .ap-switch.on { background: color-mix(in srgb, var(--agent) 55%, #1a1a1c); }
.agent-panel .ap-switch.on::after { transform: translateX(18px); background: #fff; }
.agent-panel .ap-switch.locked {
  opacity: 0.45; filter: grayscale(0.4);
}
.agent-panel .ap-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; gap: 12px;
}
.agent-panel .ap-count .n {
  font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--agent);
}
.agent-panel .ap-count .lbl { font-size: 14px; color: var(--muted); font-weight: 600; }
.agent-panel .ap-settings {
  color: var(--blue); font-size: 15px; font-weight: 650;
  min-height: 44px; padding: 0 6px;
}
.agent-panel .ap-note {
  margin: 8px 0 0; font-size: 13px; color: var(--muted); line-height: 1.35;
  text-align: left;
}
.agent-panel .ap-pills {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px;
}
.agent-panel .ap-dec-h {
  margin: 14px 0 6px; font-size: 13px; font-weight: 650;
  color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
  text-align: left;
}
.dec-list {
  list-style: none; margin: 0; padding: 0;
  max-height: 220px; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.dec-row {
  display: grid;
  grid-template-columns: 64px minmax(56px, 0.9fr) 64px 1.2fr;
  gap: 6px 8px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  text-align: left;
}
.dec-row:last-child { border-bottom: 0; }
.dec-time { color: var(--muted); font-variant-numeric: tabular-nums; font-family: "SF Mono", ui-monospace, Menlo, monospace; font-size: 12px; }
.dec-coin { color: var(--text); font-weight: 650; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.dec-coin { color: var(--blue); }
.dec-verdict { font-weight: 650; color: var(--muted); text-transform: lowercase; }
.dec-row[data-verdict="reject"] .dec-verdict,
.dec-row[data-verdict="rejected"] .dec-verdict,
.dec-row[data-verdict="stopped"] .dec-verdict { color: var(--red); }
.dec-row[data-verdict="pass"] .dec-verdict,
.dec-row[data-verdict="cleared"] .dec-verdict,
.dec-row[data-verdict="sold"] .dec-verdict { color: var(--green); }
.dec-reason { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.dec-empty { color: var(--muted); font-size: 14px; padding: 12px 0 8px; text-align: left; }

/* ACCOUNT */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px; margin: 0 var(--gutter) 12px;
}
.account-card .value { font-size: 18px; font-weight: 700; }
.label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.value { font-size: 15px; font-variant-numeric: tabular-nums; }
.value.muted { color: var(--muted); font-weight: 500; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.settings-group { margin: 0 var(--gutter) 16px; }
.settings-group h3 {
  margin: 0 0 8px; font-size: 13px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; font-weight: 650;
}
.settings-group .card { margin: 0; }
.settings-group .kv {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums; min-height: 44px; align-items: center;
}
.settings-group .kv:last-child { border-bottom: 0; }
.settings-group .k { color: var(--muted); font-size: 13px; }
.settings-group .v { font-size: 14px; font-weight: 600; text-align: right; }
.pill { font-size: 12px; padding: 4px 8px; border-radius: 999px; background: #222; color: var(--muted); }
.pill.ok { color: var(--green); background: var(--green-dim); }
.footnote { color: var(--muted); font-size: 12px; padding: 8px var(--gutter) 24px; line-height: 1.4; }

/* AUDITOR discs */
.auditor-stack {
  display: flex; flex-direction: column; gap: 10px;
  padding: 8px var(--gutter) 24px;
}
.disc {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 12px 14px; min-height: 56px;
  position: relative; overflow: hidden;
  opacity: 0.35; transform: translateY(6px);
  transition: opacity 350ms ease, transform 350ms ease, border-color 350ms ease;
}
.disc.on { opacity: 1; transform: none; }
.disc.pass { border-color: rgba(0,211,90,.35); }
.disc.fail { border-color: rgba(255,69,58,.45); }
.disc.grey { border-color: var(--line); }
.disc .n {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: #222; color: var(--muted);
}
.disc.pass .n { background: var(--green-dim); color: var(--green); }
.disc.fail .n { background: rgba(255,69,58,.15); color: var(--red); }
.disc .name { font-size: 15px; font-weight: 650; }
.disc .val { font-size: 13px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.disc .beam {
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--cyan); box-shadow: 0 0 12px var(--cyan);
  opacity: 0; transition: opacity 350ms ease;
}
.disc.on .beam { opacity: 1; }

.stats { padding: 12px var(--gutter); display: grid; gap: 8px; }
.stats .kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.fomo-btn {
  display: block; margin: 16px var(--gutter);
  text-align: center; text-decoration: none;
  background: var(--green); color: #003b1a;
  font-weight: 750; font-size: 16px;
  padding: 14px 16px; border-radius: 14px;
  min-height: 48px;
}

/* TAB BAR — blurred, 4 tabs, Safari-safe */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(4, 1fr);
  min-height: var(--tab-h);
  height: auto;
  padding: 6px 0 calc(6px + var(--safe-bottom));
  /* content-box so safe-area padding adds BELOW icons instead of clipping them */
  box-sizing: content-box;
  background: rgba(10,10,12,.72);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-top: 1px solid rgba(255,255,255,.08);
}
.tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--muted); font-size: 12px; font-weight: 650;
  min-height: 48px;
  padding-bottom: 2px;
}
.tabbar button.active { color: var(--text); }
.tabbar svg { display: block; width: 30px; height: 30px; }

/* LOADING PULSE */
.loading-pulse {
  position: fixed; inset: 0; z-index: 40;
  background: var(--bg); display: flex; flex-direction: column;
  justify-content: center; gap: 14px; padding: 0 32px;
  pointer-events: none; opacity: 0; transition: opacity 200ms ease;
}
#app[data-state="loading"] .loading-pulse { opacity: 1; }
.pulse-bar {
  height: 14px; border-radius: 8px;
  background: linear-gradient(90deg, #1a1a1c, #2a2a2e, #1a1a1c);
  background-size: 200% 100%;
  animation: pulse 1.2s ease-in-out infinite;
}
.pulse-bar.short { width: 60%; }
@keyframes pulse {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

#errorState, #noPathState {
  position: fixed; inset: 0; z-index: 45;
  background: var(--bg); display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
#errorState[hidden], #noPathState[hidden], .error-state[hidden] {
  display: none !important;
}
#app[data-state="ready"] #noPathState,
#app[data-state="ready"] #errorState,
#app[data-state="ready"] #loadingPulse {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .odometer .digit span { transition: none !important; }
  .disc { transition: none !important; }
  .pulse-bar { animation: none; }
}

/* Hide Netlify badge if injected anyway */
iframe[src*="netlify"], a[href*="netlify.com"][title*="Deploys"],
#netlify-badge, .netlify-badge, [data-netlify-badge] {
  display: none !important; visibility: hidden !important;
}

/* AUDITOR toggle / empty */
.auditor-toggle {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 4px var(--gutter) 12px;
}
.auditor-toggle button {
  min-height: 44px; border-radius: 12px;
  background: #161618; border: 1px solid var(--line);
  color: var(--muted); font-size: 15px; font-weight: 650;
}
.auditor-toggle button.active {
  color: var(--text); border-color: #3a3a3e; background: #1c1c1e;
}
.auditor-toggle button span { color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 4px; }
.auditor-empty {
  text-align: center; color: var(--muted);
  font-size: 17px; font-weight: 600;
  padding: 64px var(--gutter);
}
.disc .name { font-size: 15px; font-weight: 650; }
.disc .val { font-size: 13px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }

/* $10 challenge */
.challenge-bar {
  margin: 10px 16px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,159,10,.12);
  border: 1px solid rgba(255,159,10,.28);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.challenge-label { font-size: 12px; font-weight: 600; color: #ff9f0a; letter-spacing: .02em; }
.challenge-track {
  height: 6px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden;
}
.challenge-fill {
  height: 100%; width: 0%; border-radius: inherit;
  background: linear-gradient(90deg, #ff9f0a, #00d35a);
  transition: width .4s ease;
}
.challenge-val { font-size: 12px; color: var(--muted, #8e8e93); }
.agent-devwatch .ap-accent { background: #ff9f0a; }
.acct-sizing {
  margin: 8px 0 14px; padding: 10px 12px; border-radius: 12px;
  background: rgba(0,211,90,.08); border: 1px solid rgba(0,211,90,.22);
  font-size: 13px;
}
.acct-sizing .mode-tag { font-weight: 700; color: #00d35a; }
.mono-pill.orange { color: #ff9f0a; border-color: rgba(255,159,10,.35); background: rgba(255,159,10,.12); }

/* ---- Trading Desk redesign ---- */
.desk-nav { align-items: flex-start; }
.desk-titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.desk-sub { font-size: 12px; color: var(--muted, #8e8e93); font-weight: 500; letter-spacing: 0.01em; }
.badge.paper { background: rgba(255,159,10,.18); color: #ff9f0a; border: 1px solid rgba(255,159,10,.35); }
.badge.live { background: rgba(0,211,90,.18); color: #00d35a; border: 1px solid rgba(0,211,90,.4); }
.glow-card {
  box-shadow: 0 0 24px rgba(0,211,90,.12), inset 0 0 0 1px rgba(0,211,90,.08);
}
.home-hero .odometer { font-size: 42px; letter-spacing: -0.02em; }
.mult-pill {
  background: rgba(0,211,90,.14); color: #00d35a; border: 1px solid rgba(0,211,90,.3);
  padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 13px;
}
.stop-all-btn {
  display: block; width: calc(100% - 32px); margin: 10px 16px 8px; box-sizing: border-box;
  padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(255,69,58,.45);
  background: rgba(255,69,58,.14); color: #ff453a; font-weight: 700; font-size: 16px;
}
.stop-all-btn:active { transform: scale(0.98); }

.dev-cluster-bar {
  margin: 0 16px 10px; padding: 8px 12px; border-radius: 10px;
  background: rgba(255,214,10,.14); border: 1px solid rgba(255,214,10,.35);
  color: #ffd60a; font-size: 12px; font-weight: 600;
}

.modal {
  position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.72);
  display: flex; align-items: flex-end; justify-content: center; padding: 16px;
}
.modal[hidden] { display: none !important; }
.modal-card {
  width: 100%; max-width: 420px; background: #1c1c1e; border-radius: 18px;
  padding: 18px 16px 20px; border: 1px solid rgba(255,255,255,.08);
}
.modal-card h2 { margin: 0 0 8px; font-size: 18px; }
.modal-card .muted { color: #8e8e93; font-size: 13px; margin: 0 0 14px; }
.token-label { display: block; font-size: 12px; color: #8e8e93; margin-bottom: 6px; }
.token-input {
  width: 100%; box-sizing: border-box; padding: 12px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12); background: #000; color: #fff; font-size: 15px;
}
.modal-actions { display: flex; gap: 10px; margin-top: 14px; }
.btn-ghost, .btn-danger {
  flex: 1; padding: 12px; border-radius: 12px; font-weight: 700; border: none; font-size: 15px;
}
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; }
.btn-danger { background: #ff453a; color: #fff; }
.tg-fallback { display: block; text-align: center; margin-top: 14px; color: #64d2ff; font-size: 13px; }

.recap-body { padding: 0 16px 16px; }
.recap-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px;
}
.recap-card {
  background: #1c1c1e; border-radius: 14px; padding: 12px;
  border: 1px solid rgba(255,255,255,.06);
}
.recap-card .k { font-size: 11px; color: #8e8e93; }
.recap-card .v { font-size: 18px; font-weight: 700; margin-top: 4px; }
.recap-card .v.up { color: #00d35a; }
.recap-card .v.down { color: #ff453a; }

.agent-compounder .ap-accent, .agent-card.agent-compounder { --agent: #00d35a; }
.agent-xscout .ap-accent { --agent: #1d9bf0; }


/* Review fixes: title+pill row, coin overflow, stop placement */
.desk-nav { align-items: center; }
.desk-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.desk-title-row {
  display: flex; align-items: center; gap: 8px; min-width: 0;
}
.desk-title-row .nav-title {
  flex: 0 1 auto; min-height: 0; padding: 0; font-size: 17px; font-weight: 650;
}
.desk-title-row .mode-pill,
.desk-title-row .badge {
  flex: 0 0 auto;
  font-size: 10px; font-weight: 700; letter-spacing: 0.05em;
  padding: 2px 8px; border-radius: 999px; line-height: 1.2;
}
.stop-all-btn {
  margin: 10px 16px 8px;
}
.view.overlay.active {
  padding-bottom: calc(var(--tab-h) + var(--safe-bottom) + 24px);
  overflow-x: hidden;
  max-width: 100vw;
  box-sizing: border-box;
}
#view-coin .stats, #view-coin .fomo-btn, #view-coin .dev-cluster-bar {
  max-width: 100%;
  box-sizing: border-box;
}
