/* The screening as a document — the look of the IPO decision brief, on VC Analyst's tokens.
 *
 *   .doc        the paper: white, hairline edge, max-width 880px, 40px side padding
 *   .doc-run    the running header line; .doc-title; .doc-sub; .doc-meta a two-column grid
 *   .doc-h2     numbered section title in navy; .doc-h3 sub-heading in teal
 *   .doc-table  13px, navy header row with white text, hairline grid, numbers right-aligned
 *   .doc-checks the stop-or-go table; .doc-kv two columns + a source chip; .doc-word swatch + word
 *   .doc-brief  the story box before the sections; .doc--brief the denser two-page cut
 *   .doc-cl-grid the decision box, ☑ in ink, ☐ muted
 *
 * The navy and the teal are the document's own colours. No shadows, no hover effects. */

:root { --doc-navy: #1f3552; --doc-teal: #167a86; --doc-hairline-strong: #cfcfd6; --doc-body: #3d3d3d; }

.doc {
  max-width: 960px; margin: 0 auto; padding: 32px 44px 52px;
  background: var(--card); border: 1px solid var(--line); color: var(--doc-body);
  border-radius: 12px; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere;
}

.doc-run {
  display: flex; justify-content: space-between; gap: 16px; padding-bottom: 8px; margin-bottom: 32px;
  border-bottom: 1px solid var(--doc-hairline-strong); font-size: 13px; line-height: 1.4; font-weight: 500; color: var(--muted);
}
.doc-title { margin: 0; font-size: 40px; line-height: 1.15; letter-spacing: -1.5px; font-weight: 700; color: var(--doc-navy); }
.doc-sub { margin: 8px 0 0; font-size: 16px; line-height: 1.55; color: var(--doc-body); }
.doc-meta {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin: 24px 0 0; padding: 8px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.doc-meta-item { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 5px 0; }
.doc-meta dt { font-size: 13px; line-height: 1.55; font-weight: 500; color: var(--muted); }
.doc-meta dd { margin: 0; color: var(--text); }

.doc-sec { margin-top: 36px; scroll-margin-top: 88px; }
.doc-sec:focus { outline: none; }
.doc-sec:focus-visible { outline: 2px solid var(--doc-teal); outline-offset: 8px; }
.doc-h2 { margin: 0 0 12px; font-size: 22px; line-height: 1.3; letter-spacing: -0.3px; font-weight: 700; color: var(--doc-navy); }
.doc-num-mark { font-variant-numeric: tabular-nums; }
.doc-h3 { margin: 24px 0 8px; font-size: 16px; line-height: 1.4; font-weight: 600; color: var(--doc-teal); }
.doc-h4 { margin: 0 0 4px; font-size: 14px; line-height: 1.55; font-weight: 700; color: var(--doc-navy); }
.doc-intro, .doc-p, .doc-note { margin: 0 0 12px; }
.doc-note strong { color: var(--text); font-weight: 700; }
.doc-ul { margin: 0 0 12px; padding-left: 20px; }
.doc-ul li { margin: 2px 0; }
.doc-cap { margin: 8px 0 12px; font-size: 13px; line-height: 1.4; color: var(--muted); }

.doc-brief { padding: 16px 24px; border: 1px solid var(--doc-hairline-strong); border-radius: 8px; background: var(--panel); }
.doc-points { margin: 0; padding: 0; list-style: none; }
.doc-points li { display: grid; grid-template-columns: 170px minmax(0, 1fr); column-gap: 16px; row-gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.doc-points li:first-child { border-top: 0; }
.doc-point-label { font-size: 13px; line-height: 1.55; font-weight: 700; letter-spacing: .2px; color: var(--doc-navy); }
.doc-point-text { color: var(--text); }
.doc-point-text .doc-pg { margin-top: 0; vertical-align: 1px; }
.doc-point-quote { grid-column: 2; font-size: 13px; line-height: 1.4; color: var(--muted); }

.doc-tw { max-width: 100%; overflow-x: auto; margin: 0 0 8px; }
.doc-table { width: 100%; border-collapse: collapse; border: 1px solid var(--doc-hairline-strong); font-size: 13px; line-height: 1.45; font-variant-numeric: tabular-nums; }
.doc-table th, .doc-table td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.doc-table thead th { background: var(--doc-navy); border-color: var(--doc-navy); color: #fff; font-weight: 600; white-space: normal; }
.doc-table tbody th { font-weight: 500; color: var(--text); }
.doc-table:not(.doc-ratios):not(.doc-kv) tbody th { min-width: 150px; }
.doc-table .doc-pgcell { white-space: nowrap; }
.doc-table td { color: var(--doc-body); }
.doc-table .doc-num { text-align: right; }
.doc-table .doc-ctr { text-align: center; }
.doc-table .doc-val { color: var(--text); font-weight: 600; white-space: nowrap; }
.doc-table .doc-val.is-missing { color: var(--muted); font-weight: 400; }
.doc-ratios, .doc-checks { table-layout: fixed; }
.doc-table td.doc-num { white-space: nowrap; }
.doc-kv tbody th { width: 30%; }
.doc-kv .doc-pgcell { width: 28%; white-space: normal; text-align: right; }
.doc-kv .doc-pg { white-space: normal; overflow-wrap: anywhere; word-break: normal; }
.doc-ratios thead th:nth-child(1) { width: 19%; } .doc-ratios thead th:nth-child(2) { width: 9%; }
.doc-ratios thead th:nth-child(3) { width: 31%; } .doc-ratios thead th:nth-child(4) { width: 26%; } .doc-ratios thead th:nth-child(5) { width: 15%; }
.doc-checks thead th:nth-child(1) { width: 34%; } .doc-checks thead th:nth-child(2) { width: 14%; }
.doc-table th, .doc-table td { overflow-wrap: anywhere; }
.doc-table a { color: var(--doc-teal); text-underline-offset: 2px; }
.doc-table tbody tr:nth-child(even) { background: #f7f9fb; }
.doc-wide, .doc-evidence { table-layout: fixed; }
.doc-wide:not(.doc-ratios):not(.doc-kv) tbody th, .doc-evidence:not(.doc-ratios):not(.doc-kv) tbody th { min-width: 0; }
.doc-table .doc-num { overflow-wrap: normal; }
.doc-ratios td, .doc-checks td { overflow-wrap: anywhere; }
.doc-why { display: block; margin-top: 4px; font-size: 12px; line-height: 1.4; color: var(--muted); }

/* Swatch + word; the source chip in mono */
.doc-word { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 500; white-space: nowrap; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; border: 1.5px solid currentColor; box-sizing: border-box; }
.swatch-supported { background: #15803d; border-color: #15803d; }
.swatch-watch { background: #b45309; border-color: #b45309; }
.swatch-risk { background: #b91c1c; border-color: #b91c1c; }
.swatch-none { background: transparent; border-style: dashed; border-color: var(--muted); }
.swatch-unscored { background: transparent; border-color: var(--muted); }
.doc-pg {
  display: inline-block; margin-top: 4px; padding: 0 5px; border: 1px solid var(--line); border-radius: 4px;
  font-family: var(--mono); font-size: 11px; line-height: 1.6; font-weight: 400; letter-spacing: 0; color: var(--muted);
  white-space: normal; overflow-wrap: anywhere; max-width: 100%; vertical-align: 1px;
}
.doc-pg a { color: var(--doc-teal); }
td .doc-pg, th .doc-pg { margin-top: 0; }
.doc-wordcell .doc-pg { margin-top: 4px; }

.doc-cl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 24px; margin-top: 12px; }
.doc-cl { list-style: none; margin: 0; padding: 0; }
.doc-cl li { display: flex; align-items: flex-start; gap: 6px; padding: 2px 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.doc-cl li.is-done { color: var(--text); }
.doc-box { flex: none; font-size: 15px; line-height: 1.25; color: inherit; }
.doc-foot { margin: 48px 0 0; padding-top: 12px; border-top: 1px solid var(--doc-hairline-strong); font-size: 13px; line-height: 1.4; color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The report bar above the paper: brief / full switch, print */
.doc-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; max-width: 960px; margin: 0 auto 22px; }
.doc-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.doc-switch { justify-self: start; }
.doc-switch button { padding: 8px 14px; border: 0; background: transparent; color: var(--muted); font-weight: 500; }
.doc-switch button.on { background: var(--dark); color: #fff; }
.doc-tools { justify-self: end; }
.doc-tools .btn { white-space: nowrap; }
.doc-tools .btn:disabled { opacity: .6; cursor: wait; }
.report-download-error { max-width: 960px; margin: -8px auto 18px; color: var(--bad); font-size: 13px; line-height: 1.5; }
.report-download-error:empty { display: none; }
.doc--overview .doc-sec { margin-top: 28px; }
.doc--overview .doc-run { margin-bottom: 24px; }
.doc--overview .doc-h2 { font-size: 19px; }
.doc--overview .doc-meta { margin-top: 20px; }
.doc-toc { display: flex; flex-wrap: wrap; gap: 7px; margin: 24px 0 32px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.doc-toc > p { flex-basis: 100%; margin: 0 0 5px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .09em; font-weight: 600; }
.doc-toc button { display: inline-flex; gap: 7px; align-items: baseline; padding: 6px 9px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--doc-navy); font: inherit; font-size: 11px; text-align: left; cursor: pointer; }
.doc-toc button:hover { background: #f1f7f8; border-color: var(--doc-teal); }
.doc-toc button span { color: var(--doc-teal); font-variant-numeric: tabular-nums; }
.doc-appendix { border-top: 1px solid var(--line); padding-top: 22px; }
.doc-appendix > summary { cursor: pointer; color: var(--doc-navy); }
.doc-appendix > summary .doc-h2 { display: inline; font-size: 18px; }
.doc-appendix-hint { display: block; margin: 7px 0 0 18px; font-size: 12px; color: var(--muted); }
.doc-appendix-body { padding-top: 22px; }
.doc-appendix-body .doc-p { white-space: pre-wrap; }

@media screen and (max-width: 699px) {
  .doc-bar { gap: 8px; }
  .doc-switch button { padding: 8px 9px; font-size: 12px; }
  .doc-tools .btn { padding: 0 10px; font-size: 12px; }
  .doc { padding: 16px 16px 32px; }
  .doc-title { font-size: 32px; line-height: 1.2; letter-spacing: -1px; }
  .doc-run { flex-direction: column; gap: 2px; }
  .doc-meta { grid-template-columns: minmax(0, 1fr); }
  .doc-cl-grid { grid-template-columns: minmax(0, 1fr); }
  .doc-points li { grid-template-columns: minmax(0, 1fr); }
  .doc-point-quote { grid-column: 1; }
  .doc.doc--brief .doc-meta { grid-template-columns: minmax(0, 1fr); }
  .doc-wide thead, .doc-evidence thead { display: none; }
  .doc-wide, .doc-wide tbody, .doc-wide tr, .doc-wide th, .doc-wide td,
  .doc-evidence, .doc-evidence tbody, .doc-evidence tr, .doc-evidence th, .doc-evidence td { display: block; width: 100%; box-sizing: border-box; }
  .doc-wide tr, .doc-evidence tr { padding: 8px 0; border-bottom: 1px solid var(--doc-hairline-strong); }
  .doc-wide th, .doc-wide td, .doc-evidence th, .doc-evidence td { border: 0; text-align: left !important; }
  .doc-wide [data-th]::before, .doc-evidence [data-th]::before { content: attr(data-th); display: block; color: var(--doc-teal); font-size: 10px; font-weight: 600; margin-bottom: 3px; }
  .doc-checks { table-layout: auto; }
  .doc-checks thead th:nth-child(1) { width: 28%; }
  .doc--overview .doc-kv, .doc--overview .doc-kv tbody,
  .doc--overview .doc-kv tr, .doc--overview .doc-kv th, .doc--overview .doc-kv td { display: block; width: 100%; }
  .doc--overview .doc-kv tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .doc--overview .doc-kv tr:last-child { border-bottom: 0; }
  .doc--overview .doc-kv th, .doc--overview .doc-kv td { border: 0; padding: 0; text-align: left; }
  .doc--overview .doc-kv th { font-weight: 600; margin-bottom: 6px; color: var(--doc-navy); }
  .doc--overview .doc-kv .doc-pgcell { margin-top: 7px; }
}

/* The decision brief keeps the same readable type hierarchy as the full report. */
.doc--brief .doc-pg { border-color: transparent; background: var(--panel); padding: 0 6px; }
.doc--brief .doc-kv tbody th { width: 26%; font-weight: 500; color: var(--doc-body); }
.doc--brief .doc-checks thead th:nth-child(1) { width: 36%; } .doc--brief .doc-checks thead th:nth-child(2) { width: 15%; }
.doc--brief .doc-intro, .doc--brief .doc-cap { color: var(--muted); }
.doc--brief .doc-h2 { font-size: 21px; line-height: 1.3; margin-bottom: 12px; letter-spacing: -0.1px; }
.doc--brief .doc-h3 { font-size: 15px; margin: 20px 0 8px; }
.doc--brief .doc-intro, .doc--brief .doc-p, .doc--brief .doc-note, .doc--brief .doc-ul li, .doc--brief .doc-foot { font-size: 14px; line-height: 1.6; }
.doc--brief .doc-intro { margin-bottom: 8px; }
.doc--brief .doc-table { font-size: 13px; }
.doc--brief .doc-table th, .doc--brief .doc-table td { padding: 8px 10px; }
.doc--brief .doc-sub { margin-bottom: 12px; }
.doc--brief .doc-cl-grid { grid-template-columns: minmax(0, 1fr); }
.doc--brief .doc-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media print {
  @page { size: A4; margin: 10mm 12mm; }
  .nav-wrap, .foot, .doc-bar, .doc-toc, .report-download-error, .verdict, .run-grid, #page-screen, #page-agents, .page-title, .notice { display: none !important; }
  html, body, .page { background: #fff; }
  .memo-wrap { padding: 0; border: 0; background: #fff; }
  .doc { max-width: none; border: 0; padding: 0; font-size: 10pt; }
  .doc-tw { overflow: visible; }
  .doc-table tr { page-break-inside: avoid; }
  .doc-h2, .doc-h3 { page-break-after: avoid; }
  .doc-table thead { display: table-header-group; }
  .doc-appendix > summary { list-style: none; }
  .doc-appendix-hint { display: none; }
  .doc-table thead th, .swatch { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .doc--brief { font-size: 10pt; }
  .doc--brief .doc-title { font-size: 22pt; line-height: 1.2; }
  .doc--brief .doc-sub, .doc--brief .doc-meta, .doc--brief .doc-run { font-size: 9pt; }
  .doc--brief .doc-sec { margin-top: 18px; }
  .doc--brief .doc-h2 { font-size: 13pt; margin: 10px 0 6px; }
  .doc--brief .doc-h3 { font-size: 11pt; margin: 8px 0 4px; }
  .doc--brief .doc-intro, .doc--brief .doc-p, .doc--brief .doc-note, .doc--brief .doc-ul li, .doc--brief .doc-foot { font-size: 10pt; line-height: 1.45; margin: 5px 0; }
  .doc--brief .doc-table { font-size: 9pt; }
  .doc--brief .doc-table th, .doc--brief .doc-table td { padding: 4px 6px; line-height: 1.4; }
  .doc--brief .doc-pg { font-size: 8.5px; }
}

/* The verdict word: one badge on its own line under the title, with the short
 * reason beside it; in the paged print the same word repeats at the top of every page. */
.doc-verdict {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px;
  border: 1px solid var(--doc-hairline-strong); background: #f3f4f6; color: var(--doc-body);
  font-size: 12px; font-weight: 500; line-height: 1.5;
}
.doc-verdict b { font-weight: 700; letter-spacing: 0.4px; }
.doc-verdict--pass { background: #e6f4ea; border-color: #9bd3ad; color: #1e6b3a; }
.doc-verdict--fail { background: #fde8e8; border-color: #f0a3a3; color: #8a1f1f; }
.doc-verdict--none { background: #f3f4f6; border-color: var(--doc-hairline-strong); color: var(--muted); }
.doc-verdict-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 12px 0 0; font-size: 14px; line-height: 1.4; color: var(--doc-body); }
.doc-verdict-why { font-weight: 500; }
.doc-paged { width: 100%; border-collapse: collapse; }
.doc-paged > thead > tr > td, .doc-paged > tbody > tr > td { padding: 0; border: 0; vertical-align: top; }
.doc-page-run {
  display: flex; align-items: center; gap: 12px; padding: 0 0 6px; margin: 0 0 10px;
  border-bottom: 1px solid var(--doc-hairline-strong); font-size: 11px; color: var(--muted);
}
.doc-page-run .doc-verdict { font-size: 11px; padding: 1px 8px; }
@media print {
  .doc-paged thead { display: table-header-group; }
  .doc-page-run { font-size: 8.5pt; }
  .doc-verdict { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* The screening overview: one row per factor, three columns. */
.doc-matrix { table-layout: fixed; font-size: 12px; line-height: 1.42; }
.doc-matrix thead th:nth-child(1) { width: 14%; }
.doc-matrix thead th:nth-child(2) { width: 28%; }
.doc-matrix thead th:nth-child(3) { width: 31%; }
.doc-matrix thead th:nth-child(4) { width: 27%; }
.doc-matrix tbody th { min-width: 0 !important; font-weight: 700; color: var(--doc-navy, #16213A); background: var(--doc-cream, #F6F4EE); }
.doc-matrix tbody th b { display: block; font-size: 12.5px; }
.doc-matrix .doc-mx-sub { display: block; font-weight: 400; color: var(--muted, #6B7280); font-size: 11px; margin-top: 4px; line-height: 1.3; }
.doc-matrix tbody tr { break-inside: avoid; page-break-inside: avoid; }
.doc-mx-list { margin: 0; padding-left: 14px; }
.doc-mx-list li { margin: 0 0 3px; }
.doc-mx-list li::marker { color: var(--doc-accent, #D8782A); }
.doc-mx-empty { margin: 0; color: var(--muted, #6B7280); }
.doc-verdict b { white-space: nowrap; }

/* The screening overview's own finish: a navy header, cream factor cells, and
   colour only on the words that held, are open, or failed. */
.doc-matrix thead th { background: #16213A; border-color: #16213A; }
.doc-matrix tbody th { background: #F3F1EA; color: #16213A; }
.doc-mx-item .doc-lead { font-weight: 700; color: var(--doc-navy, #16213A); }
.doc-tone-good > .doc-lead, .doc-tone-good .doc-lead { color: #2F8F5B; }
.doc-tone-mid > .doc-lead, .doc-tone-mid .doc-lead { color: #D8782A; }
.doc-tone-bad > .doc-lead, .doc-tone-bad .doc-lead { color: #B8432F; }
.doc-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.doc-card { background: #F3F1EA; border-radius: 6px; padding: 8px 10px; font-size: 12px; line-height: 1.4; color: #16213A; }
.doc-card b { display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #6B7280; margin-bottom: 3px; font-weight: 600; }
.doc-card.doc-tone-good b, .doc-card.doc-tone-mid b, .doc-card.doc-tone-bad b { color: #6B7280; }
.doc-closing { display: grid; grid-template-columns: 1fr 1.4fr; gap: 14px; border: 1px solid #16213A; border-radius: 6px; padding: 10px 14px; margin-top: 12px; break-inside: avoid; }
.doc-closing h4 { margin: 0 0 4px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #D8782A; font-weight: 700; }
.doc-closing h4 + ul, .doc-closing h4 + p { margin-top: 0; }
.doc-closing p, .doc-closing li { font-size: 12px; line-height: 1.4; margin: 0 0 4px; color: var(--doc-body, #2B3140); }
.doc-closing ul { margin: 0 0 6px; padding-left: 14px; }
.doc-closing li::marker { color: #D8782A; }
.doc-closing .doc-lead { font-weight: 700; }
@media (max-width: 720px) { .doc-cards, .doc-closing { grid-template-columns: 1fr; } }
