/* Cortex Alpha shared header + mobile tab bar (built by /cortex-nav.js). Loaded on every page, homepage included. */
:root{--cx-h:62px}
body.cx-has-header{padding-top:calc(var(--cx-h) + 18px) !important}

/* hide each page's old header/nav; keep the old page <h1> for screen readers only */
.top-nav,.hamburger-btn,.mobile-nav,.mobile-nav-overlay{display:none !important}
.brand-link,.brand-link .brand,div.brand{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;
  margin:-1px !important;overflow:hidden !important;clip:rect(0,0,0,0) !important;white-space:nowrap !important;border:0 !important}

.cx-header{position:fixed;top:0;left:0;right:0;z-index:70;background:rgba(5,7,13,.72);
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-bottom:1px solid rgba(120,160,255,.14);
  font-family:Inter,system-ui,-apple-system,sans-serif}
.cx-bar{max-width:1240px;margin:0 auto;padding:0 20px;height:var(--cx-h);display:flex;align-items:center;gap:22px}
.cx-brand{display:flex;align-items:center;gap:10px;font-family:"Archivo Black",Inter,sans-serif;letter-spacing:.06em;
  font-size:16px;color:#eef3ff !important;text-decoration:none !important;white-space:nowrap}
.cx-tri{width:0;height:0;border-left:9px solid transparent;border-right:9px solid transparent;border-bottom:15px solid #22e38a;
  filter:drop-shadow(0 0 8px #22e38a)}
.cx-links{display:flex;gap:4px;margin-left:auto}
.cx-links a{padding:8px 12px;border-radius:10px;font-size:13px;font-weight:700;color:#a7b3cf !important;text-decoration:none !important;white-space:nowrap}
.cx-links a:hover{color:#eef3ff !important;background:rgba(255,255,255,.06)}
.cx-links a.on{color:#22e38a !important;background:rgba(34,227,138,.12);box-shadow:inset 0 0 0 1px rgba(34,227,138,.3)}
.cx-menu-btn{display:none;margin-left:auto;width:44px;height:44px;border-radius:12px;border:1px solid rgba(120,160,255,.14);
  background:rgba(14,21,38,.85);cursor:pointer;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:0}
.cx-menu-btn span{display:block;width:18px;height:2px;border-radius:2px;background:#eef3ff;transition:transform .2s,opacity .2s}
.cx-header.open .cx-menu-btn span:nth-child(1){transform:translateY(6px) rotate(45deg)}
.cx-header.open .cx-menu-btn span:nth-child(2){opacity:0}
.cx-header.open .cx-menu-btn span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}
.cx-menu{border-top:1px solid rgba(120,160,255,.14);padding:8px 14px 14px;display:grid;gap:4px;background:rgba(5,7,13,.96)}
.cx-menu[hidden]{display:none}
.cx-menu a{padding:13px 14px;border-radius:12px;font-size:16px;font-weight:800;color:#eef3ff !important;text-decoration:none !important}
.cx-menu a.on{color:#22e38a !important;background:rgba(34,227,138,.1)}
.cx-brand:focus-visible,.cx-links a:focus-visible,.cx-menu a:focus-visible,.cx-menu-btn:focus-visible,.cx-tabbar a:focus-visible{
  outline:2px solid #22e38a !important;outline-offset:3px}

/* bottom tab bar (phones) */
.cx-tabbar{display:none}
@media (max-width:900px){
  :root{--cx-h:58px}
  .cx-bar{padding:0 14px}
  .cx-links{display:none}
  .cx-menu-btn{display:flex}
  body.cx-has-header{padding-bottom:88px !important}
  .cx-tabbar{display:flex;position:fixed;left:10px;right:10px;bottom:calc(10px + env(safe-area-inset-bottom));z-index:60;
    background:rgba(10,15,28,.88);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
    border:1px solid rgba(120,160,255,.14);border-radius:20px;padding:6px;justify-content:space-around;font-family:Inter,system-ui,sans-serif}
  .cx-tabbar a{display:flex;flex-direction:column;align-items:center;gap:3px;font-size:11.5px;font-weight:800;color:#a7b3cf;
    padding:6px 8px;border-radius:12px;text-decoration:none}
  .cx-tabbar a.on{color:#22e38a;background:rgba(34,227,138,.08)}
  .cx-tabbar svg{width:20px;height:20px}
  .scroll-top-btn{bottom:calc(96px + env(safe-area-inset-bottom)) !important}
}
