/* =========================================================
   print.css
   Print / PDF styles – simplified, fewer forced breaks
========================================================= */

@media print {

  /* Basic reset for print */

  * {
    box-sizing: border-box;
    box-shadow: none !important;
    background: transparent !important;
  }

  html,
  body {
    margin: 0;
    padding: 0;
    color: #000 !important;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 11pt;
    line-height: 1.45;
  }

  /* Hide navigation / UI chrome */

  .site-header,
  .site-footer,
  .hero-actions,
  .calc-sidebar,
  .step-actions,
  #runCalcBtn,
  #csvBtn,
  #printBtn,
  #themeToggle,
  .hamburger,
  .mobile-menu,
  .desktop-nav,
  nav {
    display: none !important;
  }

  /* Main printable container */

  .calculator-container {
    max-width: 7.5in;
    margin: 0 auto;
    padding: 0.6in 0.6in 0.7in;
  }

  /* Remove “card” chrome so pages can break naturally */

  .card,
  .calc-main,
  .hero,
  .info-block {
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
  }

  /* Titles */

  h1 {
    font-size: 18pt;
    margin: 0 0 0.2in;
  }

  h2 {
    font-size: 14pt;
    margin: 0.3in 0 0.15in;
  }

  h3 {
    font-size: 12pt;
    margin: 0.2in 0 0.08in;
  }

  p,
  li {
    font-size: 11pt;
    margin: 0 0 0.12in;
  }

  /* Make steps flow like normal content.
     We explicitly DO NOT avoid page breaks here,
     so a long step can span multiple pages. */

  .calc-step {
    margin-top: 0.2in;
    page-break-inside: auto;
    break-inside: auto;
  }

  /* Keep the compact summary blocks together if possible */

  section[aria-label="Summary status"],
  section[aria-label="Detailed results"] {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  #summaryHousing,
  #summaryStaffing,
  #summaryDecision {
    padding: 0.06in 0;
    border-top: 1px solid #777;
    border-bottom: 1px solid #777;
    margin-bottom: 0.12in;
    font-weight: 600;
  }

  /* Inputs: print as simple underlined fields */

  input[type="number"],
  input[type="text"],
  input[type="email"] {
    width: 100%;
    border: none !important;
    border-bottom: 1px solid #444 !important;
    padding: 2px 0 !important;
    font-size: 11pt;
    background: transparent !important;
    color: #000 !important;
  }

  input:focus {
    outline: none !important;
  }

  .field-help {
    font-size: 9pt;
    color: #555 !important;
    margin-top: 0.04in;
  }

  /* Progress bar + links not needed on paper */

  #progressLabel,
  .progress-bar {
    display: none !important;
  }

  /* Avoid single-line widows/orphans */

  p {
    orphans: 3;
    widows: 3;
  }
}