/* Debug / tweak panel - press ~ (tilde) to open. Dev tool, ships with the site. */
#nx-debug {
  position: fixed; top: 0; right: 0; bottom: 0; width: 390px; max-width: 100vw;
  background: rgba(10, 13, 18, .96); border-left: 1px solid #222d3a; z-index: 9000;
  color: #e7edf5; font: 13px/1.45 var(--font, system-ui, sans-serif);
  display: flex; flex-direction: column; transform: translateX(100%);
  transition: transform .18s ease; box-shadow: -20px 0 60px rgba(0,0,0,.5);
}
#nx-debug.open { transform: none; }
#nx-debug header {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-bottom: 1px solid #222d3a; flex: 0 0 auto;
}
#nx-debug header strong { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
#nx-debug header .sp { margin-left: auto; display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: #9fb0c4; white-space: nowrap; }
#nx-debug header select { max-width: 130px; }
#nx-debug .body { overflow-y: auto; padding: 4px 14px 16px; flex: 1 1 auto; }
#nx-debug fieldset { border: 0; border-top: 1px solid #1c2531; margin: 0; padding: 12px 0 4px; }
#nx-debug legend {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: #7f8ea2;
  padding: 0 6px 0 0;
}
#nx-debug .row { display: grid; grid-template-columns: 118px 1fr 44px; gap: 8px; align-items: center; margin-bottom: 7px; }
#nx-debug .row > label { color: #9fb0c4; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nx-debug .row .val { font-family: var(--mono, monospace); font-size: 11px; color: #7fe3b0; text-align: right; }
#nx-debug input[type=range] { width: 100%; accent-color: #00e676; }
#nx-debug select, #nx-debug input[type=text], #nx-debug input[type=number] {
  width: 100%; background: #141b24; color: #e7edf5; border: 1px solid #253040;
  border-radius: 6px; padding: 5px 7px; font: inherit; font-size: 12px;
}
#nx-debug input[type=color] {
  width: 100%; height: 26px; background: #141b24; border: 1px solid #253040; border-radius: 6px; padding: 2px;
}
#nx-debug input[type=checkbox] { accent-color: #00e676; width: 16px; height: 16px; }
#nx-debug button {
  background: #1a2430; color: #dfe8f3; border: 1px solid #2a3647; border-radius: 7px;
  padding: 6px 10px; font: inherit; font-size: 12px; cursor: pointer;
}
#nx-debug button:hover { background: #22303f; }
#nx-debug button.primary { background: #00e676; color: #04120a; border-color: #00e676; font-weight: 600; }
#nx-debug button.on { background: #00e676; color: #04120a; border-color: #00e676; }
#nx-debug .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
#nx-debug .swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
#nx-debug textarea {
  width: 100%; height: 190px; background: #0b1016; color: #9ff0c4; border: 1px solid #253040;
  border-radius: 8px; padding: 9px; font-family: var(--mono, monospace); font-size: 11px;
  line-height: 1.45; resize: vertical; white-space: pre;
}
#nx-debug .tabs { display: flex; gap: 6px; margin-bottom: 8px; }
#nx-debug .hint { color: #67768a; font-size: 11px; margin: 6px 0 0; }
#nx-debug .out-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
#nx-debug-fab {
  position: fixed; right: 14px; bottom: 14px; z-index: 8999;
  background: rgba(10,13,18,.82); border: 1px solid #2a3647; color: #8ea0b5;
  border-radius: 999px; padding: 7px 13px; font: 12px var(--mono, monospace); cursor: pointer;
  backdrop-filter: blur(8px);
}
#nx-debug-fab:hover { color: #fff; border-color: #00e676; }
@media (max-width: 520px) { #nx-debug { width: 100vw; } }
@media print { #nx-debug, #nx-debug-fab { display: none; } }

/* Unlisted-page links. These pages are deliberately not linked from the public
   site, so the tweak panel is the way in. */
#nx-debug .nx-pages {
  flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding: 10px 14px; border-top: 1px solid #222d3a; background: #0b0f15;
}
#nx-debug .nx-pages span {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: #7f8ea2;
  width: 100%; margin-bottom: 2px;
}
#nx-debug .nx-pages a {
  font-size: 11.5px; color: #9fb0c4; text-decoration: none;
  border: 1px solid #253040; border-radius: 999px; padding: 3px 9px;
}
#nx-debug .nx-pages a:hover { color: #fff; border-color: #00e676; }
