/* Public browser printing is an actual reading/export surface. These rules
   cannot change the cinematic screen layout or replace a downloadable kit. */
@media print {
  html,
  body {
    height: auto !important;
    overflow: visible !important;
    color: #10201d !important;
    background: #fff !important;
  }

  :is(.app-shell, .editorial-shell, .dx-shell) {
    --paper: #10201d;
    --muted: #40534c;
    --teal-light: #0b665d;
    --copper: #8a4b29;
    --editorial-page: 100%;
    --page: 100%;
    background: #fff !important;
  }

  :is(.app-shell, .editorial-shell) main,
  :is(.app-shell, .editorial-shell) main * {
    color: #10201d !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    animation: none !important;
    transition: none !important;
    filter: none !important;
  }

  :is(.app-shell, .editorial-shell) main {
    width: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    font-size: 10.5pt;
    line-height: 1.5;
  }

  :is(.app-shell, .editorial-shell) main::before {
    display: block;
    margin-bottom: 6mm;
    padding-bottom: 3mm;
    border-bottom: 1px solid #0b665d;
    content: 'EUAIACT · DEMETER FORMATION CONSEIL · www.euaiact.fr';
    color: #0b665d;
    font: 600 9pt/1.4 "Inter Variable", sans-serif;
  }

  :is(.public-header, .public-footer, .skip-link, .privacy-banner, .reader-tools,
      .reader-progress, .reading-toc, .legal-layout > nav, .editorial-hero-actions,
      .editorial-conversion, .related-reading, .strategic-partnership,
      .contextual-resources, .resource-directory-controls, .resource-directory-jumps,
      .resource-directory-back, .resource-preview-frame, .page-hero-folios,
      .page-hero-media, .editorial-kinetic-figure, .conversion-folios,
      .hero-sculpture-stage, .hero-progress-rail, .hero-cinematic-meta,
      .hero-camera, .hero-cursor-glow, .hero-depth-grid, .hero-chromatic-veil,
      .hero-actions, .method-sculpture-camera, .method-progress,
      .method-scroll-rail, .method-interaction-hint, .method-object-legend,
      .method-scroll-hint, .method-cinematic-meta, .ambient-canvas) {
    display: none !important;
  }

  :is(.app-shell, .editorial-shell) :is(button, canvas, video),
  body > :is(.cx-shell, .lm-shell, .dx-lazy-shell),
  body:not(.diagnostic-is-open) > .dx-shell {
    display: none !important;
  }

  :is(.editorial-page-hero, .editorial-hub-hero, .resource-index-hero, .legal-hero,
      .editorial-reading-layout, .legal-layout, .reading-body, .editorial-summary,
      .citation-answer, .chapter-index, .hub-reading-intro, .risk-framework,
      .application-timeline, .editorial-methodology, .resource-directory-guides,
      .resource-directory-tools, .resource-toolkit-panel, .resource-toolkit-copy,
      .resource-paths, .resource-cluster-links, .resource-cluster-links > div) {
    position: static !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    transform: none !important;
  }

  .editorial-page-hero > div:first-child,
  .legal-hero > div {
    margin: 0 !important;
    padding: 0 0 5mm !important;
  }

  :is(.app-shell, .editorial-shell) main :is(h1, h2, h3, h4) {
    max-width: none !important;
    color: #0b665d !important;
    line-height: 1.2 !important;
    break-after: avoid;
  }

  :is(.app-shell, .editorial-shell) main h1 { font-size: 24pt !important; margin: 0 0 4mm !important; }
  :is(.app-shell, .editorial-shell) main h2 { font-size: 17pt !important; margin: 5mm 0 3mm !important; }
  :is(.app-shell, .editorial-shell) main h3 { font-size: 13pt !important; margin: 4mm 0 2mm !important; }
  :is(.app-shell, .editorial-shell) main h4 { font-size: 11pt !important; margin: 3mm 0 2mm !important; }
  :is(.app-shell, .editorial-shell) main :is(p, li, dt, dd) {
    max-width: none !important;
    font-size: 10.5pt !important;
    line-height: 1.5 !important;
    orphans: 3;
    widows: 3;
  }
  :is(.app-shell, .editorial-shell) main p { margin: 0 0 3mm !important; }
  :is(.app-shell, .editorial-shell) main a { color: #0b665d !important; text-decoration: underline; overflow-wrap: anywhere; }
  :is(.app-shell, .editorial-shell) main :is(article, section, figure) { break-inside: auto; }

  :is(.reading-section, .legal-layout article) {
    position: static !important;
    margin: 0 !important;
    padding: 3mm 0 !important;
    border-color: #c9d8d1 !important;
  }
  :is(.reading-section, .legal-layout article) > span { display: none !important; }
  .reading-checklist { margin: 3mm 0 !important; padding: 3mm !important; border-color: #c9d8d1 !important; }
  .reading-note { padding: 3mm !important; margin: 3mm 0 !important; border-color: #0b665d !important; }
  .editorial-summary ol { display: block !important; margin: 0 !important; }
  .editorial-summary li { min-height: 0 !important; padding: 2mm 0 !important; }
  .editorial-summary li b { font-size: 12pt !important; }
  .editorial-summary aside { padding: 3mm !important; margin: 3mm 0 !important; }

  .eeat-strip { width: 100% !important; display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .eeat-strip > div { min-height: 0 !important; padding: 2mm !important; border-color: #c9d8d1 !important; }
  .eeat-strip :is(a, span, strong), .editorial-version :is(span, p) { font-size: 8.5pt !important; }
  .eeat-strip .eeat-attribution-note { padding: 2mm !important; font-size: 8.5pt !important; }
  .editorial-version { margin: 2mm 0 !important; }
  .editorial-visible-breadcrumbs { margin: 0 0 3mm !important; font-size: 8pt !important; }

  .reading-decision-table { margin: 4mm 0 !important; }
  .reading-decision-table > section { width: 100% !important; overflow: visible !important; }
  .reading-decision-table figcaption { font-size: 9pt !important; margin-bottom: 2mm !important; }
  .reading-decision-table figcaption::after { content: none !important; }
  .reading-decision-table table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse;
  }
  .reading-decision-table :is(th, td) {
    padding: 2mm !important;
    border: 1px solid #c9d8d1 !important;
    font-size: 8.5pt !important;
    line-height: 1.4 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
  .reading-decision-table thead { display: table-header-group; }
  .reading-decision-table tr { break-inside: avoid; }

  .editorial-source-rail {
    position: static !important;
    width: 100% !important;
    padding: 4mm !important;
    margin: 5mm 0 !important;
    border: 1px solid #c9d8d1 !important;
    overflow: visible !important;
  }
  .editorial-source-rail :is(a, p, strong, span), .reading-reference { font-size: 9pt !important; }
  :is(.editorial-source-rail, .reading-links, .reading-reference-group, .legal-links, .passport-sources) a[href^="https://"]::after {
    content: ' (' attr(href) ')';
    font-size: 8pt;
    overflow-wrap: anywhere;
    font-weight: 400;
  }
  .editorial-faq { padding: 0 !important; margin: 4mm 0 !important; }
  .editorial-faq details { margin: 0 !important; padding: 2mm 0 !important; break-inside: avoid; }
  .editorial-faq details::details-content { content-visibility: visible !important; height: auto !important; }
  .editorial-faq details > :not(summary) { display: block !important; }
  .editorial-faq summary {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    break-after: avoid;
  }
  .editorial-faq summary :is(span, i) { display: none !important; }
  .editorial-faq summary strong { font-size: 11pt !important; }
  .editorial-faq details > div { padding: 1mm 0 !important; }

  /* Reuse the real five-stage record, and retain its original source links. */
  .editorial-shell .passport-page { padding: 0 !important; }
  .editorial-shell .passport-page .passport-print-record {
    display: block !important;
    padding: 0 !important;
    overflow: visible !important;
    overflow-wrap: anywhere;
  }
  .editorial-shell .passport-page .passport-print-record p { break-inside: auto !important; }
  .editorial-shell .passport-page .passport-sources {
    display: block !important;
    padding: 4mm 0 !important;
    margin: 4mm 0 0 !important;
  }
  .editorial-shell .passport-page .passport-sources div { display: block !important; }
  .editorial-shell .passport-page .passport-sources a { display: block; margin: 2mm 0; font-size: 9pt !important; }

  .app-shell :is(.hero-cinematic-v2, .hero-sticky-stage, .method-section-v4,
      .method-sticky-stage, .method-experience-layout, .method-copy-column,
      .method-act-region, .method-card-viewport, .method-step-card) {
    position: static !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 3mm 0 !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    filter: none !important;
  }
  .app-shell :is(.hero-copy, .hero-content) { position: static !important; width: 100% !important; max-width: none !important; transform: none !important; }
  :is(.app-shell, .editorial-shell) main .reveal {
    opacity: 1 !important;
    visibility: visible !important;
    clip-path: none !important;
    transform: none !important;
  }

  body.diagnostic-is-open:has(.dx-shell) { overflow: visible !important; }
  body.diagnostic-is-open .dx-shell { height: auto !important; min-height: 0 !important; overflow: visible !important; background: #fff !important; box-shadow: none !important; }
  body.diagnostic-is-open .dx-shell * {
    color: #10201d !important;
    text-shadow: none !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }
  body.diagnostic-is-open .dx-shell :is(.dx-main, .dx-results, .dx-result-main, .dx-result-source) {
    position: static !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }
  body.diagnostic-is-open .dx-shell :is(.dx-result-method, .dx-result-intro, .dx-priorities, .dx-result-source) {
    color: #10201d !important;
    background: #fff !important;
  }

  /* Question navigation is .dx-bottom-bar > div in the actual component.
     Keep its disclaimer and the real source panel, remove only controls and
     the mobile duplicate. No answer, explanation or source link is hidden. */
  body.diagnostic-is-open .dx-shell :is(.dx-bottom-bar > div, .dx-topline > button, .dx-source-mobile) {
    display: none !important;
  }
  body.diagnostic-is-open .dx-main:not(.dx-lead-main):not(.dx-result-page),
  body.diagnostic-is-open .dx-shell :is(.dx-question-layout, .dx-question-panel, .dx-question-layout > .dx-source-panel, .dx-bottom-bar) {
    position: static !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    transform: none !important;
  }
  body.diagnostic-is-open .dx-shell .dx-topline {
    position: static !important;
    display: flex !important;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 3mm;
    padding: 0 0 2mm !important;
  }
  body.diagnostic-is-open .dx-shell .dx-progress-number :is(strong, span) { font-size: 11pt !important; }
  body.diagnostic-is-open .dx-shell .dx-status { display: block !important; font-size: 9pt !important; }
  body.diagnostic-is-open .dx-shell .dx-status > i { display: none !important; }
  body.diagnostic-is-open .dx-shell .dx-question-panel > h2 {
    margin: 3mm 0 2mm !important;
    font-size: 17pt !important;
    line-height: 1.2 !important;
    break-after: avoid;
  }
  body.diagnostic-is-open .dx-shell .dx-question-chapter { margin-top: 3mm; font-size: 9pt !important; }
  body.diagnostic-is-open .dx-shell :is(.dx-question-panel > p, .dx-source-panel p, .dx-source-panel small, .dx-consequence p, .dx-bottom-bar > p) {
    margin: 2mm 0 !important;
    font-size: 10pt !important;
    line-height: 1.4 !important;
    orphans: 2;
    widows: 2;
  }
  body.diagnostic-is-open .dx-shell .dx-answer-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 2mm !important;
    width: 100% !important;
    margin: 3mm 0 !important;
  }
  body.diagnostic-is-open .dx-shell .dx-answer-grid > button {
    position: static !important;
    display: grid !important;
    grid-template-columns: 7mm minmax(0, 1fr) 5mm !important;
    gap: 2mm !important;
    min-height: 0 !important;
    padding: 2mm !important;
    overflow: visible !important;
    border: 1px solid #80948a !important;
    background: #fff !important;
    transform: none !important;
    break-inside: avoid;
  }
  body.diagnostic-is-open .dx-shell .dx-answer-grid > button > span {
    font-size: 10pt !important;
    line-height: 1.4 !important;
    overflow-wrap: anywhere;
  }
  body.diagnostic-is-open .dx-shell .dx-answer-grid > button::before { display: none !important; }
  body.diagnostic-is-open .dx-shell .dx-answer-grid > button > i { border-color: #607b6d !important; }
  body.diagnostic-is-open .dx-shell .dx-answer-grid > button.is-selected { border: 2px solid #0b665d !important; }
  body.diagnostic-is-open .dx-shell .dx-answer-grid > button.is-selected > i b { background: #0b665d !important; }
  body.diagnostic-is-open .dx-shell .dx-question-layout > .dx-source-panel {
    margin: 4mm 0 3mm !important;
    padding: 3mm !important;
    border: 1px solid #c9d8d1 !important;
    background: #fff !important;
  }
  body.diagnostic-is-open .dx-shell .dx-source-panel h3 { margin: 2mm 0 !important; font-size: 12pt !important; line-height: 1.3 !important; }
  body.diagnostic-is-open .dx-shell :is(.dx-source-kicker, .dx-panel-label, .dx-consequence span, .dx-source-status strong) { font-size: 9pt !important; }
  body.diagnostic-is-open .dx-shell .dx-source-status { margin: 2mm 0 !important; padding: 1mm !important; border-color: #c9d8d1 !important; }
  body.diagnostic-is-open .dx-shell .dx-source-rule { margin: 2mm 0 !important; background: #c9d8d1 !important; }
  body.diagnostic-is-open .dx-shell .dx-consequence { margin: 2mm 0 0 !important; padding: 2mm 0 0 2mm !important; border-color: #c9d8d1 !important; }
  body.diagnostic-is-open .dx-shell .dx-source-panel a {
    display: block !important;
    min-height: 0 !important;
    margin: 1mm 0 !important;
    padding: 1mm 0 !important;
    color: #0b665d !important;
    font-size: 9pt !important;
    line-height: 1.4 !important;
    overflow-wrap: anywhere;
    text-decoration: underline;
  }
  body.diagnostic-is-open .dx-shell .dx-source-panel a svg { display: none !important; }
  body.diagnostic-is-open .dx-shell .dx-bottom-bar { margin-top: 3mm !important; border-color: #c9d8d1 !important; }

  /* Keep quantitative report bars readable after removing dark surfaces. */
  body.diagnostic-is-open .dx-shell .dx-dimension > i { background: #dce6e4 !important; }
  body.diagnostic-is-open .dx-shell .dx-dimension > i b { background: #0b665d !important; }
}
