.rp {
  max-width: 760px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1f2328;
  line-height: 1.6;
  counter-reset: rp-sec;
}

.rp-full {
  padding: 24px 16px 48px;
  background: #ffffff;
}

.rp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 2px solid #1f2328;
  margin-bottom: 18px;
}

.rp-header h1 {
  margin: 0 0 6px;
  font-size: 22px;
}

.rp-meta {
  font-size: 12px;
  color: #656d76;
}

.rp-print-btn {
  border: 1px solid #1f2328;
  background: #ffffff;
  color: #1f2328;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.rp-stale {
  background: #fffaeb;
  color: #b54708;
  border: 1px solid #fedf89;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  margin-bottom: 16px;
}

.rp-section {
  padding: 16px 0;
  border-bottom: 1px solid #e5e2dc;
}

.rp-section:last-of-type {
  border-bottom: none;
}

.rp-section h2 {
  font-size: 16px;
  margin: 0 0 10px;
  counter-increment: rp-sec;
  break-after: avoid;
}

.rp-section h2::before {
  content: counter(rp-sec) ". ";
  color: #656d76;
}

.rp-subhead {
  font-size: 13px;
  font-weight: 600;
  color: #656d76;
  margin: 14px 0 8px;
}

.rp-summary-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.rp-label-big {
  font-size: 22px;
  font-weight: 700;
}

.rp-gauge {
  margin: 10px 0;
}

.rp-gauge-track {
  position: relative;
  height: 12px;
  background: #efede8;
  border-radius: 999px;
}

.rp-gauge-interval {
  position: absolute;
  top: 0;
  height: 100%;
  background: rgba(31, 35, 40, 0.25);
  border-radius: 999px;
}

.rp-gauge-marker {
  position: absolute;
  top: -3px;
  width: 5px;
  height: 18px;
  background: #1f2328;
  border-radius: 2px;
  transform: translateX(-50%);
}

.rp-gauge-zones {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #656d76;
  margin-top: 4px;
}

.rp-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  break-inside: avoid;
}

.rp-badge-high {
  border: 2px solid #067647;
  color: #067647;
  background: #ecfdf3;
}

.rp-badge-mid {
  border: 1px solid #b54708;
  color: #b54708;
  background: #fffaeb;
}

.rp-badge-low {
  border: 1px dashed #b42318;
  color: #b42318;
  background: #fef3f2;
}

.rp-badge-unknown {
  border: 1px dotted #656d76;
  color: #656d76;
  background: #f6f8fa;
}

.rp-badge-tag {
  border: 1px solid #d0d7de;
  color: #1f2328;
  background: #f6f8fa;
  font-weight: 500;
}

.rp-table-wrap {
  overflow-x: auto;
}

.rp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.rp-table th,
.rp-table td {
  text-align: left;
  padding: 7px 8px;
  border-bottom: 1px solid #e5e2dc;
  vertical-align: top;
}

.rp-table th {
  color: #656d76;
  font-weight: 600;
  font-size: 12px;
}

.rp-table tr {
  break-inside: avoid;
}

.rp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.rp-card {
  border: 1px solid #e5e2dc;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  break-inside: avoid;
}

.rp-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.rp-card-title {
  font-weight: 700;
  font-size: 14px;
}

.rp-dim {
  font-size: 12px;
  color: #656d76;
  margin-bottom: 6px;
}

.rp-list {
  padding-left: 18px;
  margin: 6px 0;
  font-size: 14px;
}

.rp-list li {
  margin-bottom: 6px;
  break-inside: avoid;
}

.rp-check-demand {
  border-left: 3px solid #1f2328;
  padding-left: 8px;
}

.rp-check-supply {
  border-left: 3px dashed #656d76;
  padding-left: 8px;
}

.rp-vd-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.rp-raw-details {
  margin-top: 16px;
  font-size: 13px;
}

.rp-raw-pre {
  white-space: pre-wrap;
  background: #f6f8fa;
  padding: 10px;
  border-radius: 6px;
  font-family: inherit;
}

@media (max-width: 640px) {
  .rp-grid,
  .rp-vd-grid {
    grid-template-columns: 1fr;
  }
  .rp {
    font-size: 14px;
  }
}

@media print {
  @page {
    size: A4;
    margin: 16mm;
  }
  body {
    background: #ffffff;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .no-print,
  .rp-raw-details {
    display: none !important;
  }
  .rp-full {
    padding: 0;
  }
}
