.df-form {
  --df-accent: #ea580c;
  --df-accent-2: #f59e0b;
  --df-text: inherit;
  --df-muted: #6b7280;
  --df-border: rgba(0, 0, 0, .18);
  --df-bg: #fff;
  --df-radius: 12px;
  --df-error: #dc2626;
  --df-gap: 18px;

  box-sizing: border-box;
  max-width: 100%;
  font-family: inherit;
  color: var(--df-text);
}

.df-form *,
.df-form *::before,
.df-form *::after {
  box-sizing: inherit;
}

.df-title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  line-height: 1.3;
}

.df-description {
  margin: 0 0 var(--df-gap);
  color: var(--df-muted);
}

.df-fields {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 20px;
  row-gap: var(--df-gap);
}

.df-fields > .df-field {
  grid-column: span 12;
  margin: 0;
  min-width: 0;
}

.df-fields > .df-span-1 { grid-column: span 1; }
.df-fields > .df-span-2 { grid-column: span 2; }
.df-fields > .df-span-3 { grid-column: span 3; }
.df-fields > .df-span-4 { grid-column: span 4; }
.df-fields > .df-span-5 { grid-column: span 5; }
.df-fields > .df-span-6 { grid-column: span 6; }
.df-fields > .df-span-7 { grid-column: span 7; }
.df-fields > .df-span-8 { grid-column: span 8; }
.df-fields > .df-span-9 { grid-column: span 9; }
.df-fields > .df-span-10 { grid-column: span 10; }
.df-fields > .df-span-11 { grid-column: span 11; }
.df-fields > .df-span-12 { grid-column: span 12; }

.df-fields > [hidden],
.df-field--hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .df-fields > .df-field[class*="df-span-"] {
    grid-column: 1 / -1;
  }
}

label .df-label,
.df-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.df-req {
  color: var(--df-error);
  margin-left: 2px;
}

.df-field-desc {
  display: block;
  font-size: 14px;
  color: var(--df-muted);
  margin-top: 6px;
}

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

.df-description small,
.df-field-desc {
  display: block;
  color: var(--df-muted);
  font-size: 14px;
  margin-top: 6px;
}

.df-form input[type="text"],
.df-form input[type="email"],
.df-form input[type="tel"],
.df-form input[type="url"],
.df-form input[type="number"],
.df-form input[type="date"],
.df-form select,
.df-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--df-border);
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 16px;
  color: var(--df-text);
}

.df-form textarea {
  min-height: 140px;
  padding: 10px 14px;
  resize: vertical;
}

.df-form input:focus,
.df-form select:focus,
.df-form textarea:focus {
  outline: none;
  border-color: var(--df-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--df-accent) 22%, transparent);
}

.df-size--small { width: 100%; max-width: none; }
.df-size--medium { width: 100%; max-width: none; }
.df-size--large { width: 100%; max-width: none; }

.df-form .df-size--small input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]),
.df-form .df-size--small select,
.df-form .df-size--small textarea { min-height: 38px; }

.df-form .df-size--medium input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]),
.df-form .df-size--medium select,
.df-form .df-size--medium textarea { min-height: 46px; }

.df-form .df-size--large input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]),
.df-form .df-size--large select,
.df-form .df-size--large textarea { min-height: 54px; }

@media (min-width: 700px) {
  .df-labels--left,
  .df-labels--right {
    display: grid;
    grid-template-columns: 30% 1fr;
    gap: var(--df-gap);
    align-items: start;
  }

  .df-labels--left .df-label,
  .df-labels--right .df-label {
    margin-bottom: 0;
  }

  .df-labels--right .df-label {
    text-align: right;
  }
}

.df-sub {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--df-gap);
  margin-top: 8px;
}

@media (min-width: 700px) {
  .df-sub {
    grid-template-columns: repeat(2, 1fr);
  }
}

.df-sub label {
  font-size: .875rem;
  color: var(--df-muted);
  display: block;
  margin-bottom: 4px;
}

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

legend {
  font-weight: 600;
  margin-bottom: 8px;
}

.df-choice,
.df-radio,
.df-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.df-choice input[type="checkbox"],
.df-choice input[type="radio"],
.df-radio input[type="radio"],
.df-checkbox input[type="checkbox"] {
  accent-color: var(--df-accent);
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
}

.df-cols-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.df-other input {
  margin-top: 4px;
}

.df-list table {
  width: 100%;
  border-collapse: collapse;
}

@media (max-width: 699px) {
  .df-list table,
  .df-list tbody,
  .df-list tr,
  .df-list td,
  .df-list th {
    display: block;
    width: 100%;
  }

  .df-list th {
    display: none;
  }

  .df-list td {
    margin-bottom: 8px;
  }
}

.df-list-add,
.df-list-del {
  border: none;
  background: transparent;
  color: var(--df-accent);
  font-size: .875rem;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 999px;
}

.df-list-add:hover,
.df-list-del:hover {
  background: rgba(234, 88, 12, .1);
}

.df-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: var(--df-gap);
}

.df-section-title {
  border-bottom: 1px solid var(--df-border);
  padding-bottom: 8px;
  margin: 12px 0 0;
  font-size: 20px;
  font-weight: 700;
}

.df-form input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 1px dashed var(--df-border);
  border-radius: 8px;
  background: #fafafa;
  font-family: inherit;
  font-size: 14px;
}

.df-form input[type="file"]::file-selector-button {
  height: 36px;
  padding: 0 16px;
  margin-right: 12px;
  border: 1px solid var(--df-border);
  border-radius: 6px;
  background: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.df-file-note {
  display: block;
  font-size: 13px;
  color: var(--df-muted);
  margin-top: 6px;
}

.df-html {
  max-width: 100%;
  overflow-x: auto;
}

.df-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--df-gap);
}

