/* HubSpot's own pop-ups (its "Try DEXRabbit" one sat over the card below). They
   are set up in HubSpot and its script stays for its analytics, so they go here;
   these are the containers it puts every web interactive in. */
#hs-web-interactives-top-push-anchor, #hs-web-interactives-top-anchor,
#hs-web-interactives-bottom-anchor, #hs-web-interactives-floating-container { display: none !important; }

/* ---------- Bitquery product in the corner (shared/ads/_corner, explorer/promo) ----------
   An ad unit in the bottom-left corner, across from "back to top": the
   product's art (shared/ads/art, dark in both themes, decorative) over its
   pitch and a button in the product's colour; a slim bar on a phone. Fixed,
   so it moves nothing on the page. explorer/promo shows it at the top of the
   page and at its end (the footer keeps room for it) and fades it out in
   between. The whole card is the link (.bq-promo-cta stretched over it); the
   close button sits above. White on the buttons: #93254b 8.1:1, #dc2b0d
   4.8:1, #182de7 8.2:1; the eyebrows on --bq-elevated 5:1 and up in both
   themes. */
.bq-promo { --promo-cta: var(--bq-accent); --promo-eyebrow: var(--bq-link);
  position: fixed; left: var(--bq-space-5); bottom: var(--bq-space-5); z-index: 39; box-sizing: border-box;
  width: 18.75rem; max-width: calc(100vw - 2 * var(--bq-space-4));
  border: 1px solid var(--bq-border-strong); border-radius: var(--bq-radius-lg); background: var(--bq-elevated);
  color: var(--bq-text); font-size: var(--bq-fs-sm); line-height: 1.4;
  box-shadow: 0 18px 40px -12px rgba(20, 24, 40, 0.28), var(--bq-shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: opacity 0.25s, transform 0.25s, visibility 0s 0.25s, border-color 0.15s, box-shadow 0.15s; }
.bq-promo.is-shown { opacity: 1; visibility: visible; transform: none; transition-delay: 0s;
  animation: bq-promo-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s backwards; }
@keyframes bq-promo-in { from { opacity: 0; transform: translateY(24px) scale(0.98); } }
/* The next product (explorer/promo): the card fades out and the next one fades in where it was. */
.bq-promo.is-shown.is-leaving { opacity: 0; transform: translateY(6px); }
.bq-promo.is-shown.is-swapped { animation: bq-promo-swap 0.35s ease-out backwards; }
@keyframes bq-promo-swap { from { opacity: 0; transform: translateY(6px); } }
.bq-promo:hover { transform: translateY(-2px); box-shadow: 0 22px 48px -12px rgba(20, 24, 40, 0.36), var(--bq-shadow-lg); }
.bq-promo:has(.bq-promo-cta:focus-visible) { box-shadow: 0 0 0 3px var(--bq-focus-ring), var(--bq-shadow-lg); }

.bq-promo-dexrabbit { --promo-cta: #dc2b0d; --promo-eyebrow: #b5370f; }
.bq-promo-moneyflow { --promo-cta: #182de7; --promo-eyebrow: #182de7; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bq-promo-dexrabbit { --promo-eyebrow: #fa6a22; }
  :root:not([data-theme="light"]) .bq-promo-moneyflow { --promo-eyebrow: #7cadff; } }
:root[data-theme="dark"] .bq-promo-dexrabbit { --promo-eyebrow: #fa6a22; }
:root[data-theme="dark"] .bq-promo-moneyflow { --promo-eyebrow: #7cadff; }

/* The art: its own dark scene in both themes; text in it is white-ish on near black. */
.bq-promo-art { position: relative; height: 6rem; overflow: hidden; border-radius: calc(var(--bq-radius-lg) - 1px) calc(var(--bq-radius-lg) - 1px) 0 0; background: #0a0d14; }
.bq-promo-art > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bq-promo-badge { position: absolute; top: 10px; left: 12px; z-index: 1; padding: 3px 8px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: var(--bq-radius-pill);
  background: rgba(0, 0, 0, 0.5); color: rgba(255, 255, 255, 0.88); font: 600 0.625rem/1.2 var(--bq-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.bq-art-dxr-brand { position: absolute; left: 16px; top: 38px; display: flex; align-items: center; gap: 9px; color: #fff; font: 700 1.5rem/1 var(--bq-font); letter-spacing: -0.01em; }
.bq-art-dxr-brand b { color: #fa6a22; font-weight: 700; }
.bq-art-chips { position: absolute; left: 12px; bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.bq-art-chips > span { padding: 3px 8px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: var(--bq-radius-pill); background: rgba(10, 13, 20, 0.72);
  color: #e9ecef; font: 500 0.6875rem/1.2 var(--bq-mono); }
.bq-art-chips b { color: #fff; font-weight: 600; }
.bq-art-chat { position: absolute; inset: 32px 12px 8px; display: flex; flex-direction: column; gap: 6px; }
.bq-art-ask { align-self: flex-end; max-width: 82%; padding: 5px 10px; border-radius: 12px 12px 3px 12px; background: #93254b; color: #fff; font: 500 0.75rem/1.3 var(--bq-font); }
.bq-art-tool { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px 12px 12px 3px; background: rgba(255, 255, 255, 0.07); color: #aee0e5; font: 500 0.6875rem/1.3 var(--bq-mono); }
.bq-art-dot { width: 6px; height: 6px; border-radius: 50%; background: #95ea87; box-shadow: 0 0 0 3px rgba(149, 234, 135, 0.2); }
.bq-art-code { position: absolute; left: 14px; top: 38px; white-space: pre; color: #c3cad6; font: 500 0.6875rem/1.45 var(--bq-mono); }
.bq-art-code i { font-style: normal; color: #e25284; }
.bq-art-code b { font-weight: 500; color: #aee0e5; }
.bq-art-code u { text-decoration: none; color: #ffd500; }
.bq-art-code s { text-decoration: none; color: #f0897c; }
.bq-art-mf-logo { position: absolute; left: 14px; top: 42px; width: 118px; height: auto; }
.bq-art-run { position: absolute; right: 12px; bottom: 8px; padding: 4px 10px; border-radius: var(--bq-radius-pill); background: #93254b; color: #fff; font: 600 0.6875rem/1.2 var(--bq-font); }
/* A little motion in every unit. Once, as the card comes in (after its own entrance; again for
   each next product, explorer/promo): DEXrabbit's candles come up one by one, the IDE types its
   query character by character, the question to the agent and then its tool call come up. Then
   on and on, quietly: the last candle trades up and down, the caret blinks and Run calls,
   the tool call works, the NFTs float, events run down the lanes, the traced path and the money
   flow. Paused while the card has stepped aside; none with reduced motion, where the art stands
   as it ends. */
.bq-art-candles > g { transform-box: fill-box; transform-origin: 50% 100%;
  animation: bq-art-candle 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) calc(0.6s + var(--i) * 0.1s) backwards; }
@keyframes bq-art-candle { from { opacity: 0; transform: translateY(3px) scaleY(0.3); } }
/* The last candle keeps trading: its close (the top of the body) rises and falls, its high (the
   wick) with it, and the last-price line follows the close. One rhythm, three keyframe sets:
   body scale s, wick 0.5 + 0.5s, line -8(s - 1) (the body is 8 units tall). */
.bq-art-tick rect, .bq-art-tick line { transform-box: fill-box; transform-origin: 50% 100%; }
.bq-art-tick rect { animation: bq-art-close 5s ease-in-out 2.6s infinite; }
.bq-art-tick line { animation: bq-art-high 5s ease-in-out 2.6s infinite; }
@keyframes bq-art-close { 20% { transform: scaleY(1.6); } 40% { transform: scaleY(1.2); } 55% { transform: scaleY(0.5); }
  75% { transform: scaleY(1.4); } 90% { transform: scaleY(0.9); } }
@keyframes bq-art-high { 20% { transform: scaleY(1.3); } 40% { transform: scaleY(1.1); } 55% { transform: scaleY(0.75); }
  75% { transform: scaleY(1.2); } 90% { transform: scaleY(0.95); } }
.bq-art-last { animation: bq-art-fade-in 0.5s ease-out 2.2s backwards, bq-art-price 5s ease-in-out 2.6s infinite; }
@keyframes bq-art-price { 20% { transform: translateY(-4.8px); } 40% { transform: translateY(-1.6px); } 55% { transform: translateY(4px); }
  75% { transform: translateY(-3.2px); } 90% { transform: translateY(0.8px); } }
@keyframes bq-art-fade-in { from { opacity: 0; } }
.bq-art-line { display: block; width: calc(var(--n) * 1ch + 3px); overflow: hidden; border-right: 2px solid transparent;
  animation: bq-art-type calc(var(--n) * 0.03s) steps(var(--n), end) var(--d) backwards, bq-art-caret calc(var(--n) * 0.03s) linear var(--d); }
.bq-art-line:last-child { animation: bq-art-type calc(var(--n) * 0.03s) steps(var(--n), end) var(--d) backwards,
  bq-art-caret calc(var(--n) * 0.03s) linear var(--d), bq-art-blink 1s steps(1, end) calc(var(--d) + var(--n) * 0.03s) infinite; }
@keyframes bq-art-type { from { width: 0; } }
@keyframes bq-art-caret { from, to { border-right-color: #aee0e5; } }
@keyframes bq-art-blink { from { border-right-color: #aee0e5; } 50% { border-right-color: transparent; } }
.bq-art-run { animation: bq-art-call 2.4s ease-out 3.2s infinite; }
@keyframes bq-art-call { from { box-shadow: 0 0 0 0 rgba(226, 82, 132, 0.6); } 60%, to { box-shadow: 0 0 0 8px rgba(226, 82, 132, 0); } }
.bq-art-ask { animation: bq-art-pop 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) 0.6s backwards; }
.bq-art-tool { animation: bq-art-pop 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) 1.2s backwards, bq-art-work 2.2s linear 1.6s infinite;
  background-image: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, 0.14) 50%, transparent 65%); background-size: 250% 100%; background-position: 100% 0; }
@keyframes bq-art-pop { from { opacity: 0; transform: translateY(6px) scale(0.96); } }
@keyframes bq-art-work { to { background-position: -150% 0; } }
.bq-art-float { animation: bq-art-float 4s ease-in-out infinite; }
.bq-art-float:nth-child(2) { animation-delay: -1.3s; animation-duration: 4.6s; }
.bq-art-float:nth-child(3) { animation-delay: -2.6s; animation-duration: 5.2s; }
@keyframes bq-art-float { 50% { transform: translateY(-4px); } }
.bq-art-lanes path { animation: bq-art-lane 3s linear infinite; }
.bq-art-lanes path:nth-child(2) { animation-duration: 2.2s; }
.bq-art-lanes path:nth-child(3) { animation-duration: 3.6s; }
.bq-art-lanes path:nth-child(4) { animation-duration: 2.7s; }
@keyframes bq-art-lane { to { stroke-dashoffset: -144; } }
.bq-art-trace { animation: bq-art-trace 1.2s linear infinite; }
.bq-art-flow-dots path { animation: bq-art-flow 1.6s linear infinite; }
.bq-art-flow-dots path + path { animation-duration: 2.3s; }
@keyframes bq-art-flow { to { stroke-dashoffset: -48; } }
@keyframes bq-art-trace { to { stroke-dashoffset: -18; } }
.bq-art-dot { animation: bq-art-pulse 1.6s ease-in-out infinite; }
@keyframes bq-art-pulse { 50% { box-shadow: 0 0 0 6px rgba(149, 234, 135, 0); } }
.bq-promo:not(.is-shown) * { animation-play-state: paused; }

.bq-promo-mark, .bq-promo-cta-short { display: none; }
.bq-promo-body { padding: var(--bq-space-3) var(--bq-space-4) 0; }
.bq-promo p { margin: 0; }
.bq-promo-eyebrow { color: var(--promo-eyebrow); font: 600 var(--bq-fs-label)/1.2 var(--bq-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.bq-promo-title { margin-top: 4px !important; color: var(--bq-text-strong); font-size: var(--bq-fs-lg); font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.bq-promo-text { margin-top: 4px !important; color: var(--bq-text-muted); }
.bq-promo-cta { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; margin: var(--bq-space-3) var(--bq-space-4) var(--bq-space-4);
  border-radius: var(--bq-radius-md); background: var(--promo-cta); color: #fff !important; font-weight: 600; text-decoration: none !important; transition: filter 0.15s; }
.bq-promo-cta::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.bq-promo-cta:focus-visible { box-shadow: none; }
.bq-promo:hover .bq-promo-cta { filter: brightness(0.9); }
.bq-promo-cta .bq-icon { transition: transform 0.15s; }
.bq-promo:hover .bq-promo-cta .bq-icon { transform: translateX(3px); }

.bq-promo-close { position: absolute; top: 8px; right: 8px; z-index: 2; display: grid; place-items: center; width: 28px; height: 28px; padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 50%; background: rgba(0, 0, 0, 0.5); color: #fff; cursor: pointer; }
.bq-promo-close[hidden] { display: none; }
.bq-promo-close:hover { background: rgba(255, 255, 255, 0.22); }
.bq-promo-close .bq-icon { width: 0.875rem; height: 0.875rem; }

/* Room under the footer, so the end of the page is never under the card. */
body:has(.bq-promo) .bq-footer { padding-bottom: calc(var(--bq-space-5) + 17rem); }

/* A phone: a slim bar along the bottom, the product's mark, name and a short
   button; "back to top" above it while both show. */
@media (max-width: 767.98px) {
  .bq-promo { left: 0; right: 0; bottom: 0; width: auto; max-width: none; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto; align-items: center;
    column-gap: var(--bq-space-3); padding: var(--bq-space-2) 3rem calc(var(--bq-space-2) + env(safe-area-inset-bottom)) var(--bq-space-4);
    border-width: 1px 0 0; border-radius: var(--bq-radius-lg) var(--bq-radius-lg) 0 0; box-shadow: 0 -8px 24px -8px rgba(20, 24, 40, 0.25); }
  .bq-promo:hover { transform: none; }
  .bq-promo-art, .bq-promo-badge, .bq-promo-text, .bq-promo-cta-long + .bq-icon { display: none; }
  .bq-promo-mark { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: var(--bq-radius-md); background: var(--promo-cta); color: #fff; }
  .bq-promo-mark .bq-icon { width: 1.25rem; height: 1.25rem; }
  .bq-promo-dexrabbit .bq-promo-mark { background: #0a0a0a; }
  .bq-promo-moneyflow .bq-promo-mark { background: #070a1c; }
  .bq-promo-body { min-width: 0; padding: 0; }
  .bq-promo-eyebrow, .bq-promo-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bq-promo-eyebrow { font-size: 0.6875rem; }
  .bq-promo-title { margin-top: 2px !important; font-size: var(--bq-fs-sm); }
  .bq-promo-cta { min-height: 34px; margin: 0; padding: 0 var(--bq-space-3); }
  .bq-promo-cta-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .bq-promo-cta-short { display: inline; }
  .bq-promo-close { top: 50%; right: var(--bq-space-2); transform: translateY(-50%); border: 0; background: transparent; color: var(--bq-text-muted); }
  .bq-promo-close:hover { background: var(--bq-surface-3); color: var(--bq-text-strong); }
  body:has(.bq-promo) .bq-footer { padding-bottom: calc(var(--bq-space-5) + 4.5rem); }
  body:has(.bq-promo.is-shown) .bq-to-top { bottom: calc(var(--bq-promo-h, 3.5rem) + var(--bq-space-3)); }
}
/* No room for it: a short window; a phone on its side. */
@media (min-width: 768px) and (max-height: 35.98rem), (max-height: 29.98rem) {
  .bq-promo { display: none; }
  body:has(.bq-promo) .bq-footer { padding-bottom: var(--bq-space-5); }
}
@media (max-width: 767.98px) and (max-height: 29.98rem) {
  body:has(.bq-promo.is-shown) .bq-to-top { bottom: var(--bq-space-4); }
}
@media (prefers-reduced-motion: reduce) {
  .bq-promo, .bq-promo *, .bq-promo.is-shown { animation: none !important; transition: none !important; }
}
@media print { .bq-promo { display: none; } }
