/* ============================================================
   print.css — long-form Learning Lab posts should print well
   ============================================================ */

@page {
  size: A4;
  margin: 22mm 18mm 22mm 18mm;
}

@media print {
  :root {
    --bg: #fff;
    --bg-2: #fff;
    --fg: #111;
    --fg-muted: #555;
    --fg-subtle: #777;
    --rule: #ccc;
    --border: #ccc;
    --code-bg: #f6f3ec;
    --accent: #444;
    --paper-noise-opacity: 0;
  }
  html, body {
    background: #fff;
    color: #111;
    font-size: 11pt;
    line-height: 1.55;
  }
  body::before { display: none; }

  /* Hide site chrome */
  .topbar, .foot, .tweaks, .skip,
  .codeblock-copy, .pager, .filter-bar { display: none !important; }

  /* Force single column */
  .article {
    display: block;
    max-width: none;
    margin: 0;
  }
  .article > aside.sidenote {
    display: block;
    margin: 0.6em 0 0 0;
    padding: 0.4em 0 0 0;
    border-top: 1px solid #aaa;
    grid-column: 1;
    color: #444;
    font-size: 9pt;
  }

  /* Footnote-style numbering */
  .sn-ref { color: #111; font-weight: 600; }

  /* Avoid breaking inside */
  h1, h2, h3, h4, .pullquote, figure { break-after: avoid; }
  pre, table, figure, .codeblock { break-inside: avoid; }

  /* Add URLs after links */
  a { color: #111; text-decoration: underline; }
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-family: var(--font-mono);
    font-size: 0.85em;
    color: #555;
    word-break: break-all;
  }
  a[href^="#"]::after, a.no-print-url::after { content: ""; }

  /* Code blocks */
  .codeblock { border: 1px solid #ccc; background: #fafafa; }
  .codeblock-bar { border-bottom: 1px solid #ccc; }
  pre { white-space: pre-wrap; word-wrap: break-word; }

  .post-print-meta {
    display: block !important;
    margin-top: 1em;
    padding-top: 0.5em;
    border-top: 1px solid #ccc;
    font-size: 9pt;
    color: #555;
  }

  .display, h1 { font-size: 22pt; }
  h2 { font-size: 14pt; }
  h3 { font-size: 12pt; }
}

.post-print-meta { display: none; }
