/* Nexora Explainability Layer */
#nexora-env-banner {
  padding: 8px 14px;
  font-size: .78rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: .02em;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
#nexora-env-banner.nx-env-dev {
  background: linear-gradient(90deg, #1e3a8a, #2563eb);
  color: #fff;
}
#nexora-env-banner.nx-env-live {
  background: linear-gradient(90deg, #991b1b, #dc2626);
  color: #fff;
}
.nx-top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.nx-btn-help {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.nx-btn-help:hover { background: rgba(255,255,255,.25); }
.nx-btn-help.act { background: #fde68a; color: #92400e; border-color: #fbbf24; }
.nx-badge {
  display: inline-block;
  font-size: .58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}
.nx-badge.safe { background: #ecfdf5; color: #065f46; }
.nx-badge.medium { background: #fffbeb; color: #b45309; }
.nx-badge.dangerous { background: #fef2f2; color: #991b1b; }
body.nx-help-mode .nx-help-inline {
  display: block !important;
  font-size: .72rem;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.35;
}
.nx-help-inline { display: none; }
body.nx-help-mode [data-nx-help]::after {
  content: attr(data-nx-help);
  display: block;
  font-size: .7rem;
  color: #64748b;
  font-weight: 500;
  margin-top: 3px;
  max-width: 280px;
}
.nx-modal-bg {
  position: fixed; inset: 0; z-index: 20000;
  background: rgba(0,0,0,.5);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 20px; overflow-y: auto;
}
.nx-modal {
  background: #fff; border-radius: 14px; max-width: 560px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.2); margin: 20px auto;
}
.nx-modal-head {
  padding: 14px 16px; border-bottom: 1px solid #e2e8f0;
  display: flex; justify-content: space-between; align-items: center;
}
.nx-modal-head h2 { margin: 0; font-size: 1rem; color: #1e293b; }
.nx-modal-body { padding: 16px; font-size: .84rem; line-height: 1.55; color: #334155; max-height: 70vh; overflow-y: auto; }
.nx-modal-foot { padding: 12px 16px; border-top: 1px solid #e2e8f0; display: flex; gap: 8px; justify-content: flex-end; }
.nx-modal-foot button {
  padding: 8px 14px; border-radius: 8px; font-weight: 700; font-size: .8rem; cursor: pointer; border: none; font-family: inherit;
}
.nx-modal-cancel { background: #f1f5f9; color: #475569; }
.nx-modal-ok { background: #dc2626; color: #fff; }
.nx-modal-ok.medium { background: #d97706; }
.nx-glossary dt { font-weight: 700; color: #0f6e56; margin-top: 10px; }
.nx-glossary dd { margin: 4px 0 0; color: #475569; }
#nx-fe-diag {
  position: fixed; bottom: 12px; right: 12px; z-index: 15000;
  max-width: 320px; font-size: .72rem;
}
#nx-fe-diag summary {
  cursor: pointer; background: #1e293b; color: #fff; padding: 8px 12px;
  border-radius: 10px; font-weight: 700; list-style: none;
}
#nx-fe-diag[open] summary { border-radius: 10px 10px 0 0; }
#nx-fe-diag-inner {
  background: #f8fafc; border: 1px solid #e2e8f0; border-top: none;
  border-radius: 0 0 10px 10px; padding: 10px; max-height: 200px; overflow-y: auto;
}
#nx-fe-diag-inner .warn { color: #b45309; }
#nx-fe-diag-inner .err { color: #991b1b; }
