/* Blog pages are static HTML (scripts/build-blog.mjs). Same tokens as the
   homepage (src/index.css): paper, ink, lime for the one action. */
:root {
  --paper: #fbfaf8;
  --ink: #0e0e10;
  --muted: #5f5f69;
  --lime: #d6ff3e;
  --violet: #7b4bff;
  --lilac: #e4dbff;
  --rule: rgb(14 14 16 / 0.1);
  --sans: 'SF Pro Text', system-ui, -apple-system, 'Inter Tight', 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', 'New York', ui-serif, Georgia, serif;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgb(123 75 255 / 0.15);
  scroll-padding-top: 88px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 6px; }

.skip-link { position: absolute; left: 16px; top: -100px; z-index: 20; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 600; text-decoration: none; }
.skip-link:focus-visible { top: 12px; }

.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px max(var(--gutter), calc((100% - 1180px) / 2 + var(--gutter)));
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.wordmark { display: inline-flex; align-items: flex-start; gap: 2px; font-weight: 700; font-size: 1.6rem; letter-spacing: -0.04em; text-decoration: none; }
.wordmark svg { width: 0.42em; height: 0.42em; margin-top: 0.08em; fill: var(--violet); }
.site-header nav { display: flex; align-items: center; gap: 20px; font-weight: 600; font-size: 0.95rem; }
.site-header nav a:not(.get-app) { text-decoration: none; }
.site-header nav a:not(.get-app):hover { text-decoration: underline; text-underline-offset: 3px; }

.get-app {
  display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px;
  border-radius: 999px; background: var(--lime); color: var(--ink);
  font-weight: 600; text-decoration: none; touch-action: manipulation;
  transition: box-shadow 160ms ease, transform 160ms ease;
}
.get-app:hover { box-shadow: 0 0 0 3px var(--ink) inset; }
.get-app:active { transform: scale(0.97); }

/* ---------- Article ---------- */

.post, .blog-index, .more { max-width: 720px; margin: 0 auto; padding: 0 var(--gutter); }
.post { padding-top: clamp(24px, 5vw, 56px); }
.post-meta { color: var(--muted); font-size: 0.9rem; margin: 0 0 16px; }
.post-meta a { text-decoration: none; }
.post-meta a:hover { text-decoration: underline; }

.post h1, .blog-index h1 {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1.02; letter-spacing: -0.015em;
  margin: 0 0 20px; text-wrap: balance;
}
.post-lede { font-size: 1.2rem; line-height: 1.5; color: var(--muted); margin: 0 0 36px; text-wrap: pretty; }

.prose { font-size: 1.1rem; line-height: 1.7; }
.prose > * { margin: 0 0 1.1em; }
.prose h2 { font-size: 1.6rem; line-height: 1.2; letter-spacing: -0.02em; margin: 2em 0 0.6em; text-wrap: balance; }
.prose h3 { font-size: 1.2rem; line-height: 1.3; margin: 1.6em 0 0.4em; }
.prose a { color: #5b2fe0; text-underline-offset: 2px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.45em; }
.prose blockquote { margin-left: 0; padding: 4px 20px; border-left: 3px solid var(--violet); color: var(--muted); }
.prose code { font-size: 0.92em; background: rgb(14 14 16 / 0.06); padding: 0.1em 0.35em; border-radius: 6px; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; line-height: 1.45; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
.prose th { font-weight: 600; background: rgb(14 14 16 / 0.03); }
.prose h2#sources + ul, .prose h2:last-of-type + ul { font-size: 0.9rem; color: var(--muted); }

.post-cta {
  margin: 56px auto 0;
  padding: 32px 28px;
  max-width: calc(720px - 2 * var(--gutter));
  background: var(--lilac);
  border-radius: 28px;
}
@media (max-width: 760px) { .post-cta { margin-inline: var(--gutter); } }
.post-cta > * { margin: 0 0 14px; }
.post-cta > :last-child { margin-bottom: 0; }
.post-cta-line { font-family: var(--serif); font-style: italic; font-size: 1.9rem; line-height: 1.05; }
.post-cta p:not(.post-cta-line) { line-height: 1.55; }

.more { margin-top: 56px; }
.more h2 { font-size: 1.1rem; margin: 0 0 12px; }
.more a { display: grid; gap: 4px; padding: 16px 0; border-top: 1px solid var(--rule); text-decoration: none; }
.more a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.more span { color: var(--muted); line-height: 1.5; }

/* ---------- Index ---------- */

.blog-index { padding-top: clamp(24px, 5vw, 56px); }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list a { display: grid; gap: 6px; padding: 22px 0; border-top: 1px solid var(--rule); text-decoration: none; }
.post-list time { color: var(--muted); font-size: 0.9rem; }
.post-list strong { font-size: 1.35rem; line-height: 1.25; letter-spacing: -0.015em; }
.post-list a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.post-list span { color: var(--muted); line-height: 1.5; }

.site-footer {
  max-width: 1180px; margin: 72px auto 0; padding: 32px var(--gutter) 48px;
  display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center;
  border-top: 1px solid var(--rule); color: var(--muted);
}
.site-footer span { color: var(--ink); font-weight: 700; letter-spacing: -0.03em; font-size: 1.2rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer nav a { text-decoration: none; padding: 6px 0; }
.site-footer nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 520px) {
  .site-header nav { gap: 14px; }
  .get-app { padding: 8px 14px; font-size: 0.9rem; }
}
