/* svikarr.com/blog/: index, topic pages and articles (pages built by site/src/blog.ts). */
.blog-banner { min-height: clamp(380px, 52vh, 540px); }
.blog-banner h1 { max-width: 18ch; font-size: clamp(2.4rem, 6vw, 5rem); }
.post-banner h1 { max-width: 22ch; font-size: clamp(2.1rem, 4.6vw, 3.9rem); line-height: 1.08; }
.post-banner .post-meta { color: rgba(255,255,255,0.82); }
.post-meta { font-size: 0.875rem; color: var(--graphite-2); }

.blog-index { padding-top: clamp(40px, 6vw, 72px); }
.topic-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(28px, 4vw, 44px); }
.topic-chips a { text-decoration: none; padding: 8px 14px; border: 1px solid var(--fog); border-radius: 999px; background: var(--white); font-size: 0.9375rem; }
.topic-chips a:hover { border-color: var(--container); color: var(--container); }
.topic-chips a[aria-current="page"] { background: var(--graphite); border-color: var(--graphite); color: var(--white); }

.post-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); }
@media (max-width: 1000px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .post-grid { grid-template-columns: minmax(0, 1fr); } }
.post-card a { display: grid; gap: 10px; text-decoration: none; height: 100%; align-content: start; }
.post-card img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; border-radius: var(--r-card); background: var(--fog); transition: transform .5s var(--ease); }
.post-card a:hover img { transform: scale(1.015); }
.post-card h3 { font-family: var(--display); font-weight: 400; font-size: clamp(1.3rem, 1.8vw, 1.55rem); line-height: 1.2; letter-spacing: -0.01em; }
.post-card a:hover h3 { color: var(--container); }
.post-card p { color: var(--graphite-2); font-size: 0.9875rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-topic { font-size: 0.8125rem; font-weight: 600; color: var(--container); }
.pager { display: flex; justify-content: space-between; margin-top: clamp(32px, 5vw, 56px); }
.pager a { color: var(--container); font-weight: 500; }

.post-section { padding-top: clamp(40px, 6vw, 80px); }
.post-wrap { display: grid; gap: clamp(40px, 6vw, 72px); justify-items: center; }
.post-body { width: 100%; max-width: 70ch; font-size: 1.125rem; line-height: 1.75; min-width: 0; }
.post-body > * + * { margin-top: 1.1em; }
.post-body > .lead { font-size: clamp(1.2rem, 1.8vw, 1.4rem); line-height: 1.5; color: var(--graphite); margin-bottom: 1.6em; }
.post-body h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.15; letter-spacing: -0.015em; margin-top: 2em; }
.post-body h3 { font-family: var(--display); font-weight: 500; font-size: clamp(1.25rem, 2vw, 1.45rem); line-height: 1.25; margin-top: 1.6em; }
.post-body h2 + *, .post-body h3 + * { margin-top: 0.6em; }
.post-body ul, .post-body ol { padding-left: 1.3em; display: grid; gap: 0.45em; }
.post-body li::marker { color: var(--container); }
.post-body blockquote { padding: 1.1em 1.4em; border-left: 3px solid var(--container); background: var(--royal-wash); border-radius: 0 var(--r-ctl) var(--r-ctl) 0; font-size: 1.15rem; }
.post-body a { color: var(--container); text-underline-offset: 3px; overflow-wrap: anywhere; }
.post-body strong { font-weight: 600; }
.post-body figure { margin-block: 2em; }
.post-body figure img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-card); background: var(--fog); }
.post-body .table-wrap { overflow-x: auto; margin-block: 1.6em; border: 1px solid var(--fog); border-radius: var(--r-card); background: var(--white); }
.post-body table { width: 100%; border-collapse: collapse; font-size: 0.975rem; line-height: 1.5; }
.post-body th, .post-body td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--fog); }
.post-body thead th { background: var(--graphite); color: var(--white); font-weight: 600; font-size: 0.9rem; }
/* Phones: a table of 3+ columns becomes one card per row, each value under its column name (data-label). */
@media (max-width: 640px) {
  .post-body .table-wrap.stack { border: 0; background: none; overflow: visible; }
  .post-body .stack table, .post-body .stack tbody, .post-body .stack tr, .post-body .stack th, .post-body .stack td { display: block; width: 100%; }
  .post-body .stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .post-body .stack tbody tr { border: 1px solid var(--fog); border-radius: var(--r-card); background: var(--white); margin-bottom: 12px; overflow: hidden; }
  .post-body .stack tbody th { background: var(--royal-wash); font-size: 1rem; padding: 12px 16px; }
  .post-body .stack tbody td { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); gap: 12px; padding: 10px 16px; }
  .post-body .stack tbody td:last-child { border-bottom: 0; }
  .post-body .stack tbody td::before { content: attr(data-label); font-size: 0.8125rem; font-weight: 600; color: var(--graphite-2); }
}
.post-body tbody th { font-weight: 600; }
.post-body tbody tr:last-child > * { border-bottom: 0; }
.post-body h2#sources ~ ul { font-size: 0.9375rem; color: var(--graphite-2); }

.post-cta { width: 100%; max-width: 70ch; padding: clamp(28px, 4vw, 44px); border-radius: var(--r-sheet); background: var(--graphite); color: var(--white); display: grid; gap: 14px; justify-items: start; }
.post-cta h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.15; }
.post-cta p { color: rgba(255,255,255,0.84); }
.related { padding-top: 0; }
.related h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: clamp(20px, 3vw, 32px); }
.author-box { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 2.4em; padding: 20px 22px; border: 1px solid var(--fog); border-radius: var(--r-card); background: var(--white); font-size: 0.975rem; }
.author-box .crest { width: 40px; height: 40px; background: var(--container-deep); -webkit-mask: url(/brand/crest.png) center / contain no-repeat; mask: url(/brand/crest.png) center / contain no-repeat; }
.author-box .author-name { font-weight: 600; margin-bottom: 4px; }
.author-box a { color: var(--container); }

/* Free tools under each article (site/src/tools/related.ts) and the second button in the call to action */
.post-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.post-cta .btn-line { color: var(--white); border-color: rgba(255,255,255,0.5); background: transparent; }
.post-cta .btn-line:hover { background: var(--white); color: var(--graphite); border-color: var(--white); }
.post-tools { width: 100%; max-width: 70ch; display: grid; gap: 14px; }
.post-tools h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.5rem, 2.6vw, 1.9rem); line-height: 1.15; }
.post-tools ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.post-tools li a { display: grid; gap: 6px; height: 100%; align-content: start; padding: 16px 18px; border: 1px solid var(--fog); border-radius: var(--r-card); background: var(--white); text-decoration: none; transition: border-color .2s; }
.post-tools li a:hover { border-color: var(--container); }
.post-tools b { font-weight: 600; font-size: 1rem; line-height: 1.3; }
.post-tools span { font-size: 0.9rem; color: var(--graphite-2); line-height: 1.45; }
.post-tools i { font-style: normal; font-size: 0.875rem; font-weight: 600; color: var(--container); margin-top: 2px; }
.post-tools p a { color: var(--container); font-weight: 600; text-decoration: none; }
