/* Sentinel report styles. Used by:
   - /sample-report on the marketing site (rendered on screen)
   - sentinel.endolum.io scan reports (rendered on screen)
   - WeasyPrint PDF export (the same partial, with @page rules)

   The PDF source of truth is ops/sales/outreach/sentinel-msp-reseller/build_sample_pdf.py.
   Match its layout, severity colors, and typography exactly. Do not drift.
*/

:root {
  --r-ink: #16191e;
  --r-ink-warm: #1a1d22;
  --r-plate-deep: #131619;
  --r-paper: #f4f1ea;
  --r-paper-dim: #c4c0b4;
  --r-dim: #8e8b83;
  --r-faint: #555248;
  --r-hairline: #2a2d33;
  --r-rule: #34383e;
  --r-gold: #e8c888;

  --r-sev-critical-bg: #b91c1c;
  --r-sev-critical-fg: #ffffff;
  --r-sev-high-bg:     #ef4444;
  --r-sev-high-fg:     #ffffff;
  --r-sev-medium-bg:   #fd7e14;
  --r-sev-medium-fg:   #ffffff;
  --r-sev-low-bg:      #22c55e;
  --r-sev-low-fg:      #16191e;
  --r-sev-info-bg:     #6b7280;
  --r-sev-info-fg:     #ffffff;

  --r-sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --r-mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;
}

.report {
  font-family: var(--r-sans);
  color: var(--r-paper-dim);
  font-weight: 300;
  line-height: 1.65;
}

