:root {
  --app-font: "Raleway", "Avenir Next", Avenir, "SF Pro Text", "Aptos", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --app-display: "Raleway", "Avenir Next", Avenir, "SF Pro Display", "Aptos Display", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --app-bg: #f5fbfc;
  --app-panel: #ffffff;
  --app-panel-soft: #eef9fa;
  --app-ink: #0f1d2e;
  --app-muted: #596d7d;
  --app-line: #dbe9ed;
  --app-line-strong: #bfd4da;
  --app-teal: #008c92;
  --app-teal-2: #00c3ca;
  --app-green: #2aa66a;
  --app-amber: #f5a524;
  --app-coral: #e9664c;
  --app-danger: #b6402d;
  --app-danger-soft: #fff1ee;
  --app-danger-line: #efb8aa;
  --app-radius: 8px;
  --app-shadow: 0 24px 70px rgba(15, 29, 46, 0.12);
  --app-shadow-soft: 0 14px 36px rgba(15, 29, 46, 0.08);
  --app-box-title-weight: 500;
  --app-strong-weight: 450;
  --app-label-weight: 500;
}

[hidden] {
  display: none !important;
}

body {
  background: linear-gradient(180deg, #ffffff 0%, #f5fbfc 48%, #fbfdfe 100%);
  color: var(--app-ink);
  font-family: var(--app-font);
  font-weight: 400;
  letter-spacing: 0;
}

strong,
b {
  font-weight: var(--app-strong-weight);
}

.np-icon {
  width: 1em;
  height: 1em;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.np-app-shell {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  background:
    linear-gradient(115deg, rgba(0, 195, 202, 0.07), transparent 38%),
    linear-gradient(180deg, #ffffff 0%, var(--app-bg) 52%, #ffffff 100%);
}

.np-rail {
  position: sticky;
  top: 0;
  z-index: 120;
  isolation: isolate;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 10px;
  border-right: 1px solid var(--app-line);
  background: rgba(251, 254, 255, 0.92);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(18px);
  overflow: visible;
}

.np-rail-logo,
.np-rail-item {
  display: grid;
  place-items: center;
  width: 52px;
  height: 50px;
  border-radius: 12px;
  color: #657987;
}

.np-rail-logo {
  position: relative;
  z-index: 2;
  overflow: hidden;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
  background: linear-gradient(145deg, #0f1d2e 0%, #162b41 100%);
  color: var(--app-teal-2);
  box-shadow: 0 16px 32px rgba(15, 29, 46, 0.18);
}

.np-rail-logo img {
  width: 36px;
  max-width: 36px;
  max-height: 36px;
  height: auto;
  object-fit: contain;
  display: block;
}

.np-rail-item {
  position: relative;
  z-index: 1;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.np-rail-item::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--app-teal-2), var(--app-green));
  opacity: 0;
  transform: scaleY(0.6);
  transition: opacity 160ms ease, transform 160ms ease;
}

.np-rail-item::after {
  content: attr(aria-label);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  z-index: 160;
  min-width: max-content;
  transform: translate(-4px, -50%);
  border: 1px solid rgba(15, 29, 46, 0.12);
  border-radius: 8px;
  background: #0f1d2e;
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 29, 46, 0.18);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: var(--app-label-weight);
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 140ms ease, transform 140ms ease;
}

.np-rail-item:hover,
.np-rail-item.active {
  border-color: rgba(0, 140, 146, 0.14);
  background: linear-gradient(180deg, #effbfc, #e5f7f8);
  color: var(--app-teal);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 140, 146, 0.12);
}

.np-rail-item:hover::after,
.np-rail-item:focus-visible::after {
  opacity: 1;
  transform: translate(0, -50%);
}

.np-rail-item.active::before {
  opacity: 1;
  transform: scaleY(1);
}

.np-rail-item:focus-visible {
  outline: none;
  border-color: rgba(0, 140, 146, 0.38);
  box-shadow: 0 0 0 4px rgba(0, 140, 146, 0.12);
}

.np-rail-item .np-icon {
  width: 23px;
  height: 23px;
}

.np-rail-bottom {
  margin-top: auto;
}

.np-app-main {
  min-width: 0;
  padding: clamp(22px, 3vw, 36px);
}

.np-admin-page .np-app-main {
  display: flex;
  flex-direction: column;
}

.np-app-topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.np-app-topbar > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.np-admin-page .np-app-topbar {
  order: 0;
}

.np-admin-page .np-flash {
  order: 1;
}

.np-admin-page #projects {
  order: 2;
}

.np-admin-page #protocols {
  order: 3;
}

.np-admin-page #patients {
  order: 4;
}

.np-admin-page #stimuli {
  order: 5;
}

.np-admin-page #roi-manager {
  order: 6;
}

.np-admin-page #questionnaire-builder,
.np-admin-page #flow {
  order: 7;
}

.np-admin-page #results {
  order: 8;
}

.np-admin-page .np-brand-footer {
  order: 99;
}

.np-app-topbar p {
  margin: 0 0 6px;
  color: var(--app-ink);
  font-size: clamp(24px, 2.8vw, 32px);
  font-family: var(--app-display);
  font-weight: var(--app-box-title-weight);
  line-height: 1.1;
  letter-spacing: 0;
}

.np-app-topbar span {
  color: var(--app-muted);
  font-size: 15px;
  font-weight: 500;
}

.np-workspace-context {
  margin-top: 16px;
  width: 100%;
  max-width: none;
  border: 1px solid rgba(191, 212, 218, 0.72);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 252, 253, 0.9)),
    #ffffff;
  box-shadow: 0 8px 22px rgba(15, 29, 46, 0.045);
  padding: 12px;
}

.np-context-switcher {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: end;
  gap: 10px;
  margin-top: 16px;
  max-width: min(100%, 980px);
}

.np-workspace-context .np-context-switcher {
  margin-top: 0;
  max-width: none;
}

.np-context-select {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.np-context-select-wide {
  min-width: 0;
}

.np-context-select > span {
  color: #6a7e8b;
  font-size: 11px;
  font-weight: var(--app-label-weight);
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.np-context-select select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--app-line-strong);
  border-radius: var(--app-radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 253, 254, 0.96));
  color: var(--app-ink);
  box-shadow: none;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  padding: 0 40px 0 14px;
  text-overflow: ellipsis;
}

.np-context-select select:focus {
  outline: 3px solid rgba(0, 195, 202, 0.14);
  border-color: var(--app-teal);
}

.np-context-select select:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.np-context-summary {
  margin-top: 16px;
  max-width: min(100%, 980px);
}

.np-context-summary .np-project-summary {
  margin-top: 0;
}

.np-workspace-context .np-context-summary {
  margin-top: 12px;
  max-width: none;
  border-top: 1px solid rgba(191, 212, 218, 0.5);
  padding-top: 12px;
}

.np-workspace-context .np-project-summary {
  margin-top: 0;
  gap: 7px;
}

.np-workspace-context .np-project-summary article {
  min-height: 44px;
  min-width: 112px;
  background: rgba(248, 253, 254, 0.72);
  box-shadow: none;
  padding: 8px 10px;
}

.np-top-link,
.np-chip,
.np-button,
.np-button-ghost,
.np-button-danger {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--app-radius);
  font-size: 14px;
  font-weight: var(--app-label-weight);
  line-height: 1.15;
}

.np-top-link,
.np-chip {
  border: 1px solid var(--app-line);
  background: #ffffff;
  color: var(--app-ink);
  padding: 0 14px;
}

.np-top-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: #ffffff;
  padding: 8px 14px;
  box-shadow: 0 10px 28px rgba(15, 29, 46, 0.06);
}

.np-top-logo img {
  width: clamp(170px, 17vw, 230px);
  height: auto;
}

.np-brand-footer {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(260px, 1.5fr) minmax(220px, 0.9fr);
  align-items: center;
  gap: 18px;
  margin: clamp(34px, 5vw, 64px) 0 0;
  border: 1px solid rgba(219, 233, 237, 0.92);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 28px rgba(15, 29, 46, 0.035);
  padding: clamp(16px, 2.6vw, 24px);
  overflow: hidden;
  position: relative;
}

.np-brand-footer-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.np-brand-footer-mark img {
  width: clamp(150px, 18vw, 220px);
  height: auto;
  display: block;
}

.np-brand-footer-copy strong,
.np-brand-footer-copy p,
.np-brand-footer-meta span {
  letter-spacing: 0;
}

.np-brand-footer-copy strong {
  display: block;
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: 16px;
  font-weight: var(--app-box-title-weight);
  line-height: 1.2;
}

.np-brand-footer-copy p {
  margin: 6px 0 0;
  color: var(--app-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
}

.np-brand-footer-copy a {
  color: #0a7378;
  font-weight: var(--app-label-weight);
  text-decoration: none;
}

.np-brand-footer-copy a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.np-brand-footer-meta {
  display: grid;
  gap: 5px;
  justify-items: end;
  color: #6d818d;
  font-size: 12px;
  font-weight: var(--app-label-weight);
  line-height: 1.35;
  text-align: right;
}

.np-login-page .np-brand-footer {
  width: min(100% - 32px, 780px);
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 14px auto 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  overflow: visible;
}

.np-brand-footer-compact p {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 5px 8px;
  margin: 0;
  color: #7c8d95;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
}

.np-brand-footer-compact strong {
  color: #596d77;
  font-family: var(--app-font);
  font-size: 11px;
  font-weight: var(--app-strong-weight);
}

.np-brand-footer-compact a {
  color: #52747a;
  font-weight: var(--app-label-weight);
  text-decoration: none;
}

.np-brand-footer-compact a:hover {
  color: #087f84;
  text-decoration: underline;
  text-underline-offset: 3px;
}

[data-patient-delete-selected][hidden] {
  display: none !important;
}

.np-button,
.np-button-ghost,
.np-button-danger {
  appearance: none;
  border: 1px solid transparent;
  cursor: pointer;
  gap: 8px;
  padding: 0 16px;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.np-button {
  background: linear-gradient(135deg, #00a6ad 0%, #007a80 100%);
  box-shadow: 0 16px 32px rgba(0, 140, 146, 0.24);
  color: #ffffff;
}

.np-button-ghost {
  border-color: var(--app-line-strong);
  background: rgba(255, 255, 255, 0.86);
  color: var(--app-ink);
}

.np-button-danger {
  border-color: var(--app-danger-line);
  background: var(--app-danger-soft);
  color: var(--app-danger);
  box-shadow: none;
}

.np-button:hover,
.np-button-ghost:hover,
.np-button-danger:hover {
  transform: translateY(-1px);
}

.np-button:hover {
  box-shadow: 0 18px 34px rgba(0, 139, 143, 0.26);
}

.np-button-ghost:hover {
  border-color: #a9c6cc;
  background: #f7fcfd;
}

.np-button-danger:hover {
  border-color: var(--app-danger);
  background: #ffe7e1;
}

.np-button:focus-visible,
.np-button-ghost:focus-visible,
.np-button-danger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 139, 143, 0.14);
}

.np-button-danger:focus-visible {
  box-shadow: 0 0 0 4px rgba(182, 64, 45, 0.15);
}

.np-button-ghost:disabled,
.np-button-danger:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.np-button svg,
.np-button-ghost svg,
.np-button-danger svg {
  width: 18px;
  height: 18px;
}

.np-button-small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 7px;
}

.np-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(360px, 0.82fr);
  gap: 24px;
  align-items: start;
}

.np-grid-3,
.np-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.np-panel,
.np-card,
.np-login-card {
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(15, 29, 46, 0.045);
  backdrop-filter: blur(8px);
}

.np-panel {
  padding: clamp(14px, 2vw, 20px);
  position: relative;
}

.np-panel::before,
.np-login-card::before,
.np-task-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: var(--app-radius) var(--app-radius) 0 0;
  background: linear-gradient(90deg, var(--app-teal-2), rgba(42, 166, 106, 0.76), rgba(245, 165, 36, 0.72));
  opacity: 0.82;
  pointer-events: none;
}

.np-panel::before {
  display: none;
}

.np-card {
  padding: 14px;
}

.np-project-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.np-project-summary article {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  column-gap: 9px;
  row-gap: 2px;
  min-height: 50px;
  min-width: 132px;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
  padding: 8px 10px;
}

.np-project-summary span {
  color: var(--app-muted);
  font-size: 12px;
  font-weight: var(--app-label-weight);
}

.np-project-summary strong {
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: 18px;
  font-weight: var(--app-box-title-weight);
  line-height: 1;
}

.np-project-summary small {
  grid-column: 1 / -1;
  color: #7b8d99;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
}

.np-panel + .np-panel,
.np-card + .np-card {
  margin-top: 14px;
}

.np-panel-head {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.np-panel-head > :first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.np-panel-head > :not(:first-child) {
  flex: 0 0 auto;
}

.np-panel-head > .np-table-actions {
  justify-content: flex-end;
}

.np-panel-head h1,
.np-panel-head h2,
.np-panel-head h3,
.np-card h2,
.np-card h3 {
  margin: 0;
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: 0;
}

.np-panel-head p,
.np-muted {
  margin: 6px 0 0;
  color: var(--app-muted);
  font-size: 13px;
  font-weight: 500;
}

.np-panel.is-collapsible {
  scroll-margin-top: 24px;
}

.np-panel.is-collapsed .np-panel-head {
  margin-bottom: 0;
}

.np-panel > [hidden] {
  display: none !important;
}

.np-collapse-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid rgba(109, 130, 145, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  color: var(--app-ink);
  cursor: pointer;
  box-shadow: none;
}

.np-collapse-toggle:hover,
.np-collapse-toggle:focus-visible {
  border-color: rgba(0, 150, 154, 0.42);
  color: var(--app-teal);
  background: rgba(235, 250, 250, 0.94);
}

.np-collapse-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.16s ease;
}

.np-panel.is-collapsed .np-collapse-chevron {
  transform: rotate(-45deg);
}

.np-panel.is-collapsed {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 253, 254, 0.9)),
    #ffffff;
}

.np-kpi {
  min-height: 72px;
  padding: 14px;
  background: #ffffff;
  box-shadow: none;
}

.np-kpi span {
  display: block;
  color: var(--app-muted);
  font-size: 12px;
  font-weight: var(--app-label-weight);
}

.np-kpi strong {
  display: block;
  margin-top: 6px;
  color: var(--app-teal);
  font-family: var(--app-display);
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.np-patient-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 28px rgba(15, 29, 46, 0.045);
}

.np-patient-overview::before {
  display: none;
}

.np-patient-overview-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 13px;
  min-width: 0;
  color: var(--app-muted);
  font-size: 13px;
  font-weight: var(--app-label-weight);
  line-height: 1.35;
}

.np-patient-overview-main span:first-child {
  color: var(--app-ink);
}

.np-patient-overview .np-button-ghost {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  box-shadow: none;
  font-size: 13px;
}

.np-patient-block {
  margin-top: 16px;
}

.np-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.np-form-grid > .full {
  grid-column: 1 / -1;
}

.np-et-settings {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  border: 1px solid rgba(0, 140, 146, 0.14);
  border-radius: var(--app-radius);
  background: linear-gradient(180deg, rgba(239, 251, 252, 0.72), rgba(255, 255, 255, 0.92));
  padding: 16px;
}

.np-et-settings[hidden],
[data-eye-tracking-dependent][hidden],
[data-flow-gaze-option][hidden] {
  display: none !important;
}

.np-et-settings-head {
  display: grid;
  gap: 4px;
}

.np-et-settings-head strong {
  color: var(--app-ink);
  font-size: 14px;
  font-weight: var(--app-label-weight);
}

