/* ═══════════════════════════════════════════════════════════════════
   Torque Toolbox — print / Save as PDF for chart pages
   Loaded with media="print". Prints only the page title, the sections
   marked .print-chart, the .print-only disclaimer and a site footer.
   Sized for A4 and US Letter (size: auto uses the printer's paper).
═══════════════════════════════════════════════════════════════════ */

@page {
  size: auto;
  margin: 14mm 12mm 16mm;
  /* Chrome / Edge page footer on every sheet */
  @bottom-left  { content: "torquetoolbox.com"; font: 8pt "IBM Plex Sans", Arial, sans-serif; color: #444; }
  @bottom-right { content: "Page " counter(page) " of " counter(pages); font: 8pt "IBM Plex Sans", Arial, sans-serif; color: #444; }
}

/* The dark theme's light text colours would be faint on white paper */
:root {
  --text: #000;
  --text-muted: #000;
  --accent: #000;
}

html, body {
  background: #fff !important;
  color: #000 !important;
  font-size: 10pt;
  line-height: 1.4;
}
*, *::before, *::after {
  box-shadow: none !important;
  text-shadow: none !important;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* ── Everything that isn't the chart ── */
.page-backdrop, .skip-link, .site-header, .site-footer, .breadcrumb, .page-lead,
.app-promo, .utility-cta, .faq, .ref-grid, .print-bar, .chart-toolbar, .scroll-hint,
.field-hint, #sq-unit, .typed-unit {
  display: none !important;
}
main .container > :not(h1):not(.print-chart):not(.print-only) { display: none !important; }
.print-chart > p:not(.result-note):not(.print-keep) { display: none !important; }
.print-only { display: block !important; }

/* ── Layout ── */
.utility-page-main { padding: 0 !important; }
.container, .container--wide { width: 100% !important; max-width: none !important; margin: 0 !important; }
a { color: #000 !important; text-decoration: none !important; }

h1 {
  margin: 0 0 4mm !important;
  font-size: 17pt !important;
  color: #000 !important;
  letter-spacing: 0 !important;
}
h2 {
  margin: 5mm 0 2mm !important;
  padding: 0 0 1mm !important;
  font-size: 11.5pt !important;
  color: #000 !important;
  border-bottom: 0.75pt solid #000 !important;
  break-after: avoid;
  page-break-after: avoid;
}
.utility-section { margin: 0 0 4mm !important; }

/* ── Tables: full width, no scrolling, no sticky cells ── */
.table-wrap, .table-wrap--fluid {
  overflow: visible !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 0 4mm !important;
  border: 0.75pt solid #000 !important;
  border-radius: 0 !important;
}
.data-table { width: 100% !important; font-size: 9pt !important; border-collapse: collapse !important; }
.data-table thead { display: table-header-group; } /* repeat headers on each page */
.data-table tr { break-inside: avoid; page-break-inside: avoid; background: #fff !important; }
.data-table th,
.data-table td,
.torque-chart th[scope="row"] {
  position: static !important;
  padding: 2.5pt 6pt !important;
  color: #000 !important;
  background: #fff !important;
  border-bottom: 0.5pt solid #999 !important;
  font-weight: 400;
}
.data-table thead th {
  background: #e6e6e6 !important;
  font-weight: 700 !important;
  font-size: 8pt !important;
  white-space: normal !important;
}
.data-table td:first-child,
.torque-chart th[scope="row"] { font-weight: 600 !important; }
.data-table tbody tr:nth-child(even) td,
.data-table tbody tr:nth-child(even) th { background: #f5f5f5 !important; }
.th-sub, .torque-chart tr.row-fine th[scope="row"] a { color: #333 !important; }

/* ── Notes and disclaimer ── */
.chart-notes { margin: 0 0 3mm !important; max-width: none !important; }
.result-note {
  color: #000 !important;
  background: #fff !important;
  border: 0.75pt solid #000 !important;
  padding: 2mm 3mm !important;
  font-size: 9pt !important;
}
.result-note span { color: #000 !important; }
.disclaimer, .disclaimer p {
  color: #000 !important;
  opacity: 1 !important;
  font-size: 7.5pt !important;
  line-height: 1.35 !important;
  padding: 0 !important;
}
.print-disclaimer { margin-top: 4mm; break-inside: avoid; }
.print-source { margin-top: 3mm; font-size: 8pt; color: #444 !important; }

/* ── Torque sequences ── */
.stage-card { max-width: none !important; break-inside: avoid; }
.tool-card { background: #fff !important; border: 0.75pt solid #000 !important; border-radius: 0 !important; padding: 3mm !important; }
.conv-input { background: #fff !important; color: #000 !important; border: 0 !important; padding: 0 !important; min-height: 0 !important; font-size: 13pt !important; }
.stage-row { border-color: #999 !important; padding: 1.5mm 0 !important; }
.stage-label, .stage-primary, .stage-secondary,
.stage-row.is-final .stage-primary { color: #000 !important; }
.seq-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 3mm !important; }
.seq-card {
  background: #fff !important;
  border: 0.75pt solid #000 !important;
  border-radius: 0 !important;
  padding: 3mm !important;
  break-inside: avoid;
  page-break-inside: avoid;
}
.seq-title, .seq-sub, .seq-note { color: #000 !important; }
.seq-note { border-color: #999 !important; }
.seq-diagram { width: 150px !important; }
.seq-ring { stroke: #000 !important; }
.seq-center { fill: #000 !important; }
.seq-bolt circle { fill: #fff !important; stroke: #000 !important; }
.seq-bolt text { fill: #000 !important; }

/* ── Feeds and speeds formula text ── */
.print-chart strong { color: #000 !important; }
