:root {
  color-scheme: dark;
  --bg: #0a0c10;
  --surface-1: #12151b;
  --surface-2: #181c24;
  --surface-3: #212633;
  --border: #252b38;
  --border-strong: #343c4d;
  --text-primary: #eef0f4;
  --text-secondary: #a8afbd;
  --text-muted: #6f7787;
  --accent: #c6f432;
  --accent-ink: #12170a;
  --up: #2fd08a;
  --down: #ff5d6c;
  --warn: #f0b429;
  /* Categorical series slots (validated dark steps, fixed order) */
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-5: #d55181;
  --series-6: #008300;
  --series-7: #9085e9;
  --series-8: #e66767;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text-primary); font: 14px/1.45 var(--font); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.muted { color: var(--text-muted); }
.secondary { color: var(--text-secondary); }
.up { color: var(--up); }
.down { color: var(--down); }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 20px;
  padding: 0 24px; height: 60px;
  background: rgba(10, 12, 16, 0.86); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; white-space: nowrap; }
.logo-mark { width: 28px; height: 28px; }
.search { flex: 1; max-width: 420px; position: relative; }
.search input {
  width: 100%; height: 38px; padding: 0 12px 0 36px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border); outline: none;
}
.search input:focus { border-color: var(--border-strong); background: var(--surface-3); }
.search svg { position: absolute; left: 11px; top: 11px; width: 16px; height: 16px; color: var(--text-muted); }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--text-secondary); font-weight: 500; white-space: nowrap; }
.nav a:hover { color: var(--text-primary); background: var(--surface-2); }
.nav a.active { color: var(--text-primary); background: var(--surface-2); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.balance-pill { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; padding: 4px 10px; border-radius: 8px; }
.balance-pill:hover { background: var(--surface-2); }
.balance-pill small { color: var(--text-muted); font-size: 11px; }
.balance-pill b { font-size: 15px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--surface-3); border: 1px solid var(--border-strong); cursor: pointer; }
.menu { position: absolute; right: 24px; top: 56px; min-width: 200px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 6px; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; background: none; border: 0; cursor: pointer; color: var(--text-secondary); }
.menu a:hover, .menu button:hover { background: var(--surface-3); color: var(--text-primary); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
.hamburger { display: none; background: none; border: 0; padding: 6px; cursor: pointer; }

/* ---------- ticker ---------- */
.ticker { display: flex; gap: 24px; align-items: center; padding: 7px 24px; border-bottom: 1px solid var(--border); background: var(--surface-1); font-size: 12px; overflow-x: auto; white-space: nowrap; }
.ticker .sym { color: var(--text-muted); margin-right: 6px; font-weight: 600; }
.ticker .season { margin-left: auto; color: var(--text-secondary); }
.ticker .season b { color: var(--accent); font-weight: 600; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface-2); cursor: pointer; font-weight: 600; white-space: nowrap; }
.btn:hover { background: var(--surface-3); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn-primary:hover { background: #d6ff52; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 46px; font-size: 15px; width: 100%; }
.btn-danger { color: var(--down); }
.input, select.input, textarea.input { width: 100%; height: 40px; padding: 0 12px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); outline: none; }
textarea.input { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; }
.input:focus { border-color: var(--accent); }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-secondary); cursor: pointer; font-size: 13px; font-weight: 500; white-space: nowrap; }
.chip:hover { color: var(--text-primary); }
.chip.active { background: var(--text-primary); color: var(--bg); border-color: transparent; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; color: var(--text-muted); cursor: pointer; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.active { color: var(--text-primary); border-bottom-color: var(--accent); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; background: var(--surface-3); color: var(--text-secondary); }
.badge.live { background: rgba(255, 93, 108, .14); color: var(--down); }
.badge.live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--down); animation: pulse 1.4s infinite; }
.badge.resolved { background: rgba(47, 208, 138, .12); color: var(--up); }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 28px; max-width: 1440px; margin: 0 auto; padding: 24px; }
.page { max-width: 1240px; margin: 0 auto; padding: 28px 24px 60px; }
.sidebar { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; padding-right: 4px; }
.sidebar h4 { margin: 18px 10px 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.sidebar h4:first-child { margin-top: 0; }
.side-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 8px; color: var(--text-secondary); cursor: pointer; font-weight: 500; }
.side-link:hover { background: var(--surface-1); color: var(--text-primary); }
.side-link.active { background: var(--surface-2); color: var(--text-primary); }
.side-link .count { font-size: 12px; color: var(--text-muted); }
.side-link.sub { padding-left: 30px; font-size: 13px; }
.side-link .ico { width: 18px; text-align: center; margin-right: 8px; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 14px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 20px; letter-spacing: -0.01em; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- featured carousel ---------- */
.featured { position: relative; background: linear-gradient(135deg, var(--surface-2), var(--surface-1)); border: 1px solid var(--border); border-radius: 16px; padding: 24px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 28px; min-height: 280px; }
.featured h2 { font-size: 24px; line-height: 1.2; margin: 10px 0 16px; letter-spacing: -0.02em; }
.featured .meta { display: flex; gap: 10px; align-items: center; color: var(--text-muted); font-size: 13px; flex-wrap: wrap; }
.featured-outcomes { display: grid; gap: 8px; }
.featured-nav { position: absolute; right: 18px; top: 18px; display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 12px; }
.featured-nav button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface-2); cursor: pointer; display: grid; place-items: center; }
.featured-chart { min-height: 220px; display: flex; flex-direction: column; }