.report-mono {
  font-family: var(--r-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* --- Cover --- */

.report-cover {
  padding: 72px 0 56px;
}
.report-cover .eyebrow {
  color: var(--r-gold);
  margin-bottom: 36px;
}
.report-cover h1 {
  font-family: var(--r-sans);
  font-weight: 200;
  font-size: clamp(40px, 5vw, 64px);
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--r-paper);
  margin: 0 0 28px;
  max-width: 22ch;
}
.report-cover .target-line {
  font-family: var(--r-mono);
  font-size: 13px;
  color: var(--r-paper-dim);
  margin: 0 0 4px;
  letter-spacing: 0;
  text-transform: none;
}
.report-cover .scan-date {
  color: var(--r-dim);
  font-family: var(--r-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0 0 40px;
}

.report-summary {
  border-left: 2px solid var(--r-gold);
  padding: 14px 0 14px 22px;
  margin: 28px 0;
}
.report-summary .label {
  color: var(--r-dim);
  margin-bottom: 10px;
}
.report-summary .text {
  color: var(--r-paper);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
}

.report-verdict {
  background: var(--r-ink-warm);
  padding: 22px 26px;
  margin: 28px 0;
}
.report-verdict .label {
  color: var(--r-gold);
  margin-bottom: 12px;
}
.report-verdict .text {
  color: var(--r-paper);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.55;
}

/* --- Severity counters --- */

.report-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--r-hairline);
  border-bottom: 1px solid var(--r-hairline);
  padding: 22px 0;
  margin: 28px 0 36px;
}
.report-stats .cell {
  text-align: center;
}
.report-stats .num {
  color: var(--r-paper);
  font-family: var(--r-sans);
  font-size: 32px;
  font-weight: 200;
  line-height: 1;
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}
.report-stats .lab {
  color: var(--r-dim);
  font-family: var(--r-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.report-colophon {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--r-hairline);
  color: var(--r-dim);
  font-size: 13px;
  line-height: 1.65;
  max-width: 80ch;
}
.report-colophon strong {
  color: var(--r-paper);
  font-weight: 400;
}

/* --- Findings section --- */

.report-section-head {
  color: var(--r-gold);
  font-family: var(--r-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--r-rule);
  padding-bottom: 10px;
  margin: 56px 0 28px;
}

.report-finding {
  margin: 0 0 32px;
  padding: 0 0 28px;
  border-bottom: 1px solid var(--r-hairline);
}
.report-finding:last-of-type {
  border-bottom: none;
}

.report-finding .severity-badge {
  display: inline-block;
  font-family: var(--r-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 4px 11px 5px;
  margin-bottom: 14px;
  background: var(--r-rule);
  color: var(--r-paper);
}
.report-finding .severity-badge.sev-critical { background: var(--r-sev-critical-bg); color: var(--r-sev-critical-fg); }
.report-finding .severity-badge.sev-high     { background: var(--r-sev-high-bg);     color: var(--r-sev-high-fg); }
.report-finding .severity-badge.sev-medium   { background: var(--r-sev-medium-bg);   color: var(--r-sev-medium-fg); }
.report-finding .severity-badge.sev-low      { background: var(--r-sev-low-bg);      color: var(--r-sev-low-fg); }
.report-finding .severity-badge.sev-info     { background: var(--r-sev-info-bg);     color: var(--r-sev-info-fg); }

.report-finding h2 {
  color: var(--r-paper);
  font-family: var(--r-sans);
  font-size: 22px;
  font-weight: 300;
  letter-spacing: -0.018em;
  line-height: 1.3;
  margin: 0 0 14px;
}

.report-finding p {
  margin: 0 0 12px;
  color: var(--r-paper-dim);
  font-size: 15px;
  line-height: 1.7;
}

.report-finding .field-label {
  color: var(--r-gold);
  font-family: var(--r-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 18px 0 6px;
}

.report-finding .technical {
  background: var(--r-plate-deep);
  color: var(--r-paper-dim);
  font-family: var(--r-mono);
  font-size: 12.5px;
  line-height: 1.6;
  padding: 14px 18px;
  margin: 8px 0 0;
  border-left: 2px solid var(--r-rule);
  white-space: pre-wrap;
  word-break: break-word;
}

.report-finding .evidence {
  background: var(--r-plate-deep);
  color: var(--r-paper-dim);
  font-family: var(--r-mono);
  font-size: 12.5px;
  line-height: 1.6;
  padding: 14px 18px;
  margin: 8px 0 0;
  border-left: 2px solid var(--r-gold);
  white-space: pre-wrap;
  word-break: break-word;
}

.report-finding .references {
  color: var(--r-dim);
  font-family: var(--r-mono);
  font-size: 11px;
  margin-top: 14px;
}
.report-finding .references a {
  color: var(--r-paper-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--r-rule);
}
.report-finding .references a:hover {
  color: var(--r-paper);
  border-bottom-color: var(--r-gold);
}

/* --- Next steps --- */

.report-next {
  padding-top: 24px;
}
.report-next h2 {
  color: var(--r-paper);
  font-family: var(--r-sans);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 200;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
}
.report-next ol {
  counter-reset: stepc;
  list-style: none;
  padding: 0;
  margin: 0;
}
.report-next li {
  counter-increment: stepc;
  padding: 18px 0 18px 56px;
  border-top: 1px solid var(--r-hairline);
  color: var(--r-paper-dim);
  font-size: 15px;
  line-height: 1.65;
  position: relative;
}
.report-next li:last-child {
  border-bottom: 1px solid var(--r-hairline);
}
.report-next li::before {
  content: counter(stepc, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 20px;
  color: var(--r-gold);
  font-family: var(--r-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
}

/* --- Action bar (non-print) --- */

.report-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 18px 22px;
  border: 1px solid var(--r-rule);
  margin: 0 0 40px;
  background: var(--r-ink-warm);
}
.report-actions .label {
  color: var(--r-dim);
  font-family: var(--r-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-right: auto;
}
.report-actions a.btn {
  font-family: var(--r-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--r-paper);
  padding: 10px 20px;
  border: 1px solid var(--r-rule);
  text-decoration: none;
  transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
}
.report-actions a.btn:hover {
  border-color: var(--r-gold);
  color: var(--r-paper);
}
.report-actions a.btn.primary {
  background: var(--r-paper);
  color: var(--r-ink);
  border-color: var(--r-paper);
}
.report-actions a.btn.primary:hover {
  background: var(--r-gold);
  border-color: var(--r-gold);
  color: var(--r-ink);
}

/* --- Responsive --- */

@media (max-width: 720px) {
  .report-cover { padding: 48px 0 32px; }
  .report-cover h1 { font-size: 36px; }
  .report-stats { grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 18px 0; }
  .report-stats .num { font-size: 22px; }
  .report-stats .lab { font-size: 9px; letter-spacing: 0.16em; }
  .report-finding h2 { font-size: 19px; }
  .report-finding .technical,
  .report-finding .evidence { font-size: 11.5px; padding: 12px 14px; }
}

/* --- Print / PDF rules ---
   These are picked up by WeasyPrint and by browsers in Print Preview. */

@media print {
  body {
    background: var(--r-ink);
    color: var(--r-paper-dim);
  }
  .report-actions { display: none; }
  .report-finding { page-break-inside: avoid; }
  .report-cover { page-break-after: always; padding-top: 0; }
  .report-next { page-break-before: always; }
}
