:root {
  color-scheme: light;
  --paper: #f5f7f4;
  --surface: #ffffff;
  --ink: #1d2926;
  --muted: #5e6b67;
  --line: #d6ddd9;
  --forest: #173d35;
  --lake: #416a82;
  --rust: #a64d36;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--forest);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

a:focus-visible {
  outline: 3px solid var(--lake);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.6rem 0.9rem;
  color: #ffffff;
  background: var(--forest);
  transform: translateY(-180%);
}

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

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

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

.header-inner {
  min-height: 4.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-weight: 720;
  text-decoration: none;
}

.wordmark img {
  width: 2rem;
  height: 2rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

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

.site-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rust);
  text-decoration-thickness: 2px;
}

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

.intro {
  max-width: 51rem;
  padding: 5rem 0 3.5rem;
}

.eyebrow,
.note-meta {
  margin: 0 0 0.8rem;
  color: var(--rust);
  font-size: 0.84rem;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--ink);
  line-height: 1.13;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
}

h1 {
  margin-bottom: 1.3rem;
  font-size: 4rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.45rem;
}

.lead {
  max-width: 44rem;
  margin: 0;
  color: #35443f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  line-height: 1.55;
}

.cover-image {
  margin: 0;
}

.cover-image img {
  width: 100%;
  height: 32rem;
  border-radius: 4px;
  object-fit: cover;
}

.cover-image figcaption {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.latest {
  padding: 6rem 0 7rem;
}

.section-heading {
  max-width: 38rem;
  margin-bottom: 2.2rem;
}

.section-heading h2 {
  margin-bottom: 0;
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.note-card {
  min-height: 19rem;
  padding: 2rem 2rem 2rem 0;
}

.note-card + .note-card {
  padding-left: 2rem;
  border-left: 1px solid var(--line);
}

.note-card h3 {
  margin-bottom: 1rem;
}

.note-card h3 a,
.archive-list h2 a {
  color: inherit;
  text-decoration: none;
}

.note-card p:not(.note-meta) {
  color: var(--muted);
}

.text-link {
  font-weight: 700;
}

.archive-link {
  margin: 1rem 0 0;
}

.button-link {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  padding: 0.65rem 1rem;
  border: 1px solid var(--forest);
  border-radius: 4px;
  color: #ffffff;
  background: var(--forest);
  font-weight: 700;
  text-decoration: none;
}

.button-link:hover {
  color: #ffffff;
  background: #255b4f;
}

.page-heading {
  max-width: 50rem;
  padding: 5.5rem 0 3.5rem;
  border-bottom: 1px solid var(--line);
}

.page-heading h1 {
  font-size: 3.2rem;
}

.prose-page,
.archive-page {
  min-height: 68vh;
  padding-bottom: 7rem;
}

.prose {
  max-width: 44rem;
  padding-top: 3rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
}

.prose h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.8rem;
  font-size: 1.5rem;
}

.prose p {
  margin: 0 0 1.4rem;
}

.updated {
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.86rem;
}

.back-link {
  margin-top: 3rem;
}

.archive-list {
  max-width: 52rem;
}

.archive-list article {
  padding: 2.4rem 0;
  border-bottom: 1px solid var(--line);
}

.archive-list h2 {
  margin-bottom: 0.7rem;
  font-size: 1.7rem;
}

.archive-list article > p:last-child {
  margin: 0;
  color: var(--muted);
}

.not-found {
  min-height: 68vh;
  padding: 7rem 0;
}

.not-found h1 {
  max-width: 50rem;
  font-size: 3.2rem;
}

.not-found > p:not(.eyebrow) {
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
}

.footer-inner {
  min-height: 9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.footer-inner p {
  margin: 0;
  font-size: 0.9rem;
}

.footer-inner strong {
  color: var(--ink);
}

.footer-inner nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
}

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

  .header-inner {
    min-height: 4.25rem;
  }

  .site-nav {
    gap: 1rem;
  }

  .intro,
  .page-heading {
    padding-top: 3.5rem;
  }

  h1,
  .page-heading h1,
  .not-found h1 {
    font-size: 2.65rem;
  }

  .lead {
    font-size: 1.18rem;
  }

  .latest {
    padding: 4rem 0 5rem;
  }

  .cover-image img {
    height: 17rem;
  }

  .note-grid {
    grid-template-columns: 1fr;
  }

  .note-card {
    min-height: 0;
    padding: 1.8rem 0;
  }

  .note-card + .note-card {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .footer-inner {
    padding: 2rem 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-inner nav {
    flex-wrap: wrap;
  }
}

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