:root {
  --bg: #07120c;
  --bg-elev: #0c1d13;
  --surface: #11261a;
  --surface-hi: #183625;
  --border: #1e422e;
  --border-strong: #2c5f42;
  --ink: #f4f7f0;
  --ink-muted: #9ec0aa;
  --emerald: #22e58a;
  --emerald-dim: rgba(34, 229, 138, 0.14);
  --emerald-ink: #052113;
  --gold: #f4c95d;
  --gold-dim: rgba(244, 201, 93, 0.15);
  --cyan: #38bdf8;
  --cyan-dim: rgba(56, 189, 248, 0.14);
  --red: #fb7185;
  --red-dim: rgba(251, 113, 133, 0.15);
  --radius-sm: 10px;
  --radius-md: 15px;
  --radius-lg: 20px;
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(920px 520px at 85% -6%, rgba(34, 229, 138, 0.12), transparent 62%),
    radial-gradient(760px 460px at 8% 12%, rgba(244, 201, 93, 0.08), transparent 58%),
    linear-gradient(180deg, #06100a 0%, #091810 48%, #07120c 100%);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* DECORATIVE BAMBOO JUNGLE BACKDROP */
.jungle-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bamboo-left {
  position: absolute;
  top: 0;
  left: -12px;
  width: 220px;
  height: 100vh;
}

.bamboo-right {
  position: absolute;
  top: 0;
  right: -12px;
  width: 240px;
  height: 100vh;
}

.topbar, .standby-ribbon, .shell, .footer {
  position: relative;
  z-index: 2;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.emerald { color: var(--emerald); }
.gold { color: var(--gold); }
.muted { color: var(--ink-muted); }
.num { text-align: right; }
.is-hidden { display: none !important; }

/* TOPBAR */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(7, 18, 12, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1420px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.08;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--gold);
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.nav-tabs {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 3px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 3px;
}

.nav-tab {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 9px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 140ms ease, color 140ms ease;
}

.nav-tab:hover { color: var(--ink); }
.nav-tab.is-active {
  background: var(--surface-hi);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.network-switch {
  display: inline-flex;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 3px;
}

.net-btn {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 7px;
  cursor: pointer;
}

.net-btn.is-active[data-net="vision_mainnet"] {
  background: var(--gold-dim);
  color: var(--gold);
}

.net-btn.is-active[data-net="op_sepolia_rehearsal"] {
  background: var(--cyan-dim);
  color: #7dd3fc;
}

.btn-primary {
  border: 0;
  background: linear-gradient(135deg, #22e58a 0%, #14c973 100%);
  color: var(--emerald-ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  padding: 10px 17px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(34, 229, 138, 0.22);
  transition: filter 140ms ease, transform 100ms ease;
}

.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled {
  background: var(--surface-hi);
  color: var(--ink-muted);
  border: 1px solid var(--border-strong);
  box-shadow: none;
  cursor: not-allowed;
  filter: none;
  transform: none;
}
.btn-primary.btn-compact { padding: 8px 13px; font-size: 12px; }
.btn-primary.btn-full { width: 100%; padding: 12px 16px; font-size: 14px; }
.btn-primary.is-sell-mode {
  background: linear-gradient(135deg, #fb7185 0%, #f43f5e 100%);
  color: #27050c;
  box-shadow: 0 4px 16px rgba(251, 113, 133, 0.22);
}

.btn-ghost {
  border: 1px solid var(--border-strong);
  background: rgba(17, 38, 26, 0.85);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 15px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.btn-ghost:hover { background: var(--surface-hi); }
.btn-ghost.btn-compact { padding: 7px 11px; font-size: 12px; }

.btn-wallet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.btn-wallet:hover { background: var(--surface-hi); }
.wallet-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}

/* STANDBY RIBBON */
.standby-ribbon {
  border-bottom: 1px solid var(--border);
  padding: 9px 20px;
  font-size: 12.5px;
}

.standby-ribbon.is-standby {
  background: rgba(244, 201, 93, 0.11);
  color: #fde9a9;
  border-bottom-color: rgba(244, 201, 93, 0.28);
}

.standby-ribbon.is-rehearsal {
  background: rgba(56, 189, 248, 0.1);
  color: #bae6fd;
  border-bottom-color: rgba(56, 189, 248, 0.28);
}

.ribbon-inner {
  max-width: 1420px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ribbon-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(7, 18, 12, 0.55);
  border: 1px solid rgba(244, 201, 93, 0.35);
  margin-right: 8px;
}

/* SHELL */
.shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 22px 20px 56px;
}

.view { display: none; }
.view.is-active { display: block; }

.inline-code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(34, 229, 138, 0.1);
  border: 1px solid rgba(34, 229, 138, 0.2);
  padding: 1px 6px;
  border-radius: 6px;
  color: #d6fbe9;
}

/* HERO */
.hero-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 390px);
  align-items: center;
  gap: 24px;
  padding: 22px 26px;
  background:
    radial-gradient(520px 260px at 90% 50%, rgba(34, 229, 138, 0.14), transparent 72%),
    linear-gradient(135deg, rgba(17, 38, 26, 0.94) 0%, rgba(11, 28, 18, 0.96) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  margin-bottom: 18px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

.hero-strip > * {
  min-width: 0;
  max-width: 100%;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 800;
  line-height: 1.08;
  margin: 0 0 11px;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 0 0 16px;
  color: var(--ink-muted);
  max-width: 64ch;
}

.hero-cta-box {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-mascot {
  display: flex;
  justify-content: center;
  align-items: center;
}

.panda-hero-svg {
  width: 220px;
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.45));
}

/* KPI GRID */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.kpi-card {
  background: rgba(12, 29, 19, 0.92);
  border: 1px solid var(--border);
  border-top: 2px solid rgba(34, 229, 138, 0.35);
  border-radius: var(--radius-md);
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-label {
  font-size: 12px;
  color: var(--ink-muted);
}

.kpi-value {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.kpi-note {
  font-size: 11.5px;
  color: var(--ink-muted);
}

/* TOOLBAR */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.search-wrap {
  flex: 1 1 260px;
  max-width: 380px;
}

.field-input {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 13.5px;
  padding: 9px 12px;
  outline: none;
}

.field-input:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 2px rgba(34, 229, 138, 0.2);
}

.field-textarea { resize: vertical; }

.filter-pills, .view-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pill, .toggle-btn, .slip-btn, .pm-btn {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 9px;
  cursor: pointer;
}

.pill.is-active, .toggle-btn.is-active, .slip-btn.is-active, .pm-btn.is-active {
  background: var(--emerald-dim);
  color: var(--emerald);
  border-color: rgba(34, 229, 138, 0.48);
}

.sim-disclaimer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  background: rgba(12, 29, 19, 0.88);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.badge-sim {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--gold-dim);
  color: var(--gold);
  white-space: nowrap;
}

/* CURVE CARDS */
.curve-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.curve-card {
  background: linear-gradient(180deg, rgba(17, 38, 26, 0.94) 0%, rgba(12, 29, 19, 0.96) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.curve-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.3);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card-id {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.token-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: var(--emerald-ink);
  flex-shrink: 0;
  box-shadow: inset 0 0 0 2px rgba(7, 18, 12, 0.28);
}

.card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-ticker {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--emerald);
}

.status-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--emerald-dim);
  color: var(--emerald);
  white-space: nowrap;
}

.status-pill.is-grad {
  background: var(--gold-dim);
  color: var(--gold);
}

.status-pill.is-warn {
  background: var(--gold-dim);
  color: var(--gold);
}

.card-desc {
  margin: 0;
  font-size: 13px;
  color: var(--ink-muted);
  min-height: 38px;
}

/* BAMBOO-SEGMENTED PROGRESS BAR */
.progress-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-muted);
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #07120c;
  border: 1px solid var(--border-strong);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 26px,
      rgba(7, 18, 12, 0.55) 26px 28px
    ),
    linear-gradient(90deg, #16a34a, #22e58a);
}

