/* Compact, opt-in sourced recap. Loaded by the parent with versioned assets. */
.lead-recap {
  display: block;
  min-width: 0;
  width: 100%;
  margin: 12px 0;
  border: 1px solid var(--line, #dededb);
  border-radius: 10px;
  background: var(--panel, #fff);
  color: var(--ink, #1e2423);
  font-size: .875rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.lead-recap *, .lead-recap-dialog * { box-sizing: border-box; min-width: 0; }
.lead-recap > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  min-height: 48px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 650;
  list-style: none;
}
.lead-recap > summary::after { content: '+'; margin-left: auto; font-size: 1.2rem; }
.lead-recap[open] > summary::after { content: '−'; }
.lead-recap > summary::-webkit-details-marker { display: none; }
.lead-recap > summary small { color: #59635f; font-size: .75rem; font-weight: 450; }
.lead-recap summary:focus-visible,
.lead-recap a:focus-visible,
.lead-recap-dialog button:focus-visible {
  outline: 2px solid #236247;
  outline-offset: 3px;
  border-radius: 4px;
}
.lead-recap-body { padding: 0 16px 16px; }
.lead-recap .lead-recap-body > section,
.lead-recap .lead-recap-body > details,
.lead-recap-grid > section { padding-top: 14px; border-top: 1px solid #eceeeb; margin-top: 14px; }
.lead-recap h3 { margin: 0 0 7px; color: inherit; font-size: .86rem; font-weight: 700; }
.lead-recap p { margin: 5px 0; color: inherit; font-size: inherit; white-space: pre-wrap; }
.lead-recap .lead-recap-scope,
.lead-recap .lead-recap-unknown,
.lead-recap small { color: #59635f; font-size: .78rem; }
.lead-recap ul { padding: 0 0 0 18px; margin: 6px 0; }
.lead-recap li { margin: 7px 0; }
.lead-recap .lead-recap-facts,
.lead-recap .lead-recap-routes { list-style: none; padding-left: 0; }
.lead-recap-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.lead-recap .lead-recap-routes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 10px; }
.lead-recap-routes > li { margin: 0; padding: 10px; border: 1px solid #e6e9e4; border-radius: 6px; }
.lead-recap-routes > li > strong,
.lead-recap-routes > li > span { display: block; }
.lead-recap a { color: #195d43; text-decoration: underline; text-underline-offset: 3px; }
.lead-recap .lead-recap-citations { margin: 6px 0 10px; font-size: .78rem; }
.lead-recap-citations > summary,
.lead-recap-additional > summary,
.lead-recap-source-list > summary { padding: 7px 0; min-height: 36px; cursor: pointer; font-weight: 550; }
.lead-recap-citations figure { margin: 5px 0 12px; padding: 10px; background: #f5f7f3; border-radius: 6px; }
.lead-recap .lead-recap-citations blockquote { margin: 0 0 7px; padding: 0 0 0 10px; border-left: 2px solid #a4b5a7; font-size: inherit; color: #303c34; white-space: pre-wrap; }
.lead-recap-citations figcaption { display: flex; flex-wrap: wrap; gap: 4px 12px; color: #59635f; }
.lead-recap-hypotheses { background: #f7f8f4; border-radius: 6px; padding: 12px; }
.lead-recap-source-list li > small { display: block; margin-top: 3px; }
.lead-recap.is-unprepared > summary { color: #59635f; }
/* The existing company proof uses a grid: keep the recap in its own full row. */
.company-brief > .lead-recap { grid-column: 1 / -1; margin-bottom: 0; }
.lead-ref-row-actions > [data-lead-ref-brief] { min-height: 44px; white-space: nowrap; }
.lead-recap-dialog {
  width: min(820px, calc(100vw - 32px));
  max-height: min(90dvh, 1000px);
  padding: 0;
  border: 1px solid #dededb;
  border-radius: 12px;
  background: #fff;
  color: #1e2423;
  overflow: auto;
  overscroll-behavior: contain;
}
.lead-recap-dialog::backdrop { background: rgb(17 25 20 / .45); }
.lead-recap-dialog-content { padding: 20px; }
.lead-recap-dialog-content > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.lead-recap-dialog-content > header h2 { margin: 0; font-size: 1.2rem; }
.lead-recap-dialog-content > header p { margin: 4px 0 12px; font-size: .85rem; color: #59635f; }
.lead-recap-dialog-content > header button { flex-shrink: 0; min-width: 44px; min-height: 44px; cursor: pointer; }
@media (max-width: 600px) {
  .lead-recap-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .lead-recap > summary { flex-wrap: wrap; padding: 10px 12px; }
  .lead-recap > summary > small { flex-basis: 100%; order: 2; }
  .lead-recap-body { padding: 0 12px 12px; }
  .lead-recap-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 20px); }
  .lead-recap-dialog-content { padding: 12px; }
  .lead-recap-routes { grid-template-columns: minmax(0, 1fr); }
  .lead-recap-citations > summary,
  .lead-recap-additional > summary,
  .lead-recap-source-list > summary { min-height: 44px; }
}
