:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --ink: #1c1a17;
  --ink-soft: #55504a;
  --ink-faint: #8b847c;
  --rule: #e4dfd7;
  --accent: #7a5c2e;
  --accent-soft: #f2ece1;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161513;
    --surface: #1e1c1a;
    --ink: #ece7e0;
    --ink-soft: #b3aca3;
    --ink-faint: #857e75;
    --rule: #322e2a;
    --accent: #c9a468;
    --accent-soft: #262220;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- header ---- */

.site-head {
  border-bottom: 1px solid var(--rule);
  padding: 1.75rem 0 1.25rem;
  margin-bottom: 3rem;
}

.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.mark {
  width: 1.6rem;
  height: 1.6rem;
  flex: none;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wordmark span { color: var(--accent); }

.tagline {
  display: block;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 0.35rem;
  font-weight: 500;
}

nav {
  font-family: var(--sans);
  font-size: 0.875rem;
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---- type ---- */

h1 {
  font-size: 2.125rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  font-weight: 600;
}

h2 {
  font-size: 1.375rem;
  line-height: 1.3;
  margin: 2.75rem 0 0.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.0625rem;
  margin: 2rem 0 0.5rem;
  font-weight: 600;
}

p { margin: 0 0 1.25rem; }

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

ul, ol { padding-left: 1.25rem; margin: 0 0 1.25rem; }
li { margin-bottom: 0.5rem; }

strong { font-weight: 600; }

.lede {
  font-size: 1.1875rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.meta {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--ink-faint);
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

/* ---- article list ---- */

.article-list { list-style: none; padding: 0; margin: 0; }

.article-list li {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
  margin: 0;
}

.article-list h2 {
  margin: 0 0 0.4rem;
  font-size: 1.25rem;
}

.article-list h2 a { color: var(--ink); text-decoration: none; }
.article-list h2 a:hover { color: var(--accent); }

.article-list p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
}

.kicker {
  display: block;
  font-family: var(--sans);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.4rem;
  font-weight: 600;
}

/* ---- callout ---- */

.note {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 2rem 0;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.note p:last-child { margin-bottom: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
  font-family: var(--sans);
}

th, td {
  text-align: left;
  padding: 0.6rem 0.75rem 0.6rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

th { font-weight: 600; color: var(--ink); }
td { color: var(--ink-soft); }

.scroll-x { overflow-x: auto; }

/* ---- footer ---- */

.site-foot {
  border-top: 1px solid var(--rule);
  margin-top: 5rem;
  padding: 2rem 0 3rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--ink-faint);
}

.site-foot nav {
  font-size: 0.8125rem;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.site-foot p { margin: 0 0 0.6rem; line-height: 1.6; }

@media (max-width: 34rem) {
  h1 { font-size: 1.75rem; }
  .site-head .wrap { flex-direction: column; align-items: flex-start; }
}
