/* Print-friendly, US Letter, 1-inch margins */
@page {
  size: Letter;
  margin: 1in;
}

:root{
  --text: #111;
  --muted: #444;
  --rule: #d0d0d0;
}

*{ box-sizing: border-box; }

html, body{
  padding: 0;
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  line-height: 1.35;
}

/* Constrain content to printable width: 8.5in - 2in margins = 6.5in */
body{
  max-width: 6.5in;
  margin: 0 auto;
  padding: 0.5rem 0.0rem;
}

h1, h2, h3{
  margin: 0 0 0.5rem 0;
  page-break-after: avoid;
}

h1{ font-size: 18pt; font-weight: 700; }
h2{ font-size: 14pt; font-weight: 700; margin-top: 1.0rem; }
h3{ font-size: 12pt; font-weight: 700; margin-top: 0.75rem; }

p, li{ font-size: 10.5pt; }

.meta{
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 9.5pt;
}

.doc-header{
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.5rem;
}

.doc-footer{
  border-top: 1px solid var(--rule);
  margin-top: 1rem;
  padding-top: 0.5rem;
  color: var(--muted);
  font-size: 9.5pt;
}

section{ margin: 0 0 0.75rem 0; }

.tbl{
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 0.5rem 0;
  table-layout: fixed; /* enforce wrapping */
}

.tbl th, .tbl td{
  border: 1px solid var(--rule);
  padding: 0.35rem 0.45rem;
  vertical-align: top;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.tbl th{
  font-weight: 700;
  background: #f6f6f6;
}

.note{
  color: var(--muted);
  font-size: 9.5pt;
}

.refs{
  padding-left: 1.25rem;
}

.refs li{
  margin: 0.35rem 0;
  font-size: 9.5pt;
}

code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
}

@media print{
  body{
    margin: 0;
    padding: 0;
    max-width: none; /* @page controls printable area */
  }
  a{ color: inherit; text-decoration: none; }
  .tbl th{ background: #eee; }
}
