/* ==========================================================================
   AINNA NeuralOps Healthcare
   Living hospital intelligence — day / night command-centre language
   ========================================================================== */

:root {
  --bg: #f4f7fb;
  --bg-2: #e8eef6;
  --bg-3: #dce6f2;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --ink: #102033;
  --muted: #5b6b80;
  --faint: #8593a6;
  --line: rgba(16, 32, 51, 0.1);
  --line-strong: rgba(16, 32, 51, 0.16);
  --cyan: #0891b2;
  --cyan-2: #22d3ee;
  --teal: #0f766e;
  --blue: #2563eb;
  --violet: #7c3aed;
  --ok: #0d9488;
  --warn: #d97706;
  --crit: #dc2626;
  --busy: #0284c7;
  --glow: rgba(8, 145, 178, 0.22);
  --shadow: 0 18px 50px rgba(16, 32, 51, 0.1);
  --radius: 18px;
  --radius-sm: 12px;
  --nav-h: 72px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ecg: #0891b2;
}

html[data-theme="dark"] {
  --bg: #070b12;
  --bg-2: #0c1420;
  --bg-3: #121c2c;
  --surface: rgba(10, 18, 30, 0.72);
  --surface-strong: rgba(12, 22, 38, 0.9);
  --ink: #e8f1fb;
  --muted: #93a4be;
  --faint: #6d7d97;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --cyan: #22d3ee;
  --cyan-2: #67e8f9;
  --teal: #2dd4bf;
  --blue: #60a5fa;
  --violet: #c084fc;
  --ok: #34d399;
  --warn: #fbbf24;
  --crit: #fb7185;
  --busy: #38bdf8;
  --glow: rgba(34, 211, 238, 0.2);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
  --ecg: #22d3ee;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body.nh {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 8% -10%, rgba(8, 145, 178, 0.12), transparent 50%),
    radial-gradient(700px 420px at 100% 0%, rgba(124, 58, 237, 0.08), transparent 46%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  overflow-x: hidden;
  transition: background-color .6s ease, color .6s ease;
}
html[data-theme="dark"] body.nh {
  background:
    radial-gradient(900px 480px at 8% -10%, rgba(34, 211, 238, 0.1), transparent 50%),
    radial-gradient(700px 420px at 100% 0%, rgba(192, 132, 252, 0.08), transparent 46%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.nh-skip {
  position: absolute; left: 12px; top: -48px; z-index: 2000;
  background: var(--cyan); color: #041018; padding: 8px 12px; border-radius: 8px;
}
.nh-skip:focus { top: 12px; }

.nh-wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.nh-wrap-wide { width: min(1320px, calc(100% - 28px)); margin: 0 auto; }
.nh-section { position: relative; padding: 88px 0; }
.nh-section-sm { padding: 56px 0; }
.nh-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--cyan); font-weight: 700; margin: 0 0 12px;
}
.nh-kicker::before {
  content: ""; width: 18px; height: 2px; background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: nh-pulse 2.4s ease-in-out infinite;
}
.nh-h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.12; margin: 0 0 14px; letter-spacing: -0.03em; }
.nh-lead { color: var(--muted); font-size: 1.05rem; line-height: 1.7; max-width: 68ch; margin: 0 0 28px; }
.nh-note {
  display: inline-flex; gap: 8px; align-items: center;
  font-size: 12px; color: var(--faint); border: 1px dashed var(--line-strong);
  padding: 6px 10px; border-radius: 999px; background: var(--surface);
}

