@page { margin: 18mm 16mm; }

:root {
  /* Force a clean black-on-white palette regardless of OS preference. */
  --base:    #ffffff;
  --mantle:  #ffffff;
  --text:    #000000;
  --subtext: #333333;
  --overlay: #555555;
  --accent:  #000000;
  --heading: #000000;
  --rule:    #000000;
}

body { font-size: 11pt; line-height: 1.45; }

.breadcrumb, .anchor { display: none; }

main { max-width: none; margin: 0; padding: 0; }

h1, h2, h3                      { break-after:  avoid; }
pre, figure, .formula, ol.cases { break-inside: avoid; }

/* Expand external link targets after the link text */
a[href^="http"]::after {
  content: " (" attr(href) ")";
  font-size: 0.85em;
  color: var(--subtext);
  word-break: break-all;
}

/* Force SVG line art to solid black; --overlay/--subtext would otherwise
   come through as faint mid-tones. */
.diagram-axis, .diagram-ticks line, .diagram-interval line { stroke: var(--text); }
.diagram-ticks text, .diagram-label                        { fill:   var(--text); }
