:root {
  --bg: #eaf2f8;
  --bg-2: #f4f8fb;
  --card: #ffffff;
  --card-tint: #f8fbfd;
  --navy: #0b1b2b;
  --navy-2: #17324d;
  --navy-3: #2a4a66;
  --green: #00e887;
  --green-deep: #00c875;
  --green-soft: #c9f8e2;
  --green-mist: #e8fbf2;
  --red: #e24c5b;
  --red-soft: #fad9dd;
  --red-mist: #fdf1f2;
  --border: #bcd0df;
  --border-2: #d7e4ee;
  --muted: #667d91;
  --muted-2: #8aa0b3;
  --white: #ffffff;
  --shadow: 0 1px 2px rgba(10, 30, 50, 0.04);
  --shadow-hover: 0 4px 16px rgba(10, 30, 50, 0.07);
  --shadow-pop: 0 12px 40px rgba(11, 27, 43, 0.14);
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --nav-h: 60px;
  --ticker-h: 40px;
  --max: 1180px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html, body { margin: 0; padding: 0; overflow-x: hidden; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--navy);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.modal-open { overflow: hidden; }

::selection {
  background: var(--green-soft);
  color: var(--navy);
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

.num, .price, .pct, .stat-value, .outcome-px, .ticker-px {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "ss01" 1;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
}
.icon svg { width: 18px; height: 18px; }

/* ---------- App shell ---------- */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 100%;
  overflow-x: hidden;
}

.wrap {
  width: min(var(--max), calc(100vw - 40px));
  margin: 0 auto;
}

/* ---------- Top nav ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  background: rgba(234, 242, 248, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.topnav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.wordmark {
  font-weight: 700;
  font-size: 16.5px;
  letter-spacing: -0.035em;
  color: var(--navy);
}
.wordmark i {
  font-style: normal;
  color: var(--green-deep);
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}
.nav-link {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 0;
  letter-spacing: -0.01em;
  transition: color 140ms var(--ease), background 140ms var(--ease);
}
.nav-link:hover { color: var(--navy); background: rgba(255,255,255,0.6); }
.nav-link.is-active { color: var(--navy); background: var(--white); box-shadow: 0 0 0 1px var(--border); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: var(--radius-sm);
  color: var(--navy-2);
  box-shadow: var(--shadow);
  transition: box-shadow 160ms var(--ease), border-color 160ms var(--ease);
}
.icon-btn:hover { box-shadow: var(--shadow-hover); border-color: #9fb6c8; }
.icon-btn .kbd {
  font-size: 10px;
  color: var(--muted-2);
  font-weight: 600;
  margin-left: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform 120ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-navy {
  background: var(--navy);
  color: var(--white);
}
.btn-navy:hover { background: #132536; }
.btn-ghost {
  background: var(--white);
  color: var(--navy);
  border-color: var(--border);
  box-shadow: var(--shadow);
}
.btn-ghost:hover { box-shadow: var(--shadow-hover); }
.btn-green {
  background: var(--green);
  color: var(--navy);
}
.btn-green:hover { background: #2aee96; }
.btn-red {
  background: var(--red);
  color: var(--white);
}
.btn-lg { height: 44px; padding: 0 18px; font-size: 14.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }

.wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px 0 6px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.wallet-chip .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}
.wallet-chip .addr { font-size: 12.5px; font-weight: 600; letter-spacing: -0.02em; }
.wallet-chip .bal { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.hamburger { display: none; }

/* ---------- Ticker ---------- */
.ticker {
  height: var(--ticker-h);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  overflow: hidden;
  display: flex;
  align-items: center;
}
.ticker-inner {
  display: flex;
  align-items: center;
  gap: 0;
  width: min(var(--max), calc(100vw - 40px));
  margin: 0 auto;
  height: 100%;
  min-width: 0;
}
.session-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy-2);
  padding-right: 16px;
  margin-right: 8px;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
  white-space: nowrap;
}
.session-pill .live {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 232, 135, 0.22);
}
.session-pill.is-closed .live { background: var(--muted-2); box-shadow: none; }

.ticker-track {
  display: flex;
  align-items: center;
  gap: 22px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  height: 100%;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}
.ticker-track::-webkit-scrollbar { display: none; }

