/*! Studio promo toast — one card, shown once, on the pages people land on from
    search (blog posts and the PPServer pages). Not on the home page: someone
    already there does not need to be told what the product is.

    Every colour is a token from docs.css, which both surfaces already load, so
    this follows light/dark with the rest of the site and has nothing of its
    own to keep in sync. It is a <aside role="complementary"> injected by
    promo.js, and it is inert until that script decides to show it. */

.ppromo{
  position:fixed;right:18px;bottom:18px;z-index:70;width:min(372px,calc(100vw - 32px));
  display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:start;
  padding:15px 15px 15px 16px;box-sizing:border-box;
  background:var(--bg-2);border:1px solid var(--line);border-radius:16px;
  box-shadow:0 18px 44px rgba(15,23,42,.17),0 3px 10px rgba(15,23,42,.08);
  /* Parked off-screen and non-interactive until .is-in, so it can never
     intercept a click before it is actually shown. */
  opacity:0;transform:translateY(14px) scale(.98);pointer-events:none;
  transition:opacity .34s ease,transform .34s cubic-bezier(.2,.8,.3,1);
}
.ppromo.is-in{opacity:1;transform:none;pointer-events:auto}
.ppromo.is-out{opacity:0;transform:translateY(8px) scale(.99);pointer-events:none}

/* The glyph. A gradient tile rather than an image: no extra request, and it
   cannot be the one asset that fails to load behind a paywalled CDN. */
.ppromo-ic{
  width:38px;height:38px;flex:none;border-radius:11px;display:grid;place-items:center;
  background:linear-gradient(135deg,var(--brand),var(--brand-2));
}
.ppromo-ic svg{width:21px;height:21px;fill:none;stroke:#fff;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}

.ppromo-tx{min-width:0}
.ppromo-tx b{display:block;font:700 14px/1.35 var(--font-display,inherit);color:var(--ink);letter-spacing:-.01em}
.ppromo-tx p{margin:4px 0 0;font-size:12.8px;line-height:1.55;color:var(--ink-2)}
.ppromo-act{display:flex;gap:8px;align-items:center;margin-top:11px;flex-wrap:wrap}
.ppromo-act a{
  display:inline-flex;align-items:center;gap:5px;text-decoration:none;
  font:700 12.5px/1 system-ui,sans-serif;padding:9px 13px;border-radius:10px;
  background:linear-gradient(135deg,var(--brand),var(--brand-2));color:#fff;
  transition:transform .16s ease,filter .16s ease;
}
.ppromo-act a:hover{transform:translateY(-1px);filter:brightness(1.06)}
.ppromo-act a.g{background:none;color:var(--ink-2);border:1px solid var(--line-2);padding:8px 11px}
.ppromo-act a.g:hover{color:var(--ink);filter:none}

.ppromo-x{
  flex:none;width:26px;height:26px;display:grid;place-items:center;cursor:pointer;
  background:none;border:0;border-radius:8px;color:var(--ink-3);font-size:17px;line-height:1;
  transition:background .16s ease,color .16s ease;
}
.ppromo-x:hover{background:var(--code-bg);color:var(--ink)}
.ppromo-x:focus-visible,.ppromo-act a:focus-visible{outline:2px solid var(--brand);outline-offset:2px}

@media (max-width:560px){
  .ppromo{right:12px;left:12px;bottom:12px;width:auto;padding:13px}
  .ppromo-tx p{font-size:12.4px}
}
@media (prefers-reduced-motion:reduce){
  .ppromo{transition:opacity .01ms}
  .ppromo.is-in{transform:none}
  .ppromo-act a:hover{transform:none}
}
