/* Elybrokers app pages (exchange, Anvil NFT, Smart LP, lockers, launcher, invest, docs …) in the ostium.com style, to
   match the landing page: white canvas with a faint grid, square corners, thin warm borders, Instrument Sans, orange
   #ff5a1d accent. Light theme only (html[data-sb-theme=light]); dark mode keeps the original look. The landing page has
   its own sheet (ostium-home.css). Injected by tools/elysium.mjs. */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600&display=swap');

/* ---------- palette: re-point the shell's theme variables ---------- */
html[data-sb-theme=light] body:not(.home-bp-route),
html[data-sb-theme=light] body:not(.home-bp-route) .shell-v2,
html[data-sb-theme=light] body:not(.home-bp-route) :is(.v2-locker-overlay, .pager-modal) {
  --o-accent: #ff5a1d;
  --o-accent-soft: #fff1ea;
  --o-ink: #17120f;
  --o-line: #ebe7e3;
  --o-grid: rgba(23, 18, 15, .04);
  --v2-accent: #ff5a1d !important;
  --v2-on-accent: #fff !important;
  --v2-canvas: #fff !important;
  --v2-canvas-rgb: 255, 255, 255 !important;
  --v2-surface: #fff !important;
  --v2-surface-rgb: 255, 255, 255 !important;
  --v2-surface-2: #faf8f6 !important;
  --v2-surface-3: #f6f3f0 !important;
  --v2-glass: #f6f3f0 !important;
  --v2-glass-hi: #efeae6 !important;
  --v2-well: #f6f3f0 !important;
  --v2-well-rgb: 246, 243, 240 !important;
  --v2-border: #ebe7e3 !important;
  --v2-text: #17120f !important;
  --v2-text-rgb: 23, 18, 15 !important;
  --v2-hi: #17120f !important;
  --v2-muted: rgba(23, 18, 15, .6) !important;
  --v2-fine: rgba(23, 18, 15, .45) !important;
  --v2-font: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif !important;
}
html[data-sb-theme=light] body:not(.home-bp-route) { background: #fff !important; color: var(--o-ink); }

/* canvas: faint Ostium grid behind the page content */
html[data-sb-theme=light] body:not(.home-bp-route) .shell-v2 {
  background-color: #fff !important;
  background-image: linear-gradient(to right, var(--o-grid) 1px, transparent 1px), linear-gradient(to bottom, var(--o-grid) 1px, transparent 1px) !important;
  background-size: 72px 72px !important;
  font-family: var(--v2-font);
}
html[data-sb-theme=light] body:not(.home-bp-route) .shell-v2 :is(h1, h2, h3, h4, p, a, span, li, button, input, select, textarea, label, td, th, summary) { font-family: inherit; }

/* ---------- square corners everywhere (logos, avatars, dots and spinners stay round) ---------- */
html[data-sb-theme=light] body:not(.home-bp-route) :is(.shell-v2, .v2-locker-overlay, .pager-modal) *:not(img):not(svg):not(svg *):not(canvas):not(iframe):not(video):not(.rounded-full):not([class*="logo"]):not([class*="avatar"]):not([class*="dot"]):not([class*="spin"]):not([class*="radio"]) {
  border-radius: 0 !important;
}

/* ---------- headings: Ostium's light grotesk ---------- */
html[data-sb-theme=light] body:not(.home-bp-route) .shell-v2 :is(h1, h2, h3, .v2-anvil-tt, [class*="title"], [class*="-h1"], [class*="-h2"]) {
  font-weight: 500 !important; letter-spacing: -.012em;
}

/* ---------- sidebar ---------- */
html[data-sb-theme=light] body:not(.home-bp-route) .shell-v2 :is(aside, nav):has(.v2-sitem) {
  background: #fff !important; border-right: 1px solid var(--o-line) !important; box-shadow: none !important;
}
html[data-sb-theme=light] body:not(.home-bp-route) .v2-sitem { color: rgba(23, 18, 15, .55) !important; }
html[data-sb-theme=light] body:not(.home-bp-route) .v2-sitem:hover { color: var(--o-ink) !important; background: #faf8f6 !important; }
html[data-sb-theme=light] body:not(.home-bp-route) .v2-sitem:is(.on, .is-on, [aria-current="page"]) {
  color: var(--o-accent) !important; background: var(--o-accent-soft) !important; box-shadow: inset 2px 0 0 var(--o-accent) !important;
}
html[data-sb-theme=light] body:not(.home-bp-route) .brand-mark { color: var(--o-accent); }

/* ---------- top bar + tabs ---------- */
html[data-sb-theme=light] body:not(.home-bp-route) .v2-anvil-top {
  background: rgba(255, 255, 255, .94) !important; border-bottom: 1px solid var(--o-line) !important; box-shadow: none !important;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
html[data-sb-theme=light] body:not(.home-bp-route) .v2-tab { color: rgba(23, 18, 15, .55) !important; font-weight: 500; background: transparent !important; }
html[data-sb-theme=light] body:not(.home-bp-route) .v2-tab:hover { color: var(--o-ink) !important; }
html[data-sb-theme=light] body:not(.home-bp-route) .v2-tab:is(.on, .is-on, [aria-selected="true"], [aria-current="page"]) {
  color: var(--o-ink) !important; box-shadow: inset 0 -2px 0 var(--o-accent) !important; background: transparent !important;
}
html[data-sb-theme=light] body:not(.home-bp-route) .v2-tab::before,
html[data-sb-theme=light] body:not(.home-bp-route) .v2-tab::after { display: none !important; } /* the original's curved underline */
html[data-sb-theme=light] body:not(.home-bp-route) :is(.sb-quantum-chip, .v2-theme-btn, .sb-ios-chip) {
  background: #fff !important; border: 1px solid var(--o-line) !important; color: var(--o-ink) !important; box-shadow: none !important;
}
html[data-sb-theme=light] body:not(.home-bp-route) .sb-quantum-soon { color: var(--o-accent) !important; }

/* ---------- buttons ---------- */
html[data-sb-theme=light] body:not(.home-bp-route) :is(.v2-btn-p, .v2-anvil-btn-block, .lm-btn-primary, .cv-btn) {
  background: var(--o-accent) !important; color: #fff !important; border: 1px solid var(--o-accent) !important; box-shadow: none !important; font-weight: 500 !important;
}
html[data-sb-theme=light] body:not(.home-bp-route) :is(.v2-btn-p, .v2-anvil-btn-block, .lm-btn-primary, .cv-btn):hover { background: #e94d12 !important; }
html[data-sb-theme=light] body:not(.home-bp-route) .lm-btn { background: #fff !important; border: 1px solid var(--o-line) !important; color: var(--o-ink) !important; }

/* ---------- cards / panels: white, thin border, no soft shadows ---------- */
html[data-sb-theme=light] body:not(.home-bp-route) .shell-v2 :is(.lm-panel, .lm-swap-card, .lm-nft-card, .lm-stat, .lm-callout, [class*="-card"]:not([class*="card-art"]):not(img), [class*="-qcard"], [class*="-panel"], [class*="-tile"], .v2-locker-stat) {
  box-shadow: none !important;
}
html[data-sb-theme=light] body:not(.home-bp-route) .shell-v2 :is(.lm-panel, .lm-swap-card, .lm-nft-card, .lm-stat, .lm-callout) {
  background: #fff !important; border-color: var(--o-line) !important;
}
html[data-sb-theme=light] body:not(.home-bp-route) :is(.lm-panel-header, .lm-table-head) { background: #faf8f6 !important; }
html[data-sb-theme=light] body:not(.home-bp-route) :is(.lm-input, .lm-tab, .lm-table-wrap, .lm-token-pill, .lm-progress) { background: #faf8f6 !important; border-color: var(--o-line) !important; }
html[data-sb-theme=light] body:not(.home-bp-route) .shell-v2 :is(input, select, textarea):focus { outline: 1px solid var(--o-accent) !important; outline-offset: 0; }

/* page-level stat strips (Smart LP / lockers): Ostium's ruled cells */
html[data-sb-theme=light] body:not(.home-bp-route) .v2-locker-stat { background: #fff !important; border-color: var(--o-line) !important; }

/* status footer */
html[data-sb-theme=light] body:not(.home-bp-route) .v2-status-foot { background: #fff !important; border-top: 1px solid var(--o-line) !important; }

/* ---------- brand mark (all pages, both themes): the drawn briefcase becomes the handshake tile ---------- */
svg.brand-mark { background: url('/brand-mark.svg') center / contain no-repeat !important; color: transparent !important; }
svg.brand-mark > * { display: none !important; }

/* project / token cards (Special Project pages): the original keeps them dark while light mode turns text-white dark.
   Ostium look: white card, thin border, dark text. */
html[data-sb-theme=light] body:not(.home-bp-route) [class*="from-[var(--dpp-card-from)]"] {
  background: #fff !important; border: 1px solid var(--o-line) !important;
}

/* the Pager window (opens over any page): square like the rest of the Ostium look */
html[data-sb-theme=light] .pager-modal { border-radius: 0 !important; }
