/* DNS Security Posture Report (/market/compare/). Layout and the "On this
   page" rail come from page-guides.css; this sheet adds the report parts. */
#compare-status {
  color: var(--txt-3);
  font-size: 0.9rem;
}

.report-header h1 {
  font-size: var(--text-display);
}
/* Edition and coverage wait for the report. */
.report-header .page-meta-chip[hidden] {
  display: none;
}

/* Data sections are wider than prose. */
.report-body .compare-table-wrap,
.report-body .report-distribution {
  max-width: none;
}

/* ── Key findings ─────────────────────────────────────────────────────────── */
.report-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 4px 0 20px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.report-kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 16px 16px 0;
}
.report-kpi + .report-kpi {
  padding-left: 16px;
  border-left: 1px solid var(--border);
}
.report-kpi strong {
  font-family: var(--font-data);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--txt);
  font-variant-numeric: tabular-nums;
}
.report-kpi span {
  font-size: var(--text-compact);
  color: var(--txt-3);
}
.guide-article .prose-section ul.report-findings {
  padding-left: 20px;
}
.report-findings li {
  margin-bottom: 8px;
}

/* ── Tables ───────────────────────────────────────────────────────────────── */
.compare-table-wrap {
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-small);
}
.compare-table th,
.compare-table td {
  text-align: left;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.compare-table thead th {
  color: var(--txt-4);
  font-weight: 700;
  font-size: var(--text-caption);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  border-bottom-color: var(--txt-4);
}
.compare-table tbody th {
  font-weight: 600;
}
.compare-table td {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  color: var(--txt-2);
}
.compare-table th:not(:first-child),
.compare-table td:not(:first-child) {
  text-align: right;
}
.compare-table--small td:first-child {
  white-space: normal;
  font-family: inherit;
}

/* ── Grade distribution ───────────────────────────────────────────────────── */
.report-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 4px 0 16px;
  padding: 0;
  list-style: none;
  font-size: var(--text-caption);
  color: var(--txt-3);
}
.guide-article .prose-section ul.report-legend {
  padding-left: 0;
}
.report-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.report-legend .compare-grade {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.report-distribution {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.report-distribution-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}
.report-distribution-label {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.report-distribution-label strong {
  font-size: var(--text-small);
  color: var(--txt);
}
.report-distribution-label span {
  font-size: var(--text-caption);
  color: var(--txt-4);
}

.compare-grades {
  display: flex;
  min-width: 160px;
  height: 24px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--border);
}
.compare-grade {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 3px;
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}
.compare-grade.grade-aplus,
.compare-grade.grade-a { background: #15803d; }
.compare-grade.grade-b { background: #2563eb; }
.compare-grade.grade-c { background: #a16207; }
.compare-grade.grade-d { background: #c2410c; }
.compare-grade.grade-f { background: #b91c1c; }

/* ── Category breakdown ───────────────────────────────────────────────────── */
.compare-vertical + .compare-vertical {
  margin-top: 24px;
}
.guide-article .prose-section .compare-vertical h3 {
  margin: 18px 0 6px;
  font-size: var(--text-card-title);
}

/* ── About ────────────────────────────────────────────────────────────────── */
.guide-article .prose-section .report-cite {
  padding-left: 14px;
  border-left: 2px solid color-mix(in srgb, var(--primary) 36%, var(--border));
  font-size: var(--text-small);
  color: var(--txt-3);
}
.compare-note {
  color: var(--txt-4);
}
.guide-article .prose-section p.compare-note {
  font-size: var(--text-caption);
}

@media (max-width: 720px) {
  .report-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .report-kpi:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }
  .report-kpi:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }
  .report-distribution-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .report-distribution-label {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
  }
}
