/* INIT Labs blog. The pages (rendered by worker/pages.js) load tokens.css and site.css first, so the nav, the
   record-page header (.rhero), the footer and the type are the site's own; this file adds the post list and the
   prose. The .prose rules depend on tokens.css only, so the admin's live preview (site/admin/) uses them as they are. */

/* ── pages ─────────────────────────────── */
.blog .nav .links{margin-left:auto}
.blog .nav .links a.on::after{display:none}
@media (max-width:860px){.blog .nav .links{display:flex;gap:18px;margin-right:16px}}
@media (max-width:400px){.blog .nav .gh{display:none}.blog .nav .links{margin-right:0}}
.bhead h1{max-width:20ch}
.bhead .eyebrow{margin-bottom:22px}
.bhead .back{margin-bottom:32px}
.blist{padding:56px 0 0}
.bempty{margin-top:28px;font:400 15px/1.6 var(--sans);color:var(--dim)}
.blist .bempty{margin-top:0}

.plist{list-style:none;border-top:1px solid var(--ink);max-width:920px}
.plist li{border-bottom:1px solid var(--line)}
.pitem{display:grid;grid-template-columns:128px minmax(0,1fr);gap:24px;padding:28px 0;text-decoration:none;color:var(--ink)}
.pdate{font:400 12px/2.2 var(--mono);color:var(--mute);font-variant-numeric:tabular-nums}
.ptxt{display:flex;flex-direction:column;gap:8px;min-width:0}
.ptitle{font:300 clamp(24px,2.6vw,32px)/1.15 var(--sans);letter-spacing:-.025em;text-decoration:underline;text-decoration-color:transparent;text-underline-offset:5px;text-decoration-thickness:1px;transition:text-decoration-color var(--t-flip)}
.pitem:hover .ptitle,.pitem:focus-visible .ptitle{text-decoration-color:var(--ink)}
.psum{font:400 16px/1.55 var(--sans);color:var(--dim);max-width:38em}
.pby{font:400 11px/1.4 var(--mono);color:var(--mute);letter-spacing:.02em}
@media (max-width:760px){.pitem{grid-template-columns:1fr;gap:6px;padding:22px 0}.pdate{line-height:1.4}}

/* a post reads as one centred column: the header and the text share the prose's 680 px (the nav keeps the site's width) */
.post .wrap{max-width:760px}
.post .bhead h1{max-width:none}
.post .prose{margin-top:56px}
.pfoot{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px 24px;max-width:680px;margin-top:64px;padding-top:16px;border-top:1px solid var(--line);font-size:11px;line-height:1.6;color:var(--mute)}
.pfoot a{color:var(--dim)}
@media (max-width:760px){.post .prose{margin-top:40px}}

/* ── prose: what site/admin/md.js renders ── */
.prose{max-width:680px;font:400 17px/1.65 var(--sans);color:var(--ink);overflow-wrap:break-word}
.prose>*{margin:0}
.prose>*+*{margin-top:22px}
.prose h2,.prose h3,.prose h4,.prose h5,.prose h6{max-width:none;color:var(--ink)}
.prose h2{font:300 clamp(26px,2.6vw,32px)/1.2 var(--sans);letter-spacing:-.025em}
.prose h3{font:400 21px/1.3 var(--sans);letter-spacing:-.01em}
.prose h4,.prose h5,.prose h6{font:500 11px/1.5 var(--mono);letter-spacing:.1em;text-transform:uppercase;color:var(--dim)}
.prose>h2{margin-top:56px}
.prose>h3{margin-top:40px}
.prose>h4,.prose>h5,.prose>h6{margin-top:32px}
.prose>h2+*,.prose>h3+*{margin-top:14px}
.prose a{color:inherit;text-decoration:underline;text-decoration-color:var(--line-2);text-underline-offset:3px}
.prose a:hover{text-decoration-color:var(--ink)}
.prose strong{font-weight:500}
.prose del{color:var(--mute)}
.prose code{font:400 .86em/1 var(--mono);color:var(--ink);background:var(--tile);padding:.15em .35em;border-radius:2px}
.prose pre{background:var(--surface);border:1px solid var(--line);padding:16px 18px;overflow-x:auto;font:400 13.5px/1.6 var(--mono);color:var(--ink);tab-size:4}
.prose pre code{font:inherit;background:none;padding:0;border-radius:0;white-space:pre}
.prose blockquote{padding:2px 0 2px 20px;border-left:1px solid var(--line-2);color:var(--dim)}
.prose blockquote>*{margin:0}
.prose blockquote>*+*{margin-top:14px}
.prose ul,.prose ol{padding-left:24px}
.prose li{margin:0;padding-left:4px}
.prose li+li{margin-top:6px}
.prose li>ul,.prose li>ol,.prose li>p+*,.prose li>pre{margin-top:8px}
.prose li>p{margin:0}
.prose ul{list-style:square}
.prose ul li::marker{color:var(--mute)}
.prose ol li::marker{font:400 .86em var(--mono);color:var(--mute)}
.prose hr{border:0;border-top:1px solid var(--line);margin-top:40px;margin-bottom:40px}
.prose img{display:block;max-width:100%;height:auto;border:1px solid var(--line);background:var(--surface)}
.prose p img{display:inline-block;vertical-align:middle}
.prose p.fig img{display:block}
.prose .tbl{overflow-x:auto;border:1px solid var(--line);background:var(--surface)}
.prose table{border-collapse:collapse;width:100%;font:400 15px/1.5 var(--sans);font-variant-numeric:tabular-nums}
.prose th,.prose td{padding:9px 14px;border-top:1px solid var(--line);text-align:left;vertical-align:top}
.prose th{border-top:0;font:500 10.5px/1.4 var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--mute);white-space:nowrap}
.prose .al-r{text-align:right}
.prose .al-c{text-align:center}
@media (max-width:760px){.prose{font-size:16.5px}.prose pre{padding:14px 16px;font-size:12.5px}.post .prose pre{margin-left:-16px;margin-right:-16px;border-left:0;border-right:0}}
