/* Print view (phase 09, task 5; moved out of the `basic` theme in phase 11).
 *
 * Shared by every theme, and that is the design rather than a shortcut: what someone
 * takes to the kitchen counter is the same document whichever theme the site wears —
 * the ingredients and the steps, in the servings the reader chose, with the navigation
 * and the decoration gone. A theme differs on screen, not on paper.
 *
 * It follows the same token contract as the themes (themes/TOKENS.md): no literal
 * colour anywhere. Print gets its own `:root` overrides instead, because paper has one
 * background whatever the site's is — a tenant who picked a charcoal background does
 * not want a charcoal page coming out of the printer.
 *
 * Loaded with media="print", so it costs a non-blocking request and nothing else on
 * screen.
 */

@page { margin: 1.6cm; }

:root {
  /* Paper is white and ink is black; every token the themes colour with is re-pointed
     at that, so the same class names print correctly in all three themes. */
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-text: #000000;
  --color-muted: #444444;
  --color-border: #999999;
  --color-primary: #000000;
  --color-primary-ink: #000000;
  --color-primary-soft: #ffffff;
  --color-secondary: #000000;
  --color-secondary-ink: #000000;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 11.5pt;
  line-height: 1.45;
}

/* Chrome, controls and anything the reader cannot use on paper. */
.site-head,
.site-foot,
.site-hero,
.ing-tools,
.preview-banner,
.gallery,
.recipe-video,
.card-grid,
.skip-link,
/* AD3: what Google's Auto ads inserts (00 decision #22) — an ad on paper is ink and a page. */
ins.adsbygoogle,
.google-auto-placed {
  display: none !important;
}

.wrap, .wrap-wide { max-width: none; padding: 0; }

.page-title { margin-top: 0; font-size: 20pt; }
.recipe-hero { max-width: 9cm; }
.recipe-hero img, .step-image img, .rich img { border-radius: 0; }
.step-image { max-width: 7cm; }

.facts {
  border: 1px solid var(--color-border);
  padding: 0.4cm;
  break-inside: avoid;
}

/* A recipe is read as two units; splitting either across a page break is what makes a
   printed recipe annoying to cook from. */
.ingredients, .faq-item, .step { break-inside: avoid; }
.block { margin: 0.6cm 0; }

.ing { border-bottom: 1px dotted var(--color-border); }
.ing-fixed { border: 0; background: none; }

/* The URL behind a link is unrecoverable on paper unless it is printed. */
.rich a::after { content: " (" attr(href) ")"; font-size: 9pt; word-break: break-all; }
