/* slm-amateur-radio-repeater-ops-report.css */
/* Print-friendly, US Letter, 1-inch margins; constrain content within printable area. */

:root{
  --page-max: 6.5in; /* 8.5in - 2*1in margins */
  --text: #111;
  --muted: #444;
  --rule: #d0d0d0;
  --bg: #fff;
  --link: #0645ad;
}

html, body{
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  font: 11pt/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.page{
  box-sizing: border-box;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0.75in 0.6in; /* comfortable on screen; print uses @page margin */
}

header{
  margin-bottom: 0.25in;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.15in;
}

h1{
  font-size: 18pt;
  margin: 0 0 0.08in 0;
}

.subtitle{
  color: var(--muted);
  margin: 0;
  font-size: 11pt;
}

.meta{
  margin-top: 0.12in;
  color: var(--muted);
  font-size: 10.5pt;
}

h2{
  font-size: 13.5pt;
  margin: 0.25in 0 0.08in 0;
  page-break-after: avoid;
}

h3{
  font-size: 12pt;
  margin: 0.18in 0 0.06in 0;
  page-break-after: avoid;
}

p{
  margin: 0 0 0.12in 0;
}

ul, ol{
  margin: 0 0 0.12in 0.22in;
  padding: 0;
}

li{ margin: 0.04in 0; }

hr{
  border: none;
  border-top: 1px solid var(--rule);
  margin: 0.22in 0;
}

.callout{
  border: 1px solid var(--rule);
  padding: 0.14in 0.16in;
  border-radius: 8px;
  background: #fafafa;
  break-inside: avoid;
}

table{
  width: 100%;
  border-collapse: collapse;
  margin: 0.12in 0 0.18in 0;
  table-layout: fixed; /* enforce wrapping */
}

th, td{
  border: 1px solid var(--rule);
  padding: 0.08in 0.08in;
  vertical-align: top;
  overflow-wrap: anywhere; /* keep URLs within margins */
  word-break: break-word;
}

th{
  background: #f3f3f3;
  font-weight: 700;
}

code, pre{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 10pt;
}

pre{
  border: 1px solid var(--rule);
  padding: 0.12in;
  border-radius: 8px;
  background: #fcfcfc;
  overflow-wrap: anywhere;
  white-space: pre-wrap; /* wrap long lines to stay in margins */
}

a{
  color: var(--link);
  text-decoration: underline;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.footnotes{
  margin-top: 0.25in;
  border-top: 1px solid var(--rule);
  padding-top: 0.18in;
}

.footnotes h2{ margin-top: 0; }

.fn{
  font-size: 10.5pt;
  color: var(--text);
}

.fn a{
  word-break: break-all;
}

/* Keep major blocks from splitting awkwardly */
section, .callout, table, pre{
  break-inside: avoid;
}

/* Print rules */
@page{
  size: Letter;
  margin: 1in;
}

@media print{
  html, body{ background: #fff; }
  .page{
    max-width: none;
    padding: 0; /* rely on @page margins */
  }
  a{
    color: #000;
    text-decoration: none;
  }
  /* Ensure URLs still visible in print (user requested displayed URL text) */
  /* Leave link text as URL in footnotes and inline where used. */
  header{ border-bottom: 1px solid #000; }
  th{ background: #eee; }
}
