/* Editorial print theme for the document PDF (and anyone printing the
   web report). Mirrors the Word export's design language
   (artifact-docx-export-v3): pale page wash, navy display type, small
   tracked all-caps headings, large section numerals, gold accents.
   The screen artifact styles are untouched; this sheet loads last and
   overrides for print media only. */

@media print {
  @page {
    margin: 0.72in 0.72in;
    size: letter;
  }

  /* The print canvas (page margin ring) follows the root color
     scheme; without this it renders black from the dark theme. */
  :root {
    color-scheme: light;
  }

  html {
    background: #ffffff;
  }

  /* The theme tokens live on .artifact-shell (the body class), so the
     editorial palette overrides them there, shared with the DOCX
     export. Both font slots move to the clean sans. */
  .artifact-shell {
    color-scheme: light;
    --bg: #eef6ff;
    --surface: #ffffff;
    --surface-strong: #ffffff;
    --text: #1b1f26;
    --text-secondary: #263343;
    --text-muted: #4c5866;
    --border-subtle: #c9d8e8;
    --border-strong: #8fa6be;
    --accent-blue: #0e2841;
    --accent-green: #4c6b5c;
    --accent-yellow: #b0a034;
    --accent-red: #8a3b44;
    --font-prose: Aptos, "Helvetica Neue", Arial, sans-serif;
    --font-ui: Aptos, "Helvetica Neue", Arial, sans-serif;
  }

  html,
  body {
    background: #eef6ff;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Chrome does not paint the body background into the page margin
     ring, so a fixed layer (repeated on every printed page) carries
     the wash to the sheet edge. */
  body::before {
    background: #eef6ff;
    bottom: -1in;
    content: "";
    left: -1in;
    position: fixed;
    right: -1in;
    top: -1in;
    z-index: -1;
  }

  body {
    color: #1b1f26;
    font-family: Aptos, "Helvetica Neue", Arial, sans-serif;
    font-size: 10.5pt;
    line-height: 1.5;
  }

  .artifact-document {
    max-width: none;
    /* Inset the text from the wash edge; left/right run the whole
       document, top/bottom pad the first and last pages. */
    padding: 0.12in 0.55in 0.4in;
  }

  /* --- Masthead (top colophon) ------------------------------------ */

  .artifact-colophon.is-top {
    background: transparent;
    border: 0;
    border-bottom: 1px solid #c9d8e8;
    border-radius: 0;
    margin-bottom: 0;
    padding: 0 0 8pt;
  }

  .artifact-colophon.is-bottom {
    background: transparent;
    border: 0;
    border-top: 1px solid #c9d8e8;
    border-radius: 0;
    padding: 8pt 0 0;
  }

  .artifact-colophon .ac-prep {
    color: #4c5866;
    font-size: 7.5pt;
    letter-spacing: 0.18em;
    text-transform: uppercase;
  }

  .artifact-colophon .ac-prep,
  .artifact-colophon .ac-date {
    font-family: var(--font-ui);
  }

  .artifact-colophon .ac-mark rect {
    /* Navy ramp: the SVG's per-rect opacities step the tone. */
    fill: #0e2841;
  }

  .artifact-colophon .ac-word {
    background: transparent;
    border: 0;
    color: #0e2841;
    font-family: var(--font-ui);
    font-size: 12pt;
    font-weight: 700;
    letter-spacing: 0;
    padding: 0;
    text-transform: none;
  }

  .artifact-colophon .ac-date {
    color: #263343;
    font-size: 7.5pt;
    letter-spacing: 0.18em;
    margin-left: auto;
    text-transform: uppercase;
  }

  /* --- Cover ------------------------------------------------------- */

  .artifact-hero {
    border: 0;
    box-shadow: none;
    break-after: page;
    margin-bottom: 0;
    padding-bottom: 0;
    padding-top: 1.5in;
  }

  .artifact-hero h1 {
    color: #0e2841;
    font-size: 34pt;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.02;
  }

  .artifact-subtitle {
    color: #263343;
    font-size: 9.5pt;
    letter-spacing: 0.14em;
    margin-top: 10pt;
    max-width: none;
    text-transform: uppercase;
  }

  .artifact-dek {
    color: #4c5866;
    font-size: 11.5pt;
    line-height: 1.55;
    margin-top: 12pt;
    max-width: 5.8in;
  }

  /* --- Openers and kickers ----------------------------------------- */

  .section-label,
  .opening-kicker,
  .appendix-kicker,
  .source-register-fold summary,
  .data-table figcaption {
    color: #4c5866;
    font-family: var(--font-ui);
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }

  .opening-kicker,
  .appendix-kicker,
  .section-label {
    color: #263343;
    font-size: 8.5pt;
    font-weight: 700;
  }

  /* --- Sections: numeral over tracked caps title -------------------- */

  .brief-section-label span {
    display: none;
  }

  .brief-section-label strong {
    color: #0e2841;
    display: block;
    font-family: var(--font-prose);
    font-size: 30pt;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1;
  }

  .brief-section h2 {
    color: #263343;
    font-size: 10.5pt;
    font-weight: 700;
    letter-spacing: 0.14em;
    margin-top: 6pt;
    text-transform: uppercase;
  }

  .block-heading,
  .key-findings h3 {
    color: #263343;
    font-size: 9pt;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .artifact-appendix h2 {
    color: #263343;
    font-size: 10.5pt;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  /* --- Callouts: gold intense quote --------------------------------- */

  .callout {
    background: transparent;
    border: 0;
    border-bottom: 1pt solid #b0a034;
    border-top: 1pt solid #b0a034;
    border-radius: 0;
    color: #b0a034;
    margin: 14pt 0.4in;
    padding: 10pt 0.2in;
    text-align: center;
  }

  .callout h3 {
    color: #b0a034;
    font-size: 8.5pt;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }

  .callout p {
    color: #b0a034;
    font-size: 10.5pt;
    font-style: italic;
  }

  /* --- Lists -------------------------------------------------------- */

  .key-findings li::marker,
  .scope-note-list li::marker {
    color: #b0a034;
  }

  /* --- Tables: white header row against the wash --------------------- */

  .data-table,
  .data-table table {
    background: transparent;
    border: 0;
  }

  .data-table th {
    background: #ffffff;
    border: 1px solid #c9d8e8;
    color: #263343;
    font-family: var(--font-ui);
    font-size: 7.5pt;
    font-weight: 700;
    letter-spacing: 0.08em;
    /* The screen table is borderless with zero left padding; bordered
       print cells need symmetric inset. */
    padding: 5pt 7pt;
    text-transform: uppercase;
  }

  .data-table td {
    background: transparent;
    border: 1px solid #c9d8e8;
    color: #1b1f26;
    font-size: 9pt;
    padding: 5pt 7pt;
  }

  .artifact-appendix table th {
    background: #ffffff;
    border: 1px solid #c9d8e8;
    color: #263343;
    padding: 5pt 7pt;
  }

  .artifact-appendix table td {
    background: transparent;
    border: 1px solid #c9d8e8;
    padding: 5pt 7pt;
  }

  /* --- Break and pagination hardening (preserved) -------------------- */

  .artifact-meta div,
  .opening-lead,
  .opening-brief,
  .metric-item,
  .confidence-list article,
  .callout {
    break-inside: avoid;
  }

  .artifact-opening {
    break-inside: avoid;
    margin-bottom: 0.25in;
    page-break-inside: avoid;
  }

  .opening-metrics {
    margin-top: 0;
  }

  .brief-section {
    /* Each numbered section opens at the top of a fresh page, like the
       cover: the numeral + tracked caps title become page openers. */
    break-before: page;
    break-inside: auto;
    display: block;
    margin-bottom: 0.35in;
    page-break-before: always;
    page-break-inside: auto;
  }

  /* The evidence appendix opens on a fresh page too. */
  .artifact-appendix {
    break-before: page;
    page-break-before: always;
  }

  .section-heading-group {
    break-inside: avoid;
    display: block;
    page-break-inside: avoid;
  }

  .brief-section-label {
    break-after: avoid;
    page-break-after: avoid;
  }

  .brief-section h2,
  .block-heading,
  .key-findings h3,
  .callout h3 {
    break-before: avoid;
    break-after: avoid;
    page-break-before: avoid;
    page-break-after: avoid;
  }

  .confidence-section,
  .unknowns-section {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .source-appendix {
    break-before: page;
    font-size: 9pt;
  }

  .source-appendix li {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .data-table {
    break-inside: avoid;
    overflow: visible;
    page-break-inside: avoid;
  }

  .data-table table {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
  }

  .data-table th,
  .data-table td {
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .data-table thead {
    display: table-header-group;
  }

  .data-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  a {
    color: #1b1f26;
    text-decoration: none;
  }

  .scope-note { padding: 14pt 0; gap: 18pt; }
  .scope-note-list li { font-size: 8.5pt; }
}
