:root {
  color-scheme: light;
  --paper: #f6f7f1;
  --surface: #fff;
  --ink: #222b25;
  --muted: #59665c;
  --green: #294c38;
  --pine: #243e32;
  --sage: #eaf0e5;
  --straw: #ead48e;
  --line: #d5ded2;
  --link-hover-bg: #dce9dc;
  --heading: Georgia, "Times New Roman", serif;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img { display: block; width: 100%; height: auto; }
a { color: inherit; }
a:hover {
  color: var(--link-hover-color, var(--green));
  background-color: var(--link-hover-bg);
  border-radius: .15em;
  text-decoration: none;
}
a:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--heading); font-weight: 700; }
h1 { font-size: clamp(2.5rem, 5.2vw, 4.5rem); line-height: 1.03; overflow-wrap: anywhere; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.55rem); line-height: 1.12; }
h3 { font-size: clamp(1.3rem, 2.1vw, 1.65rem); line-height: 1.19; }
p { line-height: 1.65; }

.container { width: min(100% - 3rem, 74rem); margin-inline: auto; }
.skip-link { position: absolute; left: 1rem; top: -5rem; background: var(--surface); padding: .7rem 1rem; z-index: 1; }
.skip-link:focus { top: 1rem; }

.site-header { background: var(--surface); border-top: .3rem solid var(--pine); }
.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.header-inner { min-height: 5.65rem; padding-block: .85rem; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--pine);
  font: 700 clamp(1.7rem, 3vw, 2.65rem)/1 var(--heading);
  letter-spacing: -.045em;
  text-decoration: none;
}
.brand img { width: 2.5rem; height: 2.5rem; }
.site-nav { background: var(--sage); border-block: 1px solid var(--line); }
.site-nav ul, .footer-nav ul { display: flex; flex-wrap: wrap; padding: 0; list-style: none; }
.site-nav ul { margin-block: 0; column-gap: clamp(1rem, 2.8vw, 2rem); }
.site-nav a {
  display: flex;
  align-items: center;
  min-height: 2.8rem;
  padding-block: .45rem;
  color: var(--ink);
  font-size: .93rem;
  font-weight: 600;
  text-decoration: none;
}
.site-nav a[aria-current] { color: var(--green); box-shadow: inset 0 -3px var(--green); }

.home { padding-block: 1.65rem 4rem; }
.home-feature { display: grid; grid-template-columns: minmax(0, 2.05fr) minmax(0, 1fr); gap: 1.5rem; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: .6rem; overflow: clip; }
.feature__image { aspect-ratio: 2.25 / 1; object-fit: cover; object-position: center 57%; background: var(--sage); }
.feature__copy { padding: clamp(1.15rem, 2.7vw, 2.1rem); }
.feature h1 { margin-block: .58rem .7rem; font-size: clamp(2.25rem, 4.2vw, 3.55rem); text-wrap: balance; }
.feature p { max-width: 60ch; color: var(--muted); font-size: 1.03rem; }
.feature h1 a, .post-showcase h3 a, .post-card h3 a { text-decoration: none; }

