/* Blog (/blog/…, renderowany przez api/blog.mjs). Ładowany po sub.css —
   te same tokeny (--bg, --fg, --muted, --line, --accent, --card, --chip),
   tu tylko lista artykułów, artykuł i typografia treści z Outrank. */

/* ── lista ── */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.post-card { display: flex; flex-direction: column; overflow: hidden; transition: border-color .2s ease, transform .2s ease; }
a.post-card:hover { color: var(--fg); border-color: var(--accent); transform: translateY(-2px); }
.post-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg2); border-bottom: 1px solid var(--line); }
.post-card-body { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 24px 28px 28px; }
.post-card h2, .post-card h3 { font-family: var(--display); font-weight: 600; font-size: 22px; line-height: 1.25; letter-spacing: -0.015em; }
.post-card p { font-size: 16px; line-height: 1.6; color: var(--muted); }
.post-card .more { margin-top: auto; padding-top: 4px; font-weight: 600; color: var(--accent); }
.post-meta { font-size: 15px; color: var(--muted); }
.empty-note { font-size: 19px; line-height: 1.55; color: var(--muted); }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 15px; color: var(--muted); }
.pager a { padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; color: var(--fg); font-weight: 600; }
.pager a:hover { border-color: var(--accent); color: var(--fg); }

.section-head-row { flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: space-between; max-width: none; }
.more-link { font-weight: 600; color: var(--accent); }

/* okruszki: długi tytuł artykułu nie rozpycha wiersza */
.crumbs { min-width: 0; }
.crumbs li { min-width: 0; }
.crumbs li:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* ── artykuł ── */
.post { display: flex; flex-direction: column; align-items: center; padding-top: 48px; padding-bottom: 88px; }
.post > * { width: 100%; max-width: 760px; }
.post-head { display: flex; flex-direction: column; gap: 20px; }
.post-head h1 { font-family: var(--display); font-weight: 600; font-size: clamp(36px, 4.4vw, 60px); line-height: 1.05; letter-spacing: -0.03em; overflow-wrap: break-word; }
.post-head .lead { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.5; color: var(--muted); }
.post > .post-cover { max-width: 1040px; height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin-top: 40px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg2); }
.post-tags { margin-top: 40px; }

/* treść z Outrank */
.article-body { margin-top: 48px; font-size: 18px; line-height: 1.75; color: color-mix(in srgb, var(--fg) 88%, var(--bg)); overflow-wrap: break-word; }
.article-body > * + * { margin-top: 1.15em; }
.article-body h2, .article-body h3, .article-body h4 { color: var(--fg); font-family: var(--display); font-weight: 600; scroll-margin-top: 96px; }
.article-body h2 { margin-top: 2em; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.2; letter-spacing: -0.02em; }
.article-body h3 { margin-top: 1.7em; font-size: 23px; line-height: 1.3; letter-spacing: -0.01em; }
.article-body h4 { margin-top: 1.5em; font-size: 19px; line-height: 1.4; }
.article-body h2 + *, .article-body h3 + *, .article-body h4 + * { margin-top: .7em; }
.article-body strong, .article-body b { color: var(--fg); font-weight: 600; }
.article-body a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.article-body a:hover { color: var(--accent); }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li::marker { color: var(--accent); }
.article-body li + li { margin-top: .45em; }
.article-body li > ul, .article-body li > ol { margin-top: .45em; }
.article-body blockquote { padding: 4px 0 4px 22px; border-left: 3px solid var(--accent); color: var(--muted); }
.article-body blockquote > * + * { margin-top: .8em; }
.article-body img { display: block; max-width: 100%; height: auto; border-radius: 12px; }
.article-body figure { margin-left: 0; margin-right: 0; }
.article-body figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); text-align: center; }
.article-body hr { margin: 2.5em 0; border: 0; border-top: 1px solid var(--line); }
.article-body code { padding: 2px 6px; border-radius: 6px; background: var(--chip); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; }
.article-body pre { overflow-x: auto; padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); font-size: 15px; line-height: 1.6; }
.article-body pre code { padding: 0; background: none; }
.article-body .table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.article-body th, .article-body td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.article-body th { background: var(--chip); color: var(--fg); font-weight: 600; }
.article-body tr:last-child td { border-bottom: 0; }
.article-body .embed { aspect-ratio: 16 / 9; }
.article-body .embed iframe { display: block; width: 100%; height: 100%; border: 0; border-radius: 12px; }

@media (max-width: 900px) {
  .post { padding-top: 32px; padding-bottom: 64px; }
  .post > .post-cover { margin-top: 28px; border-radius: 14px; }
  .article-body { margin-top: 36px; font-size: 17px; }
  .posts { grid-template-columns: 1fr; }
  .post-card-body { padding: 20px 22px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  a.post-card:hover { transform: none; }
}
