@media print {
  /* Hide interactive chrome */
  .no-print,
  header,
  nav,
  .tab-bar,
  .tab-labels,
  .tab-radio,
  .form-actions,
  .btn-group,
  button,
  .danger-zone,
  .markdown-help {
    display: none !important;
  }

  /* Show print-only title block */
  .print-title {
    display: block !important;
    margin-bottom: 1.5rem;
  }

  .print-title h1 {
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
  }

  /* Page setup */
  @page {
    size: A4;
    margin: 15mm 20mm;
  }

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

  /* Show all tab panels (not just the active one) */
  .tab-panel {
    display: block !important;
  }

  /* Section headings */
  .trip-section h2 {
    font-size: 1.2rem;
    border-bottom: 1px solid #999;
    padding-bottom: 0.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
  }

  /* Force page break before major sections */
  .itinerary-content h1 {
    page-break-before: always;
    padding-top: 0.5rem;
  }

  .itinerary-content h1:first-child {
    page-break-before: avoid;
  }

  /* Flight table */
  .flights-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10pt;
  }

  .flights-table th,
  .flights-table td {
    border: 1px solid #555;
    padding: 4pt 8pt;
    text-align: left;
  }

  .flights-table th {
    background: #eee;
    font-weight: bold;
  }

  /* Accommodations */
  .accommodation-item {
    border-left: 2pt solid #555;
    padding-left: 8pt;
    margin-bottom: 6pt;
    background: none;
  }

  /* Car rental */
  .car-rental-item {
    border-left: 2pt solid #777;
    padding-left: 8pt;
    background: none;
    margin-bottom: 8pt;
  }

  /* Blockquotes */
  .itinerary-content blockquote {
    border-left: 2pt solid #888;
    padding-left: 8pt;
    margin: 4pt 0;
    font-style: italic;
    color: #444;
  }

  /* Show URLs after links */
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #555;
    word-break: break-all;
  }

  /* But not for internal or empty anchors */
  a[href^="/"]::after,
  a[href^="#"]::after,
  a[href^="tel:"]::after {
    content: "";
  }

  /* For tel links, show just the number */
  a[href^="tel:"] {
    text-decoration: none;
    color: inherit;
  }

  /* Avoid page breaks in the middle of items */
  .accommodation-item,
  .car-rental-item,
  .flights-table tr {
    page-break-inside: avoid;
  }
}