.post-showcase {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: clamp(1.25rem, 2.6vw, 2rem);
  border-radius: .6rem;
  background: var(--pine);
  color: #fff;
}
.post-showcase h2 { margin-bottom: .75rem; font-size: clamp(1.5rem, 2.5vw, 2.1rem); }
.post-showcase__item {
  display: grid;
  flex: 1;
  grid-template-columns: min(32%, 6.25rem) minmax(0, 1fr);
  align-items: center;
  gap: .9rem;
  padding-block: .9rem;
  border-top: 1px solid #587265;
}
.post-showcase__item img { aspect-ratio: 1; object-fit: cover; border-radius: .2rem; background: var(--sage); }
.post-showcase h3 { margin-top: .32rem; font-size: clamp(1.125rem, 1.55vw, 1.35rem); overflow-wrap: anywhere; }
.post-showcase .category-label { color: var(--straw); }
.post-showcase .post-date { color: var(--line); white-space: nowrap; }
.post-showcase, .site-footer { --link-hover-bg: #3b584a; --link-hover-color: var(--straw); }
.post-showcase a:focus-visible, .site-footer a:focus-visible { outline-color: var(--straw); }

.category-label, .text-link { color: var(--green); font-weight: 700; text-underline-offset: .23em; }
.category-label { font-size: .83rem; }
.text-link { font-size: .93rem; }
.post-list { margin-top: 2.7rem; }
.post-list--standalone { margin-top: 0; }
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--line);
}
.page-label { color: var(--muted); font-size: .88rem; }
.posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1.5rem; padding-top: 1.2rem; }
.post-card__image { display: block; }
.post-card__image img { aspect-ratio: 16 / 10; object-fit: cover; border-radius: .4rem; background: var(--sage); }
.post-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .75rem; }
.post-card .post-meta { margin-block: .8rem .42rem; }
.post-date { color: var(--muted); font-size: .84rem; }
.post-card p { color: var(--muted); margin-top: .45rem; font-size: .95rem; }

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .45rem;
  margin-top: 2.15rem;
}
.pagination a, .pagination span {
  display: inline-grid;
  min-width: 2.75rem;
  min-height: 2.75rem;
  place-items: center;
  padding-inline: .85rem;
  border: 1px solid var(--line);
  border-radius: .25rem;
  color: var(--green);
  font-size: .93rem;
  font-weight: 650;
  text-decoration: none;
}
.pagination a:hover { border-color: var(--green); background: var(--sage); }
.pagination [aria-current="page"] { border-color: var(--green); background: var(--green); color: #fff; }

.archive, .story { padding-bottom: 4rem; }
.breadcrumbs { padding-top: 1.25rem; color: var(--muted); font-size: .85rem; }
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.breadcrumbs li { display: flex; gap: .6rem; }
.breadcrumbs a { text-underline-offset: .22em; }
.archive-heading {
  margin-top: 1.4rem;
  padding: clamp(1.4rem, 4.3vw, 3rem);
  border-inline-start: .25rem solid var(--green);
  border-radius: .4rem;
  background: var(--sage);
}
.archive-heading p, .story-heading p { color: var(--muted); margin-top: .8rem; font-size: 1.12rem; }
.archive-heading p { max-width: 55ch; }
.empty-archive { margin-top: 1.8rem; }
.empty-archive p { margin-bottom: .5rem; }
.story-heading, .story-body { width: min(100%, 44rem); margin-inline: auto; }
.story-heading { padding-block: 2.25rem 1.65rem; }
.story-heading h1 { margin-top: .6rem; }
.story-cover { width: min(100%, 57rem); margin-inline: auto; aspect-ratio: 1.9 / 1; object-fit: cover; border-radius: .5rem; background: var(--sage); }
.story-body { padding-top: 1.75rem; font-size: 1.03rem; }
.story-body h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); margin-bottom: .7rem; }
.story-body h2[id] { scroll-margin-top: 1rem; }
.story-body p + p { margin-top: .85rem; }
.story-body p + h2, .story-contents + h2 { margin-top: 1.8rem; }
.story-body li + li:not(.story-contents li) { margin-block-start: .25rem; }
.story-body a { color: var(--green); text-underline-offset: .2em; }
.story-contents {
  padding: 1rem clamp(.85rem, 3vw, 1.5rem) .6rem;
  border: 1px solid var(--line);
  border-inline-start: .25rem solid var(--green);
  border-radius: .4rem;
  background: var(--sage);
}
.story-contents > p {
  margin: 0 .55rem .55rem;
  color: var(--pine);
  font: 700 1.3rem/1.25 var(--heading);
}
.story-contents ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.story-contents li + li { border-block-start: 1px solid var(--line); }
.story-contents a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 2.75rem;
  padding: .55rem .65rem;
  border-radius: .25rem;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-decoration: none;
}
.story-contents a::after {
  content: '';
  flex: 0 0 .4rem;
  height: .4rem;
  margin-inline-end: .25rem;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-.12rem) rotate(45deg);
}
.story-contents a:focus-visible { outline-offset: -2px; }
.story-body p > img { margin-block: 1.25rem; border-radius: .5rem; }
.story-body table {
  width: 100%;
  margin-block: 1.25rem;
  border-collapse: collapse;
  background: var(--surface);
  font-size: .95rem;
  line-height: 1.45;
}
.story-body :is(th, td) {
  padding: .65rem clamp(.35rem, 1.5vw, .8rem);
  border: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: anywhere;
}
.story-body th:not([align]) { text-align: start; }
.story-body thead th { background: var(--sage); color: var(--pine); }
.related { padding-bottom: 3rem; }

.site-footer { background: var(--pine); color: #f4f7ee; }
.footer-inner { min-height: 9rem; padding-block: 1.65rem; }
.site-footer .brand { color: inherit; font-size: clamp(1.5rem, 2.5vw, 1.9rem); }
.site-footer .brand img { width: 2rem; height: 2rem; border: 1px solid #587265; border-radius: .4rem; }
.footer-inner p { margin-top: .35rem; color: #d4dfd2; font-size: .9rem; }
.footer-nav ul { justify-content: end; gap: .55rem 1.2rem; margin: 0; font-size: .9rem; }
.footer-nav a { text-underline-offset: .23em; }

@media (max-width: 54rem) {
  .home-feature { grid-template-columns: 1fr; }
}

@media (max-width: 48rem) {
  .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .footer-nav ul { justify-content: start; }
}

@media (max-width: 34rem) {
  .container { width: calc(100% - 2rem); }
  .header-inner { min-height: 0; align-items: flex-start; flex-direction: column; gap: .4rem; }
  .site-nav ul { column-gap: .95rem; }
  .site-nav a { min-height: 2.35rem; font-size: .88rem; }
  .home { padding-top: 1rem; }
  .feature__image { aspect-ratio: 3 / 2; }
  .feature h1 { font-size: clamp(2rem, 9vw, 3rem); }
  .post-showcase__item { grid-template-columns: 5.5rem minmax(0, 1fr); padding-block: .85rem; }
  .posts-grid { grid-template-columns: 1fr; }
  .story-cover { aspect-ratio: 4 / 3; }
  .story, .archive { padding-bottom: 2.5rem; }
}