.tick {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12.5px;
  white-space: nowrap;
  padding: 4px 2px;
  border-radius: 4px;
  transition: background 400ms ease;
  cursor: pointer;
  background: transparent;
  border: 0;
  color: inherit;
}
.tick:hover { color: var(--navy); }
.tick-sym { font-weight: 650; color: var(--navy); letter-spacing: -0.02em; }
.tick-sym span { color: var(--muted); font-weight: 500; }
.tick-px { font-weight: 500; color: var(--navy-2); }
.tick-chg { font-weight: 650; font-size: 12px; }
.up { color: #0a9a5e; }
.down { color: var(--red); }
.flash-up { animation: flashUp 450ms ease; }
.flash-down { animation: flashDown 450ms ease; }
@keyframes flashUp { 0% { background: rgba(0,232,135,0.28); } 100% { background: transparent; } }
@keyframes flashDown { 0% { background: rgba(226,76,91,0.22); } 100% { background: transparent; } }

/* ---------- Page ---------- */
.page { flex: 1; padding: 28px 0 80px; }
.page-tight { padding-top: 22px; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: stretch;
  margin-bottom: 28px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--green);
  border-radius: 2px;
}
.hero h1 {
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.045em;
  font-weight: 750;
  margin: 0 0 14px;
  overflow-wrap: anywhere;
}
.hero h1 .dot { color: var(--green); }
.hero-lead {
  font-size: 16.5px;
  color: var(--muted);
  max-width: 460px;
  margin: 0 0 24px;
  line-height: 1.55;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.hero-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.featured {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 16px;
  cursor: pointer;
  transition: box-shadow 180ms var(--ease), transform 180ms var(--ease);
}
.featured:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.featured-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}
.featured-kicker {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.featured h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.featured p.q {
  margin: 4px 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.vs-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.vs-side {
  background: var(--card-tint);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 14px 10px 12px;
  text-align: center;
  transition: border-color 160ms var(--ease), background 160ms var(--ease);
}
.vs-side.is-lead {
  border-color: #9fe8c6;
  background: var(--green-mist);
}
.vs-pct {
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin-top: 6px;
}
.vs-label { font-size: 12px; font-weight: 650; color: var(--muted); margin-top: 2px; }
.vs-mid {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
  color: var(--muted-2);
}

.featured-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--muted);
  padding-top: 4px;
}
.featured-meta strong { color: var(--navy); font-weight: 650; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 12px 11px;
  box-shadow: var(--shadow);
}
.stat-label {
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat-value {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-top: 4px;
}

/* ---------- Section heads ---------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0 14px;
}
.section-head h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}

/* ---------- Filters ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.tab {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
  transition: 140ms var(--ease);
}
.tab:hover { color: var(--navy); background: var(--white); }
.tab.is-on {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}
.filter-right {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}
.select {
  height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--navy);
  font-size: 12.5px;
  font-weight: 550;
}
.seg {
  display: inline-flex;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.seg button {
  height: 30px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.seg button.is-on { background: var(--navy); color: var(--white); }

/* ---------- Cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.mcard {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  min-height: 248px;
  transition: box-shadow 180ms var(--ease), transform 180ms var(--ease);
  cursor: pointer;
  text-align: left;
  color: inherit;
  width: 100%;
}
.mcard:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.mcard-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--navy-2);
  background: var(--card-tint);
}
.badge-live { background: var(--green-mist); border-color: #9fe8c6; color: #0a7a4e; }
.badge-soon { background: #fff6e8; border-color: #f0d2a0; color: #9a6400; }
.badge-res { background: #eef1f4; color: var(--muted); }

.mcard-title {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.3;
  margin: 0 0 2px;
}
.mcard-q {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.4;
}

.outcomes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.obtn {
  border: 1px solid var(--border);
  background: var(--card-tint);
  border-radius: var(--radius-sm);
  padding: 10px 10px 9px;
  text-align: left;
  transition: 140ms var(--ease);
  min-height: 58px;
}
.obtn:hover { border-color: #9fb6c8; }
.obtn .ol { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); text-transform: uppercase; }
.obtn .op {
  display: block;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.03em;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.obtn.yes:hover, .obtn.long:hover, .obtn.a:hover { background: var(--green-mist); border-color: #8fe0c0; }
.obtn.no:hover, .obtn.short:hover, .obtn.b:hover { background: var(--red-mist); border-color: #f0b4ba; }
.obtn.is-won { background: var(--green-mist); border-color: #8fe0c0; }

.spark {
  height: 36px;
  margin: 2px 0 10px;
}
.spark svg { width: 100%; height: 100%; display: block; }

.mcard-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  font-size: 12px;
  color: var(--muted);
  padding-top: 8px;
  border-top: 1px solid var(--border-2);
}

/* Pair card extras */
.pair-mini {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 6px;
  align-items: center;
  margin-bottom: 10px;
}
.pair-mini .side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  background: var(--card-tint);
  border: 1px solid var(--border-2);
}
.pair-mini .side.is-lead { background: var(--green-mist); border-color: #9fe8c6; }
.pair-mini .pp {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.pair-mini .vs {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.14em;
  color: var(--muted-2);
}

/* Asset avatar */
.av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}
.av-lg { width: 40px; height: 40px; font-size: 13px; }
.av-xl { width: 52px; height: 52px; font-size: 15px; }
.avs { display: flex; align-items: center; }
.avs .av + .av { margin-left: -8px; box-shadow: 0 0 0 2px #fff; }

/* ---------- Table ---------- */
.table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
table.mkts {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.mkts th {
  text-align: left;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--card-tint);
}
table.mkts td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-2);
  vertical-align: middle;
}
table.mkts tr:last-child td { border-bottom: 0; }
table.mkts tr { cursor: pointer; }
table.mkts tr:hover td { background: #f6fafc; }
.t-title { font-weight: 650; letter-spacing: -0.02em; }
.t-sub { color: var(--muted); font-size: 12px; }

/* ---------- Market detail ---------- */
.detail {
  display: grid;
  grid-template-columns: 1.7fr 0.9fr;
  gap: 20px;
  align-items: start;
}
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.crumb {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.crumb a:hover { color: var(--navy); }
.detail-title {
  font-size: 26px;
  letter-spacing: -0.035em;
  font-weight: 750;
  margin: 8px 0 8px;
  line-height: 1.2;
}
.detail-sub {
  color: var(--muted);
  font-size: 13.5px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 8px;
}
.detail-links {
  display: flex;
  gap: 14px;
  margin: 8px 0 16px;
  font-size: 13px;
  font-weight: 600;
}
.detail-links a, .detail-links button {
  color: var(--navy-2);
  background: none;
  border: 0;
  padding: 0;
  font-weight: 600;
  font-size: 13px;
}
.detail-links a:hover, .detail-links button:hover { color: var(--navy); text-decoration: underline; }

.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.chart-head h4 { margin: 0; font-size: 14px; font-weight: 650; }
.intervals { display: flex; gap: 4px; }
.intervals button {
  height: 26px;
  padding: 0 8px;
  border-radius: 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.intervals button.is-on { background: var(--navy); color: #fff; }
.chart-box { height: 260px; position: relative; }
.chart-box svg { width: 100%; height: 100%; display: block; }
.chart-tip {
  position: absolute;
  pointer-events: none;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 6px;
  transform: translate(-50%, -120%);
  white-space: nowrap;
  opacity: 0;
}
.chart-tip.is-on { opacity: 1; }

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin: 18px 0 14px;
}
.tabs button {
  background: none;
  border: 0;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs button.is-on { color: var(--navy); border-bottom-color: var(--navy); }

.rules h5 {
  margin: 16px 0 6px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.rules p, .rules li { font-size: 13.5px; color: var(--navy-2); }
.rules ul { padding-left: 18px; margin: 6px 0; }

.feed-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-2);
  font-size: 13px;
}
.feed-item:last-child { border-bottom: 0; }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; }

/* Trade panel */
.trade {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
}
.trade-flip { perspective: 900px; }
.trade-inner {
  transform-origin: center;
}
.trade-inner.flipping {
  animation: flipY 180ms var(--ease);
}
@keyframes flipY {
  0% { transform: rotateX(0); }
  50% { transform: rotateX(85deg); }
  100% { transform: rotateX(0); }
}
.trade-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--card-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 12px;
}
.trade-tabs button {
  height: 32px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  font-weight: 650;
  font-size: 13px;
  color: var(--muted);
}
.trade-tabs button.is-on { background: var(--white); color: var(--navy); box-shadow: var(--shadow); }

.outcome-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.os {
  border: 1px solid var(--border);
  background: var(--card-tint);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
}
.os .ol { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; color: var(--muted); }
.os .op { font-size: 18px; font-weight: 750; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.os.is-a.is-on { background: var(--green); border-color: var(--green); color: var(--navy); }
.os.is-a.is-on .ol { color: var(--navy-2); }
.os.is-b.is-on { background: var(--red); border-color: var(--red); color: #fff; }
.os.is-b.is-on .ol { color: rgba(255,255,255,0.8); }

.field { margin-bottom: 12px; }
.field label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  background: var(--white);
  color: var(--navy);
  outline: none;
}
.field input:focus { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(23, 50, 77, 0.08); }
.quick {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.quick button {
  flex: 1;
  height: 28px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 11.5px;
  font-weight: 650;
  color: var(--navy-2);
}
.quick button:hover { background: var(--card-tint); }

.est {
  background: var(--card-tint);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
}
.est-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  padding: 4px 0;
  color: var(--muted);
}
.est-row span:last-child { color: var(--navy); font-weight: 600; font-variant-numeric: tabular-nums; }

.wallet-mini {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 12px;
}
.wallet-mini strong { color: var(--navy); }

/* ---------- Portfolio ---------- */
.p-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.pos-table td, .pos-table th { font-size: 13.5px; }
.pnl-pos { color: #0a9a5e; font-weight: 650; }
.pnl-neg { color: var(--red); font-weight: 650; }

/* ---------- Asset page ---------- */
.asset-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.asset-id { display: flex; align-items: center; gap: 14px; }
.asset-id h1 { margin: 0; font-size: 28px; letter-spacing: -0.04em; }
.asset-id p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.asset-px { text-align: right; }
.asset-px .big {
  font-size: 32px;
  font-weight: 750;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

/* ---------- Create wizard ---------- */
.wizard {
  max-width: 720px;
  margin: 0 auto;
}
.steps {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  overflow-x: auto;
}
.step-pip {
  flex: 1;
  min-width: 70px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
}
.step-pip.is-on { background: var(--navy); }
.step-pip.is-done { background: var(--green); }
.type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.type-card {
  text-align: left;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}
.type-card.is-on, .type-card:hover { border-color: var(--navy-2); }
.type-card h4 { margin: 0 0 4px; font-size: 14.5px; }
.type-card p { margin: 0; font-size: 12.5px; color: var(--muted); }

.asset-pick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.asset-pick button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 650;
  font-size: 13px;
}
.asset-pick button.is-on { border-color: var(--navy); box-shadow: 0 0 0 2px rgba(11,27,43,0.08); }

/* ---------- Search overlay / modals ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 27, 43, 0.38);
  z-index: 60;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 16px;
}
.overlay.is-open { display: flex; }

.modal {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-pop);
  width: min(520px, 100%);
  max-height: 76vh;
  overflow: auto;
}
.modal-lg { width: min(640px, 100%); }
.modal-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border-2);
}
.modal-h h3 { margin: 0; font-size: 16px; letter-spacing: -0.02em; }
.modal-b { padding: 16px 18px 20px; }

.search-modal { width: min(640px, 100%); padding: 0; overflow: hidden; }
.search-input {
  width: 100%;
  height: 52px;
  border: 0;
  padding: 0 18px;
  font-size: 16px;
  outline: none;
  color: var(--navy);
  background: transparent;
}
.search-group { padding: 8px 10px 12px; }
.search-group h5 {
  margin: 8px 8px 4px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.srow {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  font-size: 13.5px;
}
.srow:hover, .srow.is-on { background: var(--bg-2); }

.wallet-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px;
  border: 1px solid var(--border);
  background: var(--card-tint);
  border-radius: var(--radius);
  margin-bottom: 8px;
}
.wallet-opt:hover { border-color: var(--navy-2); }
.wallet-opt h4 { margin: 0; font-size: 14px; }
.wallet-opt p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }

/* ---------- Toasts ---------- */
.toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--navy);
  color: #fff;
  padding: 12px 14px;
  border-radius: 8px;
  min-width: 240px;
  max-width: 360px;
  font-size: 13.5px;
  box-shadow: var(--shadow-pop);
  animation: toastIn 180ms var(--ease);
}
.toast.ok { background: #0d2a1c; box-shadow: 0 0 0 1px #1a6b45, var(--shadow-pop); }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Empty / how ---------- */
.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}
.empty h3 { color: var(--navy); margin: 0 0 6px; }
.how-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 18px 0 28px;
}
.how-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.how-n {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  margin-bottom: 10px;
}
.how-card h4 { margin: 0 0 6px; font-size: 14.5px; }
.how-card p { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- Leaderboard ---------- */
.lb-row {
  display: grid;
  grid-template-columns: 40px 1fr 100px 100px 80px;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-2);
  align-items: center;
  font-size: 13.5px;
}
.lb-row.head { font-size: 11px; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); background: var(--card-tint); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 13px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.footer a { color: var(--navy-2); }
.footer a:hover { color: var(--navy); }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.demo-note { font-size: 12px; color: var(--muted-2); margin-top: 8px; }

