:root {
  color-scheme: light dark;
  --bg: #fdfdfc; --fg: #24231f; --muted: #6b675f; --link: #1c5d99; --rule: #e3e0d8;
  --code-bg: #f4f2ec;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171614; --fg: #e6e3dc; --muted: #918c82; --link: #7fb3e0; --rule: #2e2c28;
    --code-bg: #1f1e1b;
  }
}
body {
  background: var(--bg); color: var(--fg);
  font: 17px/1.65 ui-serif, Georgia, serif;
  max-width: 38rem; margin: 0 auto; padding: 2rem 1.25rem;
}
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
header {
  border-bottom: 1px solid var(--rule); padding-bottom: 1rem; margin-bottom: 2rem;
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
}
header .home { font-family: ui-monospace, SFMono-Regular, monospace; font-size: .95rem; text-decoration: none; }
header nav { font-family: ui-monospace, SFMono-Regular, monospace; font-size: .85rem; }
h1, h2, h3 { line-height: 1.25; text-wrap: balance; }
time { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
ul.posts { list-style: none; padding: 0; }
ul.posts li { display: flex; gap: 1rem; align-items: baseline; padding: .35rem 0; }
ul.tags { list-style: none; padding: 0; margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .5rem; }
ul.tags li { font-family: ui-monospace, SFMono-Regular, monospace; font-size: .8rem; }
.postnav {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: .9rem;
}
.postnav .next { margin-left: auto; text-align: right; }
pre, code { font-family: ui-monospace, SFMono-Regular, monospace; font-size: .875rem; }
code { background: var(--code-bg); padding: .1em .3em; border-radius: 3px; }
pre { background: var(--code-bg); padding: .9rem; border-radius: 5px; overflow-x: auto; }
/* Chroma ships its own backgrounds (#fff / #0d1117); neither matches the warm palette,
   so keep its token colors and take the surface from --code-bg. */
.chroma, pre.chroma { background: var(--code-bg); }
pre code { background: none; padding: 0; }
blockquote { border-left: 3px solid var(--rule); margin-left: 0; padding-left: 1rem; color: var(--muted); }
img { max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { border-bottom: 1px solid var(--rule); padding: .4rem .5rem; text-align: left; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
footer { border-top: 1px solid var(--rule); margin-top: 3rem; padding-top: 1rem; color: var(--muted); font-size: .85rem; }
