/*!
 * Zelos — shared dark theme, full-width layout system.
 *
 * Loaded by pages that have been migrated to the new full-width design
 * (starting with index.html). Pages not yet migrated keep their own inline
 * styles until they're rebuilt — this file doesn't touch them.
 *
 * Dark-first on purpose: every serious trading/market site (TradingView,
 * Robinhood, Bloomberg terminal-style dashboards) defaults to dark, and the
 * reference design is dark-only. Light mode can come back later as its own
 * pass if it turns out people want it.
 */

/* Cross-page navigation fade. This is a genuine multi-page site (every nav
   is a full browser navigation, not client-side routing), which is what
   made switching pages feel like a hard "glitch" — a blank flash, then
   everything (including the 3D globe) reinitializing from scratch. The
   View Transitions API gives same-origin navigations an automatic
   cross-fade with zero JS: supporting browsers (Chrome/Edge) get a smooth
   transition, everything else just falls back to today's plain navigation
   — no regression either way. */
@view-transition {
  navigation: auto;
}

/* Motion tokens: one timing/easing vocabulary for the whole site.
   fast = hovers, carets, small state changes; base = panels and menus
   opening; slow = page/section entrances. Motion explains a change
   (navigation, state, trading, progress) and never gates an action. */
:root{
  --dur-fast:120ms;
  --dur-base:180ms;
  --dur-slow:260ms;
  --ease-out:cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out:cubic-bezier(0.45, 0, 0.25, 1);
}
/* The nav stays put while page content cross-fades between pages. */
.site-nav{ view-transition-name: site-nav; }
::view-transition-old(root), ::view-transition-new(root){ animation-duration:var(--dur-base); }
@keyframes zm-rise{ from{ opacity:0; transform:translateY(-4px); } to{ opacity:1; transform:none; } }
@media (prefers-reduced-motion: reduce){
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*){ animation:none !important; }
  .nav-drop-panel, .site-nav.is-open .nav-mobile-panel{ animation:none !important; }
}

:root{
  color-scheme: dark;

  /* -- surfaces: near-black page, slightly lifted cards/nav. Black is the
     default theme; Blue and White (below) only swap these surface/text
     tokens. -- */
  --bg:#0c0d10;
  --bg-soft:#101216;
  --surface:#15171c;
  --surface-2:#1a1d23;
  --surface-hover:#22252c;
  --border:#2b2e35;
  --border-soft:#1d1f24;
  --nav-bg:rgba(10,11,14,0.88);

  /* -- text -- */
  --ink:#f4f5f7;
  --ink-2:#d6d9de;
  --muted:#9599a3;
  --muted-2:#5c6068;

  /* chart chrome that has to flip with the background */
  --chart-bg:rgba(0,0,0,0.25);
  --chart-grid:rgba(255,255,255,0.06);
  --chart-cross:rgba(255,255,255,0.35);
  --chart-label-ink:#0b0c0f;

  /* -- brand accent (electric blue — kept as the interactive / "up" color, now
     the one accent that stays fixed across all three themes) -- */
  --accent:#4a86ff;
  --accent-ink:#f5f8ff;
  --accent-soft:#182a4a;
  --accent-line:#2c4d8a;
  --accent-glow:rgba(74,134,255,0.42);

  /* -- secondary accent (violet — Options Scanner, AI/knowledge) -- */
  --violet:#8f7bf6;
  --violet-soft:#241f3f;
  --violet-glow:rgba(143,123,246,0.35);

  /* -- gold (hover glow / premium accent) -- */
  --gold:#e8b23d;
  --gold-soft:#3a2a0c;
  --gold-glow:rgba(232,178,61,0.5);

  /* -- ambient green ("bullish" shadow/glow, used decoratively — not a UI accent) -- */
  --bull:#3ecb7c;
  --bull-glow:rgba(62,203,124,0.28);

  /* -- status / bear-red (matrix rain, dots, down-moves, alerts, ambient glow) -- */
  --amber:#f2b33d;
  --amber-soft:#3a2a10;
  --danger:#e0483f;
  --danger-soft:#3a1712;
  --danger-glow:rgba(224,72,63,0.28);

  /* -- candlestick convention, used sitewide: up = blue, down = cream/white -- */
  --candle-up:var(--accent);
  --candle-down:var(--ink);

  --mono:'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --sans:'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;

  --shell:1640px;
  --radius-sm:2px;
  --radius:3px;
  --radius-lg:4px;

  /* aliases so SVG art carried over from the old theme (var(--risk)/var(--card)/
     var(--line)/var(--paper)) keeps working without re-touching every coordinate */
  --risk:var(--danger);
  --card:var(--surface);
  --line:var(--border);
  --paper:var(--bg);
}

/* ---- background themes: Black (default, tokens above), Blue and White.
   Toggled via [data-theme] on <html> by zelos-theme-toggle.js. Only the
   surfaces/text shift — accent blue, violet, gold, bull-green and
   danger-red stay the same in every theme so charts, chips and alerts
   always read the same way. ---- */
:root[data-theme="black"]{ color-scheme:dark; }
:root[data-theme="blue"]{
  color-scheme:dark;
  --bg:#081226;
  --bg-soft:#0b1830;
  --surface:#0f1e3a;
  --surface-2:#132544;
  --surface-hover:#1a2f55;
  --border:#243d68;
  --border-soft:#172a4c;
  --nav-bg:rgba(7,15,32,0.88);
  --ink:#eef3ff;
  --ink-2:#cbd7ef;
  --muted:#8ea3c8;
  --muted-2:#586d94;
  --accent-soft:#16305e;
  --chart-bg:rgba(3,9,22,0.45);
}
:root[data-theme="white"]{
  color-scheme:light;
  --bg:#f4f5f8;
  --bg-soft:#eceef2;
  --surface:#ffffff;
  --surface-2:#f3f4f7;
  --surface-hover:#e9ecf1;
  --border:#d3d8e0;
  --border-soft:#e3e6eb;
  --nav-bg:rgba(255,255,255,0.9);
  --ink:#12151b;
  --ink-2:#2d323b;
  --muted:#5b6370;
  --muted-2:#98a0ac;
  --accent:#2f6bea;
  --accent-soft:#e2ebff;
  --accent-line:#9dbbff;
  --accent-glow:rgba(47,107,234,0.28);
  --violet-soft:#ece8ff;
  --gold:#b98110;
  --gold-soft:#fbefd2;
  --bull:#1f9d5a;
  --amber-soft:#fcefd6;
  --danger:#d23a31;
  --danger-soft:#fbe2df;
  --chart-bg:#fbfbfd;
  --chart-grid:rgba(0,0,0,0.07);
  --chart-cross:rgba(0,0,0,0.35);
  --chart-label-ink:#ffffff;
}

/* ---------------------------------------------------------------- reset */
.zt *{ box-sizing:border-box; }
body.zt-body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--sans);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
.zt h1,.zt h2,.zt h3{ text-wrap:balance; margin:0; font-weight:700; letter-spacing:-0.01em; }
.zt p{ margin:0; }
.zt a{ color:inherit; }
.zt [hidden]{ display:none !important; }

