:root {
  --bg: #06070b;
  --panel: #0e1118;
  --panel-2: #12161f;
  --text: #eef2f7;
  --muted: #9aa3b2;
  --cyan: #38bdf8;
  --violet: #8b5cf6;
  --emerald: #34d399;
  --amber: #fbbf24;
  --crimson: #e11d2e;
  --line: rgba(255,255,255,0.08);
  --glow: rgba(56,189,248,0.25);
  --glow-v: rgba(139,92,246,0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(56,189,248,0.14), transparent 55%),
    radial-gradient(700px 420px at 92% 4%, rgba(139,92,246,0.12), transparent 50%),
    var(--bg);
  line-height: 1.5;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
.wrap { width: min(1180px, calc(100% - 1.5rem)); margin: 0 auto; }

/* Top status bar (product-forward) */
.disclaimer {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8,10,16,0.92);
  border-bottom: 1px solid rgba(56,189,248,0.28);
  backdrop-filter: blur(10px);
  font-size: 0.72rem;
  color: #bae6fd;
  padding: 0.45rem 0;
  text-align: center;
  letter-spacing: 0.08em;
}
.disclaimer strong { color: var(--cyan); letter-spacing: 0.14em; }

header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 0; border-bottom: 1px solid var(--line);
  flex-wrap: wrap; gap: 0.75rem;
}
.logo { font-weight: 800; letter-spacing: 0.08em; font-size: 0.95rem; }
.logo span { color: var(--cyan); }
nav { display: flex; gap: 0.85rem; color: var(--muted); font-size: 0.88rem; flex-wrap: wrap; align-items: center; }
nav a:hover { color: var(--text); }

.hero-sim {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.75rem;
  align-items: center;
  padding: 1.75rem 0 1.25rem;
}
.eyebrow {
  color: var(--cyan); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
}
h1 {
  font-size: clamp(1.65rem, 4vw, 2.45rem);
  line-height: 1.1; letter-spacing: -0.03em;
  margin: 0.5rem 0 0.65rem;
}
.lead { color: var(--muted); font-size: 0.98rem; max-width: 36rem; margin: 0; }
.tagline { margin: 0.85rem 0 0; font-weight: 700; color: #dbeafe; font-size: 0.98rem; }
.hero-art {
  position: relative;
  border-radius: 1rem; overflow: hidden; border: 1px solid var(--line);
  box-shadow:
    0 20px 50px rgba(0,0,0,0.45),
    0 0 40px rgba(56,189,248,0.12),
    inset 0 0 60px rgba(139,92,246,0.08);
  background:
    radial-gradient(ellipse at 50% 40%, rgba(56,189,248,0.08), transparent 55%),
    #05070c;
  height: min(340px, 52vw);
  min-height: 240px;
}
.hero-art canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.hero-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 0.55rem 0.75rem;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: linear-gradient(transparent, rgba(5,7,12,0.85));
  pointer-events: none;
}
.ns-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.35rem;
  font-size: 0.42em;
  font-weight: 800;
  letter-spacing: 0.14em;
  padding: 0.28em 0.55em;
  border-radius: 999px;
  color: #a5f3fc;
  border: 1px solid rgba(56,189,248,0.35);
  background: rgba(56,189,248,0.08);
  position: relative;
  top: -0.35em;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  border-radius: 999px; padding: 0.7rem 1.1rem; font-weight: 700; font-size: 0.88rem;
  border: 0; cursor: pointer; transition: transform .15s ease, opacity .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #041018; box-shadow: 0 10px 26px var(--glow);
}
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.8rem; }

.panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent 40%), var(--panel);
  border: 1px solid var(--line); border-radius: 1rem; padding: 1.1rem 1.15rem;
}
.panel h2, .panel h3 { margin: 0 0 0.55rem; }
.panel h2 { font-size: 1.05rem; letter-spacing: -0.01em; }
.panel h3 { font-size: 0.92rem; }
.muted { color: var(--muted); }
.pill {
  display: inline-block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: #a5f3fc; margin-bottom: 0.4rem;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
  background: var(--emerald); box-shadow: 0 0 8px rgba(52,211,153,0.6);
  margin-right: 0.35rem;
}
.status-dot.warn { background: var(--amber); box-shadow: 0 0 8px rgba(251,191,36,0.5); }
.status-dot.danger { background: var(--crimson); box-shadow: 0 0 8px rgba(225,29,46,0.5); }
.status-dot.off { background: #64748b; box-shadow: none; }

.sim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-bottom: 2rem;
}
.full { grid-column: 1 / -1; }

