﻿/* =========================================================================
   PRODUCT STUDY  -  PRINT STYLESHEET
   Clean, professional, white-background engineering report output
   ========================================================================= */

/* === PAGE SETUP === */
@page {
  size: A4 portrait;
  margin: 22mm 18mm 22mm 18mm;
}

@page :first {
  margin: 0;
}

/* === COVER PAGE === */
.ps-print-cover {
  display: none; /* Hidden on screen */
}

@media print {

  /* ── FORCE BACKGROUND GRAPHICS (auto-enables without checkbox) ── */
  * {
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  /* ── REMOVE ALL SHADOWS FOR CLEAN PRINT ─────────────────── */
  *,
  *::before,
  *::after {
    box-shadow: none !important;
    text-shadow: none !important;
  }
  img,
  .ps-fig-card,
  .ps-insight,
  .ps-param-cell,
  .ps-plat-card,
  .ps-scope-row {
    filter: none !important;
  }

  /* ── HIDE ELEMENTS NOT NEEDED IN PRINT ──────────────────── */
  /* Collapsible cards (duplicated by flat print methodology/summary) */
  .ps-collapsible-card,
  /* Software Platforms section (covered by closer) */
  .ps-platforms-section,
  /* Navigation sidebar */
  .ps-sidebar,
  /* Hero section (replaced by cover page) */
  .ps-hero-wrapper,
  /* Outcomes bar in hero */
  .ps-outcomes-bar,
  /* Global site header & footer */
  #global-header,
  #global-footer,
  /* FAB actions, progress bar, back-to-top */
  .ps-fab-actions,
  .ps-progress-bar,
  .ps-back-top,
  /* Lightbox overlay */
  .ps-lightbox,
  /* Any lingering dark-mode or interactive-only elements */
  .ps-lens,
  .ps-kbd-hints,
  .ps-toast,
  /* Summary strip inside hero (replaced by flat methodology) */
  .ps-summary-strip,
  /* Preview bar chips on scope card */
  .ps-preview-bar {
    display: none !important;
  }

  /* ── PRINT PAGINATION WRAPPER ───────────────────────────────── */
  .ps-print-table-wrapper {
    display: table !important;
    width: 100%;
    border-collapse: collapse;
    border: none;
  }
  .ps-print-table-wrapper > thead {
    display: table-header-group !important;
  }
  .ps-print-table-wrapper > tfoot {
    display: table-footer-group !important;
  }
  .ps-print-table-wrapper > tbody {
    display: table-row-group !important;
  }
  .ps-print-table-wrapper > thead > tr > td,
  .ps-print-table-wrapper > tfoot > tr > td,
  .ps-print-table-wrapper > tbody > tr > td {
    padding: 0;
    border: none;
  }
  .ps-print-header-space {
    display: block !important;
    height: 18mm !important;
  }
  .ps-print-footer-space {
    display: block !important;
    height: 18mm !important;
  }

  /* ── Running Header (fixed, repeats every page  -  Chrome/Edge) ── */
  .ps-print-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0 !important;
    left: 0;
    right: 0;
    height: 14mm;
    padding: 0 0;
    border-bottom: 0.5pt solid #e2e8f0;
    background: #ffffff !important;
    z-index: 9999;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .ps-print-header-logo-link {
    display: inline-flex;
    text-decoration: none !important;
  }

  .ps-print-header-logo {
    width: 28px;
    height: auto;
  }

  .ps-print-header-right {
    text-align: right;
  }

  .ps-print-header-type {
    font-family: 'Inter', sans-serif;
    font-size: 6.5pt;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8 !important;
  }

  .ps-print-header-study {
    font-family: 'Inter', sans-serif;
    font-size: 7pt;
    font-weight: 600;
    color: #334155 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* ── Running Footer (fixed, repeats every page) ──────────── */
  .ps-print-footer {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    bottom: 0 !important;
    left: 0;
    right: 0;
    height: 12mm;
    padding: 0 0;
    border-top: 0.5pt solid #e2e8f0;
    background: #ffffff !important;
    z-index: 9999;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .ps-print-footer-left {
    font-family: 'Inter', sans-serif;
    font-size: 6.5pt;
    color: #94a3b8 !important;
  }

  .ps-print-footer-left a {
    color: #0a58ca !important;
    text-decoration: none !important;
  }

  .ps-print-footer-dot {
    margin: 0 4px;
  }

  .ps-print-footer-right {
    font-family: 'Inter', sans-serif;
    font-size: 6.5pt;
    color: #94a3b8 !important;
  }

  .ps-print-cover {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    page-break-after: always;
    background: #ffffff !important;
    color: #0a1628;
    text-align: center;
    padding: 30mm 25mm;
    box-sizing: border-box;
  }

  .ps-print-cover-topbar {
    font-family: 'Inter', sans-serif;
    font-size: 7pt;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #94a3b8 !important;
    margin-bottom: 32px;
  }

  .ps-print-cover-hero {
    max-width: 280px;
    max-height: 220px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 28px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .ps-print-cover-logo {
    width: 32px;
    height: auto;
    vertical-align: middle;
    margin-right: 6px;
  }

  .ps-print-cover-rule {
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #0a58ca, #8b5cf6, transparent);
    margin: 0 auto 28px auto;
    border: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .ps-print-cover-title {
    font-family: 'Outfit', sans-serif;
    font-size: 26pt;
    font-weight: 800;
    line-height: 1.15;
    color: #0a1628 !important;
    margin-bottom: 12px;
    max-width: 420px;
  }

  .ps-print-cover-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 10pt;
    color: #475569 !important;
    line-height: 1.6;
    max-width: 380px;
    margin-bottom: 28px;
  }

  .ps-print-cover-scope {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
  }

  .ps-print-cover-scope span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 8pt;
    font-weight: 600;
    color: #64748b !important;
    padding: 3px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
  }

  .ps-print-cover-date {
    font-family: 'Inter', sans-serif;
    font-size: 8pt;
    color: #94a3b8 !important;
    margin-bottom: 32px;
  }

  .ps-print-cover-footer {
    margin-top: auto;
    text-align: center;
  }

  .ps-print-cover-footer-rule {
    width: 40%;
    height: 1px;
    background: #cbd5e1;
    margin: 0 auto 12px auto;
    border: none;
  }

  .ps-print-cover-org {
    font-family: 'Inter', sans-serif;
    font-size: 9pt;
    font-weight: 600;
    color: #334155 !important;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }

  .ps-print-cover-url {
    font-family: 'Inter', sans-serif;
    font-size: 8pt;
    color: #0a58ca !important;
    text-decoration: none !important;
  }

  /* ── Methodology & Summary (flat layout) ─────────────────── */
  .ps-print-methodology {
    display: block !important;
    page-break-before: always;
    page-break-after: always;
    padding: 0 !important;
  }

  .ps-print-meth-heading {
    font-family: 'Outfit', sans-serif;
    font-size: 14pt;
    font-weight: 700;
    color: #0a1628 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #0a58ca;
    padding-bottom: 6px;
    margin-bottom: 12px;
  }

  .ps-print-meth-content {
    font-family: 'Inter', sans-serif;
    font-size: 10pt;
    line-height: 1.7;
    color: #334155 !important;
  }

  .ps-print-meth-content .ps-print-kv {
    display: flex;
    padding: 4px 0;
    border-bottom: 1px solid #f1f5f9;
  }

  .ps-print-meth-content .ps-print-kv-label {
    font-weight: 600;
    color: #64748b !important;
    min-width: 140px;
    flex-shrink: 0;
  }

  .ps-print-meth-content .ps-print-kv-value {
    color: #1e293b !important;
  }

  .ps-print-meth-rule {
    border: none;
    height: 1px;
    background: #e2e8f0;
    margin: 20px 0;
  }

  .ps-print-meth-platforms {
    display: flex;
    gap: 16px;
    margin-top: 8px;
  }

  .ps-print-meth-platforms img {
    max-width: 80px;
    height: auto;
  }

  /* ── Table of Contents ───────────────────────────────────── */
  .ps-print-toc {
    display: block !important;
    page-break-after: always;
    padding: 0 !important;
  }

  .ps-print-toc-heading {
    font-family: 'Outfit', sans-serif;
    font-size: 18pt;
    font-weight: 700;
    color: #0a1628 !important;
    margin-bottom: 24px;
    border-bottom: 2px solid #0a58ca;
    padding-bottom: 8px;
  }

  .ps-print-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .ps-print-toc-item {
    display: block;
    font-family: 'Inter', sans-serif;
    padding: 6px 0;
    border-bottom: 1px dotted #e2e8f0;
  }

  .ps-print-toc-item a {
    color: #0a1628 !important;
    text-decoration: none !important;
    font-size: 11pt;
    font-weight: 600;
  }

  .ps-print-toc-item.ps-print-toc-sub {
    padding-left: 24px;
    border-bottom: none;
  }

  .ps-print-toc-item.ps-print-toc-sub a {
    font-size: 9.5pt;
    font-weight: 400;
    color: #475569 !important;
  }

  .ps-print-toc-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9pt;
    color: #94a3b8 !important;
    margin-right: 10px;
    display: inline-block;
    min-width: 24px;
  }

  /* ── Back Page Closer ────────────────────────────────────── */
  .ps-print-closer {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    page-break-before: always;
    text-align: center;
    padding: 30mm 25mm;
    box-sizing: border-box;
  }

  .ps-print-closer-logo {
    width: 60px;
    height: auto;
    margin-bottom: 12px;
  }

  .ps-print-closer-brand {
    font-family: 'Outfit', sans-serif;
    font-size: 16pt;
    font-weight: 700;
    color: #0a1628 !important;
    letter-spacing: 0.02em;
    margin-bottom: 24px;
  }

  .ps-print-closer-rule {
    width: 50%;
    height: 1px;
    background: #cbd5e1;
    border: none;
    margin: 0 auto 24px auto;
  }

  .ps-print-closer-services {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
  }

  .ps-print-closer-services li {
    font-family: 'Inter', sans-serif;
    font-size: 10pt;
    color: #475569 !important;
    padding: 5px 0;
  }

  .ps-print-closer-contact {
    margin-bottom: 32px;
  }

  .ps-print-closer-contact a {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 10pt;
    color: #0a58ca !important;
    text-decoration: none !important;
    padding: 2px 0;
  }

  .ps-print-closer-studies {
    margin-bottom: 32px;
  }

  .ps-print-closer-studies-heading {
    font-family: 'Inter', sans-serif;
    font-size: 8pt;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8 !important;
    margin-bottom: 8px;
  }

  .ps-print-closer-studies a {
    font-family: 'Inter', sans-serif;
    font-size: 9pt;
    color: #0a58ca !important;
    text-decoration: none !important;
  }

  .ps-print-closer-copyright {
    font-family: 'Inter', sans-serif;
    font-size: 7pt;
    color: #94a3b8 !important;
    margin-top: auto;
  }

  /* ── Subtle ASI Watermark (3% opacity on every page) ─────── */
  body::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    background: url('../assets/asi-logo.webp') center/contain no-repeat;
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  /* ── Global Print Reset ────────────────────────────────── */
  *,
  *::before,
  *::after {
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  html, body {
    background: #ffffff !important;
    color: #1a1a1a !important;
    font-size: 11pt !important;
    line-height: 1.6 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* ── Elements to HIDE ──────────────────────────────────── */
  #global-header,
  #global-footer,
  .ps-sidebar,
  .ps-back-top,
  .ps-hero-wrapper,
  .ps-hero-img-container,
  .ps-slider-arrow,
  .ps-slider-nav,
  .ps-slider-bottom,
  .ps-slider-progress,
  .ps-lightbox,
  .ps-hero-share,
  .ps-progress-bar,
  .toggle-icon,
  .ps-kbd-hints,
  .ps-lens,
  .ps-lb-loupe,
  .ps-quicklinks,
  .ps-hero-divider,
  .ps-hero-disclaimer-row,
  .ps-preview-bar,
  .ps-collapsible-header .toggle-icon,
  .ps-saved-link,
  .ps-sidebar-actions,
  .ps-sidebar-collapse-btn {
    display: none !important;
  }

  /* ── Force white backgrounds on content areas ──────────── */
  .study-wrapper,
  .ps-content,
  .ps-container,
  .ps-collapsible-card,
  .ps-collapsible-body,
  .ps-section,
  .ps-section-body,
  .ps-fig-card,
  .ps-scope-grid,
  .ps-scope-row,
  .ps-chart-container,
  .ps-comparison-strips,
  .ps-stat-chips,
  .ps-ai-grid,
  .ps-ai-block,
  .ps-outcomes-section {
    background: #ffffff !important;
    color: #1a1a1a !important;
    border-color: #e2e8f0 !important;
  }

  .study-wrapper {
    padding: 0 !important;
    min-height: auto !important;
  }

  /* ── Layout: full width single column ──────────────────── */
  .ps-grid,
  .ps-grid.sidebar-collapsed {
    display: block !important;
    grid-template-columns: none !important;
  }

  .ps-content {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .ps-container {
    max-width: 100% !important;
    padding: 0 !important;
  }

  /* ── Force expand all sections ─────────────────────────── */
  .ps-section,
  .ps-section-body,
  .ps-collapsible-body {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
    padding-bottom: 1.5rem !important;
    display: block !important;
  }

  /* Also override when .collapsed class is still present (belt+suspenders) */
  .ps-section.collapsed .ps-section-body,
  .ps-collapsible-card.collapsed .ps-collapsible-body {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    opacity: 1 !important;
    display: block !important;
  }

  .ps-collapsible-card.collapsed .ps-collapsible-body {
    padding: 0 2rem 2rem 2rem !important;
  }

  /* ── Typography ────────────────────────────────────────── */
  .study-wrapper h1,
  .study-wrapper h2,
  .study-wrapper h3,
  .study-wrapper h4 {
    color: #0a1628 !important;
    -webkit-text-fill-color: #0a1628 !important;
    background: none !important;
    page-break-after: avoid;
  }

  .highlight-grad {
    background: none !important;
    -webkit-text-fill-color: #0a1628 !important;
    color: #0a1628 !important;
  }

  .section-num {
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
    background: none !important;
    font-weight: 700;
    margin-right: 8px;
  }

  .ps-collapsible-title {
    background: none !important;
    -webkit-text-fill-color: #0a1628 !important;
    color: #0a1628 !important;
    font-size: 12pt !important;
  }

  .ps-collapsible-title i {
    -webkit-text-fill-color: #64748b !important;
    color: #64748b !important;
  }

  p, li, td, th, span, div {
    color: #1a1a1a !important;
  }

  a {
    color: #1a1a1a !important;
    text-decoration: none !important;
  }

  /* Body text */
  .ps-prose p,
  .ps-prose li {
    font-size: 10.5pt !important;
    line-height: 1.7 !important;
    color: #1e293b !important;
    orphans: 3;
    widows: 3;
  }

  /* ── Collapsible Cards ─────────────────────────────────── */
  .ps-collapsible-card {
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    margin-bottom: 16px !important;
    overflow: visible !important;
  }

  .ps-collapsible-card::before {
    display: block !important;
    background: #0a58ca !important;
    height: 3px !important;
    opacity: 1 !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  .ps-collapsible-header {
    border-bottom: 1px solid #f1f5f9 !important;
  }

  /* ── Section headings ──────────────────────────────────── */
  .ps-section h2 {
    font-size: 16pt !important;
    padding-bottom: 8px;
    border-bottom: 2px solid #0a58ca;
    margin-bottom: 16px;
    page-break-after: avoid;
    color: #0a1628 !important;
    -webkit-text-fill-color: #0a1628 !important;
  }

  .ps-section h3 {
    font-size: 13pt !important;
    color: #1e293b !important;
    margin-top: 20px;
    page-break-after: avoid;
  }

  .ps-section h4 {
    font-size: 11pt !important;
    page-break-after: avoid;
  }

  /* ── Page Breaks ───────────────────────────────────────── */
  .ps-section {
    page-break-before: always;
  }

  /* First section after cards should not double-break */
  .ps-collapsible-card + .ps-section,
  #summaryCard + #scopeCard {
    page-break-before: auto;
  }

  .ps-fig-card,
  .ps-figure,
  .ps-figure-grid,
  .ps-stat-chips,
  .ps-comparison-strips,
  .ps-chart-container,
  .ps-scope-grid,
  table {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* ── Images ────────────────────────────────────────────── */
  img {
    max-width: 100% !important;
    height: auto !important;
    filter: none !important;
    border-radius: 4px !important;
  }

  .ps-fig-card {
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 8px !important;
    margin-bottom: 12px !important;
    background: #ffffff !important;
  }

  .ps-fig-card img {
    border-radius: 4px !important;
  }



  .ps-fig-caption {
    font-size: 8.5pt !important;
    font-style: italic !important;
    color: #64748b !important;
    text-align: center !important;
    margin-top: 6px !important;
  }

  .ps-figure-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }

  .ps-figure-grid-3 {
    grid-template-columns: 1fr 1fr 1fr !important;
  }

  /* ── Comparison Strips ─────────────────────────────────── */
  .ps-strip {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    padding: 6px 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
  }

  .ps-strip-label {
    font-size: 9pt !important;
    font-weight: 600 !important;
    color: #475569 !important;
    min-width: 80px;
  }

  .ps-strip-bar {
    flex: 1;
    height: 8px !important;
    background: #e2e8f0 !important;
    border-radius: 4px !important;
    overflow: hidden;
    position: relative;
  }

  .ps-strip-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: var(--pct, 50%);
    background: #0a58ca !important;
    border-radius: 4px;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  .ps-strip-value {
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 9pt !important;
    font-weight: 700 !important;
    color: #0a1628 !important;
    min-width: 60px;
    text-align: right;
  }

  /* ── Platform cards xcPEP/xcPROC print constraints ── */
  .ps-scope-layout {
    display: block !important; /* Kill the flexbox to prevent print overflow bugs */
  }
  .ps-scope-plat-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    margin-top: 16px !important;
  }
  .ps-plat-card {
    page-break-inside: avoid !important;
    border: 1px solid #e2e8f0 !important;
    padding: 10px !important;
    border-radius: 6px !important;
  }
  .ps-plat-logo {
    max-width: 100px !important;
    max-height: 35px !important;
    width: auto !important;
    height: 35px !important;
    object-fit: contain !important;
  }
  .ps-plat-top img {
    max-width: 100px !important;
    max-height: 35px !important;
    height: 35px !important;
    object-fit: contain !important;
  }
  .ps-plat-name { font-size: 9pt !important; font-weight: 700 !important; }
  .ps-plat-sub { font-size: 7.5pt !important; }
  .ps-spec-row { font-size: 8pt !important; padding: 2px 0 !important; }

  /* ── Stat Chips ────────────────────────────────────────── */
  .ps-stat-chips {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin: 16px 0 !important;
  }

  .ps-chip {
    font-size: 8.5pt !important;
    padding: 4px 10px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 4px !important;
    color: #475569 !important;
  }

  .ps-chip strong {
    color: #0a1628 !important;
  }

  .ps-chip i {
    color: #94a3b8 !important;
  }

  /* ── Scope Grid ────────────────────────────────────────── */
  .ps-scope-grid {
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
  }

  .ps-scope-row {
    padding: 6px 12px !important;
    border-bottom: 1px solid #f1f5f9 !important;
  }

  .ps-scope-row:nth-child(odd) {
    background: #f8fafc !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  /* ── AI Block / Summary Grid ───────────────────────────── */
  .ps-ai-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
  }

  .ps-ai-block h4 {
    font-size: 8pt !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    color: #64748b !important;
    margin-bottom: 4px !important;
  }

  .ps-ai-block p {
    font-size: 10pt !important;
    color: #1e293b !important;
  }

  /* ── Outcomes / Tabs ───────────────────────────────────── */
  .ps-outcomes-strip {
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
  }

  .ps-outcomes-tab {
    color: #475569 !important;
  }

  .ps-outcomes-tab.active {
    color: #0a58ca !important;
    font-weight: 700 !important;
  }

  /* ── Canvas Charts ─────────────────────────────────────── */
  .ps-chart-container {
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 16px !important;
    background: #ffffff !important;
    max-width: 500px !important;
    margin: 16px auto !important;
  }

  canvas {
    max-width: 100% !important;
    height: auto !important;
  }

  /* ── Tables ────────────────────────────────────────────── */
  table {
    border-collapse: collapse !important;
    width: 100% !important;
  }

  th, td {
    border: 1px solid #e2e8f0 !important;
    padding: 6px 10px !important;
    font-size: 9pt !important;
    text-align: left !important;
  }

  th {
    background: #f1f5f9 !important;
    font-weight: 700 !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  /* Alternating row shading */
  tbody tr:nth-child(even) {
    background: #f8fafc !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  /* Bold summary/total rows */
  tr.bom-total, tr.cost-total, tr:last-child {
    font-weight: 700 !important;
  }

  /* ── Section Page Breaks ─────────────────────────────────── */
  .ps-section {
    page-break-before: always;
  }

  /* Don't break inside figures and key blocks */
  .ps-fig-card,
  .ps-scope-row,
  .ps-collapsible-card,
  .ps-ai-block {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* ── Hyperlinks: show URL for print ──────────────────────── */
  .ps-print-cover-url,
  .ps-print-closer-contact a,
  .ps-print-closer-studies a,
  .ps-print-footer-left a {
    color: #0a58ca !important;
  }

}