.np-et-settings-head span {
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.np-et-subgroup {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(123, 151, 164, 0.18);
  border-radius: var(--app-radius);
  background: rgba(255, 255, 255, 0.72);
  padding: 14px;
}

.np-et-subgroup-head {
  display: grid;
  gap: 4px;
}

.np-et-subgroup-head strong {
  color: var(--app-ink);
  font-size: 14px;
  font-weight: var(--app-label-weight);
}

.np-et-subgroup-head span {
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.np-field {
  display: grid;
  gap: 7px;
}

.np-field-label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.np-field.full,
.np-roi-draw-panel.full {
  grid-column: 1 / -1;
}

.np-field label,
.np-check,
.np-switch-group-title {
  color: var(--app-ink);
  font-size: 13px;
  font-weight: var(--app-label-weight);
}

.np-field-label label {
  min-width: 0;
}

.np-info {
  position: relative;
  z-index: auto;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  vertical-align: middle;
}

.np-info-button {
  width: 18px;
  height: 18px;
  min-width: 0;
  min-height: 0;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #7b8b96;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  box-shadow: none;
  text-decoration: none;
}

.np-info-button svg {
  width: 15px;
  height: 15px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.np-info-button:hover,
.np-info-button[aria-expanded="true"] {
  background: transparent;
  border-color: transparent;
  color: #52616b;
}

.np-info-button:focus-visible {
  outline: 2px solid rgba(82, 97, 107, 0.24);
  outline-offset: 2px;
}

.np-info-popover {
  position: fixed;
  z-index: 2147483000;
  left: 0;
  top: 0;
  width: min(320px, 76vw);
  transform: none;
  padding: 10px 12px;
  border: 1px solid rgba(123, 151, 164, 0.26);
  border-radius: 10px;
  background: #ffffff;
  color: #243447;
  box-shadow: 0 18px 42px rgba(15, 29, 46, 0.18);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.38;
  text-align: left;
  pointer-events: auto;
}

.np-info-popover::after {
  content: "";
  position: absolute;
  left: var(--np-info-arrow-left, 50%);
  bottom: -6px;
  width: 10px;
  height: 10px;
  transform: translateX(-50%) rotate(45deg);
  border-right: 1px solid rgba(123, 151, 164, 0.26);
  border-bottom: 1px solid rgba(123, 151, 164, 0.26);
  background: #ffffff;
}

.np-info-popover[data-placement="bottom"]::after {
  top: -6px;
  bottom: auto;
  border-right: 0;
  border-bottom: 0;
  border-left: 1px solid rgba(123, 151, 164, 0.26);
  border-top: 1px solid rgba(123, 151, 164, 0.26);
}

.np-switch-group-title .np-info,
.np-stimulus-settings span .np-info {
  margin-left: 5px;
}

.np-field input,
.np-field textarea,
.np-field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--app-line-strong);
  border-radius: var(--app-radius);
  background: rgba(255, 255, 255, 0.94);
  color: var(--app-ink);
  padding: 10px 13px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.np-field textarea {
  min-height: 92px;
  resize: vertical;
}

.np-field small {
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.np-field input:focus,
.np-field textarea:focus,
.np-field select:focus {
  border-color: var(--app-teal);
  box-shadow: 0 0 0 4px rgba(0, 139, 143, 0.12);
}

.np-choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.np-choice-list label {
  min-height: 38px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(109, 130, 145, 0.22);
  border-radius: 8px;
  background: #ffffff;
  color: var(--app-ink);
  font-size: 13px;
  font-weight: var(--app-label-weight);
}

.np-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.np-chip-row span,
.np-empty-inline {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(0, 150, 154, 0.1);
  color: #006f73;
  font-size: 12px;
  font-weight: var(--app-label-weight);
}

.np-empty-inline {
  width: 100%;
  justify-content: center;
  border-radius: 8px;
  background: rgba(109, 130, 145, 0.08);
  color: var(--app-muted);
}

.np-switch-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(109, 130, 145, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(248, 253, 254, 0.96), rgba(255, 255, 255, 0.92));
}

.np-switch-group-compact {
  padding: 10px;
}

.np-switch-group-title {
  color: #536778;
  font-size: 11px;
  line-height: 1.1;
  letter-spacing: 0;
}

.np-switch-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.np-check {
  min-height: 42px;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 8px 11px 8px 8px;
  border: 1px solid rgba(109, 130, 145, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--app-ink);
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.np-check:hover,
.np-check:focus-within {
  border-color: rgba(0, 150, 154, 0.38);
  background: rgba(244, 252, 252, 0.96);
}

.np-check:has(input[type="checkbox"]:checked) {
  border-color: rgba(0, 150, 154, 0.42);
  background: rgba(232, 249, 249, 0.94);
  box-shadow: 0 10px 24px rgba(0, 139, 143, 0.08);
}

.np-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 24px;
  margin: 0;
  border: 1px solid rgba(109, 130, 145, 0.36);
  border-radius: 999px;
  background: #dce8ed;
  cursor: pointer;
  outline: none;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.np-check input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 7px rgba(15, 29, 46, 0.22);
  transition: transform 0.16s ease;
}

.np-check input[type="checkbox"]:checked {
  border-color: rgba(0, 139, 143, 0.78);
  background: linear-gradient(90deg, var(--app-teal), #2aa66a);
}

.np-check input[type="checkbox"]:checked::after {
  transform: translateX(22px);
}

.np-check input[type="checkbox"]:focus-visible {
  box-shadow: 0 0 0 4px rgba(0, 139, 143, 0.14);
}

.np-check input[type="checkbox"]:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.np-check-inline {
  min-height: 38px;
  padding: 7px 10px 7px 7px;
}

.np-check-inline input[type="checkbox"] {
  width: 42px;
  height: 22px;
}

.np-check-inline input[type="checkbox"]::after {
  width: 16px;
  height: 16px;
}

.np-check-inline input[type="checkbox"]:checked::after {
  transform: translateX(20px);
}

.np-result-select {
  min-height: 30px;
  padding: 3px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.np-result-select:hover,
.np-result-select:focus-within,
.np-result-select:has(input[type="checkbox"]:checked) {
  background: rgba(232, 249, 249, 0.72);
  box-shadow: none;
}

.np-result-select input[type="checkbox"] {
  width: 38px;
  height: 20px;
}

.np-result-select input[type="checkbox"]::after {
  width: 14px;
  height: 14px;
}

.np-result-select input[type="checkbox"]:checked::after {
  transform: translateX(18px);
}

.np-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}

.np-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--app-ink);
  font-size: 14px;
}

.np-table th,
.np-table td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--app-line);
  text-align: left;
  vertical-align: middle;
}

.np-table th {
  color: var(--app-muted);
  font-size: 12px;
  font-weight: var(--app-label-weight);
  letter-spacing: 0;
}

.np-table tbody tr {
  transition: background-color 140ms ease;
}

.np-table tbody tr:hover {
  background: rgba(0, 195, 202, 0.045);
}

.np-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: #edf7f1;
  color: #14784b;
  font-size: 12px;
  font-weight: var(--app-label-weight);
}

.np-status.draft {
  background: #f4f7f8;
  color: var(--app-muted);
}

.np-status.active {
  background: #edf7f1;
  color: #14784b;
}

.np-status.paused {
  background: #fff7e8;
  color: #94630a;
}

.np-status.archived,
.np-status.aborted {
  background: #fff1ee;
  color: #b24630;
}

.np-status.completed,
.np-status.calibrated {
  background: #edf7f1;
  color: #14784b;
}

.np-flash {
  margin-bottom: 18px;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  padding: 13px 15px;
  background: #ffffff;
  color: var(--app-ink);
  font-weight: var(--app-label-weight);
}

.np-flash-success {
  border-color: #bfe4cd;
  background: #f3fbf6;
  color: #126d44;
}

.np-flash-error {
  border-color: #f0b8a9;
  background: #fff5f2;
  color: #a13b27;
}

.np-admin-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 2147482990;
  min-width: min(360px, calc(100vw - 32px));
  max-width: min(560px, calc(100vw - 32px));
  transform: translate(-50%, -18px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(119, 145, 158, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--app-ink);
  box-shadow: 0 20px 50px rgba(15, 29, 46, 0.18);
  padding: 13px 16px;
  font-size: 14px;
  font-weight: var(--app-label-weight);
  text-align: center;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.np-admin-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.np-admin-toast.is-success {
  border-color: rgba(42, 166, 106, 0.28);
  background: #f3fbf6;
  color: #126d44;
}

.np-admin-toast.is-error {
  border-color: rgba(196, 76, 48, 0.26);
  background: #fff5f2;
  color: #9d3825;
}

.np-ajax-busy {
  cursor: progress;
}

.np-ajax-busy button,
.np-ajax-busy input,
.np-ajax-busy select,
.np-ajax-busy textarea {
  cursor: progress;
}

.np-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.np-table-actions form {
  margin: 0;
}

.np-login-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 251, 252, 0.98)),
    url("/assets/neural-signal-field.png") center bottom / 1450px auto no-repeat;
}

.np-auth-stack {
  width: min(440px, calc(100vw - 32px));
  display: grid;
  gap: 22px;
  justify-items: center;
}

.np-auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(310px, 78vw);
  border-radius: var(--app-radius);
  filter: drop-shadow(0 16px 28px rgba(15, 29, 46, 0.09));
}

.np-auth-logo img {
  width: 100%;
  height: auto;
}

.np-login-card {
  width: min(440px, 100%);
  position: relative;
  overflow: hidden;
  padding: 32px;
}

.np-patient-login-card {
  padding: 34px;
}

.np-login-brand {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
  margin-bottom: 24px;
}

.np-login-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: var(--app-radius);
  background: linear-gradient(145deg, #0f1d2e 0%, #173149 100%);
  color: var(--app-teal-2);
  box-shadow: 0 14px 26px rgba(15, 29, 46, 0.18);
}

.np-login-mark img {
  width: 36px;
  height: auto;
  display: block;
}

.np-login-brand h1 {
  margin: 0;
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: 27px;
  line-height: 1.08;
}

.np-login-brand p {
  margin: 3px 0 0;
  color: var(--app-muted);
  font-size: 14px;
  font-weight: 500;
}

.np-code-login-form {
  grid-template-columns: 1fr;
  gap: 16px;
}

.np-code-login-form .np-field input {
  min-height: 58px;
  text-align: center;
  font-size: 22px;
  font-weight: var(--app-label-weight);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.np-code-login-form .np-field input::placeholder {
  color: #9aabb6;
  font-size: 18px;
  font-weight: var(--app-label-weight);
  letter-spacing: 0;
  text-transform: none;
}

.np-code-login-form .np-actions {
  justify-content: center;
  margin-top: 2px;
}

.np-code-login-form .np-button {
  min-width: 132px;
  justify-content: center;
}

.np-stimuli-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.np-stimuli-add-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 14px;
  align-items: stretch;
}

.np-stimuli-add-grid.is-single {
  grid-template-columns: 1fr;
}

.np-stimuli-add-grid > form {
  min-width: 0;
  height: 100%;
}

.np-youtube-stimulus-form {
  align-content: start;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: #fbfdfd;
  padding: 16px;
}

.np-youtube-form-head {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-bottom: 4px;
}

.np-youtube-form-head > div,
.np-youtube-form-head strong,
.np-youtube-form-head span {
  display: block;
}

.np-youtube-form-head strong {
  color: var(--app-ink);
  font-size: 15px;
  font-weight: var(--app-box-title-weight);
}

.np-youtube-form-head > div > span {
  margin-top: 2px;
  color: var(--app-muted);
  font-size: 12px;
}

.np-youtube-mark {
  width: 34px;
  height: 34px;
  display: grid !important;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 7px;
  background: #eff5f6;
  color: var(--app-teal);
}

.np-youtube-mark svg {
  width: 17px;
  height: 17px;
}

.np-stimuli-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  border: 1px solid rgba(118, 148, 162, 0.20);
  border-radius: var(--app-radius);
  background: rgba(248, 253, 254, 0.88);
  padding: 10px;
}

.np-stimuli-select-all {
  margin: 0;
}

.np-stimulus {
  position: relative;
  z-index: 0;
  overflow: visible;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 29, 46, 0.06);
}

.np-stimulus:hover,
.np-stimulus:focus-within,
.np-stimulus:has(details[open]) {
  z-index: 180;
}

.np-stimulus .np-stimulus-card-media > img,
.np-stimulus .np-stimulus-card-media > video {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #edf5f6;
  border-radius: calc(var(--app-radius) - 1px) calc(var(--app-radius) - 1px) 0 0;
}

.np-media-preview,
.np-media-preview-link {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  background: #08121f;
}

.np-media-preview > img,
.np-media-preview > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.np-media-preview.is-video > video {
  background: #000;
  object-fit: contain;
}

.np-media-play {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background: rgba(5, 15, 26, 0.78);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
  pointer-events: none;
}

.np-media-play svg {
  width: 14px;
  height: 14px;
}

.np-media-type-badge {
  display: inline;
  color: var(--app-teal);
  font-size: 10px;
  font-weight: var(--app-label-weight);
  letter-spacing: 0;
  text-transform: none;
}

.np-stimulus > div {
  padding: 10px;
}

.np-stimulus > div > strong,
.np-stimulus > div > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.np-stimulus > div > strong {
  color: var(--app-ink);
  font-size: 13px;
}

.np-stimulus > div > span {
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 500;
}

.np-stimulus-select {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  min-height: 28px;
  margin: 0;
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.92);
  padding: 4px;
  box-shadow: 0 8px 18px rgba(15, 29, 46, 0.16);
  backdrop-filter: blur(8px);
}

.np-stimulus-select input[type="checkbox"] {
  width: 36px;
  height: 20px;
}

.np-stimulus-select input[type="checkbox"]::after {
  width: 14px;
  height: 14px;
}

.np-stimulus-select input[type="checkbox"]:checked::after {
  transform: translateX(16px);
}

.np-stimulus:has(.np-stimulus-select input[type="checkbox"]:checked) {
  border-color: var(--app-teal);
  box-shadow: 0 0 0 3px rgba(0, 150, 154, 0.11), 0 12px 28px rgba(15, 29, 46, 0.09);
}

.np-stimulus-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.np-stimulus-card-actions form {
  margin: 0;
}

.np-upload-dropzone {
  position: relative;
  border: 1px dashed #a8cbd1;
  border-radius: var(--app-radius);
  background:
    linear-gradient(180deg, rgba(232, 249, 250, 0.7), rgba(255, 255, 255, 0.94));
  padding: 16px;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.np-upload-dropzone.is-dragging {
  border-color: var(--app-teal);
  background: #edfafa;
  box-shadow: 0 0 0 4px rgba(0, 140, 146, 0.12);
}

.np-upload-dropcopy {
  min-height: 88px;
  justify-content: center;
  border: 1px solid rgba(191, 212, 218, 0.7);
  border-radius: var(--app-radius);
  background: rgba(255, 255, 255, 0.78);
  padding: 14px;
}

.np-upload-dropcopy strong {
  display: block;
  margin-top: 8px;
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: 17px;
  letter-spacing: 0;
}

.np-upload-dropcopy span {
  color: var(--app-muted);
  font-size: 13px;
  font-weight: var(--app-label-weight);
}

.np-stimuli-import {
  border: 1px solid rgba(118, 148, 162, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 34px rgba(15, 42, 64, 0.055);
}

.np-stimuli-import > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  cursor: pointer;
  color: var(--app-ink);
  font-family: var(--app-display);
  font-weight: var(--app-label-weight);
  padding: 0 14px;
}

.np-stimuli-import > summary small {
  color: var(--app-muted);
  font-family: var(--app-font);
  font-size: 12px;
  font-weight: var(--app-label-weight);
}

.np-stimuli-import-list {
  display: grid;
  gap: 12px;
  border-top: 1px solid rgba(118, 148, 162, 0.18);
  padding: 14px;
}

.np-stimuli-import-source {
  border: 1px solid rgba(118, 148, 162, 0.20);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(248, 253, 254, 0.88), rgba(255, 255, 255, 0.96));
  padding: 12px;
}

