/* ---------- The home page (shared/header/_home, home/index, home/_tiles) ----------
   The hero: a line in the logo's colours, the headline, the lead, a big
   search and a few places to start, over a faint dot grid and a glow of the
   logo's pink that fade out at the edges. Then the networks (home/index).
   The logo's colours: orange, pink, violet; the darker set on the light
   theme keeps text in them at 4.5:1 and more on the page. */
.bq-hero { --brand-a: #c2410c; --brand-b: #d6265a; --brand-c: #8a33c2; --brand-glow: rgba(214, 38, 90, 0.10);
  position: relative; isolation: isolate; overflow-x: clip; padding: clamp(1.25rem, 3vw, 2.25rem) 0 clamp(1.25rem, 2.5vw, 1.75rem); text-align: center; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bq-hero { --brand-a: #ff8a3d; --brand-b: #f0436f; --brand-c: #b36ae6; --brand-glow: rgba(240, 67, 111, 0.16); } }
:root[data-theme="dark"] .bq-hero { --brand-a: #ff8a3d; --brand-b: #f0436f; --brand-c: #b36ae6; --brand-glow: rgba(240, 67, 111, 0.16); }
.bq-hero::before { content: ""; position: absolute; z-index: -1; inset: -3rem 0 0;
  background: radial-gradient(45% 70% at 50% 0%, var(--brand-glow), transparent 70%),
    radial-gradient(circle at center, color-mix(in srgb, var(--bq-text) 14%, transparent) 1px, transparent 1.5px) 0 0 / 22px 22px;
  -webkit-mask: radial-gradient(60% 75% at 50% 25%, #000 30%, transparent 75%); mask: radial-gradient(60% 75% at 50% 25%, #000 30%, transparent 75%); }
.bq-hero-eyebrow { display: inline-block; margin: 0 0 var(--bq-space-3); font: 600 var(--bq-fs-label)/1.2 var(--bq-mono); letter-spacing: 0.14em; text-transform: uppercase;
  background: linear-gradient(90deg, var(--brand-a), var(--brand-b), var(--brand-c)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bq-hero h1 { max-width: 24ch; margin: 0 auto; color: var(--bq-text-strong); font-size: clamp(2rem, 4.2vw, 3.25rem); font-weight: 650; line-height: 1.05; letter-spacing: -0.03em; text-wrap: balance; }
.bq-hero-lead { max-width: 38rem; margin: var(--bq-space-3) auto 0; color: var(--bq-text-muted); font-size: clamp(var(--bq-fs-sm), 1.4vw, 1.0625rem); line-height: 1.55; text-wrap: pretty; }

/* The big search: shared/_search with the hero's own field. */
.bq-hero-search { max-width: 44rem; margin: clamp(1.25rem, 2.5vw, 1.75rem) auto 0; text-align: left; }
.bq-hero-search .bq-search { height: 56px; padding: 0 8px 0 18px; gap: var(--bq-space-3); border-color: var(--bq-border-strong); border-radius: 14px;
  background: var(--bq-surface); box-shadow: 0 1px 0 color-mix(in srgb, var(--bq-text) 4%, transparent), 0 18px 40px -24px color-mix(in srgb, var(--brand-b) 45%, transparent); }
.bq-hero-search .bq-search:focus-within { border-color: var(--brand-b); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-b) 18%, transparent), 0 18px 40px -24px color-mix(in srgb, var(--brand-b) 55%, transparent); }
.bq-hero-search .bq-search > .bq-icon { width: 20px; height: 20px; }
.bq-hero-search input[type="search"] { font-size: 1rem; }
.bq-hero-search .bq-scope > summary { height: 38px; padding: 0 0.75rem; border-radius: 10px; }

/* A few places to start. */
.bq-hero-try { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--bq-space-2); margin-top: var(--bq-space-4); font-size: var(--bq-fs-sm); }
.bq-hero-try > span { color: var(--bq-text-muted); font: 500 var(--bq-fs-label)/1 var(--bq-mono); letter-spacing: 0.08em; text-transform: uppercase; margin-right: var(--bq-space-1); }
.bq-hero-try a { padding: 0.3rem 0.75rem; border: 1px solid var(--bq-border); border-radius: 999px; background: color-mix(in srgb, var(--bq-surface) 70%, transparent);
  color: var(--bq-text) !important; text-decoration: none !important; transition: border-color 0.15s, color 0.15s; }
.bq-hero-try a:hover { border-color: var(--brand-b); color: var(--bq-text-strong) !important; }

/* Under the hero (home/index): the networks of the streaming API as live
   tiles, a finder, then the v1 networks. */
.bq-home { display: flex; flex-direction: column; gap: var(--bq-space-6); margin-bottom: var(--bq-space-6); }
.bq-home-sec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--bq-space-3); margin-bottom: var(--bq-space-3); }
.bq-home-sec-head h2 { display: flex; align-items: baseline; gap: var(--bq-space-3); margin: 0; color: var(--bq-text-strong); font-size: var(--bq-fs-xl); font-weight: 600; letter-spacing: -0.01em; }
.bq-home-sec-head h2 { flex-wrap: wrap; row-gap: 0.25rem; }
.bq-home-sec-head h2 small { color: var(--bq-text-muted); font-size: var(--bq-fs-sm); font-weight: 400; letter-spacing: 0; }
.bq-home-live { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--bq-text-muted); font: 500 var(--bq-fs-xs)/1 var(--bq-font); letter-spacing: 0; }
.bq-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--bq-success); box-shadow: 0 0 0 0 color-mix(in srgb, var(--bq-success) 55%, transparent);
  animation: bq-live 2s ease-out infinite; }
