/* Plain black-and-white document theme for print and PDF.
   Applied by adding class "bw" to <html> (PDF build, beforeprint handler).
   Every rule is scoped under html.bw so the screen theme stays untouched. */
@page { size: A4; margin: 14mm; }

html.bw, html.bw body { background: #fff !important; background-image: none !important; color-scheme: light; }
html.bw body { font-size: 12px; line-height: 1.75; }
html.bw *, html.bw *::before, html.bw *::after {
  color: #000 !important; background: none !important; box-shadow: none !important;
  text-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  filter: none !important;
}
/* No boxes: flatten cards, panels, chips, KPI tiles, callouts */
html.bw .card, html.bw .panel, html.bw .kpi, html.bw .chip, html.bw .callout, html.bw .rec,
html.bw .kpi-grid, html.bw .kpi-split, html.bw .bars, html.bw .bar-track, html.bw .table-wrap,
html.bw .pill, html.bw .two-col {
  border: 0 !important; border-radius: 0 !important; padding: 0 !important;
  background: none !important;
}
html.bw .bar-fill, html.bw .swatch, html.bw .dot, html.bw .sort-chevron { display: none !important; }
html.bw .legend,
html.bw .two-col {
  display: none !important;
}
html.bw .kpi-split {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 8px 0 14px;
}
html.bw .kpi-split > div {
  break-inside: avoid;
}
html.bw .block-title {
  font-size: 11px !important;
  font-weight: 700 !important;
  margin: 0 0 6px !important;
}
html.bw .kpi-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
}
html.bw .kpi {
  display: block !important;
  margin: 0 !important;
}
html.bw .kpi .label,
html.bw .kpi .value,
html.bw .kpi .hint {
  display: inline !important;
}
html.bw .kpi .label {
  font-size: 11px !important;
  font-weight: 700 !important;
}
html.bw .kpi .label::after {
  content: ": ";
}
html.bw .kpi .value {
  font-size: 13px !important;
  font-weight: 700 !important;
}
html.bw .kpi .hint {
  font-size: 10px !important;
}
html.bw .kpi .hint::before {
  content: " (";
}
html.bw .kpi .hint::after {
  content: ")";
}
html.bw .callout,
html.bw .callout-focus,
html.bw .callout-goal {
  display: block !important;
  margin: 8px 0 10px !important;
  padding: 0 0 0 0 !important;
  border: 0 !important;
  font-size: 12px !important;
}
html.bw .callout strong {
  font-weight: 700 !important;
}
html.bw .note {
  font-size: 11px !important;
  margin: 6px 0 10px !important;
}
/* One rule under the document header, nothing else */
html.bw header, html.bw .doc-header { border-bottom: 1.5px solid #000 !important; padding-bottom: 8px !important; }
html.bw h1 { font-size: 18px; margin: 2px 0; }
html.bw h2 { font-size: 13px; font-weight: 700; margin: 14px 0 4px; }
html.bw h3 { font-size: 12px; font-weight: 700; margin: 10px 0 4px; }
html.bw h2::before, html.bw h2::after { display: none !important; }
html.bw table { border-collapse: collapse; width: 100%; }
html.bw th, html.bw td { border: 0; border-bottom: 1px solid #999 !important; padding: 4px 6px; font-size: 11px; vertical-align: top; }
html.bw th { font-weight: 700 !important; }
html.bw[dir="rtl"] ol, html.bw [dir="rtl"] ol { list-style-type: persian; }
html.bw li::marker { color: #000 !important; }
html.bw img, html.bw svg { max-width: 100%; }
html.bw .no-print, html.bw [data-print-hide] { display: none !important; }
html.bw .toolbar, html.bw .btn-icon, html.bw .brand-mark { display: none !important; }
html.bw svg { display: none !important; width: 0 !important; height: 0 !important; }
html.bw .page, html.bw main { max-width: none; margin: 0; padding: 0; }
html.bw section { break-inside: avoid; margin-bottom: 14px; }
html.bw .doc-body h1 { display: none !important; } /* title already in header */
html.bw .table-wrap { margin: 0 0 10px !important; }
html.bw tr, html.bw .table-wrap, html.bw table { break-inside: avoid; }

@media print {
  .no-print, [data-print-hide] { display: none !important; }
}
