/* Privacy receipt + inline de-identification preview. */

.privacy-receipt {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid #d8d2c4;
  border-left: 4px solid #b84933;
  border-radius: 0.25rem;
  background: #fffdf8;
  color: #172522;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.privacy-receipt-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.privacy-receipt-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #123f37;
}

.privacy-receipt-badge {
  padding: 0.25rem 0.5rem;
  background: #dcece6;
  color: #123f37;
  font: 600 0.68rem/1.3 "DM Mono", monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.privacy-receipt-summary {
  margin: 0;
}

.privacy-receipt-details {
  margin-top: 0.75rem;
  padding-top: 0.625rem;
  border-top: 1px solid #e4ded2;
}

.privacy-receipt-details > summary {
  cursor: pointer;
  color: #52605c;
  font-weight: 700;
}

.privacy-receipt-details[open] > summary {
  margin-bottom: 0.625rem;
}

.privacy-receipt-subheading {
  margin: 1rem 0 0.375rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
}

.privacy-receipt-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #e2e8f0;
}

.privacy-receipt-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.4375rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.privacy-receipt-label {
  font-weight: 600;
}

.privacy-receipt-count {
  flex: none;
  min-width: 1.75rem;
  padding: 0.0625rem 0.5rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: center;
}

.privacy-receipt-none {
  display: block;
  color: #475569;
  font-style: italic;
}

.privacy-receipt-kept {
  margin: 0;
  padding-left: 1.125rem;
  color: #334155;
}

.privacy-receipt-kept li {
  margin-bottom: 0.1875rem;
}

.privacy-receipt-retention {
  margin: 1rem 0 0;
  padding: 0.75rem 0.875rem;
  border-radius: 0.5rem;
  background: #ecfdf5;
  color: #065f46;
}

.privacy-receipt-caveat {
  margin: 0.875rem 0 0;
  color: #64748b;
  font-size: 0.8125rem;
}

/* Inline preview under each free-text field. */

.assessment-privacy-preview {
  margin: 0.5rem 0 1rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #f8fafc;
  font-size: 0.875rem;
}

.assessment-privacy-preview > summary {
  cursor: pointer;
  font-weight: 600;
  color: #1e3a8a;
}

.assessment-privacy-summary {
  margin: 0.5rem 0 0;
  color: #334155;
}

.assessment-privacy-kept {
  margin: 0.375rem 0 0;
  color: #64748b;
  font-size: 0.8125rem;
}

.assessment-privacy-text {
  margin: 0.625rem 0 0;
  padding: 0.625rem;
  max-height: 14rem;
  overflow: auto;
  border-radius: 0.375rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.8125rem;
  color: #1e293b;
}

@media (prefers-color-scheme: dark) {
  .privacy-receipt,
  .assessment-privacy-preview {
    background: #0f172a;
    border-color: #1e3a5f;
    color: #e2e8f0;
  }

  .privacy-receipt-heading,
  .assessment-privacy-preview > summary {
    color: #93c5fd;
  }

  .privacy-receipt-list,
  .privacy-receipt-list li {
    border-color: #1e293b;
  }

  .privacy-receipt-count {
    background: #1e3a8a;
    color: #dbeafe;
  }

  .privacy-receipt-retention {
    background: #052e21;
    color: #6ee7b7;
  }

  .assessment-privacy-text {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
  }
}