.df-progress .step {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--df-bg);
  border: 1px solid var(--df-border);
  font-size: .875rem;
}

.df-progress .step.active {
  background: var(--df-accent);
  color: #fff;
  border-color: var(--df-accent);
}

.df-progress-bar-track {
  height: 6px;
  background: var(--df-border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: var(--df-gap);
}

.df-progress-bar-fill {
  height: 100%;
  background: linear-gradient(to right, var(--df-accent), var(--df-accent-2));
  transition: width .3s ease;
}

.df-footer {
  display: flex;
  gap: var(--df-gap);
  flex-wrap: wrap;
  margin-top: var(--df-gap);
}

.df-btn {
  height: 48px;
  padding: 0 28px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 16px;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.df-submit,
.df-next {
  background: var(--df-accent);
  color: #fff;
}

.df-submit:hover,
.df-next:hover {
  filter: brightness(1.07);
}

.df-prev,
.df-btn-secondary {
  background: transparent;
  border: 1px solid var(--df-border);
  color: inherit;
}

.df-page-footer {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.df-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: df-spin .6s linear infinite;
}

.df-busy .df-spinner {
  display: inline-block;
}

@keyframes df-spin {
  to { transform: rotate(360deg); }
}

.df-field-error {
  color: var(--df-error);
  font-size: 14px;
  margin-top: 6px;
  display: block;
}

.df-error .df-input,
.df-error .df-select,
.df-error input,
.df-error select,
.df-error textarea {
  border-color: var(--df-error);
}

.df-validation {
  background: rgba(220, 38, 38, .1);
  border: 1px solid var(--df-error);
  color: var(--df-error);
  padding: 12px;
  border-radius: var(--df-radius);
  margin-bottom: var(--df-gap);
}

.df-confirmation {
  background: rgba(234, 88, 12, .1);
  border-left: 4px solid var(--df-accent);
  padding: 16px;
  border-radius: var(--df-radius);
}

.df-cols-2,
.df-cols-3,
.df-cols-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 700px) {
  .df-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .df-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .df-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.df-cols-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.df-img-choice {
  border: 1px solid var(--df-border);
  border-radius: var(--df-radius);
  padding: 8px;
  cursor: pointer;
  position: relative;
  transition: border-color .2s ease;
}

.df-img-choice img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: calc(var(--df-radius) - 4px);
}

.df-img-choice .df-img-label {
  display: block;
  margin-top: 6px;
  font-size: .875rem;
}

.df-img-choice.is-checked {
  border-color: var(--df-accent);
  box-shadow: 0 0 0 1px var(--df-accent);
}

.df-img-choice.is-checked::after {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: var(--df-accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  line-height: 1;
}

.df-mc-choice {
  border: 1px solid var(--df-border);
  border-radius: var(--df-radius);
  padding: 10px 16px;
  cursor: pointer;
  text-align: center;
  transition: all .2s ease;
}

.df-mc-choice.is-checked {
  background: var(--df-accent);
  color: #fff;
  border-color: var(--df-accent);
}

.df-pw-meter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.df-pw-track {
  flex: 1;
  height: 6px;
  background: var(--df-border);
  border-radius: 999px;
  overflow: hidden;
}

.df-pw-fill {
  height: 100%;
  width: 0;
  transition: width .2s ease, background-color .2s ease;
}

.df-pw-meter[data-score="0"] .df-pw-fill {
  width: 0;
  background: transparent;
}

.df-pw-meter[data-score="1"] .df-pw-fill {
  width: 25%;
  background: #dc2626;
}

.df-pw-meter[data-score="2"] .df-pw-fill {
  width: 50%;
  background: #f59e0b;
}

.df-pw-meter[data-score="3"] .df-pw-fill {
  width: 75%;
  background: #16a34a;
}

.df-pw-meter[data-score="4"] .df-pw-fill {
  width: 100%;
  background: #15803d;
}

.df-pw-label {
  font-size: .75rem;
  color: var(--df-muted);
  min-width: 60px;
}

.df-pw-wrap {
  position: relative;
}

.df-pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--df-muted);
  font-size: 1rem;
}

.df-pw-toggle:hover {
  color: var(--df-text);
}

.df-combo {
  position: relative;
}

.df-combo input {
  width: 100%;
}

.df-combo-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  background: var(--df-bg);
  border: 1px solid var(--df-border);
  border-radius: var(--df-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
  z-index: 10;
  margin-top: 4px;
}

.df-combo-list [role="option"] {
  padding: 8px 14px;
  cursor: pointer;
}

.df-combo-list [role="option"]:hover,
.df-combo-list [role="option"].active {
  background: rgba(234, 88, 12, .1);
}

.df-save-link {
  background: none;
  border: none;
  color: var(--df-accent);
  cursor: pointer;
  font-size: .875rem;
  text-decoration: underline;
  padding: 4px 0;
}

.df-save-link:hover {
  color: var(--df-accent-2);
}

.df-validation ul {
  margin: 8px 0 0;
  padding-left: 1.5rem;
}

.df-validation ul li {
  margin-bottom: 4px;
}

.df-validation ul a {
  color: var(--df-error);
  text-decoration: underline;
}

.df-no-margins {
  margin: 0 !important;
  padding: 0 !important;
}

.df-closed {
  color: var(--df-muted);
}

.df-hp {
  position: absolute;
  left: -9999px;
}

.df-counter {
  display: block;
  text-align: right;
  font-size: .875rem;
  color: var(--df-muted);
  margin-top: 4px;
}

.df-total {
  font-weight: bold;
  font-size: 1.25rem;
}

[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .df-form * {
    transition: none !important;
    animation: none !important;
  }
}
