/* ════════════════════════════════════════════════════════════════════════
   INPHERIO motion layer (2026-11-04) — loaded after theme.css on every page.
     · one terminal component for every code block (chrome, language chip,
       syntax colour, equal heights side by side, fixed max height)
     · accordions that feel built, not stock: numbered, smooth, an accent edge
     · content that arrives as you scroll (IntersectionObserver + stagger),
       a reading-progress hairline (CSS scroll-driven animation)
     · the exploded stack on the home page (#x-stack, driven by --p from motion.js)
   Everything is progressive: without JS or with reduced motion the page is
   complete and still.
   ════════════════════════════════════════════════════════════════════════ */

/* ── reading progress: a hairline under the nav, scroll-driven ─────────── */
@supports (animation-timeline: scroll()) {
  .mx-progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 200; pointer-events: none;
    background: linear-gradient(90deg, #0a84ff, #8e44ec 55%, #ff375f); transform-origin: 0 50%;
    transform: scaleX(0); animation: mx-grow linear both; animation-timeline: scroll(root); }
  @keyframes mx-grow { to { transform: scaleX(1); } }
}

/* ── terminals ──────────────────────────────────────────────────────────── */
.code { position: relative; display: flex; flex-direction: column; background: #0d0d10; border-radius: 18px;
  border: 1px solid rgba(255,255,255,.07); overflow: hidden; isolation: isolate;
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 24px 60px -28px rgba(0,0,0,.45); }
.code::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 60% at 0% 0%, rgba(10,132,255,.10), transparent 60%),
              radial-gradient(90% 50% at 100% 100%, rgba(142,68,236,.08), transparent 60%); }
