/* D&N Inquiry — form-specific styles. Theme variables provide the palette. */
.dn-form {
  display: grid;
  gap: 20px;
}

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

/* Four intake routes */
.dn-intake { display: grid; gap: 12px; }
.dn-intake__head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.dn-intake__label { font-size: 0.82rem; font-weight: 750; color: var(--dn-ink, #0b1f2a); }
.dn-intake__head .hint { font-size: 0.76rem; color: var(--dn-muted, #5d6f73); }
.dn-intent-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dn-intent { position: relative; display: flex; gap: 10px; padding: 14px; border: 1px solid #cbd8d1; border-radius: 12px; background: #fbfcfb; cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease; }
.dn-intent:hover { border-color: #9fb7aa; background: #ffffff; }
.dn-intent input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.dn-intent__body { display: grid; gap: 4px; padding-left: 24px; }
.dn-intent__body::before { content: ""; position: absolute; left: 14px; top: 17px; width: 14px; height: 14px; border: 1.5px solid #9fb7aa; border-radius: 50%; background: #fff; }
.dn-intent input:checked + .dn-intent__body::before { border-color: var(--dn-teal, #107a63); box-shadow: inset 0 0 0 3px #fff; background: var(--dn-teal, #107a63); }
.dn-intent input:focus-visible + .dn-intent__body::before { outline: 2px solid var(--dn-teal, #107a63); outline-offset: 2px; }
.dn-intent input:checked ~ .dn-intent__body strong { color: var(--dn-teal, #107a63); }
.dn-intent__body strong { font-size: 0.86rem; line-height: 1.35; color: var(--dn-ink, #0b1f2a); }
.dn-intent__body span { font-size: 0.75rem; line-height: 1.45; color: var(--dn-muted, #5d6f73); }

/* Optional project details */
.dn-form-more { border: 1px solid #d8e2db; border-radius: 12px; background: #f7faf6; }
.dn-form-more summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; cursor: pointer; font-size: 0.84rem; font-weight: 700; color: var(--dn-ink, #0b1f2a); list-style: none; }
.dn-form-more summary::-webkit-details-marker { display: none; }
.dn-form-more summary span { font-size: 1.1rem; color: var(--dn-teal, #107a63); }
.dn-form-more[open] summary { border-bottom: 1px solid #d8e2db; }
.dn-form-more .dn-form-grid { padding: 16px; }

.dn-span-2 { grid-column: span 2; }

.dn-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.dn-field label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  color: var(--dn-ink, #0b1f2a);
}

.dn-field .req { color: #b4432f; margin-left: 2px; }
.dn-field .hint { font-size: 0.74rem; line-height: 1.45; color: var(--dn-muted, #5d6f73); }
.dn-optional { font-weight: 500; color: var(--dn-muted, #5d6f73); }

.dn-field input,
.dn-field select,
.dn-field textarea {
  width: 100%;
  border: 1px solid #cbd8d1;
  border-radius: 10px;
  background: #fbfcfb;
  color: var(--dn-ink, #0b1f2a);
  padding: 12px 13px;
  font-family: inherit;
  font-size: 0.93rem;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.dn-field textarea { min-height: 118px; resize: vertical; }
.dn-field input:hover,
.dn-field select:hover,
.dn-field textarea:hover { border-color: #aebfb6; }

.dn-field input:focus,
.dn-field select:focus,
.dn-field textarea:focus {
  outline: none;
  border-color: var(--dn-teal, #107a63);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(16, 122, 99, 0.12);
}

.dn-field input[type="file"] {
  padding: 12px;
  border-style: dashed;
  background: #f4f8f3;
  cursor: pointer;
}

.dn-field input[type="file"]::file-selector-button {
  border: 0;
  background: var(--dn-ink, #0b1f2a);
  color: #fff;
  border-radius: 7px;
  padding: 8px 12px;
  margin-right: 10px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
}

.dn-field--error input,
.dn-field--error select,
.dn-field--error textarea {
  border-color: #b4432f;
  background: #fff9f7;
}

.dn-error {
  min-height: 0;
  color: #a13a27;
  font-size: 0.76rem;
  line-height: 1.4;
}

.dn-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--dn-muted, #5d6f73);
  font-weight: 500 !important;
  cursor: pointer;
}

.dn-consent input {
  width: 18px !important;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--dn-teal, #107a63);
  flex: 0 0 18px;
}

.dn-consent a { color: var(--dn-teal, #107a63); }

.dn-form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.dn-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 190px;
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  background: var(--dn-green, #74b236);
  color: var(--dn-ink, #0b1f2a);
  padding: 14px 24px;
  font-family: inherit;
  font-size: 0.93rem;
  font-weight: 750;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.dn-submit:hover { background: #85c649; transform: translateY(-1px); }
.dn-submit:disabled { cursor: wait; opacity: 0.72; transform: none; }

.dn-submit__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(11, 31, 42, 0.25);
  border-top-color: var(--dn-ink, #0b1f2a);
  border-radius: 50%;
  animation: dn-spin 0.8s linear infinite;
}

.dn-submit.is-loading .dn-submit__spinner { display: inline-block; }
.dn-submit.is-loading .dn-submit__label { opacity: 0.8; }

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

.dn-form-small {
  margin: 0;
  font-size: 0.75rem;
  color: var(--dn-muted, #5d6f73);
}

.dn-form-status {
  display: none;
  border-radius: 10px;
  padding: 13px 15px;
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 2px;
}

.dn-form-status.is-error { display: block; background: #fff1ee; border: 1px solid #f1c8bf; color: #8b2f1e; }
.dn-form-status.is-success { display: block; background: #eef7e9; border: 1px solid #cfe4bf; color: #2f5c16; }

.dn-file-list { display: grid; gap: 6px; margin-top: 2px; }
.dn-file-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: #eef4ec;
  border: 1px solid #d9e4d6;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.76rem;
}
.dn-file-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dn-file-row em { font-style: normal; color: var(--dn-muted, #5d6f73); flex: 0 0 auto; }

.dn-conditional[hidden] { display: none !important; }
.dn-form-compact .dn-form-wrap { max-width: 820px; }

@media (max-width: 720px) {
  .dn-form-grid { grid-template-columns: 1fr; }
  .dn-intent-grid { grid-template-columns: 1fr; }
  .dn-span-2 { grid-column: span 1; }
  .dn-form-actions { align-items: stretch; }
  .dn-submit { width: 100%; }
}
