/* One stylesheet for all three pages. Light and dark follow the reader's
   system setting; there is no toggle, because a static three page site does
   not need state. */

:root {
  --bg: #fbfaf8;
  --fg: #1e1c1a;
  --muted: #6b6560;
  --rule: #e5e1dc;
  --link: #7b3f9d;
  --code-bg: #efece8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16151a;
    --fg: #e8e5e1;
    --muted: #9b948d;
    --rule: #2c2a31;
    --link: #c9a6e0;
    --code-bg: #232128;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}

main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 3rem 1.35rem 5rem;
}

h1 {
  font-size: 2.1rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
}

h2 {
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  margin: 2.4rem 0 0.5rem;
}

h3 {
  font-size: 1rem;
  margin: 1.6rem 0 0.4rem;
}

p { margin: 0 0 1rem; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }

ul, ol { margin: 0 0 1rem; padding-left: 1.3rem; }
li { margin-bottom: 0.4rem; }

code {
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font: 0.87em ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-word;
}

/* Scoped tables scroll rather than pushing the page sideways on a phone. */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1rem;
  display: block;
  overflow-x: auto;
}
td {
  border-top: 1px solid var(--rule);
  padding: 0.7rem 0.9rem 0.7rem 0;
  vertical-align: top;
}
td:first-child { white-space: nowrap; padding-right: 1.2rem; }

.back { margin-bottom: 2rem; font-size: 0.9rem; }
.updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 2rem; }

.hero { margin-bottom: 3rem; }
.mark { display: block; margin-bottom: 1.1rem; border-radius: 16px; }
.tagline { font-size: 1.15rem; color: var(--muted); margin: 0; }

section { border-top: 1px solid var(--rule); padding-top: 0.4rem; }
section:first-of-type { border-top: 0; }

footer {
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
  padding-top: 1.2rem;
  font-size: 0.9rem;
  color: var(--muted);
}

img { max-width: 100%; height: auto; }
