@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --bg: #ffffff;
  --text: #1c1d1f;
  --muted: #5d6168;
  --rule: #e4e6e9;
  --soft: #f5f6f7;
  --link: #0b5c8a;
  --measure: 68ch;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131416;
    --text: #e8e9eb;
    --muted: #a3a8af;
    --rule: #2c2f33;
    --soft: #1c1e21;
    --link: #7cc0ec;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.125rem/1.65 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--link); text-underline-offset: 0.15em; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
.narrow { max-width: calc(var(--measure) + 2rem); }

header.site { border-bottom: 1px solid var(--rule); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.75rem; }
.brand { font-weight: 700; font-size: 1.0625rem; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
header.site nav { display: flex; gap: 1.25rem; font-size: 0.9375rem; }
header.site nav a { color: var(--muted); text-decoration: none; }
header.site nav a:hover { color: var(--text); }

.lede { font-size: clamp(1.375rem, 3vw, 1.875rem); line-height: 1.3; font-weight: 600; letter-spacing: -0.015em; max-width: 34ch; margin: 2.5rem 0 1.5rem; }
.list { list-style: none; margin: 0 0 4rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 30rem), 1fr)); gap: 0 2.5rem; }
.list li { border-top: 1px solid var(--rule); }
.list a { display: flex; gap: 1rem; padding: 1.125rem 0; text-decoration: none; color: inherit; }
.list img, .list .noimg { flex: none; width: 7.5rem; height: 5rem; object-fit: cover; border-radius: 4px; background: var(--soft); }
.list span { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.list strong { font-size: 1.0625rem; line-height: 1.35; font-weight: 600; }
.list a:hover strong { color: var(--link); }
.list small { font-size: 0.9375rem; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list time { font-size: 0.8125rem; color: var(--muted); }

.post header { padding-top: 2.5rem; }
.post h1 { font-size: clamp(1.875rem, 4.5vw, 2.75rem); line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; margin: 0 0 0.75rem; }
.meta { color: var(--muted); font-size: 0.9375rem; margin: 0 0 1.75rem; }
.hero { margin: 0 auto 2rem; max-width: 48rem; }
.hero img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: var(--soft); }
.hero figcaption { font-size: 0.8125rem; color: var(--muted); margin-top: 0.5rem; text-align: center; }

.content { padding-bottom: 4rem; overflow-wrap: break-word; }
.content h2 { font-size: 1.625rem; line-height: 1.25; letter-spacing: -0.015em; margin: 2.5rem 0 0.75rem; }
.content h3 { font-size: 1.3125rem; line-height: 1.3; margin: 2rem 0 0.5rem; }
.content h4, .content h5, .content h6 { font-size: 1.125rem; margin: 1.5rem 0 0.5rem; }
.content p, .content ul, .content ol, .content blockquote, .content table { margin: 0 0 1.25rem; }
.content li { margin-bottom: 0.375rem; }
.content blockquote { border-left: 3px solid var(--rule); padding-left: 1rem; color: var(--muted); }
.content hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
.content figure { margin: 1.75rem 0; }
.content figcaption { font-size: 0.8125rem; color: var(--muted); margin-top: 0.5rem; }
.content img { border-radius: 4px; }
.content table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.45; }
.content th, .content td { border-bottom: 1px solid var(--rule); padding: 0.5rem 0.75rem 0.5rem 0; text-align: left; vertical-align: top; }
.content th { font-weight: 600; }
.content code { font-size: 0.875em; background: var(--soft); padding: 0.1em 0.3em; border-radius: 3px; }
.content .alert { background: var(--soft); border-radius: 4px; padding: 1rem; margin: 0 0 1.25rem; }
.content .kg-width-wide, .content .kg-width-full { max-width: none; }

footer.site { border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.875rem; }
footer.site .wrap { padding-top: 1.5rem; padding-bottom: 2rem; }
footer.site p { margin: 0 0 0.5rem; max-width: 60ch; }
.content .num { text-align: right; }
@media (max-width: 30rem) { .list img, .list .noimg { width: 6rem; height: 4rem; } }

/* A/B test: beacon.js sets html[data-ab] before the page paints. */
html[data-ab="B"] .ab-a { display: none; }
html:not([data-ab="B"]) .ab-b { display: none; }

.related { padding-bottom: 3rem; }
.related h2 { font-size: 1.375rem; line-height: 1.25; letter-spacing: -0.015em; margin: 0 0 0.75rem; }
.related .list { display: block; margin: 0; }
.related .list li:last-child { border-bottom: 1px solid var(--rule); }
.post .content { padding-bottom: 3rem; }
