/* THE print standard (visual-gate SPEC, V5). One paper identity for everything
   that leaves a printer: worksheet PDFs (WeasyPrint), the figure print sheets
   the modules emit, and a module page sent straight to Print.

   Canonical values, adopted from the worksheet generator (the oldest and most
   used surface) and now binding on all three:
     paper    Letter
     margins  1.7cm 1.7cm 1.9cm
     ink      #1a1a1a on white, headings #000, muted #6b6b6b, rules #d4d4d4
     accent   #cf362f  (never as body-text colour on paper)
     type     'JetBrains Mono' for labels/kickers/code, 'Inter' for prose.
              VT323 is retired from print (2026-07-29): it was the worksheet
              mono while the site had already moved to JetBrains Mono.

   This file is linked with media="print" from every module page, so printing
   a module yields a light document instead of the dark OS skin. The figure
   print sheets and worksheet.css restate these values (a popup document and
   WeasyPrint cannot reliably share a live stylesheet); if a value changes
   here it changes there in the same commit. */

@page{ size: Letter; margin: 1.7cm 1.7cm 1.9cm; }

@media print{
  /* Light document: override the OS skin's !important dark theme. */
  html, body{
    background: #fff !important;
    color: #1a1a1a !important;
    font-size: 10.5pt !important;
    line-height: 1.55 !important;
  }
  html::before, html::after{ content: none !important; }   /* CRT overlay */
  body{ padding: 0 !important; }

  /* Chrome that means nothing on paper. */
  #tg-oslink, #tg-mobile, .tgbar, .fig-tools, .fig-btn,
  nav, .toc-mobile, .skip, .progress,
  .tglaunch .tgl-go{ display: none !important; }

  /* Paper is a flow, not a grid: Chromium truncates a display:grid main
     after a few pages when fragmenting (a 95,000px module printed 8 pages),
     and reveal-on-scroll content that was never scrolled to prints invisible
     while still taking its space. */
  main.lesson, .lesson{ display: block !important; }
  .reveal{ opacity: 1 !important; transform: none !important; }

  h1, h2, h3, .unit-t, .unit-t .gl-static{
    color: #000 !important;
    text-shadow: none !important;
  }
  .unit p, .unit li, p, li{ color: #1a1a1a !important; }
  a{ color: #1a1a1a !important; text-decoration: underline; }
  .kicker, .ck, .tgl-k{ color: #cf362f !important; }

  .unit, .fig, figure, .check, fieldset, .tglaunch{
    break-inside: avoid;
    background: #fff !important;
    border-color: #d4d4d4 !important;
    box-shadow: none !important;
  }
  .fig-cap, figcaption{ color: #6b6b6b !important; }

  /* A launch card on paper is its description; the link target in full. */
  .tglaunch{ border-left: 3px solid #999 !important; }
  .tglaunch .tgl-t, .tglaunch .tgl-d{ color: #1a1a1a !important; }
}
