:root {
  --bg: #f6f7f7;
  --text: #1d2125;
  --muted: #5d6670;
  --accent: #1f6477;
  --rule: #d9dde0;
  --code-bg: #eceff0;
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111416;
    --text: #dfe3e6;
    --muted: #97a1a9;
    --accent: #7cc0d3;
    --rule: #2a3136;
    --code-bg: #1b2023;
  }
}
:root[data-theme="dark"] {
  --bg: #111416;
  --text: #dfe3e6;
  --muted: #97a1a9;
  --accent: #7cc0d3;
  --rule: #2a3136;
  --code-bg: #1b2023;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.1875rem/1.6 var(--serif);
}
header.site, main, footer.site {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1rem;
}

header.site {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 2rem;
  padding-bottom: 2.5rem;
  font-family: var(--sans);
}
.mark {
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}
.mark .comma { color: var(--accent); }
header.site nav { display: flex; gap: 1.25rem; font-size: 0.9375rem; }
header.site nav a { color: var(--muted); text-decoration: none; }
header.site nav a:hover { color: var(--text); }

a { color: var(--accent); text-underline-offset: 0.15em; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3 {
  font-family: var(--sans);
  line-height: 1.25;
  text-wrap: balance;
  letter-spacing: -0.01em;
}
h1 { font-size: 1.875rem; font-weight: 700; margin: 0.25rem 0 1.5rem; }
h2 { font-size: 1.3125rem; font-weight: 650; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.0625rem; font-weight: 650; margin: 2rem 0 0.5rem; }
p, ul { margin: 0 0 1.1rem; }
ul { padding-left: 1.25rem; }
li { margin: 0.25rem 0; }

.meta, .posts time {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.meta { margin: 0; }

code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--code-bg);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}
pre {
  background: var(--code-bg);
  padding: 0.9rem 1rem;
  border-radius: 4px;
  overflow-x: auto;
  line-height: 1.45;
  margin: 0 0 1.25rem;
}
pre code { background: none; padding: 0; font-size: 0.875rem; }

.table { overflow-x: auto; margin: 1.5rem 0 0.5rem; }
table {
  border-collapse: collapse;
  width: 100%;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}
th, td { padding: 0.45rem 0.6rem; text-align: left; border-bottom: 1px solid var(--rule); }
th { font-weight: 600; color: var(--muted); border-bottom-color: var(--text); white-space: nowrap; }
td.num, th.num { text-align: right; white-space: nowrap; }
td:first-child, th:first-child { padding-left: 0; }
td:last-child, th:last-child { padding-right: 0; }

.intro p { font-size: 1.25rem; color: var(--muted); margin-bottom: 2.5rem; }
.posts { list-style: none; padding: 0; margin: 0; }
.posts li { padding: 1.25rem 0; border-top: 1px solid var(--rule); }
.posts li a {
  display: block;
  margin: 0.2rem 0 0.4rem;
  font-family: var(--sans);
  font-weight: 650;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--text);
  text-decoration: none;
}
.posts li a:hover { color: var(--accent); }
.posts li p { margin: 0; color: var(--muted); font-size: 1.0625rem; }

footer.site {
  margin-top: 4rem;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--muted);
}

@media (max-width: 480px) {
  body { font-size: 1.0625rem; }
  h1 { font-size: 1.5rem; }
}