.np-stimuli-import-source > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.np-stimuli-import-source strong,
.np-stimuli-import-source span {
  display: block;
}

.np-stimuli-import-source header strong {
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: 15px;
  line-height: 1.2;
}

.np-stimuli-import-source header span:not(.np-status) {
  color: var(--app-muted);
  font-size: 12px;
  font-weight: var(--app-label-weight);
  line-height: 1.4;
}

.np-stimuli-import-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px;
}

.np-stimuli-import-item {
  position: relative;
  display: grid;
  grid-template-columns: 20px 58px 1fr;
  align-items: center;
  gap: 9px;
  min-width: 0;
  border: 1px solid rgba(118, 148, 162, 0.22);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.np-stimuli-import-item:hover,
.np-stimuli-import-item:focus-within {
  border-color: rgba(0, 150, 154, 0.48);
  box-shadow: 0 12px 24px rgba(0, 127, 134, 0.10);
  transform: translateY(-1px);
}

.np-stimuli-import-item:has(input:checked) {
  border-color: var(--app-teal);
  background: rgba(235, 250, 250, 0.88);
  box-shadow: 0 0 0 3px rgba(0, 150, 154, 0.10);
}

.np-stimuli-import-item img {
  width: 58px;
  height: 44px;
  object-fit: cover;
  border: 1px solid rgba(118, 148, 162, 0.18);
  border-radius: 7px;
  background: #edf5f6;
}

.np-stimuli-import-preview {
  width: 58px;
  height: 44px;
  border: 1px solid rgba(118, 148, 162, 0.18);
  border-radius: 7px;
}

.np-stimuli-import-item span {
  min-width: 0;
}

.np-stimuli-import-item strong,
.np-stimuli-import-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.np-stimuli-import-item strong {
  color: var(--app-ink);
  font-size: 12px;
  font-weight: var(--app-label-weight);
}

.np-stimuli-import-item small {
  color: var(--app-muted);
  font-size: 11px;
  font-weight: var(--app-label-weight);
}

.np-stimulus-settings {
  margin-top: 10px;
  border-top: 1px solid var(--app-line);
  padding-top: 8px;
}

.np-stimulus-settings summary {
  cursor: pointer;
  color: var(--app-teal);
  font-size: 12px;
  font-weight: var(--app-label-weight);
}

.np-stimulus-settings-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.np-stimulus-settings-form label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.np-stimulus-settings-form .full {
  grid-column: 1 / -1;
}

.np-stimulus-settings-form .np-switch-list {
  padding: 7px;
}

.np-stimulus-settings-form label span {
  color: var(--app-muted);
  font-size: 11px;
  font-weight: var(--app-label-weight);
}

.np-stimulus-settings-form input,
.np-stimulus-settings-form select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--app-line);
  border-radius: 7px;
  background: #fbfeff;
  color: var(--app-ink);
  font: inherit;
  font-size: 12px;
  padding: 0 8px;
}

.np-stimulus-settings-form button {
  grid-column: 1 / -1;
  justify-self: start;
}

.np-flow-form {
  margin-bottom: 20px;
}

.np-builder-shell {
  display: grid;
  gap: 18px;
}

.np-builder-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(119, 145, 158, 0.22);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(248, 253, 254, 0.96), rgba(255, 255, 255, 0.92));
}

.np-builder-toolbar strong {
  display: block;
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: 17px;
}

.np-builder-toolbar span {
  display: block;
  margin-top: 3px;
  color: var(--app-muted);
  font-size: 13px;
  font-weight: 500;
}

.np-builder-toolbar-simple {
  align-items: center;
}

.np-builder-toolbar-actions,
.np-builder-routine-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
}

.np-builder-toolbar-actions .np-icon,
.np-builder-routine-actions .np-icon {
  width: 16px;
  height: 16px;
}

.np-icon-button {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(109, 130, 145, 0.25);
  border-radius: 7px;
  background: #fff;
  color: #536778;
  font: 600 15px/1 var(--app-font);
  cursor: pointer;
}

.np-icon-button:hover,
.np-icon-button:focus-visible {
  border-color: rgba(0, 150, 154, 0.48);
  color: #007f83;
  outline: 3px solid rgba(0, 150, 154, 0.13);
  outline-offset: 1px;
}

.np-icon-button:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

.np-builder-generate {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.np-builder-toolbelt {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
  gap: 12px;
  align-items: stretch;
  padding: 10px;
  border: 1px solid rgba(119, 145, 158, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.np-builder-toolkit {
  display: grid;
  gap: 10px;
}

.np-builder-toolhead {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 2px;
}

.np-builder-toolhead strong {
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: 14px;
  font-weight: var(--app-label-weight);
}

.np-builder-toolhead span {
  color: var(--app-muted);
  font-size: 12px;
  font-weight: var(--app-label-weight);
}

.np-builder-toolset {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
  gap: 8px;
  align-items: stretch;
}

.np-builder-toolset button,
.np-builder-tool {
  min-height: 62px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  border: 1px solid rgba(0, 150, 154, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 251, 251, 0.9)),
    #ffffff;
  color: var(--app-ink);
  padding: 8px 9px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(15, 29, 46, 0.05);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.np-builder-tool-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(0, 150, 154, 0.1);
  color: #007f83;
  font-size: 12px;
  font-weight: var(--app-label-weight);
  line-height: 1;
  letter-spacing: 0;
}

.np-builder-tool-icon .np-icon {
  width: 19px;
  height: 19px;
  display: block;
}

.np-builder-tool strong,
.np-builder-tool small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-builder-tool strong {
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: 13px;
  font-weight: var(--app-label-weight);
  line-height: 1.12;
  white-space: nowrap;
}

.np-builder-tool small {
  margin-top: 3px;
  color: var(--app-muted);
  font-size: 11px;
  font-weight: var(--app-label-weight);
  line-height: 1.2;
}

.np-builder-toolset button:hover,
.np-builder-toolset button:focus-visible {
  border-color: rgba(0, 150, 154, 0.5);
  background:
    linear-gradient(180deg, rgba(244, 254, 254, 1), rgba(222, 248, 248, 0.96)),
    #ffffff;
  box-shadow: 0 16px 30px rgba(15, 29, 46, 0.1);
  transform: translateY(-1px);
}

.np-builder-tool.is-fixation .np-builder-tool-icon {
  background: rgba(245, 165, 36, 0.14);
  color: #9a6400;
}

.np-builder-tool.is-blank .np-builder-tool-icon {
  background: rgba(109, 130, 145, 0.12);
  color: #536778;
}

.np-builder-tool.is-question .np-builder-tool-icon,
.np-builder-tool.is-text .np-builder-tool-icon {
  background: rgba(139, 108, 207, 0.12);
  color: #6f55a8;
}

.np-builder-tool.is-static-stimulus .np-builder-tool-icon,
.np-builder-tool.is-stimulus-set .np-builder-tool-icon {
  background: rgba(0, 150, 154, 0.12);
  color: #007f83;
}

.np-builder-savebar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  padding: 0 2px;
}

.np-builder-savebar span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(109, 130, 145, 0.08);
  color: var(--app-muted);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: var(--app-label-weight);
}

.np-builder-shell.is-dirty .np-builder-savebar span {
  background: rgba(245, 165, 36, 0.14);
  color: #9a6400;
}

.np-builder-shell[data-builder-status="error"] .np-builder-savebar span {
  background: rgba(190, 57, 44, 0.1);
  color: #a4372d;
}

.np-builder-shell[data-builder-status="saving"] .np-builder-savebar span {
  background: rgba(0, 150, 154, 0.1);
  color: #007f83;
}

.np-builder-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 16px;
  align-items: start;
}

