/* The full example uses a native modal for keyboard focus and Escape. */
.marketing-page.mk-example-open {
  overflow: hidden;
}

.mk-example-dialog {
  --demo-brand: #285264;
  --demo-surface: #eef4f6;
  width: min(680px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--mk-line);
  border-radius: 18px;
  color: var(--mk-ink);
  background: var(--mk-paper);
  box-shadow: 0 24px 80px rgba(20, 48, 77, 0.22);
  overflow: hidden;
}

.mk-example-dialog[open] {
  display: flex;
  flex-direction: column;
}

.mk-example-dialog::backdrop {
  background: rgba(12, 31, 47, 0.55);
}

.mk-example-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 20px 28px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--mk-line);
  background: #f6f9fa;
}

.mk-example-header h2 {
  font-size: 1.08rem;
  line-height: 1.4;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  text-wrap: initial;
}

.mk-example-header p {
  font-size: 0.75rem;
  margin: 0;
  color: var(--mk-muted);
}

.mk-example-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 1px solid var(--mk-line);
  border-radius: 50%;
  background: var(--mk-paper);
  color: var(--mk-ink);
  cursor: pointer;
}

.mk-example-close:hover {
  background: var(--mk-mist);
  border-color: var(--mk-teal);
}

.mk-example-close svg {
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.mk-example-body {
  min-height: 0;
  padding: 28px 36px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.mk-example-dialog .mk-demo-brand {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--demo-brand);
  font-weight: 750;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.mk-example-domain {
  margin-left: auto;
  color: var(--mk-muted);
  font-size: 0.66rem;
  font-weight: 450;
  overflow-wrap: anywhere;
}

.mk-example-intro {
  color: var(--mk-muted);
  font-size: 0.88rem;
  margin: 0 0 28px;
}

.mk-example-question {
  min-width: 0;
  padding: 0;
  border: 0;
  margin: 0 0 28px;
}

.mk-example-question legend, .mk-example-label {
  display: block;
  float: none;
  width: 100%;
  font-size: 0.94rem;
  font-weight: 650;
  line-height: 1.6;
  margin-bottom: 12px;
}

.mk-example-number {
  color: var(--demo-brand);
  font-variant-numeric: tabular-nums;
  margin-right: 8px;
}

.mk-example-required, .mk-example-optional {
  color: var(--mk-muted);
  font-weight: 450;
  font-size: 0.7rem;
  white-space: nowrap;
  margin-left: 5px;
}

.mk-example-dialog .mk-demo-choices {
  display: grid;
  gap: 8px;
}

.mk-example-dialog .mk-demo-choices label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border: 1px solid #d4dfe4;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--mk-ink);
  background: var(--mk-paper);
  font-size: 0.85rem;
}

.mk-example-dialog .mk-demo-choices label:hover,
.mk-example-dialog .mk-demo-choices label:has(input:checked) {
  border-color: var(--demo-brand);
  background: var(--demo-surface);
}

.mk-example-dialog .mk-demo-choices label span:last-child {
  margin-left: auto;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--demo-brand);
}

.mk-example-dialog .mk-demo-choices input {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--demo-brand);
}

.mk-example-dialog .mk-demo-error {
  font-size: 0.78rem;
  color: #8e2630;
  margin: 8px 0;
}

.mk-example-dialog .mk-demo-error:empty {
  margin: 0;
}

.mk-example-question textarea {
  display: block;
  width: 100%;
  min-height: 92px;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid #b9cbd3;
  border-radius: 8px;
  background: var(--mk-paper);
  color: var(--mk-ink);
  font: inherit;
  font-size: 0.85rem;
  line-height: 1.6;
}

.mk-example-question textarea::placeholder {
  color: #586d7f;
  opacity: 1;
}

.mk-example-inline-choices {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mk-example-dialog .mk-example-inline-choices label span:last-child {
  margin-left: 0;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

.mk-example-submit {
  display: flex;
  align-items: center;
  gap: 20px;
}

.mk-example-dialog .mk-demo-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  margin-top: 0;
  padding: 12px 20px;
  background: var(--demo-brand);
  border: 1px solid var(--demo-brand);
  color: var(--mk-paper);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  flex-shrink: 0;
  text-decoration: none;
}

.mk-example-dialog .mk-demo-next:hover {
  filter: brightness(0.87);
}

.mk-example-submit p, .mk-example-note {
  font-size: 0.73rem;
  color: var(--mk-muted);
  margin: 0;
}

.mk-example-note {
  border-top: 1px solid var(--mk-line);
  margin-top: 28px;
  padding-top: 18px;
}

.mk-example-dialog .mk-demo-thanks {
  padding-block: 20px;
}

.mk-example-dialog .mk-demo-thanks h2 {
  font-size: clamp(1.6rem, 4vw, 2rem);
  max-width: 22ch;
  margin-bottom: 12px;
}

.mk-example-dialog .mk-demo-thanks p {
  font-size: 0.92rem;
  color: var(--mk-muted);
}

.mk-example-dialog .mk-demo-thanks .mk-fine-print {
  font-size: 0.8rem;
}

.mk-example-dialog .mk-demo-thanks-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--demo-surface);
  color: var(--demo-brand);
  font-size: 1.3rem;
  margin-bottom: 18px;
}

.mk-example-dialog .mk-actions {
  align-items: stretch;
  margin-bottom: 0;
}

@media (max-width: 540px) {
  .mk-example-dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 14px;
  }

  .mk-example-header {
    padding: 16px;
    gap: 12px;
  }

  .mk-example-header h2 {
    font-size: 0.94rem;
  }

  .mk-example-header p {
    font-size: 0.7rem;
  }

  .mk-example-body {
    padding: 24px 20px;
  }

  .mk-example-domain {
    width: 100%;
    margin-left: 40px;
    margin-top: -5px;
  }

  .mk-example-submit {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .mk-example-dialog .mk-example-inline-choices {
    gap: 6px;
  }

  .mk-example-dialog .mk-example-inline-choices label {
    gap: 6px;
    padding-inline: 8px;
  }

  .mk-example-question textarea {
    font-size: 1rem;
  }
}