.bq-home-live.is-off .bq-live-dot { background: var(--bq-text-muted); animation: none; }
@keyframes bq-live { 70%, to { box-shadow: 0 0 0 6px color-mix(in srgb, var(--bq-success) 0%, transparent); } }

/* The finder (explorer/net_find): tiles and rows that do not match hide. */
.bq-net-find { display: flex; align-items: center; gap: var(--bq-space-2); width: min(100%, 17rem); height: 36px; margin: 0; padding: 0 0.75rem;
  border: 1px solid var(--bq-border); border-radius: var(--bq-radius-md); background: var(--bq-surface); color: var(--bq-text-muted); cursor: text; }
.bq-net-find:focus-within { border-color: var(--bq-border-strong); background: var(--bq-surface-2); }
.bq-net-find:has(input:focus-visible) { border-color: color-mix(in srgb, var(--bq-link) 60%, var(--bq-border-strong)); }
.bq-net-find .bq-icon { width: 16px; height: 16px; flex: none; }
.bq-net-find input { flex: 1 1 auto; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--bq-text); font-size: var(--bq-fs-sm); }
.bq-net-find input::-webkit-search-cancel-button { -webkit-appearance: none; }
.bq-net-none { margin: 0; color: var(--bq-text-muted); }
.bq-home-more:not(:has(li:not([hidden]))) { display: none; }

/* The tiles: four in a row, three, two; the first two twice as wide, so
   ten fill the rows (dense: a small tile takes the place a wide one left).
   Logo and name, the newest block ticking, then the activity of the day,
   its total and a line by hour. */
.bq-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: var(--bq-space-3); margin: 0; padding: 0; list-style: none; }
.bq-tile:nth-child(-n+2) { grid-column: span 2; }
.bq-tile-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "head head" "block block" "figure spark";
  align-items: end; gap: 0.35rem var(--bq-space-3); height: 100%; padding: var(--bq-space-4) var(--bq-space-4) 0.9rem;
  border: 1px solid var(--bq-border); border-radius: var(--bq-radius-lg); background: var(--bq-surface);
  color: var(--bq-text) !important; text-decoration: none !important; transition: border-color 0.15s, background-color 0.15s; }
