/* Canvasly blog. Loaded after /assets/style.css and uses its tokens. */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin: 8px 0 24px;
}

.post-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
}

.post-card .post-thumb {
  display: block;
  margin: -22px -24px 16px;
}

.post-card .post-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 40 / 21;
  object-fit: cover;
}

.post-card h2 {
  margin: 4px 0 8px;
  font-size: 1.3rem;
  line-height: 1.3;
}

.post-card h2 a { text-decoration: none; color: var(--ink); }
.post-card h2 a:hover { color: var(--accent); }

.post-card .post-excerpt { color: var(--muted); font-size: 0.98rem; flex: 1; }
.post-card .post-excerpt p { margin: 0 0 8px; }

.post-more { font-weight: 600; }

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.post-tags a {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.8rem;
  text-decoration: none;
}

.post-tags a:hover { border-color: var(--accent); }

.filter-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.post-body { max-width: 760px; }
.post-body img { max-width: 100%; height: auto; border-radius: 10px; }
.post-body h2 { margin-top: 1.6em; }
.post-body pre {
  overflow-x: auto;
  padding: 14px 16px;
  border-radius: 10px;
  background: #1c1915;
  color: #f6f1e7;
  font-size: 0.9rem;
}
.post-body pre code { background: none; color: inherit; padding: 0; }
.post-body blockquote {
  margin: 1em 0;
  padding: 4px 16px;
  border-left: 4px solid var(--accent);
  color: var(--muted);
}

.post-cover {
  margin: 0 0 20px;
}

.post-cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.post-nav a { max-width: 48%; }
.post-nav .next { margin-left: auto; text-align: right; }

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.pager a, .pager span {
  display: inline-block;
  min-width: 40px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  text-align: center;
  text-decoration: none;
}

.pager .current span { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.pager .disabled span { color: var(--muted); opacity: 0.6; }

.blog-subscribe { font-size: 0.9rem; }

@media (max-width: 720px) {
  .post-card .post-thumb { margin: -16px -16px 12px; }
  .post-nav { flex-direction: column; }
  .post-nav a { max-width: none; }
  .post-nav .next { text-align: left; }
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.post-faq { margin-top: 2em; padding-top: 0.5em; border-top: 1px solid var(--line); }
.post-faq h3 { margin: 1.2em 0 0.3em; font-size: 1.05rem; }
.post-faq p { margin: 0 0 0.6em; }

.post-body table { width: 100%; font-size: 0.92rem; }
.post-body table { display: block; max-width: 100%; overflow-x: auto; }

.img-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.img-pair p { margin: 0; }
@media (max-width: 560px) { .img-pair { grid-template-columns: 1fr; } }
.post-footnote { color: var(--muted); margin-top: 1.5em; }
