/* StyleChain blog – layout for /blog/ and /post/*
   Extends stylechain.css. Colours come from stylechain-tokens.css only;
   no hex literals here (see .claude/rules/stylechain-www-css.md). */

/* ---------- small hero (blog index + category pages) ---------- */
.hero-sm{padding:56px 0 24px;border-bottom:1px solid var(--border)}
.hero-sm h1{font-size:clamp(30px,4vw,44px);margin-bottom:10px}
.hero-sm p{color:var(--text-dim);max-width:640px}

/* ---------- category chips ---------- */
.blog-chips{display:flex;flex-wrap:wrap;gap:9px;margin-bottom:30px}
.blog-chip{display:inline-flex;align-items:center;gap:7px;padding:7px 14px;border-radius:999px;
  border:1px solid var(--border);font-size:13px;font-weight:500;color:var(--text);transition:.18s ease}
.blog-chip span{color:var(--text-dim);font-size:12px}
.blog-chip:hover{border-color:var(--blue-hover);color:var(--white)}
.blog-chip.is-active{background:var(--blue);border-color:var(--blue);color:var(--white-on-fill)}
.blog-chip.is-active span{color:var(--white-on-fill);opacity:.8}

/* ---------- card grid ---------- */
.blog-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:26px}
.blog-card{display:flex;flex-direction:column;background:var(--card);border:1px solid var(--border);
  border-radius:14px;overflow:hidden;transition:.18s ease}
.blog-card:hover{border-color:var(--blue-hover);transform:translateY(-2px)}
.blog-card-img{aspect-ratio:16/9;background:var(--bg);overflow:hidden}
.blog-card-img img{width:100%;height:100%;object-fit:cover;display:block}
.blog-card-body{padding:20px;display:flex;flex-direction:column;gap:9px;flex:1}
.blog-card-tags{display:flex;flex-wrap:wrap;gap:6px;min-height:0}
.blog-card h3{font-size:18px;line-height:1.3}
.blog-card p{font-size:14px;color:var(--text-dim);line-height:1.6;flex:1}
.blog-card-meta{font-size:12px;color:var(--text-dim)}

.blog-tag{display:inline-block;padding:3px 9px;border-radius:999px;background:var(--blue-tint-bg,transparent);
  border:1px solid var(--border);font-size:11px;letter-spacing:.04em;color:var(--text-dim);text-transform:uppercase}
a.blog-tag:hover{border-color:var(--blue-hover);color:var(--blue-hover)}

/* ---------- post page ---------- */
.post{padding-top:34px}
.post-narrow{max-width:760px}
.post-crumbs{font-size:13px;color:var(--text-dim);margin-bottom:18px}
.post-crumbs a{color:var(--text-dim)}
.post-crumbs a:hover{color:var(--blue-hover)}
.post-crumbs span{margin:0 6px;opacity:.5}
.post-tags{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:14px}
.post h1{font-size:clamp(28px,4.2vw,42px);line-height:1.15;margin-bottom:12px}
.post-meta{font-size:14px;color:var(--text-dim);margin-bottom:26px}
.post-hero-img{max-width:1000px;margin:0 auto 40px;padding:0 28px}
.post-hero-img img{width:100%;height:auto;border-radius:14px;display:block;border:1px solid var(--border)}

/* ---------- post body typography ---------- */
.post-body{padding-bottom:20px;font-size:17px;line-height:1.75;color:var(--text)}
.post-body h2{font-size:26px;margin:38px 0 14px;line-height:1.25}
.post-body h3{font-size:21px;margin:30px 0 12px;line-height:1.3}
.post-body h4{font-size:18px;margin:24px 0 10px}
.post-body p{margin-bottom:19px}
.post-body a{color:var(--blue);text-decoration:underline;text-underline-offset:2px}
.post-body a:hover{color:var(--blue-hover)}
.post-body strong{color:var(--white);font-weight:600}
.post-body ul,.post-body ol{margin:0 0 19px 22px}
.post-body li{margin-bottom:9px}
.post-body li::marker{color:var(--blue)}
.post-body hr{border:0;border-top:1px solid var(--border);margin:34px 0}
.post-body blockquote{margin:26px 0;padding:4px 0 4px 20px;border-left:3px solid var(--blue);
  color:var(--white);font-size:19px;line-height:1.6}
.post-body blockquote p:last-child{margin-bottom:0}
.post-body figure{margin:30px 0}
.post-body figure img,.post-body p>img{width:100%;height:auto;border-radius:12px;
  border:1px solid var(--border);display:block}
.post-body figcaption{margin-top:9px;font-size:13px;color:var(--text-dim);text-align:center}

/* Wide content must scroll inside its own container, never the page. */
.post-body .table-scroll{overflow-x:auto;margin:0 0 24px;border:1px solid var(--border);border-radius:12px}
.post-body table{border-collapse:collapse;width:100%;font-size:14px;min-width:520px}
.post-body th,.post-body td{padding:11px 14px;text-align:left;border-bottom:1px solid var(--border);
  vertical-align:top}
.post-body th{background:var(--card);color:var(--white);font-weight:600;font-size:13px;
  letter-spacing:.02em;white-space:nowrap}
.post-body tbody tr:last-child td{border-bottom:0}

@media(max-width:720px){
  .post-hero-img{padding:0 20px;margin-bottom:28px}
  .post-body{font-size:16px}
  .post-body h2{font-size:23px}
  .blog-grid{grid-template-columns:1fr;gap:20px}
}
