/* Private presentation overrides; pinned MQ-4 core stays byte-for-byte intact. */
html .ns-header { flex-wrap: wrap; gap: 12px; }
html .ns-header-actions { flex-wrap: wrap; gap: 8px; }
html .ns-visitor-links { display: flex; flex-wrap: wrap; gap: 6px; }
html .ns-visitor-links a,
html .ns-guide-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 10px;
  color: #c7b4ff; border: 1px solid #47396b; background: #14101f;
  font: 700 10px/1 monospace; text-decoration: none; letter-spacing: .06em;
}
html .ns-controls-jump { display: inline-flex; }
html .ns-sidebar { padding-bottom: 76px; }
html .ns-toggle { min-height: 44px; margin: 2px 0; }
html .ns-replay-buttons { grid-template-columns: 44px minmax(44px, 1fr) 44px 76px; }
html .ns-replay-button, html .ns-replay-speed,
html .ns-button, html .ns-frame-slider { min-height: 44px; height: auto; }
html .ns-shell :is(button, a, input, select):focus-visible {
  outline: 2px solid #c7b4ff; outline-offset: 3px;
}
html .ns-footer { flex-wrap: wrap; overflow-wrap: anywhere; }
html .ns-subtitle, html .ns-footer { color: #9ba6b5; }
html #ns-selected-experiment { flex-basis:100%; margin:0; color:#c7b4ff; font:12px/1.6 monospace; overflow-wrap:anywhere; }
html #ns-selected-experiment.ns-link-error { color:#ff9da5; }

@media (max-width: 900px) {
  html, html body { height: auto; min-height: 100%; }
  html body { overflow: auto; }
  html .ns-shell { height: auto; min-height: 100svh; }
  html .ns-main { flex: none; grid-template-rows: clamp(340px, 52svh, 520px) auto; }
  html .ns-header { padding: 14px 16px; }
  html .ns-header h1 { font-size: clamp(22px, 6vw, 30px); }
  html .ns-header-actions { width: 100%; justify-content: space-between; }
  html .ns-controls-jump { display: inline-flex; }
  html .ns-sidebar { overflow: visible; scroll-margin-top: 12px; }
  html .ns-panel { padding: 16px; }
  html .ns-footer { padding-bottom: 76px; }
  html .ns-legend { max-width: calc(100% - 24px); flex-wrap: wrap; }
}
html .ns-experiment-share{margin-top:14px;border-top:1px solid #47396b;padding-top:14px}
html .ns-experiment-share input{box-sizing:border-box;width:100%;min-width:0;margin-top:10px;min-height:44px;background:#14101f;color:#e5ddff;border:1px solid #47396b;padding:8px;font:12px monospace}
html .ns-experiment-share p{font:12px/1.6 monospace;color:#c7b4ff;overflow-wrap:anywhere}

html #mq5-intervention-controls{scroll-margin-top:14px}
html #mq5-intervention-controls:focus{outline:2px solid #c7b4ff;outline-offset:5px}
html .ns-intervention-help{font:12px/1.7 monospace;color:#bac7d7;padding:12px;border-left:2px solid #c084fc;background:#101620}
html .ns-comparison-readout{margin-top:14px;padding-top:12px;border-top:1px solid #47396b}
html .ns-comparison-readout p{font:12px/1.8 monospace;color:#d1dcea;overflow-wrap:anywhere}
html .ns-experiment-card-link{display:inline-flex;align-items:center;min-height:44px;margin-top:10px;color:#c7b4ff;font:11px/1.6 monospace}
html .ns-comparison-dialog{box-sizing:border-box;width:min(1000px,calc(100vw - 24px));max-height:calc(100svh - 24px);overflow:auto;padding:24px;background:#0b111a;color:#dce6f2;border:1px solid #9674ce;border-radius:4px}
html .ns-comparison-dialog::backdrop{background:rgba(0,0,0,.8)}
html .ns-comparison-dialog h2{font:18px/1.5 monospace;overflow-wrap:anywhere;margin-top:0}
html .ns-comparison-dialog .ns-button{width:auto;padding:12px 18px}
html .ns-comparison-dialog p{font:13px/1.8 monospace;overflow-wrap:anywhere}
html .ns-comparison-dialog canvas{display:block;width:100%;height:auto;border:1px solid #334454}
@media(max-width:600px){html .ns-comparison-dialog{padding:14px}html .ns-comparison-dialog h2{font-size:14px}}
