/* The old blog (build/pages/blog.mjs), on top of pages.css. */

.blog {
  --paper: #f6f3ec;
  --card: #fbf9f4;
  --rule: #ddd6c8;
  --accent: #1f4fd8;
  --code-bg: #171a21;
  --code-ink: #e6e3da;
  background: var(--paper);
}
.blog .wrap { max-width: 820px; }
.blog .wrap--text { max-width: 720px; }
.blog header { padding-top: 56px; padding-bottom: 28px; }
.blog .back { display: inline-block; margin-bottom: 36px; text-decoration: none; color: var(--muted); }
.blog .back:hover { color: var(--accent); }
.blog h1 { margin: 12px 0 18px; font-size: clamp(34px, 6vw, 56px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; }
.blog h1 em { font: italic 400 1.08em 'Instrument Serif', Georgia, serif; letter-spacing: -0.01em; color: var(--accent); }
.blog h1 .series { display: block; margin-bottom: 10px; font: 600 13px/1.3 'JetBrains Mono', ui-monospace, monospace; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.blog .lead { max-width: 620px; font-size: 18px; color: var(--muted); }
.blog .note { font-size: 14px; color: var(--muted); }
.blog main { padding-bottom: 72px; }
.blog section + section { margin-top: 48px; }
.blog h2 { font-size: 22px; letter-spacing: -0.02em; }

/* Index */
.shelf { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.shelf a { display: inline-flex; align-items: baseline; gap: 7px; padding: 8px 14px; border: 1px solid var(--rule); border-radius: 999px; background: var(--card); font-size: 14px; text-decoration: none; }
.shelf a:hover { border-color: var(--accent); }
.shelf b { font: italic 400 20px/1 'Instrument Serif', Georgia, serif; color: var(--accent); }
.also__list { list-style: none; display: grid; gap: 12px; margin-top: 16px; }
.also__card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--rule); border-radius: 14px; background: var(--card); text-decoration: none; }
.also__card:hover { border-color: var(--accent); color: inherit; }
.also__card img { align-self: flex-start; height: 56px; width: auto; max-width: 100%; margin-bottom: 6px; object-fit: contain; }
.also__title { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
@media (min-width: 900px) {
  .blog .wrap { max-width: 1040px; }
  .blog .wrap--text { max-width: 720px; }
  .blog .layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
  .blog .layout section + section { margin-top: 0; }
  .also { position: sticky; top: 24px; }
}
.parts { list-style: none; margin: 16px 0 14px; padding: 0; border-top: 1px solid var(--rule); }
.part { display: flex; gap: 20px; align-items: baseline; padding: 16px 4px; border-bottom: 1px solid var(--rule); }
.part__num { flex: none; width: 1.4em; font: italic 400 34px/1 'Instrument Serif', Georgia, serif; color: var(--accent); text-align: center; }
.part h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.part h3 a { text-decoration: none; }
.part h3 a:hover { text-decoration: underline; }
.part__meta { margin-top: 2px; font-size: 14px; color: var(--muted); }
.part--lost .part__num, .part--lost h3 { color: #8d877b; }
.part--lost h3 { font-weight: 500; }
.badge { display: inline-block; margin-left: 6px; padding: 3px 7px; border: 1px solid currentColor; border-radius: 999px; font: 600 10px/1 'JetBrains Mono', ui-monospace, monospace; letter-spacing: 0.08em; text-transform: uppercase; vertical-align: middle; }
.part blockquote { margin: 10px 0 0; padding-left: 14px; border-left: 2px solid var(--rule); font: italic 400 19px/1.35 'Instrument Serif', Georgia, serif; color: #4a4640; }
.part__scraps { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.part__scraps img { display: block; height: 120px; width: auto; border: 1px solid var(--rule); border-radius: 6px; background: #fff; }

/* Post */
.prose { font-size: 17.5px; line-height: 1.7; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2em; font-size: 28px; letter-spacing: -0.025em; }
.prose h3 { margin-top: 1.7em; font-size: 21px; }
.prose h4 { margin-top: 1.5em; font-size: 17.5px; }
.prose a { color: var(--accent); }
.prose ul { padding-left: 1.3em; }
.prose li + li { margin-top: 0.45em; }
.prose figure { margin-left: 0; margin-right: 0; }
.prose img { display: block; max-width: 100%; height: auto; max-height: 420px; margin: 0 auto; border-radius: 6px; }
.prose code { padding: 0.12em 0.36em; border-radius: 5px; background: #e9e3d5; font: 500 0.88em 'JetBrains Mono', ui-monospace, monospace; }
.prose .code { display: flex; border-radius: 10px; background: var(--code-bg); color: var(--code-ink); overflow: hidden; }
.prose pre { margin: 0; padding: 16px 18px; overflow-x: auto; font: 500 14px/1.6 'JetBrains Mono', ui-monospace, monospace; tab-size: 4; }
.prose .code > pre:last-child { flex: 1; min-width: 0; }
.prose pre code { padding: 0; background: none; font: inherit; }
.prose .nums { flex: none; padding-right: 12px; padding-left: 14px; overflow: hidden; text-align: right; color: #6f7480; background: rgba(255, 255, 255, 0.04); user-select: none; }
.t-c { color: #8b93a3; font-style: italic; }
.t-s { color: #f2b872; }
.t-p { color: #c7a6ff; }
.t-k { color: #82b1ff; }
.t-n { color: #9be3b0; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 36px; }
.tags li { padding: 4px 9px; border: 1px solid var(--rule); border-radius: 999px; font: 500 12px/1.2 'JetBrains Mono', ui-monospace, monospace; color: var(--muted); }
.nearby { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.near { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); text-decoration: none; }
.near:hover { border-color: var(--accent); }
.near:last-child { text-align: right; }
.near__label { font: 600 11px/1.3 'JetBrains Mono', ui-monospace, monospace; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.near__title { font-weight: 600; }
.home { margin-top: 28px; text-align: center; font-size: 14px; color: var(--muted); }

@media (max-width: 560px) {
  .nearby { grid-template-columns: 1fr; }
  .near:last-child { text-align: left; }
  .prose { font-size: 16.5px; }
  .prose pre { font-size: 12.5px; padding: 14px; }
  .prose .nums { padding-left: 10px; padding-right: 8px; }
}