/* ---------- market cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.card { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 14px; transition: border-color .15s, transform .15s; min-width: 0; }
.card:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.card-head { display: flex; gap: 10px; align-items: flex-start; }
.card-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; font-size: 18px; background: var(--surface-3); }
.card-title { font-weight: 600; line-height: 1.3; font-size: 15px; }
.card-sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.card-foot { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 12px; margin-top: auto; }
.binary-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ob { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; text-align: left; min-width: 0; transition: background .15s, border-color .15s; }
.ob:hover { background: var(--surface-3); border-color: var(--border-strong); }
.ob .ob-label { font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ob .ob-row { display: flex; align-items: baseline; justify-content: space-between; width: 100%; gap: 8px; }
.ob .ob-price { font-size: 20px; font-weight: 700; }
.ob .ob-mult { font-size: 12px; color: var(--text-muted); }
.swatch { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; display: inline-block; }
.multi-rows { display: grid; gap: 6px; }
.mrow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.mrow:hover { background: var(--surface-2); }
.mrow .lbl { display: flex; gap: 8px; align-items: center; min-width: 0; }
.mrow .lbl span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow .px { font-weight: 700; min-width: 42px; text-align: right; }
.mrow .mult { font-size: 12px; color: var(--text-muted); min-width: 46px; text-align: right; }
.bar { height: 4px; background: var(--surface-3); border-radius: 2px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 2px; }
.live-strip { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--surface-2); border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.live-strip .score { font-weight: 800; font-size: 16px; }
.flash-up { animation: flashUp 1s; }
.flash-down { animation: flashDown 1s; }
@keyframes flashUp { 0% { color: var(--up); text-shadow: 0 0 10px rgba(47,208,138,.6); } }
@keyframes flashDown { 0% { color: var(--down); text-shadow: 0 0 10px rgba(255,93,108,.6); } }

/* ---------- explainers ---------- */
.explainers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 36px; }
.explainer { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.explainer h3 { margin: 0 0 6px; font-size: 15px; }
.explainer p { margin: 0; color: var(--text-secondary); font-size: 13px; }
.explainer .n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 12px; margin-bottom: 10px; }