.np-builder-sidepanels {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.np-builder-canvas {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(119, 145, 158, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(236, 250, 250, 0.68), rgba(255, 255, 255, 0.92));
  min-width: 0;
}

.np-builder-routine {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 0;
  padding: 14px;
  border: 1px solid rgba(111, 135, 149, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 36px rgba(15, 29, 46, 0.08);
}

.np-builder-routine.is-loop {
  border-color: rgba(0, 150, 154, 0.34);
  background:
    linear-gradient(180deg, rgba(235, 250, 250, 0.98), rgba(255, 255, 255, 0.96)),
    #ffffff;
}

.np-builder-routine.is-implicit {
  border-style: dashed;
}

.np-builder-routine.is-inactive {
  opacity: 0.58;
}

.np-builder-routine > header {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
}

.np-builder-routine > header strong {
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: 15px;
  line-height: 1.15;
}

.np-builder-routine > header span {
  color: var(--app-muted);
  font-size: 12px;
  font-weight: var(--app-label-weight);
}

.np-builder-routine-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.np-builder-order {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #0f2135;
  color: #ffffff;
  font-weight: var(--app-label-weight);
  font-size: 12px;
  border: 0;
  font-family: var(--app-font);
  cursor: grab;
}

.np-builder-order:focus-visible {
  outline: 3px solid rgba(0, 150, 154, 0.22);
  outline-offset: 2px;
}

.np-builder-routine-head strong {
  display: block;
  overflow: hidden;
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: 17px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.np-builder-routine-head small {
  display: block;
  margin-top: 2px;
  color: var(--app-muted);
  font-size: 11px;
  font-weight: var(--app-label-weight);
}

.np-builder-components {
  display: grid;
  gap: 8px;
}

.np-builder-lane {
  display: flex;
  gap: 10px;
  align-items: stretch;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scrollbar-width: thin;
}

.np-builder-node {
  position: relative;
  flex: 0 0 min(156px, 72vw);
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 96px;
  padding: 10px;
  border: 1px solid rgba(119, 145, 158, 0.22);
  border-top: 3px solid rgba(109, 130, 145, 0.72);
  border-radius: 8px;
  background: #fbfeff;
  color: var(--app-muted);
  box-shadow: none;
}

.np-builder-node[data-flow-item] {
  cursor: pointer;
}

.np-builder-node[data-flow-item]:hover {
  border-color: rgba(0, 150, 154, 0.42);
  box-shadow: 0 8px 18px rgba(15, 29, 46, 0.07);
}

.np-builder-node[data-flow-item]:focus-visible {
  border-color: rgba(0, 150, 154, 0.7);
  outline: 3px solid rgba(0, 150, 154, 0.14);
  outline-offset: 2px;
}

.np-builder-node.is-locked {
  cursor: default;
}

.np-builder-node.is-drag-chosen,
.np-builder-node.is-drag-active {
  cursor: grabbing;
}

.np-builder-node.is-drag-ghost {
  opacity: 0.42;
  background: rgba(0, 150, 154, 0.08);
}

.np-builder-node:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -9px;
  width: 10px;
  height: 10px;
  border-top: 2px solid rgba(83, 103, 120, 0.62);
  border-right: 2px solid rgba(83, 103, 120, 0.62);
  transform: translateY(-50%) rotate(45deg);
}

.np-builder-node b,
.np-builder-node strong {
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: 15px;
  line-height: 1.15;
}

.np-builder-node span,
.np-builder-node small {
  color: var(--app-muted);
  font-size: 12px;
  font-weight: var(--app-label-weight);
  line-height: 1.3;
}

.np-builder-node.is-start {
  flex-basis: 86px;
  border-top-color: #0f2135;
  background: #f7fbfc;
}

.np-builder-node.is-stimulus-set {
  flex-basis: min(238px, 82vw);
  border-color: rgba(0, 150, 154, 0.34);
  border-top-color: #00a6ad;
  background:
    linear-gradient(180deg, rgba(235, 250, 250, 0.98), rgba(255, 255, 255, 0.96)),
    #ffffff;
}

.np-builder-node.is-loopback {
  overflow: hidden;
  flex-basis: 92px;
  border-color: rgba(42, 166, 106, 0.26);
  border-top-color: #2aa66a;
  background: rgba(242, 251, 246, 0.98);
}

.np-builder-node.is-loopback::before {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 26px;
  height: 18px;
  border-right: 2px solid rgba(42, 166, 106, 0.46);
  border-bottom: 2px solid rgba(42, 166, 106, 0.46);
  border-radius: 0 0 10px 0;
}

.np-builder-node.is-fixation { border-top-color: #f5a524; }
.np-builder-node[data-flow-protocol-for] {
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.98), rgba(255, 255, 255, 0.96)),
    #ffffff;
  border-style: dashed;
  box-shadow: 0 12px 24px rgba(131, 92, 22, 0.08);
}
.np-builder-node.is-protocol {
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.98), rgba(255, 255, 255, 0.96)),
    #ffffff;
  border-style: dashed;
  box-shadow: 0 12px 24px rgba(131, 92, 22, 0.08);
}
.np-builder-node.is-et_stimulus,
.np-builder-node.is-static_stimulus { border-top-color: #00a6ad; }
.np-builder-node.is-gaze { border-top-color: #2aa66a; }
.np-builder-node.is-question,
.np-builder-node.is-text { border-top-color: #8b6ccf; }
.np-builder-node.is-blank { border-top-color: #6d8291; }
.np-builder-node.is-response { border-top-color: #4a6fa5; }
.np-builder-node.is-inactive { opacity: 0.55; }

.np-builder-drag-handle {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(109, 130, 145, 0.22);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.86);
  cursor: grab;
}

.np-builder-drag-handle span,
.np-builder-drag-handle span::before,
.np-builder-drag-handle span::after {
  width: 3px;
  height: 3px;
  display: block;
  border-radius: 50%;
  background: #536778;
  box-shadow: 0 6px 0 #536778, 0 -6px 0 #536778;
  content: "";
}

.np-builder-drag-handle span {
  position: relative;
}

.np-builder-drag-handle span::before,
.np-builder-drag-handle span::after {
  position: absolute;
}

.np-builder-drag-handle span::before {
  transform: translateX(-6px);
}

.np-builder-drag-handle span::after {
  transform: translateX(6px);
}

.np-builder-node-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
}

.np-builder-node-actions form,
.np-builder-routine-actions form {
  display: inline-flex;
  margin: 0;
}

.np-builder-loop-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(42, 166, 106, 0.2);
  border-radius: 7px;
  background: rgba(242, 251, 246, 0.72);
  color: var(--app-muted);
  font-size: 11px;
  font-weight: 500;
}

.np-builder-loop-strip strong {
  color: var(--app-ink);
  font-size: 12px;
  font-weight: 600;
}

.np-builder-loop-strip .np-button-ghost {
  margin-left: auto;
}

.np-builder-loop-label {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(42, 166, 106, 0.12);
  color: #247b50;
  font-weight: 650;
}

.np-builder-thumb-strip {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.np-builder-thumb-strip > img,
.np-builder-thumb-strip > span {
  width: 38px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(118, 148, 162, 0.22);
  border-radius: 7px;
  background: #edf5f6;
  color: var(--app-muted);
  font-size: 11px;
  font-weight: var(--app-label-weight);
  object-fit: cover;
}

.np-builder-insert-after {
  justify-self: start;
  min-height: 30px;
  border: 1px dashed rgba(0, 150, 154, 0.36);
  border-radius: 7px;
  background: rgba(235, 250, 250, 0.52);
  color: #006f73;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: var(--app-label-weight);
  cursor: pointer;
}

.np-builder-component {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid rgba(119, 145, 158, 0.2);
  border-left: 4px solid rgba(0, 150, 154, 0.62);
  border-radius: 7px;
  background: #fbfeff;
  color: var(--app-muted);
  font-size: 12px;
  font-weight: var(--app-label-weight);
}

.np-builder-component b {
  color: var(--app-ink);
  font-size: 13px;
}

.np-builder-component.is-fixation { border-left-color: #f5a524; }
.np-builder-component.is-stimulus { border-left-color: #00a6ad; }
.np-builder-component.is-gaze { border-left-color: #2aa66a; }
.np-builder-component.is-response { border-left-color: #4a6fa5; }
.np-builder-component.is-text { border-left-color: #8b6ccf; }
.np-builder-component.is-clock { border-left-color: #6d8291; }

.np-builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: auto;
}

.np-builder-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  gap: 6px;
  border: 1px dashed var(--app-line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--app-muted);
  text-align: center;
  padding: 18px;
}

.np-builder-empty strong {
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: 18px;
}

.np-builder-inspector,
.np-builder-advanced {
  border: 1px solid rgba(119, 145, 158, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  overflow: hidden;
}

.np-builder-sidepanels .np-builder-inspector {
  box-shadow: 0 16px 34px rgba(15, 42, 64, 0.06);
}

.np-builder-lint {
  display: none;
  border: 1px solid rgba(119, 145, 158, 0.24);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 42, 64, 0.06);
  overflow: hidden;
}

.np-builder-lint.is-visible {
  display: block;
}

.np-builder-lint-head,
.np-builder-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--app-line);
}

.np-builder-lint-head strong,
.np-builder-lint-head span,
.np-builder-preview-head strong,
.np-builder-preview-head span {
  display: block;
}

.np-builder-lint-head strong,
.np-builder-preview-head strong {
  color: var(--app-ink);
  font-size: 13px;
  font-weight: 650;
}

.np-builder-lint-head span,
.np-builder-preview-head span {
  margin-top: 2px;
  color: var(--app-muted);
  font-size: 11px;
  font-weight: 500;
}

.np-builder-lint ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 12px 14px 14px 30px;
  color: var(--app-muted);
  font-size: 12px;
}

.np-builder-lint li.is-error { color: #a4372d; }
.np-builder-lint li.is-warning { color: #91600c; }
.np-builder-lint li.is-success { color: #247b50; }

.np-builder-preview-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 32px));
  padding: 0;
  border: 1px solid rgba(119, 145, 158, 0.3);
  border-radius: 8px;
  background: #fff;
  color: var(--app-ink);
  box-shadow: 0 28px 80px rgba(15, 29, 46, 0.22);
}

.np-builder-preview-dialog::backdrop {
  background: rgba(7, 18, 31, 0.72);
}

.np-builder-preview-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 16px 18px 20px 44px;
}

.np-builder-preview-list li {
  padding: 9px 10px;
  border: 1px solid var(--app-line);
  border-radius: 7px;
  background: #fbfeff;
}

.np-builder-preview-list strong,
.np-builder-preview-list span {
  display: block;
}

.np-builder-preview-list strong {
  font-size: 13px;
  font-weight: 650;
}

.np-builder-preview-list span {
  margin-top: 3px;
  color: var(--app-muted);
  font-size: 12px;
}

.np-builder-inspector summary,
.np-builder-advanced summary {
  cursor: pointer;
  padding: 14px 16px;
  color: var(--app-ink);
  font-family: var(--app-display);
  font-weight: var(--app-label-weight);
}

.np-builder-inspector[open] summary,
.np-builder-advanced[open] summary {
  border-bottom: 1px solid var(--app-line);
}

.np-builder-inspector .np-flow-form {
  margin: 0;
  padding: 16px;
}

.np-builder-inspector .np-stimulus-set-form {
  margin: 0;
  padding: 16px;
}

.np-builder-sidepanels .np-form-grid {
  grid-template-columns: 1fr;
}

.np-builder-mini-advanced {
  border: 1px solid rgba(118, 148, 162, 0.18);
  border-radius: 8px;
  background: rgba(248, 253, 254, 0.8);
}

.np-builder-mini-advanced > summary {
  cursor: pointer;
  color: var(--app-muted);
  font-size: 12px;
  font-weight: var(--app-label-weight);
  padding: 10px 12px;
}

.np-builder-mini-advanced[open] > summary {
  border-bottom: 1px solid rgba(118, 148, 162, 0.16);
}

.np-builder-mini-advanced > .np-form-grid {
  padding: 12px;
}

.np-stimulus-set-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.np-stimulus-option {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 70px;
  padding: 8px;
  border: 1px solid rgba(119, 145, 158, 0.24);
  border-radius: 8px;
  background: #fbfeff;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(15, 29, 46, 0.045);
}

.np-stimulus-option:hover,
.np-stimulus-option:focus-within {
  border-color: rgba(0, 150, 154, 0.42);
  background: rgba(244, 253, 253, 0.98);
}

.np-stimulus-option input {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  accent-color: var(--app-teal);
}

.np-stimulus-option:has(input:checked) {
  border-color: rgba(0, 150, 154, 0.58);
  background: linear-gradient(180deg, rgba(235, 250, 250, 0.96), rgba(255, 255, 255, 0.98));
}

.np-stimulus-option-thumb {
  width: 54px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: #eaf2f4;
}

.np-stimulus-option-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.np-stimulus-option-media {
  width: 100%;
  height: 100%;
}

.np-stimulus-option strong {
  display: block;
  overflow: hidden;
  color: var(--app-ink);
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.np-stimulus-option small {
  display: block;
  margin-top: 3px;
  color: var(--app-muted);
  font-size: 11px;
  font-weight: var(--app-label-weight);
}

.np-builder-advanced .np-flow-timeline {
  margin: 0;
  padding: 16px;
}

.np-field.is-soft-disabled {
  opacity: 0.54;
}

[data-camera-distance-fields].is-soft-disabled {
  opacity: 0.54;
  pointer-events: none;
}

.np-flow-timeline {
  position: relative;
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.np-flow-timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 19px;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(0, 140, 146, 0.18), rgba(0, 140, 146, 0.46), rgba(0, 140, 146, 0.18));
}

.np-flow-step {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: rgba(255, 255, 255, 0.96);
  padding: 14px;
  box-shadow: 0 10px 26px rgba(15, 29, 46, 0.055);
}

.np-flow-step.is-inactive {
  opacity: 0.58;
}

.np-flow-index {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid #b8d7dc;
  border-radius: 50%;
  background: #e9f9fa;
  color: var(--app-teal);
  font-weight: var(--app-label-weight);
}

.np-flow-body {
  min-width: 0;
}

.np-flow-topline,
.np-flow-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.np-flow-topline strong {
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: 16px;
  line-height: 1.25;
}

.np-flow-body p {
  margin: 8px 0;
  color: var(--app-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.np-flow-meta {
  color: #6d808d;
  font-size: 12px;
  font-weight: var(--app-label-weight);
}

.np-empty-flow {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  border: 1px dashed var(--app-line-strong);
  border-radius: var(--app-radius);
  background: #fbfeff;
  color: var(--app-muted);
  padding: 18px 18px 18px 56px;
}

.np-empty-flow strong {
  color: var(--app-ink);
  font-family: var(--app-display);
}

.np-patient-hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(360px, 0.84fr) minmax(0, 1.16fr);
  gap: clamp(34px, 6vw, 82px);
  align-items: center;
  padding: clamp(24px, 5vw, 56px);
  background:
    linear-gradient(125deg, rgba(0, 195, 202, 0.08), transparent 42%),
    linear-gradient(180deg, #ffffff 0%, #f8fcfd 100%);
}

.np-patient-copy h1 {
  max-width: 620px;
  margin-bottom: 22px;
  color: var(--app-ink);
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.08;
}

.np-patient-copy p {
  max-width: 570px;
  color: var(--app-muted);
  font-size: 19px;
  font-weight: 500;
}

.np-service-list {
  display: grid;
  gap: 14px;
}

.np-service-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: rgba(255, 255, 255, 0.95);
  padding: 18px;
  box-shadow: 0 10px 28px rgba(15, 29, 46, 0.055);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.np-service-card:hover {
  border-color: #bdd8dd;
  box-shadow: 0 18px 38px rgba(15, 29, 46, 0.08);
  transform: translateY(-1px);
}

.np-service-card-compact {
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: start;
}

.np-service-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: var(--app-radius);
  background: linear-gradient(145deg, #e6f9fa 0%, #f2fbf8 100%);
  color: var(--app-teal);
}

.np-service-icon .np-icon {
  width: 25px;
  height: 25px;
}

.np-service-card h3 {
  margin: 0 0 7px;
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: 20px;
  line-height: 1.25;
}

.np-service-card p {
  margin: 0;
  color: var(--app-muted);
  font-size: 14px;
  font-weight: 500;
}

.np-service-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-top: 12px;
  color: var(--app-muted);
  font-size: 13px;
  font-weight: var(--app-label-weight);
}

.np-service-action {
  justify-self: end;
}

.np-runtime {
  min-height: 100svh;
  background:
    radial-gradient(circle at 50% 0%, rgba(0, 166, 173, 0.10), transparent 34rem),
    linear-gradient(180deg, #050912 0%, #07111f 52%, #04080f 100%);
  color: #f8fbfc;
  font-family: var(--app-font);
}

.np-runtime-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  min-height: 56px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 10px clamp(16px, 2.4vw, 24px);
  background: rgba(5, 10, 18, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  backdrop-filter: blur(20px);
}

.np-runtime-header > div {
  min-width: 0;
}

.np-runtime-header strong {
  display: block;
  max-width: min(68vw, 920px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #ffffff;
  font-family: var(--app-display);
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: 0;
}

.np-runtime-header span {
  color: #aebdc5;
  font-size: 12px;
  font-weight: var(--app-label-weight);
}

.np-runtime-header > span:last-child {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  padding: 0 10px;
}

.np-task-stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 88px clamp(18px, 3vw, 32px) 34px;
}

.np-runtime-task-active {
  background: #000000;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

html.np-runtime-task-lock {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #000000;
}

.np-runtime-task-active .np-runtime-header {
  display: none;
}

.np-runtime-task-active .np-task-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  min-height: 0;
  padding: 0;
  margin: 0;
  background: #000000;
  overflow: hidden;
  overscroll-behavior: none;
}

.np-runtime-task-active .jspsych-display-element,
.np-runtime-task-active .jspsych-content-wrapper,
.np-runtime-task-active .jspsych-content {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.np-runtime-task-active .jspsych-content-wrapper,
.np-runtime-task-active .jspsych-content {
  display: flex;
  align-items: center;
  justify-content: center;
}

.np-runtime-media-active .np-eye-overlay {
  display: none !important;
}

.np-task-card {
  width: min(780px, 100%);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.985) 0%, rgba(248, 252, 253, 0.965) 100%);
  color: var(--app-ink);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.30);
  padding: clamp(24px, 4vw, 42px);
  text-align: center;
}

.np-runtime .np-task-card::before {
  height: 2px;
  opacity: 0.68;
}

.np-task-card h1,
.np-task-card h2 {
  max-width: 700px;
  margin: 0 auto 12px;
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: var(--app-label-weight);
  line-height: 1.08;
  letter-spacing: 0;
}

.np-task-card p {
  max-width: 680px;
  margin: 0 auto 14px;
  color: var(--app-muted);
  font-size: clamp(15px, 1.3vw, 17px);
  font-weight: var(--app-label-weight);
  line-height: 1.52;
}

.np-task-card .np-muted {
  color: #687b89;
  font-size: 14px;
  font-weight: 500;
}

.np-runtime .np-actions {
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
}

.np-runtime .np-button,
.np-runtime .np-button-ghost {
  min-height: 40px;
  border-radius: 9px;
  padding: 0 15px;
  font-size: 13px;
  box-shadow: none;
}

.np-runtime .np-button {
  box-shadow: 0 10px 22px rgba(0, 140, 146, 0.18);
}

.np-fixation {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 42px;
  font-weight: var(--app-label-weight);
}

.np-stimulus-stage {
  position: relative;
  width: min(var(--stimulus-stage-max-width, 92vw), 1120px);
  height: min(var(--stimulus-stage-max-height, 74vh), 760px);
  display: grid;
  place-items: center;
}

.np-stimulus-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--app-radius);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

.np-stimulus-stage video,
.np-stimulus-stage .np-youtube-player {
  display: block;
  max-width: 100%;
  max-height: 100%;
  border: 0;
  border-radius: var(--app-radius);
  background: #000;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  object-fit: contain;
}

.np-stimulus-stage.is-fullscreen,
.np-stimulus-stage.is-media-fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100svh;
  background: #000000;
}

.np-stimulus-stage.is-fullscreen img {
  width: auto;
  height: auto;
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100svh;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
}

.np-stimulus-stage.is-fullscreen video,
.np-stimulus-stage.is-fullscreen .np-youtube-player,
.np-stimulus-stage.is-media-fullscreen video,
.np-stimulus-stage.is-media-fullscreen .np-youtube-player {
  width: 100vw;
  height: 100vh;
  height: 100svh;
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100svh;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
}

.np-stimulus-stage.is-fixed,
.np-stimulus-stage.is-stretch {
  width: auto;
  height: auto;
}

.np-stimulus-stage.is-stretch img {
  object-fit: fill;
}

.np-stimulus-stage.is-stretch video {
  object-fit: fill;
}

.np-media-start-gate {
  position: absolute;
  z-index: 12;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(1, 8, 17, 0.88);
}

.np-media-start-gate button {
  min-width: 152px;
}

@media (max-width: 980px) {
  .np-stimuli-add-grid {
    grid-template-columns: 1fr;
  }
}

.np-text-trial {
  width: min(740px, calc(100vw - 40px));
  display: grid;
  gap: 14px;
  justify-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.975);
  color: var(--app-ink);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.28);
  padding: clamp(24px, 4vw, 40px);
  text-align: center;
}

.np-text-trial h2 {
  margin: 0;
  font-family: var(--app-display);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
}

.np-text-trial p {
  max-width: 760px;
  margin: 0;
  color: var(--app-muted);
  font-size: clamp(15px, 1.7vw, 18px);
  font-weight: var(--app-label-weight);
  line-height: 1.52;
}

.np-text-trial small {
  color: #6f808b;
  font-weight: var(--app-label-weight);
}

.np-blank-trial {
  min-width: 1px;
  min-height: 1px;
}

.np-eye-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: #010409;
  color: #ffffff;
  isolation: isolate;
}

.np-eye-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 195, 202, 0.025), rgba(1, 4, 9, 0) 24%),
    #010409;
}

.np-eye-card {
  position: relative;
  z-index: 98;
  width: min(520px, calc(100vw - 32px));
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  background: rgba(7, 14, 24, 0.90);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.40);
  padding: 24px;
  text-align: center;
  backdrop-filter: blur(18px);
}

.np-eye-card h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-family: var(--app-display);
  font-size: 24px;
  line-height: 1.12;
}

.np-eye-card p,
.np-eye-status,
.np-eye-progress {
  color: #d8e3e7;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.5;
}

.np-eye-status:not(:empty),
.np-eye-progress:not(:empty) {
  display: inline-flex;
  justify-content: center;
  max-width: 100%;
  margin: 4px auto 0;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: #cbd9df;
  padding: 5px 10px;
  font-size: 12px;
}

.np-eye-progress:not(:empty) {
  color: #93ead4;
}

.np-eye-card.np-eye-notice-mode {
  width: min(560px, calc(100vw - 32px));
}

.np-eye-card.np-eye-notice-mode > .np-actions:not([data-eye-notice-action]) {
  display: none !important;
}

.np-eye-card [hidden] {
  display: none !important;
}

.np-eye-stage {
  position: fixed;
  inset: 0;
  z-index: 85;
  pointer-events: none;
  background: transparent;
}

.np-eye-card.np-hidden + .np-eye-stage,
.np-eye-overlay-running .np-eye-stage {
  background: #010409;
}

