/* The blog: /blog and each post (go/internal/site/blog.go). The legal pages' look (moderation.css),
   set for reading: a column about 70 characters wide, a little larger type, room between ideas. */

.blog .mod-top, .blog-main { max-width: 720px; }
.blog-main { padding-bottom: 3rem; }
.blog-main .sub { max-width: none; }
.blog code { font: .9em ui-monospace, monospace; }

/* ------------------------------------------------------------------ the list */
.post-list { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 2.2rem; }
.post-item { position: relative; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.post-item:not(:has(.post-thumb)) { grid-template-columns: minmax(0, 1fr); }
.post-thumb { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); background: var(--paper-2); }
.post-item h2 { margin: 0 0 .3rem; font-size: 1.35rem; line-height: 1.2; }
.blog .post-item h2 a { color: var(--ink); text-decoration: none; }   /* (the title in ink, in Night café too) */
.post-item h2 a::after { content: ''; position: absolute; inset: 0; }   /* the whole item is the link */
.post-item:hover h2 a { text-decoration: underline; }
.post-summary { margin: .45rem 0 0; color: var(--ink-soft); line-height: 1.55; }
.post-meta { margin: 0; color: var(--muted); font-size: .9rem; }
.post-meta time { white-space: nowrap; }   /* (a date never breaks across lines) */
.drafts { margin-top: 2.6rem; }
.drafts ul { padding-left: 1.2rem; }
.drafts li { min-height: 44px; display: list-item; line-height: 44px; }

/* ------------------------------------------------------------------ a post */
.post-back { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; font-weight: 600; text-decoration: none; }
.post-head h1 { margin: .1rem 0 .55rem; font-size: clamp(1.9rem, 1.35rem + 2.2vw, 2.7rem); line-height: 1.1; }
.post-head .post-meta { margin-bottom: 1.4rem; }
.post-hero { margin: 0 0 1.8rem; }
.post-hero img, .post-body figure img { display: block; width: 100%; height: auto; border-radius: var(--radius-sm); background: var(--paper-2); }

.post-body { font-size: 1.0625rem; line-height: 1.7; overflow-wrap: break-word; }
.post-body > :first-child { margin-top: 0; }
.post-body p { margin: 0 0 1.05rem; }
.post-body h2 { margin: 2.4rem 0 .6rem; font-size: 1.5rem; line-height: 1.2; scroll-margin-top: 16px; }
.post-body h3 { margin: 1.7rem 0 .45rem; font-size: 1.15rem; scroll-margin-top: 16px; }
.post-body ul, .post-body ol { margin: 0 0 1.05rem; padding-left: 1.3rem; }
.post-body li + li { margin-top: .4rem; }
.post-body li > p { margin: 0; }
/* a section's takeaway: a quiet tint, no border */
.post-body blockquote { margin: 1.3rem 0 1.5rem; padding: .85rem 1.1rem; border-radius: var(--radius-sm); background: var(--paper-2); }
.post-body blockquote p:last-child { margin-bottom: 0; }
.post-body figure { margin: 1.8rem 0; }
.post-body figcaption { margin-top: .55rem; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.post-body hr { border: 0; border-top: 1.5px solid var(--line); margin: 2.2rem 0; }

/* the numbers that lead to a source: small, but each a whole target */
.post-body sup { font-size: .72em; line-height: 0; vertical-align: super; }
.footnote-ref { display: inline-block; padding: .55em .25em; margin: -.55em -.25em -.55em -.1em; font-weight: 700; text-decoration: none; }
.sources { margin-top: 2.8rem; padding-top: .3rem; border-top: 1.5px solid var(--line); font-size: .9rem; line-height: 1.5; color: var(--ink-soft); }
.post-body .sources h2 { margin: 1.1rem 0 .7rem; font-size: 1.15rem; }
.sources ol { padding-left: 1.5rem; }
.sources li + li { margin-top: .55rem; }
.sources li p { margin: 0; }
.sources a { overflow-wrap: anywhere; }
.sources li { scroll-margin-top: 24px; border-radius: 8px; transition: background .3s; }
.sources li:target { background: color-mix(in srgb, var(--sun-soft) 70%, transparent); }
.footnote-backref { display: inline-block; min-width: 1.6em; text-align: center; text-decoration: none; }
[id^="fnref"] { scroll-margin-top: 30vh; }

/* ------------------------------------------------------------------ an author's page */
.author-head .sub { margin-bottom: 1.6rem; }
.author-posts { margin: 2.6rem 0 0; font-size: 1.5rem; line-height: 1.2; }
.author-posts + .post-list { margin-top: 1.4rem; }

.draft-note { margin: 0 0 1rem; padding: .7rem 1rem; border-radius: var(--radius-sm); background: var(--sun-soft); color: var(--ink); }

@media (max-width: 600px) {
  .post-list { gap: 2rem; }
  .post-item { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
  .post-body { font-size: 1.03rem; }
  .post-body h2 { font-size: 1.35rem; margin-top: 2rem; }
}

/* a post's narration: a plain player under the byline (its height is fixed, so nothing moves) */
.post-audio { margin: 1rem 0 1.4rem; }
.post-audio-label { margin: 0 0 .4rem; font-size: .9rem; font-weight: 700; color: var(--ink-soft); }
.post-audio audio { display: block; width: 100%; height: 44px; }
