/* Blog: overview, posts, breadcrumbs. Builds on site.css and pages.css; flat colours, 2px ink outlines, no shadows. */
.crumbs { margin: 0 0 18px; font-size: 14.5px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; align-items: center; color: var(--ink-muted); }
.crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.crumbs li + li::before { content: "/"; margin: 0 10px; color: var(--ink-faint); }
.crumbs a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.crumbs a:hover { color: var(--accent-hover); }
.crumbs [aria-current] { color: var(--ink); overflow-wrap: anywhere; }

.blog-tools { padding-top: 32px; }
.blog-list { padding-top: 24px; padding-bottom: 32px; }
.post-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.post-list > li[hidden] { display: none; }
.post-card { display: grid; gap: 12px; align-content: start; height: 100%; padding: 24px; border: var(--stroke) solid var(--outline); border-radius: 16px; background: var(--surface); color: var(--ink); }
.post-card:hover { background: var(--band); color: var(--on-band); }
.post-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.post-card h2, .post-card h3 { margin: 0; font-size: clamp(20px, 2.2vw, 24px); line-height: 1.2; letter-spacing: -0.02em; }
.post-card p { margin: 0; color: var(--ink-muted); font-size: 15.5px; line-height: 1.55; }
.post-card:hover p { color: var(--on-band); }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 4px; font-size: 14px; color: var(--ink-muted); }
.post-card:hover .post-meta { color: var(--on-band); }
.blog-empty { max-width: 640px; padding: 26px 28px; border: 1px dashed var(--ink-faint); border-radius: 16px; color: var(--ink-muted); font-size: 16.5px; line-height: 1.55; }
.blog-empty[hidden], .blog-empty [hidden] { display: none; }
.blog-empty p { margin: 0; }
.blog-empty b { color: var(--ink); }

.post-hero h1 { max-width: 22ch; }
.draft-note { margin: 22px 0 0; max-width: 62ch; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 14px 16px; border: 1px dashed var(--ink-faint); border-radius: 12px; background: var(--sunken); color: var(--ink-body); font-size: 15px; line-height: 1.5; }
.post-layout.no-toc { grid-template-columns: minmax(0, 720px); }
.prose .sec > p { max-width: 66ch; margin: 0 0 18px; color: var(--ink-body); font-size: 18px; line-height: 1.65; }
.prose .sec > p:last-child { margin-bottom: 0; }
.blog-related { padding-bottom: 24px; }
.post-back { margin: 0 0 8px; }
.post-back a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }

@media (max-width: 600px) {
  .post-list { grid-template-columns: 1fr; }
  .post-card { padding: 20px; }
  .prose .sec > p { font-size: 17px; }
}

.ai-row { margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.ai-h { font-size: 15px; color: var(--ink-muted); margin-right: 2px; }
.ai-btn { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--outline); background: var(--surface); color: var(--ink); font: 500 14px var(--font-ui); }
.ai-btn:hover { background: var(--band); color: var(--on-band); }
.ai-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ai-note { flex-basis: 100%; font-size: 14px; color: var(--ink-muted); }
.ai-note[hidden] { display: none; }

