@page {
  size: A4;
  margin: 8mm;
}

@media print {
  body:not(.week-page) {
    background: #fff !important;
    color: #000 !important;
  }

  body:not(.week-page) .site-header,
  body:not(.week-page) .hero,
  body:not(.week-page) main > .content-grid,
  body:not(.week-page) main > #weeks,
  body:not(.week-page) main > #faq,
  body:not(.week-page) .calculator-panel,
  body:not(.week-page) .report-actions,
  body:not(.week-page) .toast,
  body:not(.week-page) .timeline {
    display: none !important;
  }

  body:not(.week-page) main,
  body.week-page main {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body:not(.week-page) .layout {
    display: block !important;
  }

  body:not(.week-page) .layout > section {
    display: block !important;
  }

  body:not(.week-page) .report-card,
  body:not(.week-page) .content-card {
    box-shadow: none !important;
    border: 1px solid #cfd6dc !important;
    border-radius: 6px !important;
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 8px !important;
    padding: 12px !important;
    background: #fff !important;
  }

  body:not(.week-page) .result-hero {
    color: #111 !important;
    background: #fff !important;
    border-bottom: 1px solid #cfd6dc;
    padding: 12px !important;
  }

  body:not(.week-page) .date {
    font-size: 28pt !important;
    font-weight: 700;
  }

  body:not(.week-page) .stats {
    grid-template-columns: 1fr 1fr !important;
  }

  body:not(.week-page) .stat {
    padding: 10px !important;
  }

  body:not(.week-page) .progress-wrap,
  body:not(.week-page) .chart-wrap {
    padding: 8px 12px !important;
  }

  body:not(.week-page) .progress {
    height: 8px !important;
  }

  body:not(.week-page) .report-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin-top: 8px !important;
  }

  body:not(.week-page) .chart {
    height: 65px !important;
  }

  h1,
  h2,
  h3,
  h4 {
    page-break-after: avoid;
    break-after: avoid;
  }

  h2 {
    margin: 0 0 6px !important;
    font-size: 17px !important;
  }

  h3 {
    margin: 8px 0 4px !important;
    font-size: 14px !important;
  }

  p,
  li {
    margin: 2px 0 !important;
    line-height: 1.3 !important;
    font-size: 12px !important;
  }

  body:not(.week-page) ul,
  body:not(.week-page) ol,
  body:not(.week-page) .list {
    margin-top: 2px !important;
    margin-bottom: 2px !important;
  }

  .print-footer {
    break-inside: avoid;
    page-break-inside: avoid;
    border-top: 1px solid #cfd6dc;
    margin-top: 6px !important;
    padding-top: 6px !important;
  }

  .print-footer strong {
    color: #000;
  }

  .print-footer p {
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.3 !important;
  }

  body.week-page .site-header,
  body.week-page .hero-actions {
    display: none !important;
  }

  body.week-page .visual-card {
    max-height: 220px;
    overflow: hidden;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  img,
  svg,
  table {
    max-width: 100% !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  a {
    color: #000 !important;
    text-decoration: none !important;
  }
}
@media print {
  body:not(.week-page) .content-card:has(.chart),
  body:not(.week-page) .chart-wrap,
  body:not(.week-page) .chart,
  body:not(.week-page) svg.chart {
    display: none !important;
  }
}
