/* Blog: the index and every post. Same tokens, menu bar, wallpaper and type as the landing page. Built by tools/blog.py. */
:root {
  --bg: #0e0f11;
  --text: #f5f5f7;
  --text-2: rgba(235, 235, 245, 0.62);
  --text-3: rgba(235, 235, 245, 0.38);
  --line: rgba(255, 255, 255, 0.08);
  --accent: #0a84ff;
  --accent-text: #3d9bff;
  --font: "SF Pro", -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-settle: cubic-bezier(0.34, 1.36, 0.64, 1);
  --gutter: 24px;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; overflow-x: clip; min-height: 100vh; display: flex; flex-direction: column; }
.bl { flex: 1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

.sf { display: inline-block; vertical-align: middle; flex: none; height: var(--sz, 18px); background: currentColor; -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; }
.sf-apple { --src: url("../assets/sf/apple.png"); aspect-ratio: 114 / 142; }

/* ---------- Menu bar (top) and footer, as on the landing page ---------- */
.bl-menubar {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 28px;
  display: flex; align-items: center; gap: 2px; padding: 0 10px 0 14px;
  font-size: 13px; line-height: 16px; color: #fff; text-shadow: 0 0 6px rgba(0, 0, 0, 0.35);
  background: rgba(10, 10, 12, 0.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6);
}
.bl-menubar__apple { display: flex; align-items: center; height: 22px; padding: 0 10px 0 6px; margin-right: 4px; border-radius: 6px; }
.bl-menubar__apple .sf { --sz: 15px; margin-top: -2px; }
.bl-menubar__item { height: 22px; display: flex; align-items: center; padding: 0 9px; border-radius: 6px; white-space: nowrap; color: rgba(255, 255, 255, 0.92); }
.bl-menubar__item--app { font-weight: 700; color: #fff; }
.bl-menubar__item:hover, .bl-menubar__apple:hover, .bl-footer__brand:hover { background: rgba(255, 255, 255, 0.16); }
.bl-menubar a:focus-visible, .bl-footer a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.bl-footer { display: flex; align-items: center; gap: 2px; min-height: 28px; padding: 0 14px; font-size: 13px; line-height: 16px; color: #fff; background: rgba(10, 10, 12, 0.6); border-top: 1px solid rgba(255, 255, 255, 0.06); }
.bl-footer__brand { display: flex; align-items: center; gap: 7px; height: 22px; padding: 0 9px 0 6px; margin-right: 4px; border-radius: 6px; font-weight: 700; }
.bl-footer__links { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.bl-footer__fine { margin: 0 0 0 auto; padding: 0 8px 0 6px; font-size: 12px; color: rgba(255, 255, 255, 0.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* ---------- Page: the hero wallpaper, dimmed, melting into the page colour ---------- */
.bl { position: relative; isolation: isolate; padding: 0 var(--gutter); }
.bl-wall { position: absolute; inset: 0 0 auto 0; height: 640px; z-index: -1; pointer-events: none; overflow: hidden; }
.bl-wall::before { content: ""; position: absolute; inset: 0; background: url("../assets/wallpaper.webp?v=2") center 30% / cover no-repeat; opacity: 0.22; }
.bl-wall::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(14, 15, 17, 0.2) 0%, rgba(14, 15, 17, 0.6) 55%, var(--bg) 100%); }

.bl-eyebrow { display: inline-block; margin: 0 0 10px; font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: -0.01em; color: var(--accent-text); }
a.bl-eyebrow:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Index ---------- */
.bl-hero { max-width: 1040px; margin: 0 auto; padding: 128px 0 56px; }
.bl-hero__title { margin: 0; max-width: 760px; font-size: clamp(40px, 6vw, 64px); line-height: 1.04; font-weight: 600; letter-spacing: -0.035em; text-wrap: balance; }
.bl-hero__lede { margin: 18px 0 0; max-width: 560px; font-size: 19px; line-height: 1.45; color: var(--text-2); text-wrap: pretty; }

.bl-list { list-style: none; max-width: 1040px; margin: 0 auto; padding: 0 0 120px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.bl-card { display: flex; flex-direction: column; height: 100%; border-radius: 24px; background: rgba(255, 255, 255, 0.05); overflow: hidden; transition: background-color 0.25s var(--ease-out), translate 0.4s var(--ease-settle); }
.bl-card:hover { background: rgba(255, 255, 255, 0.08); translate: 0 -2px; }
.bl-card:focus-visible { outline: 3px solid rgba(10, 132, 255, 0.55); outline-offset: 3px; }
.bl-card__img { display: block; margin: 4px 4px 0; aspect-ratio: 16 / 10; border-radius: 20px; overflow: hidden; background: rgba(255, 255, 255, 0.04); }
.bl-card__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bl-card__text { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 24px; }
.bl-card__date { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.bl-card__title { font-size: 21px; line-height: 1.25; font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; }
.bl-card__desc { font-size: 15px; line-height: 1.5; color: var(--text-2); text-wrap: pretty; }
.bl-empty { max-width: 1040px; margin: 0 auto; padding: 0 0 160px; font-size: 17px; color: var(--text-2); }
.bl-empty a { color: var(--accent-text); }

/* ---------- Post ---------- */
.bl-post { max-width: 720px; margin: 0 auto; padding: 120px 0 96px; }
.bl-post__head { margin-bottom: 40px; }
.bl-post__title { margin: 0; font-size: clamp(34px, 5.4vw, 52px); line-height: 1.08; font-weight: 600; letter-spacing: -0.03em; text-wrap: balance; }
.bl-post__lede { margin: 18px 0 0; font-size: 20px; line-height: 1.45; color: var(--text-2); text-wrap: pretty; }
.bl-meta { margin: 20px 0 0; font-size: 14px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.bl-meta__by { color: var(--text-2); font-weight: 500; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.2); text-underline-offset: 3px; transition: color 0.2s; }
.bl-meta__by:hover { color: var(--text); text-decoration-color: currentColor; }
.bl-draft { display: table; margin: 0 0 16px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #1d1d1f; background: #ffd60a; }
.bl-cover { margin: 0 0 48px; border-radius: 20px; overflow: hidden; background: rgba(255, 255, 255, 0.04); box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgba(0, 0, 0, 0.6); }
.bl-cover img { display: block; width: 100%; }

/* Prose */
.bl-prose { font-size: 18px; line-height: 1.7; color: var(--text-2); overflow-wrap: break-word; }
.bl-prose > * { margin: 0 0 1.15em; }
.bl-prose h2 { margin: 2.1em 0 0.6em; font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; color: var(--text); text-wrap: balance; scroll-margin-top: 48px; }
.bl-prose h3 { margin: 1.8em 0 0.5em; font-size: 21px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; color: var(--text); scroll-margin-top: 48px; }
.bl-prose h4 { margin: 1.6em 0 0.4em; font-size: 18px; font-weight: 600; color: var(--text); }
.bl-prose strong { font-weight: 600; color: var(--text); }
.bl-prose a { color: var(--accent-text); text-decoration: underline; text-decoration-color: rgba(61, 155, 255, 0.35); text-underline-offset: 3px; transition: text-decoration-color 0.2s; }
.bl-prose a:hover { text-decoration-color: currentColor; }
.bl-prose ul, .bl-prose ol { padding-left: 1.3em; }
.bl-prose li { margin: 0.4em 0; padding-left: 0.2em; }
.bl-prose li::marker { color: var(--text-3); }
.bl-prose ol li::marker { font-variant-numeric: tabular-nums; }
.bl-prose hr { height: 1px; border: 0; background: var(--line); margin: 2.4em 0; }
.bl-prose blockquote { margin-left: 0; padding: 2px 0 2px 20px; border-left: 3px solid rgba(10, 132, 255, 0.6); color: var(--text); }
.bl-prose blockquote > :last-child { margin-bottom: 0; }
.bl-prose figure { margin: 2em 0; }
.bl-prose figure img { display: block; width: 100%; border-radius: 16px; box-shadow: 0 0 0 1px var(--line); background: rgba(255, 255, 255, 0.04); }
.bl-prose figcaption { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--text-3); text-align: center; text-wrap: balance; }
.bl-prose code { font: 0.86em/1.4 var(--mono); padding: 0.15em 0.4em; border-radius: 6px; background: rgba(255, 255, 255, 0.08); color: var(--text); }
.bl-prose pre { overflow-x: auto; padding: 18px 20px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line); }
.bl-prose pre code { padding: 0; background: none; font-size: 14px; line-height: 1.6; }
.bl-table { overflow-x: auto; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.bl-prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.bl-prose th, .bl-prose td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.bl-prose th { font-weight: 600; color: var(--text); background: rgba(255, 255, 255, 0.04); }
.bl-prose tr:last-child td { border-bottom: 0; }

/* Keys: the landing page's keycaps */
.bl-prose kbd, .bl-cta kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.45em; height: 1.45em; padding: 0 0.42em; margin: 0 0.08em; vertical-align: 0.08em;
  border-radius: 0.3em; font: 600 0.8em/1 var(--font); letter-spacing: 0; color: #fff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), inset 0 -2px 0 rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ---------- Call to action: the landing page's price card (tinted shell, label, dark inset panel) ---------- */
.bl-cta { margin-top: 64px; display: flex; flex-direction: column; border-radius: 24px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.bl-cta__label { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 16px; font-size: 17px; line-height: 1.45; color: #fff; }
.bl-cta__panel { margin: 0 4px 4px; padding: 32px; border-radius: 20px; background: var(--bg);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.1), inset 0 -18px 28px -20px rgba(255, 255, 255, 0.12); }
.bl-cta__title { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
.bl-cta__text { margin: 10px 0 0; font-size: 16px; line-height: 1.55; color: var(--text-2); text-wrap: pretty; }
.bl-cta__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.bl-cta__fine { margin: 16px 0 0; font-size: 13px; color: var(--text-3); }

.bl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 48px; padding: 0 22px; border-radius: 999px;
  font-size: 16px; font-weight: 600; color: #fff; white-space: nowrap;
  background: linear-gradient(180deg, #2b95ff 0%, #0a7cff 55%, #0068e6 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -1px 0 rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 40, 120, 0.4), 0 10px 30px -8px rgba(10, 132, 255, 0.75);
  transition: box-shadow 0.3s, scale 0.15s;
}
.bl-btn .sf { --sz: 17px; margin-top: -3px; }
.bl-btn:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -1px 0 rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 40, 120, 0.4), 0 16px 44px -8px rgba(10, 132, 255, 0.95); }
.bl-btn:active { scale: 0.96; }
.bl-btn:focus-visible { outline: 3px solid rgba(10, 132, 255, 0.55); outline-offset: 3px; }
.bl-btn--ghost { background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.bl-btn--ghost:hover { background: rgba(255, 255, 255, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }

/* ---------- Small screens: 16px gutter, the menu bar keeps Galance, Blog and Buy ---------- */
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .bl-menubar__item--wide { display: none; }
  .bl-hero { padding: 104px 0 40px; }
  .bl-hero__lede { font-size: 17px; }
  .bl-post { padding: 96px 0 72px; }
  .bl-post__lede { font-size: 18px; }
  .bl-prose { font-size: 17px; }
  .bl-prose h2 { font-size: 24px; }
  .bl-cover { margin-bottom: 36px; border-radius: 16px; }
  .bl-cta { margin-top: 48px; }
  .bl-cta__panel { padding: 24px 20px; }
  .bl-cta__title { font-size: 24px; }
  .bl-btn { flex: 1 1 auto; }
  .bl-footer { flex-wrap: wrap; padding: 6px 10px; }
  .bl-footer__fine { flex-basis: 100%; margin: 4px 0 2px; padding: 0 6px; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .bl-card, .bl-btn, .bl-prose a { transition: none; }
  .bl-card:hover { translate: none; }
  .bl-btn:active { scale: none; }
}
