*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, svg { max-width: 100%; height: auto; }

:root {
  --ink: #14161a;
  --ground: #f6f3ec;
  --panel: #fffdf8;
  --rule: #d9d2c4;
  --body: #2e3138;
  --muted: #6c6e75;
  --brass: #a37a22;
  --brass-soft: #f0e4c8;

  --display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f0ece2; --ground: #14161a; --panel: #1b1e23; --rule: #33373f;
    --body: #c9ccd3; --muted: #8b8f98; --brass: #d8a83f; --brass-soft: #3a2f16;
  }
}

html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--ground);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- chrome */
header.site {
  border-bottom: 2px solid var(--ink);
  max-width: 58rem;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}
header.site .brand {
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
header.site nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
header.site nav a {
  font-size: 0.76rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
header.site nav a:hover { color: var(--brass); }
header.site nav a[aria-current="page"] { color: var(--brass); }

main { max-width: 58rem; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }

footer.site {
  border-top: 1px solid var(--rule);
  max-width: 58rem;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
  font-size: 0.83rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
footer.site p { max-width: 60ch; }

/* ----------------------------------------------------------------- prose */
.prose { max-width: 66ch; display: flex; flex-direction: column; gap: 1rem; }
.prose h1 {
  font-family: var(--display);
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-weight: 400;
  text-wrap: balance;
}
.prose h2 {
  font-family: var(--display);
  font-size: clamp(1.25rem, 3vw, 1.55rem);
  line-height: 1.25;
  color: var(--ink);
  font-weight: 400;
  margin-top: 0.9rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
}
.prose h3, .prose h4 {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 700;
  margin-top: 0.7rem;
}
.prose .lead { font-family: var(--display); font-size: 1.15rem; line-height: 1.5; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.4rem; }
.prose li::marker { color: var(--brass); }
.prose blockquote {
  border-left: 3px solid var(--brass);
  padding-left: 1rem;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.05rem;
}
.prose code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--brass-soft);
  padding: 0.1em 0.35em;
  border-radius: 2px;
}
.kicker {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}
.kicker a { color: var(--brass); text-decoration: none; }

strong { color: var(--ink); font-weight: 600; }
a { color: var(--brass); text-underline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

/* ----------------------------------------------------------------- lists */
ul.cards {
  list-style: none;
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1rem;
}
ul.cards a {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  height: 100%;
  background: var(--panel);
  border: 1px solid var(--rule);
  padding: 1.1rem 1.2rem;
  text-decoration: none;
  color: var(--body);
}
ul.cards a:hover { border-color: var(--brass); }
ul.cards h2 {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink);
}
ul.cards p { font-size: 0.87rem; line-height: 1.5; color: var(--muted); }

nav.pager {
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2rem;
  justify-content: space-between;
  font-size: 0.87rem;
}
nav.pager a { text-decoration: none; }
nav.pager a:hover { text-decoration: underline; }

/* ------------------------------------------------------- grouped updates */
section.group { margin-top: 2.5rem; }
section.group h2 {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--ink);
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
section.group h2 .count {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
section.group ul.cards { margin-top: 1rem; }
ul.cards h3 {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink);
}
