* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #000;
  color: #e2e8f0;
  min-height: 100vh;
  font-size: 13px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ── layout ── */
.page { display: flex; flex-direction: column; height: 100vh; }

.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 1.2rem;
  border-bottom: 1px solid #1e293b;
  background: #000;
  flex-shrink: 0;
}
.header-left { display: flex; align-items: center; gap: 1rem; }
.logo { font-size: 0.85rem; font-weight: 700; color: #fff; font-family: monospace; letter-spacing: 0.1em; }
.mode-pill {
  font-family: monospace; font-size: 0.62rem; padding: 2px 8px; border-radius: 20px;
  background: #0c1a3a; border: 1px solid #1d4ed8; color: #60a5fa;
}
.stat { display: flex; gap: 0.3rem; align-items: baseline; }
.stat-label { font-size: 0.62rem; color: #475569; font-family: monospace; text-transform: uppercase; }
.stat-val { font-size: 0.85rem; font-weight: 600; font-family: monospace; }
.stat-val.green { color: #4ade80; }
.stat-val.red { color: #f87171; }
.stat-val.dim { color: #94a3b8; }
.header-right { display: flex; align-items: center; gap: 0.6rem; }
.show-mobile-only { display: none; }

/* ── navbar ── */
.nav {
  display: flex;
  padding: 0 1.2rem;
  border-bottom: 1px solid #1e293b;
  background: #000;
  flex-shrink: 0;
}
.nav-tab {
  font-family: monospace; font-size: 0.62rem; padding: 0.45rem 1rem;
  color: #475569; background: none; border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer; letter-spacing: 0.1em; text-transform: uppercase;
  transition: color 0.1s;
}
.nav-tab:hover { color: #94a3b8; }
.nav-tab.active { color: #e2e8f0; border-bottom-color: #3b82f6; }
.deploy-tab {
  margin-left: auto;
  color: #22c55e;
  text-decoration: none;
  border: 1px solid #166534;
  border-radius: 4px;
  align-self: center;
  padding: 0.28rem 0.75rem;
  background: #03160c;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.12);
}
.deploy-tab:hover { color: #4ade80; border-color: #22c55e; background: #052e16; }
.mobile-auth-btn {
  font-family: monospace;
  font-size: 0.6rem;
  padding: 3px 8px;
  background: #020817;
  border: 1px solid #1d4ed8;
  color: #60a5fa;
  border-radius: 4px;
  text-decoration: none;
}

/* ── markets page ── */
#page-dashboard { display: none; flex: 1; overflow: hidden; }

.panel-left { width: 58%; border-right: 1px solid #1e293b; display: flex; flex-direction: column; overflow: hidden; }
.panel-right { width: 42%; display: flex; flex-direction: column; overflow: hidden; }

.panel-top { flex: 0 0 55%; border-bottom: 1px solid #1e293b; overflow: hidden; display: flex; flex-direction: column; }
.panel-bottom { flex: 1; overflow: hidden; display: flex; flex-direction: column; }

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid #1e293b;
  flex-shrink: 0;
}
.section-title { font-size: 0.6rem; color: #475569; font-family: monospace; letter-spacing: 0.1em; text-transform: uppercase; }
.section-count { font-size: 0.6rem; color: #334155; font-family: monospace; }

.scroll { overflow-y: auto; flex: 1; }
.scroll::-webkit-scrollbar { width: 4px; }
.scroll::-webkit-scrollbar-track { background: #000; }
.scroll::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 2px; }

/* ── tables ── */
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; padding: 0.25rem 0.6rem;
  font-size: 0.58rem; color: #334155; font-family: monospace;
  text-transform: uppercase; letter-spacing: 0.08em;
  position: sticky; top: 0; background: #000; z-index: 1;
  border-bottom: 1px solid #0f172a;
}
th.r { text-align: right; }
td { padding: 0.22rem 0.6rem; font-family: monospace; font-size: 0.72rem; border-bottom: 1px solid #0a0f1e; }
td.r { text-align: right; }
tr:hover td { background: #0a0f1e; }
.slug { color: #60a5fa; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dim { color: #475569; }
.green { color: #4ade80; }
.red { color: #f87171; }
.amber { color: #fbbf24; }

/* ── trade tape ── */
.trade-line {
  padding: 0.2rem 0.75rem;
  font-family: monospace; font-size: 0.68rem;
  border-bottom: 1px solid #080d17;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.trade-line:hover { background: #0a0f1e; }

/* ── controls ── */
.controls { padding: 0.6rem 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; border-bottom: 1px solid #1e293b; }
.ctrl-row { display: flex; align-items: center; justify-content: space-between; }
.ctrl-label { font-size: 0.68rem; color: #94a3b8; }
.btn {
  font-family: monospace; font-size: 0.62rem; padding: 3px 10px; border-radius: 4px;
  border: 1px solid #334155; background: #0f172a; color: #94a3b8;
  cursor: pointer; transition: all 0.1s;
}
.btn:hover { border-color: #475569; color: #e2e8f0; }
.btn.on { background: #052e16; border-color: #166534; color: #4ade80; }
.btn.armed { background: #1c1400; border-color: #92400e; color: #fbbf24; }
.btn.kill { background: #1c0a0a; border-color: #7f1d1d; color: #f87171; }
.btn.kill:hover { background: #450a0a; }
.btn:disabled, .btn.readonly {
  cursor: default;
  opacity: 0.72;
}
.btn:disabled:hover, .btn.readonly:hover {
  border-color: #334155;
  color: inherit;
}

/* ── fills log ── */
.fill-line {
  padding: 0.2rem 0.75rem;
  font-family: monospace; font-size: 0.68rem;
  border-bottom: 1px solid #080d17;
  color: #94a3b8;
}
.fill-line .buy { color: #4ade80; }
.fill-line .win { color: #4ade80; }
.fill-line .loss { color: #f87171; }
.fill-line .kill-tag { color: #f87171; }

/* ── settings page ── */
#page-settings {
  display: none; flex: 1; flex-direction: column;
  overflow-y: auto; padding: 1rem 1.2rem; gap: 1.25rem;
}
#page-settings::-webkit-scrollbar { width: 4px; }
#page-settings::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 2px; }

.settings-section-title {
  font-family: monospace; font-size: 0.6rem; color: #475569;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding-bottom: 0.5rem; border-bottom: 1px solid #0f172a;
}
.conn-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.75rem;
}
.conn-card {
  background: #050810; border-radius: 6px; padding: 0.85rem 1rem;
  border: 1px solid #1e293b; display: flex; flex-direction: column; gap: 0.2rem;
}
.conn-card.ok  { border-color: #166534; }
.conn-card.err { border-color: #7f1d1d; }
.conn-card-label { font-family: monospace; font-size: 0.72rem; font-weight: 600; }
.conn-card.ok  .conn-card-label { color: #4ade80; }
.conn-card.err .conn-card-label { color: #f87171; }
.conn-card-status { font-family: monospace; font-size: 0.6rem; }
.conn-card.ok  .conn-card-status { color: #166534; }
.conn-card.err .conn-card-status { color: #7f1d1d; }
.conn-card-detail { font-family: monospace; font-size: 0.58rem; color: #334155; margin-top: 0.15rem; }

.cfg-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.75rem;
}
.cfg-card { background: #050810; border: 1px solid #1e293b; border-radius: 6px; overflow: hidden; }
.cfg-card-header {
  padding: 0.35rem 0.75rem; border-bottom: 1px solid #1e293b;
  font-family: monospace; font-size: 0.6rem; color: #475569;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.cfg-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 0.28rem 0.75rem; border-bottom: 1px solid #080d17; font-family: monospace;
}
.cfg-row:last-child { border-bottom: none; }
.cfg-key { font-size: 0.62rem; color: #475569; }
.cfg-val { font-size: 0.68rem; color: #e2e8f0; font-weight: 600; }

/* ── fill flash animation ── */
@keyframes fillFlash {
  0%   { background: #0f3a20; }
  100% { background: transparent; }
}
.fill-flash { animation: fillFlash 1.2s ease-out forwards; }

/* ── connection dot ── */
.dot { width: 6px; height: 6px; border-radius: 50%; background: #334155; display: inline-block; margin-right: 4px; }
.dot.live { background: #4ade80; }
.dot.dead { background: #f87171; }

/* ── pill ── */
.pill { font-family: monospace; font-size: 0.58rem; padding: 1px 6px; border-radius: 20px; }
.pill-green { background: #052e16; border: 1px solid #166534; color: #4ade80; }
.pill-slate { background: #0f172a; border: 1px solid #334155; color: #64748b; }
.pill-blue { background: #0c1a3a; border: 1px solid #1d4ed8; color: #60a5fa; }

/* ── auth modal ── */
.modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(4px);
  z-index: 100; align-items: center; justify-content: center;
}
.modal-backdrop.visible { display: flex; }
.modal {
  background: #0f172a; border: 1px solid #1e293b; border-radius: 8px;
  padding: 1.5rem; width: 320px; display: flex; flex-direction: column; gap: 1rem;
}
.modal-title { font-family: monospace; font-size: 0.75rem; color: #94a3b8; letter-spacing: 0.1em; text-transform: uppercase; }
.modal-desc { font-size: 0.72rem; color: #475569; }
.modal input {
  width: 100%; background: #000; border: 1px solid #334155; border-radius: 4px;
  color: #e2e8f0; font-family: monospace; font-size: 0.8rem; padding: 0.4rem 0.6rem;
  outline: none;
}
.modal input:focus { border-color: #475569; }
.modal-error { font-size: 0.68rem; color: #f87171; display: none; }
.modal-error.visible { display: block; }
.modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; }
.modal-actions .btn { padding: 4px 14px; font-size: 0.7rem; }

/* ── reports page (default visible) ── */
#page-reports {
  display: flex; flex: 1; flex-direction: column;
  overflow-y: auto; padding: 1rem 1.2rem; gap: 0.75rem;
}
#page-reports::-webkit-scrollbar { width: 4px; }
#page-reports::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 2px; }

/* ── whales page ── */
#page-whales {
  display: none; flex: 1; flex-direction: column;
  overflow-y: auto; padding: 1rem 1.2rem; gap: 0.85rem;
}
#page-whales::-webkit-scrollbar { width: 4px; }
#page-whales::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 2px; }

.whale-tier {
  font-family: monospace; font-size: 0.55rem; padding: 1px 6px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700;
}
.tier-LEGEND { background: #1a0a3a; border: 1px solid #7c3aed; color: #c4b5fd; }
.tier-WHALE  { background: #0c1a3a; border: 1px solid #1d4ed8; color: #60a5fa; }
.tier-SHARK  { background: #052e16; border: 1px solid #166534; color: #4ade80; }
.tier-HOT    { background: #1c1400; border: 1px solid #92400e; color: #fbbf24; }
.tier-RISING { background: #0f172a; border: 1px solid #334155; color: #64748b; }

.whale-link { color: #60a5fa; text-decoration: none; font-family: monospace; }
.whale-link:hover { color: #93c5fd; text-decoration: underline; }

.watching-dot {
  width: 6px; height: 6px; border-radius: 50%; display: inline-block;
  background: #4ade80; box-shadow: 0 0 4px #4ade80;
}
.not-watching-dot {
  width: 6px; height: 6px; border-radius: 50%; display: inline-block;
  background: #334155;
}

.rep-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.rep-toolbar-title { font-family: monospace; font-size: 0.6rem; color: #475569; text-transform: uppercase; letter-spacing: 0.1em; }
.rep-actions { display: flex; align-items: center; gap: 0.45rem; }
.days-btns, .rows-btns { display: flex; gap: 0.3rem; }
.days-btn { font-family: monospace; font-size: 0.6rem; padding: 2px 8px; border-radius: 4px; border: 1px solid #1e293b; background: #000; color: #475569; cursor: pointer; }
.days-btn:hover { border-color: #334155; color: #94a3b8; }
.days-btn.on { background: #0c1a3a; border-color: #1d4ed8; color: #60a5fa; }
.days-btn:disabled { opacity: 0.55; cursor: wait; }
.mode-btn { font-family: monospace; font-size: 0.6rem; padding: 2px 8px; border-radius: 4px; border: 1px solid #1e293b; background: #000; color: #475569; cursor: pointer; }
.mode-btn:hover { border-color: #334155; color: #94a3b8; }
.mode-btn[data-mode="live"].on { background: #052e16; border-color: #166534; color: #22c55e; }
.mode-btn[data-mode="paper"].on { background: #0c1a3a; border-color: #1d4ed8; color: #60a5fa; }

.summary-row {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.75rem; flex-shrink: 0;
}
.summary-card {
  background: #050810; border: 1px solid #1e293b; border-radius: 6px; padding: 0.65rem 0.85rem;
}
.summary-card-label {
  font-family: monospace; font-size: 0.5rem; color: #475569;
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.25rem;
}
.summary-card-val { font-family: monospace; font-size: 0.92rem; font-weight: 700; color: #e2e8f0; }
.summary-card-val.green { color: #4ade80; }
.summary-card-val.red   { color: #f87171; }
.summary-card-val.dim   { color: #94a3b8; }

.rep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; align-items: start; }
.rep-grid.wide { grid-template-columns: 1fr; }

.rep-panel {
  background: #050810; border: 1px solid #1e293b; border-radius: 6px;
  overflow: hidden; display: flex; flex-direction: column;
}
.rep-panel-resizable {
  min-height: 0;
  height: auto;
  flex-shrink: 0;
  overflow: hidden;
}
.rep-panel-main {
  min-height: 220px;
  height: auto;
  flex-shrink: 0;
}
.rep-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.4rem 0.75rem; border-bottom: 1px solid #1e293b; flex-shrink: 0;
}
.rep-panel-title { font-family: monospace; font-size: 0.6rem; color: #475569; text-transform: uppercase; letter-spacing: 0.08em; }
.rep-panel-count { font-family: monospace; font-size: 0.6rem; color: #334155; }
.rep-scroll { overflow-y: auto; max-height: 320px; }
.rep-panel-resizable .rep-scroll {
  max-height: 360px;
  overflow-x: auto;
  overflow-y: auto;
}
.rep-panel-main .rep-scroll {
  max-height: 360px;
  overflow-y: auto;
  overflow-x: auto;
}
.rep-panel-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 0.4rem;
  padding: 0.35rem 0.75rem; border-top: 1px solid #1e293b; flex-shrink: 0;
}
.rep-panel-footer-label { font-family: monospace; font-size: 0.55rem; color: #334155; }
.rep-grid > .rep-panel { min-width: 0; }
.rep-scroll::-webkit-scrollbar { width: 4px; }
.rep-scroll::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 2px; }
.rep-scroll th { background: #050810; }
.rep-scroll td,
.rep-scroll th {
  white-space: nowrap;
}

.rep-empty { padding: 0.75rem; font-family: monospace; font-size: 0.68rem; color: #334155; }

.report-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: #020b06;
  border: 1px solid #166534;
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
  font-family: monospace;
  font-size: 0.65rem;
  color: #64748b;
}
.report-cta a {
  flex-shrink: 0;
  color: #4ade80;
  border: 1px solid #22c55e;
  background: #052e16;
  border-radius: 4px;
  padding: 3px 10px;
  text-decoration: none;
}
.report-cta a:hover { background: #0c2c1a; }

/* ── live portfolio grid ── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  flex-shrink: 0;
}
.p-card {
  background: #050810;
  border: 1px solid #1e293b;
  border-radius: 6px;
  padding: 0.6rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}
.p-card-label {
  font-family: monospace;
  font-size: 0.5rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.p-card-val {
  font-family: monospace;
  font-size: 0.92rem;
  font-weight: 700;
  color: #e2e8f0;
}
.p-card-sub, .perf-sub {
  font-family: monospace;
  font-size: 0.55rem;
  color: #334155;
}
.p-card-val.green { color: #4ade80; }
.p-card-val.red   { color: #f87171; }
.p-card-val.dim   { color: #94a3b8; }

/* ── join / funnel tab ── */
#page-join { overflow-y: auto; }
.funnel-wrap { max-width: 680px; margin: 0 auto; padding: 1.5rem 1.2rem 4rem; }
.track-label { font-size: 0.6rem; font-family: monospace; color: #475569; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.6rem; }
.track-label span { color: #334155; }
.live-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #1e293b; border-radius: 8px; background: #050810; overflow: hidden; margin-bottom: 2rem; }
@media (max-width: 520px) { .live-grid { grid-template-columns: repeat(2, 1fr); } }
.lg-cell { padding: 1rem 1.2rem; border-right: 1px solid #1e293b; }
.lg-cell:last-child { border-right: none; }
@media (max-width: 520px) { .lg-cell:nth-child(2) { border-right: none; } }
.lg-label { font-size: 0.58rem; color: #475569; font-family: monospace; text-transform: uppercase; letter-spacing: 0.08em; display: block; margin-bottom: 0.4rem; }
.lg-val { font-size: 1.2rem; font-weight: 700; font-family: monospace; color: #4ade80; }
.lg-val.dim { color: #94a3b8; }
.lg-val.red { color: #f87171; }
.roi-block { background: #050810; border: 1px solid #1e293b; border-radius: 8px; padding: 1.4rem 1.5rem; margin-bottom: 2rem; }
.roi-context { font-size: 0.75rem; color: #64748b; margin-bottom: 1.1rem; line-height: 1.5; }
.roi-context strong { color: #94a3b8; }
.roi-input-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.roi-caption { font-size: 0.62rem; color: #475569; font-family: monospace; }
.roi-input { background: #000; border: 1px solid #1e293b; color: #e2e8f0; border-radius: 6px; padding: 0.45rem 0.7rem; font-family: monospace; font-size: 0.9rem; width: 130px; outline: none; }
.roi-input:focus { border-color: #22c55e; }
.roi-nums { display: flex; gap: 2rem; flex-wrap: wrap; }
.roi-num-label { font-size: 0.58rem; color: #475569; font-family: monospace; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.25rem; }
.roi-big { font-size: 1.6rem; font-weight: 800; font-family: monospace; color: #4ade80; }
.roi-mid { font-size: 1.1rem; font-weight: 700; font-family: monospace; color: #4ade80; }
.roi-disclaimer { font-size: 0.58rem; color: #334155; font-family: monospace; margin-top: 1.1rem; line-height: 1.6; border-top: 1px solid #0f172a; padding-top: 0.75rem; }
.access-label { font-size: 0.58rem; font-family: monospace; color: #475569; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; }
.access-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 520px) { .access-grid { grid-template-columns: 1fr; } }
.ac { background: #050810; border: 1px solid #1e293b; border-radius: 8px; padding: 1.4rem; display: flex; flex-direction: column; gap: 0.75rem; }
.ac.highlight { border-color: #22c55e; }
.ac-tag { font-size: 0.58rem; font-family: monospace; color: #475569; text-transform: uppercase; letter-spacing: 0.1em; }
.ac-title { font-size: 0.92rem; font-weight: 700; color: #e2e8f0; }
.ac-body { font-size: 0.72rem; color: #64748b; line-height: 1.65; flex: 1; }
.ac-note { font-size: 0.6rem; color: #334155; font-family: monospace; line-height: 1.5; }
.btn-ln { display: block; text-align: center; padding: 0.55rem 1rem; border-radius: 6px; font-family: monospace; font-size: 0.72rem; font-weight: 600; text-decoration: none; }
.btn-ln-ghost { background: none; border: 1px solid #334155; color: #94a3b8; }
.btn-ln-ghost:hover { border-color: #64748b; color: #e2e8f0; }
.btn-ln-green { background: #0c2c1a; border: 1px solid #22c55e; color: #4ade80; }
.btn-ln-green:hover { background: #0f3d24; }
.btn-ln-tg { background: #0088cc; color: #fff; }
.btn-ln-tg:hover { opacity: 0.85; }
.funnel-divider { border: none; border-top: 1px solid #1e293b; margin: 2rem 0; }
.funnel-footer { font-size: 0.6rem; color: #334155; font-family: monospace; text-align: center; line-height: 1.7; }

/* ── mobile layout ── */
@media (max-width: 768px) {
  .page { height: auto; min-height: 100svh; }

  .header { padding: 0.35rem 0.65rem; flex-wrap: nowrap; gap: 0; align-items: center; }
  .header-left { flex-wrap: nowrap; gap: 0.55rem; align-items: center; overflow: hidden; }
  .header-right { flex-shrink: 0; gap: 0.3rem; }

  .hide-mobile { display: none !important; }
  .show-mobile-only { display: flex !important; }

  .nav { overflow-x: auto; }
  .nav-tab { padding: 0.4rem 0.7rem; white-space: nowrap; }
  .deploy-tab {
    margin-left: 0.4rem;
    padding: 0.25rem 0.6rem;
  }

  #page-dashboard { flex-direction: column; flex: none; height: auto; overflow: visible; }
  .panel-right { width: 100%; flex: none; overflow: visible; order: 1; }
  .panel-left  { width: 100%; flex: none; overflow: visible; order: 2; border-right: none; border-top: 1px solid #1e293b; }

  .panel-top    { flex: none; height: 55vh; }
  .panel-bottom { flex: none; height: 35vh; }

  .positions-panel { max-height: 200px !important; flex: none !important; }
  .fills-panel     { flex: none !important; height: 200px; overflow: hidden; display: flex; flex-direction: column; }

  .controls { padding: 0.3rem 0.6rem; gap: 0.18rem; }
  .ctrl-row { gap: 0.3rem; min-height: 0; }
  .ctrl-label { font-size: 0.6rem; line-height: 1.3; }
  .btn { padding: 2px 8px; min-height: 22px; font-size: 0.58rem; }
  .btn.kill, .btn.armed { padding: 2px 8px; min-height: 22px; }

  td { font-size: 0.63rem; padding: 0.13rem 0.3rem; }
  th { font-size: 0.5rem; padding: 0.15rem 0.3rem; }
  .trade-line { font-size: 0.63rem; padding: 0.13rem 0.5rem; }

  #page-reports, #page-whales, #page-settings { padding: 0.65rem 0.55rem; gap: 0.5rem; }
  .rep-toolbar { align-items: flex-start; gap: 0.45rem; flex-direction: column; }
  .rep-actions { width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .conn-cards { grid-template-columns: repeat(2, 1fr); }
  .cfg-cards  { grid-template-columns: 1fr; }
  .summary-row { grid-template-columns: repeat(2, 1fr); }
  .rep-grid    { grid-template-columns: 1fr; }
  .rep-scroll  { overflow-x: auto; }

  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .p-card-val { font-size: 0.82rem; }
  .p-card { padding: 0.45rem 0.6rem; }

  #page-whales table,
  #page-reports table { min-width: 520px; }
  .report-cta { align-items: stretch; flex-direction: column; }
  .report-cta a { text-align: center; }

  .panel-right { display: flex; flex-direction: column; }
  .positions-panel {
    max-height: 160px !important;
    flex: 0 0 160px !important;
    overflow: hidden;
  }
  .positions-panel .scroll { max-height: 130px; overflow-y: auto; }
  .fills-panel {
    flex: 0 0 180px !important;
    height: 180px !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .fills-panel .scroll { flex: 1; overflow-y: auto; }

  #perf-strip { display: flex; }
}

/* ── performance strip (mobile-only by default) ── */
#perf-strip {
  display: none;
  align-items: stretch;
  border-bottom: 1px solid #1e293b;
  background: #000;
  flex-shrink: 0;
}
.perf-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.3rem;
  border-right: 1px solid #0f172a;
  gap: 0.1rem;
}
.perf-cell:last-child { border-right: none; }
.perf-label {
  font-family: monospace;
  font-size: 0.48rem;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.perf-val {
  font-family: monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: #e2e8f0;
}
.perf-val.green { color: #4ade80; }
.perf-val.dim   { color: #94a3b8; }

/* ── social footer ── */
#social-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.6rem 1rem;
  border-top: 1px solid #0f172a;
  flex-shrink: 0;
  background: #000;
}
.social-link {
  display: flex; align-items: center; gap: 0.35rem;
  font-family: monospace; font-size: 0.62rem;
  color: #334155; text-decoration: none;
  padding: 4px 10px; border: 1px solid #1e293b; border-radius: 20px;
  transition: color 0.15s, border-color 0.15s;
}
.social-link:hover { color: #94a3b8; border-color: #334155; }
.social-icon { font-size: 0.85rem; line-height: 1; }

/* ── info page ── */
#page-info {
  flex: 1; overflow-y: auto; padding: 1rem 1.2rem; gap: 1.25rem;
  display: none; flex-direction: column;
}
#page-info::-webkit-scrollbar { width: 4px; }
#page-info::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 2px; }

.info-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem; margin-top: 0.75rem;
}
.info-card {
  background: #050810; border: 1px solid #1e293b; border-radius: 6px;
  padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.4rem;
}
.info-card-blocked { border-color: #292218; }
.info-card-title {
  font-family: monospace; font-size: 0.72rem; font-weight: 600; color: #94a3b8;
}
.info-card-blocked .info-card-title { color: #4b3c2a; }
.info-card-body {
  font-family: monospace; font-size: 0.63rem; color: #475569; line-height: 1.6;
}

.info-faq {
  display: flex; flex-direction: column; gap: 0; margin-top: 0.75rem;
  border: 1px solid #0f172a; border-radius: 6px; overflow: hidden;
}
.faq-item {
  border-bottom: 1px solid #0f172a; background: #050810;
}
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
  font-family: monospace; font-size: 0.68rem; color: #64748b;
  padding: 0.75rem 1rem; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; font-size: 0.75rem; color: #334155; transition: transform 0.15s;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item summary:hover { color: #94a3b8; background: #080d17; }
.faq-item p {
  font-family: monospace; font-size: 0.63rem; color: #475569;
  line-height: 1.65; padding: 0 1rem 0.85rem; margin: 0;
}

@media (max-width: 600px) {
  .info-cards { grid-template-columns: 1fr; }
}
