/* ====== PRINT STYLESHEET ======
   Activates only via @media print or <link media="print">.
   Zero effect on screen display.
   ============================== */

/* --- Page setup (standalone at-rules, outside @media) --- */

@page {
  margin: 2cm 2.2cm;              /* generous margins; slightly wider sides */
}

@page :first {
  margin-top: 1cm;                /* first page: tighter top — hero provides spacing */
}


@media print {

  /* ------------------------------------------------
     1. HIDE INTERACTIVE / UI ELEMENTS
     ------------------------------------------------ */

  /* Navigation */
  .hero-nav,
  .hero-nav--fixed,
  .mobile-menu,
  .hero-nav__hamburger {
    display: none !important;
  }

  /* Progress bars */
  .article-progress {
    display: none !important;
  }

  /* Mobile bottom bar & drawers */
  .report-mobile-bar,
  .report-drawer-backdrop,
  .report-drawer {
    display: none !important;
  }

  /* Skip link */
  .skip-link {
    display: none !important;
  }

  /* Right sidebar interactive elements (downloads, share) */
  .report-sidebar {
    display: none !important;
  }

  /* Permalink icons on headings */
  .report-permalink {
    display: none !important;
  }

  /* Contact overlay */
  .contact-overlay {
    display: none !important;
  }

  /* Audio player */
  .report-player {
    display: none !important;
  }

  /* Back bar on articles */
  .article-back-bar {
    display: none !important;
  }

  /* Flow field canvas & video backgrounds */
  #flow-field-canvas,
  .flow-field-container,
  .footer-atmosphere,
  .footer-atmosphere video {
    display: none !important;
  }

  /* Dev controls */
  #flow-field-controls {
    display: none !important;
  }

  /* ------------------------------------------------
     2. SIMPLIFIED FOOTER
     ------------------------------------------------ */

  /* Hide decorative & interactive footer sections */
  .footer-clocks,
  .footer-contact,
  .footer-nav,
  .footer-statements {
    display: none !important;
  }

  /* Keep the copyright bar, restyle for print */
  #footer {
    background: none !important;
    color: var(--color-black) !important;
    margin-top: 1cm !important;
  }

  .footer-body {
    padding: 0.5cm 0 !important;
  }

  .footer-bar {
    border-top: 0.5pt solid #999 !important;
    padding: 0.6cm 0 !important;
    margin-top: 0 !important;
  }

  .footer-bar__copy {
    font-size: 8pt !important;
    color: #666 !important;
    opacity: 1 !important;
  }

  .footer-bar__policies a {
    font-size: 8pt !important;
    color: #666 !important;
    opacity: 1 !important;
    text-decoration: none !important;
  }

  /* Add site URL after footer copyright */
  .footer-bar__copy::after {
    content: ' — diffusion.au';
  }

  /* ------------------------------------------------
     3. LINEARISE LAYOUTS
     ------------------------------------------------ */

  /* Report: collapse 3-column grid to single column */
  .report-content {
    display: block !important;
    max-width: none !important;
    padding: 1cm 0 !important;
  }

  /* Report body: fill width */
  .report-body {
    max-width: none !important;
  }

  /* Article: collapse 2-column grid to single column */
  .article-content {
    display: block !important;
    max-width: none !important;
    padding: 1cm 0 !important;
  }

  /* Article meta: static, not sticky */
  .article-meta {
    position: static !important;
    margin-bottom: 1.5cm;
    padding-bottom: 1cm;
    border-bottom: 0.5pt solid #ccc;
  }

  /* All sticky/fixed → static */
  .report-toc,
  .report-sidebar,
  .article-meta,
  .report-drawer__header {
    position: static !important;
  }

  /* ------------------------------------------------
     4. TABLE OF CONTENTS — static block at top
     ------------------------------------------------ */

  .report-toc {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    margin-bottom: 1.5cm;
    padding-bottom: 1cm;
    border-bottom: 0.5pt solid #ccc;
  }

  /* Hide the small logo mark in TOC (redundant in print) */
  .report-toc__logo {
    display: none !important;
  }

  /* Show all subsections expanded */
  .report-toc__sublist {
    max-height: none !important;
    overflow: visible !important;
    margin: 0.3em 0 !important;
  }

  /* TOC typography — refined for print */
  .report-toc__heading {
    font-size: 11pt !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.6em !important;
    color: #000 !important;
  }

  .report-toc__list > li > a {
    font-size: 9.5pt !important;
    color: #333 !important;
  }

  .report-toc__sublist a {
    font-size: 8.5pt !important;
    color: #555 !important;
  }

  .report-toc__pub-title,
  .report-toc__pub-label {
    color: #333 !important;
  }

  /* ------------------------------------------------
     5. EXPAND COLLAPSED / ANIMATED CONTENT
     ------------------------------------------------ */

  /* Accordions: force open */
  .report-section-expand__content[hidden] {
    display: block !important;
  }

  .report-section-expand__toggle {
    border: none !important;
    border-bottom: 0.5pt solid #ddd !important;
    pointer-events: none;
    padding: 0.6em 0 !important;
    margin-bottom: 0.8em;
  }

  .report-section-expand__action {
    display: none !important;
  }

  /* Scroll-reveal: show everything, no transforms */
  .report-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* Remove any overflow:hidden that could clip content */
  .report-table-wrap {
    overflow: visible !important;
  }

  /* Remove scroll-hint gradient on tables */
  .report-table-wrap::after {
    display: none !important;
  }

  /* ------------------------------------------------
     6. PAGE BREAK MANAGEMENT
     ------------------------------------------------ */

  /* Start major sections on new pages */
  .report-section-break {
    break-before: page;
    break-inside: avoid;
    padding-top: 1cm;
  }

  /* Keep charts together — target the outer wrapper divs (chart-*),
     inner engine containers, grids, tables, figures, callouts */
  [id^="chart-"],
  .chart-container,
  .chart-wrap,
  .chart-grid,
  table,
  figure,
  .report-callout,
  .report-section-expand,
  blockquote {
    break-inside: avoid;
  }

  /* Prevent orphaned lines */
  p {
    orphans: 3;
    widows: 3;
  }

  /* Headings should stay with following content */
  h1, h2, h3, h4, h5, h6 {
    break-after: avoid;
  }

  /* Repeat table headers on every printed page */
  thead {
    display: table-header-group;
  }

  tfoot {
    display: table-footer-group;
  }

  /* ------------------------------------------------
     7. TYPOGRAPHY & COLOUR
     ------------------------------------------------ */

  /* Global: readable base, hyphenation, fallback padding */
  body {
    background: #fff !important;
    color: #000 !important;
    padding: 0.5cm !important;
    -webkit-hyphens: auto;
    hyphens: auto;
  }

  /* Preserve chart colours accurately */
  * {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  /* Body text — fixed pt sizes for consistent print output */
  .report-body p,
  .report-body li,
  .article-body p,
  .article-body li {
    font-size: 10.5pt !important;
    line-height: 1.7 !important;
    letter-spacing: 0.01em;
  }

  /* Headings — clear hierarchy with pt sizes */
  .report-body h2,
  .article-body h2 {
    font-size: 16pt !important;
    line-height: 1.2 !important;
    margin-top: 1.8em !important;
    margin-bottom: 0.5em !important;
  }

  .report-body h3 {
    font-size: 13pt !important;
    line-height: 1.25 !important;
    margin-top: 1.5em !important;
  }

  .report-body h4 {
    font-size: 11.5pt !important;
    line-height: 1.3 !important;
  }

  /* Strong text */
  .report-body p strong,
  .article-body p strong {
    font-weight: 600;
    color: #000 !important;
  }

  /* Italic contextual notes */
  .report-body p em {
    color: #444 !important;
  }

  /* ------------------------------------------------
     8. HERO / TITLE PAGE
     ------------------------------------------------ */

  /* Report hero: generous breathing room */
  .report-hero {
    background-color: #333 !important;
    padding: 2.5cm 0 1.5cm !important;
  }

  .report-hero__inner {
    padding: 0 !important;
  }

  .report-hero__category {
    font-size: 9pt !important;
    letter-spacing: 0.12em !important;
    margin-bottom: 0.8em !important;
  }

  .report-hero__title {
    font-size: 26pt !important;
    line-height: 1.1 !important;
    max-width: none !important;
  }

  .report-byline {
    margin-top: 1.5cm !important;
  }

  /* Article meta: structured title block */
  .article-meta__title {
    font-size: 22pt !important;
    line-height: 1.15 !important;
    color: var(--color-blue) !important;
  }

  .article-meta__category {
    font-size: 8.5pt !important;
    letter-spacing: 0.1em !important;
  }

  /* ------------------------------------------------
     9. SECTION BREAKS — editorial treatment
     ------------------------------------------------ */

  /* Stack label above image for print (instead of side-by-side flex) */
  .report-section-break {
    flex-direction: column !important;
    gap: 0.6cm !important;
  }

  /* Brand-coloured top rule instead of grey background */
  .report-section-break__label {
    flex: none !important;
    background-color: transparent !important;
    border-top: 3pt solid var(--color-blue) !important;
    border-radius: 0 !important;
    padding: 0.8cm 0 0.4cm !important;
  }

  .report-section-break__number {
    font-size: 14pt !important;
    color: var(--color-blue) !important;
    margin-bottom: 0.15em !important;
  }

  .report-section-break__title {
    font-size: 20pt !important;
    line-height: 1.15 !important;
    color: var(--color-blue) !important;
  }

  .report-section-break__title--long {
    font-size: 17pt !important;
  }

  /* Section images: full-width below label, constrained height */
  .report-section-break__img-wrap {
    flex: none !important;
    border-radius: 0 !important;
    height: auto !important;
    max-height: 180px;
    overflow: hidden;
  }

  .report-section-break__image {
    transform: none !important;
    object-fit: cover;
  }

  /* ------------------------------------------------
     10. BLOCKQUOTES
     ------------------------------------------------ */

  .report-body blockquote,
  .article-body blockquote {
    border-left: 3pt solid var(--color-blue) !important;
    margin: 1.5em 0 !important;
    padding: 0.8em 0 0.8em 1.2em !important;
  }

  .report-body blockquote p,
  .article-body blockquote p {
    font-size: 11pt !important;
    line-height: 1.6 !important;
    color: #333 !important;
  }

  /* ------------------------------------------------
     11. TABLES — refined for print
     ------------------------------------------------ */

  .report-body table,
  .article-body table {
    font-size: 8.5pt !important;
    border-top: 1.5pt solid #333;
  }

  .report-body th {
    border-bottom: 1pt solid #333 !important;
    font-size: 8.5pt !important;
    padding: 0.5em 0.6em !important;
  }

  .report-body td {
    padding: 0.4em 0.6em !important;
    border-bottom: 0.5pt solid #ddd !important;
  }

  /* Subtle zebra striping */
  .report-body tbody tr:nth-child(even) {
    background-color: #f8f8f8 !important;
  }

  /* ------------------------------------------------
     12. IMAGE & CHART HANDLING
     ------------------------------------------------ */

  /* Constrain images to page width */
  img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Hero image: reasonable height, clean frame */
  .report-hero-image__inner {
    height: auto !important;
    max-height: 250px;
    overflow: hidden;
    border-radius: 0 !important;
  }

  .report-hero-image img {
    transform: none !important;
  }

  /* Article hero image */
  .article-hero-image {
    overflow: visible !important;
  }

  /* YouTube video embeds: hide in print */
  .article-hero-video {
    display: none !important;
  }

  /* Force all charts to visible state for print */
  .chart {
    opacity: 1 !important;
  }
  .chart .chart__bar-fill,
  .chart .chart__bar-fill--left,
  .chart .chart__bar-fill--right {
    transform: scaleX(1) !important;
    transition: none !important;
  }
  .chart .chart__bar-value,
  .chart .chart__sd-value,
  .chart .chart__sk-value,
  .chart .chart__scatter-dot,
  .chart .chart__scatter-label,
  .chart .chart__slope-label,
  .chart .chart__slope-line,
  .chart .chart__slope-dot,
  .chart .chart__dumbbell-val,
  .chart .chart__dumbbell-gap,
  .chart .chart__dumbbell-bar,
  .chart .chart__dumbbell-dot,
  .chart .chart__cdot-line,
  .chart .chart__cdot-dot,
  .chart .chart__cdot-val,
  .chart .chart__cdot-delta {
    opacity: 1 !important;
    transition: none !important;
  }
  .chart .chart__sd-bar {
    transform: scaleX(1) !important;
    transition: none !important;
  }
  .chart .chart__sk-bar {
    transform: scaleX(1) !important;
    transition: none !important;
  }
  .chart td[data-heat] {
    opacity: 1 !important;
    transition: none !important;
  }
  .chart .chart__scatter-trend {
    stroke-dashoffset: 0 !important;
    transition: none !important;
  }

  /* Chart breathing room */
  .chart-container,
  .chart-wrap,
  [id^="chart-"] {
    margin-top: 1em !important;
    margin-bottom: 1.5em !important;
  }

  /* Chart grids — adequate gap */
  .chart-grid--3x2 {
    gap: 1em !important;
  }

  /* ------------------------------------------------
     13. HOMEPAGE-SPECIFIC
     ------------------------------------------------ */

  /* Hero section: hide flow field, keep headline */
  #hero {
    overflow: visible !important;
  }

  .hero-field-wrapper {
    display: none !important;
  }

  .hero-body {
    display: block !important;
  }

  .hero-content {
    flex: none !important;
    padding: 2rem 0 !important;
  }

  .hero-headline {
    color: var(--color-blue) !important;
  }

  /* ------------------------------------------------
     14. LINKS
     ------------------------------------------------ */

  /* Default: unobtrusive, inherit colour */
  a {
    text-decoration: none !important;
    color: inherit !important;
  }

  /* Body-text links: subtle bottom border */
  .report-body a,
  .article-body a {
    color: #333 !important;
    border-bottom: 0.5pt solid #999;
    text-decoration: none !important;
  }

  /* ------------------------------------------------
     15. GENERAL CLEANUP
     ------------------------------------------------ */

  /* Remove all transitions and animations */
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }

  /* Remove box shadows */
  * {
    box-shadow: none !important;
  }

  /* Remove all rounded corners (cleaner on paper) */
  .report-section-break__img-wrap,
  .report-section-break__label,
  .report-hero-image__inner {
    border-radius: 0 !important;
  }

  /* Generous spacing between report sections */
  .report-body section {
    margin-bottom: 2em !important;
  }

  /* Remove footer massive top margin (scroll-based) */
  #footer {
    margin-top: 1cm !important;
  }
}
