/*
 * Print stylesheet.
 *
 * Loaded with media="print" from base.html so it applies only when
 * the user prints the page. The goal is a clean printout of the
 * content area, without the application chrome.
 *
 * Per ui_strategy.md §4.4, "print the view" is the v1 export-to-paper
 * story for reports, and §6 calls out that retrofitting print CSS
 * after the layout is established is painful. This file lands now,
 * minimal, and grows as report views land.
 *
 * Anything that should never appear on paper goes here. Anything
 * that should look different on paper than on screen also goes here.
 * Page-level layout adjustments (font sizes, margins) should be
 * conservative — the browser's defaults are usually fine.
 */

/* Hide application chrome: top bar, sidebar. */
header.navbar,
nav#sidebar {
  display: none !important;
}

/* Let the main content area fill the page. */
main#main-content {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Hide edit affordances. The .no-print utility class is the project
 * convention: any edit button, scenario toggle, or nav arrow that
 * should disappear when printing should carry it.
 *
 * Anchor and button text (used for inline-edit fields, scenario
 * toggles) is also hidden by class. .print-only is the inverse —
 * elements that should appear *only* when printing (e.g. a footer
 * with the page URL or run timestamp). */
.no-print {
  display: none !important;
}

.print-only {
  display: initial !important;
}

/* Ensure tables don't get cut awkwardly across pages. */
table,
.report-block {
  page-break-inside: avoid;
}

/* Links: print the underlying URL after the link text, so a printed
 * report retains its references. Skip for in-page anchors and
 * javascript hrefs. */
a[href]:not([href^="#"]):not([href^="javascript:"])::after {
  content: " (" attr(href) ")";
  font-size: 90%;
  color: #555;
}