/* Glass */
.nh-glass {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

/* Buttons */
.nh-btn {
  --btn-bg: var(--surface-strong);
  --btn-fg: var(--ink);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 650; text-decoration: none; overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.nh-btn .arr { transition: transform .25s var(--ease); }
.nh-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px var(--glow); }
.nh-btn:hover .arr { transform: translateX(4px); }
.nh-btn:active { transform: translateY(0) scale(0.98); }
.nh-btn::after {
  content: ""; position: absolute; inset: 0 auto 0 -40%;
  width: 28%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg); animation: nh-sweep 3.8s ease-in-out infinite;
  pointer-events: none;
}
.nh-btn-primary {
  --btn-bg: linear-gradient(135deg, #0e7490, #0891b2 50%, #22d3ee);
  --btn-fg: #041018;
  border-color: transparent;
}
html[data-theme="dark"] .nh-btn-primary { --btn-fg: #041018; }
.nh-btn-ghost { background: transparent; }
.nh-btn-danger { border-color: rgba(220,38,38,.35); color: var(--crit); }
.nh-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Nav */
.nh-nav {
  position: sticky; top: 0; z-index: 80;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.nh-nav-in {
  width: min(1320px, calc(100% - 28px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px; align-items: center;
}
.nh-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; min-width: 0;
}
.nh-logo-mark {
  position: relative; width: 36px; height: 36px; flex: 0 0 36px;
  border-radius: 50%; overflow: hidden;
}
.nh-logo-mark img { width: 100%; height: 100%; }
.nh-logo-scan {
  position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan-2), transparent);
  top: -10%; animation: nh-logo-scan 4.8s ease-in-out infinite;
  box-shadow: 0 0 10px var(--cyan);
}
.nh-logo-glow {
  position: absolute; inset: -2px; border-radius: 50%;
  border: 1px solid transparent;
  background: linear-gradient(var(--bg), var(--bg)) padding-box,
              linear-gradient(135deg, var(--cyan), transparent 55%, #ff2d95) border-box;
  opacity: .7; pointer-events: none;
  animation: nh-pulse 3.6s ease-in-out infinite;
}
.nh-logo-word { display: flex; flex-direction: column; line-height: 1.05; }
.nh-logo-word b { font-size: 15px; letter-spacing: .08em; }
.nh-logo-word small { font-size: 10px; color: var(--muted); letter-spacing: .04em; }
.nh-nav-links { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }
.nh-nav-links a {
  position: relative; text-decoration: none; color: var(--muted);
  font-size: 13px; font-weight: 600; padding: 8px 10px; border-radius: 999px;
}
.nh-nav-links a:hover, .nh-nav-links a.is-active { color: var(--ink); background: var(--surface); }
.nh-nav-links a.is-active::after {
  content: ""; position: absolute; left: 18%; right: 18%; bottom: 4px; height: 2px;
  background: var(--cyan); border-radius: 2px;
  box-shadow: 0 0 8px var(--cyan);
}
.nh-nav-actions { display: flex; align-items: center; gap: 8px; }
.nh-nav-actions .ainna-nav-controls { flex-shrink: 0; }
.nh-nav-actions .ainna-theme-switch-label { white-space: nowrap; }
body.nh { padding-bottom: 0; }
.nh-icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; color: var(--ink);
}
.nh-burger { display: none; }
.nh-mobile {
  display: none; position: fixed; inset: var(--nav-h) 0 0 0; z-index: 79;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  padding: 18px; overflow: auto;
}
.nh-mobile.is-open { display: block; }
.nh-mobile a {
  display: block; padding: 14px 8px; text-decoration: none;
  border-bottom: 1px solid var(--line); font-weight: 650;
}

/* Theme toggle */
.nh-theme {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center;
}
.nh-theme .moon { display: none; }
html[data-theme="dark"] .nh-theme .sun { display: none; }
html[data-theme="dark"] .nh-theme .moon { display: block; }

/* Status pills */
.nh-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; padding: 4px 8px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
}
.nh-status i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
}
.nh-status.is-active i { animation: nh-pulse 1.8s ease-in-out infinite; }
.nh-status.is-processing i { background: var(--busy); animation: nh-blink 1s steps(2) infinite; }
.nh-status.is-waiting i { background: var(--warn); }
.nh-status.is-warning { color: var(--warn); }
.nh-status.is-warning i { background: var(--warn); box-shadow: 0 0 0 0 rgba(217,119,6,.5); animation: nh-ring 2s ease-out infinite; }
.nh-status.is-critical { color: var(--crit); }
.nh-status.is-critical i { background: var(--crit); animation: nh-pulse 1.2s ease-in-out infinite; }
.nh-status.is-occupied i { background: var(--crit); }
.nh-status.is-available i { background: var(--ok); }
.nh-status.is-offline i { background: var(--faint); box-shadow: none; }
.nh-status.is-predicted i { background: var(--violet); }

