/* REI — blog (loaded after styles.css) */

/* ── nav: the language switch is a link to the other edition, not a button ── */

.lang a {
  font: 600 12px var(--mono); color: var(--dim);
  border-radius: 7px; padding: 5px 9px;
  transition: color .15s, background .15s;
}
.lang a:hover { color: var(--text); text-decoration: none; }
.lang a[aria-current="true"] { color: var(--on-accent); background: var(--accent); }
.nav-links a[aria-current="page"] { color: var(--text); }

/* ── post ─────────────────────────────────────────── */

.post { padding: 56px 0 72px; }
.post-wrap { width: min(720px, 100% - 40px); margin-inline: auto; }

.post-path { font: 500 13px var(--mono); color: var(--dim); margin: 0 0 22px; }
.post-path a { color: var(--muted); }
.post-path .prompt { color: var(--accent); }

.post h1 { font-size: clamp(28px, 4.2vw, 44px); line-height: 1.12; margin-bottom: 20px; }

.post-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px;
  font: 500 13px var(--mono); color: var(--muted);
  padding-bottom: 28px; margin-bottom: 36px; border-bottom: 1px dashed var(--line-2);
}
.post-meta time { color: var(--text); }
.post-meta .sep { color: var(--dim); }

.post-body { font-size: 18px; line-height: 1.75; color: var(--code-text); }
.post-body > * { margin: 0 0 1.25em; }
.post-body .lede { font-size: 20px; color: var(--text); }
.post-body h2 {
  font-size: clamp(22px, 2.6vw, 27px); line-height: 1.25;
  margin: 2.2em 0 .7em; color: var(--text);
}
.post-body h2::before { content: "## "; font-family: var(--mono); color: var(--accent); opacity: .7; }
.post-body strong { color: var(--text); }
.post-body a { text-decoration: underline; text-underline-offset: 3px; }
.post-body blockquote {
  margin: 1.8em 0; padding: 4px 0 4px 20px;
  border-left: 3px solid var(--accent); color: var(--text); font-size: 20px;
}
.post-body .post-flow {
  font: 500 15px/1.6 var(--mono); color: var(--text);
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; padding: 14px 18px;
}
.post-flow .prompt { color: var(--accent); }
.post-body ul { padding-left: 1.2em; }
.post-body li + li { margin-top: .4em; }

.post-end {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  margin-top: 56px; padding-top: 24px; border-top: 1px dashed var(--line-2);
  font: 500 14px var(--mono);
}

/* mono at reading size runs wide: give it a little less */
html[data-phos] .post-body { font-size: 16.5px; line-height: 1.8; }
html[data-phos] .post-body .lede, html[data-phos] .post-body blockquote { font-size: 18px; }

/* ── listing ──────────────────────────────────────── */

.blog-head { padding: 56px 0 32px; }
.blog-head .lead { margin-bottom: 0; }

.posts { list-style: none; margin: 0; padding: 0 0 72px; }
.posts li { border-top: 1px solid var(--line); }
.posts li:last-child { border-bottom: 1px solid var(--line); }
.posts a { display: grid; grid-template-columns: 130px 1fr; gap: 6px 28px; padding: 26px 4px; color: inherit; }
.posts a:hover { text-decoration: none; background: rgb(var(--accent-rgb) / .04); }
.posts a:hover h2 { color: var(--accent); }
.posts time { font: 500 13px var(--mono); color: var(--muted); padding-top: 4px; }
.posts h2 { font-size: clamp(19px, 2.2vw, 23px); margin: 0 0 8px; transition: color .15s; }
.posts p { margin: 0; color: var(--muted); }
.posts .more { font: 500 13px var(--mono); color: var(--dim); margin-top: 10px; }

@media (max-width: 760px) {
  .post { padding-top: 36px; }
  .post-body { font-size: 17px; }
  .posts a { grid-template-columns: 1fr; }
}
