/* Only Elite Sports on paper (design/letterhead, A, Masthead: Nic's pick, 20.11.2026): the statement and Reports
   printed or saved as a PDF. Black on white; the claret only in the lockup's mark at the head of page 1 (js/print.js),
   nowhere else. No ground colours, no photographs, no shadows. Money right-aligned in tabular figures; Won, Lost and
   Void told apart by their icon and word and the figure's sign, never by colour, so a mono printer loses nothing: the
   green and red a statement printed in before go. Linked last in index.html, with no media attribute, as its first
   rule hides the letterhead on screen. kit.css and line-device.css keep their own few print rules.

   The page's margin boxes (the running head, the site and "Page x of y") are drawn by Chrome and Edge only (131 and
   later); Firefox and Safari leave them out, and their print dialog's own header and footer give the document's
   title, which js/print.js sets while printing, and the page. */

/* On screen the letterhead is not there at all. */
.print-head { display: none; }

@page {
  size: A4;
  margin: 18mm 14mm 20mm;
  @top-left { content: var(--print-running, "Only Elite Sports"); font: 400 8pt/1.3 "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif; color: #444; vertical-align: bottom; padding-bottom: 3mm; border-bottom: .5pt solid #999; }
  @top-right { content: var(--print-who, ""); font: 400 8pt/1.3 "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif; color: #444; vertical-align: bottom; padding-bottom: 3mm; border-bottom: .5pt solid #999; }
  @bottom-left { content: var(--print-site, ""); font: 400 8pt/1.3 "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif; color: #444; vertical-align: top; padding-top: 3mm; border-top: .5pt solid #999; }
  @bottom-center { content: ""; border-top: .5pt solid #999; }
  @bottom-right { content: "Page " counter(page) " of " counter(pages); font: 400 8pt/1.3 "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif; color: #444; vertical-align: top; padding-top: 3mm; border-top: .5pt solid #999; }
}
/* Page 1 carries the letterhead, so no running head over it. */
@page :first {
  @top-left { content: none; border: 0; }
  @top-right { content: none; border: 0; }
}

@media print {
  :root { --type: 1; }
  html, body { background: #fff !important; color: #000 !important; }
  body { font-size: 9.5pt; }
  *, *::before, *::after { animation: none !important; transition: none !important; box-shadow: none !important; text-shadow: none !important; }

  /* The chrome and every control left off: the page's own head gives way to the letterhead. */
  .top, .dock, .slip, .slip-bar, .toasts, .install, .skip, .statement-head, .statement-range, .statement-period,
  .statement-links, .rp-head, .rp-links, .icon-btn { display: none !important; }
  .app { display: block; max-width: none; padding: 0; }
  .content { padding: 0; max-width: none; }
  /* No photographs on paper: an empty day or period says so in words alone. */
  .has-track::after, .empty-pic { display: none !important; }

  /* The letterhead, page 1 only (it is in the flow, at the top of the document). */
  .print-head { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 6mm; padding-bottom: 4mm; margin-bottom: 5mm; border-bottom: 1.5pt solid #000; break-inside: avoid; }
  .print-lockup { display: block; width: auto; height: 10.6mm; }
  .print-doc { text-align: right; }
  .print-doc p { margin: 0; }
  .print-title { font-family: var(--display); font-weight: 800; font-stretch: 75%; font-size: 20pt; line-height: 1; color: #000; }
  .print-who { margin-top: 1.5mm; font-size: 9.5pt; color: #000; }
  .print-stamp { margin-top: .8mm; font-size: 8pt; color: #444; }

  /* The end of the document: the foot's 18+ sign-off (js/signoff.js) under a hairline, at 8pt in black, the 18+ cut
     out of a black lane, the addresses read without their underline. */
  .statement-foot, .rp-foot { display: block; margin: 8mm 0 0; padding: 3mm 0 0; border-top: .5pt solid #999; break-inside: avoid; }
  .signoff { color: #000 !important; font-size: 8pt; break-inside: avoid; }
  .signoff-tile { fill: #000 !important; }
  .signoff-glyphs { fill: #fff !important; }
  .signoff a { text-decoration: none; }

  /* Figures: ink, whatever their sign. Profit and Loss are said by their word and sign, not by green and red. */
  .pos, .neg, .sum .pos, .sum .neg, .stmt-result, .stmt-row .stmt-result { color: #000 !important; }
  .stmt-type, .stmt-fixture, .stmt-meta, .stmt-time, .stmt-balance, .sum dt { color: #444 !important; }
  .play-none { color: #444 !important; }

  /* The summary: one row of figures between hairlines. */
  .sum { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-columns: none !important; background: none !important; border-radius: 0; border-block: .5pt solid #999; margin: 0 0 5mm; }
  .sum > div, .sum > div:nth-child(n) { grid-column: auto !important; padding: 2mm 3mm 2.5mm 0; }
  .sum > div + div { padding-left: 3mm; border-left: .5pt solid #999; }
  .sum dt { font-size: 8pt; }
  .sum dd { font-size: 12pt; font-weight: 700; }
  .statement-now { display: none; }

  /* The statement as a table, so its column heads repeat at the top of each page (Chrome, Edge, Firefox). */
  .statement .table { display: table; width: 100%; table-layout: fixed; border-collapse: collapse; }
  .stmt-head { display: table-header-group; padding: 0; }
  .stmt-head span, .stmt-head span:first-child { display: table-cell; padding: 0 0 1.5mm; border-bottom: 1pt solid #000; font-size: 8pt; font-weight: 700; color: #000; text-align: left; }
  .stmt-head span:first-child { width: 17mm; }
  .stmt-head span:nth-child(3) { width: 25mm; text-align: right; }
  .stmt-head span:nth-child(4) { width: 27mm; text-align: right; }
  .stmt-list { display: table-row-group; background: none !important; border-radius: 0; }
  .stmt-row { display: table-row; break-inside: avoid; }
  .stmt-row > span { display: table-cell; vertical-align: top; padding: 2mm 0 2.2mm; border-bottom: .5pt solid #bbb; }
  .stmt-time { font-size: 8.5pt; }
  .stmt-sub { display: block; }
  .stmt-sub::before { content: none; }
  .stmt-what { padding-right: 3mm !important; line-height: 1.25; }
  /* A line's parts one under the other, as on screen: on paper its cell is a table cell, not the screen's grid. Its
     odds, amount and result stay one row, spaced as on screen (.stmt-meta's flex). */
  .stmt-what > span:not(.stmt-meta) { display: block; }
  .stmt-pl, .stmt-balance { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .stmt-pl { font-size: 10pt; font-weight: 700; color: #000 !important; }
  .stmt-balance { font-size: 9pt; }
  .stmt-selection { font-size: 10pt; font-weight: 600; color: #000 !important; }
  .stmt-type, .stmt-fixture, .stmt-meta { font-size: 8.5pt; }
  .stmt-meta { margin-top: .6mm; }
  .stmt-result { font-weight: 700; }
  .stmt-result .ico { width: 3mm; height: 3mm; }
  .glyph { display: none; }
  /* A day's name as a row of its own, kept with the bet under it. Its words sit in the Time column's cell and run on
     across the empty ones (nowrap); the tall line gives the space above it, as a row takes no margin. */
  .stmt-day { display: table-row; break-after: avoid; font-size: 9pt; line-height: 2.6; font-weight: 700; color: #000 !important; white-space: nowrap; vertical-align: bottom; border-bottom: .5pt solid #000; }
  .section-title { margin: 6mm 0 2mm; font-size: 11pt; color: #000; break-after: avoid; }

  /* Reports on paper: its tokens set to paper's inks, each card whole on its page under a hairline, nothing part drawn.
     A loss is outlined where a profit is solid, so the side of the line and the sign say which, never a colour. */
  .rp { --text: #000; --muted: #444; --faint: #555; --line: #ddd; --line-strong: #999; --surface: #fff; --surface-2: #fff; --win: #000; --loss: #000; --loss-ink: #000; --pending: #444; color: #000; gap: 4mm; }
  .rp .card, .rp .rp-docket { break-inside: avoid; border: .5pt solid #bbb; }
  .rp-trace .down { fill: none; }
  .rp-trace .bar.is-down, .rp-trace .end.neg { fill: #fff; stroke: #000; stroke-width: 1; }
  .rp-swing .is-neg, .rp-tally-bar .is-neg, .rp-key.is-bars::after { background: #fff; border: .5pt solid #000; }
  /* A profit's bar is a solid ground, which a browser leaves off paper unless told to print it. */
  .rp-swing .is-pos, .rp-tally-bar .is-pos, .rp-key.is-bars::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
