/* SLASHED — core/print.css
   @layer slashed.print
   Print-only visibility, page defaults, ink-saving resets, and URL disclosure.
   Prefix: .print-* for explicit print helpers. */

@layer slashed.print {

  
  .print-only {
    display: none;
  }

  @media print {

    /* --sf-print-page-size / -margin are read here so a :root override retunes
       the printed page box. Each fallback equals the historical literal, so the
       default print render is unchanged. Verified in Chromium that var() is
       substituted inside @page descriptors; engines lacking general custom-
       property substitution in @page fall back to the literal. */
    @page {

      size:   var(--sf-print-page-size, a4) portrait;
      margin: var(--sf-print-page-margin, 2cm);
    }

    body {
      font-size: var(--sf-print-base-size, 11pt);
    }

    *,
    *::before,
    *::after {
      box-shadow:  none;
      text-shadow: none;
    }

    a[href]:not([href^="#"], [href^="javascript:" i], [href^="mailto:" i], [href^="tel:" i], .sf-link-external)::after {
      content:    " (" attr(href) ")";
      font-size:  90%;
      word-break: break-all;
    }

    abbr[title]::after {
      content: " (" attr(title) ")";
    }

    img, svg, canvas, figure, table, pre, blockquote {
      break-inside: avoid;

    }

    thead {
      display: table-header-group;
    }

    tr {
      break-inside: avoid;
    }

    h1, h2, h3, h4, h5, h6 {
      break-after: avoid;

    }

    /* Fluid --sf-h*-size tokens resolve via 100vw clamp()s, which have no
       reliable meaning on a print page box. Pin print heading sizes to
       static pt values instead. */
    h1 { font-size: 24pt; }
    h2 { font-size: 20pt; }
    h3 { font-size: 16pt; }
    h4 { font-size: 14pt; }
    h5 { font-size: 12pt; }
    h6 { font-size: 11pt; }

    p {
      orphans: 3;
      widows:  3;
    }

    pre, blockquote {
      border:  var(--sf-border-width-1) solid var(--sf-color-border--strong);
      padding: var(--sf-space-s);
    }

    nav, aside, button, input, select, textarea,
    audio, video, dialog, [popover], .no-print {
      display: none !important;
    }

    .print-only {
      display: revert !important;
    }

    details { display: block; }
    details > summary { display: none !important; }
    details > :not(summary) { display: block; }

    
    .print-color-exact,
    .print-color-exact * {
      print-color-adjust:         exact !important;
      -webkit-print-color-adjust: exact !important;
    }

    .print-no-color,
    .print-no-color *,
    .print-no-color *::before,
    .print-no-color *::after {
      background:  transparent !important;
      color:       CanvasText  !important;
    }

  }

}