/* Hero */
.nh-hero {
  position: relative; min-height: calc(100vh - var(--nav-h));
  display: grid; align-items: center; padding: 36px 0 60px; overflow: hidden;
}
.nh-hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 36px; align-items: center;
}
.nh-hero h1 {
  font-size: clamp(34px, 5.4vw, 64px); line-height: 1.02;
  letter-spacing: -0.04em; margin: 0 0 12px;
}
.nh-hero h1 span {
  background: linear-gradient(135deg, var(--cyan), var(--blue) 55%, var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nh-hero h2 { margin: 0 0 16px; font-size: clamp(18px, 2.2vw, 26px); font-weight: 650; color: var(--muted); }
.nh-hero-copy { color: var(--muted); font-size: 1.06rem; line-height: 1.7; max-width: 52ch; }

.nh-arch {
  position: relative; min-height: 520px;
}
.nh-hospital {
  position: relative; height: 150px; margin-bottom: 10px;
}
.nh-building {
  position: absolute; left: 50%; top: 8px; transform: translateX(-50%);
  width: 220px; height: 130px;
}
.nh-building .wing {
  position: absolute; bottom: 0; background: var(--surface-strong);
  border: 1px solid var(--line-strong); border-radius: 6px 6px 0 0;
  overflow: hidden;
}
.nh-building .w1 { left: 0; width: 58px; height: 78px; }
.nh-building .w2 { left: 62px; width: 96px; height: 126px; }
.nh-building .w3 { right: 0; width: 58px; height: 92px; }
.nh-window {
  position: absolute; width: 8px; height: 10px; border-radius: 1px;
  background: rgba(8,145,178,.25);
  animation: nh-window 3.2s ease-in-out infinite;
}
html[data-theme="dark"] .nh-window { background: rgba(34,211,238,.18); }
.nh-ecg {
  position: absolute; left: 0; right: 0; bottom: -6px; height: 28px; width: 100%;
}
.nh-sys-row, .nh-core-row, .nh-out-row {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 10px 0;
}
.nh-chip {
  font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 5px 8px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); position: relative;
}
.nh-chip::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit;
  border: 1px solid transparent; opacity: 0;
  animation: nh-chip-glow 4s ease-in-out infinite;
}
.nh-sys-row .nh-chip:nth-child(2)::after { animation-delay: .4s; }
.nh-sys-row .nh-chip:nth-child(3)::after { animation-delay: .8s; }
.nh-sys-row .nh-chip:nth-child(4)::after { animation-delay: 1.2s; }
.nh-sys-row .nh-chip:nth-child(5)::after { animation-delay: 1.6s; }
.nh-sys-row .nh-chip:nth-child(6)::after { animation-delay: 2s; }
.nh-flow-vert .nh-box { position: relative; overflow: hidden; }
.nh-flow-vert .nh-box::after {
  content: ""; position: absolute; inset: 0 auto 0 -30%;
  width: 24%; background: linear-gradient(90deg, transparent, rgba(34,211,238,.25), transparent);
  animation: nh-sweep 3.6s ease-in-out infinite;
}
[data-story-step].is-on .nh-kicker::before { width: 36px; }
.nh-flow-col {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--cyan); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
}
.nh-flow-col b { font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--ink); }
.nh-core-node {
  text-align: center; padding: 12px 18px; border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--cyan) 50%, var(--line));
  background: color-mix(in srgb, var(--cyan) 10%, var(--surface-strong));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--cyan) 20%, transparent), 0 10px 30px var(--glow);
  animation: nh-pulse 2.8s ease-in-out infinite;
}
.nh-data-stream {
  height: 18px; position: relative; overflow: hidden; margin: 4px 0;
}
.nh-data-stream span {
  position: absolute; top: 8px; left: -20%; width: 20%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: nh-stream 2.2s linear infinite;
}

/* Problem */
.nh-frag {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 24px 0 18px;
}
.nh-frag-node {
  padding: 16px 12px; text-align: center; position: relative; overflow: hidden;
}
.nh-frag-node strong { display: block; font-size: 14px; }
.nh-frag-node span { font-size: 11px; color: var(--muted); }
.nh-frag.is-split .nh-frag-node { animation: nh-drift 5s ease-in-out infinite; }
.nh-frag.is-linked .nh-frag-node { animation: none; box-shadow: 0 0 0 1px color-mix(in srgb, var(--cyan) 35%, transparent); }
.nh-connect-svg { width: 100%; height: 90px; display: block; }
.nh-connect-svg path {
  fill: none; stroke: var(--cyan); stroke-width: 1.4;
  stroke-dasharray: 6 8; animation: nh-dash 1.6s linear infinite;
}

/* Architecture layers */
.nh-layers { display: grid; gap: 12px; }
.nh-layer {
  padding: 16px; display: grid; grid-template-columns: 160px 1fr; gap: 12px; align-items: start;
}
.nh-layer h3 { margin: 0 0 4px; font-size: 15px; }
.nh-layer p { margin: 0; font-size: 12px; color: var(--muted); }
.nh-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.nh-pill {
  font-size: 11px; padding: 5px 8px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg-2); position: relative;
}
.nh-pill.is-live::after {
  content: ""; position: absolute; top: 5px; right: 5px; width: 5px; height: 5px;
  border-radius: 50%; background: var(--cyan); animation: nh-pulse 1.6s ease-in-out infinite;
}