.shell{ max-width:var(--shell); margin:0 auto; padding-inline:clamp(18px, 3.2vw, 56px); }
@media (max-width:640px){ .shell{ padding-inline:18px; } }

/* narrower reading column for long-form subpages (strategy detail pages etc.) —
   nav/hero-band/footer stay full-width via .shell, but body copy reads better
   constrained, same pattern most SaaS docs/landing pages use */
.shell-narrow{ max-width:800px; margin:0 auto; padding-inline:24px; }
@media (max-width:640px){ .shell-narrow{ padding-inline:18px; } }

.eyebrow{
  font-family:var(--mono); font-size:0.75rem; letter-spacing:0.12em;
  text-transform:uppercase; color:var(--accent);
}

/* ---------------------------------------------------------------- nav */
.site-nav{
  position:sticky; top:0; z-index:100;
  background:var(--nav-bg);
  backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid var(--border-soft);
}
.site-nav .shell{
  display:flex; align-items:center; justify-content:space-between;
  padding-block:14px; gap:20px;
}
.nav-brand{
  display:flex; align-items:center; gap:10px; text-decoration:none;
  font-family:var(--mono); font-weight:700; font-size:1.05rem; color:var(--ink);
  flex-shrink:0;
}
.nav-brand .mark-dot{
  width:9px; height:9px; border-radius:50%; background:var(--danger);
  box-shadow:0 0 0 3px var(--danger-soft);
}
.nav-primary{ display:flex; align-items:center; gap:4px; }
.nav-link{
  font-family:var(--sans); font-size:0.9rem; font-weight:500; color:var(--ink-2);
  text-decoration:none; padding:9px 12px; border-radius:3px; white-space:nowrap;
}
.nav-link:hover{ color:var(--ink); background:var(--surface-2); }
.nav-link.is-active{ color:var(--accent); }

.nav-drop{ position:relative; }
.nav-drop-btn{
  font-family:var(--sans); font-size:0.9rem; font-weight:500; color:var(--ink-2);
  background:none; border:none; padding:9px 10px; border-radius:3px; cursor:pointer;
  display:inline-flex; align-items:center; gap:5px;
}
.nav-drop-btn:hover{ color:var(--ink); background:var(--surface-2); }
.nav-drop-btn.is-active{ color:var(--accent); }
.nav-drop-caret{ font-size:0.65rem; transition:transform var(--dur-fast) var(--ease-out); opacity:0.7; }
.nav-drop-btn[aria-expanded="true"] .nav-drop-caret{ transform:rotate(180deg); }
.nav-drop-panel{
  position:absolute; top:calc(100% + 10px); left:0; min-width:210px;
  background:var(--surface); border:1px solid var(--border); border-radius:3px;
  padding:8px; display:flex; flex-direction:column; gap:1px; z-index:50;
  box-shadow:0 16px 40px rgba(0,0,0,0.45);
  animation:zm-rise var(--dur-base) var(--ease-out);
}
.nav-drop-panel a{
  font-size:0.88rem; color:var(--ink-2); text-decoration:none; padding:9px 11px;
  border-radius:3px; display:flex; flex-direction:column; gap:1px;
}
.nav-drop-panel a:hover{ background:var(--surface-2); color:var(--ink); }
.nav-drop-panel a small{ color:var(--muted); font-size:0.74rem; font-weight:400; }
.nav-drop-panel hr{ border:none; border-top:1px solid var(--border-soft); margin:6px 2px; }

.nav-auth{ display:flex; align-items:center; gap:10px; flex-shrink:0; }

/* -- background theme toggle: a three-swatch pill (Blue / White / Black).
   Click a swatch to pick it, or anywhere else on the pill to cycle. -- */
