:root {
  --bg:          #fdfdfc;
  --fg:          #24262b;
  --muted:       #6b7079;
  --rule:        #e2e2dd;
  --rule-strong: #b9bab5;
  --accent:      #14538c;
  --surface:     #f4f4f0;
  --measure:     40rem;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  max-width: var(--measure);
  margin: 3rem auto 5rem;
  padding: 0 1.25rem;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.4;
}

h1, h2, h3 {
  line-height: 1.25;
  font-weight: 600;
  margin: 2.25rem 0 0.75rem;
}

h1 { font-size: 1.5rem;  margin-top: 0; }
h2 { font-size: 1.2rem;  }
h3 { font-size: 1.05rem; }

p {
  margin: 0 0 1.1rem;
  text-wrap: pretty;
}

/* Back to ... */
body > p:first-child { margin-bottom: 2rem; }

ul, ol {
  margin: 0 0 1.1rem;
  padding-left: 1.4rem;
}

li + li { margin-top: 0.3rem; }
li > ul, li > ol { margin-bottom: 0; margin-top: 0.3rem; }

sup, sub { font-size: 0.75em; line-height: 0; }

small, time { color: var(--muted); }

blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 2px solid var(--rule-strong);
  color: var(--muted);
}

hr {
  height: 0;
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  overflow-wrap: break-word;
}

a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

dt { font-weight: 600; margin-top: 1.1rem; }
dd { margin: 0.3rem 0 0 1.4rem; }

img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto;
}

figure { margin: 1.5rem 0; }

figcaption, caption {
  color: var(--muted);
  font-size: 0.9em;
  line-height: 1.45;
}

table, thead, tbody, tfoot, tr, colgroup, col, th, td { border: 0; }

table {
  width: auto;
  max-width: 100%;
  margin: 1.5rem auto;
  border-collapse: collapse;
  font-size: 0.94em;
  font-variant-numeric: tabular-nums;
}

caption {
  caption-side: top;
  padding-bottom: 0.5rem;
}

th, td {
  padding: 0.4rem 1.1rem 0.4rem 0;
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
}

th:last-child, td:last-child { padding-right: 0; }

thead th {
  font-weight: 600;
  border-bottom: 1px solid var(--rule-strong);
}

tbody tr + tr td { border-top: 1px solid var(--rule); }

code, pre, kbd, samp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
}

code {
  background: var(--surface);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

pre {
  background: var(--surface);
  padding: 0.8rem 1rem;
  margin: 1.5rem 0;
  border-radius: 3px;
  overflow-x: auto;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

@media print {
  :root {
    --bg: #fff;
    --fg: #000;
    --muted: #444;
    --surface: #fff;
  }
  body { max-width: none; margin: 0; font-size: 11pt; }
  a { color: inherit; }
  pre { border: 1px solid var(--rule-strong); }
  h1, h2, h3 { break-after: avoid; }
  img, pre, table, blockquote { break-inside: avoid; }
}