/* Cards / demo lab */
.nh-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.nh-card {
  position: relative; padding: 16px; overflow: hidden; text-align: left;
  color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: 8px;
  min-height: 196px; transition: transform .28s var(--ease), box-shadow .28s var(--ease);
}
.nh-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px var(--glow); }
.nh-card:active { transform: translateY(-2px) scale(0.99); }
.nh-card h3 { margin: 0; font-size: 16px; }
.nh-card p { margin: 0; font-size: 12.5px; color: var(--muted); flex: 1; }
.nh-mini { height: 42px; border-radius: 8px; background: var(--bg-2); overflow: hidden; position: relative; }
.nh-live-dot {
  position: absolute; top: 12px; right: 12px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok);
  animation: nh-pulse 1.8s ease-in-out infinite;
}

/* Icons */
.nh-ico { width: 36px; height: 36px; display: grid; place-items: center; color: var(--cyan); }
.nh-ico svg { width: 32px; height: 32px; overflow: visible; }
.ico-hospital .p1, .ico-hospital .p2 { animation: nh-pulse 2s ease-in-out infinite; }
.ico-hospital .p2 { animation-delay: .7s; }
.ico-ai circle { animation: nh-pulse 2.4s ease-in-out infinite; }
.ico-ai circle:nth-child(2) { animation-delay: .3s; }
.ico-finance .spark { stroke-dasharray: 8 16; animation: nh-dash 1.4s linear infinite; }
.ico-bed .occ { animation: nh-pulse 2.6s ease-in-out infinite; }
.ico-pharm rect { animation: nh-pulse 3s ease-in-out infinite; }
.ico-lab .drop { animation: nh-float 1.6s ease-in-out infinite; }
.ico-box { animation: nh-float 2.8s ease-in-out infinite; }
.ico-esg circle { stroke-dasharray: 20 40; animation: nh-dash 3s linear infinite; }
.ico-gear svg { transform-origin: 16px 16px; animation: nh-float 3.2s ease-in-out infinite; }
.ico-shield .scan { animation: nh-logo-scan 2.8s ease-in-out infinite; }
.ico-nodes circle { animation: nh-pulse 2s ease-in-out infinite; }
.ico-iot path { animation: nh-pulse 1.8s ease-in-out infinite; }
.ico-flow circle { animation: nh-pulse 1.6s ease-in-out infinite; }
.ico-pred path { stroke-dasharray: 10 18; animation: nh-dash 1.8s linear infinite; }
@keyframes nh-slowspin { to { transform: rotate(360deg); } }
.nh-card:hover .nh-ico { color: var(--cyan-2); transform: scale(1.06); }

