/* Match the original health-profile form and its shared .ra-input controls. */
.community-cvd {
  min-width: 0;
  padding: 0 10px 18px;
  color: #303133;
  font-size: 14px;
  line-height: 1.5;
}
.community-cvd h1 { margin: 0 0 4px; font-size: 18px; }
.community-cvd h2 { margin: 0 0 8px; font-size: 15px; }
.community-cvd p { margin: 4px 0 8px; overflow-wrap: anywhere; }
.community-cvd .mute, .community-cvd small { color: #606266; font-size: 13px; }
.community-cvd .cvd-heading p { margin: 0; }
.community-cvd details { margin: 8px 0 12px; font-size: 13px; }
.community-cvd summary { width: fit-content; cursor: pointer; color: #365f84; }
.community-cvd details[open] summary { margin-bottom: 6px; }
.community-cvd .cvd-section { margin: 0 0 18px; container-type: inline-size; }
.community-cvd .cvd-section h2 { border-bottom: 1px solid #e4e7ed; padding-bottom: 5px; }
.community-cvd .cvd-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
  margin: 10px 0 16px;
}
.community-cvd label { display: block; color: #50545a; font-size: 13px; font-weight: 500; }
.community-cvd label .ra-input { display: block; margin-top: 4px; }
.community-cvd small { display: block; font-weight: normal; overflow-wrap: anywhere; }
.community-cvd input[readonly] { background: #f5f7fa; }
.community-cvd [aria-invalid="true"] { border-color: #b83e31; }
.community-cvd .cvd-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.community-cvd .cvd-report-picker select { flex: 1 1 230px; min-width: 0; max-width: 100%; }
.community-cvd button {
  padding: 7px 14px;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  background: white;
  color: #303133;
  font: inherit;
  cursor: pointer;
}
.community-cvd button:disabled { opacity: .55; cursor: default; }
.community-cvd .check { margin: 12px 0 8px; }
.community-cvd .cvd-actions button { padding: 8px 22px; color: white; border: 0; }
.community-cvd .cvd-actions .btn-primary { background: #337bc4; }
.community-cvd .cvd-actions .save { background: #38834e; }
.community-cvd .cvd-error { color: #ad3627; }
.community-cvd .notice, .community-cvd .cvd-ai {
  padding: 8px 12px;
  margin: 8px 0;
  background: #f4f7ff;
  border: 1px solid #d9e2ff;
  border-radius: 6px;
  overflow-wrap: anywhere;
}
.community-cvd .result-card { margin: 0 0 20px; padding: 16px; border: 1px solid #dcdfe6; border-radius: 8px; }
.community-cvd .cvd-circle {
  display: grid; place-items: center; flex: none;
  width: 72px; height: 72px; border-radius: 50%;
  background: #526f84; color: white; font-size: 18px; font-weight: bold;
}
.community-cvd .high { background: #ae4840; }
.community-cvd .moderate { background: #946c27; }
.community-cvd .low { background: #46835a; }
.community-cvd .cvd-history { margin-top: 18px; overflow-x: auto; }
.community-cvd .cvd-history table { width: 100%; border-collapse: collapse; }
.community-cvd .cvd-history th, .community-cvd .cvd-history td {
  padding: 6px 8px; border-bottom: 1px solid #ebeef5; text-align: left; font-size: 13px;
}
.community-cvd .modal-overlay, .cv-review .modal-overlay { position: fixed; inset: 0; display: grid; place-items: center; padding: 12px; background: #0007; z-index: 1100; }
.community-cvd .modal-panel, .cv-review .modal-panel { width: min(650px, 100%); max-height: 85vh; overflow: auto; padding: 20px; border-radius: 10px; background: white; }
@container (max-width: 540px) {
  .community-cvd .cvd-grid { grid-template-columns: minmax(0, 1fr); }
  .community-cvd .cvd-report-picker select { flex-basis: 100%; }
}

.community-cvd .modal-panel, .cv-review .modal-panel {width:min(820px,100%); box-sizing:border-box}
.cvd-report-sheet {
  box-sizing:border-box; max-width:185mm; margin:0 auto; padding:clamp(16px,4%,34px);
  background:#fff; color:#283648; border:1px solid #dce1e9;
  font:14px/1.65 "Microsoft YaHei",sans-serif; overflow-wrap:anywhere;
  print-color-adjust:exact; -webkit-print-color-adjust:exact;
}
.cvd-report-sheet > header {text-align:center; border-bottom:3px solid #667eea; padding:0 0 12px; margin:0 0 12px}
.cvd-report-sheet > header h1 {font-size:23px; color:#273956; margin:0 0 5px}
.cvd-report-sheet p {margin:4px 0 8px; line-height:1.65; color:inherit}
.cvd-report-sheet header p,.cvd-report-sheet .sheet-source,.cvd-report-sheet .sheet-note {font-size:13px;color:#536577}
.cvd-report-sheet .sheet-result {display:flex;align-items:center;gap:16px;margin:14px 0;padding:14px;background:#f4f6fb;border:1px solid #dce1e9;break-inside:avoid}
.cvd-report-sheet .sheet-score {display:grid;place-items:center;min-width:64px;height:64px;padding:0 4px;box-sizing:border-box;border-radius:50%;background:#49647d;color:white;font-size:17px}
.cvd-report-sheet .sheet-score.high {background:#a54a42}
.cvd-report-sheet .sheet-score.moderate {background:#89631f}
.cvd-report-sheet .sheet-score.low {background:#397453}
.cvd-report-sheet .sheet-result h2 {font-size:18px;margin:0}
.cvd-report-sheet .sheet-ranges {margin:8px 0 12px;break-inside:avoid;font-size:14px}
.cvd-report-sheet > h3 {margin:18px 0 8px;padding:5px 12px;font-size:16px;background:#edf0fc;border-left:4px solid #667eea;color:#2c3e50}
.cvd-report-sheet table {width:100%;border-collapse:collapse}
.cvd-report-sheet th,.cvd-report-sheet td {padding:5px 12px;border:1px solid #d9dce3;text-align:left}
.cvd-report-sheet th {width:44%;background:#f5f6f8;font-weight:500}
.cvd-report-sheet :is(h1,h2,h3,h4,h5){break-after:avoid}
.cvd-report-sheet tr,.cvd-report-sheet li {break-inside:avoid}
.cvd-report-sheet p {orphans:2;widows:2}
.community-cvd .report-tools {margin:0 0 12px}
.community-cvd-print {display:none}
@media print {
  body:has(>.community-cvd-print)>:not(.community-cvd-print) {display:none!important}
  body:has(>.community-cvd-print),html:has(.community-cvd-print) {overflow:visible!important;height:auto!important}
  body>.community-cvd-print {display:block!important;width:100%;margin:0 auto;overflow:visible}
}
