.intake-back { display: inline-flex; align-items: center; gap: .5em; min-height: 42px; }
.prep-case-link { margin-right: auto; min-height: 44px; }
.intake-dialog .button-primary { min-height: 44px; padding: 9px 17px; background: #194735; color: #fffef7; border: 1px solid #194735; border-radius: 5px; }
.intake-context-link, .intake-project-link { min-height: 44px; text-align: start; }
.case-editor-main > .intake-context-link { justify-self: start; margin-top: -7px; }
.intake-project-link { display: block; width: fit-content; margin: 4px 0 13px auto; }
.case-search-status { flex-wrap: wrap; gap: 4px 12px; }
.case-search-status > .intake-context-link { margin-inline-start: auto; }
.intake-dialog {
  width: min(600px, calc(100% - 24px));
  max-height: min(90dvh, 930px);
  border-radius: 12px;
  border: 1px solid #a8b5aa;
  background: #fffef9;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
}
.intake-dialog::backdrop { background: rgba(13, 35, 27, .58); }
.intake-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px clamp(15px, 4vw, 28px);
  border-bottom: 1px solid #d4dacd;
  background: #eff1e7;
  color: #143e2e;
}
.intake-head h2 { font: 700 clamp(21px, 3vw, 26px)/1.35 var(--font-title); }
.intake-head h2:focus { outline: none; }
.intake-close {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  font-size: 26px;
  line-height: 1;
}
.intake-close:hover { background: #e0e7d9; }
.intake-body { display: grid; gap: 15px; min-width: 0; padding: 20px clamp(15px, 4vw, 28px) 0; }
.intake-body .field { min-width: 0; }
.intake-body .field-input { min-width: 0; width: 100%; font-size: 15px; }
.intake-body textarea { resize: vertical; }
.intake-provenance {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #405b46;
}
.intake-provenance i { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: #7c913e; }
.intake-intro, .intake-hint, .intake-matches p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.intake-body .intake-intro { margin-top: -7px; }
.intake-return { justify-self: start; min-height: 44px; margin-bottom: 14px; }
.intake-original { border-block-start: 1px solid var(--line); }
.intake-original summary { color: var(--green-dark); cursor: pointer; min-height: 42px; padding-block: 9px; }
.intake-original p { white-space: pre-wrap; max-height: 22vh; overflow: auto; color: var(--muted); }
.intake-footer {
  display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between;
  position: sticky;
  bottom: 0;
  z-index: 1;
  padding: 10px 0 max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #fffef9;
}
.intake-footer .button { margin-left: auto; }
.intake-footer .source-link { min-height: 42px; }
.intake-matches { padding: 15px 17px; background: #edf1e5; border-left: 3px solid #587448; }
.intake-matches p { margin-top: 5px; }
.intake-matches ul { margin: 7px 0 0; padding: 0; list-style: none; }
.intake-matches li { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 0 14px; }
.intake-matches .intake-match-contact { font-size: 13px; }
.intake-matches li + li { margin-top: 5px; }
.intake-matches a { display: inline-block; padding-block: 7px; color: var(--green-dark); text-underline-offset: 4px; }
.intake-matches small { color: var(--muted); }
@media (max-width: 560px) {
  .intake-dialog { max-height: 92dvh; }
  .intake-body .field-input { font-size: 16px; }
  .intake-project-link { margin-block: 0 8px; }
}
@media print { .intake-dialog, .home-chat, .intake-context-link, .intake-project-link { display: none !important; } }
