/* Melexsoft document style for the audit and report (screen preview, public share link and PDF).
   Self-contained: read into the document layout, so it works from a file:// URL in headless Chrome. */
.doc { --ink: #0a0a0a; --muted: #525252; --faint: #737373; --line: #e5e5e5; --soft: #f5f5f5; --brand: #bc1818; --brand-soft: #fbeaea;
       --good: #0ca30c; --warn: #d98a00; --crit: #d03b3b;
       font-family: "Mona Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; color: var(--ink); background: #fff;
       font-size: 10.5pt; line-height: 1.55; -webkit-font-smoothing: antialiased; }
.doc * { box-sizing: border-box; }
.doc h1, .doc h2, .doc h3 { font-variation-settings: "wdth" 125; font-weight: 600; letter-spacing: -0.01em; margin: 0; color: var(--ink); }
.doc h1 { font-size: 25pt; line-height: 1.15; }
.doc h2 { font-size: 14.5pt; margin: 26pt 0 8pt; padding-top: 12pt; border-top: 1px solid var(--line); break-after: avoid; }
.doc h3 { font-size: 11pt; margin: 14pt 0 4pt; break-after: avoid; }
.doc p { margin: 0 0 8pt; max-width: 70ch; color: var(--muted); }
.doc p b, .doc p strong { color: var(--ink); font-weight: 600; }
.doc .eyebrow { font-variation-settings: "wdth" 125; font-size: 8.5pt; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); }
.doc-head { display: flex; align-items: center; justify-content: space-between; gap: 16pt; padding-bottom: 14pt; border-bottom: 2px solid var(--ink); margin-bottom: 22pt; }
.doc-head svg { height: 22pt; width: auto; display: block; }
.doc-head .meta { text-align: right; font-size: 8.5pt; color: var(--faint); line-height: 1.4; }
.doc-head .meta b { color: var(--ink); font-weight: 600; }
.doc-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 20pt; margin-bottom: 16pt; }
.doc-title .lead { font-size: 11.5pt; color: var(--muted); margin-top: 6pt; max-width: 56ch; }
.doc .kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8pt; margin: 14pt 0 6pt; }
.doc .kpi { border: 1px solid var(--line); border-radius: 8pt; padding: 9pt 11pt; break-inside: avoid; }
.doc .kpi .label { font-size: 8pt; color: var(--faint); }
.doc .kpi .value { font-variation-settings: "wdth" 125; font-size: 17pt; font-weight: 600; line-height: 1.2; }
.doc .kpi .foot { font-size: 8pt; color: var(--faint); }
.doc table { width: 100%; border-collapse: collapse; margin: 6pt 0 10pt; font-size: 9.5pt; }
.doc th { text-align: left; font-weight: 600; font-size: 8pt; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); padding: 5pt 8pt 5pt 0; border-bottom: 1px solid var(--ink); }
.doc td { padding: 6pt 8pt 6pt 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc tr { break-inside: avoid; }
.doc .num { text-align: right; white-space: nowrap; }
.doc .tag { display: inline-block; border-radius: 4pt; padding: 1pt 6pt; font-size: 8pt; font-weight: 600; white-space: nowrap; }
.doc .tag.critical { background: var(--brand-soft); color: var(--brand); }
.doc .tag.warning { background: #fdf4e1; color: #92400e; }
.doc .tag.good { background: #eaf6ea; color: #166534; }
.doc .tag.plain { border: 1px solid var(--line); color: var(--muted); font-weight: 500; }
.doc .bar { height: 5pt; border-radius: 3pt; background: var(--soft); overflow: hidden; min-width: 90pt; }
.doc .bar span { display: block; height: 100%; border-radius: 3pt; }
.doc .score { display: flex; align-items: center; gap: 14pt; }
.doc .score .counts { display: grid; grid-template-columns: auto auto; gap: 2pt 12pt; font-size: 9.5pt; }
.doc .two { display: grid; grid-template-columns: 1fr 1fr; gap: 20pt; }
.doc .note { font-size: 8.5pt; color: var(--faint); }
.doc-foot { margin-top: 26pt; padding-top: 8pt; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 8pt; color: var(--faint); }
.doc-foot b { color: var(--brand); font-weight: 600; }
@page { size: A4; margin: 16mm 16mm 18mm; }
@media print { .doc { font-size: 10pt; } }
