/* Blog (poni.web.id/blog/): the list and the posts, built by scripts/blog.mjs from _blog/. Loaded after home.css and
   tips.css, which bring the colours, the navbar, the page head, the desk pictures, the reading column, the closing card
   and the footer. Direction: DESIGN.md ("Blog"), filtered by antislop. Dial: ENERGY 1 / RHYTHM 1 / MOTION 1.

   Why it looks like this:
   - The newest post is the Tips' large row. The rest is a plain list split by thin lines, newest first: posts are read
     in time order, not compared side by side, so they don't get the Tips' card grid.
   - A post's text is the Tips' 720 px reading column. This file only adds what Markdown brings (lists, quotes, code,
     tables, a line) in the same neutral greys. Green stays on links and the heading's punctuation.
   - Motion: hover and press only. */

/* ---------------------------------------------------------------- the newest post without a picture */
.tip-top.no-cover { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.tip-top.no-cover h2 { font-size: clamp(28px, 3.4vw, 42px); }
.tip-top.no-cover p.sum { max-width: 640px; }

/* ---------------------------------------------------------------- the list */
.post-list { list-style: none; margin-top: 64px; border-top: 1px solid var(--line); }
.post { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: start; padding: 32px 0; border-bottom: 1px solid var(--line); }
.post.no-cover { grid-template-columns: minmax(0, 1fr); }
.post .when { font-size: 14.5px; color: var(--muted); }
.post h2, .post h3 { font-size: clamp(21px, 2.2vw, 26px); line-height: 1.22; letter-spacing: -.025em; margin-top: 8px; }
.post .sum { color: var(--dim); margin-top: 10px; max-width: 680px; }
.post .meta { margin-top: 14px; }
.post .shot img { aspect-ratio: 16 / 9; object-fit: contain; }

/* a post is one link: its title, stretched over the row */
.post a.go { color: var(--text); text-decoration: none; }
.post a.go::after { content: ""; position: absolute; inset: 0; }
.post a.go:focus-visible { outline: none; }
.post:has(a.go:focus-visible) { outline: 2px solid var(--em-2); outline-offset: 4px; border-radius: 12px; }
.post:hover a.go { color: var(--em-2); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.post:hover .shot { outline-color: #5a5a5a; }
.post:active .shot { transform: translateY(1px); }

.post-list-more { margin-top: 24px; }
.more .post h3 { font-size: 20px; }
.blog-all { margin-top: 72px; font-weight: 700; font-size: 15.5px; }
.blog-empty { margin-top: 48px; max-width: 760px; }

.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-top: 40px; }
.pager-count { color: var(--muted); font-size: 14.5px; }

/* ---------------------------------------------------------------- a post's text (Markdown) */
.prose { overflow-wrap: break-word; }
.prose > * { margin-top: 16px; }
.art-body.prose > .shot { margin-top: 24px; }
.art-body.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.4em; color: #dadada; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 8px; }
.prose li > ul, .prose li > ol, .prose li > p + p { margin-top: 8px; }
.prose li::marker { color: var(--muted); }
.prose h3 { font-size: 21px; line-height: 1.3; letter-spacing: -.02em; margin-top: 36px; }
.prose h4 { font-size: 18px; line-height: 1.35; letter-spacing: -.01em; margin-top: 28px; }
.prose h3 + *, .prose h4 + * { margin-top: 10px; }
.prose strong { color: var(--text); }
.prose blockquote { margin: 20px 0 0; padding: 2px 0 2px 18px; border-left: 3px solid #3a3a3a; }
.prose blockquote > * + * { margin-top: 12px; }
.prose blockquote p, .prose blockquote li { color: var(--dim); }
.prose pre { margin-top: 18px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; line-height: 1.55; }
.prose pre code { display: block; background: none; padding: 0; border-radius: 0; font-size: 14.5px; color: #dadada; white-space: pre; }
.prose .table-wrap { margin-top: 20px; overflow-x: auto; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { color: var(--text); font-weight: 700; border-bottom-color: #3a3a3a; }
.prose td { color: #dadada; }
.prose hr { margin-top: 40px; border: 0; border-top: 1px solid var(--line); }
.prose hr + * { margin-top: 40px; }
.prose figure.shot { margin-top: 24px; }
/* a picture inside a sentence (a paragraph, a list item, a table cell, a link): as tall as the line, not its full size */
.prose img:not(figure img) { display: inline-block; vertical-align: middle; width: auto; height: auto; max-height: 1.6em; border-radius: 4px; }
.prose a code { color: inherit; }

/* ---------------------------------------------------------------- phone */
@media (max-width: 620px) {
  .post { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 28px 0; }
  .post .shot { order: -1; }
  .post-list { margin-top: 48px; }
  .pager { justify-content: flex-start; }
  .prose pre { margin-inline: -4px; }
}
@media (prefers-reduced-motion: reduce) {
  .post:active .shot { transform: none; }
}