/* Metrics */
.nh-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.nh-metric { padding: 16px; }
.nh-metric b { display: block; font-size: 26px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.nh-metric span { color: var(--muted); font-size: 12px; }

/* Dashboard grids */
.nh-dash { display: grid; grid-template-columns: 280px 1fr; gap: 16px; }
.nh-side { padding: 14px; }
.nh-kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.nh-panel { padding: 14px; }
.nh-panel h3 { margin: 0 0 10px; font-size: 14px; display: flex; justify-content: space-between; }

/* Simulator */
.nh-sim-grid { display: grid; grid-template-columns: 340px 1fr; gap: 16px; }
.nh-slider { margin: 0 0 14px; }
.nh-slider label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.nh-slider input[type="range"] { width: 100%; accent-color: var(--cyan); }
.nh-result { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.nh-result div { padding: 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.nh-result b { display: block; font-size: 22px; }
.nh-result span { font-size: 11px; color: var(--muted); }

/* Flow */
.nh-journey { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nh-step {
  position: relative; padding: 10px 12px; min-width: 92px; text-align: center;
  font-size: 12px; font-weight: 700;
}
.nh-dots { position: absolute; inset: 6px; pointer-events: none; }
.nh-dot {
  position: absolute; width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 8px var(--cyan);
  animation: nh-travel 3.4s linear infinite;
}

/* Beds */
.nh-ward-map { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.nh-bed {
  aspect-ratio: 1.15; border-radius: 10px; border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; background: var(--bg-2);
}
.nh-bed.occ { background: color-mix(in srgb, var(--crit) 18%, var(--surface)); }
.nh-bed.free { background: color-mix(in srgb, var(--ok) 16%, var(--surface)); }
.nh-bed.clean { background: color-mix(in srgb, var(--busy) 16%, var(--surface)); animation: nh-pulse 2s ease-in-out infinite; }
.nh-bed.pend { background: color-mix(in srgb, var(--warn) 18%, var(--surface)); }

/* Agents */
.nh-orbit { position: relative; min-height: 560px; }
.nh-core-abs {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 150px; height: 150px; border-radius: 50%;
  display: grid; place-items: center; text-align: center; padding: 16px;
  z-index: 2;
}
.nh-agent {
  position: absolute; width: 118px; padding: 8px;
  font-size: 11px; text-align: center; z-index: 3;
}
.nh-agent b { display: block; }

/* Twin */
.nh-twin {
  position: relative; min-height: 520px; padding: 16px;
}
.nh-floor { width: 100%; height: 500px; display: block; }
.nh-dept-pop {
  position: absolute; right: 16px; top: 16px; width: min(280px, 80%);
  padding: 12px; display: none;
}
.nh-dept-pop.is-open { display: block; }

/* Forms */
.nh-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nh-field { display: flex; flex-direction: column; gap: 6px; }
.nh-field.full { grid-column: 1 / -1; }
.nh-field label { font-size: 12px; font-weight: 700; }
.nh-field input, .nh-field select, .nh-field textarea {
  min-height: 42px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface-strong); color: var(--ink); padding: 8px 12px;
}
.nh-field textarea { min-height: 90px; resize: vertical; }
.nh-field .err { color: var(--crit); font-size: 11px; display: none; }
.nh-field.is-invalid input, .nh-field.is-invalid select { border-color: var(--crit); }
.nh-field.is-invalid .err { display: block; }
.nh-form-msg { display: none; padding: 12px; border-radius: 12px; margin-bottom: 12px; }
.nh-form-msg.is-on { display: block; }
.nh-form-msg.ok { background: color-mix(in srgb, var(--ok) 16%, var(--surface)); }
.nh-form-msg.bad { background: color-mix(in srgb, var(--crit) 16%, var(--surface)); }

/* Footer */
.nh-footer { position: relative; padding: 48px 0 120px; overflow: hidden; border-top: 1px solid var(--line); }
.nh-footer-net { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .45; }
.nh-footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 24px; position: relative; }
.nh-footer a { color: var(--muted); text-decoration: none; display: block; padding: 4px 0; font-size: 13px; }
.nh-footer a:hover { color: var(--ink); }
.nh-copy { margin-top: 28px; color: var(--faint); font-size: 12px; position: relative; }

/* Cookies */
.nh-cookie {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 120;
  max-width: 720px; margin: 0 auto; padding: 16px; display: none;
}
.nh-cookie.is-on { display: block; }
.nh-cookie h3 { margin: 0 0 6px; font-size: 16px; }
.nh-cookie p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.nh-pref { display: none; margin: 10px 0; }
.nh-pref.is-on { display: grid; gap: 8px; }
.nh-pref label { display: flex; gap: 8px; align-items: center; font-size: 13px; }

/* Overlay / demo shell */
.nh-overlay {
  position: fixed; inset: 0; z-index: 100; background: color-mix(in srgb, var(--bg) 88%, #000 12%);
  display: none; flex-direction: column;
}
.nh-overlay.is-on { display: flex; }
.nh-overlay-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  background: var(--surface-strong);
}
.nh-overlay-body { flex: 1; overflow: auto; padding: 16px; }
.nh-boot {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: var(--bg); z-index: 2;
}
.nh-boot ol { list-style: none; padding: 0; margin: 0; }
.nh-boot li { color: var(--muted); font-family: var(--mono); font-size: 13px; padding: 6px 0; opacity: .35; }
.nh-boot li.on { opacity: 1; color: var(--cyan); }

/* Presentation */
.nh-present {
  position: fixed; inset: 0; z-index: 130; background: var(--bg);
  display: none; flex-direction: column;
}
.nh-present.is-on { display: flex; }
.nh-present-stage { flex: 1; overflow: auto; padding: 28px 20px 90px; }
.nh-present-ctrl {
  position: sticky; bottom: 0; display: flex; justify-content: center; gap: 8px;
  padding: 12px; background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-top: 1px solid var(--line);
}

/* Private AI / integration */
.nh-flow-vert { display: grid; gap: 8px; justify-items: center; }
.nh-box { padding: 12px 18px; min-width: 180px; text-align: center; }
.nh-phases { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Knowledge / AI */
.nh-chat { display: grid; grid-template-rows: 1fr auto; min-height: 360px; }
.nh-chat-log { overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 8px; }
.nh-msg { padding: 10px 12px; border-radius: 12px; max-width: 80%; font-size: 14px; line-height: 1.5; }
.nh-msg.user { margin-left: auto; background: color-mix(in srgb, var(--cyan) 16%, var(--surface)); }
.nh-msg.ai { background: var(--bg-2); border: 1px solid var(--line); }
.nh-chat-in { display: flex; gap: 8px; }

/* Tables */
.nh-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.nh-table th, .nh-table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }
.nh-table th { color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }

/* Facility */
.nh-fac { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.nh-fac-item { padding: 12px; text-align: center; }
.nh-fac-item svg { width: 36px; height: 36px; margin: 0 auto 6px; }

/* Qs */
.nh-qs { display: flex; flex-wrap: wrap; gap: 8px; }

/* Canvas charts */
.nh-chart { width: 100%; height: 160px; display: block; }
.nh-chart-lg { height: 220px; }

/* Scroll story */
.nh-story { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; }

/* ROI */
.nh-roi-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

/* Legal */
.nh-prose { max-width: 72ch; }
.nh-prose h1 { font-size: 36px; }
.nh-prose h2 { margin-top: 28px; }
.nh-prose p, .nh-prose li { color: var(--muted); line-height: 1.7; }

/* Tabs */
.nh-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.nh-tab {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 700;
}
.nh-tab.is-on { background: var(--cyan); color: #041018; border-color: transparent; }

/* Footer logo stronger sweep */
.nh-footer .nh-logo-scan { animation-duration: 3.2s; }
.nh-footer .nh-logo-glow { animation-duration: 2.4s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .nh-btn::after, .nh-logo-scan { animation: none !important; }
}

html[data-boost="true"] *,
html[data-boost="true"] *::before,
html[data-boost="true"] *::after {
  animation-duration: 0.01ms !important;
  transition-duration: 0.01ms !important;
}

/* Keyframes */
@keyframes nh-pulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes nh-blink { 50% { opacity: .25; } }
@keyframes nh-ring {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--warn) 50%, transparent); }
  100% { box-shadow: 0 0 0 8px transparent; }
}
@keyframes nh-sweep { 0% { left: -40%; } 60%,100% { left: 130%; } }
@keyframes nh-logo-scan { 0% { top: -8%; } 50% { top: 108%; } 100% { top: -8%; } }
@keyframes nh-stream { to { left: 120%; } }
@keyframes nh-dash { to { stroke-dashoffset: -28; } }
@keyframes nh-window {
  0%,100% { opacity: .35; }
  40% { opacity: 1; }
  70% { opacity: .5; }
}
@keyframes nh-chip-glow {
  0%,80%,100% { opacity: 0; }
  40% { opacity: 1; border-color: color-mix(in srgb, var(--cyan) 50%, transparent); }
}
@keyframes nh-drift {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(4px, -3px); }
}
@keyframes nh-travel {
  0% { left: 6%; top: 50%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: 90%; top: 50%; opacity: 0; }
}
@keyframes nh-float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Responsive */
@media (max-width: 1100px) {
  .nh-cards { grid-template-columns: repeat(3, 1fr); }
  .nh-frag { grid-template-columns: repeat(3, 1fr); }
  .nh-hero-grid, .nh-dash, .nh-sim-grid, .nh-story, .nh-layer { grid-template-columns: 1fr; }
  .nh-footer-grid { grid-template-columns: 1fr 1fr; }
  .nh-fac { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .nh-nav-links { display: none; }
  .nh-burger { display: grid; }
  .nh-cards, .nh-metrics, .nh-kpi-grid, .nh-roi-out { grid-template-columns: 1fr 1fr; }
  .nh-form, .nh-phases { grid-template-columns: 1fr; }
  .nh-hero { min-height: auto; }
  .nh-ward-map { grid-template-columns: repeat(4, 1fr); }
  .nh-orbit { min-height: 720px; }
}
@media (max-width: 560px) {
  .nh-cards, .nh-metrics, .nh-kpi-grid, .nh-result, .nh-roi-out, .nh-frag { grid-template-columns: 1fr; }
  .nh-nav-actions .nh-btn { display: none; }
  .nh-fac { grid-template-columns: 1fr 1fr; }
  .nh-wrap, .nh-wrap-wide { width: min(100% - 20px, 1180px); }
  .nh-section { padding: 56px 0; }
  .nh-footer-grid { grid-template-columns: 1fr; }
  .nh-hub { min-height: 420px; }
  .nh-campus { height: 200px; }
  .nh-building { width: 240px; height: 168px; }
}

/* ==========================================================================
   Motion v2 — larger, hospital-specific, not generic 2px sweeps
   ========================================================================== */
.nh-arch-stage { padding: 20px 18px 18px; min-height: 680px; }
.nh-campus {
  position: relative;
  height: 228px;
  margin-bottom: 4px;
}
.nh-building {
  width: 340px;
  height: 188px;
}
.nh-building .w1 { width: 88px; height: 118px; }
.nh-building .w2 { left: 96px; width: 148px; height: 188px; }
.nh-building .w3 { width: 88px; height: 136px; }
.nh-window {
  width: 12px;
  height: 16px;
  border-radius: 2px;
}
.nh-campus-flag {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cyan);
  background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  z-index: 2;
}
.nh-ecg-lg { height: 56px; bottom: -10px; color: var(--ecg); }

.nh-rail {
  position: relative;
  height: 46px;
  margin: 2px 0;
  overflow: hidden;
}
.nh-rail::before {
  content: attr(data-rail);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 700;
}
.nh-rail::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: 50%;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: .45;
}
.nh-pkt {
  position: absolute;
  top: -8px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--cyan-2);
  box-shadow: 0 0 14px var(--cyan);
  animation: nh-drop 2.2s linear infinite;
  z-index: 2;
}
.nh-pkt b {
  position: absolute;
  left: 16px;
  top: -2px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--cyan);
  white-space: nowrap;
}
@keyframes nh-drop {
  0% { top: -10px; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { top: 46px; opacity: 0; }
}

.nh-band {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.nh-node {
  min-width: 86px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
  position: relative;
}
.nh-node::before {
  content: "";
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  animation: nh-window 2.8s ease-in-out infinite;
}
.nh-node-agent::before { background: var(--violet); box-shadow: 0 0 8px var(--violet); }

.nh-core-xl {
  margin: 6px auto;
  max-width: 420px;
  text-align: center;
  padding: 18px 22px;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--cyan) 55%, var(--line));
  background:
    radial-gradient(120px 60px at 50% 0%, color-mix(in srgb, var(--cyan) 28%, transparent), transparent 70%),
    color-mix(in srgb, var(--cyan) 10%, var(--surface-strong));
  box-shadow: 0 16px 40px var(--glow);
}
.nh-core-xl strong { display: block; font-size: 20px; letter-spacing: -0.03em; }
.nh-core-xl em { color: var(--muted); font-style: normal; font-size: 13px; }

