/* report.css — minimalist clinical report.
   Palette: black, white, navy (#0f2a4a). No colored swatches, no gradients.
   Typography: Source Serif (medical-report classic) for headings and body,
   monospace for meta/IDs to feel lab-report-like. */

:root {
  --rp-ink: #101014;
  --rp-muted: #4a5462;
  --rp-line: #d4d8de;
  --rp-line-strong: #101014;
  --rp-navy: #0f2a4a;
  --rp-paper: #fff;
  --rp-page-bg: #f2f3f5;
}

.report-body {
  background: var(--rp-page-bg);
  min-height: 100vh;
  color: var(--rp-ink);
  font-family: 'Source Serif 4', 'Times New Roman', Times, Georgia, serif;
}

.report-topbar {
  background: #fff;
  border-bottom: 1px solid var(--rp-line);
}
.report-topbar-actions {
  margin-left: auto;
  display: flex; gap: 8px; align-items: center;
}

/* ---- The "paper" ---- */
.report-shell {
  padding: 32px 20px 80px;
  display: flex; justify-content: center;
}
.report-doc {
  position: relative;
  width: 100%;
  max-width: 780px;
  background: var(--rp-paper);
  border: 1px solid var(--rp-line);
  border-radius: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  padding: 60px 64px 48px;
  color: var(--rp-ink);
  overflow: hidden;
  line-height: 1.5;
}
/* Draft ribbon reduced to a simple navy tag in the corner. */
.report-ribbon {
  position: absolute;
  top: 24px; right: 24px;
  background: transparent;
  color: var(--rp-navy);
  border: 1px solid var(--rp-navy);
  font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding: 4px 10px;
  border-radius: 2px;
}

.report-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--rp-navy);
  margin: 0 0 6px;
}
.report-eyebrow-inverse {
  color: var(--rp-navy);
}

/* ---- Patient header block ---- */
.report-doc-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--rp-line-strong);
  margin-bottom: 32px;
}
.report-patient-name {
  font-family: inherit;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 0 0 16px;
  color: var(--rp-ink);
  line-height: 1.1;
}
.report-patient-meta {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 8px 40px;
  margin: 0;
  font-size: 12px;
  font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace;
}
.report-patient-meta > div { display: flex; flex-direction: column; }
.report-patient-meta dt {
  color: var(--rp-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10px;
  font-weight: 600;
  margin-bottom: 2px;
}
.report-patient-meta dd { margin: 0; color: var(--rp-ink); font-weight: 500; }
.report-doc-head-right { text-align: right; }
.report-brand-mark { margin: 0 0 6px; display: flex; justify-content: flex-end; }
.report-brand-mark .brand-mark { width: 28px; height: 28px; filter: grayscale(1); }
.report-brand-name {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--rp-ink);
  margin: 0;
}
.report-brand-tag {
  margin: 2px 0 0;
  font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace;
  font-size: 10px;
  color: var(--rp-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---- Snapshot banner — turned into a plain heading strip ---- */
.report-snapshot-banner {
  background: transparent;
  color: var(--rp-ink);
  border-radius: 0;
  padding: 0;
  margin-bottom: 28px;
  border-left: 3px solid var(--rp-navy);
  padding: 4px 0 4px 16px;
}
.report-snapshot-banner::after { display: none; }
.report-snapshot-banner h2 {
  font-family: inherit;
  font-size: 22px;
  font-weight: 600;
  margin: 4px 0 4px;
  line-height: 1.15;
  color: var(--rp-ink);
}
.report-snapshot-banner p {
  margin: 0;
  font-size: 13px;
  color: var(--rp-muted);
  max-width: 500px;
}

/* ---- KPI strip: four columns, thin navy top-rule, no swatches ---- */
.report-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-bottom: 40px;
  border-top: 1px solid var(--rp-line);
  border-bottom: 1px solid var(--rp-line);
}
.kpi-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 18px 16px 16px;
  position: relative;
}
.kpi-card + .kpi-card {
  border-left: 1px solid var(--rp-line);
}
.kpi-swatch { display: none; }
.kpi-value {
  font-family: inherit;
  font-size: 28px;
  font-weight: 700;
  color: var(--rp-ink);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
  line-height: 1;
}
.kpi-label {
  margin: 0;
  font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace;
  font-size: 10px;
  color: var(--rp-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
}

/* ---- Narrative sections — bullet list style ---- */
.report-narrative {
  margin-bottom: 40px;
}
.report-row {
  padding: 22px 0 22px 24px;
  border-top: 1px solid var(--rp-line);
  position: relative;
}
.report-row:first-child { border-top: 0; padding-top: 0; }
/* Little navy square as a bullet, keeps the medical/minimal feel. */
.report-row::before {
  content: "";
  position: absolute;
  left: 0; top: 30px;
  width: 8px; height: 8px;
  background: var(--rp-navy);
}
.report-row:first-child::before { top: 8px; }
.report-row h3 {
  margin: 0 0 4px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--rp-ink);
  letter-spacing: 0.005em;
}
.report-row p {
  margin: 0;
  font-size: 14px;
  color: var(--rp-ink);
  line-height: 1.6;
}
.report-bullets {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  color: var(--rp-ink);
  line-height: 1.65;
  list-style: none;
}
.report-bullets li {
  position: relative;
  padding-left: 6px;
  margin-bottom: 4px;
}
.report-bullets li::marker { content: ""; }
.report-bullets li::before {
  content: "—";
  position: absolute;
  left: -18px; top: 0;
  color: var(--rp-navy);
  font-weight: 700;
}
.report-bullets li:last-child { margin-bottom: 0; }

/* ---- Footer ---- */
.report-doc-foot {
  border-top: 2px solid var(--rp-line-strong);
  padding-top: 20px;
  font-size: 11px;
  color: var(--rp-muted);
  line-height: 1.6;
  font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace;
}
.report-doc-foot p { margin: 0 0 8px; }
.report-doc-foot p strong {
  color: var(--rp-ink);
  font-weight: 700;
}
.report-doc-foot-meta {
  font-size: 10px;
  color: var(--rp-muted);
  letter-spacing: 0.08em;
  margin-top: 10px;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .report-doc { padding: 40px 28px 32px; }
  .report-doc-head { grid-template-columns: 1fr; }
  .report-doc-head-right { text-align: left; }
  .report-brand-mark { justify-content: flex-start; }
  .report-patient-meta { grid-template-columns: 1fr; gap: 10px; }
  .report-kpis { grid-template-columns: 1fr 1fr; }
  .kpi-card + .kpi-card { border-left: 0; }
  .kpi-card:nth-child(2) { border-left: 1px solid var(--rp-line); }
  .kpi-card:nth-child(3), .kpi-card:nth-child(4) { border-top: 1px solid var(--rp-line); }
  .kpi-card:nth-child(4) { border-left: 1px solid var(--rp-line); }
  .report-patient-name { font-size: 26px; }
  .report-ribbon { top: 16px; right: 16px; }
}

/* ---- Print ---- */
@media print {
  .report-body { background: #fff; }
  .report-topbar, .report-topbar-actions { display: none; }
  .report-shell { padding: 0; }
  .report-doc {
    max-width: none;
    box-shadow: none;
    border: 0;
    padding: 24pt 32pt;
    border-radius: 0;
  }
  .report-ribbon { display: none; }
  a[href]::after { content: ""; }
}
