.nq-demo-launch {
  background: linear-gradient(135deg, #7df0d5, #5da8ff) !important;
  color: #062232 !important;
  border-color: rgba(255, 255, 255, .22) !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .22);
}

.nq-demo-launch:hover {
  background: linear-gradient(135deg, #a0f6e4, #82bdff) !important;
}

.landing-final:has([data-nq-public-demo-secondary]) {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.nq-demo-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(1, 12, 18, .74);
  backdrop-filter: blur(14px);
}

.nq-demo-card {
  width: min(760px, 100%);
  max-height: min(92vh, 900px);
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 28px;
  background: #f8fbfd;
  color: #17202a;
  box-shadow: 0 32px 100px rgba(0, 0, 0, .42);
}

.nq-demo-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(15, 23, 42, .10);
  background: rgba(248, 251, 253, .94);
  backdrop-filter: blur(16px);
}

.nq-demo-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nq-demo-brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.nq-demo-brand strong,
.nq-demo-brand span {
  display: block;
}

.nq-demo-brand span {
  margin-top: 2px;
  color: #64748b;
  font-size: .78rem;
}

.nq-demo-close {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, .08);
  color: #17202a;
  font-size: 1.35rem;
}

.nq-demo-close:hover {
  background: rgba(15, 23, 42, .14);
  color: #17202a;
  transform: none;
}

.nq-demo-body {
  padding: 22px;
}

.nq-demo-loading,
.nq-demo-error,
.nq-demo-result {
  min-height: 390px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  text-align: center;
}

.nq-demo-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(0, 122, 255, .16);
  border-top-color: #007aff;
  border-radius: 50%;
  animation: nqDemoSpin .8s linear infinite;
}

@keyframes nqDemoSpin {
  to { transform: rotate(360deg); }
}

.nq-demo-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.nq-demo-progress {
  height: 8px;
  flex: 1;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, .09);
}

.nq-demo-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #007aff, #30d158);
  transition: width .22s ease;
}

.nq-demo-counter {
  color: #475569;
  font-size: .82rem;
  font-weight: 850;
  white-space: nowrap;
}

.nq-demo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.nq-demo-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0, 122, 255, .10);
  color: #005fcc;
  font-size: .76rem;
  font-weight: 850;
}

.nq-demo-question {
  margin: 0 0 18px;
  color: #111827;
  font-size: clamp(1.12rem, 2.3vw, 1.45rem);
  line-height: 1.48;
  letter-spacing: -.015em;
  white-space: pre-wrap;
}

.nq-demo-image-wrap {
  margin: 0 0 18px;
}

.nq-demo-image-wrap img {
  width: 100%;
  max-height: 48vh;
  object-fit: contain;
  display: block;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, .10);
}

.nq-demo-image-wrap figcaption {
  margin-top: 7px;
  color: #64748b;
  font-size: .78rem;
  text-align: center;
}

.nq-demo-options {
  display: grid;
  gap: 10px;
}

.nq-demo-option {
  width: 100%;
  min-height: 54px;
  margin: 0;
  padding: 13px 15px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 16px;
  background: #ffffff;
  color: #17202a;
  text-align: left;
  font-weight: 700;
  line-height: 1.45;
}

.nq-demo-option:hover:not(:disabled) {
  border-color: rgba(0, 122, 255, .50);
  background: rgba(0, 122, 255, .05);
  color: #17202a;
  transform: translateY(-1px);
}

.nq-demo-option:disabled {
  opacity: 1;
  cursor: default;
}

.nq-demo-letter {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(15, 23, 42, .08);
  font-size: .8rem;
  font-weight: 900;
}

.nq-demo-option.is-correct {
  border-color: rgba(22, 163, 74, .55);
  background: rgba(34, 197, 94, .10);
}

.nq-demo-option.is-correct .nq-demo-letter {
  background: #16a34a;
  color: #ffffff;
}

.nq-demo-option.is-wrong {
  border-color: rgba(220, 38, 38, .50);
  background: rgba(239, 68, 68, .09);
}

.nq-demo-option.is-wrong .nq-demo-letter {
  background: #dc2626;
  color: #ffffff;
}

.nq-demo-feedback {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 18px;
  background: rgba(15, 23, 42, .035);
}

.nq-demo-feedback strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1rem;
}

.nq-demo-feedback p {
  margin: 0;
  color: #334155;
  line-height: 1.58;
  white-space: pre-wrap;
}

.nq-demo-feedback.correct strong { color: #15803d; }
.nq-demo-feedback.wrong strong { color: #b91c1c; }

.nq-demo-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.nq-demo-actions button {
  width: auto;
  min-width: 150px;
  margin: 0;
}

.nq-demo-score {
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(0, 122, 255, .16), rgba(48, 209, 88, .18));
  color: #005fcc;
  font-size: 2rem;
  font-weight: 950;
}

.nq-demo-result h2,
.nq-demo-error h2 {
  margin: 0;
  color: #111827;
}

.nq-demo-result p,
.nq-demo-error p,
.nq-demo-loading p {
  max-width: 520px;
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}

.nq-demo-result-actions {
  width: min(440px, 100%);
  display: grid;
  gap: 10px;
}

.nq-demo-result-actions button {
  margin: 0;
}

body.nq-demo-open {
  overflow: hidden;
}

:root[data-theme="dark"] .nq-demo-card {
  background: #15171b;
  color: #f5f5f7;
}

:root[data-theme="dark"] .nq-demo-head {
  background: rgba(21, 23, 27, .94);
  border-bottom-color: rgba(255, 255, 255, .10);
}

:root[data-theme="dark"] .nq-demo-close,
:root[data-theme="dark"] .nq-demo-option {
  background: #23262d;
  color: #f5f5f7;
}

:root[data-theme="dark"] .nq-demo-question,
:root[data-theme="dark"] .nq-demo-result h2,
:root[data-theme="dark"] .nq-demo-error h2 {
  color: #f5f5f7;
}

:root[data-theme="dark"] .nq-demo-feedback {
  background: rgba(255, 255, 255, .05);
  border-color: rgba(255, 255, 255, .11);
}

:root[data-theme="dark"] .nq-demo-feedback p {
  color: #cbd5e1;
}

@media (max-width: 900px) {
  .landing-final:has([data-nq-public-demo-secondary]) {
    grid-template-columns: 1fr;
  }

  .landing-final [data-nq-public-demo-secondary],
  .landing-final > .landing-button {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .nq-demo-backdrop {
    padding: 0;
    align-items: stretch;
  }

  .nq-demo-card {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
    border: 0;
  }

  .nq-demo-head {
    padding: 13px 14px;
  }

  .nq-demo-body {
    padding: 16px 14px calc(24px + env(safe-area-inset-bottom));
  }

  .nq-demo-actions {
    display: grid;
  }

  .nq-demo-actions button {
    width: 100%;
  }
}