.nh-command-strip {
  display: grid;
  grid-template-columns: 1.1fr repeat(4, 1fr);
  gap: 10px;
  align-items: end;
  padding: 12px 12px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.nh-command-strip b { font-size: 13px; }
.nh-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nh-bar i {
  display: block;
  height: 36px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--cyan-2), var(--cyan));
  width: 100%;
  transform-origin: bottom;
  animation: nh-bar 2.8s ease-in-out infinite;
  clip-path: inset(calc(100% - var(--p, 60%)) 0 0 0);
}
.nh-bar small { color: var(--muted); font-size: 11px; font-weight: 700; }
@keyframes nh-bar {
  0%,100% { filter: brightness(1); }
  50% { filter: brightness(1.25); }
}

.nh-frag-node { min-height: 112px; padding: 20px 14px 16px; }
.nh-frag-node strong { font-size: 16px; }
.nh-lamp {
  display: block;
  width: 12px;
  height: 12px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 10px var(--warn);
}
.nh-frag.is-split .nh-frag-node { animation: nh-drift 4.5s ease-in-out infinite; }
.nh-frag.is-split .nh-frag-node:nth-child(odd) { animation-duration: 5.2s; }
.nh-frag.is-linked .nh-lamp {
  background: var(--ok);
  box-shadow: 0 0 12px var(--ok);
}
.nh-connect-lg { height: 168px; }
.nh-connect-lg path {
  stroke-width: 2.4;
  stroke-dasharray: 10 10;
}

