/*
 * print.css - Print Stylesheet
 * Optimized for PDF export and printing
 */

@media print {
  /* ===== RESET FOR PRINT ===== */

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

  /* ===== PAGE SETUP ===== */

  @page {
    margin: 0.75in;
    size: letter;
  }

  body {
    font-size: 11pt;
    line-height: 1.5;
  }

  /* ===== HIDE NON-ESSENTIAL ELEMENTS ===== */

  .site-header,
  .nav-toggle,
  .mobile-nav,
  .theme-toggle,
  .skip-link,
  .site-footer,
  .status-dot,
  .availability-dot {
    display: none !important;
  }

  /* Hide interactive elements */
  button,
  .download-card,
  .downloads-section {
    display: none !important;
  }

  /* ===== TYPOGRAPHY ===== */

  h1 {
    font-size: 24pt;
    margin-bottom: 0.25in;
  }

  h2 {
    font-size: 16pt;
    margin-top: 0.25in;
    margin-bottom: 0.125in;
    page-break-after: avoid;
  }

  h3 {
    font-size: 13pt;
    margin-top: 0.2in;
    margin-bottom: 0.1in;
    page-break-after: avoid;
  }

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

  /* ===== LAYOUT ===== */

  .page-wrapper {
    max-width: none;
    padding: 0;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  .hero {
    padding: 0;
    margin-bottom: 0.25in;
    border-bottom: 1pt solid #000;
    padding-bottom: 0.125in;
  }

  .hero-title {
    margin-bottom: 0.0625in;
  }

  .hero-subtitle {
    font-size: 12pt;
    font-style: italic;
  }

  .section {
    padding: 0.25in 0;
  }

  /* ===== LINKS ===== */

  a {
    text-decoration: underline;
  }

  /* Show URLs after links (except internal/mailto) */
  a[href^="http"]:not([href*="operator.b8b7.live"])::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    font-weight: normal;
  }

  a[href^="mailto"]::after {
    content: none;
  }

  a[href^="#"]::after {
    content: none;
  }

  /* ===== GRIDS TO SINGLE COLUMN ===== */

  .metrics-grid,
  .principles-list,
  .nav-cards,
  .contact-grid,
  .resource-grid,
  .tradeoff-body,
  .use-cases-grid,
  .guardrails-grid,
  .difference-grid,
  .tools-grid {
    display: block !important;
  }

  .metric-card,
  .principle-card,
  .nav-card,
  .contact-card,
  .resource-card,
  .tradeoff-card,
  .use-case-card,
  .guardrail-item,
  .difference-card,
  .tools-card {
    margin-bottom: 0.15in;
    padding: 0.1in;
    border: 1pt solid #ccc;
    page-break-inside: avoid;
  }

  /* ===== PAGE BREAKS ===== */

  .section {
    page-break-inside: avoid;
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }

  /* Force page break before major sections if needed */
  .code-examples {
    page-break-before: auto;
  }

  /* ===== CARDS & BOXES ===== */

  .positioning-callout,
  .philosophy-statement,
  .colophon-intro,
  .availability-banner,
  .not-looking-section,
  .contact-method,
  .philosophy-section,
  .context-section,
  .meta-section,
  .cta-section,
  .real-example {
    border: 1pt solid #ccc;
    padding: 0.1in;
    margin-bottom: 0.15in;
  }

  /* ===== CODE BLOCKS ===== */

  .code-example {
    border: 1pt solid #ccc;
    margin-bottom: 0.15in;
    page-break-inside: avoid;
  }

  .code-block {
    background: #f5f5f5 !important;
    padding: 0.1in;
  }

  .code-block pre,
  .code-block code {
    font-size: 9pt;
    white-space: pre-wrap;
    word-wrap: break-word;
  }

  /* ===== LISTS ===== */

  .preference-list,
  .philosophy-list,
  .context-benefits {
    list-style: none;
    padding: 0;
  }

  .preference-item,
  .philosophy-item,
  .context-benefit {
    padding: 0.05in 0;
    border-bottom: none;
  }

  .preference-icon,
  .philosophy-icon,
  .benefit-icon {
    display: none;
  }

  .preference-item::before,
  .philosophy-item::before,
  .context-benefit::before {
    content: "• ";
  }

  /* ===== TAGS/BADGES ===== */

  .tool-tag,
  .not-looking-item,
  .resource-license,
  .code-example-lang {
    border: 1pt solid #999;
    padding: 0 0.05in;
    font-size: 9pt;
  }

  .status-badge,
  .outcome-badge,
  .cost-callout {
    border: 1pt solid #000;
    padding: 0.025in 0.1in;
    font-weight: bold;
  }

  /* ===== EXPERIENCE TIMELINE ===== */

  .timeline {
    border-left: none;
  }

  .timeline-item {
    padding-left: 0;
    margin-bottom: 0.2in;
    page-break-inside: avoid;
  }

  .timeline-marker {
    display: none;
  }

  /* ===== CONTACT PAGE ===== */

  .contact-email {
    font-weight: bold;
  }

  /* ===== HIDE DECORATIVE ELEMENTS ===== */

  .diagram-arrow,
  .step-number,
  .tradeoff-icon,
  .guardrail-icon,
  .principle-icon,
  svg {
    display: none !important;
  }

  /* ===== PRINT HEADER/FOOTER ===== */

  /* Add URL to bottom of printed pages */
  body::after {
    content: "operator.b8b7.live";
    position: fixed;
    bottom: 0.25in;
    right: 0.25in;
    font-size: 9pt;
    color: #666 !important;
  }
}