.np-eye-dot {
  position: fixed;
  z-index: 90;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border: 2px solid rgba(255, 255, 255, 0.98);
  border-radius: 50%;
  background: #00d8df;
  box-shadow:
    0 0 0 10px rgba(0, 216, 223, 0.10),
    0 0 34px rgba(0, 216, 223, 0.44);
  pointer-events: auto;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.np-eye-dot.armed {
  background: #f5c34d;
  box-shadow:
    0 0 0 11px rgba(245, 195, 77, 0.12),
    0 0 38px rgba(245, 195, 77, 0.48);
}

.np-eye-dot.ready {
  background: #31d083;
  transform: scale(1.18);
  box-shadow:
    0 0 0 13px rgba(49, 208, 131, 0.13),
    0 0 44px rgba(49, 208, 131, 0.52);
}

.np-eye-dot.recording {
  background: #31d083;
  transform: scale(1.12);
  box-shadow:
    0 0 0 14px rgba(49, 208, 131, 0.15),
    0 0 48px rgba(49, 208, 131, 0.58);
}

.np-eye-dot.hidden {
  opacity: 0;
  pointer-events: none;
}

.np-eye-dot.explode {
  transform: scale(2.2);
}

.np-eye-dot.verify {
  pointer-events: none;
}

.np-fixation-meter {
  position: absolute;
  top: 42px;
  left: 50%;
  width: 128px;
  transform: translateX(-50%);
  color: #ffffff;
  text-align: center;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.55));
}

.np-fixation-meter.above {
  top: auto;
  bottom: 42px;
}

.np-fixation-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.np-fixation-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #ffffff;
}

.np-fixation-label {
  margin-top: 7px;
  font-size: 12px;
  font-weight: var(--app-label-weight);
  letter-spacing: 0;
}

.np-gaze-cursor {
  position: fixed;
  z-index: 92;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
}

.np-hidden {
  display: none !important;
}

#webgazerVideoContainer,
#webgazerVideoFeed,
#webgazerFaceOverlay,
#webgazerFaceFeedbackBox,
#webgazerGazeDot {
  opacity: 0 !important;
  pointer-events: none !important;
}

body.np-webcam-setup .np-eye-overlay {
  place-items: start center;
  padding-top: 22px;
}

body.np-webcam-setup .np-eye-card {
  width: min(780px, calc(100vw - 32px));
  padding: 18px 22px;
}

body.np-webcam-setup .np-eye-card h2 {
  margin-bottom: 7px;
  font-size: 24px;
}

body.np-webcam-setup .np-eye-card p {
  margin: 6px 0;
}

.np-camera-position-guide {
  display: grid;
  gap: 8px;
  width: min(560px, 100%);
  margin: 12px auto 8px;
  padding: 10px 12px;
  border: 1px solid rgba(157, 177, 193, 0.34);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  text-align: left;
}

.np-camera-position-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: var(--app-label-weight);
}

.np-camera-position-head [data-camera-position-value] {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: var(--app-body-weight);
}

.np-camera-distance-track {
  position: relative;
  height: 8px;
  overflow: visible;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.np-camera-distance-target {
  position: absolute;
  inset-block: 0;
  border-radius: inherit;
  background: rgba(50, 207, 178, 0.54);
}

.np-camera-distance-marker {
  position: absolute;
  top: 50%;
  left: 0;
  width: 14px;
  height: 14px;
  border: 2px solid #07121f;
  border-radius: 50%;
  background: #f2a53b;
  box-shadow: 0 0 0 2px rgba(242, 165, 59, 0.34);
  transform: translate(-50%, -50%);
  transition: left 120ms linear, background-color 160ms ease, box-shadow 160ms ease;
}

.np-camera-position-guide.is-good {
  border-color: rgba(50, 207, 178, 0.48);
  background: rgba(50, 207, 178, 0.08);
}

.np-camera-position-guide.is-good .np-camera-distance-marker {
  background: #32cfb2;
  box-shadow: 0 0 0 3px rgba(50, 207, 178, 0.24);
}

.np-camera-position-guide.is-good .np-camera-position-head [data-camera-position-value] {
  color: #72e5d0;
}

.np-camera-position-message {
  min-height: 18px;
  margin: 0 !important;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.45;
}

body.np-webcam-setup #webgazerVideoContainer {
  opacity: 1 !important;
  display: block !important;
  pointer-events: none !important;
  z-index: 96 !important;
  top: 52% !important;
  left: 50% !important;
  transform: translate(-50%, -42%) !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 14px !important;
  background: #050b12 !important;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(0, 216, 223, 0.12) !important;
}

body.np-webcam-setup #webgazerVideoFeed,
body.np-webcam-setup #webgazerFaceOverlay {
  opacity: 1 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

body.np-webcam-setup #webgazerFaceFeedbackBox {
  opacity: 1 !important;
  display: block !important;
  border-width: 4px !important;
  border-radius: 12px !important;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.16), 0 0 24px rgba(0, 216, 223, 0.26) !important;
}

body.np-webcam-setup #webgazerGazeDot {
  opacity: 0 !important;
}

body.np-webcam-setup .np-eye-stage {
  background:
    radial-gradient(circle at 50% 56%, rgba(0, 216, 223, 0.09), transparent 24%),
    #010409;
}

.np-face-guard-overlay {
  position: fixed;
  inset: 0;
  z-index: 94;
  display: none;
  place-items: start center;
  padding-top: 22px;
  background:
    radial-gradient(circle at 50% 56%, rgba(0, 216, 223, 0.09), transparent 28%),
    rgba(1, 4, 9, 0.92);
  color: #ffffff;
}

body.np-face-guard-paused .np-face-guard-overlay {
  display: grid;
}

.np-face-guard-card {
  position: relative;
  z-index: 98;
  width: min(780px, calc(100vw - 32px));
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  background: rgba(7, 14, 24, 0.92);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.40);
  padding: 18px 22px;
  text-align: center;
  backdrop-filter: blur(16px);
}

.np-face-guard-card h2 {
  margin: 0 0 8px;
  color: #ffffff;
  font-family: var(--app-display);
  font-size: 24px;
  line-height: 1.1;
}

.np-face-guard-card p {
  margin: 6px 0;
  color: #d8e3e7;
  font-weight: 500;
  line-height: 1.45;
}

.np-face-guard-status {
  color: #8ff2d0 !important;
}

body.np-face-guard-paused #webgazerVideoContainer {
  opacity: 1 !important;
  display: block !important;
  pointer-events: none !important;
  z-index: 96 !important;
  top: 52% !important;
  left: 50% !important;
  transform: translate(-50%, -42%) !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 14px !important;
  background: #050b12 !important;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(0, 216, 223, 0.12) !important;
}

body.np-face-guard-paused #webgazerVideoFeed,
body.np-face-guard-paused #webgazerFaceOverlay {
  opacity: 1 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

body.np-face-guard-paused #webgazerFaceFeedbackBox {
  opacity: 1 !important;
  display: block !important;
  border-width: 4px !important;
  border-radius: 12px !important;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.16), 0 0 24px rgba(0, 216, 223, 0.26) !important;
}

body.np-face-guard-paused #webgazerGazeDot {
  opacity: 0 !important;
}

.np-settings-panel {
  max-width: 1280px;
}

.np-settings-panel + .np-settings-panel {
  margin-top: 22px;
}

.np-danger-zone {
  border-color: var(--app-danger-line);
  background: linear-gradient(180deg, #fffdfc 0%, #fff6f3 100%);
}

.np-danger-zone::before {
  background: linear-gradient(90deg, var(--app-danger) 0%, #e37b5f 100%);
}

.np-danger-copy {
  display: grid;
  gap: 6px;
  max-width: 920px;
  border: 1px solid var(--app-danger-line);
  border-radius: var(--app-radius);
  padding: 14px 16px;
  background: rgba(255, 241, 238, 0.72);
  color: #7c2f21;
  font-weight: 500;
  line-height: 1.45;
}

.np-modal {
  width: min(620px, calc(100vw - 32px));
  border: 0;
  border-radius: 20px;
  padding: 0;
  background: transparent;
  color: var(--app-ink);
  z-index: 2147483200;
}

.np-modal::backdrop {
  background: rgba(4, 12, 20, 0.64);
  backdrop-filter: blur(6px);
}

.np-modal-card {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(183, 64, 45, 0.22);
  border-radius: 14px;
  padding: 20px;
  background: #ffffff;
  box-shadow: 0 20px 54px rgba(9, 24, 38, 0.22);
}

.np-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.np-modal-head h2 {
  margin: 0;
  font-family: var(--app-display);
  font-size: 24px;
  line-height: 1.05;
}

.np-modal-card p {
  margin: 0;
  color: var(--app-muted);
  font-weight: 500;
  line-height: 1.45;
}

.np-modal-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--app-line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--app-muted);
  cursor: pointer;
  font: inherit;
  font-weight: var(--app-label-weight);
}

.np-modal-close:hover {
  border-color: var(--app-danger-line);
  color: var(--app-danger);
}

.np-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

@media (max-height: 720px) {
  body.np-webcam-setup .np-eye-overlay {
    padding-top: 12px;
  }

  body.np-webcam-setup .np-eye-card,
  .np-face-guard-card {
    padding: 12px 16px;
  }

  body.np-webcam-setup #webgazerVideoContainer,
  body.np-face-guard-paused #webgazerVideoContainer {
    top: 58% !important;
  }
}

.np-result-hero .np-panel-head {
  margin-bottom: 12px;
}

.np-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  color: var(--app-muted);
  font-size: 13px;
  font-weight: var(--app-label-weight);
}

.np-result-kpis .np-kpi strong {
  font-size: clamp(20px, 2vw, 26px);
}

.np-quality-panel {
  --quality-accent: var(--app-teal);
  --quality-soft: rgba(0, 140, 146, 0.07);
  margin-top: 24px;
  border-left: 4px solid var(--quality-accent);
  background: #ffffff;
}

.np-quality-panel.is-review {
  --quality-accent: #a66a08;
  --quality-soft: rgba(245, 165, 36, 0.08);
}

.np-quality-panel.is-exclude {
  --quality-accent: var(--app-danger);
  --quality-soft: rgba(233, 102, 76, 0.07);
}

.np-quality-panel.is-legacy {
  --quality-accent: #687c8b;
  --quality-soft: rgba(89, 109, 125, 0.06);
}

.np-quality-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.np-quality-heading h2 {
  margin: 2px 0 0;
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: 20px;
  font-weight: var(--app-box-title-weight);
  line-height: 1.15;
}

.np-quality-heading p {
  margin: 5px 0 0;
  color: var(--app-muted);
  font-size: 13px;
  font-weight: 500;
}

.np-quality-kicker {
  display: block;
  color: var(--quality-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.np-quality-grade {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--quality-accent) 30%, transparent);
  border-radius: var(--app-radius);
  padding: 0 11px;
  background: #ffffff;
  color: var(--quality-accent);
  font-size: 13px;
  white-space: nowrap;
}

.np-quality-grade > span,
.np-quality-flags li > span {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: currentColor;
}

.np-quality-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.np-quality-metrics > div {
  min-width: 0;
  min-height: 82px;
  padding: 12px 14px;
  border-right: 1px solid var(--app-line);
  border-bottom: 1px solid var(--app-line);
}

.np-quality-metrics > div:nth-child(3n) {
  border-right: 0;
}

.np-quality-metrics > div:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.np-quality-metrics span,
.np-quality-detail-grid h3 {
  display: block;
  margin: 0;
  color: var(--app-muted);
  font-size: 12px;
  font-weight: var(--app-label-weight);
  letter-spacing: 0;
}

.np-quality-metrics strong {
  display: block;
  margin-top: 5px;
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: 19px;
  font-weight: var(--app-box-title-weight);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.np-quality-metrics small {
  display: block;
  margin-top: 4px;
  color: #718390;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
}

.np-quality-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 20px;
  margin-top: 18px;
}

.np-quality-flags ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

.np-quality-flags li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  border-left: 2px solid currentColor;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.72);
  color: #a66a08;
}

.np-quality-flags li.is-exclude {
  color: var(--app-danger);
}

.np-quality-flags li.is-legacy {
  color: #687c8b;
}

.np-quality-flags li > span {
  margin-top: 4px;
}

.np-quality-flags li strong {
  display: block;
  color: var(--app-ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.np-quality-flags code {
  display: block;
  margin-top: 2px;
  color: var(--app-muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.np-quality-reasons dl {
  margin: 9px 0 0;
}

.np-quality-reasons dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--app-line);
  padding: 7px 0;
}

.np-quality-reasons dt,
.np-quality-reasons dd {
  margin: 0;
  color: var(--app-ink);
  font-size: 12px;
  font-weight: 500;
}

.np-quality-reasons dd {
  color: var(--app-muted);
  font-variant-numeric: tabular-nums;
}

.np-quality-empty {
  margin: 9px 0 0;
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 500;
}

.np-quality-audit {
  margin-top: 18px;
  border-top: 1px solid var(--app-line);
}

.np-quality-audit > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 42px;
  color: var(--app-ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  list-style: none;
}

.np-quality-audit > summary::-webkit-details-marker {
  display: none;
}

.np-quality-audit > summary small {
  color: var(--app-muted);
  font-size: 11px;
  font-weight: 500;
}

.np-quality-audit .np-table-scroll {
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
}

.np-quality-audit .np-table {
  min-width: 720px;
}

.np-quality-outcome {
  display: inline-block;
  min-width: 42px;
  border-radius: 4px;
  padding: 3px 6px;
  background: #edf7f1;
  color: #14784b;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.np-quality-outcome.is-fail {
  background: var(--app-danger-soft);
  color: var(--app-danger);
}

.np-result-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.np-result-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.np-result-summary div {
  min-height: 72px;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 252, 253, 0.9));
  padding: 12px;
}

.np-result-summary span {
  display: block;
  color: var(--app-muted);
  font-size: 12px;
  font-weight: var(--app-label-weight);
  letter-spacing: 0;
}

.np-result-summary strong {
  display: block;
  margin-top: 6px;
  color: var(--app-teal);
  font-family: var(--app-display);
  font-size: 19px;
  font-weight: var(--app-box-title-weight);
  line-height: 1.05;
}

.np-result-summary-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

.np-result-summary-compact div {
  min-height: 78px;
}

.np-result-summary-compact strong {
  font-size: 20px;
}

.np-aggregate-card {
  display: block;
}

.np-aggregate-card > summary {
  cursor: pointer;
  list-style: none;
  margin: 0;
}

.np-aggregate-card > summary::-webkit-details-marker {
  display: none;
}

.np-aggregate-card > summary::after {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-right: 2px solid var(--app-muted);
  border-bottom: 2px solid var(--app-muted);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.np-aggregate-card[open] > summary::after {
  transform: rotate(225deg);
}

.np-aggregate-card > .np-result-summary,
.np-aggregate-card > .np-stimulus-analytics {
  margin: 18px;
}

.np-aggregate-card > .np-stimulus-analytics {
  margin-top: 0;
}

.np-result-dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.np-result-dl div {
  display: grid;
  gap: 3px;
  border-bottom: 1px solid var(--app-line);
  padding-bottom: 10px;
}

.np-result-dl div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.np-result-dl dt {
  color: var(--app-muted);
  font-size: 12px;
  font-weight: var(--app-label-weight);
  letter-spacing: 0;
}

.np-result-dl dd {
  margin: 0;
  color: var(--app-ink);
  font-size: 14px;
  font-weight: var(--app-label-weight);
  overflow-wrap: anywhere;
}

.np-table-scroll {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.np-table-scroll .np-table {
  margin-bottom: 0;
}

.np-result-table {
  min-width: 1020px;
  font-size: 13px;
}

.np-stimulus-analytics {
  display: grid;
  gap: 18px;
}

.np-heatmap-card {
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(15, 29, 46, 0.055);
  padding: clamp(14px, 2vw, 18px);
}

.np-heatmap-head,
.np-heatmap-layout {
  display: grid;
  gap: 18px;
}

.np-heatmap-layout > *,
.np-result-layout > * {
  min-width: 0;
}

.np-heatmap-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  margin-bottom: 16px;
}

.np-heatmap-head h3 {
  margin: 0;
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: 22px;
  line-height: 1.15;
}

.np-heatmap-head p {
  margin: 5px 0 0;
  color: var(--app-muted);
  font-size: 13px;
  font-weight: var(--app-label-weight);
}

.np-heatmap-layout {
  grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1.1fr);
  align-items: start;
}

