/* Brusshy launch article. Geist for text, Geist Serif for titles, one narrow column, figures made with Brusshy. */
/* Geist Serif isn't on Google Fonts yet: the OFL file from the geist npm package, pinned. */
@font-face { font-family: "Geist Serif"; src: url("https://cdn.jsdelivr.net/npm/geist@1.9.0/dist/fonts/geist-serif/GeistSerif-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
:root {
  --bg: #fdfdfc;
  --text: #111;
  --muted: rgba(0, 0, 0, 0.42);
  --hover: rgba(0, 0, 0, 0.8);
  --code-bg: #f6f6f5;
  --t-cmd: #1a7f37;
  --t-pkg: #0550ae;
  --t-arg: #953800;
  --t-flag: #8250df;
  --stage: #f2f2f0;
  --tile: #fff;
  --line: rgba(0, 0, 0, 0.08);
  --ink: #ec4a1f;
  --note: #4a4a4a;
  --mark: #ffe28a;
  --hl: #e8341c; /* red highlighter: margin notes, their arrows and the circle around a heading */
  --focus: rgba(0, 122, 255, 0.5);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Geist Serif", "Times New Roman", serif;
  --mono: "Geist Mono", "SF Mono", SFMono-Regular, ui-monospace, Consolas, Menlo, monospace;
  --script: "Caveat", "Bradley Hand", cursive;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111110;
    --text: #ececea;
    --muted: rgba(255, 255, 255, 0.45);
    --hover: rgba(255, 255, 255, 0.85);
    --code-bg: #1b1b1a;
    --t-cmd: #7ee787;
    --t-pkg: #79c0ff;
    --t-arg: #ffa657;
    --t-flag: #d2a8ff;
    --stage: #1c1c1b;
    --tile: #fff;
    --line: rgba(255, 255, 255, 0.1);
    --ink: #ff6a3d;
    --note: #b9b9b5;
    --mark: rgba(255, 214, 92, 0.35);
    --hl: #ff5a3c;
  }
}
:root[data-theme="dark"] {
  --hl: #ff5a3c;
  --bg: #111110;
  --text: #ececea;
  --muted: rgba(255, 255, 255, 0.45);
  --hover: rgba(255, 255, 255, 0.85);
  --code-bg: #1b1b1a;
  --t-cmd: #7ee787;
  --t-pkg: #79c0ff;
  --t-arg: #ffa657;
  --t-flag: #d2a8ff;
  --stage: #1c1c1b;
  --tile: #fff;
  --line: rgba(255, 255, 255, 0.1);
  --ink: #ff6a3d;
  --note: #b9b9b5;
  --mark: rgba(255, 214, 92, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 460 14px/21px var(--font); letter-spacing: -0.09px; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
::selection { background: rgba(127, 127, 127, 0.22); }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; transition: text-decoration-color 0.15s ease; }
a:hover { text-decoration-color: currentColor; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-radius: 2px; }
img, video { display: block; max-width: 100%; }

/* Contents: fixed on the left, doubles as progress. */
.toc { position: fixed; top: 88px; left: max(32px, calc(50vw - 640px)); width: 200px; opacity: 0; animation: toc-in 0.34s 0.6s ease forwards; }
.toc a { display: block; padding: 2px 0; color: var(--muted); text-decoration: none; transition: color 0.1s ease; }
.toc a:hover { color: var(--hover); }
.toc a.on { color: var(--text); }
/* The lockup: the app-icon tile gets a hairline so it reads as a tile on the dark page too. */
.toc .back { display: flex; align-items: center; gap: 10px; margin-bottom: 36px; color: var(--text); }
.toc .back img { width: 32px; height: 32px; border-radius: 7px; box-shadow: 0 0 0 1px var(--line); }
.toc .back .word { height: 26px; width: auto; }
@keyframes toc-in { to { opacity: 1; } }

.article { width: 550px; margin-left: max(280px, calc(50vw - 275px)); padding: 88px 0 160px; }
.article h1 { font: 400 34px/38px var(--serif); letter-spacing: -0.5px; margin: 0 0 6px; }
.article .meta { color: var(--muted); display: block; }
.article p { margin: 0; padding-top: 16px; }
.article h2 { font: 400 22px/26px var(--serif); letter-spacing: -0.2px; margin: 0; padding-top: 56px; scroll-margin-top: 40px; }
.article ul { margin: 0; padding: 16px 0 0 18px; }
.article li + li { margin-top: 6px; }
sup a { font-size: 9px; color: var(--muted); text-decoration: none; padding: 0 1px; }
mark { background: var(--mark); color: inherit; padding: 1px 2px; border-radius: 2px; }
code { font: 460 12.6px var(--mono); color: var(--hover); }
blockquote { margin: 16px 0 0; padding: 12px 16px; border-left: 2px solid var(--line); color: var(--hover); }

/* Handwritten notes: red highlighter, a hand-drawn arrow pointing back at the text. */
/* Handwritten notes: red highlighter, a hand-drawn arrow pointing back at the text. */
.note-anchor { position: relative; }
.margin-note { position: absolute; left: calc(100% + 104px); top: -11px; width: 190px; font: 700 31px/29px var(--script); color: var(--hl); transform: rotate(-4deg); }
.margin-note .arrow { position: absolute; left: -104px; top: -6px; width: 96px; height: 40px; overflow: visible; }
.margin-note .arrow path { fill: none; stroke: var(--hl); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
/* The way back to 0xmav.com: the same round arrow the site uses. */
.back-arrow { position: fixed; z-index: 6; left: 40px; top: 28px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 74%, transparent); -webkit-backdrop-filter: blur(14px) saturate(115%); backdrop-filter: blur(14px) saturate(115%); color: var(--text); transition: border-color 0.3s; }
.back-arrow svg { width: 18px; height: 18px; transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.back-arrow:hover { border-color: var(--text); }
.back-arrow:hover svg { transform: translateX(-3px); }
/* A sentence to stop on. launch.js splits it into words, and the highlight sweeps through them as it appears. */
.article p.callout { font-size: 17px; line-height: 27px; letter-spacing: -0.2px; padding-top: 24px; }
.callout.split mark { background: none; padding: 0; }
.callout .w { opacity: 0; filter: blur(3px); background: linear-gradient(var(--mark), var(--mark)) no-repeat 0 0 / 0 100%; transition: opacity 0.9s var(--soft), filter 0.9s var(--soft), background-size 1s var(--soft); transition-delay: calc(var(--i) * 45ms); --soft: cubic-bezier(0.22, 1, 0.36, 1); }
.callout.drawn .w { opacity: 1; filter: none; background-size: 100% 100%; }

/* The same marker around a few words. */
.circled { position: relative; display: inline-block; }
.circled svg { position: absolute; left: -30px; right: -44px; top: -24px; bottom: -14px; width: calc(100% + 74px); height: calc(100% + 38px); overflow: visible; pointer-events: none; }
.circled path { fill: none; stroke: var(--hl); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

/* Code: copy button hangs outside on the left. */
pre { position: relative; margin: 16px 0 0; padding: 14px 16px; background: var(--code-bg); border-radius: 8px; font: 400 13px/21px var(--mono); color: var(--hover); white-space: pre; overflow-x: auto; }
pre .c { color: var(--muted); }
.t-cmd { color: var(--t-cmd); }
.t-pkg { color: var(--t-pkg); }
.t-arg { color: var(--t-arg); }
.t-flag { color: var(--t-flag); }
.copy { position: absolute; left: -38px; top: 9px; width: 28px; height: 28px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 6px; transition: color 0.15s ease; }
.copy:hover { color: var(--hover); }
.copy svg { width: 15px; height: 15px; }
.copy.done { color: var(--ink); }
.code-wrap { position: relative; }

dl { margin: 8px 0 0; }
dt { font: 600 13px/18px var(--font); letter-spacing: 0.08em; text-transform: uppercase; padding-top: 20px; }
dd { margin: 4px 0 0; color: var(--hover); }

table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 13px; line-height: 19px; }
th { text-align: left; font-weight: 560; padding: 7px 14px 7px 0; border-bottom: 1px solid var(--line); }
td { padding: 7px 14px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
td:first-child { white-space: nowrap; }

/* Figures: product output in a soft stage. */
figure { margin: 40px 0 48px; }
.stage { background: var(--stage); border-radius: 12px; overflow: hidden; }
.stage > img, .stage > video { width: 100%; height: auto; }
figcaption { margin-top: 20px; font-size: 12px; line-height: 18px; color: var(--muted); text-align: center; text-wrap: balance; }

.hero video { aspect-ratio: 1; }
.bento { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
.bento .stage { display: grid; place-items: center; }
.bento .big { grid-row: span 2; }
.bento .big img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.bento .small { aspect-ratio: 1; padding: 10%; background: var(--tile); }
.bento .small img { width: 100%; height: 100%; object-fit: contain; }
.bento .photo { aspect-ratio: 1; }
.bento .photo img { width: 100%; height: 100%; object-fit: cover; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.tiles .stage { aspect-ratio: 1; display: grid; place-items: center; padding: 9%; background: var(--tile); }
.tiles .stage img { width: 100%; height: 100%; object-fit: contain; }
.tiles .stage.fill { padding: 0; }
.tiles .stage.fill img { object-fit: cover; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid .stage img { width: 100%; height: 100%; object-fit: cover; }

/* Stepper: one build replayed from the document history. */
.steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; margin-top: 14px; font-size: 12px; color: var(--muted); }
.steps button { border: 0; background: none; font: inherit; color: inherit; cursor: pointer; padding: 2px 4px; transition: color 0.1s ease; }
.steps button.on, .steps button:hover { color: var(--text); }
.steps button .n { font-variant-numeric: tabular-nums; margin-right: 4px; }

/* With / without pairs. */
.pair .brief { color: var(--hover); }
.pair .brief b { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }
.pair .stage { margin-top: 16px; padding: 20px 20px 52px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; overflow: visible; }
.pair .side { position: relative; }
.pair .tile { position: relative; aspect-ratio: 1; background: var(--tile); border-radius: 8px; display: grid; place-items: center; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.04); }
.pair .tile img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.pair .label { display: block; margin-top: 10px; font-size: 12px; color: var(--muted); text-align: center; }
.pair .label b { font-weight: 500; color: var(--text); }
.pair .verdict { padding-top: 12px; }

/* Hand-drawn critique ink: draws in when the pair scrolls into view. */
.ink { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.ink path { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; }
.ink-label { position: absolute; font: 600 20px/19px var(--script); color: var(--ink); opacity: 0; white-space: nowrap; transform: translate(-50%, 0) rotate(-2deg); transition: opacity 0.4s ease; pointer-events: none; }
.drawn .ink path { stroke-dashoffset: 0; transition: stroke-dashoffset 0.8s var(--ease-out); }
.drawn .ink path:nth-child(2) { transition-delay: 0.45s; }
.drawn .ink path:nth-child(3) { transition-delay: 0.9s; }
.drawn .ink-label { opacity: 1; transition-delay: 0.55s; }
.drawn .ink-label + .ink-label { transition-delay: 1s; }

.footnotes { margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; line-height: 18px; color: var(--muted); }
.footnotes ol { margin: 0; padding-left: 16px; }
.footnotes li + li { margin-top: 8px; }
.footnotes a { text-decoration: none; }

@media (max-width: 1200px) { .margin-note { left: calc(100% + 76px); width: 150px; font-size: 26px; line-height: 25px; } }
@media (max-width: 1100px) {
  .note-anchor { padding-right: 0; }
  .margin-note { position: static; display: block; width: auto; margin-top: 6px; transform: rotate(-1.5deg); transform-origin: left; }
  .margin-note .arrow { display: none; }
  .toc { display: none; }
  .article { margin: 0 auto; }
}
@media (max-width: 600px) {
  .circled svg { left: -12px; width: calc(100% + 56px); }
  .article { width: auto; padding: 76px 16px 120px; }
  .back-arrow { left: 16px; top: 16px; width: 44px; height: 44px; }
  .copy { left: auto; right: 4px; top: 7px; }
  pre { padding-right: 40px; font-size: 12px; }
  .pair .stage { padding: 12px 12px 44px; gap: 12px; }
  .ink-label { font-size: 16px; line-height: 16px; }
  .grid.three { grid-template-columns: 1fr 1fr; }
  td:first-child { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .toc { animation: none; opacity: 1; }
  .ink path, .drawn .ink path { stroke-dashoffset: 0; transition: none; }
  .ink-label { opacity: 1; transition: none; }
}
