/* ─────────────────────────────────────────────────────────────────────────
   Blog styles. Layered on top of styles.css and reusing its tokens
   (--ink, --muted, --green, --brand, --forest, --paper, --line, --radius).
   Loaded only on /blog routes and the admin panel's preview.
   ───────────────────────────────────────────────────────────────────────── */

/* ── Index hero ──────────────────────────────────────────────────────────── */

.blog-hero {
  padding-block: 84px 40px;
  max-width: 780px;
}
.blog-hero .eyebrow { color: #64804b; margin-bottom: 20px; }
.blog-hero h1 {
  font-size: clamp(38px, 5vw, 62px);
  letter-spacing: -2.6px;
  line-height: 1.06;
  font-weight: 550;
}
.blog-hero-sub {
  margin-top: 20px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
  max-width: 560px;
}
.blog-clear {
  display: inline-block;
  margin-top: 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--forest);
  border-bottom: 1px solid #315e2a44;
  padding-bottom: 2px;
}
.blog-clear:hover { border-color: var(--forest); }

/* ── Card grid ───────────────────────────────────────────────────────────── */

.blog-list { padding-bottom: 96px; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.blog-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 44px #17281c14;
}
.blog-card-link { display: flex; flex-direction: column; height: 100%; }

.blog-card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #eef3e6;
}
.blog-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.blog-card:hover .blog-card-media img { transform: scale(1.04); }
.blog-card-media-empty {
  background: linear-gradient(135deg, #eaf0d8, #f4f8ea 60%, #e3eed3);
}

.blog-card-body {
  padding: 24px 24px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #7b8676;
  flex-wrap: wrap;
}
.blog-chip {
  background: #eaf0d8;
  color: #4c6242;
  font-weight: 650;
  font-size: 10px;
  letter-spacing: .9px;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 100px;
}
.blog-card h2 {
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -.9px;
  font-weight: 600;
}
.blog-card-body > p {
  font-size: 14px;
  line-height: 1.68;
  color: #65705f;
  flex: 1;
}
.blog-card-more {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 650;
  color: var(--forest);
  margin-top: 4px;
}
.blog-card-more .icon { width: 17px; height: 17px; transition: transform .3s var(--ease); }
.blog-card:hover .blog-card-more .icon { transform: translateX(4px); }

.blog-empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 64px 32px;
  text-align: center;
  color: var(--muted);
  font-size: 16px;
}

/* ── Pagination ──────────────────────────────────────────────────────────── */

.blog-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 56px;
}
.blog-pager-count { font-size: 13px; color: var(--muted); }
.button-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.button-ghost:hover { background: #fff; border-color: #c9d3c0; }

/* ── Article ─────────────────────────────────────────────────────────────── */

.post {
  max-width: 760px;
  padding-block: 56px 40px;
}
.post-crumbs {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.post-crumbs a { color: var(--forest); font-weight: 600; }
.post-crumbs span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 420px;
}

.post-head h1 {
  font-size: clamp(33px, 4.4vw, 52px);
  line-height: 1.08;
  letter-spacing: -2.1px;
  font-weight: 550;
}
.post-standfirst {
  margin-top: 20px;
  font-size: 19px;
  line-height: 1.6;
  color: #4d5a4e;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}
.post-read { display: inline-flex; align-items: center; gap: 7px; }
.post-read .icon { width: 15px; height: 15px; }

.post-cover {
  margin: 36px 0 8px;
  border-radius: var(--radius);
  overflow: hidden;
}
.post-cover img { width: 100%; }

/* ── Prose ───────────────────────────────────────────────────────────────── */

.post-body {
  font-size: 17px;
  line-height: 1.78;
  color: #2b382d;
}
.post-body > * + * { margin-top: 24px; }
.post-body h2 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -1.2px;
  margin-top: 52px;
  font-weight: 600;
}
.post-body h3 {
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -.6px;
  margin-top: 40px;
  font-weight: 600;
}
.post-body h4 { font-size: 18px; margin-top: 32px; font-weight: 650; }
.post-body p { margin-top: 24px; }
.post-body a {
  color: var(--forest);
  font-weight: 550;
  border-bottom: 1px solid #315e2a3d;
}
.post-body a:hover { border-color: var(--forest); }
.post-body ul, .post-body ol { padding-left: 24px; }
.post-body li + li { margin-top: 10px; }
.post-body li::marker { color: var(--brand); }
.post-body img {
  border-radius: 20px;
  margin-block: 32px;
}
.post-body blockquote {
  border-left: 3px solid var(--green);
  padding: 4px 0 4px 24px;
  margin-left: 0;
  color: #4d5a4e;
  font-size: 19px;
  line-height: 1.6;
}
.post-body code {
  background: #eef3e6;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: .88em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.post-body pre {
  background: #17281c;
  color: #e9f2e2;
  border-radius: 18px;
  padding: 22px 24px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}
.post-body pre code { background: none; padding: 0; color: inherit; }
.post-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin-block: 44px;
}
.post-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  display: block;
  overflow-x: auto;
}
.post-body th, .post-body td {
  border: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
}
.post-body th { background: #f2f6ec; font-weight: 650; }

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  list-style: none;
  padding: 0;
  margin-top: 48px;
}
.post-tags a {
  display: inline-block;
  background: #eef3e6;
  color: #4c6242;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 100px;
}
.post-tags a:hover { background: var(--green); }

.post-back {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
}
.post-back a { color: var(--forest); }

/* ── Closing CTA ─────────────────────────────────────────────────────────── */

.blog-cta {
  width: min(1280px, calc(100% - 112px));
  margin: 0 auto 96px;
}
.blog-cta-inner {
  background: #eaf0d8;
  border-radius: var(--radius);
  padding: 56px 48px;
  text-align: center;
}
.blog-cta-inner h2 {
  font-size: clamp(27px, 3vw, 38px);
  letter-spacing: -1.4px;
  line-height: 1.15;
}
.blog-cta-inner p {
  margin: 16px auto 28px;
  max-width: 460px;
  color: #56634f;
  font-size: 15px;
  line-height: 1.65;
}

.blog-404 { text-align: center; padding-block: 120px 80px; }
.blog-404 .eyebrow { justify-content: center; text-align: center; }
.blog-404 .blog-hero-sub { margin-inline: auto; }
.blog-404 .button { margin-top: 28px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 980px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .blog-hero { padding-block: 60px 32px; }
  .blog-cta-inner { padding: 44px 32px; }
}

@media (max-width: 760px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-list { padding-bottom: 64px; }
  .post { padding-block: 36px 24px; }
  .post-body { font-size: 16px; }
  .post-body h2 { font-size: 25px; margin-top: 42px; }
  .post-body h3 { font-size: 20px; }
  .post-standfirst { font-size: 17px; }
  .post-crumbs span:last-child { max-width: 200px; }
  .blog-pager { flex-direction: column; gap: 14px; }
  .blog-cta { margin-bottom: 64px; }
  .blog-cta-inner { padding: 36px 22px; }
}
