/* =================================================================
   Blog — article prose + listing
   (loaded after styles.css, reuses the same tokens)
   ================================================================= */

/* ---- Blog index ---- */
.blog-hero { padding-bottom: 40px; }
.blog-hero__title { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; line-height: 1.15; margin: 14px 0 14px; letter-spacing: -0.01em; }
.blog-hero__sub { color: var(--muted); font-size: 18px; max-width: 52ch; }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.post-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; background: var(--bg);
  transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.post-card:hover {
  border-color: color-mix(in srgb, var(--green) 45%, var(--line));
  transform: translateY(-4px);
  box-shadow: 0 24px 50px -34px rgba(22,179,100,.5);
}
.post-card__date { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--muted); }
.post-card__title { font-size: 22px; font-weight: 700; line-height: 1.35; margin: 12px 0 10px; }
.post-card__excerpt { color: var(--muted); font-size: 15px; line-height: 1.8; flex: 1; }
.post-card__more { color: var(--green); font-weight: 600; font-size: 14.5px; margin-top: 18px; }

/* ---- Article ---- */
.article-wrap { max-width: 760px; margin-inline: auto; padding-top: clamp(32px, 6vw, 64px); }
.article-back { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.article-back:hover { color: var(--green); }
.article-kicker {
  display: block; margin-top: 20px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--green);
}
.article-title { font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 700; line-height: 1.2; margin: 10px 0 12px; letter-spacing: -0.01em; text-wrap: balance; }
.article-meta { font-family: var(--font-mono); font-size: 13px; color: var(--muted); padding-bottom: 26px; border-bottom: 1px solid var(--line); margin-bottom: 34px; }

/* ---- Prose ---- */
.prose { font-size: 18px; line-height: 1.95; color: var(--ink-2); }
.prose > * + * { margin-top: 22px; }
.prose h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; color: var(--ink); line-height: 1.3; margin-top: 44px; letter-spacing: -0.01em; }
.prose h3 { font-size: 1.3rem; font-weight: 600; color: var(--ink); margin-top: 34px; }
.prose p { color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--green-strong); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
html[data-theme="dark"] .prose a { color: var(--green); }
.prose a:hover { text-decoration-thickness: 2px; }
.prose ul, .prose ol { padding-inline-start: 26px; display: grid; gap: 10px; }
.prose li { color: var(--ink-2); }
.prose ul li { list-style: none; position: relative; padding-inline-start: 22px; }
.prose ul li::before { content: ""; position: absolute; inset-inline-start: 0; top: 13px; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.prose ol { list-style: decimal; }
.prose ol li { padding-inline-start: 4px; }
.prose ol li::marker { color: var(--green); font-family: var(--font-mono); font-weight: 600; }
.prose blockquote {
  border-inline-start: 3px solid var(--green);
  background: var(--green-tint);
  padding: 18px 22px; border-radius: 0 12px 12px 0;
  font-size: 1.15rem; font-weight: 500; color: var(--ink);
}
.prose code { font-family: var(--font-mono); font-size: .88em; background: var(--bg-soft); border: 1px solid var(--line); padding: 2px 7px; border-radius: 6px; }
.prose figure { margin: 30px 0; }
.prose figure img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 40px 0; }

/* ---- Article CTA ---- */
.article-cta {
  margin-top: 54px; padding: 34px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-soft); text-align: center;
}
.article-cta p { font-size: 19px; font-weight: 600; color: var(--ink); margin-bottom: 20px; }

/* ---- Case studies index ---- */
.cs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.cs-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; background: var(--bg);
  transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.cs-card:hover {
  border-color: color-mix(in srgb, var(--green) 45%, var(--line));
  transform: translateY(-4px);
  box-shadow: 0 24px 50px -34px rgba(22,179,100,.5);
}
.cs-card__result { font-family: var(--font-en); font-size: 1.7rem; font-weight: 700; color: var(--green); line-height: 1.1; }
.cs-card__title { font-size: 20px; font-weight: 700; line-height: 1.4; margin: 12px 0 14px; flex: 1; }
.cs-card__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.cs-chip { font-family: var(--font-mono); font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.cs-card__more { color: var(--green); font-weight: 600; font-size: 14.5px; }

/* ---- Case study page ---- */
.cs-cover { margin: 26px 0 8px; }
.cs-cover img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); display: block; }
.crumbs { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--green); }
.cs-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  margin: 24px 0 8px;
}
.cs-fact { background: var(--bg); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.cs-fact__k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cs-fact__v { font-size: 14px; font-weight: 600; color: var(--ink); }
.cs-source {
  margin-top: 40px; padding: 22px 24px;
  border: 1px solid var(--line); border-inline-start: 3px solid var(--green);
  border-radius: 0 12px 12px 0; background: var(--bg-soft);
}
.cs-source__k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--green); }
.cs-source p { color: var(--muted); font-size: 14.5px; line-height: 1.75; margin: 8px 0 12px; }
.cs-source a { color: var(--green-strong); font-weight: 600; text-decoration: none; }
html[data-theme="dark"] .cs-source a { color: var(--green); }
.cs-source a:hover { text-decoration: underline; }
.cs-related { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cs-related__k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cs-related a { font-family: var(--font-en); font-size: 13px; font-weight: 500; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; color: var(--ink-2); }
.cs-related a:hover { border-color: var(--green); color: var(--green); }

@media (max-width: 520px) {
  .post-grid, .cs-grid { grid-template-columns: 1fr; }
  .prose { font-size: 17px; }
}