.np-heatmap-frame {
  overflow: hidden;
  max-width: 100%;
  border: 1px solid var(--app-line-strong);
  border-radius: var(--app-radius);
  background:
    linear-gradient(45deg, rgba(0, 140, 146, 0.06) 25%, transparent 25% 50%, rgba(0, 140, 146, 0.06) 50% 75%, transparent 75%),
    #f7fcfd;
  background-size: 18px 18px;
}

.np-heatmap-svg {
  display: block;
  width: 100%;
  height: auto;
}

.np-video-heatmap-player {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 220px;
  background: #000;
}

.np-video-heatmap-player video,
.np-video-heatmap-player iframe,
.np-video-heatmap-youtube {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  object-fit: contain;
}

.np-video-heatmap-youtube {
  background-color: #000;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.np-video-heatmap-overlay {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
}

.np-video-heatmap-static,
.np-video-heatmap-canvas,
.np-video-heatmap-roi {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.np-video-heatmap-static,
.np-video-heatmap-canvas {
  z-index: 1;
}

.np-video-heatmap-roi {
  z-index: 2;
}

.np-video-heatmap-static[hidden],
.np-video-heatmap-canvas[hidden],
.np-video-heatmap-roi[hidden] {
  display: none;
}

.np-video-heatmap-canvas {
  display: block;
  object-fit: fill;
}

.np-video-heatmap-overlay .np-heatmap-svg,
.np-video-heatmap-static .np-heatmap-svg,
.np-video-heatmap-roi .np-heatmap-svg {
  width: 100%;
  height: 100%;
}

.np-video-heatmap-toolbar {
  display: grid;
  grid-template-columns: minmax(76px, auto) minmax(170px, 220px) minmax(140px, 1fr);
  gap: 12px;
  align-items: end;
  padding: 12px;
  border-top: 1px solid var(--app-line);
  background: #fff;
}

.np-video-heatmap-clock,
.np-video-heatmap-toolbar label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.np-video-heatmap-clock {
  min-width: 76px;
}

.np-video-heatmap-clock > span,
.np-video-heatmap-toolbar label > span {
  color: var(--app-muted);
  font-size: 11px;
  font-weight: var(--app-label-weight);
}

.np-video-heatmap-clock output {
  color: var(--app-ink);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.np-video-heatmap-toolbar select {
  width: 100%;
  min-height: 34px;
  padding: 6px 30px 6px 10px;
  border: 1px solid var(--app-line-strong);
  border-radius: 6px;
  background-color: #fff;
  color: var(--app-ink);
  font: inherit;
  font-size: 12px;
}

.np-video-heatmap-status {
  align-self: center;
  color: var(--app-muted);
  font-size: 11px;
  line-height: 1.45;
}

.np-heatmap-legend {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--app-line);
  background: rgba(255, 255, 255, 0.88);
  padding: 9px 10px 0;
  color: var(--app-muted);
  font-size: 11px;
  font-weight: var(--app-label-weight);
  letter-spacing: 0;
}

.np-heatmap-gradient {
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #440154 0%, #3e4989 25%, #26828e 50%, #35b779 75%, #fde725 100%);
  box-shadow: inset 0 0 0 1px rgba(15, 29, 46, 0.16);
}

.np-heatmap-method {
  margin: 0;
  background: rgba(255, 255, 255, 0.88);
  padding: 5px 10px 10px;
  color: var(--app-muted);
  font-size: 11px;
  font-weight: var(--app-label-weight);
}

.np-roi-table {
  min-width: 760px;
  font-size: 13px;
}

.np-roi-key {
  display: block;
  margin-top: 3px;
  color: var(--app-muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: var(--app-label-weight);
}

.np-roi-type {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid var(--app-line);
  border-radius: 999px;
  background: #f7fcfd;
  color: var(--app-muted);
  padding: 0 8px;
  font-size: 11px;
  font-weight: var(--app-label-weight);
  letter-spacing: 0;
}

.np-roi-form {
  align-items: end;
}

.np-roi-draw-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: linear-gradient(180deg, #ffffff 0%, #f7fcfd 100%);
  padding: clamp(12px, 2vw, 16px);
}

.np-roi-draw-copy h3 {
  margin: 0;
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: 18px;
  line-height: 1.15;
}

.np-roi-draw-copy p {
  margin: 5px 0 0;
  color: var(--app-muted);
  font-size: 13px;
  font-weight: 500;
}

.np-roi-draw-stage {
  position: relative;
  overflow: hidden;
  width: min(860px, 100%);
  border: 1px solid var(--app-line-strong);
  border-radius: var(--app-radius);
  background:
    linear-gradient(45deg, rgba(0, 140, 146, 0.06) 25%, transparent 25% 50%, rgba(0, 140, 146, 0.06) 50% 75%, transparent 75%),
    #eef7f8;
  background-size: 18px 18px;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}

.np-roi-draw-stage img,
.np-roi-draw-stage video {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.np-roi-draw-stage video {
  background: #000;
}

.np-roi-youtube-shell {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: #000;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

.np-roi-youtube-shell[hidden] {
  display: none;
}

.np-roi-youtube-shell iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.np-roi-draw-box {
  position: absolute;
  z-index: 3;
  display: block;
  border: 2px solid var(--roi-color, var(--app-teal));
  background: rgba(0, 166, 173, 0.10);
  background: color-mix(in srgb, var(--roi-color, var(--app-teal)) 14%, transparent);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.96), 0 12px 28px rgba(15, 29, 46, 0.20);
  pointer-events: none;
}

.np-roi-draw-box.is-ellipse {
  border-radius: 999px;
}

.np-roi-draw-svg,
.np-roi-overlay-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.np-roi-draw-svg {
  z-index: 2;
}

.np-roi-draw-polygon,
.np-roi-overlay-svg polygon {
  fill: rgba(0, 166, 173, 0.12);
  fill: color-mix(in srgb, var(--roi-color, var(--app-teal)) 15%, transparent);
  stroke: var(--roi-color, var(--app-teal));
  stroke-width: 0.55;
  vector-effect: non-scaling-stroke;
}

.np-roi-draw-polyline {
  fill: none;
  stroke: var(--roi-color, var(--app-teal));
  stroke-width: 0.8;
  stroke-dasharray: 2 1.4;
  vector-effect: non-scaling-stroke;
}

.np-roi-vertex-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.np-roi-vertex {
  position: absolute;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--roi-color, var(--app-teal));
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 29, 46, 0.28);
  font: var(--app-label-weight) 11px/1 var(--app-font);
}

.np-roi-draw-tools button:disabled {
  opacity: 0.44;
  cursor: not-allowed;
}

.np-roi-draw-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
}

.np-roi-draw-tools span {
  color: var(--app-muted);
  font-size: 12px;
  font-weight: var(--app-label-weight);
}

.np-roi-video-controls {
  display: inline-flex;
  flex: 1 1 360px;
  align-items: center;
  gap: 8px;
  min-width: min(100%, 280px);
}

.np-roi-video-controls[hidden] {
  display: none;
}

.np-roi-video-controls input[type="range"] {
  min-width: 120px;
  flex: 1 1 220px;
}

.np-roi-video-controls output {
  min-width: 66px;
  color: var(--app-muted);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}

.np-field input[type="color"] {
  min-height: 48px;
  padding: 5px;
}

.np-roi-workbench {
  margin-top: 20px;
}

.np-roi-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.np-roi-board {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 29, 46, 0.06);
}

.np-roi-board-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--app-line);
  padding: 10px 12px;
}

.np-roi-board-head strong {
  min-width: 0;
  overflow: hidden;
  color: var(--app-ink);
  font-size: 13px;
  font-weight: var(--app-label-weight);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.np-roi-board-head span {
  flex: 0 0 auto;
  color: var(--app-muted);
  font-size: 12px;
  font-weight: var(--app-label-weight);
}

.np-roi-stage {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(45deg, rgba(0, 140, 146, 0.06) 25%, transparent 25% 50%, rgba(0, 140, 146, 0.06) 50% 75%, transparent 75%),
    #f7fcfd;
  background-size: 18px 18px;
}

.np-roi-stage img,
.np-roi-stage video {
  display: block;
  width: 100%;
  height: auto;
}

.np-roi-stage video {
  background: #000;
}

.np-protocol-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.np-protocol-type-card {
  display: grid;
  gap: 10px;
  min-height: 132px;
  padding: 18px;
  border: 1px solid rgba(0, 166, 173, 0.28);
  border-radius: 12px;
  background:
    linear-gradient(140deg, rgba(0, 166, 173, 0.10), transparent 42%),
    #fff;
  color: var(--app-ink);
  text-decoration: none;
  box-shadow: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.np-protocol-type-card:hover,
.np-protocol-type-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--app-teal);
  box-shadow: 0 10px 24px rgba(0, 127, 134, 0.12);
  outline: none;
}

.np-protocol-type-card span {
  font-weight: var(--app-label-weight);
  font-size: 1.12rem;
}

.np-protocol-type-card strong {
  font-weight: var(--app-label-weight);
  line-height: 1.45;
  color: var(--app-muted);
}

.np-questionnaire-builder {
  display: grid;
  gap: 16px;
}

.np-qb-toolbar,
.np-qb-page > header,
.np-qb-question > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.np-qb-toolbar {
  padding: 14px;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: linear-gradient(180deg, rgba(248, 253, 254, 0.98), rgba(255, 255, 255, 0.95));
  box-shadow: 0 14px 30px rgba(15, 29, 46, 0.055);
}

.np-qb-toolbar strong {
  display: block;
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: 17px;
  line-height: 1.2;
}

.np-qb-toolbar span,
.np-qb-page > header textarea,
.np-qb-question small,
.np-stimulus-note {
  color: var(--app-muted);
  font-size: 13px;
  font-weight: var(--app-label-weight);
  line-height: 1.4;
}

.np-qb-actions,
.np-qb-page-actions,
.np-qb-page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.np-qb-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: rgba(255, 255, 255, 0.82);
}

.np-qb-palette button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid rgba(0, 150, 154, 0.22);
  border-radius: 8px;
  background: rgba(235, 250, 250, 0.7);
  color: var(--app-teal-dark);
  padding: 7px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: var(--app-label-weight);
  cursor: pointer;
}

.np-qb-palette-icon {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: #fff;
  color: var(--app-ink);
  box-shadow: inset 0 0 0 1px rgba(118, 148, 162, 0.18);
  font-family: var(--app-display);
  font-size: 12px;
  font-weight: var(--app-label-weight);
}

.np-qb-palette button:hover,
.np-qb-palette button:focus-visible {
  border-color: rgba(0, 150, 154, 0.48);
  background: rgba(220, 247, 247, 0.96);
  outline: none;
}

.np-qb-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: rgba(255, 255, 255, 0.82);
}

.np-qb-pages {
  display: grid;
  gap: 16px;
}

.np-qb-page {
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: rgba(255, 255, 255, 0.94);
  padding: 16px;
  box-shadow: var(--app-shadow-soft);
}

.np-qb-page > header {
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(118, 148, 162, 0.18);
  margin-bottom: 14px;
}

.np-qb-page-number {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--app-ink);
  color: #fff;
  font-weight: var(--app-label-weight);
}

.np-qb-page > header > div:not(.np-qb-page-meta) {
  display: grid;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.np-qb-page-meta span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(109, 130, 145, 0.08);
  color: var(--app-muted);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: var(--app-label-weight);
}

.np-qb-page input,
.np-qb-page textarea,
.np-qb-page select,
.np-qb-settings input,
.np-questionnaire-builder input,
.np-questionnaire-builder textarea,
.np-questionnaire-builder select {
  font: inherit;
}

.np-questionnaire-builder input:not([type="radio"]):not([type="checkbox"]):not([type="range"]):not([type="hidden"]),
.np-questionnaire-builder textarea,
.np-questionnaire-builder select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--app-line-strong);
  border-radius: var(--app-radius);
  background: rgba(255, 255, 255, 0.94);
  color: var(--app-ink);
  padding: 10px 13px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.np-questionnaire-builder textarea {
  min-height: 82px;
  resize: vertical;
  line-height: 1.45;
}

.np-questionnaire-builder select {
  appearance: auto;
}

.np-questionnaire-builder input:not([type="radio"]):not([type="checkbox"]):not([type="range"]):not([type="hidden"]):focus,
.np-questionnaire-builder textarea:focus,
.np-questionnaire-builder select:focus {
  border-color: var(--app-teal);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 139, 143, 0.12);
}

.np-questionnaire-builder input::placeholder,
.np-questionnaire-builder textarea::placeholder {
  color: rgba(89, 109, 125, 0.66);
}

.np-qb-page > header input {
  font-family: var(--app-display);
  font-size: 19px;
  font-weight: var(--app-label-weight);
  line-height: 1.15;
}

.np-qb-page > header textarea {
  min-height: 58px;
  resize: vertical;
}

.np-qb-question-list {
  display: grid;
  gap: 12px;
}

.np-qb-empty-page {
  display: grid;
  gap: 4px;
  min-height: 86px;
  place-items: center;
  border: 1px dashed rgba(118, 148, 162, 0.32);
  border-radius: 8px;
  background: rgba(248, 253, 254, 0.86);
  color: var(--app-muted);
  padding: 18px;
  text-align: center;
}

.np-qb-empty-page strong {
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: 16px;
}

.np-qb-question {
  border: 1px solid var(--app-line);
  border-left: 4px solid rgba(0, 150, 154, 0.7);
  border-radius: var(--app-radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 253, 254, 0.94));
  padding: 14px;
  box-shadow: 0 14px 30px rgba(15, 29, 46, 0.055);
}

.np-qb-question > header {
  margin-bottom: 0;
}

.np-qb-question.is-open {
  border-color: rgba(0, 150, 154, 0.34);
  border-left-color: var(--app-teal);
  box-shadow: 0 18px 38px rgba(15, 29, 46, 0.075);
}

.np-qb-question.is-open > header {
  margin-bottom: 12px;
}

.np-qb-question.is-collapsed {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 20px rgba(15, 29, 46, 0.045);
}

.np-qb-question-body[hidden] {
  display: none;
}

.np-qb-question-title {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  flex: 1;
}

.np-qb-question-toggle {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.np-qb-question-toggle:focus-visible {
  outline: 3px solid rgba(0, 150, 154, 0.18);
  outline-offset: 5px;
  border-radius: 8px;
}

.np-qb-question-toggle > span:last-child {
  min-width: 0;
}

.np-qb-chevron {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  color: var(--app-muted);
}

.np-qb-chevron::before {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(-45deg);
  transition: transform 0.16s ease;
}

.np-qb-question.is-open .np-qb-chevron::before {
  transform: rotate(45deg) translate(-2px, -2px);
}

.np-qb-question-title strong {
  display: block;
  overflow: hidden;
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: 16px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.np-qb-question-title em {
  display: block;
  margin-top: 3px;
  color: var(--app-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: var(--app-label-weight);
  line-height: 1.35;
}

.np-qb-type-icon {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  margin-right: 6px;
  border-radius: 7px;
  background: rgba(0, 150, 154, 0.10);
  color: var(--app-teal-dark);
  font-family: var(--app-display);
  font-size: 12px;
  font-weight: var(--app-label-weight);
}

.np-qb-drag {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(109, 130, 145, 0.22);
  border-radius: 7px;
  background: rgba(248, 253, 254, 0.96);
  color: var(--app-muted);
  cursor: grab;
}

.np-qb-drag span,
.np-qb-drag span::before,
.np-qb-drag span::after {
  width: 3px;
  height: 3px;
  display: block;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 6px 0 currentColor, 0 -6px 0 currentColor;
  content: "";
}

.np-qb-drag span {
  position: relative;
}

.np-qb-drag span::before,
.np-qb-drag span::after {
  position: absolute;
}

.np-qb-drag span::before {
  transform: translateX(-6px);
}

.np-qb-drag span::after {
  transform: translateX(6px);
}

.np-qb-question-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.np-qb-question-grid label {
  display: grid;
  gap: 7px;
  color: var(--app-ink);
  font-size: 13px;
  font-weight: var(--app-label-weight);
}

.np-qb-question-grid label.np-check {
  display: inline-flex;
  align-self: end;
  justify-self: start;
}

.np-qb-question-grid .full {
  grid-column: 1 / -1;
}

.np-qb-preview {
  margin: 4px 0 14px;
  padding: 12px;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: linear-gradient(180deg, rgba(248, 253, 254, 0.9), rgba(255, 255, 255, 0.96));
}

.np-qb-preview input:not([type="radio"]):not([type="checkbox"]),
.np-qb-preview textarea,
.np-qb-preview select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--app-line-strong);
  border-radius: var(--app-radius);
  background: #fff;
  color: var(--app-muted);
  padding: 9px 10px;
}

.np-qb-preview-choice {
  display: grid;
  gap: 8px;
}

.np-qb-preview-choice label,
.np-qb-preview-slider {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--app-muted);
  font-size: 13px;
  font-weight: var(--app-label-weight);
}