.bq-tile-link:hover { border-color: var(--bq-border-strong); background: var(--bq-surface-2); }
.bq-tile-link:focus-visible { outline: 2px solid var(--bq-link); outline-offset: 2px; }
.bq-tile-head { grid-area: head; display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.bq-tile-head img { width: 24px; height: 24px; flex: none; }
.bq-tile-head b { overflow: hidden; color: var(--bq-text-strong); font-size: var(--bq-fs-md); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.bq-tile-head small { margin-left: auto; color: var(--bq-text-muted); font: 500 var(--bq-fs-xs)/1 var(--bq-mono); }
.bq-tile-tag { padding: 0.15rem 0.35rem; border-radius: var(--bq-radius-sm); background: var(--bq-surface-3); color: var(--bq-text-muted); font: 600 0.6875rem/1 var(--bq-mono); }
.bq-tile-block { grid-area: block; display: flex; align-items: baseline; gap: 0.5rem; min-width: 0; margin-bottom: var(--bq-space-3);
  color: var(--bq-text-muted); font: 500 var(--bq-fs-xs)/1.3 var(--bq-mono); white-space: nowrap; }
.bq-tile-number { padding: 0.1rem 0.3rem; margin-left: -0.3rem; border-radius: var(--bq-radius-sm); color: var(--bq-text); }
.bq-tile-figure { grid-area: figure; display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.bq-tile-figure strong { color: var(--bq-text-strong); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.bq-tile-figure .q-usd { color: inherit; }
.bq-tile-figure small { color: var(--bq-text-muted); font-size: var(--bq-fs-xs); white-space: nowrap; }
.bq-tile-waiting strong, .bq-tile-waiting small { width: 5rem; border-radius: var(--bq-radius-sm); background: var(--bq-surface-2); }
.bq-tile-waiting small { width: 7rem; }
.bq-spark { grid-area: spark; width: 7.5rem; height: 2.5rem; overflow: visible; color: var(--bq-chart-1); }
.bq-tile:nth-child(-n+2) .bq-spark { width: 100%; max-width: 22rem; justify-self: end; }
.bq-tile:nth-child(-n+2) .bq-tile-link { grid-template-columns: auto minmax(0, 1fr); }
.bq-tile:nth-child(-n+2) .bq-tile-figure strong { font-size: 2rem; }
.bq-spark-line { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.bq-spark-area { fill: currentColor; opacity: 0.12; }
.bq-tile-link:hover .bq-spark-area { opacity: 0.2; }
/* A new block (explorer/home_live, explorer/pulse): the number lights up
   and fades back, the tile's edge with it -- brighter, not a colour, which
   would read as a rise or a fall. */
.bq-tile.is-new .bq-tile-number { animation: bq-block-new 1.6s ease-out; }
.bq-tile.is-new .bq-tile-link { animation: bq-tile-new 1.6s ease-out; }
@keyframes bq-block-new { from { color: var(--bq-text-strong); background: color-mix(in srgb, var(--bq-text-strong) 14%, transparent);
  text-shadow: 0 0 10px color-mix(in srgb, var(--bq-text-strong) 45%, transparent); } }
@keyframes bq-tile-new { from { border-color: color-mix(in srgb, var(--bq-text-strong) 35%, var(--bq-border)); } }
.bq-tile.is-new .bq-tile-head img { animation: bq-block-pop 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes bq-block-pop { 40% { transform: scale(1.15); } }
@media (max-width: 1199.98px) { .bq-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767.98px) { .bq-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Hyperliquid's band (home/_hyperliquid): name, figures and a line on the
   left, its biggest markets on the right, each with a bar of the takers'
   buys (green) against their sells (red). */
.bq-hl { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--bq-space-4) var(--bq-space-5); margin-top: var(--bq-space-3);
  padding: var(--bq-space-4); border: 1px solid var(--bq-border); border-radius: var(--bq-radius-lg);
  background: linear-gradient(120deg, color-mix(in srgb, var(--hl-mint) 7%, var(--bq-surface)), var(--bq-surface) 55%); }
.bq-hl { --hl-mint: #2aa898; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bq-hl { --hl-mint: #50d2c1; } }
:root[data-theme="dark"] .bq-hl { --hl-mint: #50d2c1; }
.bq-hl[hidden] { display: none; }
.bq-hl-main { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "name name" "figures spark" "tape tape"; align-items: end; gap: var(--bq-space-3) var(--bq-space-4); }
.bq-hl-name { grid-area: name; display: flex; align-items: center; gap: 0.65rem; color: var(--bq-text) !important; text-decoration: none !important; }
.bq-hl-name img { width: 28px; height: 28px; }
.bq-hl-name span { display: flex; flex-direction: column; }
.bq-hl-name b { color: var(--bq-text-strong); font-size: var(--bq-fs-lg); font-weight: 600; line-height: 1.2; }
.bq-hl-name small { color: var(--bq-text-muted); font-size: var(--bq-fs-xs); }
.bq-hl-name:hover b { color: var(--bq-link); }
.bq-hl-figures { grid-area: figures; display: flex; gap: var(--bq-space-5); margin: 0; }
.bq-hl-figures div { display: flex; flex-direction: column-reverse; gap: 0.2rem; }
.bq-hl-figures dt { color: var(--bq-text-muted); font-size: var(--bq-fs-xs); font-weight: 400; white-space: nowrap; }
.bq-hl-figures dd { margin: 0; color: var(--bq-text-strong); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.bq-hl-figures .q-usd { color: inherit; }
.bq-hl .bq-spark { grid-area: spark; width: 100%; color: var(--hl-mint); }
/* The tape: the biggest trade of each moment slides in on top. */
.bq-hl-tape { grid-area: tape; display: flex; gap: var(--bq-space-2); min-width: 0; margin: 0; padding: 0; overflow: hidden; list-style: none;
  -webkit-mask: linear-gradient(90deg, #000 85%, transparent); mask: linear-gradient(90deg, #000 85%, transparent); }
.bq-hl-tape li { flex: none; }
.bq-hl-tape li.is-new { animation: bq-tape-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes bq-tape-in { from { opacity: 0; transform: translateX(-12px); } }
.bq-hl-trade { display: inline-flex; align-items: baseline; gap: 0.4rem; padding: 0.3rem 0.55rem; border: 1px solid var(--bq-border); border-radius: var(--bq-radius-pill);
  background: var(--bq-surface); font-size: var(--bq-fs-xs); white-space: nowrap; }
.bq-hl-trade b { color: var(--bq-text-strong); font-weight: 600; }
.bq-hl-trade .q-usd { color: var(--bq-text); font-weight: 500; }
.bq-hl-side { font-weight: 600; }
.bq-hl-trade.is-buy .bq-hl-side { color: var(--bq-success); }
.bq-hl-trade.is-sell .bq-hl-side { color: var(--bq-danger); }
/* The top markets, a ranked list: rank, name, a bar of the volume against
   the first market's, the volume, the takers' share of buys. */
.bq-hl-top { display: flex; flex-direction: column; min-width: 0; }
.bq-hl-top-head, .bq-hl-markets a { display: grid; grid-template-columns: 1.25rem minmax(0, 7.5rem) minmax(0, 1fr) 4.75rem 2.75rem; align-items: center; column-gap: var(--bq-space-3); }
.bq-hl-top-head { padding: 0 0.5rem 0.4rem; color: var(--bq-text-muted); font-size: 0.6875rem; }
.bq-hl-top-head span:first-child { grid-column: 1 / 4; }
.bq-hl-top-head span:not(:first-child) { text-align: right; }
.bq-hl-markets { margin: 0; padding: 0; list-style: none; }
.bq-hl-markets li + li a { border-top: 1px solid color-mix(in srgb, var(--bq-border) 70%, transparent); }
.bq-hl-markets a { padding: 0.45rem 0.5rem; border-radius: var(--bq-radius-sm); color: var(--bq-text) !important; text-decoration: none !important; transition: background-color 0.12s; }
.bq-hl-markets a:hover { background: color-mix(in srgb, var(--bq-surface-2) 80%, transparent); }
.bq-hl-markets a:hover b { color: var(--bq-link); }
.bq-hl-rank { color: var(--bq-text-muted); font: 500 var(--bq-fs-xs)/1 var(--bq-mono); }
.bq-hl-markets b { overflow: hidden; color: var(--bq-text-strong); font-size: var(--bq-fs-sm); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.bq-hl-markets b i, .bq-hl-trade b i { margin-left: 0.35rem; color: var(--bq-text-muted); font: 500 0.6875rem/1 var(--bq-mono); font-style: normal; }
.bq-hl-bar { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--hl-mint) var(--share), color-mix(in srgb, var(--bq-text) 7%, transparent) var(--share)); }
.bq-hl-markets .q-usd { color: var(--bq-text); font-size: var(--bq-fs-sm); font-weight: 500; text-align: right; }
.bq-hl-buys { color: var(--bq-text-muted); font: 500 var(--bq-fs-xs)/1 var(--bq-mono); text-align: right; }
.bq-hl-buys.is-buy { color: var(--bq-success); }
.bq-hl-buys.is-sell { color: var(--bq-danger); }
@media (max-width: 1199.98px) { .bq-hl { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 767.98px) {
  .bq-hl-top-head, .bq-hl-markets a { grid-template-columns: 1rem minmax(0, 1fr) 3rem 4.5rem 2.5rem; column-gap: var(--bq-space-2); }
  .bq-hl-main { grid-template-areas: "name name" "figures figures" "spark spark" "tape tape"; }
}

/* The v1 networks: a row each, logo, name, currency. */
.bq-more-nets { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0 var(--bq-space-4); margin: 0; padding: 0; list-style: none; }
.bq-more-nets a { display: flex; align-items: center; gap: 0.65rem; padding: 0.6rem 0.25rem; border-bottom: 1px solid var(--bq-border);
  color: var(--bq-text) !important; text-decoration: none !important; }
.bq-more-nets a:hover b { color: var(--bq-link); }
.bq-more-nets img { width: 22px; height: 22px; flex: none; }
.bq-more-nets b { font-size: var(--bq-fs-sm); font-weight: 500; }
.bq-more-nets small { margin-left: auto; color: var(--bq-text-muted); font: 500 var(--bq-fs-xs)/1 var(--bq-mono); }


@media (max-width: 767.98px) {
  .bq-hero { padding-top: var(--bq-space-5); }
  .bq-hero-search .bq-search { height: 50px; padding-left: 14px; }
  .bq-hero-search .bq-kbd { display: none; }
  .bq-hero-try > span { flex-basis: 100%; margin: 0 0 2px; }
  .bq-net-find { width: 100%; }
  .bq-tile-link { padding: var(--bq-space-3); }
  .bq-tile-figure strong { font-size: 1.25rem; }
  .bq-tile:nth-child(-n+2) .bq-tile-figure strong { font-size: 1.5rem; }
  .bq-tile-head small, .bq-tile-tag { display: none; }
  .bq-tile-block { flex-wrap: wrap; row-gap: 0.15rem; font-size: 0.6875rem; }
  .bq-spark { width: 100%; height: 2rem; }
  .bq-tile:not(:nth-child(-n+2)) .bq-tile-link { grid-template-areas: "head head" "block block" "figure figure" "spark spark"; }
}
@media (prefers-reduced-motion: reduce) {
  .bq-live-dot, .bq-tile.is-new .bq-tile-number, .bq-tile.is-new .bq-tile-link, .bq-tile.is-new .bq-tile-head img, .bq-hl-tape li.is-new { animation: none; }
}
