/* The blog (tools/blog.py): the list with a featured post and topic chips, and each post with its cover, a contents
   list and easy-to-read text. Brand v4: white cards on ring shadows, Inter at 500 for headings, green only as the signal. */

.bl-hero { padding-bottom: 40px; }
.bl-empty { padding: 24px var(--frame-pad) 120px; text-align: center; }
.bl-empty p { font-size: 18px; color: var(--body); }
.bl-empty .pd-ctas { justify-content: center; margin-top: 24px; }

.bl-list { display: flex; flex-direction: column; gap: 40px; padding: 24px var(--frame-pad) 120px; }
.bl-card { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.bl-card__img { display: block; overflow: hidden; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-rest); transition: box-shadow var(--fast) var(--ease); }
.bl-card__img img { display: block; width: 100%; height: auto; transition: transform var(--slow, 380ms) var(--ease); }
.bl-card:hover .bl-card__img { box-shadow: var(--sh-hover); }
.bl-card:hover .bl-card__img img { transform: scale(1.015); }
.bl-card__t { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; color: var(--meta); }
.bl-meta b { font-weight: 500; color: var(--green-ink, #086444); }
.bl-card__h { font-size: 19px; line-height: 1.3; font-weight: 500; letter-spacing: -0.015em; color: var(--ink); text-wrap: balance; }
.bl-card__d { font-size: 16px; line-height: 1.5; color: var(--body); }
.bl-card--big { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: center; gap: 40px; }
.bl-card--big .bl-card__h { font-size: 34px; line-height: 1.12; letter-spacing: -0.03em; }
.bl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bl-chips button { height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--surface); box-shadow: var(--sh-chip); font: inherit; font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer; }
.bl-chips button[aria-pressed="true"] { background: var(--green-100, #e3f4ec); color: var(--green-ink, #086444); box-shadow: 0 0 0 1px rgba(12, 140, 94, .25); }
.bl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; }

.bl-post { max-width: 1040px; margin: 0 auto; padding: 96px var(--frame-pad) 64px; }
.bl-crumb { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--meta); }
.bl-crumb a:hover { color: var(--ink); }
.bl-crumb svg { width: 14px; height: 14px; }
.bl-post h1 { max-width: 820px; margin-top: 20px; font-size: clamp(36px, 4.6vw, 56px); line-height: 1.05; font-weight: 500; letter-spacing: -0.04em; color: var(--ink); text-wrap: balance; }
.bl-lead { max-width: 680px; margin-top: 18px; font-size: 20px; line-height: 1.5; color: var(--body); text-wrap: pretty; }
.bl-by { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 22px; font-size: 14px; color: var(--meta); }
.bl-by span:first-child { color: var(--text); font-weight: 500; }
.bl-cover { display: block; width: 100%; height: auto; margin-top: 36px; border-radius: var(--r-lg); box-shadow: var(--sh-rest); }
.bl-body-wrap { display: grid; grid-template-columns: 200px minmax(0, 680px); gap: 56px; margin-top: 56px; }
.bl-body-wrap:not(:has(.bl-toc)) { grid-template-columns: minmax(0, 680px); justify-content: center; }
.bl-toc { position: sticky; top: 104px; align-self: start; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.bl-toc b { margin-bottom: 8px; font-size: 13px; font-weight: 500; color: var(--meta); }
.bl-toc a { padding: 4px 0; color: var(--body); line-height: 1.4; }
.bl-toc a:hover { color: var(--ink); }
.bl-body { min-width: 0; font-size: 18px; line-height: 1.7; color: var(--text); overflow-wrap: break-word; }
.bl-body > * + * { margin-top: 20px; }
.bl-body h2 { margin-top: 48px; font-size: 28px; line-height: 1.2; font-weight: 500; letter-spacing: -0.025em; color: var(--ink); scroll-margin-top: 100px; }
.bl-body h3 { margin-top: 32px; font-size: 21px; line-height: 1.3; font-weight: 500; letter-spacing: -0.015em; color: var(--ink); }
.bl-body a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong, #d4d4d4); text-underline-offset: 3px; }
.bl-body a:hover { text-decoration-color: var(--green, #0c8c5e); }
.bl-body ul, .bl-body ol { padding-left: 22px; }
.bl-body ul { list-style: disc; }
.bl-body ol { list-style: decimal; }
.bl-body li + li { margin-top: 8px; }
.bl-body li::marker { color: var(--meta); }
.bl-body blockquote { padding: 4px 0 4px 20px; border-left: 2px solid var(--green, #0c8c5e); color: var(--body); }
.bl-body code { padding: 2px 6px; border-radius: 6px; background: var(--surface-3); box-shadow: 0 0 0 1px var(--line); font: 15px/1.5 ui-monospace, "JetBrains Mono", monospace; }
.bl-body img { display: block; width: 100%; height: auto; border-radius: var(--r-lg); box-shadow: var(--sh-rest); }
.bl-more { padding: 96px var(--frame-pad) 120px; }
.bl-more h2 { margin-bottom: 32px; font-size: 28px; font-weight: 500; letter-spacing: -0.025em; color: var(--ink); }

@media (max-width: 1024px) { .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .bl-card--big { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .bl-card--big .bl-card__h { font-size: 26px; }
  .bl-body-wrap { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .bl-toc { display: none; }
}
@media (max-width: 560px) { .bl-grid { grid-template-columns: minmax(0, 1fr); } .bl-body { font-size: 17px; } }
@media (prefers-reduced-motion: reduce) { .bl-card__img img { transition: none; } .bl-card:hover .bl-card__img img { transform: none; } }
.bl-table { overflow-x: auto; border-radius: var(--r-lg); box-shadow: var(--sh-rest); background: var(--surface); }
.bl-table table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.bl-table th { padding: 12px 14px; text-align: left; font-weight: 500; color: var(--ink); background: var(--surface-3); border-bottom: 1px solid var(--line); white-space: nowrap; }
.bl-table td { padding: 12px 14px; vertical-align: top; border-top: 1px solid var(--line); color: var(--text); }
.bl-table tr:first-child td { border-top: 0; }