/* ---------- market page ---------- */
.market-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.market-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.market-head .card-icon { width: 56px; height: 56px; font-size: 26px; border-radius: 14px; }
.market-head h1 { margin: 4px 0 8px; font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; }
.crumbs { font-size: 13px; color: var(--text-muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.crumbs a:hover { color: var(--text-primary); }
.stat-row { display: flex; gap: 22px; flex-wrap: wrap; color: var(--text-muted); font-size: 13px; }
.stat-row b { color: var(--text-primary); font-weight: 600; }
.panel { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.panel + .panel { margin-top: 16px; }
.panel h3 { margin: 0 0 14px; font-size: 15px; }
.chart-wrap { position: relative; }
.chart-wrap svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; margin-bottom: 10px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.chart-legend b { color: var(--text-primary); }
.chart-tip { position: absolute; pointer-events: none; background: var(--surface-3); border: 1px solid var(--border-strong); border-radius: 8px; padding: 8px 10px; font-size: 12px; min-width: 140px; box-shadow: 0 8px 24px rgba(0,0,0,.4); z-index: 5; }
.chart-tip .t { color: var(--text-muted); margin-bottom: 4px; }
.chart-tip div.r { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.chart-tip div.r span { display: inline-flex; gap: 6px; align-items: center; color: var(--text-secondary); }
.outcome-table { width: 100%; border-collapse: collapse; }
.outcome-table td, .outcome-table th { padding: 12px 8px; border-top: 1px solid var(--border); text-align: left; }
.outcome-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 600; border-top: 0; padding-top: 0; }
.outcome-table .px { font-size: 18px; font-weight: 700; }
.outcome-table .actions { text-align: right; white-space: nowrap; }
.outcome-table tr.winner td { background: rgba(47,208,138,.06); }
.btn-yes { background: rgba(47, 208, 138, .12); color: var(--up); border-color: transparent; }
.btn-yes:hover { background: rgba(47, 208, 138, .22); }
.btn-no { background: rgba(255, 93, 108, .12); color: var(--down); border-color: transparent; }
.btn-no:hover { background: rgba(255, 93, 108, .22); }

.trade-panel { position: sticky; top: 84px; }
.side-toggle { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 10px; padding: 4px; margin-bottom: 16px; }
.side-toggle button { height: 34px; border: 0; background: none; border-radius: 7px; cursor: pointer; font-weight: 700; color: var(--text-muted); }
.side-toggle button.active { background: var(--surface-3); color: var(--text-primary); }
.outcome-pick { display: grid; gap: 8px; margin-bottom: 16px; }
.outcome-pick button { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; text-align: left; }
.outcome-pick button.active { border-color: var(--accent); background: rgba(198, 244, 50, .06); }
.outcome-pick button .l { display: flex; gap: 8px; align-items: center; min-width: 0; }
.outcome-pick button .l span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amount-box { position: relative; }
.amount-box .input { height: 52px; font-size: 22px; font-weight: 700; padding-left: 30px; }
.amount-box .cur { position: absolute; left: 13px; top: 14px; font-size: 20px; color: var(--text-muted); font-weight: 600; }
.amount-box .unit { position: absolute; right: 13px; top: 17px; font-size: 13px; color: var(--text-muted); }
.quick { display: flex; gap: 6px; margin: 10px 0 16px; }
.quick button { flex: 1; height: 30px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.quick button:hover { color: var(--text-primary); }
.quote { display: grid; gap: 8px; font-size: 13px; margin-bottom: 16px; }
.quote div { display: flex; justify-content: space-between; }
.quote div span:first-child { color: var(--text-muted); }
.quote .big { font-size: 15px; }
.quote .big span:last-child { color: var(--up); font-weight: 700; }
.fine { font-size: 12px; color: var(--text-muted); margin-top: 12px; }

.feed { display: grid; gap: 0; }
.feed-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 13px; }
.feed-row:first-child { border-top: 0; }
.comment-box { display: flex; gap: 8px; margin-bottom: 14px; }
.comment { padding: 12px 0; border-top: 1px solid var(--border); }
.comment .who { font-size: 12px; color: var(--text-muted); margin-bottom: 3px; }
.comment .who b { color: var(--text-secondary); }
.rules { color: var(--text-secondary); white-space: pre-wrap; }

/* ---------- tables / stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stat small { display: block; color: var(--text-muted); font-size: 12px; margin-bottom: 6px; font-weight: 500; }
.stat b { font-size: 24px; letter-spacing: -0.02em; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.r, table.data th.r { text-align: right; }
table.data a:hover { text-decoration: underline; }
.rank { width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; background: var(--surface-3); font-weight: 700; font-size: 12px; }
.rank.r1 { background: var(--accent); color: var(--accent-ink); }
.rank.r2 { background: #d7dde8; color: #111; }
.rank.r3 { background: #c9915f; color: #111; }
.guild-tag { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: var(--surface-3); color: var(--text-secondary); margin-left: 6px; }
.empty { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.hero { border-radius: 16px; padding: 28px; margin-bottom: 24px; background:
  radial-gradient(600px 200px at 85% 0%, rgba(198,244,50,.12), transparent 70%), var(--surface-1); border: 1px solid var(--border); }
.hero h1 { margin: 0 0 8px; font-size: 28px; letter-spacing: -0.02em; }
.hero p { margin: 0; color: var(--text-secondary); max-width: 640px; }
.copy-row { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.copy-row .input { max-width: 420px; font-family: var(--mono); font-size: 13px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
pre.code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px; overflow-x: auto; font: 12.5px/1.55 var(--mono); color: var(--text-secondary); margin: 10px 0 18px; }
.endpoint { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 13px; }
.endpoint code { font-family: var(--mono); overflow-wrap: anywhere; }
.method { font: 700 11px var(--mono); padding: 2px 6px; border-radius: 5px; text-align: center; align-self: start; }
.method.GET { background: rgba(57,135,229,.15); color: #7fb3f0; }
.method.POST { background: rgba(47,208,138,.13); color: var(--up); }
.method.DELETE { background: rgba(255,93,108,.13); color: var(--down); }

/* ---------- wallet ---------- */
.test-banner { background: rgba(240, 180, 41, .1); border: 1px solid rgba(240, 180, 41, .35); color: var(--text-secondary); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 20px; font-size: 13px; }
.test-banner b { color: var(--warn); }
.warn-box { background: var(--surface-2); border-left: 3px solid var(--warn); border-radius: 8px; padding: 10px 12px; font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }
.sim-box { margin-top: 18px; padding: 14px; border: 1px dashed var(--border-strong); border-radius: 10px; font-size: 13px; }
.panel h3 + .stats { margin-top: 0; }
.two-col > .panel + .panel { margin-top: 0; }
.two-col + .panel, .panel + .two-col { margin-top: 20px; }

/* ---------- modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal { width: 100%; max-width: 400px; background: var(--surface-1); border: 1px solid var(--border-strong); border-radius: 16px; padding: 24px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.modal h2 { margin: 0 0 4px; }
.modal p.lead { margin: 0 0 18px; color: var(--text-secondary); }
.err { color: var(--down); font-size: 13px; min-height: 18px; margin: -4px 0 10px; }
.toasts { position: fixed; bottom: 20px; right: 20px; display: grid; gap: 8px; z-index: 200; }
.toast { background: var(--surface-3); border: 1px solid var(--border-strong); border-left: 3px solid var(--accent); padding: 12px 14px; border-radius: 10px; min-width: 260px; max-width: 360px; box-shadow: 0 12px 30px rgba(0,0,0,.5); animation: slideIn .2s; }
.toast.error { border-left-color: var(--down); }
@keyframes slideIn { from { transform: translateY(10px); opacity: 0; } }
footer { border-top: 1px solid var(--border); padding: 28px 24px; color: var(--text-muted); font-size: 13px; display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; max-width: 1440px; margin: 40px auto 0; }
footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
footer a:hover { color: var(--text-primary); }
.skeleton { background: linear-gradient(90deg, var(--surface-1), var(--surface-2), var(--surface-1)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .market-layout { grid-template-columns: minmax(0, 1fr); }
  .trade-panel { position: static; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .sidebar { position: static; max-height: none; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
  .sidebar h4, .sidebar .side-link.sub { display: none; }
  .sidebar .side-link { white-space: nowrap; background: var(--surface-1); border: 1px solid var(--border); }
  .featured { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .featured-nav { position: static; justify-content: flex-end; }
  .nav { display: none; }
  .nav.open { display: flex; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: var(--surface-1); border-bottom: 1px solid var(--border); padding: 8px 16px; }
  .hamburger { display: block; }
  .topbar { padding: 0 16px; gap: 12px; }
  .page { padding: 20px 16px 48px; }
  .ticker { padding: 7px 16px; }
}
@media (max-width: 560px) {
  .logo span { display: none; }
  .search { min-width: 0; }
  .top-right .btn-ghost, .top-right .deposit-btn { display: none; }
  .balance-pill small { display: none; }
  .market-head h1 { font-size: 21px; }
  .outcome-table .mult-col { display: none; }
}