.progress-fill.is-grad {
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 26px,
      rgba(7, 18, 12, 0.45) 26px 28px
    ),
    linear-gradient(90deg, #22e58a, #f4c95d);
}

.card-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.metric-cell span {
  display: block;
  font-size: 11px;
  color: var(--ink-muted);
}

.metric-cell strong {
  font-size: 12.5px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.shield-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold);
}

/* TABLES */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elev);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th, .data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.data-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  background: var(--surface);
}

.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table.compact th, .data-table.compact td { padding: 9px 12px; font-size: 12.5px; }

/* PANELS & TRADE DESK */
.panel {
  background: rgba(17, 38, 26, 0.93);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.panel-head h2, .panel-head h3 {
  margin: 0 0 3px;
  font-family: var(--font-display);
  font-size: 19px;
}

.panel-sub {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.desk-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.95fr);
  gap: 16px;
  align-items: start;
}

.desk-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.token-id-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.token-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.token-title-line h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 23px;
}

.ticker-tag {
  color: var(--emerald);
  font-weight: 600;
}

.token-desc {
  margin: 6px 0 8px;
  color: var(--ink-muted);
}

.token-meta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--ink-muted);
}

.token-selector-strip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.quick-tok-btn {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.quick-tok-btn.is-active {
  background: var(--emerald-dim);
  color: var(--emerald);
  border-color: rgba(34, 229, 138, 0.45);
}

.progress-badge {
  font-size: 16px;
  font-weight: 600;
  color: var(--emerald);
  background: var(--emerald-dim);
  padding: 4px 10px;
  border-radius: 8px;
}

.curve-svg-wrap {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 14px;
}

.curve-svg-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}

