/* ==========================================================================
   Print: what a page becomes on paper. Linked from base.html with
   media="print", so the screen never reads it.

   Every page: the navigation, the tab bar, the top bar, the public header
   and footer go, and the dark theme's tokens take paper values (below), so
   every component prints ink on white; headings and content stay, so the
   charter or a Daftarche printed from the browser reads as it should. The
   paper size is the printer's (margins only), A4 or Letter alike.

   The card's print page (body.print-page): only the member card is left, at
   business-card size (85.6 by 54 mm, the ISO card) with a dashed line to cut
   along. Paper has physical sizes, so this sheet states millimetres where
   the system sheets use tokens; its colours are the --print-* tokens.
   ========================================================================== */

@page {
  margin: 15mm;
}

/* The dark theme's text, surface and line tokens take their paper values,
   so every component prints ink on white without a rule of its own. */
:root {
  color-scheme: light;
  --bg: var(--print-paper);
  --bg-raised: var(--print-paper);
  --bg-raised-2: var(--print-paper);
  --surface-1: var(--print-paper);
  --surface-2: var(--print-paper);
  --surface-3: var(--print-paper);
  --panel: var(--print-paper);
  --sheet: var(--print-paper);
  --bar: var(--print-paper);
  --hairline: var(--print-line);
  --hairline-strong: var(--print-line);
  --text: var(--print-ink);
  --text-2: var(--print-ink);
  --text-muted: var(--print-ink-muted);
  --text-faint: var(--print-ink-muted);
  --accent: var(--print-ink);
  --accent-soft: var(--print-tint);
  --accent-line: var(--print-tint-line);
  --info: var(--print-ink);
  --info-soft: var(--print-tint);
  --info-line: var(--print-tint-line);
  --danger: var(--print-danger);
  --danger-soft: var(--print-danger-soft);
  --danger-line: var(--print-danger-line);
  --warn: var(--print-ink);
  --warn-soft: var(--print-tint);
  --warn-line: var(--print-tint-line);
  --accent-hi: var(--print-ink);
  /* the verified mark keeps its green on paper, dark enough to read on white */
  --verified: var(--verified-print);
  --verified-soft: var(--verified-print-soft);
  --verified-line: var(--verified-print-line);
  --heat-0: var(--print-paper);
  --heat-1: var(--print-heat-1);
  --heat-2: var(--print-heat-2);
  --heat-3: var(--print-heat-3);
  --heat-4: var(--print-heat-4);
  --highlight: none;
  --shadow-paper: none;
}

/* The gradient words of a heading are white on white: plain ink instead */
.accent-text {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--print-ink);
}

/* The heatmap keeps its grid on paper: an empty cell is white, so it has a
   hairline, and the shades print as they are */
.heatmap__week i,
.heatmap__legend i {
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
.heat-0 {
  box-shadow: inset 0 0 0 0.2mm var(--print-line);
}

html,
body,
.app-body,
.public-body {
  background: var(--print-paper);
  color: var(--print-ink);
}

/* What only means something on a screen, on any page */
.skip-link,
.sidebar,
.topbar,
.tabbar,
.site-header,
.site-footer,
.toasts,
.sheet,
.sheet-backdrop,
.btn {
  display: none !important;
}
/* The card's print page: the card alone */
.print-page .page-header,
.print-page .breadcrumb,
.print-page .field__help {
  display: none !important;
}
.print-page .app,
.print-page .app__col,
.print-page .app-main,
.print-page .app-content,
.print-page .app-content__main {
  display: block;
  margin: 0;
  padding: 0;
  background: none;
}
.print-page .card {
  border: 0;
  background: none;
  box-shadow: none;
}
.print-page .card-stage {
  justify-content: flex-start;
  padding: 0;
}
.print-page .incercard {
  inline-size: 85.6mm;
  block-size: 54mm;
  max-inline-size: none;
  aspect-ratio: auto;
  padding: 4.5mm 5mm;
  border: 0.35mm dashed var(--print-cut);
  border-radius: 3.2mm;
  background: var(--print-paper);
  box-shadow: none;
  color: var(--print-ink);
  break-inside: avoid;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
.print-page .incercard::before {
  display: none;
}
.print-page .incercard__line,
.print-page .incercard__nfc {
  color: var(--print-ink-muted);
}
.print-page .incercard__line--strong,
.print-page .incercard__qr {
  color: var(--print-ink);
}
.print-page .incercard__qr {
  inline-size: 26mm;
}
