/* tung.so/blog — loaded after style.css, whose tokens, nav, buttons and footer it reuses. */
.post { max-width: 42rem; margin: 0 auto; padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 1.5rem) clamp(4rem, 8vw, 6rem); }
.post-head { margin-bottom: 2.5rem; }
.post-head h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.05; font-weight: 740; }
.post-lede { margin: 1rem 0 0; font-size: 1.2rem; color: var(--text-2); }
.post-date { margin: 0 0 0.75rem; font-size: 0.88rem; color: var(--text-2); }
.post-draft { margin-left: 0.4rem; padding: 0.1rem 0.45rem; border-radius: 0.4rem; background: var(--primary-soft); color: var(--primary); font-size: 0.75rem; font-weight: 700; }

/* the article body */
.prose { font-size: 1.08rem; line-height: 1.7; }
.prose > * { margin: 0 0 1.25rem; }
.prose h2 { font-size: 1.6rem; line-height: 1.2; margin: 2.75rem 0 1rem; }
.prose h3 { font-size: 1.25rem; line-height: 1.3; margin: 2rem 0 0.75rem; }
.prose a { color: var(--primary); text-underline-offset: 0.15em; }
.prose a:hover { color: var(--primary-hover); }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin: 0.35rem 0; }
.prose blockquote { margin-left: 0; padding: 0.25rem 0 0.25rem 1.1rem; border-left: 3px solid var(--primary); color: var(--text-2); }
.prose img { border-radius: 0.8rem; margin: 2rem auto; }
.prose code { font: 0.9em ui-monospace, SFMono-Regular, Menlo, monospace; padding: 0.1em 0.35em; border-radius: 0.35rem; background: var(--card); }
.prose pre { padding: 1rem 1.2rem; border-radius: 0.8rem; background: var(--card); overflow-x: auto; line-height: 1.5; }
.prose pre code { padding: 0; background: none; font-size: 0.88rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.prose th, .prose td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.prose th { font-weight: 650; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
/* Chinese in running text: write <span lang="zh-Hans">…</span> to get the CJK face. */
.prose [lang^='zh'] { font-family: var(--cjk); }

/* the call to action under every post */
.post-cta {
  margin-top: 4rem; padding: clamp(1.5rem, 4vw, 2.25rem); border-radius: 1.25rem;
  background: radial-gradient(120% 140% at 100% 0%, #fde8e8 0%, #fff5f5 40%, #fafafa 75%);
}
.post-cta h2 { font-size: 1.6rem; line-height: 1.1; font-weight: 720; }
.post-cta p { margin: 0.6rem 0 1.5rem; color: var(--text-2); }

/* the index */
.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.post-card { display: block; padding: 1.4rem 1.5rem; border-radius: 1rem; background: var(--card); text-decoration: none; transition: background 0.15s; }
.post-card:hover { background: #e9e9eb; }
.post-card h2 { font-size: 1.4rem; line-height: 1.2; }
.post-card p:last-child { margin: 0.5rem 0 0; color: var(--text-2); }
.post-card .post-date { margin-bottom: 0.4rem; }
.post-empty { color: var(--text-2); }

@media (max-width: 720px) {
  /* style.css hides the landing page's section links on phones; the blog's two are short enough to keep */
  body:has(.post) .nav-links { display: flex; gap: 1.25rem; margin-left: auto; }
  /* style.css centres the hero's store buttons on phones; the card's text is left-aligned */
  .post-cta .stores { justify-content: flex-start; }
}

/* a captioned picture: <figure><img …><figcaption>…</figcaption></figure>; class="narrow" for a phone screenshot */
.prose figure { margin: 2rem 0; }
.prose figure img { display: block; width: 100%; height: auto; margin: 0 auto; }
.prose figure.narrow img { max-width: 20rem; }
.prose figcaption { margin-top: 0.6rem; text-align: center; font-size: 0.9rem; color: var(--text-2); }
