.dp-page {
  --dp-primary: #2f6bff;
  --dp-secondary: #22b573;
  --dp-bg: #f4f7fb;
  --dp-card: #ffffff;
  --dp-text: #152321;
  --dp-muted: #64748b;
  --dp-border: #e2e8f0;
  --dp-danger: #dc2626;
  --dp-focus: rgba(47, 107, 255, 0.22);
  --dp-shadow: 0 22px 70px rgba(15, 23, 42, 0.12);
  margin: 0;
  color: var(--dp-text);
  background: var(--dp-bg);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

.dp-page,
.dp-page * {
  box-sizing: border-box;
}

.dp-page button,
.dp-page input {
  font: inherit;
}

.dp-page {
  min-height: 100vh;
  padding: 16px;
  display: grid;
  place-items: center;
}

.dp-widget {
  width: min(100%, 760px);
  background: var(--dp-card);
  border: 1px solid var(--dp-border);
  border-radius: 8px;
  box-shadow: var(--dp-shadow);
  padding: 20px;
}

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

.dp-header h1,
.dp-step-title {
  margin: 0;
  letter-spacing: 0;
}

.dp-header h1 {
  font-size: clamp(1.35rem, 4vw, 2rem);
  line-height: 1.12;
}

.dp-step-count {
  flex: 0 0 auto;
  margin: 3px 0 0;
  color: var(--dp-muted);
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.dp-progress {
  height: 8px;
  overflow: hidden;
  background: #dbeafe;
  border-radius: 999px;
}

.dp-progress span {
  display: block;
  width: 10%;
  height: 100%;
  background: linear-gradient(90deg, var(--dp-primary), var(--dp-secondary));
  border-radius: inherit;
  transition: width 280ms ease;
}

.dp-form {
  margin-top: 22px;
}

.dp-step-root {
  min-height: 390px;
}

.dp-step {
  animation: dp-slide 220ms ease both;
}

@keyframes dp-slide {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dp-step-title {
  font-size: clamp(1.28rem, 4vw, 1.75rem);
  line-height: 1.18;
}

.dp-step-intro {
  margin: 8px 0 0;
  color: var(--dp-muted);
}

.dp-fields {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.dp-field {
  display: grid;
  gap: 8px;
}

.dp-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.dp-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.dp-field-reveal {
  animation: dp-question-reveal 220ms ease both;
}

@keyframes dp-question-reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dp-label {
  font-weight: 800;
}

.dp-required {
  color: var(--dp-danger);
}

.dp-help {
  margin: 0;
  color: var(--dp-muted);
  font-size: 0.92rem;
}

.dp-input,
.dp-number,
.dp-date {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  color: var(--dp-text);
  background: #ffffff;
  border: 1px solid var(--dp-border);
  border-radius: 12px;
  outline: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.dp-input:focus,
.dp-number:focus,
.dp-date:focus,
.dp-choice input:focus + span,
.dp-checkbox input:focus + span {
  border-color: var(--dp-primary);
  box-shadow: 0 0 0 4px var(--dp-focus);
}

.dp-input:disabled,
.dp-number:disabled,
.dp-date:disabled {
  color: #94a3b8;
  background: #f8fafc;
}

.dp-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dp-chip {
  min-height: 36px;
  padding: 7px 12px;
  color: var(--dp-primary);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  cursor: pointer;
}

.dp-chip:hover,
.dp-chip:focus {
  background: #dbeafe;
}

.dp-choice-group {
  display: grid;
  gap: 10px;
}

.dp-choice,
.dp-checkbox {
  position: relative;
  cursor: pointer;
}

.dp-choice input,
.dp-checkbox input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.dp-choice > span,
.dp-checkbox > span {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 13px 14px;
  background: #ffffff;
  border: 1px solid var(--dp-border);
  border-radius: 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.dp-choice:hover > span,
.dp-checkbox:hover > span {
  border-color: rgba(47, 107, 255, 0.44);
  background: #f8fbff;
}

.dp-choice input:checked + span,
.dp-checkbox input:checked + span {
  background: #eef4ff;
  border-color: var(--dp-primary);
  box-shadow: inset 4px 0 0 var(--dp-primary);
}

.dp-consent > span {
  display: block;
  min-height: 0;
  padding: 15px 16px 15px 20px;
  color: var(--dp-text);
  font-size: 0.94rem;
  line-height: 1.55;
}

.dp-consent a {
  color: var(--dp-primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dp-submission-notice {
  margin-top: 20px;
  padding: 16px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid var(--dp-border);
  border-left: 4px solid var(--dp-primary);
  border-radius: 8px;
  font-size: 0.9rem;
}

.dp-submission-notice p {
  margin: 0;
}

.dp-submission-notice p + p {
  margin-top: 8px;
  font-weight: 700;
}

.dp-field-invalid .dp-input,
.dp-field-invalid .dp-number,
.dp-field-invalid .dp-date,
.dp-field-invalid .dp-choice > span,
.dp-field-invalid .dp-checkbox > span {
  border-color: var(--dp-danger);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.dp-conditional {
  display: grid;
  gap: 18px;
  margin-top: 8px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid var(--dp-border);
  border-radius: 8px;
  animation: dp-slide 180ms ease both;
}

.dp-error {
  margin: 16px 0 0;
  color: var(--dp-danger);
  font-weight: 700;
}

.dp-field-error {
  margin: 2px 0 0;
  color: var(--dp-danger);
  font-size: 0.9rem;
  font-weight: 700;
}

.dp-actions {
  display: grid;
  grid-template-columns: minmax(112px, 0.42fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.dp-button {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
}

.dp-button:hover {
  transform: translateY(-1px);
}

.dp-button:focus {
  outline: 0;
  box-shadow: 0 0 0 4px var(--dp-focus);
}

.dp-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.dp-button.is-disabled {
  opacity: 0.58;
}

.dp-button-primary {
  color: #ffffff;
  background: var(--dp-primary);
}

.dp-button-secondary {
  color: var(--dp-muted);
  background: #ffffff;
  border: 1px solid var(--dp-border);
}

.dp-thanks {
  min-height: 390px;
  display: grid;
  place-items: center;
  text-align: center;
}

.dp-thanks-card {
  width: min(100%, 520px);
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 30px 22px;
  background: #ffffff;
  border: 1px solid var(--dp-border);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.1);
}

.dp-success-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: #ffffff;
  background: var(--dp-secondary);
  border-radius: 999px;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 12px 26px rgba(34, 197, 94, 0.24);
}

.dp-thanks p {
  margin: 0;
  color: var(--dp-muted);
  font-size: 1.04rem;
}

.dp-response-time {
  margin-top: 6px;
  color: var(--dp-text);
  font-weight: 700;
}

.dp-response-time span {
  display: block;
  color: var(--dp-muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.dp-restart {
  width: auto;
  min-height: 42px;
  margin-top: 14px;
  padding: 9px 12px;
  color: var(--dp-muted);
  font-size: 0.9rem;
  font-weight: 700;
  white-space: normal;
  box-shadow: none;
}

@media (min-width: 720px) {
  .dp-page {
    padding: 40px;
  }

  .dp-widget {
    padding: 32px;
  }

  .dp-choice-group.dp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dp-actions .dp-button-primary {
    min-width: 240px;
  }
}

@media (max-width: 440px) {
  .dp-header {
    display: grid;
  }

  .dp-step-count {
    white-space: normal;
  }

  .dp-actions .dp-button-primary {
    width: 100%;
  }

  .dp-actions {
    grid-template-columns: minmax(96px, 0.42fr) minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dp-step,
  .dp-field-reveal,
  .dp-progress span,
  .dp-button {
    animation: none;
    transition: none;
  }
}