/* Byline with the author's photo */
.post-by { margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
.author { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.author img { width: 48px; height: 48px; border-radius: 50%; border: var(--stroke) solid var(--outline); background: var(--band); object-fit: cover; flex: none; }
.author-t { display: grid; gap: 1px; }
.author-t b { font-weight: 600; font-size: 16px; }
.author-t small { font-size: 13.5px; color: var(--ink-muted); line-height: 1.35; max-width: 34ch; }
.author:hover .author-t b { text-decoration: underline; text-underline-offset: 3px; }
.author:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 12px; }
.post-facts { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 15px; color: var(--ink-muted); }

/* AI summary buttons with logos */
.ai-btn { gap: 8px; padding: 0 14px 0 11px; }
.ai-ico { flex: none; }

/* Table of contents */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.post-toc { position: sticky; top: 96px; font-size: 14.5px; }
.post-toc summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; list-style: none; cursor: pointer; padding: 0 0 12px; font: 600 12px var(--font-data); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-muted); }
.post-toc summary::-webkit-details-marker { display: none; }
.post-toc summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.toc-chev { display: none; transition: transform .15s; }
.post-toc details[open] .toc-chev { transform: rotate(180deg); }
.toc-bar { height: 4px; border-radius: 2px; background: var(--line); margin: 0 0 14px; overflow: hidden; }
.toc-bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.post-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 2px solid var(--line); }
.post-toc a { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: baseline; padding: 8px 10px 8px 12px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-muted); line-height: 1.35; border-radius: 0 8px 8px 0; }
.post-toc a:hover { color: var(--ink); background: var(--sunken); }
.post-toc a[aria-current="location"] { color: var(--ink); font-weight: 600; border-left-color: var(--accent); background: var(--band); color: var(--on-band); }
.post-toc a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.toc-n { font: 500 12px var(--font-data); color: var(--ink-faint); }
.post-toc a[aria-current="location"] .toc-n { color: var(--accent); }
@media (max-width: 900px) {
  .post-toc { position: static; border: var(--stroke) solid var(--outline); border-radius: 14px; background: var(--surface); padding: 14px 16px; }
  .post-toc summary { padding-bottom: 0; }
  .post-toc details[open] summary { padding-bottom: 12px; }
  .toc-chev { display: block; }
}

/* Cards with an illustration of the post's point */
.post-card { padding: 0; gap: 0; overflow: hidden; align-content: start; }
.post-card:hover { background: var(--surface); color: var(--ink); }
.post-card:hover p, .post-card:hover .post-meta { color: var(--ink-muted); }
.post-card:hover h2, .post-card:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.post-art { display: block; background: var(--band); border-bottom: var(--stroke) solid var(--outline); aspect-ratio: 16 / 9; overflow: hidden; }
.post-art .art { display: block; width: 100%; height: 100%; }
.post-body { display: grid; gap: 12px; align-content: start; padding: 22px 24px 24px; }
.post-body h2, .post-body h3 { margin: 0; font-size: clamp(20px, 2.2vw, 24px); line-height: 1.2; letter-spacing: -0.02em; }
.post-body p { margin: 0; color: var(--ink-muted); font-size: 15.5px; line-height: 1.55; }
.post-list > li.is-featured { grid-column: 1 / -1; }
@media (min-width: 860px) {
  .is-featured .post-card { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: stretch; }
  .is-featured .post-art { aspect-ratio: auto; min-height: 320px; border-bottom: 0; border-right: var(--stroke) solid var(--outline); }
  .is-featured .post-body { align-content: center; padding: 36px 40px; gap: 16px; }
  .is-featured .post-body h2 { font-size: clamp(26px, 2.8vw, 34px); }
  .is-featured .post-body p { font-size: 17px; }
}
@media (max-width: 600px) { .post-body { padding: 18px 20px 22px; } }

/* Lists and tables inside a post */
.prose .sec > ul, .prose .sec > ol { max-width: 66ch; margin: 0 0 18px; padding-left: 1.3em; color: var(--ink-body); font-size: 18px; line-height: 1.65; }
.prose .sec > ul li, .prose .sec > ol li { margin: 0 0 8px; }
.prose .sec a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.tbl-wrap { margin: 0 0 18px; overflow-x: auto; border: 2px solid var(--outline); border-radius: 14px; background: var(--surface); }
.tbl-wrap table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; color: var(--ink-body); }
.tbl-wrap caption { text-align: left; padding: 12px 16px 0; font-weight: 600; color: var(--ink); }
.tbl-wrap th, .tbl-wrap td { text-align: left; vertical-align: top; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.tbl-wrap th { font-weight: 600; color: var(--ink); }
.tbl-wrap tr:last-child td { border-bottom: 0; }
@media (max-width: 600px) { .prose .sec > ul, .prose .sec > ol { font-size: 17px; } }
