/* VAR report: print / PDF. Light palette always; source notes and disclaimers always included. */
@page { size: A4; margin: 16mm 15mm 18mm; }
@media print {
  :root, :root[data-theme="dark"], :root:not([data-theme="light"]) {
    --paper: #ffffff; --paper-raised: #ffffff; --paper-sunk: #eef1f1; --field: #ffffff; --ink: #191919; --ink-muted: #4f565a;
    --rule: #c9d1d3; --accent: #23272b; --accent-ink: #ffffff; --accent-soft: #e8edee; --clay: #c45c3c; --clay-text: #a8472a; --tension: #a8472a; --tension-soft: #f6e8e1;
    --support: #3f5a5f; --support-soft: #e8edee; --chart-grid: #dde3e4; --chart-quad: #f0f3f3; --chart-quad-2: #f5f6f4; --watermark: rgba(0,0,0,0.045);
    color-scheme: light;
  }
  body { font-size: 10.5pt; line-height: 1.5; }
  .no-print, .toc, .toolbar, .skip, .inspector, .why, .link-btn, .table-alt summary { display: none !important; }
  .table-alt { display: block; }
  .table-alt > .table-scroll { display: block; }
  .layout { display: block; }
  .wrap { max-width: none; padding: 0; }
  .masthead .wrap { padding-block: 0 6mm; }
  .masthead h1 { font-size: 30pt; }
  .sample-banner { background: none; color: var(--ink); border: 1px solid var(--ink); }
  .sample-banner p { padding: 2mm 3mm; }
  .watermark { position: fixed; font-size: 64pt; }
  /* Reader edition flows continuously; only the appendices start on a new page. */
  .report-section { break-before: auto; padding-block: 5mm 3mm; border: 0; border-top: 1px solid var(--rule); }
  #perspective { border-top: 0; }
  .notes, .checks { break-before: page; }
  .prose { font-size: 11pt; gap: 3mm; }
  .behavioural-note, .value-card, .ledger-card, .goal-card, .tension, .lane, .experiment, .src, .note, .check, .periods li, .bar-row, .matrix-chart { break-inside: avoid; }
  .goal-card { break-inside: auto; }
  .goal-head, .goal-verdict, .goal-dl > div { break-inside: avoid; }
  .experiment { background: none; color: var(--ink); border: 1.5px solid var(--ink); }
  .experiment .note-ref a { background: var(--accent-soft); color: var(--accent); }
  .matrix-grid { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); }
  .matrix-chart { overflow: visible; }
  .matrix-svg { min-width: 0; }
  /* Chrome mis-fragments grid items across pages; print cards as plain blocks so they never split. */
  .value-grid { display: block; font-size: 0; }
  .value-card { display: inline-block; vertical-align: top; width: calc(50% - 2.5mm); margin: 0 5mm 4mm 0; font-size: 10.5pt; break-inside: avoid; }
  .value-card:nth-child(2n) { margin-right: 0; }
  .provisional-note { display: none; }
  .value-card > * + * { margin-top: 2.5mm; }
  .lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .masthead .wrap { gap: 3mm; }
  .masthead h1 { font-size: 26pt; }
  .lede { font-size: 12pt; }
  .question--goal, .question--tension { background: none; border: 1px solid var(--rule); }
  .note-ref a { background: none; text-decoration: none; }
  a { color: inherit; text-decoration: none; }
  .notes .note-body { font-size: 9.5pt; }
  .disclaimer { break-before: avoid; border-top: 1px solid var(--rule); max-width: none; }
  h2, h3, h4 { break-after: avoid; }

  /* Summary view: two pages at most, no cover page */
  .view--summary .masthead .wrap { padding-block: 0 3mm; }
  .view--summary .masthead h1 { font-size: 20pt; }
  .view--summary .dek { font-size: 10.5pt; }
  .view--summary .sample-banner p { padding: 1.2mm 2.5mm; font-size: 8.5pt; }
  .view--summary .disclaimer { break-before: auto; padding-block: 3mm 0; gap: 1.5mm; font-size: 8.5pt; }
  .view--summary .disclaimer h2 { font-size: 10pt; }
  .summary { max-width: none; padding-block: 3mm 0; gap: 5mm; font-size: 10pt; }
  .sum-lede { font-size: 13pt; }
  .sum-grid { grid-template-columns: 1fr 1fr; gap: 5mm 8mm; }
  .sum-block, .sum-tensions li { break-inside: avoid; }
  .sum-experiment { background: none; color: var(--ink); border: 1.5px solid var(--ink); padding: 3.5mm 5mm; }
  .sum-experiment .sum-kicker, .sum-experiment .kicker { color: var(--ink-muted); }
  .sum-x-action { font-size: 14pt; }
  .sum-t-head { font-size: 11pt; }
  .sum-tensions { gap: 3mm; }

  /* Phase 1.5 */
  .switcher, .leaning { display: none !important; }
  /* Chrome mis-fragments CSS grids across pages (overlapping text). In print, every multi-column
     group becomes unbreakable inline blocks instead. */
  .report-section, .goal-list, .tension-list, .tension, .prose, .unresolved, .recommit, .experiment, .changes, .change-list, .summary-none { display: block; }
  .report-section > * + *, .tension > * + *, .prose > * + *, .experiment > * + *, .unresolved > * + * { margin-top: 3mm; }
  .goal-list > * + *, .tension-list > * + *, .change-list > * + * { margin-top: 6mm; }
  .tension-body { display: table; width: 100%; table-layout: fixed; }
  .tension-body > div { display: table-cell; vertical-align: top; padding-right: 5mm; }
  .dims { display: table; width: 100%; table-layout: fixed; border-collapse: collapse; background: none; border: 0; }
  .dim { display: table-cell; vertical-align: top; border: 1px solid var(--rule); padding: 3mm; }
  .dim > * + * { margin-top: 2mm; }
  .ledger, .options, .lanes { display: block; font-size: 0; background: none; border: 0; }
  .lane { display: inline-block; vertical-align: top; width: calc(50% - 2mm); margin: 0 4mm 4mm 0; font-size: 10.5pt; border: 1px solid var(--rule); }
  .lane:nth-child(2n) { margin-right: 0; }
  .ledger-card { display: inline-block; vertical-align: top; width: calc(50% - 3mm); margin: 0 6mm 5mm 0; font-size: 10.5pt; }
  .ledger-card:nth-child(2n) { margin-right: 0; }
  .option { display: inline-block; vertical-align: top; width: calc(33.33% - 2mm); margin-right: 3mm; font-size: 10pt; }
  .option:last-child { margin-right: 0; }
  .goal-card { display: block; }
  .goal-card > * + * { margin-top: 3mm; }
  .goal-choice { display: block; }
  .goal-choice > * + * { margin-top: 2.5mm; }
  .option, .change, .version-list { break-inside: avoid; }
  .goal-choice { break-inside: avoid; }
  .changes { break-before: auto; }
  .masthead .wrap { padding-block: 0 4mm; }
  .masthead h1 { font-size: 22pt; }
  .report-section > h2 { font-size: 17pt; }
  .sub-head { font-size: 13pt; margin-top: 3mm; }
  .tension-list { gap: 6mm; }
  .goal-list { gap: 5mm; }
  .versions { break-before: auto; }
  .indicator-table table { min-width: 0; font-size: 8.5pt; }
  .matrix-empty { break-inside: avoid; }
}

@media print { .section-no { break-after: avoid; page-break-after: avoid; } .report-section > h2 + .section-intro { break-before: avoid; } }

/* Phase 1.6: discovery prompts print as a list without the form controls. */
@media print {
  .print-only { display: block !important; }
  .discovery-prompts textarea { display: none !important; }
  .discovery { break-inside: avoid; border-style: solid; }
}
