.rescue-page {
  --rescue-ink: #19231f;
  --rescue-muted: #65716a;
  --rescue-line: #d8e1db;
  --rescue-green: #126b4e;
  --rescue-green-soft: #edf6f1;
  --rescue-orange: #9b4a26;
  --rescue-orange-soft: #fff3e9;
}

.rescue-page [hidden] {
  display: none !important;
}

.rescue-page .community-main,
.rescue-page .community-detail {
  max-width: 1120px;
}

.rescue-intro {
  align-items: center;
  background: #fff;
  border: 1px solid var(--rescue-line);
  border-radius: 6px;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin: 0 0 16px;
  padding: 18px 20px;
}

.rescue-intro h1,
.rescue-detail-head h1 {
  color: var(--rescue-ink);
  font-size: 22px;
  line-height: 1.3;
  margin: 0;
}

.rescue-intro p:not(.community-kicker) {
  color: var(--rescue-muted);
  margin: 5px 0 0;
}

.rescue-intro-actions,
.rescue-form-actions,
.rescue-row-actions,
.rescue-action-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rescue-report-section {
  border-top: 1px solid var(--rescue-line);
  margin-top: 14px;
  padding-top: 12px;
}

.rescue-report-section details > summary {
  color: var(--rescue-muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.rescue-report-section .rescue-inline-form {
  margin-top: 10px;
}

.rescue-report-note {
  margin-top: 8px;
}

.rescue-report-note textarea {
  min-height: 44px;
}

.rescue-report-section {
  border-top: 1px solid var(--rescue-line);
  margin-top: 14px;
  padding-top: 12px;
}

.rescue-report-section details > summary {
  color: var(--rescue-muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.rescue-report-section .rescue-inline-form {
  margin-top: 10px;
}

.rescue-report-note {
  margin-top: 8px;
}

.rescue-report-note textarea {
  min-height: 44px;
}

.rescue-filter-section,
.rescue-results-section,
.rescue-form-section,
.rescue-detail-section {
  background: #fff;
  border: 1px solid var(--rescue-line);
  border-radius: 6px;
  margin-top: 12px;
  padding: 14px 16px;
}

.rescue-filter-form {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}

.rescue-filter-form > button {
  justify-self: start;
}

.rescue-impact {
  align-items: center;
  background: var(--rescue-green-soft);
  border: 1px solid #c9e1d2;
  border-radius: 5px;
  color: #285440;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 8px 14px;
  margin: 0 0 12px;
  padding: 9px 12px;
}

.rescue-impact strong {
  font-size: 12px;
}

.rescue-choice-fieldset {
  border: 0;
  margin: 0;
  min-width: 0;
  padding: 12px 0;
}

.rescue-choice-fieldset legend {
  color: var(--rescue-ink);
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 7px;
}

.rescue-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.rescue-check-grid label {
  cursor: pointer;
  position: relative;
}

.rescue-check-grid input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.rescue-check-grid span {
  align-items: center;
  background: #fff;
  border: 1px solid #bac8bf;
  border-radius: 999px;
  color: var(--rescue-ink);
  display: inline-flex;
  font-size: 13px;
  min-height: 38px;
  padding: 7px 12px;
}

.rescue-check-grid input:checked + span {
  background: var(--rescue-green-soft);
  border-color: var(--rescue-green);
  color: #155b42;
}

.rescue-check-grid input:focus-visible + span {
  outline: 3px solid #126b4e35;
  outline-offset: 2px;
}

.rescue-capacity-fields {
  margin-top: 4px;
}

.rescue-recipient-summary,
.rescue-verification-note {
  color: var(--rescue-muted);
  display: block;
  font-size: 12px;
  margin: 5px 0 0;
}

.rescue-recipient-match-list,
.rescue-evidence-list {
  display: grid;
}

.rescue-recipient-match {
  align-items: center;
  border-bottom: 1px solid var(--rescue-line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
  padding: 10px 0;
}

.rescue-recipient-match > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.rescue-recipient-match small {
  color: var(--rescue-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.rescue-recipient-match .community-button {
  flex: 0 0 auto;
}

.rescue-search-field,
.rescue-field {
  color: var(--rescue-ink);
  display: grid;
  font-size: 13px;
  font-weight: 650;
  gap: 5px;
  min-width: 0;
}

.rescue-field > label {
  color: var(--rescue-ink);
  font-size: 13px;
  font-weight: 650;
}

.rescue-search-field input,
.rescue-field input,
.rescue-field select,
.rescue-field textarea {
  background: #fff;
  border: 1px solid #bac8bf;
  border-radius: 5px;
  color: var(--rescue-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  min-height: 40px;
  min-width: 0;
  padding: 8px 10px;
  width: 100%;
}

.rescue-field textarea {
  line-height: 1.5;
  resize: vertical;
}

.rescue-field input:focus-visible,
.rescue-field select:focus-visible,
.rescue-field textarea:focus-visible,
.rescue-search-field input:focus-visible {
  border-color: var(--rescue-green);
  outline: 3px solid #126b4e35;
  outline-offset: 1px;
}

.rescue-status {
  color: var(--rescue-muted);
  font-size: 13px;
  margin: 10px 0 0;
  min-height: 1.4em;
}

.rescue-status[data-error="true"] {
  color: #a32e27;
}

.rescue-results-head {
  align-items: baseline;
  border-bottom: 1px solid var(--rescue-line);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 2px;
  padding-bottom: 10px;
}

.rescue-results-head h2,
.rescue-form-section h2,
.rescue-detail-section h2 {
  color: var(--rescue-ink);
  font-size: 16px;
  line-height: 1.35;
  margin: 0;
}

.rescue-results-head h2 span,
.rescue-results-head > span {
  color: var(--rescue-muted);
  font-size: 12px;
  font-weight: 500;
}

.rescue-list {
  display: grid;
}

.rescue-row {
  align-items: center;
  border-bottom: 1px solid #e8eeea;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  padding: 12px 2px;
}

.rescue-row:last-child {
  border-bottom: 0;
}

.rescue-row-main {
  min-width: 0;
}

.rescue-row-title {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.rescue-row-title a {
  color: var(--rescue-ink);
  font-size: 15px;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.rescue-row-title a:hover {
  text-decoration: underline;
}

.rescue-row-quantity {
  color: var(--rescue-green);
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}

.rescue-row-meta {
  color: var(--rescue-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 4px 12px;
  margin-top: 5px;
}

.rescue-chip,
.rescue-status-chip {
  background: var(--rescue-green-soft);
  border-radius: 999px;
  color: #155b43;
  display: inline-flex;
  font-size: 11px;
  line-height: 1.35;
  padding: 3px 8px;
}

.rescue-chip-unverified {
  background: var(--rescue-orange-soft);
  color: var(--rescue-orange);
}

.rescue-chip-status {
  background: #f1f3f2;
  color: #4d5952;
}

.rescue-chip-urgent {
  background: #fff0ec;
  color: #9c3023;
}

.rescue-chip-hold {
  background: #fff5d9;
  color: #735415;
}

.rescue-safety-hold-note {
  background: #fff5d9;
  border-left: 3px solid #b17a10;
  color: #594519;
  font-size: 12px;
  margin: 8px 0;
  padding: 8px 10px;
}

.rescue-legal-hold {
  align-items: end;
  border-top: 1px solid var(--rescue-line);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(180px, 0.7fr) minmax(220px, 1fr) auto;
  margin-top: 10px;
  padding-top: 10px;
}

.rescue-check-option {
  align-items: center;
  display: flex;
  gap: 8px;
  min-height: 40px;
}

.rescue-check-option input {
  accent-color: var(--rescue-green);
  height: 18px;
  width: 18px;
}

.rescue-empty {
  color: var(--rescue-muted);
  padding: 12px 8px;
  text-align: center;
}

.rescue-pagination {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 12px;
}

.rescue-form-intro {
  margin-bottom: 8px;
}

.rescue-form {
  display: grid;
  gap: 10px;
}

.rescue-form-section h2 {
  margin-bottom: 12px;
}

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

.rescue-field-wide {
  grid-column: 1 / -1;
}

.rescue-field fieldset,
.rescue-form-grid fieldset {
  border: 0;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.rescue-form-grid legend,
.rescue-field legend {
  color: var(--rescue-ink);
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 5px;
}

.rescue-note {
  color: var(--rescue-muted);
  font-size: 12px;
  margin: 7px 0 0;
}

.rescue-more-details {
  background: #fff;
  border: 1px solid var(--rescue-line);
  border-radius: 6px;
  padding: 0 14px;
}

.rescue-more-details summary {
  color: var(--rescue-ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 0;
}

.rescue-more-details[open] .rescue-form-grid {
  border-top: 1px solid var(--rescue-line);
  padding: 12px 0 14px;
}

.rescue-consent {
  align-items: start;
  color: var(--rescue-ink);
  display: flex;
  font-size: 13px;
  gap: 9px;
  padding: 5px 2px;
}

.rescue-consent input {
  accent-color: var(--rescue-green);
  height: 18px;
  margin: 1px 0 0;
  width: 18px;
}

.rescue-form-actions {
  border-top: 1px solid var(--rescue-line);
  justify-content: flex-end;
  padding-top: 12px;
}

.rescue-detail-head {
  background: #fff;
  border: 1px solid var(--rescue-line);
  border-radius: 6px;
  padding: 18px;
}

.rescue-detail-head-top {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 8px;
}

.rescue-detail-summary {
  align-items: center;
  color: var(--rescue-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 6px 16px;
  margin: 10px 0 0;
}

.rescue-detail-summary strong {
  color: var(--rescue-green);
  font-size: 18px;
}

.rescue-detail-grid {
  display: grid;
  gap: 8px 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.rescue-detail-grid div {
  border-bottom: 1px solid #e8eeea;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(90px, .6fr) minmax(0, 1fr);
  padding: 8px 0;
}

.rescue-detail-grid .rescue-detail-wide {
  grid-column: 1 / -1;
}

.rescue-detail-grid dt {
  color: var(--rescue-muted);
  font-size: 12px;
}

.rescue-detail-grid dd {
  color: var(--rescue-ink);
  font-size: 13px;
  margin: 0;
  overflow-wrap: anywhere;
}

.rescue-participant-list,
.rescue-allocation-list,
.rescue-message-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.rescue-person-row,
.rescue-allocation-row,
.rescue-message {
  align-items: center;
  background: #f8faf9;
  border: 1px solid #e3eae5;
  border-radius: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  justify-content: space-between;
  padding: 9px 10px;
}

.rescue-person-copy,
.rescue-message-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.rescue-person-copy strong,
.rescue-message-copy strong {
  color: var(--rescue-ink);
  font-size: 13px;
}

.rescue-person-copy small,
.rescue-message-copy small {
  color: var(--rescue-muted);
  font-size: 11px;
}

.rescue-inline-form {
  align-items: end;
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.rescue-inline-form .rescue-field-wide {
  grid-column: 1 / -1;
}

.rescue-inline-form .community-button {
  justify-self: start;
}

.rescue-evidence-review {
  display: grid;
  gap: 8px;
  min-width: min(100%, 310px);
}

.rescue-evidence-check {
  align-items: flex-start;
  color: var(--rescue-muted);
  display: flex;
  font-size: 11px;
  gap: 7px;
  line-height: 1.45;
}

.rescue-evidence-check input {
  flex: 0 0 auto;
  height: 16px;
  margin: 1px 0 0;
  width: 16px;
}

.rescue-evidence-review .rescue-action-row {
  border-top: 0;
  margin: 0;
  padding: 0;
}

.rescue-role-fields {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rescue-field small {
  color: var(--rescue-muted);
  font-size: 11px;
  font-weight: 400;
}

.rescue-message-copy p {
  color: var(--rescue-ink);
  font-size: 13px;
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.rescue-warning {
  background: var(--rescue-orange-soft);
  border-radius: 5px;
  color: #783c20;
  font-size: 12px;
  margin: 10px 0 0;
  padding: 9px 10px;
}

.rescue-action-row {
  border-top: 1px solid var(--rescue-line);
  margin-top: 12px;
  padding-top: 12px;
}

.rescue-page .community-button {
  font-size: 13px;
  min-height: 40px;
}

@media (max-width: 700px) {
  .rescue-legal-hold {
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr);
  }

  .rescue-intro {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
  }

  .rescue-intro-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  }

  .rescue-filter-form {
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr);
  }

  .rescue-filter-form > button {
    width: 100%;
  }

  .rescue-row {
    align-items: start;
    grid-template-columns: minmax(0, 1fr);
    padding: 12px 0;
  }

  .rescue-row-actions .community-button {
    flex: 1 1 auto;
  }

  .rescue-form-section,
  .rescue-detail-section,
  .rescue-results-section,
  .rescue-filter-section {
    padding: 12px;
  }

  .rescue-form-grid,
  .rescue-detail-grid,
  .rescue-inline-form,
  .rescue-role-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .rescue-inline-form .rescue-field-wide,
  .rescue-field-wide,
  .rescue-detail-grid .rescue-detail-wide {
    grid-column: auto;
  }

  .rescue-page .community-button {
    min-height: 44px;
  }

  .rescue-form-actions {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
  }

  .rescue-recipient-match {
    align-items: stretch;
    flex-direction: column;
  }

  .rescue-recipient-match .community-button {
    width: 100%;
  }

  .rescue-evidence-review {
    min-width: 0;
    width: 100%;
  }
}
