/* Avishkar Saathi — report print stylesheet (adapted from avishkar-saathi-print.css).
   Loaded with media="print". Scoped to .pdf-doc (the print-only report document). */

:root {
  --navy: #13284B; --ink: #1E2633; --muted: #4A5566; --label: #5A6474; --rule: #D5DBE3;
  --teal: #0E7C74; --teal-dark: #0A5C56; --teal-tint: #E6F3F1;
  --amber: #E8A33A; --amber-text: #A35F00; --high: #9A4A00; --medium-bg: #FDF1DC;
  --font-display: 'Source Serif 4', Georgia, serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

@page { size: A4 portrait; margin: 16mm 15mm 18mm; }
@page :first { margin: 0; }

html, body {
  background: #FFFFFF !important;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* Hide the platform badge / any injected overlay */
body > a, #emergent-badge, [id*="emergent"], [class*="emergent"] { display: none !important; }

.pdf-doc, .pdf-doc * {
  font-variant-ligatures: none !important;
  font-feature-settings: "liga" 0, "clig" 0, "dlig" 0 !important;
}
.pdf-doc { color: var(--ink); font-family: var(--font-body); font-size: 10.5pt; line-height: 1.55; }
.pdf-doc .font-serif, .pdf-doc h1, .pdf-doc h2 { font-family: var(--font-display) !important; }
.pdf-doc .font-mono, .pdf-doc .tag-id, .pdf-doc .tag-grant, .pdf-doc .section-number { font-family: var(--font-mono) !important; }

/* Pagination: nothing splits, nothing truncates */
.pdf-doc .card, .pdf-doc .gap-card, .pdf-doc .next-step, .pdf-doc .qa-item, .pdf-doc .checklist-item,
.pdf-doc .framework-card, .pdf-doc .trl-rung, .pdf-doc .standard-card, .pdf-doc .licence-row,
.pdf-doc figure, .pdf-doc table tr, .pdf-doc .stat-tile, .pdf-doc .pdf-keep {
  break-inside: avoid; page-break-inside: avoid;
}
.pdf-doc h1, .pdf-doc h2, .pdf-doc h3, .pdf-doc .section-banner, .pdf-doc .pdf-head { break-after: avoid; page-break-after: avoid; }
.pdf-doc p, .pdf-doc li { orphans: 3; widows: 3; }
.pdf-doc [class*="clamp"], .pdf-doc .truncate {
  -webkit-line-clamp: unset !important; display: block !important; overflow: visible !important;
  text-overflow: clip !important; max-height: none !important;
}

.pdf-doc .cover { height: 297mm; width: 210mm; overflow: hidden; break-after: page; page-break-after: always; }

/* Hide screen-only UI and progress counters */
.pdf-doc .progress-tracker, .pdf-doc .gaps-addressed, .pdf-doc .met-counter { display: none !important; }

/* Links */
.pdf-doc a { color: var(--teal-dark); text-decoration: none; }
.pdf-doc .raw-url { display: none !important; }
.pdf-doc .applies-to { color: var(--muted) !important; }

/* Typography scale */
.pdf-doc h1 { font-size: 24pt; line-height: 1.1; font-weight: 600; text-wrap: balance; }
.pdf-doc .cover h1 { font-size: 34pt; color: #FFFFFF; }
.pdf-doc h2 { font-size: 17pt; line-height: 1.2; color: var(--navy); font-weight: 600; }
.pdf-doc h3 { font-family: var(--font-body); font-size: 11pt; line-height: 1.35; color: var(--navy); font-weight: 600; }
.pdf-doc .label { font-size: 8.5pt; letter-spacing: 0.08em; text-transform: uppercase; color: var(--label); font-weight: 600; }
.pdf-doc p { text-wrap: pretty; }
.pdf-doc .muted-text { color: var(--muted); }
.pdf-doc small, .pdf-doc .caption, .pdf-doc .footnote { font-size: 9pt; color: var(--label); }

/* Founder-supplied text */
.pdf-doc .founder-text { white-space: normal; }
.pdf-doc .founder-response { font-style: italic; color: var(--muted); }
.pdf-doc .founder-response::before {
  content: "Founder response (verbatim) · "; font-style: normal; font-weight: 600; color: var(--label);
}

/* Light section openers */
.pdf-doc .section-banner { background: none !important; color: var(--navy) !important; padding: 0 0 6pt !important; border: 0 !important; }
.pdf-doc .section-banner .section-number { color: var(--teal); background: none !important; font-weight: 600; }
.pdf-doc .section-banner::after {
  content: ""; display: block; width: 19mm; height: 3px; margin-top: 6pt;
  background: linear-gradient(90deg, var(--amber) 0 30%, var(--navy) 30% 80%, var(--teal) 80% 100%);
}
.pdf-doc .report-section + .report-section { margin-top: 10mm; }
/* keep each section opener with at least ~40mm of its content */
.pdf-doc .section-opener { break-inside: avoid; padding-bottom: 40mm; margin-bottom: -40mm; }
.pdf-doc .report-section[data-break="page"] { margin-top: 0; }

/* Chips — one per item; severity differs in lightness */
.pdf-doc .chip { border: 1px solid transparent; }
.pdf-doc .chip-high, .pdf-doc .chip-fail { background: var(--high); color: #FFFFFF; }
.pdf-doc .chip-medium { background: var(--medium-bg); color: #7A4A00; border-color: var(--amber); }
.pdf-doc .chip-partial { background: var(--medium-bg); color: #7A4A00; }
.pdf-doc .chip-low, .pdf-doc .chip-neutral { background: #EEF1F5; color: var(--muted); }
.pdf-doc .chip-pass { background: var(--teal-tint); color: var(--teal-dark); }
.pdf-doc .chip-current { background: var(--amber); color: var(--navy); }
.pdf-doc .chip-evidence { display: none !important; }

/* Highlighted data */
.pdf-doc .tag-id { background: #EAF0F8; color: var(--navy); border: 1px solid #C9D5E6; }
.pdf-doc .tag-grant { background: var(--teal-tint); color: var(--teal-dark); border: 1px solid #B9DCD7; }
.pdf-doc .tag-trl {
  display: inline-block; border-radius: 3px; padding: 0 5px; font-size: 8.5pt; font-weight: 600;
  background: #FFF6E6; color: var(--amber-text); border: 1px solid #F2D29C; white-space: nowrap;
}

/* TRL ladder: achieved teal · current amber · remaining grey */
.pdf-doc .trl-seg { background: #E4E8EE; }
.pdf-doc .trl-seg.achieved { background: var(--teal); }
.pdf-doc .trl-seg.current { background: var(--amber); color: var(--navy) !important; }

/* Tables */
.pdf-doc table { width: 100%; border-collapse: collapse; }
.pdf-doc thead { display: table-header-group; }
.pdf-doc th { text-align: left; font-size: 8.5pt; text-transform: uppercase; letter-spacing: 0.06em; color: var(--label); border-bottom: 1.5px solid var(--navy); padding: 0 8pt 5pt 0; }
.pdf-doc td { border-bottom: 1px solid var(--rule); padding: 6pt 8pt 6pt 0; vertical-align: top; }
