/* 05-print.css — the board sheet and the per-day tower briefing sheet
 *
 * Both artefacts ASSUME BACKGROUND GRAPHICS ARE OFF, which is the browser
 * default: nothing may depend on a fill, and every status prints as a
 * bracketed word.
 */

@media print {
  @page { margin: 12mm; }

  :root { --gutter-w: 34mm; }

  body {
    background: #fff;
    color: #000;
    font-size: 9pt;
  }

  .shell-header,
  .notice-band,
  .toast-region,
  .board-toolbar,
  .rail-host,
  .orientation,
  .past-host,
  .shell-nav,
  .ad-switch,
  .shell-user,
  .skip-link,
  .action-bar,
  .form-actions,
  .skew-chip,
  dialog {
    display: none !important;
  }

  .shell-main { padding: 0; }

  /* ---- artefact A — tower briefing sheet, per UTC day ---------------- */

  :root[data-print="briefing"] .board,
  :root[data-print="briefing"] .axis-host,
  :root[data-print="briefing"] .legend-host,
  :root[data-print="briefing"] .board-head {
    display: none !important;
  }
  :root[data-print="briefing"] .print-only { display: block; }

  .print-head { margin-bottom: 6mm; }
  .print-head h2 { font-size: 12pt; }
  .print-head p { font-size: 9pt; }

  .print-day { break-after: page; page-break-after: always; }
  .print-day:last-of-type { break-after: auto; page-break-after: auto; }
  .print-day h3 { font-size: 10pt; margin: 4mm 0 2mm; }
  .print-note { font-size: 8.5pt; font-style: italic; margin-bottom: 2mm; }

  .print-table { width: 100%; font-size: 8pt; }
  .print-table th, .print-table td {
    border: 0.4pt solid #000;
    padding: 1mm 1.2mm;
    text-align: left;
    vertical-align: top;
  }
  .print-table th { font-weight: 700; }

  .print-foot {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    font-size: 8pt;
    font-weight: 700;
    letter-spacing: 0.06em;
    border-top: 0.4pt solid #000;
    padding-top: 1mm;
  }

  /* ---- artefact B — the school board, A4 landscape ------------------- */

  :root[data-print="board"] { }
  :root[data-print="board"] .print-only { display: none; }

  .board {
    border: 0.4pt solid #000;
    break-inside: avoid;
  }
  .row { border-bottom: 0.4pt solid #000; break-inside: avoid; }
  .row--past { display: none; }          /* past rows are omitted */
  .row__gutter { background: none; border-right: 0.4pt solid #000; }
  .row__canvas { background: none; }

  /* Fills do not print and are not relied upon; outline styles survive. */
  .bar {
    background: none !important;
    background-image: none !important;
    color: #000 !important;
    border: 0.5pt solid #000 !important;
    clip-path: none !important;
    opacity: 1 !important;
  }
  .bar--created, .bar--lapsed { border-style: dotted !important; }
  .bar--best_effort { border-width: 1.5pt !important; }
  .bar--refused { border-style: solid !important; }
  .bar--mine::before { content: "▶ "; font-weight: 700; }
  .bar::after {
    content: " " attr(data-print-word);
    font-size: 6pt;
    letter-spacing: 0.04em;
  }

  /* Closed zones become dashed outlines with their label always shown. */
  .band--closed, .band--note, .band--nocircuit {
    background: none !important;
    background-image: none !important;
    border: 0.4pt dashed #000;
    opacity: 1;
  }
  .band__label { color: #000; }

  .elapsed { display: none; }
  .now-line { border-left: 1pt solid #000; }

  /* The legend prints as words with the swatches suppressed. */
  .swatch { display: none; }
  .legend { border: 0; padding: 0; }
  .legend__list { gap: 4mm; }
  .legend__item { font-size: 8pt; }

  .axis-host { position: static; }
  .axis { background: none; border: 0.4pt solid #000; }

  /* ---- shared ------------------------------------------------------- */

  .shell-footer { border-top: 0.4pt solid #000; }
  .disclaimer { color: #000; font-size: 8pt; }

  .panel, .card { border: 0.4pt solid #000; break-inside: avoid; }
  .table th, .table td { border: 0.4pt solid #000; }
  .table tbody tr:nth-child(even) { background: none; }

  a[href^="#"]::after { content: ""; }
}
