/* The blog, in the landing page's look: Rethink Sans headings, Inter text, Instrument Serif for the
   italic accent, zinc greys and Artifacts blue. */

@font-face { font-family: 'Rethink Sans'; src: url('/blog/fonts/rethink-sans.woff2') format('woff2'); font-weight: 400 800; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/blog/fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/blog/fonts/inter-italic.woff2') format('woff2'); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('/blog/fonts/instrument-serif-italic.woff2') format('woff2'); font-style: italic; font-display: swap; }

:root {
  --ink: #09090b;
  --text: #27272a;
  --muted: #52525b;
  --faint: #71717a;
  --line: rgb(0 0 0 / 0.08);
  --tint: #f4f4f5;
  --paper: #fafafa;
  --blue: #3764e0;
  --blue-deep: #1d3fae;
  --blue-tint: #eef2fd;
  --display: 'Rethink Sans', ui-sans-serif, system-ui, sans-serif;
  --sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --serif: 'Instrument Serif', ui-serif, Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: #fff; color: var(--text); font: 16px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; height: auto; }

.bar { max-width: 1160px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 24px; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: rgb(255 255 255 / 0.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); font-family: var(--display); }
.top .bar { height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.mark { width: 28px; height: 28px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; }
.top nav a { text-decoration: none; padding: 6px 14px; border-radius: 999px; color: #3f3f46; }
.top nav a:hover { background: var(--tint); color: var(--ink); }
.top nav a.button, .top nav a.button:hover { color: #fff; background: var(--ink); }

.button { display: inline-flex; align-items: center; height: 40px; padding: 0 20px; border-radius: 999px; background: var(--ink); color: #fff; font: 500 15px/1 var(--display); text-decoration: none; border: 1px solid var(--ink); }
.button:hover { background: #27272a; }

main { padding: 0 24px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; color: var(--ink); text-wrap: balance; }
.lead { font-size: 19px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }

/* Post header */
.post { max-width: 1112px; margin: 0 auto; }
.post-head { max-width: 800px; margin: 0 auto; padding: 48px 0 0; }
.crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--faint); }
.crumbs a { text-decoration: none; color: var(--blue); }
.crumbs a:hover { text-decoration: underline; }
.post-head h1 { margin: 16px 0 0; font-size: clamp(2.1rem, 5vw, 3rem); line-height: 1.08; letter-spacing: -0.035em; }
.post-head .lead { margin: 18px 0 0; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 20px 0 0; font-size: 14px; color: var(--faint); }
.meta span + span::before { content: '·'; margin-right: 18px; color: #d4d4d8; }
.meta span:first-child { color: var(--text); font-weight: 500; }
.cover { display: block; width: 100%; margin: 32px 0 0; border-radius: 16px; border: 1px solid var(--line); }

/* Post body: contents on the left on wide screens, the article beside it */
.post-body { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 720px; margin: 0 auto; padding: 8px 0 24px; }
@media (min-width: 1120px) {
  /* The article stays centred under the title; the contents sit in the left margin. */
  .post-body { max-width: none; grid-template-columns: minmax(0, 1fr) minmax(0, 720px) minmax(0, 1fr); gap: 48px; }
  .toc { grid-column: 1; justify-self: end; width: 220px; position: sticky; top: 88px; align-self: start; margin-top: 48px; }
  .prose { grid-column: 2; }
}
.toc { margin-top: 32px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; line-height: 1.45; }
.toc p { margin: 0 0 8px; font-weight: 600; color: var(--ink); font-size: 13px; letter-spacing: 0.02em; text-transform: uppercase; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin-top: 8px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--blue); }
@media (min-width: 1120px) { .toc { padding: 0 0 0 16px; border: 0; border-left: 1px solid var(--line); border-radius: 0; } }

.prose { padding-top: 12px; }
.prose > :first-child { margin-top: 24px; }
.prose h2 { margin: 52px 0 0; font-size: 1.85rem; line-height: 1.2; letter-spacing: -0.03em; }
.prose h3 { margin: 32px 0 0; font-size: 1.3rem; line-height: 1.3; letter-spacing: -0.02em; }
.prose p, .prose ul, .prose ol, .prose pre, .prose blockquote, .prose .table { margin: 16px 0 0; }
.prose p { text-wrap: pretty; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin-top: 6px; padding-left: 4px; }
.prose li::marker { color: var(--blue); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--blue); text-decoration: underline; text-decoration-color: rgb(55 100 224 / 0.35); text-underline-offset: 3px; }
.prose a:hover { color: var(--blue-deep); text-decoration-color: currentColor; }
.prose code { font: 0.88em/1.5 var(--mono); background: var(--tint); border-radius: 5px; padding: 2px 5px; color: var(--ink); }
.prose pre { background: #18181b; color: #f4f4f5; border-radius: 12px; padding: 16px 18px; overflow-x: auto; font-size: 14px; line-height: 1.6; }
.prose pre code { background: none; padding: 0; color: inherit; font-size: inherit; white-space: pre; }
/* Prompts are prose: they wrap instead of scrolling. */
.prose pre code.language-text { white-space: pre-wrap; overflow-wrap: anywhere; }
/* Callouts (Key takeaways, notes) */
.prose blockquote { padding: 18px 22px; border-radius: 12px; background: var(--blue-tint); border: 1px solid rgb(55 100 224 / 0.15); color: var(--text); }
.prose blockquote > :first-child { margin-top: 0; }
.prose blockquote ul { margin-top: 8px; }
.prose img { display: block; margin: 28px 0 0; border: 1px solid var(--line); border-radius: 12px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.table { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.prose th { background: var(--paper); font-weight: 600; color: var(--ink); }
.prose tr:last-child td { border-bottom: 0; }

/* Sources and the call to action */
.sources { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.sources h2 { margin: 0; font-size: 1.2rem; letter-spacing: -0.02em; }
.sources ol { margin: 12px 0 0; padding-left: 22px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.sources li { margin-top: 6px; overflow-wrap: anywhere; }
.sources a { color: var(--muted); }
.sources a:hover { color: var(--ink); }
.cta { margin: 48px 0 0; padding: 28px 32px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); }
.cta-title { margin: 0 !important; font: 400 1.75rem/1.15 var(--display); letter-spacing: -0.035em; color: var(--ink); }
.cta-title em { font-family: var(--serif); font-weight: 400; padding-right: 0.04em; }
.cta p { margin: 10px 0 0; color: var(--muted); }
.cta p:last-child { margin-top: 18px; }
.cta a.button { color: #fff; text-decoration: none; }

/* Cards: the index and "Keep reading" */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.cards a { height: 100%; display: flex; flex-direction: column; gap: 8px; text-decoration: none; }
.cards img { display: block; width: 100%; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 8px; transition: border-color 0.15s; }
.cards a:hover img { border-color: var(--blue); }
.card-kicker { font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--blue); }
.card-title { font: 400 1.3rem/1.25 var(--display); letter-spacing: -0.025em; color: var(--ink); text-wrap: balance; }
.cards a:hover .card-title { color: var(--blue-deep); }
.card-text { font-size: 15px; line-height: 1.55; color: var(--muted); }
.cards time { margin-top: auto; padding-top: 4px; font-size: 13px; color: var(--faint); }

.index { max-width: 1112px; margin: 0 auto; padding: 56px 0 88px; }
.index h1 { margin: 0; font-size: clamp(2.4rem, 6vw, 3.4rem); line-height: 1.05; letter-spacing: -0.04em; }
.index .lead { max-width: 720px; margin: 16px 0 40px; }
.index .lead a { color: var(--blue); }
.more { max-width: 1112px; margin: 64px auto 0; padding: 48px 0 88px; border-top: 1px solid var(--line); }
.more h2 { margin: 0 0 24px; font-size: 1.6rem; letter-spacing: -0.03em; }

/* Footer */
footer { background: #18181b; color: #a1a1aa; font-size: 14px; }
footer .bar { min-height: 64px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
footer .line { flex: 1; text-align: center; }
footer nav { display: flex; gap: 20px; }
footer a { text-decoration: none; }
footer a:hover { color: #f4f4f5; }

@media (max-width: 720px) {
  .bar { padding: 0 16px; gap: 12px; }
  main { padding: 0 16px; }
  .top nav a.quiet { display: none; }
  .top nav a { padding: 6px 10px; }
  .post-head { padding-top: 28px; }
  /* On a phone the cover only repeats the title above it. */
  .cover { display: none; }
  .meta span + span::before { display: none; }
  .lead { font-size: 17px; }
  .prose h2 { font-size: 1.55rem; }
  .cta { padding: 24px; }
  footer .line { display: none; }
  footer nav { margin-left: auto; }
}
