/* ElytraNexus • Visual Baseline (opt-in via .nx on <body>) */
:root {
  --nx-bg: #0f1318;
  --nx-surface: #131823;
  --nx-border: #263040;
  --nx-text: #e8edf5;
  --nx-muted: #9aa8bd;
  --nx-accent: #3b82f6;
  --nx-accent-weak: rgba(59,130,246,0.15);
}

body.nx {
  background: var(--nx-bg);
  color: var(--nx-text);
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.4;
}

body.nx .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 40px;
}

/* Canonical header */
body.nx .nx-header {
  position: sticky; top: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 16px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

/* CSS-only logo @ 66px; no <img> */
body.nx .elytra-brand-logo {
  width: 66px; height: 66px; display: inline-block; flex: 0 0 66px;
  background-image: url("/assets/img/elytra-security-logo.png");
  background-size: contain; background-repeat: no-repeat; background-position: left center;
}
body.nx .nx-brand { display: flex; align-items: center; gap: 12px; }
body.nx .nx-brand-name { font-weight: 700; color: #0f172a; }

body.nx .nx-topnav a {
  color: #2563eb; text-decoration: none;
  padding: 8px 10px; border-radius: 8px; font-weight: 500;
}
body.nx .nx-topnav a:hover  { background: var(--nx-accent-weak); }
body.nx .nx-topnav a.active { background: var(--nx-accent-weak); outline: 1px solid var(--nx-accent); }

/* Table baseline */
body.nx table { width: 100%; border-collapse: collapse; background: var(--nx-surface); border: 1px solid var(--nx-border); }
body.nx th, body.nx td { padding: 10px 12px; border-bottom: 1px solid var(--nx-border); }
body.nx thead th { background: #0e1522; color: var(--nx-muted); text-align: left; }

/* Placeholder banner */
body.nx .placeholder-banner {
  background: #0e1522; border: 1px dashed var(--nx-border);
  color: var(--nx-muted); padding: 12px 14px; border-radius: 10px;
}

/* Optional breadcrumb styling */
body.nx .breadcrumb { padding: 12px 0 4px; color: var(--nx-muted); }
body.nx .breadcrumb a { color: var(--nx-muted); text-decoration: none; }
body.nx .breadcrumb a:hover { text-decoration: underline; }


/* Hide legacy page-embedded header/nav when canonical header is used */
body.nx .site-header { display: none !important; }
/* === NX-HEADER-NORMALIZE ============================================== */
/* Canonical header: consistent height & alignment */
body.nx .nx-header {
  min-height: 76px;           /* room for 66px logo + padding */
  display: flex;
  align-items: center;         /* vertical center */
  gap: 16px;
}

/* CSS-only logo: always 66x66, no stretching */
body.nx .elytra-brand-logo {
  width: 66px;
  height: 66px;
  background-image: url("/assets/img/elytra-security-logo.png");
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 66px 66px;  /* force exact size */
}

/* Enforce CSS-only rule: hide any HTML-served logo element */
body.nx img.elytra-brand-logo { display: none !important; }

/* Hide known legacy top bars when page opts into .nx */
body.nx .site-header,
body.nx .legacy-topbar,
body.nx .legacy-header,
body.nx .page-topbar { display: none !important; }
/* ===================================================================== */
/* NX-BRAND-SPACING */
body.nx .nx-brand { gap: 14px; }
body.nx .nx-brand-name { font-size: 18px; font-weight: 700; color: #0f172a; }
/* NX-LOGO-HEIGHT-66: always 66px tall; width follows aspect ratio */
body.nx .elytra-brand-logo{
  display:inline-block;
  height:66px;
  width:auto;                    /* natural width */
  min-width:140px;               /* reserve space to avoid menu jump */
  background-image:url("/assets/img/elytra-security-logo.png");
  background-repeat:no-repeat;
  background-position:left center;
  background-size:auto 66px;     /* keep aspect ratio, fit height */
}

/* CSS-only logo policy */
body.nx img.elytra-brand-logo{ display:none !important; }
/* NX-SUPPRESS-LEGACY-GLOBAL-NAV: remove duplicate global navs under content */
body.nx main > nav:first-of-type,
body.nx .container > nav:first-of-type{
  display:none !important;
}
