/* CoGS manuals, web edition. One column, readable measure, print-friendly. */
:root {
  --ink: #1d1d1b;
  --muted: #5c5c58;
  --rule: #c9c7c0;
  --paper: #fbfaf7;
  --accent: #1a4d8f;
  --warn: #a0321e;
  --tip: #1a6b3a;
  --mono: "SF Mono", Menlo, "DejaVu Sans Mono", Consolas, monospace;
  --serif: "EB Garamond", "Libertinus Serif", Palatino, Georgia, serif;
}
html { background: var(--paper); }
body {
  font-family: var(--serif);
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1.55;
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 5rem;
}
header#title-block-header { margin-bottom: 3rem; border-bottom: 3px solid var(--ink); padding-bottom: 1rem; }
header#title-block-header h1.title { font-size: 2.6rem; margin: 0 0 .25rem; letter-spacing: -.01em; }
header#title-block-header p.subtitle { font-size: 1.2rem; color: var(--muted); margin: 0; }
header#title-block-header p.date { color: var(--muted); font-size: .95rem; margin: .6rem 0 0; }
.kicker { font-variant: small-caps; letter-spacing: .18em; color: var(--muted); font-size: .9rem; }

nav#TOC { border: 1px solid var(--rule); padding: 1rem 1.5rem; margin: 0 0 3rem; background: #fff; }
nav#TOC ul { list-style: none; padding-left: 0; margin: 0; }
nav#TOC > ul > li { margin: .35rem 0; font-weight: 600; }
nav#TOC > ul > li > ul { margin: .2rem 0 .6rem 1.2rem; font-weight: 400; font-size: .95rem; }
nav#TOC a { text-decoration: none; color: var(--ink); }
nav#TOC a:hover { color: var(--accent); }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h1 { font-size: 2.1rem; margin: 4rem 0 1rem; padding-top: 1.2rem; border-top: 3px solid var(--ink); }
h1 .header-section-number::after { content: "."; }
h2 { font-size: 1.45rem; margin: 2.4rem 0 .6rem; }
h3 { font-size: 1.15rem; margin: 1.8rem 0 .4rem; }
h4 { font-size: 1.02rem; margin: 1.4rem 0 .3rem; font-style: italic; }
.header-section-number { margin-right: .5em; color: var(--muted); }

a { color: var(--accent); }
code, pre { font-family: var(--mono); font-size: .86em; }
code { background: #efede8; padding: .05em .3em; border-radius: 2px; }
pre { background: #f2f0eb; border: 1px solid var(--rule); padding: .75rem 1rem; overflow-x: auto; border-radius: 2px; line-height: 1.4; }
pre code { background: none; padding: 0; }
kbd { font-family: var(--mono); font-size: .85em; border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 3px; padding: 0 .35em; background: #fff; }

table { border-collapse: collapse; width: 100%; margin: 1.2rem 0; font-size: .95rem; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
th { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--ink); }
td { padding: .4rem .6rem; vertical-align: top; border-bottom: 1px solid var(--rule); }
tr:last-child td { border-bottom: none; }
caption { caption-side: top; text-align: left; font-size: .9rem; color: var(--muted); padding: 0 0 .4rem; }

figure { margin: 1.6rem 0; }
figure img { max-width: 100%; display: block; margin: 0 auto; image-rendering: pixelated; border: 1px solid var(--rule); }
figcaption { font-size: .9rem; color: var(--muted); margin-top: .5rem; }

.callout { border-left: 4px solid var(--muted); padding: .6rem 1rem .4rem; margin: 1.4rem 0; background: #fff; }
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }
.callout-label { font-weight: 700; letter-spacing: .05em; text-transform: uppercase; font-size: .8rem; color: var(--muted); }
.callout.warning, .callout.important { border-left-color: var(--warn); }
.callout.warning .callout-label, .callout.important .callout-label { color: var(--warn); }
.callout.tip { border-left-color: var(--tip); }
.callout.tip .callout-label { color: var(--tip); }

dl dt { font-weight: 700; margin-top: .8rem; }
dl dd { margin: .15rem 0 0 1.5rem; }
hr { border: none; border-top: 1px solid var(--rule); width: 30%; margin: 2rem auto; }
.footnotes { font-size: .9rem; color: var(--muted); border-top: 1px solid var(--rule); margin-top: 3rem; }

@media print {
  body { max-width: none; font-size: 10.5pt; }
  nav#TOC { display: none; }
  h1 { page-break-before: always; }
  a { color: inherit; text-decoration: none; }
}
