/* DGI — print.css
 *
 * Gated by the <link media="print"> in index.html — deliberately NOT wrapped
 * in an inner `@media print` block as well. Single-gating means the report
 * screen can preview the printed layout by flipping the link's media to
 * "all", which is the only honest way to check a print stylesheet before
 * sending a client a forty-page PDF.
 *
 * The palette override comes FIRST and applies unconditionally to both the
 * root and the dark-theme selector. Without it, a consultant working in dark
 * mode prints forty pages of near-black rectangles, which is the most likely
 * way this product embarrasses someone in front of a board.
 */

:root,
:root[data-theme="dark"],
:root[data-theme="light"] {
  /* White stock rather than bone — bone costs a full-bleed ink wash on every
     page for a tint nobody sees on paper. The ink stays warm so the printed
     document still belongs to the same family as the screen. */
  --bg: #ffffff;
  --sans: Arial, sans-serif;--mono: "Courier New", monospace;--display:Arial,sans-serif;--brand-serif:Georgia,serif;
  --surface: #ffffff;
  --surface-2: #f1f3f5; --surface-3:#e2e7eb;
  --line:#cbd2d9;--line-soft:#e1e5ea;--grid:#cbd2d9;
  --fg:#222a32;--fg-muted:#59646f;--fg-faint:#78838e;
  --brand:var(--theme-print-system,#0000f2);--sys:var(--theme-print-system,#0000f2);--beh:var(--theme-print-behaviour,#007d79);
  --sys-soft:#f1f3f5;--beh-soft:#f1f3f5;--shadow:none;
  --q1:#276b49;--q2:var(--sys);--q3:var(--beh);--q4:#59646f;
  --sym-0:var(--theme-print-topic-0,#4e65b4);--sym-1:var(--theme-print-topic-1,#557974);--sym-2:var(--theme-print-topic-2,#876683);--sym-3:var(--theme-print-topic-3,#886b47);--sym-4:var(--theme-print-topic-4,#6d639b);--sym-5:var(--theme-print-topic-5,#407b87);--sym-6:var(--theme-print-topic-6,#8a5c62);--sym-7:var(--theme-print-topic-7,#6d7645);--sym-8:var(--theme-print-topic-8,#536b87);--sym-9:var(--theme-print-topic-9,#8b604b);
  --good:#276b49;--warn:#885512;--bad:#b12e42;

}

/* Chrome silently drops every fill without this. */
*, *::before, *::after {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

@page {
  size: A4 portrait;
  margin: 16mm 14mm 18mm 14mm;
}

html, body {
  background: #fff !important;
  color: var(--fg);
  font-size: 10.5pt;
  line-height: 1.45;
}

/* ---- chrome off ---- */
.no-print,
.app-header,
.app-footer,
.btn,
.btn-row,
.seg,
textarea,
input,
.chart-tip,
.radar-hits,
.drop,
.scrim,
.drawer,
#toast { display: none !important; }

.print-only { display: block !important; }

/* On-screen preview only. `html.print-preview` is never set during a real
   print run, so this bar cannot leak into the PDF. */
.pp-bar { display: none; }
html.print-preview .pp-bar { display: flex !important; }
html.print-preview .pp-bar .btn { display: inline-flex !important; }

main { padding: 0; }
.wrap { max-width: none; padding: 0; }
.view { animation: none; }

/* ---- structure ---- */
.card {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  background: #fff;
  break-inside: avoid;
}
.stack > * + * { margin-top: 10px; }

.report-section { break-before: page; }
.report-section:first-child { break-before: avoid; }
.report-section > h2 {
  font-size: 15pt;
  border-bottom: 1.5px solid var(--fg);
  padding-bottom: 4px;
  margin-bottom: 12px;
}

h1 { font-size: 22pt; }
h2 { break-after: avoid; }
h3, h4 { break-after: avoid; font-size: 11pt; }
p, li { orphans: 3; widows: 3; }

figure, .chart, .card, .topic-card, .playbook, .banner, .kv, .list-row,
.symptom-card, .cause, .sx-card, .sx-row {
  break-inside: avoid;
}
.presenting { font-size: 10.5pt; }
.cause { background: #fff; border: 1px solid var(--line); }

/* ---- the symptom card on paper ----
   The head grid holds at A4: 182mm of content minus a 60mm axis column still
   leaves room for the title. The details panel is forced open, because on paper
   there is nothing to click and the reader must be able to see every mechanism.
   Same precedent as .chart-collapsible below. */
.sx-card { padding: 10px 12px; }
.sx-title { font-size: 14pt; }
.sx-said { font-size: 10pt; }
.sx-details[hidden] { display: block !important; }
.sx-foot .btn { display: none !important; }
.sx-body { background: none !important; }

/* ---- cover ---- */
.report .cover {
  padding-top: 34mm;
  border-bottom: 3px solid var(--brand);
  padding-bottom: 14mm;
}
.report .cover h1 { font-size: 30pt; margin-bottom: 6px; letter-spacing: -.02em; }

/* ---- charts ----
   Fixed millimetre widths so a chart never spills the A4 content box, and the
   30-axis radar always shares its page with the code legend. */
.radar { width: 150mm !important; max-width: 150mm !important; height: auto; margin: 0 auto; }
.radar.compact { width: 105mm !important; max-width: 105mm !important; }
.barchart { width: 150mm !important; max-width: 150mm !important; height: auto; margin: 0 auto; }
.scatter { width: 140mm !important; max-width: 140mm !important; height: auto; margin: 0 auto; }
.dumbbell { width: 60mm !important; }
.histo { width: 45mm !important; }

.axis-key { columns: 3; column-gap: 8mm; font-size: 8pt; }
.axis-key .key-row { padding: 0.5pt 0; }
.legend { justify-content: center; font-size: 8.5pt; }

/* ---- tables ---- */
table { font-size: 8.5pt; }
thead { display: table-header-group; }
tfoot { display: table-footer-group; }
tbody td { padding: 4px 6px; }
thead th { padding: 4px 6px; }
tbody tr:hover td { background: transparent; }
.table-wrap { overflow: visible; }

/* ---- metrics ---- */
.triad { grid-template-columns: repeat(3, 1fr) !important; gap: 8mm; }
.metric-value { font-size: 26pt !important; }
.grid.g3 { grid-template-columns: repeat(3, 1fr) !important; }
.grid.g4 { grid-template-columns: repeat(4, 1fr) !important; }
.grid.g2 { grid-template-columns: repeat(2, 1fr) !important; }
.grid.pillar-row { grid-template-columns: 1fr !important; }

.chip { border: 1px solid var(--line); background: #fff; }

/* The list view is a small-screen affordance, never part of the document. */
.list-view { display: none !important; }
.chart-collapsible .chart { display: block !important; }

a { text-decoration: none; color: inherit; }

/* The report keeps the same evidence hierarchy, with ink suited to white paper. */
.theme-art-defs{position:absolute;width:0;height:0;overflow:hidden}
.results-overview{display:grid;grid-template-columns:1.15fr 1fr;gap:22px}
.result-reading h2{font-size:15pt;border:0;margin:8px 0}
.result-reading p{font-size:10pt}
.overall-scores{display:flex;flex-direction:column;justify-content:center;gap:16px}
.score-line{display:grid;grid-template-columns:1fr auto;gap:5px}
.score-line strong{font-size:20pt;font-weight:500}
.score-label{font-size:9pt;align-self:center}
.score-track{grid-column:1/-1;height:6px;background:var(--surface-2)}
.score-track i{display:block;height:100%;background:var(--sys)}
.score-line.beh .score-track i{background:var(--beh)}
.score-scale{display:flex;justify-content:space-between;font-size:8pt;color:var(--fg-muted)}
.evidence-strip{display:flex;flex-wrap:wrap;gap:8px 20px;background:var(--surface-2);padding:10px;margin:12px 0;font-size:9pt}
.derived-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin:16px 0}
.derived-metric strong{display:block;font-size:18pt}
.derived-metric p{font-size:9pt;color:var(--fg-muted)}
.topic-findings-header{padding:10px 0}
.topic-findings-header p{font-size:9pt}
.chart-legend-inline{display:flex;gap:16px;font-size:9pt}
.chart-legend-inline .sys{color:var(--sys)}.chart-legend-inline .beh{color:var(--beh)}
.topic-column-labels,.topic-finding{display:grid;grid-template-columns:minmax(0,1fr) 150px 65px;gap:16px;padding:12px 0;border-bottom:1px solid var(--line);break-inside:avoid;text-decoration:none;color:var(--fg)}
.topic-column-labels{font-size:8pt;color:var(--fg-muted)}
.topic-finding-title{display:flex;gap:8px}.topic-dot{height:7px;width:7px;flex:none;margin-top:5px;border-radius:50%;background:var(--topic-color)}
.topic-finding h3{font-size:10pt;margin:0 0 5px}.topic-finding p{font-size:9pt;margin:0}
.topic-pair{display:flex;flex-direction:column;gap:10px;justify-content:center}
.topic-mini-bar{display:grid;grid-template-columns:12px 1fr 23px;gap:7px;align-items:center;font-size:9pt}
.topic-mini-bar .track{height:5px;background:var(--surface-2)}.topic-mini-bar i{display:block;height:100%;background:var(--sys)}
.topic-mini-bar.beh i{background:var(--beh)}.topic-mini-bar .mark{color:var(--sys)}.topic-mini-bar.beh .mark{color:var(--beh)}
.topic-mini-bar b{font-weight:500;text-align:right}
.topic-effectiveness{font-size:17pt;align-self:center}.topic-effectiveness small,.topic-arrow,.topic-column-labels>span:last-child{display:none}
.discussion-card{margin-top:16px;padding:16px;border-left:2px solid var(--sys);background:var(--surface-2)}
.discussion-card h3{font-size:12pt}.discussion-card p{font-size:10pt}
.chart-scroll{overflow:visible}
.appendix-evidence td{padding:4px 7px!important;font-size:8pt;line-height:1.4}
.appendix-evidence .small{font-size:7.5pt}

.report h1,.report h2,.report h3{font-family:var(--sans);text-transform:none;letter-spacing:-.02em}

.radar.compact .radar-labels .axis-label{font-size:25px}
.radar.compact .radar-ticks text{font-size:23px}
/* The refined workspace overview retains its full explanations on paper. */
.results-overview{display:block;padding:14px;border:1px solid var(--line);break-inside:auto}
.results-reading-row{display:grid;grid-template-columns:1.15fr 1fr;gap:22px;align-items:center;break-inside:avoid}
.overall-scores{display:block}
.rating-pair{margin:0;width:100%;min-width:0}
.rating-pair svg{display:block;width:100%;height:auto!important}
.rating-pair-heading{font-size:9pt;color:var(--fg-muted);margin-bottom:10px}
.rating-pair-values{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:7px}
.rating-pair-values b{display:block;font-size:21pt;font-weight:500;line-height:1.2}
.pair-lens{font-size:9pt;display:flex;gap:6px;align-items:center}
.pair-symbol{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--sys)}
.pair-symbol.beh{border-radius:0;transform:rotate(45deg);background:var(--beh)}
.pair-track{stroke:var(--surface-3);stroke-width:3;stroke-linecap:round}
.pair-grid{stroke:var(--line-soft);stroke-width:1}
.pair-connector{stroke:var(--fg-faint);stroke-width:3;stroke-linecap:round}
.pair-system{fill:var(--sys);stroke:var(--surface);stroke-width:1}
.pair-behaviour{fill:var(--beh);stroke:var(--surface);stroke-width:1}
.pair-number{font-family:var(--sans);fill:var(--fg)}
.pair-tick{font-family:var(--sans);fill:var(--fg-muted)}
.metric-definitions{border-top:1px solid var(--line);padding-top:12px;font-size:9pt}
.metric-definitions summary{font-weight:600}
.metric-definitions p{margin:7px 0;break-inside:avoid}
.derived-metrics{padding-top:14px;border-top:1px solid var(--line);break-inside:avoid}
.derived-metric .metric-label{font-size:9pt}
.topic-axis-labels{display:flex;justify-content:space-between;padding-inline:12px}
.topic-effectiveness{text-align:right}
.comparison-mobile{display:none!important}
.comparison-scroll{display:block!important;overflow:visible}
.comparison-chart{width:100%;height:auto!important}
.ws-icon,.ws-nav-scrim,.chart-focus-close{display:none!important}
/* Topic labels stay horizontal in print, just as they do in the workspace. */
@media print{
 .radar-key{display:block;border-top:1px solid #dce2e8;padding-top:12px;margin-top:12px}
 .radar-key h4{font-size:10pt;margin-bottom:8px}
 .radar-key-item{display:grid;grid-template-columns:36px 1fr;column-gap:10px;margin-bottom:7px;font-size:9pt;break-inside:avoid}
 .radar-key-item small{grid-column:2;color:#59646f}
 .radar-key-note{font-size:8pt;color:#59646f}
 .radar-name-key{display:grid;grid-template-columns:1fr 1fr;gap:5px 14px;font-size:8pt}
 .radar-name-key b{margin-right:8px}
}
 .metric-heading{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
 .metric-heading strong{margin:0;font-variant-numeric:tabular-nums}
 .metric-visual{margin:9px 0 6px;min-width:0}
 .metric-plot{position:relative;height:22px;margin-inline:4px;--metric-ink:var(--fg-muted)}
 .metric-track,.metric-fill{position:absolute;left:0;top:9px;height:5px;border-radius:2px}
 .metric-track{width:100%;background:#e3e8ee}
 .metric-fill{background:var(--metric-ink)}
 .metric-tick{position:absolute;top:5px;height:13px;width:1px;background:#dce2e8}
 .metric-endpoint{position:absolute;top:6px;width:11px;height:11px;border-radius:50%;background:#fff;border:2px solid var(--metric-ink);transform:translateX(-50%)}
 .metric-plot-effectiveness .metric-endpoint{background:var(--metric-ink);border-color:#fff;box-shadow:0 0 0 1px var(--metric-ink)}
 .metric-scale{display:flex;justify-content:space-between;font-size:8pt;color:var(--fg-muted)}
 .direction-plot{display:flex;align-items:center;gap:1px;margin-inline:0}
 .direction-segment{display:block;flex:1;min-width:0;height:10px;border-radius:1px;background:#8d99a6}
 .direction-segment.sys{background:var(--sys)}
 .direction-segment.beh{background:var(--beh)}
 .direction-segment.level{background:#fff;box-shadow:inset 0 0 0 1px #8d99a6}
 .direction-visual.is-unavailable .direction-plot{background:#e3e8ee}
 .topic-finding-title{align-items:center}
 .topic-finding h3{margin-bottom:0}


/* The brief has its own one-page composition; full evidence remains paginated. */
body[data-view="brief"] #main>.view{max-width:182mm;margin:0 auto;padding:0}
.executive-brief{display:block;max-width:182mm;margin:0 auto;padding:0;border:0;box-shadow:none;font:9pt/1.45 Arial,sans-serif;color:var(--fg)}
.executive-brief h1,.executive-brief h2,.executive-brief h3{font-family:Arial,sans-serif;text-transform:none;letter-spacing:-.02em;break-after:avoid}
.brief-header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding-bottom:4mm;font-size:7pt;letter-spacing:.08em;color:var(--fg-muted)}
.brief-wordmark{font-family:Georgia,serif;font-size:25pt;color:var(--brand);letter-spacing:-.05em;line-height:1}
.brief-identity{margin:6mm 0}
.brief-identity h1{font-size:23pt;line-height:1.1;margin:0 0 2mm;overflow-wrap:anywhere}
.brief-identity p{font-size:8pt;margin:0;color:var(--fg-muted)}
.brief-sample{display:block;font-size:7pt;margin-top:1mm;color:var(--fg-muted)}
.brief-pattern .micro{font-size:7pt;letter-spacing:.08em;color:var(--fg-muted)}
.brief-pattern h2{font-size:17pt;line-height:1.25;margin:2mm 0}
.brief-pattern p{font-size:9pt;line-height:1.5;margin:0;color:var(--fg-muted)}
.brief-ratings{margin:5mm 0 2mm}
.brief-ratings .rating-pair-heading{font-size:8pt;margin-bottom:2mm}
.brief-ratings .rating-pair-values b{font-size:22pt}
.brief-ratings .rating-pair svg{max-height:15mm}
.brief-measures{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6mm;padding:3mm 0 5mm;border-bottom:1px solid var(--line)}
.brief-measures section{min-width:0}
.brief-measures section>span{font-size:8pt;display:block;color:var(--fg-muted)}
.brief-measures strong{font-size:21pt;font-weight:500;line-height:1.3;display:block;margin:1mm 0;letter-spacing:-.04em;font-variant-numeric:tabular-nums}
.brief-measures .metric-visual{margin:1mm 0 0}
.brief-measures .metric-scale{font-size:6.5pt;line-height:1.35}
.brief-section-heading{display:flex;justify-content:space-between;align-items:baseline;gap:5mm;margin-top:5mm}
.brief-section-heading h2{font-size:13pt;margin:0}
.brief-section-heading>span{font-size:7pt;color:var(--fg-muted)}
.brief-topic{display:grid;grid-template-columns:6mm minmax(0,1fr) 31mm;gap:4mm;padding:4mm 0;border-bottom:1px solid var(--line-soft);align-items:center;break-inside:avoid}
.brief-rank{font-size:8pt;color:var(--fg-muted);align-self:start;padding-top:1mm}
.brief-topic h3{font-size:10pt;line-height:1.35;margin:0 0 1mm}
.brief-topic p{font-size:8pt;margin:0;color:var(--fg-muted);line-height:1.35}
.brief-topic-values{display:grid;grid-template-columns:1fr auto;gap:.5mm 3mm;text-align:right;align-items:center;font-variant-numeric:tabular-nums}
.brief-topic-values>span{grid-row:span 2;font-size:7pt;color:var(--fg-muted)}
.brief-topic-values>b{font-size:17pt;font-weight:500;line-height:1.2}
.brief-topic-values>small{font-size:6pt;color:var(--fg-muted)}
.brief-footer{border:0;margin:4mm 0 0;font-size:7pt;line-height:1.45;color:var(--fg-muted)}
.brief-footer p{margin:2mm 0 0}
.brief-footer .brief-coverage{font-size:7.5pt;color:var(--fg);font-weight:600}
.brief-footer .brief-caution{font-weight:600;color:var(--warn)}
.topic-finding-shell{display:block}
button.radar-key-item{background:none;border:0;text-align:left;font-family:inherit;color:inherit;width:100%}
.analysis-mark{opacity:1!important;animation:none!important;transition:none!important}
.analysis-subsection{border:0;padding:0;background:none;margin:0}
.skip-link{display:none!important}
html.print-preview .pp-bar{top:0;margin:0 0 24px}
.focus-marker{display:none!important}
@media print{html.print-preview .pp-bar{display:none!important}}
