/* ============================================================
   Fixed Ratio Position Sizing — Print stylesheet
   ============================================================ */

@media print {

   /* --- Hide non-essential chrome --- */
   .site-header,
   .site-footer,
   .ad-mobile-sticky,
   .ad-banner-top,
   .ad-tower-left,
   .ad-tower-right,
   .breadcrumb {
      display: none !important;
   }

   /* --- Reset dark background for print --- */
   :root {
      --bg-void:       #fff;
      --bg-base:       #fff;
      --bg-surface:    #fff;
      --bg-card:       #f8f8fa;
      --bg-input:      #f4f4f6;
      --text:          #222;
      --text-muted:    #555;
      --text-heading:  #111;
      --border:        #ccc;
      --border-subtle: #ddd;
      --accent:        #2563eb;
      --accent-dim:    #2563eb;
      --accent-text:   #1d4ed8;
   }

   body {
      background: #fff;
      color: #222;
      font-size: 11pt;
   }

   /* --- Collapse the grid layout --- */
   .tool-layout {
      display: block;
      max-width: none;
      padding: 0;
      margin: 0;
   }

   .tool-content {
      display: block;
   }

   /* --- Page header --- */
   .tool-page-header {
      margin-bottom: 16pt;
      page-break-after: avoid;
   }

   .tool-page-header h1 {
      font-size: 16pt;
   }

   .tool-body {
      background: none;
      border: none;
      padding: 0;
      min-height: 0;
   }

   .fr-calculator {
      gap: 20pt;
   }

   /* --- Input form --- */
   .fr-form {
      grid-template-columns: 1fr 1fr;
      gap: 8pt;
      page-break-after: avoid;
   }

   .fr-field label {
      font-size: 7pt;
      margin-bottom: 2pt;
   }

   .fr-input-wrap input,
   .fr-input-wrap select {
      height: auto;
      padding: 4pt 8pt;
      font-size: 10pt;
      border: 1px solid #bbb;
   }

   .fr-input-wrap--currency input {
      padding-left: 18pt;
   }

   /* --- Summary cards --- */
   .fr-summary {
      grid-template-columns: repeat(2, 1fr);
      gap: 8pt;
      page-break-inside: avoid;
      page-break-before: avoid;
   }

   .fr-summary-card {
      padding: 10pt;
      border: 1px solid #ccc;
   }

   .fr-summary-card--accent {
      background: #f0f4ff;
      border-color: #93b4ff;
   }

   .fr-summary-card__label {
      font-size: 6.5pt;
      margin-bottom: 4pt;
   }

   .fr-summary-card__value {
      font-size: 12pt;
   }

   .fr-summary-card--accent .fr-summary-card__value {
      color: #1d4ed8;
   }

   /* --- Chart --- */
   .fr-chart-section {
      page-break-inside: avoid;
      page-break-before: auto;
   }

   .fr-chart-section h3,
   .fr-table-section h3 {
      font-size: 11pt;
      margin-bottom: 8pt;
   }

   .fr-chart {
      height: 140pt;
      border-bottom: 1px solid #999;
   }

   .fr-chart__seg--base {
      background: #93b4ff;
      -webkit-print-color-adjust: exact;
      print-color-adjust: exact;
   }

   .fr-chart__seg--profit {
      background: #6ee7b7;
      -webkit-print-color-adjust: exact;
      print-color-adjust: exact;
   }

   .fr-legend__dot {
      -webkit-print-color-adjust: exact;
      print-color-adjust: exact;
   }

   .fr-legend--base .fr-legend__dot {
      background: #93b4ff;
   }

   .fr-legend--profit .fr-legend__dot {
      background: #6ee7b7;
   }

   .fr-chart-legend {
      font-size: 7.5pt;
      margin-top: 6pt;
   }

   /* --- Table --- */
   .fr-table-section {
      page-break-before: auto;
   }

   .fr-table {
      font-size: 9pt;
   }

   .fr-table th {
      font-size: 7pt;
      padding: 4pt 8pt;
      border-bottom: 1.5pt solid #999;
   }

   .fr-table td {
      padding: 3pt 8pt;
      border-bottom: 0.5pt solid #ddd;
   }

   .fr-table thead {
      display: table-header-group;
   }

   .fr-table tr {
      page-break-inside: avoid;
   }

   .fr-table tbody tr:hover {
      background: none;
   }

   /* --- Explanation block --- */
   .fr-explanation {
      background: none;
      border: 1px solid #ccc;
      page-break-inside: avoid;
   }

   /* --- General print helpers --- */
   a {
      color: inherit;
      text-decoration: none;
   }
}