.nh-layer { padding: 20px; }
.nh-layer h3 { font-size: 17px; }
.nh-pill { font-size: 12px; padding: 7px 10px; }
.nh-pill.is-live::after { width: 7px; height: 7px; }

.nh-card { min-height: 236px; padding: 18px; gap: 10px; }
.nh-ico { width: 48px; height: 48px; }
.nh-ico svg { width: 44px; height: 44px; }
.nh-mini, .nh-scene {
  height: 78px;
  border-radius: 10px;
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
}
.nh-live-dot { width: 10px; height: 10px; }

.nh-scene-beds { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; padding: 10px; }
.nh-scene-beds i {
  display: block;
  border-radius: 4px;
  background: color-mix(in srgb, var(--ok) 35%, var(--bg));
  animation: nh-bed 2.8s ease-in-out infinite;
}
.nh-scene-beds i:nth-child(3n) { background: color-mix(in srgb, var(--crit) 40%, var(--bg)); animation-delay: .4s; }
.nh-scene-beds i:nth-child(4n) { background: color-mix(in srgb, var(--busy) 40%, var(--bg)); animation-delay: .9s; }
@keyframes nh-bed { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

.nh-scene-flow { position: relative; }
.nh-scene-flow i {
  position: absolute;
  top: 34px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: nh-travel 3s linear infinite;
}
.nh-scene-lab i, .nh-scene-box i {
  position: absolute;
  width: 12px;
  height: 16px;
  border-radius: 2px 2px 6px 6px;
  background: var(--cyan);
  animation: nh-vial 2.6s ease-in-out infinite;
}
.nh-scene-lab i:nth-child(2), .nh-scene-box i:nth-child(2) { left: 38%; animation-delay: .5s; background: var(--teal); }
.nh-scene-lab i:nth-child(3), .nh-scene-box i:nth-child(3) { left: 62%; animation-delay: 1s; background: var(--violet); }
@keyframes nh-vial {
  0%,100% { top: 46px; opacity: .4; }
  50% { top: 18px; opacity: 1; }
}

.nh-scene-esg {
  display: grid;
  place-items: center;
}
.nh-scene-esg i {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 6px solid var(--line);
  border-top-color: var(--ok);
  animation: nh-slowspin 4.5s linear infinite;
}

.nh-pipe { display: grid; gap: 0; justify-items: stretch; width: min(420px, 100%); margin: 0 auto; }
.nh-pipe-wide { width: min(520px, 100%); }
.nh-box-lg { padding: 16px 18px; text-align: center; }
.nh-box-lg b { display: block; font-size: 15px; }
.nh-box-lg small { color: var(--muted); }

.nh-hub {
  position: relative;
  min-height: 460px;
  margin-top: 20px;
}
.nh-hub-core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 800;
  z-index: 3;
  background: color-mix(in srgb, var(--cyan) 16%, var(--surface-strong));
  border: 2px solid var(--cyan);
  box-shadow: 0 0 30px var(--glow);
}
.nh-hub-node {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 104px;
  margin-left: -52px;
  margin-top: -18px;
  text-align: center;
  padding: 8px 6px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
  font-size: 12px;
  font-weight: 750;
  z-index: 3;
  transform: rotate(calc(var(--i) * 32.7deg)) translateY(-190px) rotate(calc(var(--i) * -32.7deg));
}
.nh-hub-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.nh-gate {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.nh-gate span, .nh-gate b {
  padding: 8px 6px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid var(--line);
}
.nh-gate b {
  background: color-mix(in srgb, var(--warn) 22%, var(--surface));
  animation: nh-pulse 1.8s ease-in-out infinite;
}

.nh-phase-meter {
  height: 8px;
  border-radius: 99px;
  background: var(--bg-2);
  overflow: hidden;
  margin-bottom: 12px;
}
.nh-phase-meter i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--cyan-2));
  animation: nh-fill 3.4s ease-in-out infinite;
}
.nh-phase-meter[data-phase="2"] i { animation-delay: 1.2s; background: linear-gradient(90deg, var(--violet), var(--cyan)); }
@keyframes nh-fill {
  0% { width: 12%; }
  55% { width: 86%; }
  100% { width: 38%; }
}

