/* ========================================================================
   STRATENITY LIBRARY · PRINT STYLESHEET v1.0
   Goal: clean editorial print + lightweight watermark that ties every
   printed copy back to the authenticated viewer.
   Loaded as: <link rel="stylesheet" href="/styles/print.css" media="print">
   ======================================================================== */

@page {
  size: Letter;
  margin: 0.75in 0.7in 1in 0.7in;

  /* Footer on every printed page */
  @bottom-left {
    content: "Stratenity Consulting Library";
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8pt;
    color: #6B6E80;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  @bottom-center {
    content: "Page " counter(page) " of " counter(pages);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8pt;
    color: #6B6E80;
  }
  @bottom-right {
    /* User watermark injected via JS: data-watermark on body, mirrored to a CSS var */
    content: var(--print-watermark, "Subscriber Copy · Confidential");
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8pt;
    color: #3FA89F;
    letter-spacing: 0.06em;
  }
}

@media print {
  /* Strip the screen-only chrome */
  .site-header,
  .trial-banner,
  .nav-dd,
  .dd-menu,
  footer,
  .btn-row,
  .paywall-card,
  .paywall-fade,
  [data-no-print] {
    display: none !important;
  }

  /* Page mode */
  html, body {
    background: #fff !important;
    color: #1A1F3A !important;
    font-family: 'IBM Plex Sans', Georgia, serif;
    font-size: 11pt;
    line-height: 1.55;
  }
  body::after {
    /* Subtle running watermark — diagonal text across each page corner */
    content: "Stratenity Subscriber · For Personal Use · Not For Redistribution";
    position: fixed;
    bottom: 0.2in;
    left: 0;
    right: 0;
    text-align: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7pt;
    color: rgba(26, 31, 58, 0.32);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    pointer-events: none;
  }

  /* Article body promoted to full page width */
  .article-head,
  .article-body {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .article-head {
    border-bottom: 1pt solid #232D5F !important;
    padding-bottom: 0.3in !important;
    margin-bottom: 0.3in !important;
    page-break-after: avoid;
  }
  .article-head h1 {
    color: #1A1F3A !important;
    font-family: 'Fraunces', Georgia, serif !important;
    font-weight: 400 !important;
    font-size: 22pt !important;
    line-height: 1.15 !important;
    margin: 0 0 0.18em !important;
    max-width: none !important;
  }
  .article-head .article-lede {
    color: #3A3A3A !important;
    font-family: 'Fraunces', Georgia, serif !important;
    font-style: italic;
    font-size: 12pt !important;
    line-height: 1.5 !important;
    max-width: none !important;
    margin: 0 0 0.6em !important;
  }
  .article-meta {
    font-family: 'IBM Plex Mono', monospace !important;
    font-size: 8pt !important;
    color: #4F5470 !important;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.6em !important;
  }
  .author-strip {
    font-size: 8pt !important;
    color: #4F5470 !important;
    border-top: 0.5pt solid #E0E2EA !important;
    padding-top: 0.3em !important;
  }

  /* Article body typography */
  .article-body {
    font-family: 'IBM Plex Sans', system-ui, sans-serif !important;
    font-size: 11pt !important;
    line-height: 1.55 !important;
    color: #1A1F3A !important;
  }
  .article-body h2 {
    font-family: 'Fraunces', Georgia, serif !important;
    font-weight: 400 !important;
    font-size: 15pt !important;
    margin: 1.4em 0 0.5em !important;
    page-break-after: avoid;
  }
  .article-body h3 {
    font-family: 'Fraunces', Georgia, serif !important;
    font-weight: 500 !important;
    font-size: 12pt !important;
    margin: 1.2em 0 0.45em !important;
    page-break-after: avoid;
  }
  .article-body p,
  .article-body li {
    orphans: 3;
    widows: 3;
  }
  .article-body blockquote {
    border-left: 1pt solid #3FA89F !important;
    padding-left: 0.5em !important;
    color: #1A1F3A !important;
    font-family: 'Fraunces', Georgia, serif !important;
    font-style: italic;
    font-size: 11pt !important;
    margin: 1.2em 0 !important;
    page-break-inside: avoid;
  }
  .article-body a {
    color: #232D5F !important;
    text-decoration: none !important;
  }
  .article-body a::after {
    content: " [" attr(href) "]";
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8pt;
    color: #6B6E80;
  }
  .article-body a[href^="#"]::after,
  .article-body a[href^="javascript"]::after {
    content: "";
  }

  /* No background fills in print */
  .featured-card,
  .info-card,
  .lib-card,
  .stat-pill {
    background: #fff !important;
    box-shadow: none !important;
    border: 0.5pt solid #E0E2EA !important;
    break-inside: avoid;
  }

  /* No links underlined as buttons in print */
  .btn { display: none !important; }
}