.np-qb-preview-choice input[type="radio"],
.np-qb-preview-choice input[type="checkbox"] {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 0;
  padding: 0;
  accent-color: var(--app-teal);
}

.np-qb-preview-choice.is-likert {
  grid-template-columns: repeat(var(--likert-count, 5), minmax(92px, 1fr));
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(118, 148, 162, 0.18);
  border-radius: 10px;
  background: #ffffff;
  scrollbar-width: thin;
}

.np-qb-preview-choice.is-likert label {
  min-width: 0;
  min-height: 86px;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
  border-right: 1px solid rgba(118, 148, 162, 0.14);
  padding: 12px 8px;
  text-align: center;
}

.np-qb-preview-choice.is-likert label:last-child {
  border-right: 0;
}

.np-qb-preview-choice.is-likert label > span {
  max-width: 100%;
  color: var(--app-ink);
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.np-qb-preview-choice.is-image_choice {
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
}

.np-qb-preview-choice.is-image_choice label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 10px;
  align-items: center;
  border: 1px solid rgba(118, 148, 162, 0.18);
  border-radius: 10px;
  padding: 10px;
  background: #ffffff;
}

.np-qb-preview-choice.is-image_choice .np-qb-preview-thumb {
  grid-column: 1 / -1;
  grid-row: 1;
  width: 100%;
  height: 86px;
  object-fit: cover;
}

.np-qb-preview-choice.is-image_choice label > input {
  grid-column: 1;
  grid-row: 2;
}

.np-qb-preview-choice.is-image_choice label > span:not(.np-qb-preview-thumb) {
  grid-column: 2;
  grid-row: 2;
}

.np-qb-preview-slider input {
  flex: 1;
  padding: 0;
}

.np-qb-preview-thumb {
  width: 32px;
  height: 24px;
  display: block;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(0, 150, 154, 0.24), rgba(15, 29, 46, 0.10));
}

.np-qb-preview-static {
  color: var(--app-muted);
  font-size: 13px;
  font-weight: var(--app-label-weight);
  line-height: 1.5;
}

.np-qb-attached-media {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin: 4px 0 14px;
  padding: 10px;
  border: 1px solid rgba(0, 150, 154, 0.22);
  border-radius: var(--app-radius);
  background: rgba(240, 251, 251, 0.72);
}

.np-qb-attached-media-frame {
  position: relative;
  min-width: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #07131f;
}

.np-qb-attached-media-frame img,
.np-qb-attached-media-frame video,
.np-qb-attached-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.np-qb-attached-media-frame video {
  pointer-events: none;
}

.np-qb-attached-placeholder {
  background: linear-gradient(145deg, rgba(0, 150, 154, 0.24), rgba(15, 29, 46, 0.32));
}

.np-qb-attached-play {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: rgba(7, 19, 31, 0.82);
  color: #fff;
  font-size: 13px;
  transform: translate(-50%, -50%);
}

.np-qb-attached-media > div:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.np-qb-attached-media small,
.np-qb-attached-media span {
  color: var(--app-muted);
  font-size: 12px;
}

.np-qb-attached-media strong {
  overflow: hidden;
  color: var(--app-ink);
  font-size: 14px;
  font-weight: var(--app-label-weight);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.np-qb-preview-matrix {
  overflow-x: auto;
}

.np-qb-preview-matrix table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  table-layout: fixed;
  background: #ffffff;
}

.np-qb-preview-matrix th,
.np-qb-preview-matrix td {
  min-width: 42px;
  padding: 9px 7px;
  border-bottom: 1px solid rgba(118, 148, 162, 0.16);
  color: var(--app-muted);
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
  vertical-align: middle;
}

.np-qb-preview-matrix th:first-child {
  width: min(190px, 34%);
  color: var(--app-ink);
  text-align: left;
}

.np-qb-preview-matrix td span {
  width: 10px;
  height: 10px;
  display: inline-block;
  border: 1px solid rgba(118, 148, 162, 0.36);
  border-radius: 50%;
}

.np-qb-page-actions {
  margin-top: 14px;
}

.np-stimulus-note {
  margin: 10px 0 0;
}

.np-questionnaire-stage {
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 16% 0%, rgba(0, 166, 173, 0.10), transparent 30rem),
    linear-gradient(180deg, #f0fafb, #f8fcfd 44%, #ffffff);
}

.np-questionnaire-card {
  box-sizing: border-box;
  width: min(900px, calc(100vw - 40px));
  max-width: 100%;
  min-width: 0;
  text-align: left;
}

.np-questionnaire-card > h1,
.np-questionnaire-card > p,
.np-questionnaire-card > .np-actions {
  text-align: center;
}

.np-q-progress {
  display: grid;
  gap: 7px;
  margin-bottom: 20px;
  color: var(--app-muted);
  font-size: 12px;
  font-weight: var(--app-label-weight);
}

.np-q-progress div {
  height: 6px;
  border-radius: 999px;
  background: rgba(118, 148, 162, 0.16);
  overflow: hidden;
}

.np-q-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--app-teal), #29a86f);
}

.np-q-page-head {
  text-align: center;
  margin-bottom: 22px;
}

.np-q-page-head h1 {
  margin: 0 0 7px;
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: var(--app-box-title-weight);
  line-height: 1.12;
}

.np-q-page-head p {
  max-width: 680px;
  margin: 0 auto;
  color: var(--app-muted);
  font-size: 14px;
  line-height: 1.48;
}

.np-q-form {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.np-q-item {
  display: grid;
  gap: 11px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(118, 148, 162, 0.20);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(15, 29, 46, 0.035);
}

.np-q-item h2 {
  margin: 0;
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: 18px;
  font-weight: var(--app-box-title-weight);
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.np-q-description {
  margin: 0;
  color: var(--app-muted);
  font-size: 13px;
  font-weight: var(--app-label-weight);
  line-height: 1.45;
}

.np-q-required,
.np-q-error {
  color: #b42318;
}

.np-q-choice-grid {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.np-q-choice-grid.is-likert {
  grid-template-columns: repeat(var(--likert-count, 5), minmax(104px, 1fr));
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(118, 148, 162, 0.20);
  border-radius: 10px;
  background: #ffffff;
  scrollbar-width: thin;
}

.np-q-choice-grid.is-image-choice {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.np-q-choice {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(118, 148, 162, 0.20);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--app-ink);
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.np-q-choice:hover,
.np-q-choice:focus-within {
  border-color: rgba(0, 140, 146, 0.34);
  background: #f7fcfd;
  box-shadow: 0 0 0 3px rgba(0, 140, 146, 0.07);
}

.np-q-choice:has(input:checked) {
  border-color: rgba(0, 140, 146, 0.55);
  background: linear-gradient(180deg, rgba(232, 250, 250, 0.95), rgba(255, 255, 255, 0.98));
  box-shadow: inset 0 0 0 1px rgba(0, 140, 146, 0.10);
}

.np-q-choice input[type="radio"],
.np-q-choice input[type="checkbox"],
.np-q-matrix input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--app-teal);
}

.np-q-choice-grid.is-likert .np-q-choice {
  min-height: 76px;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 9px;
  border: 0;
  border-right: 1px solid rgba(118, 148, 162, 0.16);
  border-radius: 0;
  padding: 13px 9px;
  text-align: center;
}

.np-q-choice-grid.is-likert .np-q-choice:last-child {
  border-right: 0;
}

.np-q-choice-grid.is-likert .np-q-choice span {
  max-width: 100%;
  color: var(--app-ink);
  font-size: 13px;
  font-weight: var(--app-label-weight);
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.np-q-choice.has-media {
  grid-template-columns: auto minmax(90px, 160px) 1fr;
}

.np-q-choice-grid.is-image-choice .np-q-choice {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  min-height: 100%;
  padding: 10px;
}

.np-q-choice-grid.is-image-choice .np-q-choice.has-media {
  grid-template-columns: auto 1fr;
}

.np-q-choice-grid.is-image-choice .np-q-choice-media {
  grid-column: 1 / -1;
  grid-row: 1;
  width: 100%;
}

.np-q-choice-grid.is-image-choice .np-q-choice-media img,
.np-q-choice-grid.is-image-choice .np-q-choice-media video,
.np-q-choice-grid.is-image-choice .np-q-choice-media iframe {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #f8fcfd;
  border-radius: 8px;
}

.np-q-choice-grid.is-image-choice .np-q-choice.has-media input {
  grid-column: 1;
  grid-row: 2;
}

.np-q-choice-grid.is-image-choice .np-q-choice.has-media > span:last-child {
  grid-column: 2;
  grid-row: 2;
}

.np-q-choice-media {
  display: block;
  min-width: 0;
  overflow: hidden;
  border-radius: 9px;
}

.np-q-choice-media img,
.np-q-choice-media video,
.np-q-choice-media iframe,
.np-q-stimulus img,
.np-q-stimulus video,
.np-q-stimulus iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: 9px;
  border: 1px solid rgba(118, 148, 162, 0.20);
}

.np-q-choice-media video,
.np-q-choice-media iframe,
.np-q-stimulus video,
.np-q-stimulus iframe {
  aspect-ratio: 16 / 9;
  background: #050b12;
}

.np-q-youtube-gate {
  width: 100%;
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid rgba(118, 148, 162, 0.26);
  border-radius: 9px;
  background: #07131f;
  color: #ffffff;
  padding: 24px;
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.np-q-youtube-gate:hover,
.np-q-youtube-gate:focus-visible {
  border-color: rgba(59, 213, 211, 0.72);
  outline: 3px solid rgba(0, 166, 173, 0.18);
  outline-offset: 2px;
}

.np-q-youtube-play {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--app-teal);
  font-size: 15px;
}

.np-q-youtube-gate strong {
  font-size: 15px;
  font-weight: var(--app-label-weight);
}

.np-q-youtube-gate small {
  max-width: 340px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.4;
}

.np-q-choice-media iframe,
.np-q-stimulus iframe {
  border: 0;
}

.np-q-stimulus img {
  max-height: 64vh;
  object-fit: contain;
}

.np-q-stimulus video,
.np-q-stimulus iframe {
  max-height: min(64vh, 620px);
}

.np-q-stimulus {
  margin: 0 auto 2px;
  max-width: min(720px, 100%);
}

.np-q-slider {
  display: grid;
  gap: 12px;
  padding: 2px 0;
}

.np-q-slider > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--app-muted);
  font-size: 13px;
  font-weight: var(--app-label-weight);
}

.np-q-slider > div strong {
  min-width: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(0, 140, 146, 0.18);
  border-radius: 999px;
  background: rgba(232, 250, 250, 0.9);
  color: var(--app-teal);
  padding: 2px 8px;
  font-size: 12px;
}

.np-q-slider input {
  width: 100%;
  accent-color: var(--app-teal);
}

.np-q-matrix {
  overflow-x: auto;
  border: 1px solid rgba(118, 148, 162, 0.20);
  border-radius: 10px;
  background: #ffffff;
}

.np-q-matrix table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  table-layout: fixed;
}

.np-q-matrix th,
.np-q-matrix td {
  min-width: 68px;
  padding: 11px 9px;
  border-bottom: 1px solid rgba(118, 148, 162, 0.18);
  color: var(--app-ink);
  font-size: 13px;
  font-weight: var(--app-label-weight);
  line-height: 1.25;
  text-align: center;
  vertical-align: middle;
}

.np-q-matrix th:first-child {
  width: min(240px, 34%);
  color: var(--app-muted);
  font-weight: var(--app-label-weight);
  text-align: left;
}

.np-q-matrix thead th {
  background: rgba(248, 253, 254, 0.98);
  color: var(--app-muted);
  font-size: 12px;
}

.np-q-matrix tbody tr:nth-child(even) {
  background: rgba(248, 253, 254, 0.52);
}

.np-q-matrix td:has(input:checked) {
  background: rgba(232, 250, 250, 0.92);
}

.np-q-matrix tbody tr:last-child th,
.np-q-matrix tbody tr:last-child td {
  border-bottom: 0;
}

.np-q-ranking {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: ranking;
}

.np-q-ranking li {
  counter-increment: ranking;
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid rgba(118, 148, 162, 0.20);
  border-radius: 9px;
  background: #fff;
  color: var(--app-ink);
  font-weight: var(--app-label-weight);
}

.np-q-ranking li::before {
  content: counter(ranking);
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(0, 150, 154, 0.10);
  color: var(--app-teal-dark);
  font-family: var(--app-display);
  font-size: 13px;
  font-weight: var(--app-label-weight);
}

.np-q-rank-handle {
  width: 18px;
  height: 18px;
  display: inline-block;
  border-radius: 5px;
  background:
    radial-gradient(circle, currentColor 1.5px, transparent 2px) 0 0 / 6px 6px;
  color: rgba(109, 130, 145, 0.75);
  cursor: grab;
}

.np-q-ranking-ghost {
  opacity: 0.55;
}

.np-q-actions {
  justify-content: space-between;
  margin-top: 10px;
}

.np-q-complete {
  text-align: center;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.np-q-complete::before,
.np-completion-card::after {
  content: "";
  width: 46px;
  height: 46px;
  display: block;
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(0, 166, 173, 0.14), rgba(42, 166, 106, 0.13)),
    #f4fbfb;
  box-shadow: inset 0 0 0 1px rgba(0, 140, 146, 0.14);
}

.np-q-complete h1 {
  margin: 0;
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: var(--app-box-title-weight);
  line-height: 1.12;
}

.np-q-complete p {
  max-width: 560px;
  margin: 0;
  color: var(--app-muted);
  font-size: 15px;
  line-height: 1.5;
}

.np-completion-card {
  display: grid;
  justify-items: center;
}

.np-completion-card::after {
  grid-row: 1;
  margin-bottom: 2px;
}

.np-completion-card h1 {
  grid-row: 2;
}

.np-error-card::before,
.np-q-error-complete::before {
  background:
    linear-gradient(135deg, rgba(233, 102, 76, 0.14), rgba(245, 165, 36, 0.12)),
    #fff7f4;
  box-shadow: inset 0 0 0 1px rgba(233, 102, 76, 0.18);
}

.np-preload-card .np-muted {
  display: inline-flex;
  justify-content: center;
  width: fit-content;
  margin-inline: auto;
  border: 1px solid rgba(0, 140, 146, 0.14);
  border-radius: 999px;
  background: rgba(232, 250, 250, 0.72);
  color: var(--app-teal);
  padding: 5px 10px;
  font-size: 12px;
}

.np-questionnaire-card.is-loading {
  pointer-events: none;
}