.desk-stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.mini-stat {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.mini-stat span {
  display: block;
  font-size: 11px;
  color: var(--ink-muted);
  margin-bottom: 3px;
}

.mini-stat strong { font-size: 13px; }

/* TICKET */
.ticket-panel {
  position: sticky;
  top: 78px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.side-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 4px;
}

.side-tab {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-weight: 700;
  padding: 9px;
  border-radius: 8px;
  cursor: pointer;
}

.side-tab.is-active.is-buy {
  background: var(--emerald);
  color: var(--emerald-ink);
}

.side-tab.is-active.is-sell {
  background: var(--red);
  color: #27050c;
}

.paymaster-row, .slippage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.paymaster-toggle, .slip-pills {
  display: inline-flex;
  gap: 4px;
}

.pm-btn, .slip-btn { padding: 4px 8px; font-size: 11.5px; }

.input-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.amount-box {
  display: flex;
  align-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
}

.amount-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
  padding: 6px 4px;
  outline: none;
}

.unit-pill {
  font-size: 12px;
  font-weight: 600;
  color: var(--emerald);
  background: var(--emerald-dim);
  padding: 4px 8px;
  border-radius: 6px;
}

.quick-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.quick-btn {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 6px 4px;
  border-radius: 7px;
  cursor: pointer;
}
.quick-btn:hover { color: var(--ink); border-color: var(--border-strong); }

.quote-box {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.quote-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.quote-line strong, .quote-line span:last-child { color: var(--ink); }

.trade-feedback {
  font-size: 12.5px;
  min-height: 18px;
}
.trade-feedback.is-ok { color: var(--emerald); }
.trade-feedback.is-err { color: var(--red); }

.invariant-mini {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  font-size: 12px;
  color: var(--ink-muted);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.check-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  margin-right: 7px;
}

/* LAUNCH STUDIO */
.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.studio-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.split-meter-box, .split-editor-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.split-editor-card { margin-bottom: 0; }

.split-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-muted);
  flex-wrap: wrap;
}

.split-bar {
  display: flex;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #07120c;
  border: 1px solid var(--border-strong);
  gap: 2px;
}

