/* Printing. base.html links this with media="print", after clearpath.css.

   - The rail, top bar, buttons and forms don't print. A page holding a document (.doc)
     prints the document alone, with its classification marking at the top and bottom.
   - Print is always light, whatever the screen theme, and in black wherever colour carried
     the meaning on screen.
   - Browsers can't repeat a marking taken from the page on every printed sheet, so a long
     document shows it at its start and end only. */

@page {
  size: A4;
  margin: 16mm 18mm;
}

:root,
:root:not([data-theme="light"]) {
  --paper: #ffffff;
  --surface: #ffffff;
  --sunk: #f2f2f2;
  --ink: #000000;
  --muted: #333333;
  --line: #999999;
  --line-strong: #666666;
  --accent: #0e3d3d;
  --accent-soft: #ffffff;
  --brass: #000000;
  color-scheme: light;
}

html,
body {
  background: #ffffff;
  color: #000000;
}
body {
  font-size: 10.5pt;
  line-height: 1.45;
}

.skip,
.rail,
.topbar,
.tabs,
.crumbs,
.messages,
.btn,
.linkbtn,
button,
form,
noscript,
.no-print {
  display: none !important;
}

.app {
  display: block;
}
.content {
  max-width: none;
  margin: 0;
  padding: 0;
  gap: 12pt;
}

/* A page with a document prints only the document */
.content:has(.doc) > :not(.doc) {
  display: none;
}

.doc {
  max-width: none;
  padding: 0;
  border: 0;
  box-shadow: none;
  gap: 10pt;
}
.doc > .marking {
  color: #000000;
  font-size: 10pt;
  letter-spacing: 0.14em;
}
.doc :is(th, td) {
  border-color: #666666;
}
.doc th {
  background: #eeeeee;
}

.card,
.callout,
.log-e {
  border-color: #999999;
  background: #ffffff;
}
.pill,
.state,
.badge-int,
.badge-vis,
.tag {
  border: 1px solid #000000;
  background: #ffffff;
  color: #000000;
}
.pill::before {
  background: #000000;
}

h1,
h2,
h3,
h4 {
  break-after: avoid;
}
tr,
.callout,
.card,
.log-e,
.doc .sign {
  break-inside: avoid;
}
p,
li {
  orphans: 3;
  widows: 3;
}

/* Links in a printed document show where they go */
.doc a[href^="http"]::after {
  content: " (" attr(href) ")";
  font-size: 0.85em;
  overflow-wrap: anywhere;
}
a {
  color: #000000;
}