.np-questionnaire-card.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.56);
  backdrop-filter: blur(2px);
}

@media (max-width: 820px) {
  .np-protocol-type-grid,
  .np-qb-question-grid {
    grid-template-columns: 1fr;
  }

  .np-qb-toolbar,
  .np-qb-page > header,
  .np-qb-question > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .np-qb-preview-choice.is-likert,
  .np-q-choice-grid.is-likert {
    grid-template-columns: 1fr;
  }

  .np-qb-preview-choice.is-likert label,
  .np-q-choice-grid.is-likert .np-q-choice {
    min-height: 0;
    grid-template-columns: auto 1fr;
    flex-direction: row;
    justify-items: start;
    justify-content: flex-start;
    border-right: 0;
    border-bottom: 1px solid rgba(118, 148, 162, 0.16);
    text-align: left;
  }

  .np-qb-preview-choice.is-likert label:last-child,
  .np-q-choice-grid.is-likert .np-q-choice:last-child {
    border-bottom: 0;
  }

  .np-qb-preview-choice.is-image_choice,
  .np-q-choice-grid.is-image-choice {
    grid-template-columns: 1fr;
  }

  .np-qb-preview-choice.is-image_choice label {
    min-height: 0;
  }

  .np-qb-attached-media {
    grid-template-columns: 1fr;
  }

  .np-qb-attached-media-frame {
    width: 100%;
    max-width: 420px;
  }
}

/* Questionnaire logic, preview and accessible respondent controls */
.np-qb-page-configuration {
  display: grid;
  gap: 14px;
  margin: 14px 0;
}

.np-qb-page-options,
.np-qb-logic > header,
.np-qb-branches > header,
.np-qb-branch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.np-qb-page-options > label:not(.np-check),
.np-qb-logic > header > label:not(.np-check),
.np-qb-branch-head > label {
  min-width: min(260px, 100%);
}

.np-qb-logic,
.np-qb-branches,
.np-qb-branch {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(118, 148, 162, 0.20);
  border-radius: 9px;
  background: rgba(248, 253, 254, 0.72);
}

.np-qb-logic > header > div,
.np-qb-branches > header > div {
  display: grid;
  gap: 2px;
}

.np-qb-logic strong,
.np-qb-branches strong,
.np-qb-branch strong {
  font-weight: var(--app-label-weight);
}

.np-qb-logic small,
.np-qb-branches small {
  color: var(--app-muted);
  font-size: 12px;
}

.np-qb-rule-list {
  display: grid;
  gap: 8px;
}

.np-qb-rule {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(160px, .8fr) minmax(180px, 1fr) 36px;
  align-items: end;
  gap: 8px;
}

.np-qb-branches {
  background: #fff;
}

.np-qb-branch {
  border-left: 3px solid rgba(0, 150, 154, 0.45);
  background: rgba(255, 255, 255, 0.96);
}

.np-qb-lint {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid rgba(245, 165, 36, 0.32);
  border-radius: 8px;
  background: #fffaf0;
  color: var(--app-ink);
}

.np-qb-lint.has-errors {
  border-color: rgba(180, 35, 24, 0.28);
  background: #fff7f5;
}

.np-qb-lint strong {
  font-weight: var(--app-label-weight);
}

.np-qb-lint ul {
  margin: 7px 0 0;
  padding-left: 20px;
}

.np-qb-lint li {
  margin: 3px 0;
  color: var(--app-muted);
}

.np-qb-lint li.is-error {
  color: #9f261c;
}

.np-qb-respondent-preview {
  width: min(820px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(15, 29, 46, 0.22);
}

.np-qb-respondent-preview::backdrop {
  background: rgba(7, 19, 31, 0.68);
}

.np-qb-preview-shell {
  min-width: 0;
  background: #fff;
}

.np-qb-preview-shell > header,
.np-qb-preview-form > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(118, 148, 162, 0.18);
}

.np-qb-preview-shell > header > div {
  display: grid;
  gap: 2px;
}

.np-qb-preview-shell > header strong,
.np-qb-preview-page h2,
.np-qb-preview-page legend {
  font-weight: var(--app-box-title-weight);
}

.np-qb-preview-shell > header small,
.np-qb-preview-page > small,
.np-qb-preview-page > p {
  color: var(--app-muted);
}

.np-qb-preview-page {
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 190px);
  overflow: auto;
  padding: 22px;
}

.np-qb-preview-page h2,
.np-qb-preview-page p {
  margin: 0;
}

.np-qb-preview-page fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(118, 148, 162, 0.20);
  border-radius: 8px;
}

.np-qb-preview-answer {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid rgba(118, 148, 162, 0.18);
  border-radius: 7px;
}

.np-qb-preview-ranking {
  display: grid;
  gap: 8px;
}

.np-qb-preview-ranking label {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  gap: 10px;
}

.np-qb-preview-form > footer {
  border-top: 1px solid rgba(118, 148, 162, 0.18);
  border-bottom: 0;
}

.np-qb-preview-finished {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 46px 24px;
  text-align: center;
}

.np-q-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.np-q-matrix-option {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 7px;
  cursor: pointer;
}

.np-q-matrix-option:focus-within {
  outline: 3px solid rgba(0, 140, 146, 0.14);
}

.np-q-rank-controls {
  display: inline-flex;
  justify-self: end;
  gap: 4px;
}

.np-q-rank-controls button {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(118, 148, 162, 0.22);
  border-radius: 7px;
  background: #fff;
  color: var(--app-muted);
  cursor: pointer;
}

.np-q-rank-controls button:hover,
.np-q-rank-controls button:focus-visible {
  border-color: rgba(0, 140, 146, 0.40);
  color: var(--app-teal-dark);
  outline: 2px solid rgba(0, 140, 146, 0.12);
}

.np-q-save-status {
  margin: 0;
  color: var(--app-muted);
  font-size: 12px;
}

.np-q-error-summary {
  padding: 12px 14px;
  border: 1px solid rgba(180, 35, 24, 0.26);
  border-radius: 8px;
  background: #fff7f5;
  color: #8f2018;
}

.np-q-error-summary strong {
  font-weight: var(--app-label-weight);
}

.np-q-error-summary ul {
  margin: 6px 0 0;
  padding-left: 20px;
}

.np-q-error-summary a {
  color: inherit;
}

.np-q-item.has-error {
  border-color: rgba(180, 35, 24, 0.34);
}

@media (max-width: 820px) {
  .np-qb-rule {
    grid-template-columns: 1fr;
  }

  .np-qb-rule .np-icon-button {
    justify-self: end;
  }

  .np-qb-page-options,
  .np-qb-logic > header,
  .np-qb-branches > header,
  .np-qb-branch-head {
    align-items: stretch;
    flex-direction: column;
  }

  .np-qb-page-options > label:not(.np-check),
  .np-qb-logic > header > label:not(.np-check),
  .np-qb-branch-head > label {
    min-width: 0;
  }
}

.np-roi-box {
  position: absolute;
  display: block;
  border: 2px solid var(--roi-color, var(--app-teal));
  background: rgba(0, 166, 173, 0.11);
  background: color-mix(in srgb, var(--roi-color, var(--app-teal)) 13%, transparent);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.92), 0 10px 22px rgba(15, 29, 46, 0.18);
}

.np-roi-box.is-ellipse {
  border-radius: 999px;
}

.np-roi-box.is-inactive {
  opacity: 0.46;
}

.np-roi-overlay-svg.is-inactive {
  opacity: 0.46;
}

.np-roi-box span {
  position: absolute;
  left: 6px;
  top: 6px;
  max-width: calc(100% - 12px);
  overflow: hidden;
  border-radius: 5px;
  background: rgba(6, 17, 31, 0.86);
  color: #ffffff;
  padding: 3px 6px;
  font-size: 11px;
  font-weight: var(--app-label-weight);
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.np-roi-polygon-label {
  position: absolute;
  max-width: 180px;
  overflow: hidden;
  border-radius: 5px;
  background: rgba(6, 17, 31, 0.86);
  color: #ffffff;
  padding: 3px 6px;
  font-size: 11px;
  font-weight: var(--app-label-weight);
  line-height: 1.1;
  text-overflow: ellipsis;
  transform: translate(6px, 6px);
  white-space: nowrap;
  pointer-events: none;
}

.np-roi-manager-table {
  min-width: 1120px;
  font-size: 13px;
}

.np-patient-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.np-patient-admin-grid.is-experiment-scope {
  grid-template-columns: minmax(0, 1fr);
}

.np-patient-record,
.np-intake-manager,
.np-intake-panel {
  padding: 16px;
  border: 1px solid rgba(109, 130, 145, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(248, 253, 254, 0.96), rgba(255, 255, 255, 0.94));
}

.np-intake-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(0, 150, 154, 0.22);
  border-radius: 8px;
  background: rgba(235, 250, 250, 0.62);
}

.np-intake-grid-head,
.np-intake-manager-head {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.np-intake-grid-head strong,
.np-intake-manager-head strong {
  display: block;
  color: var(--app-ink);
  font-family: var(--app-display);
  font-size: 16px;
}

.np-intake-grid-head span,
.np-intake-manager-head span {
  display: block;
  margin-top: 2px;
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.np-intake-manager {
  display: grid;
  gap: 14px;
}

.np-intake-field-form {
  grid-template-columns: 1fr;
  gap: 10px;
}

.np-patient-admin-grid.is-experiment-scope .np-intake-field-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.np-intake-field-list {
  display: grid;
  gap: 8px;
}

.np-intake-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(109, 130, 145, 0.2);
  border-left: 4px solid rgba(0, 150, 154, 0.72);
  border-radius: 8px;
  background: #ffffff;
}

.np-intake-field-row.is-inactive {
  opacity: 0.58;
}

.np-intake-field-row strong {
  display: block;
  color: var(--app-ink);
  font-size: 13px;
}

.np-intake-field-row span {
  display: block;
  margin-top: 2px;
  color: var(--app-muted);
  font-size: 11px;
  font-weight: var(--app-label-weight);
}

/* Inline emphasis stays lighter than panel/card titles. */
.np-app-shell :is(strong, b),
.np-login-page :is(strong, b),
.np-runtime :is(strong, b),
.np-task-card :is(strong, b),
.np-eye-card :is(strong, b),
.np-modal-card :is(strong, b) {
  font-weight: var(--app-strong-weight);
}

/* Keep panel/card titles visually consistent and lighter across admin and patient areas. */
.np-panel-head h1,
.np-panel-head h2,
.np-panel-head h3,
.np-card h2,
.np-card h3,
.np-login-brand h1,
.np-brand-footer-copy strong,
.np-et-settings-head strong,
.np-et-subgroup-head strong,
.np-upload-dropcopy strong,
.np-stimuli-import > summary,
.np-stimuli-import-source header strong,
.np-builder-toolbar strong,
.np-builder-toolhead strong,
.np-builder-tool strong,
.np-builder-routine > header strong,
.np-builder-routine-head strong,
.np-builder-node b,
.np-builder-node strong,
.np-builder-empty strong,
.np-builder-inspector summary,
.np-builder-advanced summary,
.np-builder-mini-advanced > summary,
.np-flow-topline strong,
.np-empty-flow strong,
.np-service-card h3,
.np-task-card h1,
.np-task-card h2,
.np-text-trial h2,
.np-eye-card h2,
.np-face-guard-card h2,
.np-modal-head h2,
.np-heatmap-head h3,
.np-roi-draw-copy h3,
.np-qb-toolbar strong,
.np-qb-empty-page strong,
.np-qb-question-title strong,
.np-intake-grid-head strong,
.np-intake-manager-head strong {
  font-weight: var(--app-box-title-weight);
}

.np-intake-alert {
  border-color: rgba(245, 165, 36, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.98), rgba(255, 255, 255, 0.96));
}

.np-intake-form {
  max-width: 920px;
}

@media (max-width: 1060px) {
  .np-grid,
  .np-patient-hero,
  .np-result-layout,
  .np-heatmap-layout {
    grid-template-columns: 1fr;
  }

  .np-builder-workspace {
    grid-template-columns: 1fr;
  }

  .np-builder-sidepanels {
    position: static;
  }

  .np-grid-3,
  .np-kpi-grid,
  .np-result-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .np-quality-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .np-app-shell {
    display: block;
  }

  .np-rail {
    position: sticky;
    top: 8px;
    z-index: 50;
    width: calc(100% - 24px);
    height: 62px;
    flex-direction: row;
    justify-content: flex-start;
    margin: 12px auto 0;
    padding: 8px;
    border: 1px solid var(--app-line);
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  .np-rail::-webkit-scrollbar {
    display: none;
  }

  .np-rail-logo,
  .np-rail-bottom,
  .np-rail-logout {
    display: none;
  }

  .np-rail-item {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
  }

  .np-rail-item::before,
  .np-rail-item::after {
    display: none;
  }

  .np-app-main {
    padding: 22px 16px 40px;
  }

  .np-app-topbar {
    display: grid;
  }

  .np-brand-footer {
    grid-template-columns: 1fr;
    gap: 14px;
    text-align: left;
  }

  .np-brand-footer-meta {
    justify-items: start;
    text-align: left;
  }

  .np-context-switcher {
    width: 100%;
  }

  .np-top-logo {
    justify-self: start;
  }

  .np-form-grid,
  .np-grid-3,
  .np-kpi-grid,
  .np-result-summary,
  .np-result-summary-compact {
    grid-template-columns: 1fr;
  }

  .np-quality-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .np-quality-grade {
    align-self: flex-start;
  }

  .np-quality-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .np-quality-metrics > div,
  .np-quality-metrics > div:nth-child(3n),
  .np-quality-metrics > div:nth-last-child(-n + 3) {
    border-right: 1px solid var(--app-line);
    border-bottom: 1px solid var(--app-line);
  }

  .np-quality-metrics > div:nth-child(2n) {
    border-right: 0;
  }

  .np-quality-metrics > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .np-quality-flags ul {
    grid-template-columns: 1fr;
  }

  .np-field.full {
    grid-column: auto;
  }

  .np-patient-overview {
    align-items: stretch;
    flex-direction: column;
  }

  .np-patient-overview .np-button-ghost {
    width: 100%;
  }

  .np-service-card {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .np-service-action {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .np-service-action .np-button,
  .np-service-action .np-button-ghost {
    width: 100%;
  }

  .np-patient-admin-grid {
    grid-template-columns: 1fr;
  }

  .np-patient-admin-grid.is-experiment-scope .np-intake-field-form {
    grid-template-columns: 1fr;
  }

  .np-intake-grid {
    grid-template-columns: 1fr;
  }

  .np-intake-field-row {
    grid-template-columns: 1fr;
  }

  .np-heatmap-head {
    grid-template-columns: 1fr;
  }

  .np-video-heatmap-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .np-result-meta,
  .np-table-actions {
    align-items: stretch;
  }

  .np-table-actions .np-button-ghost,
  .np-table-actions .np-button {
    width: 100%;
  }

  .np-table {
    display: block;
    overflow-x: auto;
  }

  .np-builder-toolbar {
    display: grid;
    align-items: start;
  }

  .np-builder-generate {
    justify-content: flex-start;
  }

  .np-builder-generate .np-button {
    width: 100%;
  }

  .np-builder-toolbelt {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .np-builder-toolset {
    justify-content: center;
  }

  .np-builder-routine-head {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .np-builder-routine-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-left: 44px;
  }

  .np-builder-toolbar-actions {
    justify-content: flex-start;
  }

  .np-builder-loop-strip .np-button-ghost {
    width: 100%;
    margin-left: 0;
  }

  .np-builder-lane {
    margin-right: -4px;
    padding-bottom: 12px;
  }

  .np-builder-node {
    flex-basis: min(168px, 78vw);
  }

  .np-builder-node.is-stimulus-set {
    flex-basis: min(242px, 86vw);
  }
}