/* Modes */
.mode-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.85rem; }
.mode-btn {
  flex: 1; min-width: 90px;
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--muted); border-radius: 0.75rem; padding: 0.65rem 0.75rem;
  font-weight: 700; font-size: 0.82rem; cursor: pointer; transition: all .15s;
}
.mode-btn:hover { color: var(--text); border-color: rgba(56,189,248,0.35); }
.mode-btn.active {
  color: #041018;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  border-color: transparent;
  box-shadow: 0 8px 20px var(--glow);
}

/* Slider */
.slider-wrap { margin-top: 0.9rem; }
.slider-labels {
  display: flex; justify-content: space-between;
  font-size: 0.72rem; color: var(--muted); margin-bottom: 0.35rem;
}
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, #334155, var(--cyan), var(--violet));
  outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 3px solid var(--cyan);
  box-shadow: 0 0 12px var(--glow); cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 3px solid var(--cyan);
  box-shadow: 0 0 12px var(--glow); cursor: pointer;
}
.metric-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0.65rem; margin-top: 1rem;
}
.metric {
  min-width: 0;
  overflow: hidden;
  background: rgba(0,0,0,0.28); border: 1px solid var(--line);
  border-radius: 0.75rem; padding: 0.65rem 0.75rem;
}
.metric .label { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.metric .value { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; margin-top: 0.15rem; line-height: 1.25; word-break: normal; overflow-wrap: anywhere; }
.metric .value.cyan { color: var(--cyan); }
.metric .value.violet { color: #c4b5fd; }
.metric .value.emerald { color: var(--emerald); }

/* Bars */
.bar-track {
  height: 8px; border-radius: 999px; background: rgba(255,255,255,0.06);
  overflow: hidden; margin-top: 0.35rem;
}
.bar-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  width: 0%; transition: width 0.35s ease;
}
.bar-fill.emerald { background: linear-gradient(90deg, #059669, var(--emerald)); }
.bar-fill.amber { background: linear-gradient(90deg, #d97706, var(--amber)); }
.bar-fill.danger { background: linear-gradient(90deg, #991b1b, var(--crimson)); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.kv { font-size: 0.82rem; color: var(--muted); margin: 0.45rem 0; }
.kv strong { color: var(--text); font-weight: 700; }

/* Canvas */
#inaCanvas {
  width: 100%; height: 200px; display: block;
  border-radius: 0.75rem; background: #07090f;
  border: 1px solid var(--line);
}
.resonance {
  margin-top: 0.65rem;
  font-size: 0.82rem; color: var(--muted);
}
.resonance strong { color: var(--cyan); }

/* NEKE */
.key-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem; line-height: 1.45;
  background: #05070c; border: 1px solid var(--line);
  border-radius: 0.75rem; padding: 0.75rem;
  word-break: break-all; color: #a5f3fc;
  min-height: 4.2rem; margin: 0.65rem 0;
}
.key-box.burned { color: #64748b; text-decoration: line-through; opacity: 0.7; }
.neke-log {
  font-size: 0.75rem; color: var(--muted);
  max-height: 5.5rem; overflow-y: auto;
  margin-top: 0.5rem;
}
.neke-log div { padding: 0.15rem 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.neke-log .ok { color: var(--emerald); }
.neke-log .info { color: var(--cyan); }

/* Stepper */
.steps {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0;
}
.step-chip {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.12s;
}
.step-chip:hover {
  border-color: rgba(56,189,248,0.45);
  color: #e2e8f0;
  background: rgba(56,189,248,0.08);
}
.step-chip:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
.step-chip.active {
  color: #041018;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  border-color: transparent;
}
.step-chip.done {
  color: var(--emerald); border-color: rgba(52,211,153,0.35);
  background: rgba(52,211,153,0.08);
}
.step-narrative {
  font-size: 0.9rem; color: var(--muted); min-height: 3.2rem;
  margin: 0.5rem 0 0.75rem;
}
.step-narrative strong { color: var(--text); }

.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; margin: 0.55rem 0;
  font-size: 0.85rem;
}
.switch {
  position: relative; width: 42px; height: 24px; flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; cursor: pointer;
  background: #334155; border-radius: 999px; transition: .2s;
}
.switch .slider:before {
  content: ""; position: absolute; height: 18px; width: 18px;
  left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: .2s;
}
.switch input:checked + .slider {
  background: linear-gradient(135deg, var(--cyan), var(--violet));
}
.switch input:checked + .slider:before { transform: translateX(18px); }


/* Connectable devices shortlist */
.devices-panel {
  margin: 0 0 1rem;
}
.devices-lead {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  max-width: 46rem;
}
.device-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.55rem;
}
.device-chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.28);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.device-chip:hover {
  border-color: rgba(56,189,248,0.35);
  background: rgba(56,189,248,0.05);
  box-shadow: 0 0 18px rgba(56,189,248,0.08);
}
.device-chip {
  cursor: pointer;
}
.device-chip.is-active {
  border-color: rgba(56,189,248,0.55);
  background: rgba(56,189,248,0.1);
  box-shadow: 0 0 22px rgba(56,189,248,0.18), 0 0 0 1px rgba(139,92,246,0.25);
}
.device-chip.is-active .device-icon {
  color: #e0f2fe;
  border-color: rgba(56,189,248,0.45);
  background: linear-gradient(135deg, rgba(56,189,248,0.22), rgba(139,92,246,0.18));
}
.device-chip:focus-visible {
  outline: 2px solid rgba(56,189,248,0.65);
  outline-offset: 2px;
}
.device-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  color: var(--cyan);
  background: linear-gradient(135deg, rgba(56,189,248,0.12), rgba(139,92,246,0.1));
  border: 1px solid rgba(56,189,248,0.2);
}
.device-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}
.device-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.25;
}
.devices-footnote {
  margin: 0.85rem 0 0;
  font-size: 0.72rem;
  max-width: 48rem;
}

footer {
  border-top: 1px solid var(--line); padding: 1.5rem 0 2.5rem;
  color: var(--muted); font-size: 0.8rem;
}

@media (max-width: 860px) {
  .hero-sim, .sim-grid { grid-template-columns: 1fr; }
  .hero-art { height: 260px; min-height: 220px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  nav .hide-sm { display: none; }
  .device-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}


/* Pitch CTAs + medical impact panel */
.cta-row { display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center; }
a.btn { text-decoration: none; }
.impact-panel {
  margin: 0.5rem 0 1.25rem;
  border: 1px solid rgba(139,92,246,0.28);
  background: linear-gradient(135deg, rgba(139,92,246,0.07), rgba(56,189,248,0.05));
}
.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.impact-card {
  background: rgba(0,0,0,0.28);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 0.85rem 0.95rem;
}
.impact-card h3 { margin: 0 0 0.35rem; font-size: 0.92rem; }
@media (max-width: 860px) {
  .impact-grid { grid-template-columns: 1fr; }
}


/* Run Bench + history */
.bench-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-end;
  margin-top: 0.85rem;
}
.bench-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 7.5rem;
}
.bench-field input {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  background: #05070c;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  padding: 0.45rem 0.55rem;
  min-width: 7.5rem;
}
.bench-field input:focus {
  outline: none;
  border-color: rgba(56,189,248,0.45);
  box-shadow: 0 0 0 2px rgba(56,189,248,0.12);
}
.bench-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.hud-mode-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.85rem;
}
.hud-mode-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.hud-mode-badge.preview {
  color: #a5f3fc;
  background: rgba(56,189,248,0.1);
  border-color: rgba(56,189,248,0.35);
}
.hud-mode-badge.saved {
  color: #a7f3d0;
  background: rgba(52,211,153,0.12);
  border-color: rgba(52,211,153,0.4);
}
.last-bench-strip {
  margin-top: 0.85rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(56,189,248,0.2);
  background: rgba(0,0,0,0.32);
}
.lbs-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.45rem;
}
.lbs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.lbs-grid code, .lbs-grid strong {
  color: var(--text);
  font-size: 0.78rem;
  word-break: break-all;
}
.lbs-k {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.05rem;
}
.neke-ok { color: var(--emerald) !important; }
.neke-fail { color: var(--crimson) !important; }
.neke-burned { color: var(--amber) !important; }

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 16rem;
  overflow-y: auto;
}
.history-empty {
  margin: 0;
  font-size: 0.82rem;
  padding: 0.65rem 0;
}
.history-item {
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
  width: 100%;
  cursor: pointer;
  font: inherit;
  color: inherit;
  background: rgba(0,0,0,0.28);
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  padding: 0.55rem 0.7rem;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.history-item:hover {
  border-color: rgba(56,189,248,0.35);
  background: rgba(56,189,248,0.06);
}
.history-item.active {
  border-color: rgba(52,211,153,0.45);
  background: rgba(52,211,153,0.08);
  box-shadow: 0 0 16px rgba(52,211,153,0.08);
}
.hi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
}
.hi-outcome {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.hi-outcome.ok {
  color: var(--emerald);
  border-color: rgba(52,211,153,0.35);
  background: rgba(52,211,153,0.1);
}
.hi-outcome.fail {
  color: #fda4af;
  border-color: rgba(225,29,46,0.35);
  background: rgba(225,29,46,0.1);
}
.hi-outcome.burned {
  color: var(--amber);
  border-color: rgba(251,191,36,0.35);
  background: rgba(251,191,36,0.1);
}
.hi-meta {
  margin-top: 0.25rem;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.35;
}
@media (max-width: 860px) {
  .lbs-grid { grid-template-columns: 1fr; }
}


/* Days 5–7 UX polish */
.field-error {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #fda4af;
  min-height: 1em;
}
.bench-field input.invalid {
  border-color: rgba(225,29,46,0.55);
  box-shadow: 0 0 0 2px rgba(225,29,46,0.15);
}
.export-status {
  margin: 0.45rem 0 0;
  font-size: 0.75rem;
  min-height: 1.1em;
}
.lbs-empty {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
}
.lbs-empty strong { color: var(--text); }
.last-bench-strip.is-empty {
  border-style: dashed;
  border-color: rgba(56,189,248,0.15);
  background: rgba(0,0,0,0.18);
}
.last-bench-strip.flash {
  animation: lbs-flash 0.85s ease;
}
@keyframes lbs-flash {
  0% { box-shadow: 0 0 0 0 rgba(56,189,248,0.0); border-color: rgba(56,189,248,0.2); }
  30% { box-shadow: 0 0 0 3px rgba(56,189,248,0.35), 0 0 22px rgba(56,189,248,0.2); border-color: rgba(56,189,248,0.55); }
  100% { box-shadow: 0 0 0 0 rgba(56,189,248,0.0); border-color: rgba(56,189,248,0.2); }
}

/* Saved-run: meters frozen until controls change */
body.ns-saved-mode .sim-grid > .panel:not(#benchPanel):not(#historyPanel) {
  position: relative;
}
body.ns-saved-mode .metric .value,
body.ns-saved-mode .bar-fill {
  transition: none;
}
#benchPanel.meters-frozen {
  border-color: rgba(52,211,153,0.35);
  box-shadow: 0 0 0 1px rgba(52,211,153,0.12), 0 0 28px rgba(52,211,153,0.06);
}
body.ns-saved-mode .hud-mode-badge.saved {
  box-shadow: 0 0 14px rgba(52,211,153,0.25);
}
body.ns-saved-mode .hud-mode-row::after {
  content: "Meters frozen — change a control to return to Preview";
  display: block;
  width: 100%;
  font-size: 0.72rem;
  color: #6ee7b7;
  margin-top: 0.15rem;
  letter-spacing: 0.02em;
}

@media (max-width: 640px) {
  .wrap { width: min(100%, calc(100% - 1rem)); }
  .bench-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .bench-field {
    min-width: 0;
    width: 100%;
  }
  .bench-field input {
    min-width: 0;
    width: 100%;
    font-size: 1rem; /* avoid iOS zoom */
    padding: 0.6rem 0.7rem;
  }
  .bench-actions {
    width: 100%;
    gap: 0.55rem;
  }
  .bench-actions .btn {
    flex: 1 1 auto;
    min-height: 44px;
    padding: 0.65rem 0.85rem;
  }
  .lbs-grid {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }
  .history-item {
    padding: 0.7rem 0.8rem;
    min-height: 44px;
  }
  .hi-top {
    flex-wrap: wrap;
    gap: 0.35rem;
  }
  .hi-meta {
    font-size: 0.74rem;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .history-list {
    max-height: 18rem;
    overflow-x: hidden;
  }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .mode-row { gap: 0.55rem; }
  .mode-btn { min-height: 44px; }
  .panel { padding: 1rem 0.9rem; overflow-x: hidden; }
  .sim-grid { gap: 0.85rem; }
  body.ns-saved-mode .hud-mode-row::after {
    font-size: 0.7rem;
  }
}