.theme-toggle{
  position:relative; flex-shrink:0; width:74px; height:28px; padding:3px;
  border-radius:999px; border:1px solid var(--border); background:var(--surface);
  cursor:pointer; display:inline-flex; align-items:center;
}
.theme-toggle:hover{ border-color:var(--muted-2); }
.theme-toggle-track{
  position:relative; z-index:1; width:100%; height:100%; display:flex; align-items:center; justify-content:space-between;
  padding:0 5px;
}
.theme-toggle-track i{ width:10px; height:10px; border-radius:50%; flex-shrink:0; box-shadow:0 0 0 1px rgba(127,127,127,0.45); }
.theme-toggle-track i.sw-blue{ background:#1d4fd8; }
.theme-toggle-track i.sw-white{ background:#ffffff; }
.theme-toggle-track i.sw-black{ background:#0c0d10; }
.theme-toggle-knob{
  position:absolute; top:2px; left:2px; width:22px; height:22px; border-radius:50%;
  background:transparent; border:2px solid var(--accent); box-shadow:0 0 8px var(--accent-glow);
  transition:transform 0.18s ease;
}
:root[data-theme="white"] .theme-toggle-knob{ transform:translateX(23px); }
:root[data-theme="black"] .theme-toggle-knob{ transform:translateX(46px); }
@media (prefers-reduced-motion: reduce){ .theme-toggle-knob{ transition:none; } }

/* mobile nav collapse */
.nav-hamburger{
  display:none; align-items:center; justify-content:center; width:38px; height:38px;
  border-radius:3px; border:1px solid var(--border); background:var(--surface); color:var(--ink);
  cursor:pointer; font-size:1.05rem; flex-shrink:0;
}
.nav-mobile-panel{
  display:none; flex-direction:column; gap:2px; padding:10px 0 14px;
  border-top:1px solid var(--border-soft);
  /* Fix: .site-nav is position:sticky, so once the open menu's link list is
     taller than the viewport, the extra items get clipped at the sticky
     ceiling instead of being reachable — a finger-drag over the menu just
     scrolled the whole (short, already-pinned) page instead of the menu
     itself. Giving the panel its own bounded, scrollable box makes it
     independently scrollable so the rest of the list is always reachable. */
  /* fallback only: zelos-theme-toggle.js measures where the panel really
     starts (the header wraps to two rows on phones) and sets the exact height */
  max-height:calc(100vh - 130px);
  max-height:calc(100dvh - 130px);
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
}
.nav-mobile-panel a{
  font-size:0.92rem; color:var(--ink-2); text-decoration:none; padding:11px 4px; border-radius:3px;
}
.nav-mobile-panel a:hover{ color:var(--ink); background:var(--surface-2); }
.nav-mobile-panel .nav-mobile-label{
  font-family:var(--mono); font-size:0.68rem; letter-spacing:0.08em; text-transform:uppercase;
  color:var(--muted); padding:10px 4px 2px;
}
@media (max-width:860px){
  .nav-primary{ display:none; }
  .nav-hamburger{ display:flex; }
  .site-nav.is-open .nav-mobile-panel{ display:flex; animation:zm-rise var(--dur-base) var(--ease-out); }
  .site-nav .shell{ flex-wrap:wrap; }
  .nav-mobile-panel{ width:100%; }
}
.btn{
  font-family:var(--sans); font-weight:600; font-size:0.88rem; padding:10px 16px;
  border-radius:3px; border:1px solid var(--border); background:transparent; color:var(--ink);
  cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; gap:6px;
  transition:border-color 0.15s ease, background 0.15s ease;
}
.btn:hover{ border-color:var(--muted-2); }
.btn-primary{
  background:var(--accent); border-color:var(--accent); color:var(--accent-ink);
}
.btn-primary:hover{ filter:brightness(1.08); border-color:var(--accent); }
.btn-ghost{ border-color:transparent; }
.btn-ghost:hover{ background:var(--surface-2); border-color:transparent; }
.btn-sm{ padding:7px 12px; font-size:0.8rem; }

/* signed-in account chip / dropdown */
.account-btn{
  display:flex; align-items:center; gap:8px; font-family:var(--sans); font-size:0.86rem;
  font-weight:600; color:var(--ink); background:var(--surface); border:1px solid var(--border);
  padding:7px 12px 7px 8px; border-radius:3px; cursor:pointer;
}
.account-btn:hover{ border-color:var(--muted-2); }
.account-avatar{
  width:24px; height:24px; border-radius:50%; background:var(--accent-soft); color:var(--accent);
  display:flex; align-items:center; justify-content:center; font-size:0.72rem; font-weight:700;
  flex-shrink:0;
}

/* auth popover */
.auth-pop{
  position:absolute; top:calc(100% + 10px); right:0; width:280px;
  background:var(--surface); border:1px solid var(--border); border-radius:3px;
  padding:18px; display:flex; flex-direction:column; gap:10px; z-index:60;
  box-shadow:0 20px 48px rgba(0,0,0,0.5);
}
.auth-pop h3{ font-size:0.98rem; }
.auth-pop input{
  font-family:var(--sans); font-size:0.88rem; padding:10px 11px; border-radius:3px;
  border:1px solid var(--border); background:var(--bg-soft); color:var(--ink); width:100%;
}
.auth-pop input:focus{ outline:none; border-color:var(--accent); }
.auth-row{ display:flex; gap:8px; }
.auth-row .btn{ flex:1; justify-content:center; }
.auth-divider{ display:flex; align-items:center; gap:10px; color:var(--muted); font-size:0.72rem; }
.auth-divider::before, .auth-divider::after{ content:""; flex:1; height:1px; background:var(--border); }
.auth-msg{ font-size:0.78rem; color:var(--muted); min-height:1.1em; }
.auth-msg.is-error{ color:var(--danger); }
.auth-switch{ font-size:0.78rem; color:var(--muted); text-align:center; }
.auth-switch button{ background:none; border:none; color:var(--accent); font-size:inherit; cursor:pointer; padding:0; font-family:inherit; }

/* ---------------------------------------------------------------- hero */
.hero{ position:relative; overflow:hidden; padding-block:64px 40px; }
.hero-grid{
  display:grid; grid-template-columns:1.05fr 0.95fr; gap:40px; align-items:center;
  position:relative; z-index:3;
}
@media (max-width:900px){ .hero-grid{ grid-template-columns:1fr; } }

.hero h1{ font-size:clamp(2.2rem, 4.6vw, 3.4rem); margin-top:10px; }
.hero h1 em{ font-style:normal; color:var(--accent); }
.hero .lede{ margin-top:18px; font-size:1.08rem; color:var(--ink-2); max-width:52ch; }
.hero .cta-note{ margin-top:16px; font-family:var(--mono); font-size:0.76rem; color:var(--muted); max-width:52ch; }
.hero-ctas{ display:flex; gap:12px; margin-top:26px; flex-wrap:wrap; }

/* drifting dot-grid backdrop, GPU-cheap (background-position only).
   Fixed to the viewport on <body> (not scoped to .hero) so it covers the
   full height of every page, long/scrolled ones included, not just the
   hero banner at the top. z-index:-1 keeps it behind all normal content;
   body's own background (painted at the canvas level) sits beneath it. */
body.zt-body::before{
  content:""; position:fixed; inset:-10% -10%; z-index:-1; pointer-events:none;
  background-image:radial-gradient(rgba(248,239,221,0.10) 1px, transparent 1px);
  background-size:26px 26px;
  animation:zt-grid-drift 50s linear infinite;
  opacity:0.6;
}
/* Market-mood hook: zelos-mood.js sets data-mood on <body> from the latest
   alert's regime (bullish/bearish/neutral). Neutral/unknown just leaves
   --mood-tint transparent, i.e. the default ambient glow below with no tint. */
body.zt-body{ --mood-tint: transparent; }
body.zt-body[data-mood="bull"]{ --mood-tint: rgba(62,203,124,0.10); }
body.zt-body[data-mood="bear"]{ --mood-tint: rgba(224,72,63,0.10); }
body.zt-body::after{
  content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
  /* fewer, larger, lower-opacity pools than before, and mix-blend-mode:screen
     so they read as light glowing through the dark surface rather than a
     flat color wash — calmer and closer to "atmosphere" than "banner glow" */
  background:radial-gradient(ellipse 60% 55% at 100% 0%, rgba(224,72,63,0.10), transparent 72%),
             radial-gradient(ellipse 60% 55% at 0% 100%, rgba(62,203,124,0.09), transparent 72%),
             radial-gradient(ellipse 90% 80% at 50% 50%, var(--mood-tint), transparent 74%);
  mix-blend-mode:screen;
  animation:zt-glow-breathe 28s ease-in-out infinite;
  transition:background 1.2s ease;
}
@keyframes zt-glow-breathe{ 0%,100%{ opacity:0.7; } 50%{ opacity:1; } }
@media (prefers-reduced-motion: reduce){
  body.zt-body::after{ animation:none; opacity:0.85; }
}
@keyframes zt-grid-drift{ from{ background-position:0 0; } to{ background-position:520px 260px; } }

/* falling matrix-style digit rain — spans the whole hero band, unboxed, so
   the numbers read as texture on the page itself rather than content stuck
   inside a card. Sits between the dot-grid and the ambient glow washes. Kept
   faint and concentrated toward the chart side so it doesn't fight the
   headline for attention. */
.hero-rain{
  position:absolute; inset:0; z-index:1; display:flex; justify-content:space-between; gap:2px;
  overflow:hidden; opacity:0.13; pointer-events:none;
  mask-image:radial-gradient(ellipse 52% 62% at 74% 46%, black 30%, transparent 78%);
  -webkit-mask-image:radial-gradient(ellipse 52% 62% at 74% 46%, black 30%, transparent 78%);
}
.hero-rain-col{ position:relative; flex:1 1 0; overflow:hidden; }
.hero-rain-track{
  position:absolute; top:0; left:0; right:0; display:flex; flex-direction:column;
  align-items:center; gap:18px; font-family:var(--mono); font-size:0.74rem; font-weight:600;
  animation:zt-matrix-fall linear infinite;
}
.hero-rain-track .g{ color:var(--bull); }
.hero-rain-track .r{ color:var(--danger); }
@keyframes zt-matrix-fall{ from{ transform:translateY(-50%); } to{ transform:translateY(0%); } }

/* ---- animated hero visual: candlesticks + line chart float directly on the
   page — no card, no border, just soft drop-shadows for depth (SVG + CSS,
   no canvas, no JS animation loop) ---- */
.hero-visual{ position:relative; z-index:3; display:flex; align-items:center; justify-content:center; min-height:420px; min-width:0; }
.zmark{ position:relative; width:min(600px, 96%); aspect-ratio:3/2.05; }
.zmark.is-globe{ display:flex; flex-direction:column; width:min(560px, 96%); aspect-ratio:1/1; min-height:340px; }
.zmark.is-globe .globe-wrap{ flex:1; min-height:0; }
/* aspect-ratio fallback for older browsers that ignore it: without it
   .globe-wrap has nothing to size against and can collapse toward 0 height,
   which is what makes the globe render stretched/"cut off". */
@supports not (aspect-ratio:1/1){
  .zmark.is-globe{ height:min(560px, 90vw); }
}
.zmark-glow{
  position:absolute; inset:2%; border-radius:4px; z-index:0; pointer-events:none;
  background:radial-gradient(ellipse at 50% 45%, rgba(0,0,0,0.4), transparent 72%);
  filter:blur(22px);
}
.zmark-label{
  position:relative; z-index:2; display:flex; align-items:center; gap:8px;
  font-family:var(--mono); font-size:0.8rem; letter-spacing:0.04em; color:var(--muted);
  margin-bottom:16px;
}
.zmark-label .dot{
  width:8px; height:8px; border-radius:50%; background:var(--danger);
  box-shadow:0 0 9px var(--danger-glow);
}
.zmark-body{ position:relative; z-index:2; }

/* one real OHLC candlestick chart — wicks + bodies + a faint price grid,
   drawn once (not looping) so it reads like an actual 5-minute stock chart
   rather than an animated toy; only the last print gets a live pulse */
.zmark-ohlc{
  display:block; width:100%; height:auto; overflow:visible;
  filter:drop-shadow(0 14px 22px rgba(0,0,0,0.55));
}
.zmark-grid{ stroke:var(--border); stroke-width:1; opacity:0.55; }
.zmark-price-label{
  font-family:var(--mono); font-size:9.5px; fill:var(--muted); dominant-baseline:middle;
}
.zmark-candle{
  opacity:0; transform-origin:center;
  animation:zt-candle-in 0.5s ease-out forwards;
}
.zmark-wick{ stroke:var(--candle-up); stroke-width:1.6; }
.zmark-body{ fill:var(--candle-up); }
.zmark-candle.dn .zmark-wick{ stroke:var(--candle-down); }
.zmark-candle.dn .zmark-body{ fill:var(--candle-down); }
@keyframes zt-candle-in{
  from{ opacity:0; transform:scaleY(0.4) translateY(6px); }
  to{ opacity:1; transform:scaleY(1) translateY(0); }
}
.zmark-pulse{ fill:var(--accent); }
.zmark-pulse-ring{
  fill:none; stroke:var(--accent); stroke-width:1.4;
  animation:zt-pulse-ring 2.2s ease-out infinite;
  animation-delay:1s;
}
@keyframes zt-pulse-ring{
  0%{ opacity:0.7; transform:scale(1); }
  100%{ opacity:0; transform:scale(3.2); }
}
.zmark-ohlc, .zmark-pulse, .zmark-pulse-ring{ transform-box:fill-box; }

.zmark-terminal{
  margin-top:20px; padding-top:12px; border-top:1px dashed var(--border);
  overflow:hidden; position:relative; z-index:1;
  mask-image:linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image:linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.zmark-terminal-track{
  display:flex; gap:40px; width:max-content; white-space:nowrap;
  font-family:var(--mono); font-size:0.86rem; color:var(--ink-2);
  animation:zt-ticker-scroll 15s linear infinite;
}
.zmark-terminal-track span{ display:inline-flex; align-items:center; gap:6px; }
/* sitewide candlestick/ticker convention: up = blue, down = cream/white */
.zmark-terminal-track .up{ color:var(--candle-up); }
.zmark-terminal-track .dn{ color:var(--candle-down); }
@keyframes zt-ticker-scroll{ from{ transform:translateX(0); } to{ transform:translateX(-50%); } }

.zmark-chip{
  position:absolute; z-index:3; display:flex; align-items:center; gap:6px;
  background:var(--surface); border:1px solid var(--border); border-radius:3px;
  padding:7px 12px; font-family:var(--mono); font-size:0.72rem; color:var(--ink-2);
  box-shadow:0 10px 24px rgba(0,0,0,0.4);
  animation:zt-float 6s ease-in-out infinite;
  opacity:0;
  animation:zt-chip-in 0.6s ease forwards, zt-float 6s ease-in-out infinite;
}
.zmark-chip .up{ color:var(--accent); }
.zmark-chip .dn{ color:var(--danger); }
.zmark-chip.c1{ top:6%; left:-4%; animation-delay:0.4s, 0.4s; }
.zmark-chip.c2{ bottom:16%; right:-6%; animation-delay:0.9s, 0.9s; }
.zmark-chip.c3{ bottom:-2%; left:14%; animation-delay:1.4s, 1.4s; }
@keyframes zt-chip-in{ from{ opacity:0; transform:translateY(8px); } to{ opacity:1; transform:translateY(0); } }
@keyframes zt-float{ 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-7px); } }

@media (prefers-reduced-motion: reduce){
  body.zt-body::before, .zmark-candle, .zmark-pulse-ring, .zmark-terminal-track, .hero-rain-track, .zmark-chip{
    animation:none !important;
  }
  .zmark-candle{ opacity:1; }
  .zmark-chip{ opacity:1; }
}
@media (max-width:900px){ .hero-visual{ min-height:280px; margin-top:8px; } }

/* ---------------------------------------------------------------- ticker tape */
.ticker-strip{
  border-block:1px solid var(--border-soft);
  background:var(--surface);
  padding-block:0;
  min-height:42px;
}

/* zelos-market.js widgets style themselves (styles are injected by the script). */

/* ---------------------------------------------------------------- sections */
.section{ padding-block:56px; }
.section-tight{ padding-block:28px 56px; }
.section-head{ display:flex; align-items:baseline; justify-content:space-between; gap:16px; margin-bottom:18px; }
.section-head h2{ font-size:1.5rem; }
.section-head a{ font-family:var(--mono); font-size:0.8rem; color:var(--accent); text-decoration:none; white-space:nowrap; }
.section-head a:hover{ text-decoration:underline; }

/* ---------------------------------------------------------------- dashboard grid */
.dash-grid{ display:grid; grid-template-columns:1fr 340px; gap:28px; align-items:start; }
@media (max-width:980px){ .dash-grid{ grid-template-columns:1fr; } }

.card{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
  padding:20px 22px;
}

/* strategy cards */
.bot-grid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:18px; }
@media (max-width:980px){ .bot-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:640px){ .bot-grid{ grid-template-columns:1fr; } }
.bot-card{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
  padding:20px 20px 18px; display:flex; flex-direction:column; gap:12px; position:relative;
  transition:border-color 0.15s ease, transform 0.15s ease;
}
.bot-card:hover{ border-color:var(--accent-line); transform:translateY(-2px); }
.bot-card.is-violet:hover{ border-color:rgba(143,123,246,0.5); }
.bot-card-top{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.tag{
  font-family:var(--mono); font-size:0.66rem; letter-spacing:0.06em; text-transform:uppercase;
  border-radius:3px; padding:4px 10px; white-space:nowrap;
  transition:color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.tag-live{ color:var(--accent); background:var(--accent-soft); }
.tag-live:hover{
  color:var(--gold); background:var(--gold-soft);
  box-shadow:0 0 0 1px rgba(232,178,61,0.4), 0 0 14px var(--gold-glow);
}
.tag-soon{ color:var(--muted); background:var(--surface-2); }
.tag-premium{
  color:var(--amber); background:var(--amber-soft); font-weight:700;
}
.bot-cadence{ font-family:var(--mono); font-size:0.7rem; color:var(--muted); }
.bot-card h3{ font-size:1.1rem; }
.bot-desc{ font-size:0.86rem; color:var(--ink-2); line-height:1.5; }
.bot-card svg{ width:100%; height:auto; display:block; }
.bot-backtest{ font-family:var(--mono); font-size:0.66rem; color:var(--muted); border-top:1px solid var(--border-soft); padding-top:10px; }
.bot-cta{
  font-family:var(--sans); font-weight:700; font-size:0.85rem; color:var(--accent-ink);
  background:var(--accent); padding:10px 16px; border-radius:3px; text-decoration:none;
  text-align:center; display:block; margin-top:2px;
}
.bot-cta:hover{ filter:brightness(1.08); }
.bot-cta.is-violet{ background:var(--violet); }
.bot-cta.is-tbd{
  background:transparent; border:1px solid var(--border); color:var(--muted); cursor:default;
}

/* upcoming teaser row */
.upcoming-row{ display:grid; grid-template-columns:repeat(4, 1fr); gap:14px; }
@media (max-width:900px){ .upcoming-row{ grid-template-columns:1fr 1fr; } }
@media (max-width:480px){ .upcoming-row{ grid-template-columns:1fr; } }
.upcoming-card{
  border:1px solid var(--border-soft); border-radius:3px; padding:14px 14px 12px;
  display:flex; flex-direction:column; gap:8px; background:var(--bg-soft);
}
.upcoming-icon{
  width:34px; height:34px; border-radius:3px; background:var(--surface-2); color:var(--accent);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.upcoming-icon svg{ width:19px; height:19px; }
.upcoming-card h4{ font-size:0.92rem; margin:0; }
.upcoming-card p{ font-size:0.78rem; color:var(--muted); line-height:1.45; }

/* vote-for-next-strategy: a small dashed bar-meter, same visual language as
   the mini charts on the dashboard's agent cards (dashed gridline look). */
.upcoming-vote{ margin-top:auto; padding-top:10px; border-top:1px dashed var(--border-soft); }
.upcoming-vote-row{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.upcoming-vote-count{ font-family:var(--mono); font-size:0.72rem; color:var(--muted); }
.upcoming-vote-btn{
  font-family:var(--sans); font-size:0.72rem; font-weight:700; letter-spacing:0.02em;
  padding:5px 10px; border-radius:999px; border:1px solid var(--border); background:transparent;
  color:var(--ink-2); cursor:pointer; transition:border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  display:inline-flex; align-items:center; gap:5px;
}
.upcoming-vote-btn:hover{ border-color:var(--accent); color:var(--ink); }
.upcoming-vote-btn.is-voted{ background:var(--accent-soft); border-color:var(--accent); color:var(--accent); }
.upcoming-vote-track{
  margin-top:8px; height:6px; border-radius:999px; background-image:repeating-linear-gradient(90deg, var(--border-soft) 0 4px, transparent 4px 8px);
  background-color:var(--surface-2); overflow:hidden; position:relative;
}
.upcoming-vote-fill{
  height:100%; border-radius:999px; background:var(--accent); width:0%;
  transition:width 0.4s ease;
}
.upcoming-card.is-leading{ border-color:var(--accent); box-shadow:0 0 0 1px var(--accent); }

/* sidebar cards */
.dash-side{ display:flex; flex-direction:column; gap:18px; }
.side-card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:18px 20px; }
.side-card-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; gap:10px; }
.side-card-head h3{ font-size:0.95rem; }
.side-card-head a{ font-family:var(--mono); font-size:0.72rem; color:var(--accent); text-decoration:none; }

.alert-card{ cursor:pointer; border-color:var(--border); }
.alert-card:hover{ border-color:var(--accent-line); }
.alert-card-top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:4px; }
.alert-ticker-big{ font-family:var(--mono); font-weight:700; font-size:1.5rem; }
.alert-change{ font-family:var(--mono); font-weight:700; font-size:0.9rem; }
.alert-change.up{ color:var(--accent); }
.alert-change.dn{ color:var(--danger); }
.alert-stamp{ font-family:var(--mono); font-size:0.7rem; color:var(--muted); margin-bottom:8px; }
.alert-desc{ font-size:0.82rem; color:var(--ink-2); line-height:1.5; }
.alert-view-btn{ margin-top:12px; width:100%; justify-content:center; }

.feature-list{ display:flex; flex-direction:column; gap:9px; }
.feature-item{ display:flex; align-items:flex-start; gap:9px; font-size:0.85rem; color:var(--ink-2); }
.feature-check{ color:var(--accent); flex-shrink:0; margin-top:1px; }

/* ---------------------------------------------------------------- footer */
.site-footer{
  border-top:1px solid var(--border-soft); background:var(--bg-soft); margin-top:40px;
  padding-block:36px 44px;
}
.footer-grid{ display:flex; flex-wrap:wrap; justify-content:space-between; gap:24px; }
.footer-brand{ display:flex; align-items:center; gap:8px; font-family:var(--mono); font-weight:700; color:var(--ink); }
.footer-links{ display:flex; flex-wrap:wrap; gap:16px; font-size:0.84rem; }
.footer-links a{ color:var(--ink-2); text-decoration:none; }
.footer-links a:hover{ color:var(--accent); }
.footer-fine{ margin-top:20px; font-size:0.74rem; color:var(--muted); line-height:1.6; max-width:80ch; }

/* ---------------------------------------------------------------- modal */
.zmodal-overlay{
  position:fixed; inset:0; background:rgba(4,6,11,0.72); backdrop-filter:blur(3px);
  z-index:200; display:flex; align-items:flex-end; justify-content:center;
}
@media (min-width:720px){ .zmodal-overlay{ align-items:center; padding:24px; } }
.zmodal{
  background:var(--surface); border:1px solid var(--border); width:100%; max-width:560px;
  max-height:90vh; overflow-y:auto; border-radius:4px 4px 0 0;
  box-shadow:0 30px 80px rgba(0,0,0,0.6);
}
@media (min-width:720px){ .zmodal{ border-radius:4px; } }
.zmodal-head{
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px;
  padding:20px 22px 14px; border-bottom:1px solid var(--border-soft); position:sticky; top:0;
  background:var(--surface); z-index:2;
}
.zmodal-close{
  background:var(--surface-2); border:1px solid var(--border); color:var(--ink-2);
  width:32px; height:32px; border-radius:3px; cursor:pointer; font-size:1rem; flex-shrink:0;
}
.zmodal-body{ padding:18px 22px 26px; display:flex; flex-direction:column; gap:16px; }
.zmodal-chart{ border:1px solid var(--border-soft); border-radius:3px; overflow:hidden; }
.zmodal-row{ display:flex; align-items:baseline; justify-content:space-between; padding:8px 0; border-bottom:1px solid var(--border-soft); gap:12px; }
.zmodal-row:last-child{ border-bottom:none; }
.zmodal-label{ font-size:0.82rem; color:var(--muted); }
.zmodal-value{ font-family:var(--mono); font-weight:600; font-size:0.95rem; font-variant-numeric:tabular-nums; }
.zmodal-value.risk{ color:var(--danger); }
.zmodal-value.accent{ color:var(--accent); }
.zmodal-block{ border:1px solid var(--border-soft); border-radius:3px; padding:13px 15px; }
.zmodal-block h4{ margin:0 0 6px; font-family:var(--mono); font-size:0.7rem; letter-spacing:0.06em; text-transform:uppercase; color:var(--muted); }
.zmodal-block p{ font-size:0.86rem; line-height:1.55; color:var(--ink-2); margin:0; }
.zmodal-fine{ font-size:0.72rem; color:var(--muted); line-height:1.55; }

/* ---------------------------------------------------------------- 3D globe
   Shared by the home hero's mini globe and the full Market 3D page. The
   globe itself is WebGL (globe.gl/three.js) — the only exception to this
   theme's CSS/SVG-only rule — so every mount point pauses its render loop
   when off-screen or when the tab is hidden (see the mounting script on
   each page); this file only owns the surrounding chrome. */
.globe-wrap{ position:relative; width:100%; height:100%; }
/* thin starfield behind the globe canvas — two dot-grid layers at different
   scales/opacities so it reads as scattered points rather than a regular
   grid, sitting behind the canvas (which paints on top as a later, plain
   child) purely for atmosphere/depth */
.globe-wrap::before{
  content:""; position:absolute; inset:-8%; z-index:0; pointer-events:none; border-radius:50%;
  background-image:
    radial-gradient(rgba(248,239,221,0.55) 0.6px, transparent 0.6px),
    radial-gradient(rgba(248,239,221,0.35) 0.9px, transparent 0.9px);
  background-size:34px 34px, 61px 61px;
  background-position:0 0, 17px 29px;
  opacity:0.4;
}
.globe-canvas-host{ width:100%; height:100%; cursor:grab; }
.globe-canvas-host:active{ cursor:grabbing; }
.globe-loading{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-family:var(--mono); font-size:0.78rem; color:var(--muted); letter-spacing:0.04em;
  gap:8px; pointer-events:none;
}
.globe-loading::before{
  content:""; width:7px; height:7px; border-radius:50%; background:var(--accent);
  animation:zt-float 1.1s ease-in-out infinite;
}

.globe-badge{
  position:absolute; z-index:4; font-family:var(--mono); font-size:0.72rem; font-weight:600;
  color:var(--ink); background:var(--surface); border:1px solid var(--border); border-radius:3px;
  padding:6px 10px; white-space:nowrap; box-shadow:0 10px 22px rgba(0,0,0,0.5);
  display:flex; align-items:center; gap:6px; pointer-events:none; transform:translate(-50%,-50%);
}
.globe-badge .name{ color:var(--ink-2); font-weight:500; }
.globe-badge.up{ border-color:var(--bull); }
.globe-badge.up .pct{ color:var(--bull); }
.globe-badge.dn{ border-color:var(--danger); }
.globe-badge.dn .pct{ color:var(--danger); }

.globe-tooltip{
  font-family:var(--mono); font-size:0.72rem; font-weight:500; color:var(--ink);
  background:var(--surface); border:1px solid var(--border); border-radius:3px;
  padding:5px 9px; box-shadow:0 10px 22px rgba(0,0,0,0.5); pointer-events:none;
}
.globe-tooltip b{ font-weight:700; }

.globe-legend{ display:flex; flex-wrap:wrap; gap:16px; align-items:center; justify-content:center; margin-top:16px; font-family:var(--mono); font-size:0.72rem; color:var(--muted); }
.globe-legend span{ display:inline-flex; align-items:center; gap:6px; }
.globe-legend i{ width:9px; height:9px; border-radius:50%; display:inline-block; }
.globe-hint{ text-align:center; margin-top:8px; font-family:var(--mono); font-size:0.7rem; color:var(--muted-2); }

.globe-page-grid{ display:grid; grid-template-columns:260px 1fr 280px; gap:22px; align-items:start; }
@media (max-width:1100px){ .globe-page-grid{ grid-template-columns:1fr; } }
.globe-panel{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:16px 18px; }
.globe-panel + .globe-panel{ margin-top:18px; }
.globe-panel h3{ font-size:0.76rem; text-transform:uppercase; letter-spacing:0.06em; color:var(--muted); margin-bottom:12px; }
.globe-stat-row{ display:flex; align-items:baseline; justify-content:space-between; padding:9px 0; border-bottom:1px solid var(--border-soft); font-size:0.86rem; }
.globe-stat-row:last-child{ border-bottom:none; }
.globe-stat-row .chg{ font-family:var(--mono); font-weight:600; }
.globe-stat-row .chg.up{ color:var(--bull); }
.globe-stat-row .chg.dn{ color:var(--danger); }
.globe-trend-row{ display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid var(--border-soft); font-size:0.86rem; }
.globe-trend-row:last-child{ border-bottom:none; }
.globe-trend-row .sym-badge{
  width:26px; height:26px; border-radius:2px; background:var(--surface-2); flex:none;
  display:flex; align-items:center; justify-content:center; font-size:0.68rem; font-weight:700; color:var(--ink-2);
}
.globe-trend-row .meta{ min-width:0; }
.globe-trend-row .ticker{ font-weight:700; font-size:0.84rem; display:block; }
.globe-trend-row .name{ color:var(--muted); font-size:0.72rem; display:block; }
.globe-trend-row .chg{ margin-left:auto; font-family:var(--mono); font-weight:600; font-size:0.82rem; flex:none; }
.globe-trend-row .chg.up{ color:var(--bull); }
.globe-trend-row .chg.dn{ color:var(--danger); }

.globe-frame{
  position:relative; border:1px solid var(--border); border-radius:var(--radius-lg);
  background:radial-gradient(ellipse at 50% 38%, var(--bg-soft), var(--bg) 78%);
  overflow:hidden; height:640px;
  /* capped to roughly the globe's own aspect ratio and centered in its grid
     column — left uncapped, the middle "1fr" column can end up much wider
     than it is tall, so the sphere (which sizes to the smaller dimension)
     ends up small with a lot of empty space on either side, which is what
     read as "tiny and off-centered" */
  max-width:640px; margin-inline:auto;
}
@media (max-width:760px){ .globe-frame{ height:420px; max-width:420px; } }

/* -- dismissible flat heat-map card, docked to a corner of the globe frame.
   The 3D globe only ever shows one hemisphere at a time; this gives an
   at-a-glance flat view of every country's color at once, and can be closed
   to get it out of the way while dragging/zooming the globe underneath. -- */
.heatmap-card{
  position:absolute; top:14px; left:14px; z-index:5; width:200px;
  background:rgba(10,10,12,0.88); border:1px solid var(--border); border-radius:var(--radius);
  backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
  box-shadow:0 12px 30px rgba(0,0,0,0.4);
}
:root[data-theme="blue"] .heatmap-card{ background:rgba(8,18,38,0.9); }
:root[data-theme="white"] .heatmap-card{ background:rgba(255,255,255,0.92); }
.heatmap-card-head{
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  padding:10px 8px 6px 12px;
}
.heatmap-card-head span{
  font-family:var(--mono); font-size:0.68rem; text-transform:uppercase; letter-spacing:0.06em; color:var(--muted);
}
.heatmap-card-close{
  width:22px; height:22px; border-radius:50%; border:none; background:transparent; color:var(--muted);
  cursor:pointer; font-size:0.9rem; line-height:1; display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
}
.heatmap-card-close:hover{ background:var(--surface-2); color:var(--ink); }
.heatmap-svg-wrap{ padding:2px 10px 10px; }
.heatmap-svg-wrap svg{ display:block; width:100%; height:auto; border-radius:2px; }
.heatmap-card .globe-legend{
  margin-top:0; padding:0 10px 12px; gap:8px 10px; font-size:0.6rem; justify-content:flex-start;
}
.heatmap-reopen{
  position:absolute; top:14px; left:14px; z-index:5; font-family:var(--mono); font-size:0.72rem;
  color:var(--ink-2); background:rgba(10,10,12,0.88); border:1px solid var(--border); border-radius:3px;
  padding:8px 14px; cursor:pointer; display:inline-flex; align-items:center; gap:7px;
}
:root[data-theme="blue"] .heatmap-reopen{ background:rgba(8,18,38,0.9); }
:root[data-theme="white"] .heatmap-reopen{ background:rgba(255,255,255,0.92); }
.heatmap-reopen:hover{ border-color:var(--muted-2); color:var(--ink); }
.heatmap-reopen[hidden], .heatmap-card[hidden]{ display:none; }
@media (max-width:520px){ .heatmap-card{ width:min(78vw, 220px); } }
.globe-live-tag{
  position:absolute; bottom:14px; right:16px; z-index:4; font-family:var(--mono); font-size:0.7rem;
  color:var(--muted); display:flex; align-items:center; gap:6px; pointer-events:none;
}
.globe-live-tag .dot{ width:6px; height:6px; border-radius:50%; background:var(--bull); box-shadow:0 0 6px var(--bull-glow); }

/* ---- globe country card (hover preview / click to pin) ---- */
.globe-card{
  position:absolute; z-index:6; width:290px; max-width:calc(100% - 16px); pointer-events:none;
  background:rgba(12,14,18,0.94); border:1px solid var(--border); border-radius:var(--radius-sm, 4px);
  box-shadow:0 14px 34px rgba(0,0,0,0.55); padding:12px 14px; font-size:0.8rem; color:var(--ink);
  font-family:var(--sans, 'IBM Plex Sans', system-ui, sans-serif); text-align:left;
  backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
}
.globe-card.is-pinned{ pointer-events:auto; max-height:calc(100% - 16px); overflow:auto; border-color:var(--accent-line, var(--accent)); }
.globe-card.is-docked{ width:auto; max-height:55%; overflow:auto; }
.globe-card .gc-head{ display:flex; justify-content:space-between; align-items:baseline; gap:10px; padding-right:18px; }
.globe-card .gc-head b{ font-size:0.98rem; }
.globe-card .gc-big{ font-family:var(--mono); font-size:0.92rem; font-weight:600; }
.globe-card .gc-sub{ color:var(--muted); font-size:0.72rem; margin-top:2px; }
.globe-card .gc-sec{ font-family:var(--mono); font-size:0.62rem; letter-spacing:0.07em; text-transform:uppercase; color:var(--accent); margin:10px 0 4px; }
.globe-card .gc-row{ display:flex; justify-content:space-between; gap:8px; padding:2px 0; font-family:var(--mono); font-size:0.76rem; }
.globe-card .gc-row b{ font-weight:600; }
.globe-card .gc-row em{ color:var(--muted); font-style:normal; font-size:0.7rem; }
.globe-card .gc-why{ color:var(--muted); font-size:0.7rem; line-height:1.4; margin:0 0 4px; }
.globe-card .gc-news{ font-size:0.74rem; line-height:1.45; color:var(--ink-2, var(--ink)); margin:2px 0 2px; }
.globe-card .gc-news span{ color:var(--muted); font-size:0.68rem; }
.globe-card .gc-up{ color:var(--bull); } .globe-card .gc-dn{ color:var(--danger); } .globe-card .gc-na{ color:var(--muted); }
.globe-card .gc-foot{ margin-top:10px; padding-top:8px; border-top:1px solid var(--border); color:var(--muted); font-size:0.66rem; line-height:1.45; }
.globe-card .gc-close{ position:absolute; top:6px; right:8px; background:none; border:0; color:var(--muted); font-size:1.1rem; cursor:pointer; line-height:1; }
.globe-card .gc-close:hover{ color:var(--ink); }

/* ---- Wide pages: app pages use the full width; prose (.shell-narrow) stays readable ---- */
.shell-app{ max-width:var(--shell); margin:0 auto; padding-inline:clamp(18px, 3.2vw, 56px); }

/* ---- Scrollbars inside boxes (desktop only): thin and quiet, visible on hover ----
   Phones and tablets keep their native overlay scrollbars. */
@media (hover:hover) and (pointer:fine){
  html{ scrollbar-width:thin; scrollbar-color:var(--border) transparent; }
  body *{ scrollbar-width:thin; scrollbar-color:transparent transparent; }
  body *:hover{ scrollbar-color:var(--border) transparent; }
  body *::-webkit-scrollbar{ width:8px; height:8px; }
  body *::-webkit-scrollbar-track{ background:transparent; }
  body *::-webkit-scrollbar-thumb{ background:transparent; border-radius:999px; border:2px solid transparent; background-clip:padding-box; }
  body *:hover::-webkit-scrollbar-thumb{ background-color:var(--border); }
  body *::-webkit-scrollbar-corner{ background:transparent; }
  ::-webkit-scrollbar{ width:10px; height:10px; }
  ::-webkit-scrollbar-thumb{ background:var(--border); border-radius:999px; border:3px solid var(--bg); }
  ::-webkit-scrollbar-track{ background:var(--bg); }
}

/* ---- Mobile bottom tab bar (zelos-tabbar.js) ---- */
.zb-bar{ display:none; }
@media (max-width:760px){
  html.has-tabbar body{ padding-bottom:calc(66px + env(safe-area-inset-bottom)); }
  .zb-bar{ position:fixed; left:0; right:0; bottom:0; z-index:2100; display:grid; grid-template-columns:repeat(5, 1fr);
    padding:6px 4px calc(6px + env(safe-area-inset-bottom)); background:color-mix(in srgb, var(--bg) 88%, transparent);
    -webkit-backdrop-filter:saturate(1.4) blur(14px); backdrop-filter:saturate(1.4) blur(14px); border-top:1px solid var(--border); }
  .zb-bar a{ display:flex; flex-direction:column; align-items:center; gap:3px; padding:4px 0; color:var(--muted); text-decoration:none; font:600 0.64rem var(--sans); letter-spacing:0.01em; -webkit-tap-highlight-color:transparent; }
  .zb-bar a svg{ width:23px; height:23px; }
  .zb-bar a.is-on{ color:var(--ink); }
  .zb-bar a.is-on svg{ color:var(--accent); }
  .zb-av{ width:24px; height:24px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:var(--accent); color:#fff; font:700 0.72rem var(--sans); overflow:hidden; }
  .zb-av img{ width:100%; height:100%; object-fit:cover; }
}

/* ---- App top bar on phones + the notification bell (zelos-tabbar.js) ---- */
.zb-title{ display:none; }
.zb-bell{ position:relative; display:inline-flex; align-items:center; justify-content:center; width:38px; height:38px; flex-shrink:0; border-radius:3px; border:1px solid var(--border); background:var(--surface); color:var(--ink); cursor:pointer; }
.zb-bell[hidden]{ display:none; }
.zb-bell svg{ width:19px; height:19px; }
.zb-bell em{ position:absolute; top:-6px; right:-6px; min-width:18px; height:18px; padding:0 4px; border-radius:9px; background:var(--danger); color:#fff; font:700 0.62rem var(--mono); font-style:normal; display:flex; align-items:center; justify-content:center; }
.zb-bell em[hidden]{ display:none; }
.zb-bell.has-new svg{ color:var(--gold, #e8b23d); }
.zb-inbox{ position:fixed; top:64px; right:16px; z-index:2300; width:min(380px, calc(100vw - 32px)); max-height:min(70vh, 560px); overflow:auto; background:var(--surface); border:1px solid var(--border); border-radius:3px; box-shadow:0 24px 60px rgba(0,0,0,0.5); }
.zb-inbox[hidden]{ display:none; }
.zb-inbox-head{ display:flex; justify-content:space-between; align-items:center; padding:12px 14px; border-bottom:1px solid var(--border-soft); }
.zb-inbox-head a{ font-size:0.8rem; color:var(--accent); text-decoration:none; }
.zb-note{ display:grid; grid-template-columns:28px minmax(0, 1fr) auto; gap:10px; align-items:start; padding:11px 14px; border-bottom:1px solid var(--border-soft); color:var(--ink); text-decoration:none; }
.zb-note:hover{ background:var(--surface-2); }
.zb-note.is-new{ background:var(--accent-soft); }
.zb-note-ic{ font-size:1.1rem; line-height:1.3; }
.zb-note b{ display:block; font-size:0.86rem; } .zb-note small{ display:block; color:var(--muted); font-size:0.78rem; line-height:1.4; margin-top:2px; }
.zb-note time{ font:500 0.7rem var(--mono); color:var(--muted); }
.zb-inbox-empty{ padding:16px 14px; color:var(--muted); font-size:0.86rem; margin:0; }
.zb-menu-extra{ display:none; }
.zb-menu-extra .zb-theme{ font:inherit; font-size:0.92rem; text-align:left; color:var(--ink-2); background:none; border:0; padding:11px 4px; cursor:pointer; }
.zb-menu-extra a{ font-size:0.92rem; color:var(--ink-2); text-decoration:none; padding:11px 4px; }
@media (max-width:760px){
  /* the tab bar does navigation: the top bar is page name · coins · bell · menu */
  html.has-zbtop .site-nav .nav-brand, html.has-zbtop .site-nav .theme-toggle{ display:none; }
  html.has-zbtop .zb-title{ display:block; font-size:1.05rem; font-weight:700; margin-right:auto; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:52vw; }
  html.has-zbtop #navAuth > :not(.zt-chip){ display:none; }
  /* the sign-in box still opens (My Zelos → Sign in), as a sheet under the top bar */
  html.has-zbtop #navAuth > div:has(> .auth-pop:not([hidden])){ display:block; }
  html.has-zbtop #navAuth > div:has(> .auth-pop:not([hidden])) > button{ display:none; }
  html.has-zbtop #navAuth .auth-pop:not([hidden]){ display:flex; position:fixed; top:calc(64px + env(safe-area-inset-top)); left:12px; right:12px; width:auto; z-index:2300; }
  html.has-zbtop #navAuth{ order:1; }
  html.has-zbtop .zb-bell{ order:2; }
  html.has-zbtop #navHamburger{ order:3; }
  html.has-zbtop .zt-chip{ border-radius:3px; }
  html.has-zbtop .zb-menu-extra{ display:flex; flex-direction:column; }
  .zb-inbox{ top:60px; left:12px; right:12px; width:auto; max-height:calc(100dvh - 150px); }
}
/* Invite a Friend menu entry (zelos-tabbar.js) */
.zb-invite{ font-weight:700 !important; color:#fff !important; }
.zb-invite-m{ display:block; margin:0 0 6px; padding:12px 14px; background:var(--accent-soft, #182a4a); border-left:3px solid var(--accent, #4a86ff); text-decoration:none; }
.zb-invite-d{ background:var(--accent-soft, #182a4a); border-left:3px solid var(--accent, #4a86ff); }

/* desktop nav: level + XP chip (zelos-tabbar.js) */
.zb-xpchip{ display:inline-flex; align-items:center; gap:8px; margin-right:10px; padding:4px 10px 4px 4px; border:1px solid var(--border, rgba(255,255,255,.14)); border-radius:2px; color:var(--text, #e8ebf2); text-decoration:none; font:600 .78rem var(--mono, ui-monospace, monospace); white-space:nowrap; }
.zb-xpchip:hover{ border-color:var(--accent); }
.zb-xpchip i{ width:24px; height:24px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-style:normal; }
.zb-xpchip i b{ width:18px; height:18px; border-radius:50%; background:var(--bg, #0b0e15); display:flex; align-items:center; justify-content:center; font-size:.66rem; }
@media (max-width:1100px){ .zb-xpchip span{ display:none; } .zb-xpchip{ padding:4px; } }
@media (max-width:760px){ .zb-xpchip{ display:none; } }