.split-seg-dev { background: #38bdf8; }
.split-seg-rew { background: #f4c95d; }
.split-seg-bb  { background: #22e58a; }

.split-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--ink-muted);
}

.calldata-preview {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calldata-box {
  display: block;
  padding: 8px 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 11px;
  color: #a7f3d0;
  word-break: break-all;
  line-height: 1.4;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-group label {
  font-size: 12.5px;
  color: var(--ink-muted);
  font-weight: 500;
}

.launch-fee-tag {
  font-size: 12px;
  color: var(--gold);
  background: var(--gold-dim);
  padding: 4px 10px;
  border-radius: 7px;
}

.shield-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.shield-title { font-weight: 700; margin-bottom: 3px; }
.shield-desc { margin: 0; font-size: 12px; color: var(--ink-muted); }

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  inset: 0;
  background: var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background 150ms ease;
}
.slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform 150ms ease;
}
.switch input:checked + .slider { background: var(--emerald); }
.switch input:checked + .slider::before {
  transform: translateX(20px);
  background: var(--emerald-ink);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.preview-math {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* SPEC & GATE */
.spec-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 16px;
  align-items: start;
}

.spec-table th, .spec-table td {
  padding: 8px 10px;
  font-size: 12px;
}

.spec-table .addr-cell {
  font-size: 11px;
  letter-spacing: -0.01em;
}

.gate-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.gate-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.gate-item p {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.gate-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 6px;
  white-space: nowrap;
}
.gate-badge.is-warn { background: var(--gold-dim); color: var(--gold); }
.gate-badge.is-ok { background: var(--emerald-dim); color: var(--emerald); }

.factory-wire-box {
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.factory-wire-box label {
  font-size: 12.5px;
  color: var(--ink-muted);
}

.wire-row {
  display: flex;
  gap: 8px;
}

.source-links {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.link-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.link-row a {
  color: var(--emerald);
  text-decoration: none;
  font-size: 12.5px;
  border: 1px solid var(--border-strong);
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--bg-elev);
}
.link-row a:hover { background: var(--surface-hi); }

.side-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
}
.side-tag.buy { background: var(--emerald-dim); color: var(--emerald); }
.side-tag.sell { background: var(--red-dim); color: var(--red); }

/* FOOTER */
.footer {
  border-top: 1px solid var(--border);
  padding: 18px 20px;
  color: var(--ink-muted);
  font-size: 12px;
  background: rgba(7, 18, 12, 0.85);
}

.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* RESPONSIVE */
.brand-mark-img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(34, 229, 138, 0.25));
}

.hero-art-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  max-width: 100%;
  width: 100%;
  min-width: 0;
  justify-self: end;
}

.hero-banner-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 24px rgba(34, 229, 138, 0.14);
}

.hero-rpc-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  font-size: 11px;
  line-height: 1.35;
  color: var(--ink);
  white-space: normal;
  word-break: break-word;
  max-width: 100%;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  flex-shrink: 0;
}

.pulse-dot.is-live {
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
}

.pulse-dot.is-err {
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}

.net-btn.is-active[data-net="vision_l1_force"] {
  background: var(--emerald-dim);
  color: var(--emerald);
}

.net-btn.is-active[data-net="vision_l2_direct"] {
  background: var(--gold-dim);
  color: var(--gold);
}

.bridge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.balance-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.route-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.route-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  text-align: left;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}

.route-btn span {
  font-size: 11px;
  color: var(--ink-muted);
}

.route-btn.is-active {
  border-color: var(--emerald);
  background: rgba(34, 229, 138, 0.1);
}

.preset-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.btn-mini {
  padding: 4px 9px;
  font-size: 11px;
  border-radius: 7px;
}

.tracker-box {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lookup-result {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--ink-muted);
  word-break: break-word;
  line-height: 1.55;
}

select.field-input {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--emerald) 50%), linear-gradient(135deg, var(--emerald) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
}

@media (max-width: 1220px) {
  .topbar-inner { flex-wrap: wrap; }
  .topbar-actions { flex-wrap: wrap; }
  .nav-tabs { flex-wrap: wrap; }
}

@media (max-width: 1040px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .curve-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desk-grid, .studio-grid, .spec-grid, .bridge-grid { grid-template-columns: 1fr; }
  .ticket-panel { position: static; }
}

@media (max-width: 820px) {
  .hero-strip { grid-template-columns: minmax(0, 1fr); text-align: left; }
  .hero-art-card { max-width: 100%; justify-self: stretch; order: -1; }
  .balance-strip, .route-toggle { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .topbar-inner { padding: 10px 12px; flex-wrap: wrap; }
  .topbar-actions { width: 100%; flex-wrap: wrap; gap: 6px; }
  .shell { padding: 14px 12px 40px; }
  .nav-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .kpi-grid, .curve-grid, .desk-stats-row, .form-row-2, .form-row-3 { grid-template-columns: minmax(0, 1fr); }
  .hero-strip { padding: 14px; gap: 14px; }
  .hero-copy h1 { font-size: 24px; }
  .jungle-backdrop { opacity: 0.45; }
}
