/* Instrument Sans (SIL Open Font License, fonts/OFL.txt), served from here
   rather than a font service, so a visit tells no one else. Latin first,
   the rest of Latin only for pages that use it. */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/instrument-sans-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/instrument-sans-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/instrument-sans-latin-ext-wght-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

:root {
  --bg: #fbfbf8;
  --text: #1d1d1b;
  --muted: #6b6b66;
  --rule: #e4e4de;
  --link: #2f5fb3;
  --code-bg: #efefe9;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #18181a;
    --text: #e8e8e3;
    --muted: #9a9a94;
    --rule: #2e2e31;
    --link: #8fb0ee;
    --code-bg: #26262a;
  }
}

* { box-sizing: border-box; }

/* Set from the top left, as a page is, with a margin that grows with the
   window; the column keeps a reading width. */
body {
  margin: 0;
  padding: 0 clamp(1rem, 7vw, 7rem);
  /* Footer at the bottom of the window on short pages. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 400 1.125rem/1.6 "Instrument Sans", system-ui, sans-serif;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}

body > * { max-width: 42rem; }

a { color: var(--link); }

/* Large and light: the weight goes to size, not bold. Headings break where
   the sense does, paragraphs without a word left alone on the last line. */
h1, h2, h3 {
  font-weight: 500;
  line-height: 1.15;
  text-wrap: balance;
}

h1 {
  margin: 2.5rem 0 1.25rem;
  font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3rem);
  letter-spacing: -0.03em;
}

h2 {
  margin: 2.75rem 0 0.75rem;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

h3 {
  margin: 2rem 0 0.5rem;
  font-size: 1.1875rem;
  letter-spacing: -0.01em;
}

p, li { text-wrap: pretty; }

li + li { margin-top: 0.25rem; }

code {
  background: var(--code-bg);
  border-radius: 3px;
  padding: 0.1em 0.3em;
  font-family: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 0.85em;
}

/* The page's title, and under it the way to the other pages. */
.site-header {
  padding: 2.5rem 0 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.site-header h1 { margin: 0 0 0.75rem; }

.site-header a { text-decoration: none; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.site-header nav a[aria-current="page"] { color: var(--text); }

main { flex: 1; padding: 1.25rem 0 3rem; }

.site-footer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

.site-footer p { margin: 0; }
.site-footer a { color: inherit; }