/* ---------- Mobile nav ---------- */
.mobile-nav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 60px;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  z-index: 40;
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-nav a, .mobile-nav button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
}
.mobile-nav .is-on { color: var(--navy); }

/* ---------- Misc ---------- */
.skel {
  background: linear-gradient(90deg, #e3edf4 0%, #f4f8fb 50%, #e3edf4 100%);
  background-size: 200% 100%;
  animation: skel 1.2s ease infinite;
  border-radius: 6px;
}
@keyframes skel { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.banner {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--navy-2);
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.banner button { border: 0; background: none; color: var(--muted); font-size: 12px; }

.closed-note {
  font-size: 12px;
  color: #9a6400;
  background: #fff6e8;
  border: 1px solid #f0d2a0;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 12px;
}

.resolved-banner {
  background: var(--green-mist);
  border: 1px solid #9fe8c6;
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
}
.resolved-banner h4 { margin: 0 0 4px; }

hr.sep { border: 0; border-top: 1px solid var(--border-2); margin: 16px 0; }

.hidden { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .how-grid { grid-template-columns: 1fr 1fr; }
  .nav-center { display: none; }
  .hamburger { display: inline-flex; }
  .p-stats, .meta-grid { grid-template-columns: 1fr 1fr; }
  .asset-pick { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  :root { --nav-h: 56px; }
  .wrap { width: calc(100vw - 28px); max-width: 100%; }
  .hero { grid-template-columns: 1fr; gap: 18px; }
  .detail { grid-template-columns: 1fr; }
  .trade { position: static; }
  .grid { grid-template-columns: 1fr; }
  .hamburger { display: none; }
  .btn-create-label, .wallet-label { display: none; }
  .wordmark { font-size: 15px; }
  .nav-right .btn-navy { width: 36px; padding: 0; flex-shrink: 0; }
  .nav-right .btn-ghost { display: none; }
  .nav-right .icon-btn { flex-shrink: 0; }
  .brand { flex-shrink: 0; }
  .wallet-chip .bal { display: none; }
  .mobile-nav { display: flex; width: 100%; max-width: 100vw; }
  .page { padding-bottom: 96px; }
  .footer { padding-bottom: 90px; }
  .hero h1 { font-size: 32px; }
  .ticker, .topnav { max-width: 100vw; }
  .ticker-inner { width: calc(100vw - 16px); }
  .session-pill { display: none; }
  .filter-right { margin-left: 0; width: 100%; flex-wrap: wrap; }
  .filters { max-width: 100%; }
  .lb-row { grid-template-columns: 32px 1fr 80px 70px; }
  .lb-row .hide-sm { display: none; }
  .type-grid { grid-template-columns: 1fr; }
  .vs-side { min-width: 0; }
  .vs-pct { font-size: 22px; }
  .featured-meta { flex-wrap: wrap; }
  .featured { max-width: 100%; }
  .topnav-inner { gap: 10px; }
  .mono, .detail-sub, .mcard-title { overflow-wrap: anywhere; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