.nh-orbit { min-height: 640px; }
.nh-core-abs { width: 176px; height: 176px; }
.nh-agent { width: 132px; padding: 10px; font-size: 12px; }

.nh-metric b { font-size: 30px; }
.nh-status i { width: 9px; height: 9px; }

@media (max-width: 860px) {
  .nh-command-strip { grid-template-columns: 1fr 1fr; }
  .nh-hub-node { transform: rotate(calc(var(--i) * 32.7deg)) translateY(-150px) rotate(calc(var(--i) * -32.7deg)); }
}

/* Quiet motion — keep layout, drop decorative loops */
.nh-kicker::before,
.nh-btn::after,
.nh-logo-glow,
.nh-chip::after,
.nh-flow-vert .nh-box::after,
.nh-core-node,
.nh-data-stream span,
.nh-pill.is-live::after,
.nh-live-dot,
.nh-ico,
.nh-ico svg,
.nh-ico circle,
.nh-ico path,
.nh-ico .spark,
.nh-ico .occ,
.nh-ico .drop,
.nh-ico .scan,
.nh-pkt,
.nh-node::before,
.nh-bar i,
.nh-frag.is-split .nh-frag-node,
.nh-connect-svg path,
.nh-scene-beds i,
.nh-scene-flow i,
.nh-scene-lab i,
.nh-scene-box i,
.nh-scene-esg i,
.nh-gate b,
.nh-phase-meter i,
.nh-status.is-active i,
.nh-status.is-processing i,
.nh-dot,
.nh-agent {
  animation: none !important;
}
.nh-logo-scan {
  animation: nh-logo-scan 8s ease-in-out infinite;
  opacity: .45;
}
.nh-window {
  animation: nh-window 6s ease-in-out infinite;
}
.nh-status.is-warning i,
.nh-status.is-critical i {
  animation: none !important;
}
.nh-phase-meter i { width: 62%; }
.nh-phase-meter[data-phase="2"] i { width: 34%; }
.nh-rail { height: 22px; }
.nh-pkt { display: none; }

/* No green / status dots */
.nh-status i,
.nh-live-dot,
.nh-lamp,
.nh-node::before,
.nh-pill.is-live::after {
  display: none !important;
}

