/* ── SIDEBAR ── */
.sidebar {
  width: 250px; min-width: 250px;
  background: var(--chrome-bg);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; height: 100vh;
  border-right: 1px solid rgba(255,255,255,0.12);
  z-index: 40;
}
.sidebar-logo {
  padding: 22px 18px 18px;
  display: flex; align-items: center; gap: 10px;
}
.nav { padding: 14px 10px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 12px; border-radius: 10px; margin-bottom: 2px;
  cursor: pointer; text-decoration: none; color: rgba(255,255,255,0.72);
  font-size: 14px; font-weight: 500; transition: all 0.15s;
}
.nav-item:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-item.active { background: rgba(255,255,255,0.18); color: #fff; font-weight: 700; }
.nav-icon {
  width: 32px; height: 32px; background: rgba(255,255,255,0.1);
  border-radius: 7px; display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}
.nav-item.active .nav-icon { background: rgba(255,255,255,0.22); }
.nav-divider { height: 1px; background: rgba(255,255,255,0.1); margin: 8px 12px; }

/* ── CHAIN PICKER (the sidebar's list of chains — every page shows all 7,
 * with the current one marked .active). Icons are the chain's own short
 * symbol (SOL, SUI, BNB, ...) rendered as text, not a generic glyph. ── */
.chain-item .nav-icon {
  border-radius: 50%; font-size: 9px; font-weight: 800;
  letter-spacing: -0.2px; line-height: 1; text-align: center;
}
.chain-logo {
  width: 78%; height: 78%; object-fit: contain; display: block; border-radius: 50%;
}
.chain-item.active .nav-icon {
  background: color-mix(in srgb, var(--accent) 55%, transparent);
}
.chain-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-left: auto;
}

.sidebar-footer {
  padding: 14px 18px; border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 12px; color: rgba(255,255,255,0.45); text-align: center; line-height: 1.9;
}
.sidebar-footer a { color: rgba(255,255,255,0.8); text-decoration: none; }
.sidebar-footer a:hover { color: #fff; }

/* ── MAIN ── */
.main { margin-left: 250px; flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* ── TOPBAR ── */
.topbar {
  background: var(--chrome-bg); border-bottom: 1px solid rgba(255,255,255,0.12);
  height: 50px; display: flex; align-items: center;
  padding: 0 36px; position: sticky; top: 0; z-index: 30; gap: 12px;
}
.topbar-center { display: flex; align-items: center; gap: 8px; margin-right: auto; }
.topbar-link {
  color: #fff; font-size: 13px; font-weight: 600; text-decoration: none;
  padding: 7px 15px; border: 1.5px solid rgba(255,255,255,0.35); border-radius: 18px;
  transition: all 0.15s; display: flex; align-items: center; gap: 5px;
  cursor: pointer; background: none; font-family: 'Inter', sans-serif;
}
.topbar-link:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.7); }
.btn-wallet {
  background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.45);
  border-radius: 18px; padding: 7px 16px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: 'Inter', sans-serif; transition: all 0.15s; white-space: nowrap;
}
.btn-wallet:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.8); }

/* ── TICKER ── */
.ticker {
  background: rgba(0,0,0,0.16); border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 7px 36px; display: flex; align-items: center; gap: 32px; font-size: 13px;
}
.ticker-label { color: rgba(255,255,255,0.6); }
.ticker-val { color: #fff; font-weight: 700; margin-left: 5px; }
.ticker-up { color: var(--success); font-weight: 700; margin-left: 4px; }
.ticker-dn { color: var(--danger); font-weight: 700; margin-left: 4px; }
.ticker-pill {
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.3);
  color: #fff; font-size: 11px; font-weight: 700; padding: 2px 10px;
  border-radius: 18px; margin-left: 7px;
}

/* ── WORDMARK ── */
.wm {
  display: inline-block; font-family: 'Inter', sans-serif; font-weight: 800;
  letter-spacing: -0.005em; line-height: 1; white-space: nowrap; color: #fff;
}
/* "Dima" and "Chain" are flat, exact brand colors — not a gradient —
   fixed on every page, no longer the per-chain --accent tint. */
