/* ============================================================
   WHISKEY FAMILY TREE — PRINT STYLESHEET
   print.css — Clean print layout for all pages
   ============================================================ */

@media print {
  :root {
    --bg-base:      #ffffff;
    --bg-card:      #f8f4ee;
    --bg-nav:       #ffffff;
    --bg-section:   #f5f0e8;
    --text-primary: #1a0e00;
    --text-secondary: #4a3010;
    --text-muted:   #7a5820;
    --gold:         #8a5c00;
    --gold-bright:  #6a4400;
    --border:       #c8a870;
    --border-subtle: #e0c89a;
  }

  * {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 11pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }

  /* Hide navigation, buttons, back-to-top */
  .nav,
  .nav-toggle,
  #back-to-top,
  .footer { display: none !important; }

  .page-body {
    padding-top: 0 !important;
  }

  /* Page setup */
  @page {
    margin: 1.5cm 2cm;
    size: A4 portrait;
  }

  @page :first {
    margin-top: 1cm;
  }

  /* Headings */
  h1, h2, h3, h4 {
    color: #1a0e00 !important;
    page-break-after: avoid;
  }

  h1 { font-size: 22pt; }
  h2 { font-size: 16pt; border-bottom: 1pt solid #c8a870; padding-bottom: 4pt; margin-bottom: 8pt; }
  h3 { font-size: 13pt; }

  /* Hero */
  .hero, .page-hero {
    background: #f8f4ee !important;
    border-bottom: 2pt solid #c8a870 !important;
    padding: 1cm 0 !important;
    margin-bottom: 1cm;
  }

  .hero-title, .page-hero h1 {
    color: #4a2800 !important;
  }

  /* Cards */
  .card, .subtype-card, .info-card, .region-card, .detail-item {
    background: #f8f4ee !important;
    border: 1pt solid #c8a870 !important;
    page-break-inside: avoid;
  }

  /* Tables */
  table {
    border-collapse: collapse;
    width: 100%;
    page-break-inside: auto;
    font-size: 9pt;
  }

  thead { background: #f0e8d4 !important; }

  th, td {
    border: 1pt solid #c8a870 !important;
    padding: 5pt 7pt !important;
    color: #000 !important;
  }

  thead th {
    background: #e8d8b0 !important;
    color: #1a0e00 !important;
    font-weight: bold;
  }

  tr { page-break-inside: avoid; }

  /* Grids — collapse to single column for print */
  .grid-2, .grid-3, .grid-4, .grid-auto,
  .subtype-grid, .region-cards, .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr !important;
  }

  /* Badges */
  .badge {
    border: 1pt solid #888 !important;
    color: #333 !important;
    background: #f0f0f0 !important;
  }

  /* Mash bars — use text fallback */
  .mash-bar-track { border: 1pt solid #888 !important; background: #f0f0f0 !important; }
  .mash-bar-segment { color: #000 !important; font-size: 7pt !important; }

  /* Dividers */
  hr, .divider { border-top: 1pt solid #c8a870; }

  /* Section spacing */
  .section { padding: 0.5cm 0 !important; }

  /* Accordion — force open */
  .accordion-body { max-height: none !important; padding: var(--space-md) !important; display: block; overflow: visible !important; }
  .accordion-trigger { background: #f0e8d4 !important; }

  /* Links — show URL */
  a[href]::after {
    content: none;
  }

  /* Page breaks */
  .section { page-break-before: auto; }
  .section:first-of-type { page-break-before: avoid; }

  .page-break-before { page-break-before: always; }
  .no-print { display: none !important; }

  /* Tree — simplified for print */
  .tree-wrap {
    overflow: visible;
  }

  .tree-branch-header {
    border: 2pt solid #888 !important;
    background: #f0f0f0 !important;
    color: #000 !important;
  }

  .tree-leaf {
    border: 1pt solid #ccc !important;
    background: #fafafa !important;
  }
}