.code-head { display: flex; align-items: center; justify-content: flex-start; gap: .7rem; min-height: 46px; padding: .55rem .8rem .55rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.06); color: #8e8e93; font: 500 .78rem/1.3 var(--font-mono, ui-monospace, monospace); }
.code-head > span:not(.mx-dots):not(.mx-lang) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.mx-dots { display: inline-flex; gap: 6px; flex: none; }
.mx-dots i { width: 10px; height: 10px; border-radius: 50%; background: #2c2c30; }
.code:hover .mx-dots i:nth-child(1) { background: #ff5f57; } .code:hover .mx-dots i:nth-child(2) { background: #febc2e; }
.code:hover .mx-dots i:nth-child(3) { background: #28c840; }
.mx-dots i { transition: background .25s; }
.mx-lang { flex: none; font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #64d2ff;
  background: rgba(100,210,255,.1); border: 1px solid rgba(100,210,255,.18); padding: .15rem .5rem; border-radius: 99px; }
.code .copy-btn { flex: none; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); color: #f5f5f7;
  border-radius: 99px; padding: .3rem .8rem; font: 600 .74rem/1 var(--font-sys, system-ui); cursor: pointer; transition: background .2s, transform .2s; }
.code .copy-btn:hover { background: rgba(255,255,255,.14); }
.code .copy-btn:active { transform: scale(.96); }
.code pre { flex: 1; margin: 0; padding: 1.05rem 1.2rem 1.2rem; overflow: auto; max-height: 24rem;
  font: .84rem/1.7 var(--font-mono, ui-monospace, monospace); color: #e5e5ea; tab-size: 4;
  scrollbar-width: thin; scrollbar-color: #3a3a3c transparent; }
.code pre code { color: inherit; background: none; padding: 0; font: inherit; }
/* side by side: every terminal in a grid is the SAME height (long code scrolls inside),
   and none is nudged down — the site's flow rule gives a .code that follows another a
   top margin, which pushed the right-hand card of each pair below its neighbour */
.code-grid { align-items: stretch; }
.code-grid > * { margin-top: 0 !important; }
.code-grid > .code pre { height: 21rem; flex: none; }
/* syntax colour (motion.js wraps tokens) */
.tk-k { color: #c9b3ff; } .tk-s { color: #f3d68b; } .tk-n { color: #a8e6a3; }  /* 2026-11-05: no pink/red in code (read as errors) */ .tk-c { color: #7f8c98; font-style: italic; }
.tk-f { color: #67b7a4; } .tk-p { color: #acf2e4; } .tk-u { color: #6bdfff; } .tk-o { color: #a1a1a6; }

/* the home console and any stray <pre> share the same skin */
main pre:not(.code pre) { background: #0d0d10; color: #e5e5ea; border-radius: 14px; padding: 1rem 1.2rem; overflow: auto;
  border: 1px solid rgba(255,255,255,.07); font: .84rem/1.7 var(--font-mono, ui-monospace, monospace); }

/* ── accordions ─────────────────────────────────────────────────────────── */
main details { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: none;
  overflow: hidden; transition: border-color .3s, box-shadow .35s, transform .35s cubic-bezier(.2,.8,.2,1); }
main details::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, #0a84ff, #8e44ec); transform: scaleY(0); transform-origin: 50% 0;
  transition: transform .45s cubic-bezier(.2,.8,.2,1); }
main details:hover { border-color: var(--line-strong); }
main details[open] { border-color: transparent; box-shadow: 0 1px 0 rgba(0,0,0,.02), 0 18px 50px -24px rgba(0,30,80,.25); }
main details[open]::before { transform: scaleY(1); }
main summary { display: flex; align-items: center; gap: 1rem; padding: 1.15rem 1.3rem 1.15rem 1.35rem; cursor: pointer;
  list-style: none; font-weight: 600; font-size: 1.02rem; letter-spacing: -.01em; color: var(--ink); position: relative;
  transition: background .25s; }
main summary::-webkit-details-marker { display: none; }
main summary:hover { background: var(--hover); }
main summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 18px; }
/* plus that turns into a minus */
main summary::after { content: ""; flex: none; margin-left: auto; width: 28px; height: 28px; border-radius: 50%;
  position: static; transform: none; background:
    linear-gradient(var(--ink), var(--ink)) center/11px 1.6px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center/1.6px 11px no-repeat, var(--hover);
  transition: transform .4s cubic-bezier(.2,.8,.2,1), background-color .3s, background-size .35s; }
main details[open] > summary::after { transform: rotate(180deg); background:
    linear-gradient(#fff, #fff) center/11px 1.6px no-repeat,
    linear-gradient(#fff, #fff) center/1.6px 0 no-repeat, var(--accent); }
/* numbering inside FAQ groups */
.faq-group { counter-reset: q; display: grid; gap: .65rem; }
.faq-group > details > summary::before { counter-increment: q; content: counter(q, decimal-leading-zero); flex: none;
  font: 600 .72rem/1 var(--font-mono, ui-monospace, monospace); color: var(--muted); letter-spacing: .02em;
  width: 2.1rem; height: 2.1rem; border-radius: 10px; display: grid; place-items: center; background: var(--paper);
  transition: background .3s, color .3s; }
.faq-group > details[open] > summary::before { background: var(--blue-tint); color: var(--link); }
main details > :not(summary) { padding: 0 1.35rem; }
/* the answer sits evenly in its space: a set gap under the question, the same weight at the
   bottom as the question has at the top, no stray outer margins (a leading callout added 16px) */
main details > div { padding: .5rem 1.35rem 1.5rem calc(1.35rem + 3.1rem); color: var(--body); line-height: 1.65; }
main details > div > :first-child { margin-top: 0 !important; }
main details > div > :last-child { margin-bottom: 0 !important; }
main details:not(.faq-group > details) > div { padding-left: 1.35rem; }
/* smooth open/close where the browser can size to auto (Chrome 131+); motion.js covers the rest */
@supports (interpolate-size: allow-keywords) {
  main details { interpolate-size: allow-keywords; }
  main details::details-content { height: 0; overflow: clip; opacity: 0;
    transition: height .45s cubic-bezier(.2,.8,.2,1), opacity .35s, content-visibility .45s allow-discrete; }
  main details[open]::details-content { height: auto; opacity: 1; }
}
/* FAQ toolbar (built by motion.js on pages with .faq-group) */
/* FAQ toolbar (built by motion.js on pages with .faq-group). In the page flow, not
   sticky (Russ 2026-11-04: the floating white glass bar "doesn't fit", worst in dark):
   a search box on its own row, topic tabs + result count under it, theme tokens only. */
.mx-faqbar { position: static; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .9rem 1rem;
  margin: 0 0 2rem; padding: 1rem; border-radius: var(--r-lg, 22px); background: var(--surface);
  box-shadow: 0 0 0 1px var(--line); }
.mx-faqbar input { grid-column: 1 / -1; width: 100%; min-width: 0; min-height: 48px; border: 1px solid var(--line-strong); border-radius: 14px;
  padding: .7rem 1rem .7rem 2.6rem; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%2386868b" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>') .9rem 50%/17px no-repeat; }
.mx-faqbar input::placeholder { color: var(--muted); }
.mx-faqbar input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--blue-tint); }
.mx-faqbar .mx-tabs { display: flex; flex-wrap: wrap; gap: .4rem; min-width: 0; }
.mx-faqbar a { display: inline-flex; align-items: center; min-height: 36px; font-size: .86rem; font-weight: 600; color: var(--body); text-decoration: none;
  padding: 0 .95rem; border-radius: 99px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); transition: background .2s, color .2s; white-space: nowrap; }
.mx-faqbar a:hover { background: var(--hover); color: var(--ink); }
.mx-faqbar a.on { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.mx-faqbar .mx-count { font-size: .82rem; color: var(--muted); justify-self: end; padding: 0 .2rem; white-space: nowrap; }
@media (max-width: 560px) { .mx-faqbar { grid-template-columns: 1fr; } .mx-faqbar .mx-count { justify-self: start; } }
.mx-hit mark { background: rgba(255,214,10,.45); color: inherit; border-radius: 3px; padding: 0 1px; }
.mx-faqbar ~ * details[hidden], details.mx-hide { display: none; }
.mx-empty { text-align: center; color: var(--muted); padding: 2rem 0; }

/* ── arrive as you scroll ───────────────────────────────────────────────── */
.js .mx-rv { opacity: 0; transform: translateY(18px); filter: blur(4px);
  transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1), filter .8s;
  transition-delay: calc(var(--i, 0) * 70ms); }
.js .mx-rv.in { opacity: 1; transform: none; filter: none; }
/* text-level items fade and sharpen in place — they never MOVE, so a heading can't slide over
   the paragraph under it mid-animation (only self-contained blocks — cards, terminals,
   tables — rise into place) */
.js main :is(h2, .lede, .eyebrow, .check-list, details).mx-rv { transform: none; }
/* section headings: a gradient underline that draws in */
.js main h2.mx-rv { background-image: linear-gradient(90deg, #0a84ff, #8e44ec); background-repeat: no-repeat;
  background-size: 0 2px; background-position: 0 100%; padding-bottom: .25rem;
  transition: opacity .8s, transform .8s cubic-bezier(.2,.8,.2,1), filter .8s, background-size 1.1s .35s cubic-bezier(.2,.8,.2,1); }
.js main .wrap--narrow h2.mx-rv.in, .js main section:not(.tile) > .wrap > h2.mx-rv.in:not(.section-title) { background-size: 3rem 2px; }

/* cards & tiles: a light that follows the pointer */
.mx-glow { position: relative; isolation: isolate; }
.mx-glow::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(10,132,255,.10), transparent 45%);
  transition: opacity .35s; }
.mx-glow:hover::after { opacity: 1; }

/* ── the exploded stack (home) ──────────────────────────────────────────── */
.xs { position: relative; background: var(--band); color: #f5f5f7; }
.xs-track { height: 360vh; position: relative; }
.xs-stage { position: sticky; top: 0; height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center; gap: 2rem; width: var(--page-width); margin: 0 auto; padding: 0; overflow: hidden; }
.xs-copy { position: relative; z-index: 2; }
.xs-eyebrow { font-size: .9rem; font-weight: 600; color: #a1a1a6; margin: 0 0 .6rem; }
.xs-title { font-size: clamp(2.2rem, 1.4rem + 2.6vw, 3.6rem); line-height: 1.05; letter-spacing: -.03em; font-weight: 600; margin: 0; color: #f5f5f7; }
.xs-steps { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; gap: .25rem; }
.xs-steps li { display: grid; grid-template-columns: 2rem 1fr; gap: .2rem .6rem; padding: .55rem .8rem; border-radius: 14px;
  color: #98989d; transition: color .4s, background .4s; }
.xs-steps li b { display: block; color: inherit; font-weight: 600; font-size: 1rem; }
.xs-steps li span { grid-column: 2; font-size: .9rem; line-height: 1.45; max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .5s cubic-bezier(.2,.8,.2,1), opacity .4s; }
.xs-steps li i { font-style: normal; font: 600 .72rem/1.6rem var(--font-mono, ui-monospace, monospace); color: #8e8e93; }
.xs-steps li.on { color: #f5f5f7; background: rgba(255,255,255,.05); }
.xs-steps li.on i { color: #64d2ff; }
.xs-steps li.on span { max-height: 6em; opacity: 1; color: #a1a1a6; }
.xs-scene { position: relative; height: min(86vh, 760px); perspective: 1800px; perspective-origin: 50% 40%; }
.xs-rig { position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateX(calc(60deg - var(--tilt, 0) * 4deg)) rotateZ(calc(-30deg + var(--p, 0) * 8deg)); }
.xs-layer { position: absolute; left: 50%; top: 50%; width: min(380px, 74%); aspect-ratio: 1.9; margin: 0;
  transform-style: preserve-3d; border-radius: 22px;
  transform: translate(-50%, -50%) translateZ(calc(var(--z) * var(--ex, 0) * 1px)) ;
  background: linear-gradient(145deg, #23232a, #111115 70%);
  border: 1px solid rgba(255,255,255,.12); box-shadow: 0 40px 70px -30px rgba(0,0,0,.95), inset 0 1px 0 rgba(255,255,255,.10);
  transition: border-color .4s, box-shadow .4s, background .4s; }
.xs-layer.on { background: linear-gradient(145deg, #1a2a3c, #0f141c 70%); border-color: rgba(100,210,255,.7); box-shadow: 0 0 0 1px rgba(100,210,255,.25), 0 0 60px rgba(10,132,255,.35), 0 30px 60px -20px rgba(0,0,0,.8); }
.xs-layer .xs-tag { position: absolute; left: 14px; top: 12px; font: 600 .7rem/1 var(--font-mono, ui-monospace, monospace);
  letter-spacing: .06em; text-transform: uppercase; color: #a1a1a6; }
.xs-layer.on .xs-tag { color: #64d2ff; }
.xs-face { position: absolute; inset: 30px 14px 12px; display: grid; gap: 6px; }
/* layer faces */
.xs-code { font: 500 .62rem/1.5 var(--font-mono, ui-monospace, monospace); color: #c7c7cc; white-space: pre; overflow: hidden; }
.xs-chips { display: flex; flex-wrap: wrap; gap: 6px; align-content: center; justify-content: center; }
.xs-chips b { font: 600 .62rem/1 var(--font-mono, ui-monospace, monospace); padding: .45rem .6rem; border-radius: 8px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); color: #e5e5ea; }
.xs-grid { display: grid; grid-template-columns: repeat(16, 1fr); gap: 5px; align-content: center; }
.xs-grid i { aspect-ratio: 1; border-radius: 5px; background: rgba(255,255,255,.08); }
.xs-grid i.on { background: #30d158; box-shadow: 0 0 12px rgba(48,209,88,.8); }
.xs-grid i.pick { background: #64d2ff; box-shadow: 0 0 16px rgba(100,210,255,1); }
.xs-bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; align-content: center; }
.xs-bars b { height: 34px; border-radius: 8px; background: linear-gradient(180deg, rgba(255,159,10,.35), rgba(255,55,95,.15));
  border: 1px solid rgba(255,159,10,.35); }
.xs-route { display: grid; gap: 7px; align-content: center; font: 600 .6rem/1 var(--font-mono, ui-monospace, monospace); color: #a1a1a6; }
.xs-route div { display: grid; grid-template-columns: 4.5rem 1fr; align-items: center; gap: 8px; }
.xs-route s { display: block; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #0a84ff, #64d2ff); text-decoration: none;
  width: 50%; }
/* bar lengths here, not style="" (the CSP drops inline style attributes) */
.xs-route s[data-w="70"] { width: 70%; } .xs-route s[data-w="88"] { width: 88%; } .xs-route s[data-w="95"] { width: 95%; } .xs-route s[data-w="60"] { width: 60%; }
/* the request: a bright bead that drops through the stack and back */
.xs-bead { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 6px rgba(100,210,255,.25), 0 0 30px 6px rgba(100,210,255,.9);
  transform: translateZ(calc(var(--bz, 0) * 1px)); opacity: var(--bo, 0); transition: opacity .3s; }
.xs-beam { position: absolute; left: 50%; top: 50%; width: 2px; margin-left: -1px; transform-origin: 50% 0;
  background: linear-gradient(180deg, rgba(100,210,255,0), rgba(100,210,255,.8), rgba(100,210,255,0));
  height: calc(var(--ex, 0) * 1px * 5 * 1.0); transform: rotateX(-90deg); opacity: calc(var(--ex, 0) / 110 * .6); }
.xs-hint { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); font-size: .8rem; color: #6e6e73;
  display: flex; align-items: center; gap: .5rem; opacity: calc(1 - var(--p, 0) * 6); }
.xs-hint::after { content: ""; width: 1px; height: 26px; background: linear-gradient(#6e6e73, transparent); animation: xs-drip 1.8s ease-in-out infinite; }
@keyframes xs-drip { 0% { transform: scaleY(0); transform-origin: 0 0; } 50% { transform: scaleY(1); transform-origin: 0 0; } 51% { transform-origin: 0 100%; } 100% { transform: scaleY(0); transform-origin: 0 100%; } }
@media (max-width: 860px) {
  /* phones: the same pinned, scroll-driven story — the stack on top, ONE step of text under it */
  .xs-track { height: 320vh; }
  .xs-stage { position: sticky; top: 0; height: 100vh; height: 100svh; grid-template-columns: 1fr; grid-template-rows: auto auto auto minmax(0, 1fr);
    align-items: start; gap: .6rem; padding: 4.6rem 1.25rem 1rem; }
  .xs-copy { display: contents; }
  .xs-eyebrow { margin: 0; grid-row: 1; }
  .xs-title { font-size: 1.9rem; grid-row: 2; }
  .xs-steps { margin: 0; grid-row: 3; min-height: 6.4rem; }
  .xs-steps li { display: none; padding: .55rem .7rem; }
  .xs-steps li.on { display: grid; }
  .xs-scene { grid-row: 4; height: 100%; min-height: 260px; perspective: 1300px; }
  .xs-layer { width: min(300px, 80%); }
  .xs-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .js .mx-rv { opacity: 1; transform: none; filter: none; transition: none; }
  .mx-progress { display: none; }
  main details, main details::before, main summary::after { transition: none; }
  @supports (interpolate-size: allow-keywords) { main details::details-content { transition: none; } }
  .xs-track { height: auto; }
  .xs-stage { position: relative; height: auto; padding: 5rem 2rem; }
  .xs-steps li { display: grid; }
  .xs-steps li span { max-height: none; opacity: 1; }
  .xs-scene { height: 620px; }
  .xs-hint { display: none; }
}

/* ── page headers: a living backdrop instead of flat white ─────────────── */
main > section:first-of-type:not(.no-hero) { position: relative; overflow: hidden; isolation: isolate; }
main > section:first-of-type:not(.no-hero)::before { content: ""; position: absolute; inset: -20% -10% -10%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(38% 50% at 22% 30%, rgba(10,132,255,.16), transparent 70%),
    radial-gradient(34% 46% at 78% 26%, rgba(142,68,236,.14), transparent 70%),
    radial-gradient(30% 40% at 58% 80%, rgba(255,55,95,.08), transparent 70%);
  filter: blur(10px); animation: mx-aurora 18s ease-in-out infinite alternate; }
main > section:first-of-type:not(.no-hero)::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(29,29,31,.13) 1px, transparent 1.2px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(60% 70% at 50% 40%, #000 20%, transparent 75%); mask-image: radial-gradient(60% 70% at 50% 40%, #000 20%, transparent 75%); }
@keyframes mx-aurora { 0% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(3%,-2%,0) scale(1.06); } 100% { transform: translate3d(-3%,2%,0) scale(1.02); } }
main > section:first-of-type:not(.no-hero) h1 { font-size: clamp(2.8rem, 1.8rem + 3.6vw, 4.8rem); letter-spacing: -.035em; line-height: 1.02; }
main > section:first-of-type:not(.no-hero) .eyebrow { display: inline-flex; padding: .35rem .8rem; border-radius: 99px;
  background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-weight: 600; }

/* ── editorial split for prose sections (motion.js adds .mx-split) ─────── */
@media (min-width: 1100px) {
  .mx-split > .wrap { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); column-gap: clamp(3rem, 6vw, 6rem); align-items: start; grid-auto-rows: min-content; }
  /* the heading column spans every row; otherwise row 1 is as tall as the heading and the
     first item on the right gets a gap under it (the /connector install commands) */
  .mx-split > .wrap > .mx-head { position: sticky; top: 104px; grid-row: 1 / span 60; align-self: start; }
  .mx-split > .wrap > :not(.mx-head) { grid-column: 2; margin-top: 0; }
  .mx-split > .wrap > :not(.mx-head) + :not(.mx-head) { margin-top: var(--flow, 1.2rem); }
  /* the split used to flatten EVERY gap to --flow (a heading after a table got 14 px); keep the page rhythm */
  .mx-split > .wrap > :not(.mx-head) + h4:not(.mx-head) { margin-top: var(--flow-h4); }
  .mx-split > .wrap > :not(.mx-head) + h3:not(.mx-head) { margin-top: var(--flow-h3); }
  .mx-split > .wrap > :not(.mx-head) + h2:not(.mx-head) { margin-top: var(--flow-h2); }
  .mx-split > .wrap > :is(h2, h3, h4):not(.mx-head) + :not(.mx-head) { margin-top: var(--flow-tight); }
  .mx-split > .wrap > :is(p, ul, ol, .lede, .small, .footnote):not(.mx-head) + :is(.dash-part, .table-scroll, table, pre, .code, .callout, .card, figure, details, .faq-group, form, .grid-2, .grid-3, .schematic, .spec-grid, .receipt),
  .mx-split > .wrap > :is(.dash-part, .table-scroll, table, pre, .code, .callout, .card, figure, form, .grid-2, .grid-3, .schematic, .spec-grid, .receipt):not(.mx-head) + :is(p, ul, ol, .lede, .small, .footnote) { margin-top: var(--flow-box); }
  .mx-split .mx-head h2 { font-size: clamp(1.9rem, 1.4rem + 1.2vw, 2.6rem); line-height: 1.08; }
}
.mx-head .mx-num { display: block; font: 600 .78rem/1 var(--font-mono, ui-monospace, monospace); color: var(--muted); margin-bottom: .9rem; letter-spacing: .04em; }
.mx-head .mx-num::after { content: ""; display: inline-block; width: 2.2rem; height: 1px; margin-left: .6rem; vertical-align: middle;
  background: linear-gradient(90deg, #0a84ff, transparent); }
/* checklists become a stack of soft cards */
main .check-list { list-style: none; padding: 0; display: grid; gap: .6rem; }
/* free-standing lists only — a list already inside a card stays a plain list */
main .wrap > .check-list li { position: relative; padding: 1rem 1.1rem 1rem 3.1rem; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--line); line-height: 1.6; transition: border-color .25s, transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
main section:nth-of-type(odd) .wrap > .check-list li { background: var(--surface-2); }
main .wrap > .check-list li:hover { border-color: var(--line-strong); transform: translateX(3px); box-shadow: 0 10px 30px -20px rgba(0,30,80,.3); }
main .wrap > .check-list li::before { left: 1rem !important; top: 1.05rem !important; }
main .check-list li::before { top: .3em; }
/* plain prose lists: gradient dots */
main .wrap > ul:not([class]) { list-style: none; padding-left: 0; }
main .wrap > ul:not([class]) > li { position: relative; padding-left: 1.4rem; margin-top: .45rem; }
main .wrap > ul:not([class]) > li::before { content: ""; position: absolute; left: .2rem; top: .65em; width: 7px; height: 7px; border-radius: 50%;
  background: linear-gradient(135deg, #0a84ff, #8e44ec); }
/* tables: framed, sticky header, row hover */
main .table-scroll { border-radius: 18px; box-shadow: 0 0 0 1px var(--line), 0 24px 50px -36px rgba(0,30,80,.35); overflow: auto; }
main .table-scroll thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); }
main .table-scroll tbody tr { transition: background .2s; }
main .table-scroll tbody tr:hover { background: var(--hover); }
@media (prefers-reduced-motion: reduce) {
  main > section:first-of-type:not(.no-hero)::before { animation: none; }
  main .check-list li, main .check-list li:hover { transition: none; transform: none; }
}

/* ticks and crosses: theme.css's `background:` shorthand wiped the icon (live bug — every
   checklist showed empty circles). Re-drawn in the theme's blue / red. */
main .check-list li::before { content: ""; width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background: var(--blue-tint) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%230071e3" stroke-width="3.2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12.5l4.2 4.2L19 7"/></svg>') center/60% no-repeat; }
main .check-list.x-list li::before, main .x-list li::before {
  background: var(--red-tint) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23c93a4f" stroke-width="3.2" stroke-linecap="round"><path d="M6.5 6.5l11 11M17.5 6.5l-11 11"/></svg>') center/54% no-repeat; }
.mx-head h2 { margin-top: 0 !important; }
.mx-head .lede { font-size: 1.05rem !important; line-height: 1.6; margin-top: 1rem !important; }
.mx-head .eyebrow { margin: 0 0 .7rem !important; }

/* numbered steps: two columns on wide screens instead of one narrow column */
@media (min-width: 1100px) {
  main .wrap > .steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; max-width: none; }
  main .wrap > .steps > li { margin: 0 !important; }
}
main .steps > li { transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s; }
main .steps > li:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -26px rgba(0,30,80,.35); }
.mx-split > .wrap > .mx-faqbar { grid-column: 1 / -1; }
/* fitCode() (motion.js): a line still too long at the 11px floor wraps instead of scrolling sideways */
main pre.is-wrap, .mkt-panel pre.is-wrap { white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: hidden; }
/* text beside a taller code block / figure / diagram sits in the middle of the row, not pinned to its top;
   two text columns (or cards) keep their tops aligned so headings line up */
.grid-2:has(> .code, > figure, > .schematic) > :not(.code, figure, .schematic, .card, .callout) { align-self: center; }
/* two tables never share a row: their lengths rarely match (pricing "The split": the providers table is
   three times the developers one) — each takes the full width, one after the other */
.grid-2:has(> .table-scroll) { grid-template-columns: minmax(0, 1fr); row-gap: 1.6rem; }
