/* Formal external acquisition branches: local Excel and owner-private plan. */
.prospect-acquisition-routes {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 12px;
}
.prospect-acquisition-route {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  border: 1px solid #8eb0ce;
  border-left: 5px solid #2e75b6;
  border-radius: 9px;
  background: #f4f8fc;
  box-shadow: 0 4px 14px rgba(23, 59, 92, .04);
}
.prospect-acquisition-route p,
.prospect-acquisition-route h4,
.prospect-acquisition-route span { margin: 0; }
.prospect-acquisition-route p { color: #52606d; font-size: 12px; font-weight: 800; }
.prospect-acquisition-route h4 { margin-top: 3px; color: #1f4e79; font-size: 18px; }
.prospect-acquisition-route span { display: block; margin-top: 5px; color: #374151; font-size: 13px; font-weight: 700; line-height: 1.55; }
.prospect-acquisition-route button { min-height: 44px; white-space: nowrap; }
.prospect-acquisition-plan-route { border-left-color: #9c6500; background: #fffaf0; }

.prescreened-intake,
.external-plan {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(23, 59, 92, .04);
  color: #172033;
}
.prescreened-intake *, .external-plan *,
.prescreened-intake *::before, .external-plan *::before,
.prescreened-intake *::after, .external-plan *::after { box-sizing: border-box; }
.prescreened-intake h4, .prescreened-intake h5, .prescreened-intake p,
.external-plan h4, .external-plan h5, .external-plan p { margin: 0; }
.prescreened-intake button, .prescreened-intake input, .prescreened-intake textarea,
.external-plan button, .external-plan input, .external-plan textarea { font: inherit; }
.prescreened-intake button, .external-plan button {
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid #8daeca;
  border-radius: 6px;
  background: #fff;
  color: #1f4e79;
  font-weight: 800;
  cursor: pointer;
}
.prescreened-intake button:hover:not(:disabled), .external-plan button:hover:not(:disabled) { border-color: #163b5c; background: #eaf2fb; }
.prescreened-intake button:disabled, .external-plan button:disabled { border-color: #aab7c4; background: #e5e7eb; color: #4b5563; cursor: not-allowed; }
.prescreened-intake button:focus-visible, .prescreened-intake input:focus-visible, .prescreened-intake textarea:focus-visible,
.external-plan button:focus-visible, .external-plan input:focus-visible, .external-plan textarea:focus-visible { outline: 3px solid #163b5c; outline-offset: 2px; }
.prescreened-heading, .external-plan-heading,
.prescreened-preview-heading, .external-plan-current-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.prescreened-heading p, .external-plan-heading p { margin-bottom: 4px; color: #52606d; font-size: 12px; }
.prescreened-heading h4, .external-plan-heading h4 { color: #1f4e79; font-size: 19px; line-height: 1.35; }
.prescreened-heading span, .external-plan-heading span { display: block; margin-top: 5px; color: #374151; font-size: 13px; font-weight: 700; line-height: 1.55; }
.prescreened-form, .prescreened-preview, .external-plan-form, .external-plan-current, .external-plan-history {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid #b9cde0;
  border-radius: 7px;
  background: #f8fbfe;
}
.prescreened-form h5, .external-plan-form h5, .external-plan-current h5, .external-plan-history h5 { color: #1f4e79; font-size: 16px; }
.prescreened-form > p { color: #374151; font-size: 13px; font-weight: 700; line-height: 1.55; }
.prescreened-file-label, .prescreened-mapping-grid label, .external-plan-form label { display: grid; gap: 6px; color: #374151; font-size: 13px; font-weight: 800; }
.prescreened-intake input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .external-plan textarea {
  width: 100%;
  min-height: 42px;
  padding: 8px 9px;
  border: 1px solid #aebfd0;
  border-radius: 6px;
  background: #fff;
  color: #111827;
  font-weight: 600;
}
.prescreened-intake input::placeholder, .external-plan textarea::placeholder { color: #6b7280; font-weight: 400; }
.prescreened-intake input[type="file"] { width: 100%; min-height: 42px; padding: 7px; border: 1px dashed #527b9e; border-radius: 6px; background: #fff; color: #172033; }
.prescreened-file-name { color: #1f4e79; font-size: 13px; font-weight: 800; overflow-wrap: anywhere; }
.prescreened-date-fieldset { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; padding: 9px 11px; border: 1px solid #b9cde0; border-radius: 6px; }
.prescreened-date-fieldset legend { color: #374151; font-size: 13px; font-weight: 800; }
.prescreened-date-fieldset label, .prescreened-declarations label, .external-plan-consent { display: flex !important; align-items: flex-start; gap: 8px; color: #374151; font-size: 13px; font-weight: 700; line-height: 1.5; }
.prescreened-date-fieldset input[type="date"] { max-width: 180px; }
.prescreened-date-fieldset input[type="checkbox"], .prescreened-date-fieldset input[type="radio"],
.prescreened-declarations input[type="checkbox"], .external-plan-consent input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: #1f4e79; }
.prescreened-mapping-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.prescreened-declarations { display: grid; gap: 8px; padding: 12px; border: 1px solid #9ebbd5; border-left: 5px solid #2e75b6; border-radius: 6px; background: #f2f8fd; }
.prescreened-declarations h5 { color: #1f4e79; font-size: 16px; }
.prescreened-declarations p { color: #374151; font-size: 13px; font-weight: 700; line-height: 1.55; }
.prescreened-actions, .external-plan-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.prescreened-actions > span, .external-plan-actions > span { flex: 1 1 260px; color: #374151; font-size: 13px; font-weight: 700; line-height: 1.5; }
.prescreened-primary, .external-plan-primary { border-color: #1f4e79 !important; background: #1f4e79 !important; color: #fff !important; }
.prescreened-primary:hover:not(:disabled), .external-plan-primary:hover:not(:disabled) { border-color: #163b5c !important; background: #163b5c !important; color: #fff !important; }
.prescreened-primary:disabled, .external-plan-primary:disabled { border-color: #9ca3af !important; background: #e5e7eb !important; color: #4b5563 !important; }
.prescreened-readonly { padding: 11px 12px; border: 1px solid #8db1d1; border-radius: 6px; background: #eaf2fb; color: #173e62; font-weight: 800; line-height: 1.55; }
.prescreened-preview-heading h5 { color: #1f4e79; font-size: 17px; }
.prescreened-preview-heading p { margin-top: 4px; color: #374151; font-size: 13px; font-weight: 700; line-height: 1.5; }
.prescreened-good, .prescreened-bad, .external-plan-state { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 9px; border-radius: 5px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.prescreened-good { background: #c6efce; color: #006100; }
.prescreened-bad { background: #ffc7ce; color: #9c0006; }
.prescreened-preview-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 12px; margin: 0; padding: 11px; border: 1px solid #c9d5e2; border-radius: 6px; background: #fff; }
.prescreened-preview-facts dt { color: #52606d; font-size: 12px; font-weight: 800; }
.prescreened-preview-facts dd { min-width: 0; margin: 0; color: #172033; overflow-wrap: anywhere; }
.prescreened-source-note, .external-plan-not-collected { padding: 10px 11px; border-left: 5px solid #9c6500; background: #fff8df; color: #694600; font-size: 13px; font-weight: 800; line-height: 1.55; }
.prescreened-blockers, .prescreened-error, .external-plan-error { display: grid; gap: 5px; padding: 10px 12px; border: 1px solid #c96369; border-left: 5px solid #9c0006; border-radius: 6px; background: #fff4f5; color: #790008; font-weight: 800; line-height: 1.5; }
.prescreened-row-list { display: grid; gap: 9px; }
.prescreened-pager { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; color: #374151; font-size: 13px; font-weight: 800; }
.prescreened-pager > span { margin-right: auto; }
.prescreened-pager button { min-height: 40px; }
.prescreened-row { padding: 11px 12px; border: 1px solid #cbd8e5; border-left: 5px solid #2e75b6; border-radius: 6px; background: #fff; }
.prescreened-row header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; color: #1f4e79; }
.prescreened-row header span { padding: 3px 7px; border-radius: 4px; background: #eaf2fb; color: #173e62; font-size: 12px; font-weight: 800; }
.prescreened-row dl { display: grid; grid-template-columns: minmax(100px, 200px) minmax(0, 1fr); gap: 5px 12px; margin: 10px 0 0; }
.prescreened-row dt { color: #52606d; font-size: 12px; font-weight: 800; }
.prescreened-row dd { min-width: 0; margin: 0; color: #172033; overflow-wrap: anywhere; white-space: pre-wrap; }
.prescreened-row-issue { margin-top: 8px !important; color: #790008; font-size: 13px; font-weight: 800; }
.external-plan-status { display: grid; gap: 4px; padding: 11px 12px; border: 1px solid #d1bd7a; border-left: 5px solid #9c6500; border-radius: 6px; background: #fff8df; color: #594000; line-height: 1.5; }
.external-plan-status strong { font-size: 15px; }
.external-plan-status span { font-weight: 800; }
.external-plan-status small { color: #5c4b1d; font-weight: 700; }
.external-plan-form textarea { min-height: 86px; resize: vertical; line-height: 1.5; }
.external-plan-success { padding: 10px 12px; border: 1px solid #87be8d; border-left: 5px solid #006100; border-radius: 6px; background: #effbf1; color: #005400; font-weight: 800; line-height: 1.5; }
.external-plan-current-heading p { margin-top: 4px; color: #374151; font-size: 13px; font-weight: 700; }
.external-plan-query-value { padding: 10px 11px; border: 1px solid #cbd8e5; border-radius: 6px; background: #fff; color: #172033; font-weight: 700; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.external-plan-plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.external-plan-plan-grid span { display: grid; gap: 4px; min-width: 0; padding: 9px 10px; border: 1px solid #cbd8e5; border-radius: 6px; background: #fff; color: #172033; font-weight: 700; overflow-wrap: anywhere; }
.external-plan-plan-grid small { color: #52606d; font-size: 12px; font-weight: 800; }
.external-plan-blocked { color: #790008; font-weight: 800; line-height: 1.55; }
.external-plan-state.is-ready { background: #c6efce; color: #006100; }
.external-plan-state.is-needs_clarification { background: #ffeb9c; color: #785400; }
.external-plan-state.is-processing { background: #eaf2fb; color: #173e62; }
.external-plan-state.is-blocked, .external-plan-state.is-cancelled { background: #ffc7ce; color: #9c0006; }
.external-plan-history { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.external-plan-history h5 { grid-column: 1 / -1; }
.external-plan-history button { display: grid; align-content: start; gap: 5px; min-height: 74px; text-align: left; }
.external-plan-history button.active { border-color: #1f4e79; background: #eaf2fb; }
.external-plan-history button strong { color: #1f4e79; }
.external-plan-history button span { color: #374151; font-size: 12px; font-weight: 700; }

@media (max-width: 1259px) and (min-width: 761px) {
  .prescreened-mapping-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .external-plan-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .prospect-acquisition-routes { grid-template-columns: 1fr; }
  .prospect-acquisition-route { grid-template-columns: 1fr; padding: 12px; }
  .prospect-acquisition-route button { width: 100%; }
  .prescreened-intake, .external-plan { gap: 10px; padding: 12px; }
  .prescreened-intake button, .external-plan button { min-height: 44px; }
  .prescreened-heading, .external-plan-heading, .prescreened-preview-heading, .external-plan-current-heading { align-items: stretch; flex-direction: column; }
  .prescreened-heading > button, .external-plan-heading > button { width: 100%; }
  .prescreened-mapping-grid, .external-plan-plan-grid { grid-template-columns: 1fr; }
  .prescreened-date-fieldset { align-items: stretch; flex-direction: column; }
  .prescreened-date-fieldset input[type="date"] { max-width: none; }
  .prescreened-actions, .external-plan-actions { display: grid; grid-template-columns: 1fr; }
  .prescreened-pager { display: grid; grid-template-columns: 1fr 1fr; }
  .prescreened-pager > span { grid-column: 1 / -1; margin-right: 0; }
  .prescreened-pager button { width: 100%; }
  .prescreened-actions button, .external-plan-actions button { width: 100%; }
  .prescreened-preview-facts, .prescreened-row dl { grid-template-columns: 1fr; gap: 3px; }
  .prescreened-preview-facts dt:not(:first-child), .prescreened-row dt:not(:first-child) { margin-top: 7px; }
  .external-plan-history { grid-template-columns: 1fr; }
}