.wm-1 { color: #1E90FF; }
.wm-2 { color: #FFFFFF; }
.brand { font-weight: 700; white-space: nowrap; }

.wm-logo {
  display: block; flex-shrink: 0;
  background-image: var(--logo-img);
  background-size: cover; background-position: center;
  border-radius: 8px;
}
.wm-lockup { display: flex; align-items: center; gap: 11px; }
.wm-logo-side { width: 36px; height: 36px; }
.wm-side { font-size: 29px; }
.wm-sub {
  /* Sized so the line's own width roughly spans the same range as the
     icon + "DimaChain" wordmark line above it (42px icon + 11px gap +
     the wordmark's own rendered width) — big enough to read as a real
     second line of the lockup, not a small caption underneath it. */
  margin-top: 6px; font-size: 16.7px; font-weight: 600; letter-spacing: 0;
  line-height: 1.25; color: rgba(255,255,255,0.7); white-space: nowrap;
}

/* ── WALLET MODAL ── */
.modal-bg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.65); z-index: 999; align-items: center; justify-content: center; }
.modal-bg.open { display: flex; }
.modal { background: var(--chrome-bg-2); border: 1px solid rgba(255,255,255,0.22); border-radius: 18px; padding: 28px; width: clamp(380px, 8.47vw + 257.9px, 475px); max-width: 95vw; }
.modal h2 { font-size: clamp(19px, 0.42vw + 12.9px, 24px); font-weight: 800; color: #fff; margin-bottom: 5px; }
.modal p { font-size: 13px; color: rgba(255,255,255,0.65); margin-bottom: 20px; }
.wallet-connect-error {
  display: none;
  background: rgba(255,128,128,0.12); border: 1px solid rgba(255,128,128,0.4);
  color: #ff8080; border-radius: 9px; padding: 11px 14px; font-size: 12.5px;
  line-height: 1.45; margin: -10px 0 16px;
}
.wallet-connect-error.show { display: block; }
.w-list { display: flex; flex-direction: column; gap: 8px; }
.w-btn {
  display: flex; align-items: center; gap: 12px;
  background: rgba(0,0,0,0.18); border: 1.5px solid rgba(255,255,255,0.22);
  border-radius: 11px; padding: 13px 16px; color: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.15s; font-family: 'Inter', sans-serif;
}
.w-btn:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.55); }
.w-ico { width: 32px; height: 32px; background: rgba(255,255,255,0.14); border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.modal-cancel { width: 100%; margin-top: 12px; background: none; border: 1px solid rgba(255,255,255,0.2); border-radius: 9px; color: rgba(255,255,255,0.55); font-size: 13px; padding: 11px; cursor: pointer; font-family: 'Inter', sans-serif; }
.modal-cancel:hover { color: #fff; }

/* ── VIDEO MODAL (the sidebar's "Watch Guide" trigger) ── */
.vid-modal-bg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.88); z-index: 1000; align-items: center; justify-content: center; padding: 20px; }
.vid-modal-bg.open { display: flex; }
.vid-modal { position: relative; width: 100%; max-width: clamp(880px, 19.6vw + 597.2px, 1100px); background: #000; border-radius: 12px; overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,0.6); }
.vid-modal-inner { position: relative; width: 100%; padding-top: 56.25%; }
.vid-modal-inner iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.vid-close {
  position: absolute; top: -13px; right: -13px; width: 34px; height: 34px;
  background: #fff; border: none; border-radius: 50%; font-size: 16px; font-weight: 800;
  color: var(--chrome-bg); cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 10;
}

/* ── GUIDE PAGES topbar (.gbar) — the What/Why/How/Links chrome, distinct
 * from the app-shell sidebar. Used by every chain's own guide pages
 * (chains/<chain>/{what,why,how,links}.html). Colors come from the same
 * --accent/--chrome-bg/--chrome-bg-2 variables each chain's theme.css
 * already sets, so this needs no chain-specific CSS of its own. ── */
.gbar { position: sticky; top: 0; z-index: 50; background: var(--chrome-bg); color: #fff; }
.gbar-inner { display: flex; align-items: stretch; }
.gbar-menu { display: none; background: none; border: 1.5px solid rgba(255,255,255,.35); color: #fff; border-radius: 9px; width: 38px; height: 38px; font-size: 16px; cursor: pointer; align-self: center; margin-left: 14px; }
.gbar-brand { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; text-decoration: none; width: 250px; box-sizing: border-box; padding: 0 0 0 14px; flex-shrink: 0; border-right: 1px solid rgba(255,255,255,0.12); }
.gbar-brand:hover { text-decoration: none; }
.gbar-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.gbar-row1 { height: 50px; display: flex; align-items: center; gap: 12px; padding: 0 20px; }
.gbar-nav { display: flex; gap: 12px; }
.gbar-nav a { display: flex; align-items: center; gap: 5px; color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; padding: 6px 13px; border: 1.5px solid rgba(255,255,255,.35); border-radius: 16px; transition: all .15s; font-family: 'Inter', sans-serif; }
.gbar-nav a:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.7); text-decoration: none; }
.gbar-nav a.active { background: #fff; color: var(--chrome-bg); border-color: #fff; }
.gbar-sp { flex: 1; }
.gbar-cta { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.45); border-radius: 16px; padding: 6px 13px; font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none; font-family: 'Inter', sans-serif; transition: all .15s; }
.gbar-cta:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.8); text-decoration: none; }
.gbar-ticker { display: flex; align-items: center; gap: 40px; font-size: 16px; padding: 1px 20px 9px; }
.gbar-ticker img { width: 20px; height: 20px; border-radius: 50%; display: block; flex-shrink: 0; }
.gbar-ticker .ticker-label { color: rgba(255,255,255,0.82); font-weight: 600; }
.gbar-ticker .ticker-val { color: #fff; font-weight: 700; margin-left: 7px; }
.gbar-ticker .ticker-up { color: var(--success); font-weight: 700; margin-left: 4px; }
.gbar-ticker .ticker-dn { color: var(--danger); font-weight: 700; margin-left: 4px; }
.gbar-ticker .ticker-pill { background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.42); color: #fff; font-size: 14px; font-weight: 700; padding: 3px 12px; border-radius: 18px; margin-left: 9px; }
