:root {
  color-scheme: light dark;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.75;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --paper: #f5f1e8;
  --sheet: #fffdf8;
  --ink: #292820;
  --muted: #656257;
  --accent: #9a5038;
  --accent-soft: #e8d7ca;
  --olive: #58634b;
  --rule: #d9d2c4;
  --shadow: 0 24px 70px rgb(58 47 34 / 7%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #211f1a;
    --sheet: #292720;
    --ink: #f0ebdf;
    --muted: #c2bcad;
    --accent: #e0a58b;
    --accent-soft: #49362e;
    --olive: #c4cda9;
    --rule: #484438;
    --shadow: 0 24px 70px rgb(0 0 0 / 18%);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(ellipse at 50% -24rem, rgb(154 80 56 / 10%), transparent 48rem),
    var(--paper);
  color: var(--ink);
}

a {
  color: var(--accent);
  text-decoration-thickness: .07em;
  text-underline-offset: .2em;
}

a:hover { color: var(--olive); }

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

code {
  padding: .12em .35em;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  font-size: .88em;
  overflow-wrap: anywhere;
}

.skip-link {
  position: absolute;
  z-index: 2;
  top: .75rem;
  left: .75rem;
  padding: .65rem .9rem;
  transform: translateY(-160%);
  border-radius: .2rem;
  background: var(--sheet);
  color: var(--ink);
}

.skip-link:focus { transform: translateY(0); }

.site-header,
.site-footer {
  width: min(100% - 3rem, 72rem);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 5.5rem;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  color: var(--ink);
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .16em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
}

.site-nav a {
  color: var(--muted);
  font-size: .84rem;
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: .4em;
}

main {
  width: min(100% - 3rem, 72rem);
  margin: clamp(3rem, 8vw, 7rem) auto clamp(4rem, 9vw, 8rem);
}

article {
  position: relative;
  width: min(100%, 54rem);
  margin-inline: auto;
  padding: clamp(2rem, 7vw, 5.5rem);
  border: 1px solid var(--rule);
  background: var(--sheet);
  box-shadow: var(--shadow);
}

article::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(var(--accent), var(--olive));
  content: "";
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--olive);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: Iowan Old Style, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-weight: 500;
}

h1 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 5rem);
  letter-spacing: -.045em;
  line-height: 1.02;
}

h2 {
  margin: 2.8rem 0 .7rem;
  font-size: clamp(1.45rem, 3vw, 1.8rem);
  letter-spacing: -.025em;
  line-height: 1.2;
}

p,
li { color: var(--muted); }

article > .lede {
  max-width: 61ch;
  margin-top: 1.7rem;
  font-size: 1.07rem;
}

article > p { max-width: 68ch; }

article > p + p { margin-top: 1rem; }

article h2 + p { margin-top: .5rem; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 1.5rem 2rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .82rem;
}

.site-footer p { margin: 0; }

@media (max-width: 600px) {
  .site-header,
  .site-footer {
    width: min(100% - 2rem, 72rem);
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: .65rem;
    padding-block: 1.2rem;
  }

  .site-nav { gap: .5rem 1rem; }

  main {
    width: min(100% - 1.25rem, 72rem);
    margin-block: 1.25rem 3rem;
  }

  article { padding: 2rem 1.5rem 2.5rem; }

  .site-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
