*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #fffdf9;
  --surface:  #ffffff;
  --green:    #2d6a4f;
  --green-lt: #52b788;
  --green-xs: #d8f3dc;
  --ink:      #1a1c18;
  --muted:    #6b7068;
  --border:   #e4e9e2;
  --amber:    #e07b39;
  --r:        16px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ─────────────────────────────────────── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.logo {
  font-family: 'Fraunces', serif;
  font-weight: 900; font-size: 1.3rem;
  color: var(--green); text-decoration: none;
  letter-spacing: -.02em;
  display: flex; align-items: center; gap: .4rem;
}
.nav-back {
  font-size: .82rem;
  color: var(--muted);
  text-decoration: none;
  display: flex; align-items: center; gap: .3rem;
}
.nav-back:hover { color: var(--green); }

/* ── PAGE HEADER ─────────────────────────────── */
.page-header {
  padding: 2.5rem 1.25rem 1.5rem;
  max-width: 680px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}
.page-header p {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green-lt);
  margin-bottom: .5rem;
}
.page-header h1 {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: 2rem;
  letter-spacing: -.03em;
  color: var(--ink);
  line-height: 1.1;
}

/* ── BLOG FILTERS ────────────────────────────── */
.blog-filters {
  max-width: 680px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}

.blog-search-wrap {
  position: relative;
}

.blog-search-icon {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #b0b5ae;
  pointer-events: none;
}

#blog-search {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: .7rem 1rem .7rem 2.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  -webkit-appearance: none;
  transition: border-color .2s;
}
#blog-search::placeholder { color: #b0b5ae; font-weight: 300; }
#blog-search:focus { border-color: var(--green-lt); }

.blog-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.blog-tag-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .04em;
  padding: .35rem .85rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  white-space: nowrap;
}
.blog-tag-btn:hover {
  border-color: var(--green-lt);
  color: var(--green);
}
.blog-tag-btn.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.blog-no-results {
  display: none;
  max-width: 680px;
  margin: 2rem auto 0;
  padding: 0 1.25rem;
  font-size: .88rem;
  color: var(--muted);
  text-align: center;
}

/* ── ARTICLE LIST ────────────────────────────── */
.article-list {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

/* ── ARTICLE ─────────────────────────────────── */
.article {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}
.article:last-child { border-bottom: none; }

.article-tag {
  font-size: .7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--green);
  display: inline-block;
  margin-bottom: .6rem;
}

.article h2 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -.02em;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: .6rem;
}

.article-meta {
  font-size: .75rem;
  color: #b0b5ae;
  margin-bottom: .4rem;
}

.article-author {
  font-size: .78rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.article p a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-color: var(--green-xs);
  text-underline-offset: 3px;
  transition: text-decoration-color .2s;
}
.article p a:hover { text-decoration-color: var(--green); }

.article p {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: .9rem;
}
.article p:last-of-type { margin-bottom: 1.25rem; }

.article h3 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: -.01em;
  margin: 1.4rem 0 .5rem;
}

.article strong { color: var(--ink); font-weight: 500; }

.article ol {
  list-style: decimal;
  list-style-position: outside;
  padding-left: 1.35rem;
  margin: .5rem 0 1.25rem;
}

.article ol li {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.8;
  padding-left: .4rem;
  margin-bottom: 1rem;
}

.article ol li:last-child {
  margin-bottom: 0;
}

.article ol li strong {
  color: var(--ink);
  font-weight: 500;
}

.article blockquote {
  border-left: 3px solid var(--green-lt);
  padding: .6rem 1rem;
  margin: 1rem 0;
  background: var(--green-xs);
  border-radius: 0 var(--r) var(--r) 0;
  font-size: .88rem;
  color: var(--green);
  font-style: italic;
  line-height: 1.6;
}

/* inline search CTA */
.article-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.25rem;
  margin-top: 1.5rem;
}
.article-cta p {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: .75rem;
  font-style: italic;
}
.article-cta .cta-row {
  display: flex; flex-direction: column; gap: .5rem;
}
.article-cta input {
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: .75rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  outline: none;
  -webkit-appearance: none;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 500;
}
.article-cta input::placeholder {
  text-transform: none; letter-spacing: 0;
  font-weight: 300; color: #b0b5ae;
}
.article-cta input:focus { border-color: var(--green-lt); }
.article-cta button {
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: .75rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem; font-weight: 500;
  cursor: pointer;
  -webkit-appearance: none;
}
.article-cta button:hover { background: #235c42; }

/* ── POST CARDS (listing + related) ─────────── */
.post-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem 1.25rem 4rem;
  max-width: 680px;
  margin: 0 auto;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s;
}
.post-card:hover {
  border-color: var(--green-lt);
  box-shadow: 0 2px 16px rgba(45,106,79,.08);
}
.post-card-tag {
  font-size: .68rem;
  font-weight: 500;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.post-card h3 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: -.01em;
}
.post-card p {
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.55;
}
.post-card-meta {
  font-size: .72rem;
  color: #b0b5ae;
  margin-top: .1rem;
}

/* ── SINGLE ARTICLE PAGE ─────────────────────── */
.article-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

.article-page .article {
  border-bottom: none;
  padding-bottom: 0;
}

.article-page .article h1 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: -.03em;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: .6rem;
}

/* ── RELATED ARTICLES ────────────────────────── */
.related {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.related h2 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-bottom: 1rem;
}
.related .post-cards {
  padding: 0;
}

/* ── ARTICLE CTA DROPDOWN ────────────────────── */
.article-cta .cta-input-wrap {
  position: relative;
  flex: 1;
}

.article-cta .search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--surface);
  border: 2px solid var(--green-lt);
  border-radius: var(--r);
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
  list-style: none;
  padding: .3rem;
  z-index: 20;
  max-height: 220px;
  overflow-y: auto;
}
.article-cta .search-dropdown.open { display: block; }

.article-cta .search-dropdown-item {
  padding: .6rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .88rem;
  color: var(--ink);
  cursor: pointer;
  border-radius: 10px;
  transition: background .15s;
}
.article-cta .search-dropdown-item:hover,
.article-cta .search-dropdown-item.active {
  background: var(--green-xs);
  color: var(--green);
}
.article-cta .search-dropdown-item mark {
  background: none;
  color: var(--green);
  font-weight: 500;
}

/* ── ARTICLE IMAGES ──────────────────────────── */
.article figure {
  margin: 2.25rem 0;
}

.article figcaption {
  font-size: .72rem;
  color: #b0b5ae;
  margin-top: .45rem;
}

.article figure img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 12px;
}

/* ── DESKTOP ─────────────────────────────────── */
@media (min-width: 600px) {
  nav, .page-header, .blog-filters, .article-list, .post-cards, .article-page { padding-left: 2.5rem; padding-right: 2.5rem; }
  .article-cta .cta-row { flex-direction: row; }
  .article-cta input { flex: 1; }
  .article-cta button { white-space: nowrap; }
  .related .post-cards { padding-left: 0; padding-right: 0; }
}
