/* QxStrategy Account — GENERATED by tools/build-qx-doors.mjs: sites/qxstrategy/v5/assets/css/qxstrategy.css, whole, then the door's own few rules. Do not hand-edit. */
/* QxStrategy — the whole look of the platform site.
 *
 * SIBLING FILE: sites/qxsuite/v5/assets/css/qxsuite.css. The two sites are the same skeleton with a different
 * focus ("Same vision. Different focus." is on the brand sheet), so every rule below the token block is shared
 * word for word and a change here is a change there. Only :root differs: green here, blue there.
 *
 * EVERY COLOUR IS HERE. tools/build-qx-platform.mjs writes structure and words only — the palette ratchet counts
 * hex under tools/ — so the brand is declared once, in this file, and referred to by token. That includes the
 * gradient stops of the mark: assets/svg/brand/mark.svg names no colour and takes its stops from here.
 *
 * The brand, from mood-board/qx (2026-09-22): near-black ground, a two-tone gradient mark, a light sans wordmark
 * with the product word in regular weight, a spaced-out strapline in the accent, and three words under a rule.
 * PHONE FIRST — the mock-up is a phone as well as a laptop, so every rule starts at a phone and widens.
 */

:root {
  --qxp-bg: #070b0e;            /* the ground */
  --qxp-bg-2: #0b1014;          /* panels and the bar */
  --qxp-bg-3: #111a20;          /* a panel that has to lift off the one behind it */
  --qxp-ink: #eef4f2;           /* headings and the wordmark */
  --qxp-body: #a9b8b5;          /* running text */
  --qxp-muted: #6d7f7c;         /* captions, notes, the small print */
  --qxp-hi: #4ade9b;            /* the accent, light end: the strapline and the mark's first stop */
  --qxp-mid: #17a673;           /* the accent, middle: buttons and rules */
  --qxp-low: #0d6b4d;           /* the accent, dark end: the mark's tail */
  --qxp-down: #e0654f;          /* the other direction — a falling candle, and nothing else */
  --qxp-line: rgba(238, 244, 242, .10);
  --qxp-line-2: rgba(238, 244, 242, .18);
  --qxp-glow: rgba(74, 222, 155, .16);
  --qxp-shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 18px 48px rgba(0, 0, 0, .45);
  --qxp-ui: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --qxp-wide: 1140px;
}

/* .qxp-wrap is width:100% with side padding; without border-box the padding is added to the width and the whole
 * page scrolls sideways on a phone, which is where this design starts. */
*, *::before, *::after { box-sizing: border-box; }

body {
  /* The engine's blocks.css sets body { padding: 2rem }, which frames a dark site in a light border. The bar
   * runs to the edge of the glass here, as it does in the drawing. */
  margin: 0;
  padding: 0;
  background: var(--qxp-bg);
  color: var(--qxp-body);
  font: 16px/1.6 var(--qxp-ui);
  -webkit-font-smoothing: antialiased;
}

.qxp-wrap { width: 100%; max-width: var(--qxp-wide); margin: 0 auto; padding: 0 18px; }

a { color: var(--qxp-hi); }
:focus-visible { outline: 2px solid var(--qxp-hi); outline-offset: 3px; border-radius: 4px; }

/* ── the mark ───────────────────────────────────────────────────────────────
 * mark.svg carries no colour: its three gradient stops are classed and coloured here, which is how one drawing
 * is green on this site and blue on QxSuite. */
.qxp-stop-a { stop-color: var(--qxp-hi); }
.qxp-stop-b { stop-color: var(--qxp-mid); }
.qxp-stop-c { stop-color: var(--qxp-low); }
.qxp-mark { display: block; width: 100%; height: 100%; }

/* EVERY SVG HOLDER IS A BLOCK, in one rule so a new one cannot slip through.
 * The builder wraps each drawing in a <span>, and a span is inline: width and height do nothing to it, so the
 * svg inside at width:100% resolves against the nearest block instead. That put a 108px mark at 900px and a
 * 24px module icon at card width. Both looked fine in the bar and the sister card — a flex or grid item is
 * blockified for free — which is exactly how the bug hid on two pages out of five. */
.qxp-brand-mark, .qxp-hero-mark, .qxp-sister-mark, .qxp-foot-mark, .qxp-card-icon { display: block; }

/* ── the bar ────────────────────────────────────────────────────────────────*/
.qxp-top { position: relative; z-index: 20; background: var(--qxp-bg-2);
  border-bottom: 1px solid var(--qxp-line); }
.qxp-top-inner { display: flex; align-items: center; gap: 14px; max-width: var(--qxp-wide); margin: 0 auto;
  padding: 11px 18px; }
.qxp-brand { flex: none; }
.qxp-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--qxp-ink); }
.qxp-brand-mark { width: 26px; height: 26px; flex: none; }
.qxp-brand-word { font-size: 18px; letter-spacing: -.01em; white-space: nowrap; }
.qxp-brand-word b { font-weight: 700; }
.qxp-brand-word span { font-weight: 300; }
.qxp-nav { margin-left: auto; min-width: 0; display: flex; gap: 4px; align-items: center;
  flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; -ms-overflow-style: none; }
.qxp-nav::-webkit-scrollbar { display: none; }
.qxp-nav a { flex: none; white-space: nowrap; display: inline-block; padding: 7px 10px; border-radius: 7px; font-size: 14px;
  color: var(--qxp-body); text-decoration: none; }
.qxp-nav a:hover, .qxp-nav a:focus-visible { color: var(--qxp-ink); background: var(--qxp-bg-3); }

/* ── the four main sections, always in view (Graham 2026-10-19: backtests are the main feature) ──
   Phone: a second row under the mark, spread edge to edge, "Best results" shortened to "Best" below 30rem.
   Wide: in the bar itself, beside the mark. The Menu keeps every section, these four included. */
.qxp-top-inner { flex-wrap: wrap; row-gap: 6px; }
.qxp-primary { order: 3; flex: 1 0 100%; display: flex; justify-content: space-between; gap: 2px; margin: 0 -6px -4px; }
.qxp-primary a { flex: none; padding: 7px 6px; border-radius: 7px; font-size: 14px; font-weight: 600; line-height: 1.2; white-space: nowrap;
  color: var(--qxp-ink); text-decoration: none; }
.qxp-primary a:hover, .qxp-primary a:focus-visible { color: var(--qxp-hi); background: var(--qxp-bg-3); }
.qxp-primary-more { display: none; }
@media (min-width: 30rem) { .qxp-primary-more { display: inline; } }
@media (min-width: 52rem) {
  .qxp-top-inner { flex-wrap: nowrap; }
  .qxp-primary { order: 0; flex: 0 1 auto; justify-content: flex-start; gap: 4px; margin: 0 0 0 14px; }
  .qxp-primary a { padding: 7px 10px; }
}
/* the menu panel holds five groups on qxstrategy (Backtests first); scoped to a header that HAS the main strip, so
   the admin doors that mirror the menu rules below keep their four columns */
@media (min-width: 46.01rem) { .qxp-primary ~ .qxp-topright .qxp-menu-panel { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* ── top menu: Favourites + Menu disclosure (iconkind header format, dark palette) ── */
.qxp-topright { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.qxp-menu { position: static; }
.qxp-menu > summary { list-style: none; }
.qxp-menu > summary::-webkit-details-marker { display: none; }
.qxp-menu-button, .qxp-action { box-sizing: border-box; width: 2.5rem; height: 2.5rem; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--qxp-line-2); border-radius: .6rem; background: var(--qxp-bg-3); color: var(--qxp-ink); cursor: pointer; text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease; }
@media (hover: hover) { .qxp-menu-button:hover, .qxp-action:hover { border-color: var(--qxp-hi); } }
.qxp-menu-button:focus-visible, .qxp-action:focus-visible { outline: 2px solid var(--qxp-hi); outline-offset: 2px; }
.qxp-menu[open] .qxp-menu-button { border-color: var(--qxp-hi); }
.qxp-action svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.qxp-action-word, .qxp-menu-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.qxp-menu-icon { position: relative; display: block; width: 1.15rem; height: .55rem; border-top: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; }
.qxp-menu[open] .qxp-menu-icon { border-color: transparent; }
.qxp-menu[open] .qxp-menu-icon::before, .qxp-menu[open] .qxp-menu-icon::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1.6px solid currentColor; }
.qxp-menu[open] .qxp-menu-icon::before { transform: rotate(45deg); }
.qxp-menu[open] .qxp-menu-icon::after { transform: rotate(-45deg); }
.qxp-menu-panel { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.4rem 2rem;
  padding: 1.6rem max(18px, calc((100% - var(--qxp-wide)) / 2)) 2rem; background: var(--qxp-bg-2); border-bottom: 1px solid var(--qxp-line);
  box-shadow: 0 22px 40px -28px rgba(0, 0, 0, .65); }
@media (max-width: 46rem) { .qxp-menu-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem 1rem; max-height: calc(100vh - 4rem); overflow-y: auto; } }
.qxp-menu-account { grid-column: 1 / -1; display: flex; align-items: center; gap: .6rem; padding: .1rem 0 1rem;
  border-bottom: 1px solid var(--qxp-line); color: var(--qxp-ink); text-decoration: none; font-size: 1rem; }
.qxp-menu-account svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.qxp-menu-account:hover { color: var(--qxp-hi); }
.qxp-menu-h { margin: 0 0 .6rem; padding-bottom: .4rem; border-bottom: 1px solid var(--qxp-line); font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--qxp-hi); }
.qxp-menu-link { display: block; padding: .5rem .6rem; margin: 0 -.6rem; border-radius: 8px; font-size: 1rem; line-height: 1.3; color: var(--qxp-body); text-decoration: none; transition: background-color .12s ease, color .12s ease; }
.qxp-menu-link:hover, .qxp-menu-link:focus-visible { color: var(--qxp-hi); background: var(--qxp-bg-3); }

/* ── the hero, as the brand sheet lays it out ───────────────────────────────
 * mark, name, strapline in spaced accent caps, a short rule, then the three words. */
.qxp-hero { padding: 46px 0 34px; background:
  radial-gradient(70% 60% at 50% 0%, var(--qxp-glow), transparent 70%); }
.qxp-hero-mark { width: 86px; height: 86px; margin: 0 auto 18px; }
.qxp-hero-head { margin: 0; text-align: center; color: var(--qxp-ink); font-size: 40px; line-height: 1.04;
  letter-spacing: -.02em; font-weight: 300; }
.qxp-hero-head b { font-weight: 700; }
.qxp-strap { margin: 12px 0 0; text-align: center; color: var(--qxp-hi); font-size: 12px; font-weight: 500;
  letter-spacing: .34em; text-transform: uppercase; }
.qxp-hero-rule { width: 64px; height: 1px; margin: 22px auto; background: var(--qxp-line-2); }
.qxp-values { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px 18px; color: var(--qxp-muted); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; }
.qxp-values li:not(:last-child)::after { content: "/"; margin-left: 18px; color: var(--qxp-line-2); }
.qxp-hero-lede { margin: 26px auto 0; max-width: 640px; text-align: center; font-size: 17px;
  color: var(--qxp-body); }
.qxp-hero-acts { margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.qxp-btn { display: inline-block; padding: 11px 18px; border-radius: 9px; font-size: 14px; font-weight: 600;
  text-decoration: none; background: var(--qxp-mid); color: var(--qxp-bg); border: 1px solid transparent; }
.qxp-btn:hover, .qxp-btn:focus-visible { background: var(--qxp-hi); }
.qxp-btn-quiet { background: transparent; color: var(--qxp-ink); border-color: var(--qxp-line-2); }
.qxp-btn-quiet:hover, .qxp-btn-quiet:focus-visible { background: var(--qxp-bg-3); color: var(--qxp-ink); }

/* ── a section of the page ──────────────────────────────────────────────────*/
.qxp-section { padding: 42px 0; border-top: 1px solid var(--qxp-line); }
.qxp-section-quiet { background: var(--qxp-bg-2); }
.qxp-eyebrow { margin: 0 0 10px; color: var(--qxp-hi); font-size: 11px; font-weight: 600; letter-spacing: .26em;
  text-transform: uppercase; }
.qxp-head { margin: 0; color: var(--qxp-ink); font-size: 27px; line-height: 1.2; letter-spacing: -.015em;
  font-weight: 400; text-wrap: balance; }
.qxp-head-rule { width: 46px; height: 2px; margin: 14px 0 0;
  background: linear-gradient(90deg, var(--qxp-hi), var(--qxp-low)); }
.qxp-lede { margin: 16px 0 0; max-width: 62ch; font-size: 17px; }
.qxp-prose { max-width: 62ch; }
.qxp-prose p { margin: 0 0 14px; }
.qxp-prose p:last-child { margin-bottom: 0; }

/* ── the modules, one panel each ────────────────────────────────────────────*/
.qxp-grid { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px;
  grid-template-columns: 1fr; }
.qxp-card { background: var(--qxp-bg-2); border: 1px solid var(--qxp-line); border-radius: 12px; padding: 16px; }
.qxp-card-icon { width: 24px; height: 24px; color: var(--qxp-hi); }
.qxp-card-icon svg { width: 100%; height: 100%; display: block; }
.qxp-card-name { margin: 12px 0 6px; color: var(--qxp-ink); font-size: 16px; font-weight: 600; }
.qxp-card-text { margin: 0; font-size: 14.5px; color: var(--qxp-body); }

/* ── the drawn workspace, in the devices the mock-up shows it in ────────────
 * The second board in mood-board/qx presents each platform twice: a laptop labelled Desktop and a phone
 * labelled Mobile, side by side. That is the presentation here — the frames are CSS, the screens are the
 * drawings in assets/svg/scene, so nothing is a screenshot and nothing carries a figure. */
.qxp-devices { margin: 26px 0 0; display: grid; gap: 26px; align-items: end; }
.qxp-device-label { margin: 0 0 10px; color: var(--qxp-muted); font-size: 11px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; }

/* The laptop: a thin bezel round the screen, then the lid line and the base lip under it. */
.qxp-laptop { padding: 0 14px; }
.qxp-laptop-lid { background: var(--qxp-bg-3); border: 1px solid var(--qxp-line-2); border-radius: 12px 12px 4px 4px;
  padding: 10px 10px 12px; box-shadow: var(--qxp-shadow); }
.qxp-laptop-base { height: 10px; width: calc(100% + 28px); margin-left: -14px; border-radius: 0 0 10px 10px;
  background: var(--qxp-bg-3); border: 1px solid var(--qxp-line-2); border-top: 0; }
.qxp-laptop-base::after { content: ""; display: block; width: 16%; height: 3px; margin: 0 auto;
  border-radius: 0 0 3px 3px; background: var(--qxp-line-2); }

/* The phone: a thicker bezel, a deeper radius and the notch along the top. */
.qxp-phone-body { max-width: 240px; margin: 0 auto; background: var(--qxp-bg-3);
  border: 1px solid var(--qxp-line-2); border-radius: 26px; padding: 9px; box-shadow: var(--qxp-shadow);
  position: relative; }
.qxp-phone-body::before { content: ""; position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
  width: 38%; height: 13px; border-radius: 0 0 9px 9px; background: var(--qxp-bg); z-index: 1; }

.qxp-scene { display: block; width: 100%; height: auto; border-radius: 6px; }
.qxp-phone-body .qxp-scene { border-radius: 18px; }
.qxp-frame-cap { margin: 16px 2px 2px; color: var(--qxp-muted); font-size: 12.5px; }
.qxp-scene-win { fill: var(--qxp-bg-3); stroke: var(--qxp-line-2); }
.qxp-scene-line { stroke: var(--qxp-line); fill: none; }
.qxp-scene-grid { stroke: var(--qxp-line); fill: none; stroke-dasharray: 3 6; }
.qxp-scene-chip { fill: var(--qxp-line-2); }
.qxp-scene-chip2 { fill: var(--qxp-line); }
.qxp-scene-rail { fill: var(--qxp-line); }
.qxp-scene-on { fill: var(--qxp-mid); }
.qxp-scene-row { stroke: var(--qxp-line-2); fill: none; }
.qxp-scene-row2 { stroke: var(--qxp-line); fill: none; }
.qxp-up { fill: var(--qxp-hi); }
.qxp-up-line { stroke: var(--qxp-hi); fill: none; }
.qxp-down { fill: var(--qxp-down); }
.qxp-down-line { stroke: var(--qxp-down); fill: none; }
.qxp-node { fill: var(--qxp-bg-2); stroke: var(--qxp-line-2); }
.qxp-node-on { stroke: var(--qxp-mid); }
.qxp-node-dot { fill: var(--qxp-mid); }
.qxp-tile { fill: var(--qxp-bg-2); stroke: var(--qxp-line); }
.qxp-flow { stroke: var(--qxp-line-2); fill: none; }
.qxp-flow-head { fill: var(--qxp-line-2); stroke: none; }

/* ── the honest note ────────────────────────────────────────────────────────
 * Every page carries one. The platform is being built; the site says so rather than implying otherwise. */
.qxp-note { margin: 26px 0 0; border-left: 2px solid var(--qxp-mid); padding: 2px 0 2px 14px; }
.qxp-note-head { display: block; color: var(--qxp-ink); font-size: 14px; font-weight: 600; }
.qxp-note-text { margin: 6px 0 0; font-size: 14.5px; color: var(--qxp-muted); }

/* ── the other platform ─────────────────────────────────────────────────────*/
.qxp-sister { display: block; margin: 24px 0 0; text-decoration: none; background: var(--qxp-bg-3);
  border: 1px solid var(--qxp-line); border-radius: 12px; padding: 18px; }
.qxp-sister:hover, .qxp-sister:focus-visible { border-color: var(--qxp-line-2); }
.qxp-sister-mark { width: 34px; height: 34px; }
/* The sister card points at the OTHER platform, whose accent is not this one's. Painting its mark in this
 * site's green (or blue) would be recolouring somebody else's brand, so it takes the monochrome lockup the
 * brand sheet provides. */
.qxp-sister-mark .qxp-stop-a, .qxp-sister-mark .qxp-stop-b { stop-color: var(--qxp-ink); }
.qxp-sister-mark .qxp-stop-c { stop-color: var(--qxp-muted); }
.qxp-sister-name { margin: 12px 0 4px; color: var(--qxp-ink); font-size: 18px; font-weight: 600; }
.qxp-sister-text { margin: 0; color: var(--qxp-body); font-size: 14.5px; }
.qxp-sister-go { display: inline-block; margin: 10px 0 0; color: var(--qxp-hi); font-size: 14px;
  font-weight: 600; }

/* ── steps, for the approach page ───────────────────────────────────────────*/
.qxp-steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; }
.qxp-step { background: var(--qxp-bg-2); border: 1px solid var(--qxp-line); border-radius: 12px; padding: 18px; }
.qxp-step-n { color: var(--qxp-hi); font-size: 12px; font-weight: 700; letter-spacing: .24em;
  text-transform: uppercase; }
.qxp-step-name { margin: 8px 0 8px; color: var(--qxp-ink); font-size: 20px; font-weight: 500; }
.qxp-step-text { margin: 0; font-size: 15.5px; }

/* ── the footer ─────────────────────────────────────────────────────────────*/
.qxp-foot { border-top: 1px solid var(--qxp-line); background: var(--qxp-bg-2); padding: 30px 0 38px;
  margin-top: 8px; }
.qxp-foot-top { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.qxp-foot-mark { width: 22px; height: 22px; flex: none; }
.qxp-foot-word { color: var(--qxp-ink); font-size: 15px; }
.qxp-foot-word b { font-weight: 700; }
.qxp-foot-word span { font-weight: 300; }
.qxp-foot-links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.qxp-foot-links a { padding: 6px 8px; border-radius: 6px; color: var(--qxp-body); font-size: 14px;
  text-decoration: none; }
.qxp-foot-links a:hover, .qxp-foot-links a:focus-visible { color: var(--qxp-ink); background: var(--qxp-bg-3); }
/* the main sections lead the footer links, in the brand colour (nav entries marked `main` in data/site.json) */
.qxp-foot-links a.qxp-foot-main { color: var(--qxp-hi); font-weight: 600; }
.qxp-foot-rule { height: 1px; margin: 22px 0; background: var(--qxp-line); }
.qxp-foot-small { margin: 0; color: var(--qxp-muted); font-size: 13px; max-width: 72ch; }
.qxp-foot-small + .qxp-foot-small { margin-top: 10px; }
.qxp-umbrella { margin: 14px 0 0; color: var(--qxp-muted); font-size: 12px; }
/* The logotype keeps its own casing; only the line after it is set in spaced caps, as on the brand sheet.
 * text-transform over the whole string turned "Qx" into "QX", which is somebody else's brand. */
.qxp-umbrella b { color: var(--qxp-body); font-weight: 700; }
.qxp-umbrella span { margin-left: 10px; letter-spacing: .2em; text-transform: uppercase; }

/* ── wider than a phone ─────────────────────────────────────────────────────*/
@media (min-width: 620px) {
  .qxp-hero { padding: 64px 0 46px; }
  .qxp-hero-mark { width: 124px; height: 124px; }
  .qxp-hero-head { font-size: 56px; }
  .qxp-head { font-size: 32px; }
  .qxp-grid { grid-template-columns: 1fr 1fr; }
  .qxp-steps { grid-template-columns: repeat(3, 1fr); }
  .qxp-sister { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; padding: 22px; }
  .qxp-sister-name { margin-top: 0; }
}
@media (min-width: 900px) {
  .qxp-section { padding: 58px 0; }
  .qxp-hero-head { font-size: 66px; }
  .qxp-grid { grid-template-columns: repeat(4, 1fr); }
  .qxp-hero-mark { width: 140px; height: 140px; }
  .qxp-devices { grid-template-columns: minmax(0, 1fr) 260px; gap: 34px; }
  .qxp-frame { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ── the ticker (objects/market.ticker.json) — our own figure, one row per instrument ─────*/
.qxt { width: min(100%, 720px); border: 1px solid var(--qxp-line); border-radius: 10px; background: var(--qxp-bg-2);
  font-family: var(--qxp-ui); font-variant-numeric: tabular-nums; }
/* The page's class lands on the object's ROOT (the engine wraps nothing), so this is the card's own placement, not a
 * wrapper's: the host card's width and side gutters, centred. Padding here would land inside the border. The root
 * keeps the engine's flex column, which is what stacks the rows. */
.qxp-ticker { box-sizing: border-box; width: min(760px, 100% - 36px); margin: 0 auto 26px; padding: 0; }
/* Every row is the same width (the box's), so the right column ends on one edge whatever the price's length. */
.qxt-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 18px; align-items: baseline; padding: 12px 18px; }
.qxt-row { border-top: 1px solid var(--qxp-line); }
.qxt-row:first-child { border-top: 0; }
@media (min-width: 620px) {
  /* The rows live in the repeater, which lays itself out inline (flex, column); the grid has to override that. */
  .qxt-rows { display: grid !important; grid-template-columns: 1fr 1fr; }
  .qxt-row:nth-child(-n+2) { border-top: 0; }
  .qxt-row:nth-child(even) { border-left: 1px solid var(--qxp-line); }
}
.qxt-label { grid-column: 1; color: var(--qxp-muted); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.qxt-price { grid-column: 1; color: var(--qxp-ink); font-size: 26px; font-weight: 700; line-height: 1.1; }
.qxt-chg { grid-column: 2; grid-row: 2; justify-self: end; text-align: right; font-size: 15px; font-weight: 600; color: var(--qxp-body); }
.qxt-up .qxt-chg { color: var(--qxp-hi); }
.qxt-up .qxt-chg::before { content: "\25B2 "; }
.qxt-down .qxt-chg { color: var(--qxp-down); }
.qxt-down .qxt-chg::before { content: "\25BC "; }
.qxt-asof { grid-column: 2; grid-row: 1; justify-self: end; text-align: right; color: var(--qxp-muted); font-size: 12px; }
.qxt-asof::before { content: "as of "; }
.qxt-paused .qxt-asof { color: var(--qxp-down); }
.qxt-paused .qxt-asof::before { content: "feed paused \00B7 last "; }
.qxt-paused .qxt-price { color: var(--qxp-muted); }

/* ── public MARKET MAP, its own page (objects/scan.marketmap.json) ────────────────────────
 * Trending-first: a TREND band over the up/down sections, then a NO-TREND band over ranging/drifting.
 * Each tile = recognizable coin icon + base ticker + a confidence bar (ADX strength, class-interpolated
 * qxp-cf-{item.strength}, coloured by the section accent --mm). Fast to scan; data-minimised. */
.qxp-mm { display: flex; flex-direction: column; gap: 1rem; padding-block: .4rem 3rem; }
.qxp-mm-top { padding-block: 1.4rem 0; }
.qxp-mm-top h1 { margin: 0; }
.qxp-mm-wrap { padding-block: 0; }
/* horizon toggle: deep-linkable tabs (short 1h / swing 4h / long 1d) */
.qxp-mm-tabs { display: flex; gap: 8px; margin-top: 1rem; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.qxp-mm-tabs::-webkit-scrollbar { display: none; }
.qxp-mm-tab { flex: 1 1 0; min-width: 118px; display: flex; flex-direction: column; gap: 2px; padding: 10px 14px;
  border: 1px solid var(--qxp-line-2); border-radius: 10px; background: var(--qxp-bg-2); text-decoration: none; }
.qxp-mm-tab b { color: var(--qxp-ink); font-size: 14px; font-weight: 650; }
.qxp-mm-tab span { color: var(--qxp-muted); font-size: 11.5px; }
.qxp-mm-tab:hover, .qxp-mm-tab:focus-visible { border-color: var(--qxp-hi); }
.qxp-mm-tab-on { border-color: var(--qxp-hi); background: var(--qxp-bg-3); box-shadow: inset 0 -2px 0 var(--qxp-hi); }
/* the two top-level banners that separate trending from not-trending */
.qxp-mm-band { display: flex; flex-direction: column; gap: 1px; margin-top: .9rem; padding-bottom: .35rem; border-bottom: 1px solid var(--qxp-line-2); }
.qxp-mm-band-t { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--qxp-ink); }
.qxp-mm-band-s { color: var(--qxp-muted); font-size: 12.5px; }
.qxp-mm-band-trend .qxp-mm-band-t { color: var(--qxp-hi); }
.qxp-mm-band-flat .qxp-mm-band-t { color: var(--qxp-muted); }
/* a regime section: --mm is its accent, carried to the header rule, tile edge and confidence bar */
.qxp-mm-sec { --mm: var(--qxp-line-2); display: flex; flex-direction: column; gap: .55rem; }
.qxp-mm-sec-bull { --mm: var(--qxp-hi); }
.qxp-mm-sec-bear { --mm: var(--qxp-down); }
.qxp-mm-sec-range { --mm: var(--qxp-muted); }
.qxp-mm-sec-decl { --mm: var(--qxp-down); }
.qxp-mm-head { display: flex; flex-direction: column; gap: 1px; padding-left: 12px; border-left: 3px solid var(--mm); }
.qxp-mm-head h2 { margin: 0; font-size: 17px; font-weight: 650; color: var(--qxp-ink); }
.qxp-mm-sec-bull .qxp-mm-head h2::before { content: "\25B2\00A0"; color: var(--mm); font-size: 12px; vertical-align: 1px; }
.qxp-mm-sec-bear .qxp-mm-head h2::before { content: "\25BC\00A0"; color: var(--mm); font-size: 12px; vertical-align: 1px; }
.qxp-mm-head span { color: var(--qxp-muted); font-size: 12.5px; }
.qxp-mm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 8px; }
.qxp-mm-tile { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--qxp-line);
  border-left: 3px solid var(--mm); border-radius: 12px; background: var(--qxp-bg-2); }
.qxp-mm-ic { width: 40px; height: 40px; flex: none; display: block; border-radius: 50%; }
.qxp-mm-ic img, .qxp-mm-ic svg { width: 40px; height: 40px; display: block; border-radius: 50%; }
.qxp-mm-tk { color: var(--qxp-ink); font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.qxp-mm-cf-wrap { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.qxp-cf { position: relative; width: 52px; height: 5px; border-radius: 3px; background: var(--qxp-line); overflow: hidden; }
.qxp-cf::after { content: ""; position: absolute; top: 0; left: 0; bottom: 0; width: var(--cf, 0); background: var(--mm); border-radius: 3px; }
.qxp-cf-strong { --cf: 100%; }
.qxp-cf-trending { --cf: 72%; }
.qxp-cf-soft { --cf: 45%; }
.qxp-cf-flat { --cf: 22%; }
.qxp-cf-unknown { --cf: 0; }
.qxp-mm-st { color: var(--qxp-muted); font-size: 11px; text-transform: capitalize; letter-spacing: .02em; }
.qxp-mm-none { color: var(--qxp-muted); font-size: 13px; padding: 0 0 2px 12px; }
.qxp-mm-foot { margin-top: .5rem; }

/* ── public market-sentiment surface (objects/sentiment.gauge.json) ── */
.qxp-sent { display: flex; flex-direction: column; gap: 1rem; padding-block: .4rem 3rem; }
.qxp-sent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 10px; }
.qxp-sent-cell { display: flex; flex-direction: column; gap: .3rem; padding: 16px 18px; border: 1px solid var(--qxp-line); border-radius: 12px; background: var(--qxp-bg-2); }
.qxp-sent-label { color: var(--qxp-muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.qxp-sent-value { color: var(--qxp-ink); font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.qxp-sent-empty { color: var(--qxp-muted); font-size: 13.5px; }
/* per-coin sentiment (derived score + label chip) */
.qxp-sent-coinh { margin-top: 1.4rem; }
.qxp-sentcoins { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); gap: 8px; }
.qxp-sentcoin { display: flex; align-items: center; gap: 9px; padding: 10px 13px; border: 1px solid var(--qxp-line); border-radius: 10px; background: var(--qxp-bg-2); }
.qxp-sentcoin-sym { color: var(--qxp-ink); font-size: 14.5px; font-weight: 650; }
.qxp-sentcoin-score { margin-left: auto; color: var(--qxp-body); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.qxp-schip { display: inline-flex; align-items: center; min-height: 20px; padding: 0 9px; border-radius: 999px; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; border: 1px solid var(--qxp-line-2); color: var(--qxp-body); }
.qxp-schip-bullish { color: var(--qxp-hi); border-color: var(--qxp-hi); }
.qxp-schip-bearish { color: var(--qxp-down); border-color: var(--qxp-down); }
.qxp-schip-neutral { color: var(--qxp-body); border-color: var(--qxp-line-2); }
/* public instruments spec grid */
.qxp-ins { display: flex; flex-direction: column; gap: 1rem; padding-block: .4rem 3rem; }
/* the engine lays the repeater out (layout grid → inline auto-fit columns); the tiles are styled here.
   2026-10-12: equal tiles, a symbol + class line, the price, then three labelled figures that never wrap. */
.qxp-ins-grid { gap: .5rem; }
.qxp-ins-cell { display: flex; flex-direction: column; gap: .35rem; min-width: 0; padding: 14px 16px; border: 1px solid var(--qxp-line); border-radius: 12px; background: var(--qxp-bg-2); }
.qxp-ins-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
.qxp-ins-sym { color: var(--qxp-ink); font-size: 15px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qxp-ins-class { flex: none; color: var(--qxp-muted); font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.qxp-ins-price { margin: 0; color: var(--qxp-hi); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qxp-ins-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 2px; padding-top: 8px; border-top: 1px solid var(--qxp-line); }
.qxp-ins-fig { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.qxp-ins-fig-l { color: var(--qxp-muted); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; }
.qxp-ins-fig-v { color: var(--qxp-body); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qxp-ins-line { color: var(--qxp-muted); font-size: 12px; }

/* ── the chart (objects/market.chart.json) — closes as bars, option 1 ───────────────────*/
.qxc { width: min(100%, 720px); border: 1px solid var(--qxp-line); border-radius: 10px; background: var(--qxp-bg-2);
  font-family: var(--qxp-ui); font-variant-numeric: tabular-nums; }
/* Placement on the object's root, as for the ticker above. */
.qxp-chart { box-sizing: border-box; width: min(760px, 100% - 36px); margin: 0 auto 30px; padding: 0; }
.qxc-panel { padding: 14px 18px 12px; }
.qxc-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 10px; }
.qxc-label { color: var(--qxp-muted); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.qxc-last { color: var(--qxp-ink); font-size: 20px; font-weight: 700; }
.qxc-span { color: var(--qxp-muted); font-size: 12px; margin-left: auto; }
.qxc-chart { border-radius: 6px; border: 1px solid var(--qxp-line); overflow: hidden; }
/* The original bar chart (market.chart.classic): the engine's `chart` block inside a repeater row. */
.qxc-rows { display: block; }
.qxc .qx-chart { height: 11rem; gap: 3px; border-bottom: 1px solid var(--qxp-line); }
.qxc .qx-chart__bar { border-radius: 2px 2px 0 0; min-height: 2px; background: var(--qxp-mid); }
.qxc .qx-chart__label { color: var(--qxp-muted); font-size: 10px; margin-top: 4px; white-space: nowrap; overflow: hidden; }
.qxc-foot { color: var(--qxp-muted); font-size: 11px; margin-top: 8px; }

/* ── /dev/charts — the charting demo (hand-authored page) ────────────────────────────────*/
.qxd-hero { padding: 40px 0 10px; }
.qxd-h1 { color: var(--qxp-ink); font-size: 40px; font-weight: 800; letter-spacing: -.01em; margin: 6px 0 0; }
.qxd-lede { color: var(--qxp-body); max-width: 640px; margin: 18px 0 0; font-size: 16px; line-height: 1.6; }
.qxd-lede b { color: var(--qxp-ink); }
.qxd-sec { padding: 34px 0 6px; }
.qxd-h2 { color: var(--qxp-ink); font-size: 24px; font-weight: 700; margin: 4px 0 0; }
.qxd-h3 { color: var(--qxp-ink); font-size: 16px; font-weight: 600; margin: 0; }
.qxd-tag { color: var(--qxp-muted); font-size: 12px; font-weight: 500; letter-spacing: .04em; margin-left: 8px;
  padding: 2px 8px; border: 1px solid var(--qxp-line); border-radius: 999px; white-space: nowrap; }
.qxd-note { color: var(--qxp-body); max-width: 620px; margin: 10px 0 0; font-size: 14px; line-height: 1.6; }
.qxd-note code { color: var(--qxp-hi); font-family: ui-monospace, monospace; font-size: 12.5px; }
.qxd-link { color: var(--qxp-hi); text-decoration: none; border-bottom: 1px solid var(--qxp-line); }
.qxd-cap { padding: 20px 0 8px; }
.qxd-card, .qxd-chart { display: block; width: min(100%, 720px); margin: 0 auto; }
.qxd-card { border: 1px solid var(--qxp-line); border-radius: 10px; background: var(--qxp-bg-2); padding: 16px 18px; }
.qxd-gaps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; max-width: 620px; margin: 18px 0 0; }
.qxd-gap { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border: 1px dashed var(--qxp-line);
  border-radius: 10px; color: var(--qxp-muted); font-size: 14px; background: var(--qxp-bg-2); }
.qxd-gap-ico { color: var(--qxp-mid); font-size: 18px; }
@media (min-width: 620px) { .qxd-h1 { font-size: 52px; } }

/* ── the books shelf (NOTEBOARD B30) — generated pages /books and /books/:slug ── */
.qxs-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); gap: 1.4rem; }
.qxs-book { background: var(--qxp-bg-2); border: 1px solid var(--qxp-line); border-radius: 12px; overflow: hidden;
  box-shadow: var(--qxp-shadow); transition: border-color .15s ease, transform .15s ease; }
.qxs-book:hover { border-color: var(--qxp-line-2); transform: translateY(-2px); }
.qxs-book-coverlink { display: block; background: var(--qxp-bg-3); }
.qxs-book-cover { width: 100%; height: 190px; object-fit: contain; padding: 14px 14px 6px; }
.qxs-book-body { padding: 0 16px 16px; }
.qxs-book-by { margin: 0; color: var(--qxp-hi); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.qxs-book-namelink { text-decoration: none; }
.qxs-book-name { margin: 0; color: var(--qxp-ink); font-size: 18px; line-height: 1.2; font-weight: 650; }
.qxs-book-namelink:hover .qxs-book-name { color: var(--qxp-hi); }
.qxs-book-blurb { margin: 0; color: var(--qxp-body); font-size: 13.5px; line-height: 1.5; white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
/* the Amazon link on a book card: a compact button, not the hero's size — Graham 2026-10-12 "good but too big" */
.qxs-book-cta { margin-top: 2px; align-self: start; padding: 6px 12px; font-size: 12.5px; border-radius: 7px; }

.qxs-disclosure { margin: 0; color: var(--qxp-muted); font-size: 12.5px; }

/* one book, opened */
.qxs-detail { padding-top: 40px; padding-bottom: 48px; }
.qxs-detail-crumb { display: inline-block; margin-bottom: 20px; color: var(--qxp-muted); font-size: 13px;
  text-transform: uppercase; letter-spacing: .05em; text-decoration: none; }
.qxs-detail-crumb::before { content: "\2190\00a0"; }
.qxs-detail-crumb:hover { color: var(--qxp-hi); }
.qxs-detail-grid { display: grid; grid-template-columns: 240px 1fr; gap: 36px; align-items: start; }
.qxs-detail-cover { width: 100%; aspect-ratio: 2 / 3; object-fit: contain; background: var(--qxp-bg-2);
  border: 1px solid var(--qxp-line); border-radius: 12px; padding: 16px; }
.qxs-detail-main { min-width: 0; }
.qxs-detail-by { margin: 0; color: var(--qxp-hi); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.qxs-detail-name { margin: 0; color: var(--qxp-ink); font-size: 30px; line-height: 1.1; font-weight: 700; }
.qxs-detail-blurb { margin: 8px 0 4px; color: var(--qxp-body); font-size: 16px; line-height: 1.65; white-space: pre-line; max-width: 60ch; }
.qxs-detail-cta { align-self: start; margin-top: 4px; padding: 8px 14px; font-size: 13px; }
@media (max-width: 560px) {
  .qxs-detail-grid { grid-template-columns: 1fr; gap: 22px; }
  .qxs-detail-cover { max-width: 200px; }
}

/* ── /dev/signals — auto-trading signals & factors ──────────────────────────────────────*/
.qxs-grid, .qxs-rules, .qxs-demo { display: block; width: min(100%, 820px); margin: 0 auto; }
.qxs-card { border: 1px solid var(--qxp-line); border-radius: 10px; background: var(--qxp-bg-2); padding: 14px 16px; margin: 0 0 10px; }
.qxs-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.qxs-name { color: var(--qxp-ink); font-weight: 700; font-size: 15px; }
.qxs-type { color: var(--qxp-hi); font-family: ui-monospace, monospace; font-size: 12px; }
.qxs-what { color: var(--qxp-body); font-size: 13.5px; line-height: 1.55; margin: 6px 0 0; }
.qxs-meta { color: var(--qxp-muted); font-size: 11.5px; font-family: ui-monospace, monospace; margin: 8px 0 0; }
.qxs-rule { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 9px 2px; border-top: 1px solid var(--qxp-line); align-items: baseline; }
.qxs-rule:first-child { border-top: 0; }
.qxs-op { color: var(--qxp-hi); font-family: ui-monospace, monospace; font-size: 13px; }
.qxs-rule-what { color: var(--qxp-body); font-size: 13.5px; }
.qxs-code { width: min(100%, 820px); margin: 14px auto 0; overflow-x: auto; background: #05080b; border: 1px solid var(--qxp-line);
  border-radius: 10px; padding: 16px; color: var(--qxp-body); font-family: ui-monospace, monospace; font-size: 12.5px; line-height: 1.5; }
.qxs-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--qxp-line); border: 1px solid var(--qxp-line); border-radius: 10px; overflow: hidden; }
.qxs-stat { background: var(--qxp-bg-2); padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.qxs-stat-label { color: var(--qxp-muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.qxs-stat-value { color: var(--qxp-ink); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.qxs-latest { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.qxs-lat { display: flex; gap: 6px; padding: 6px 10px; border: 1px solid var(--qxp-line); border-radius: 999px; background: var(--qxp-bg-2); font-size: 12.5px; }
.qxs-lat-name { color: var(--qxp-muted); font-family: ui-monospace, monospace; }
.qxs-lat-value { color: var(--qxp-ink); font-variant-numeric: tabular-nums; }
.qxd-foot2 { color: var(--qxp-muted); font-size: 12.5px; line-height: 1.6; border-top: 1px solid var(--qxp-line); padding-top: 16px; }
.qxd-wrap720 { width: min(100%, 820px); margin: 0 auto; }

/* ── /dev/signals wrappers (Bolt's trading pattern-candles work) ── */
.qxs-cat { display: flex; flex-direction: column; gap: 1rem; }
.qxs-subhead { margin: 1.5rem 0 .5rem; }

/* ── toolkit hub landing cards ── */
.qxt-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.qxt-card { background: var(--qxp-bg-2); border: 1px solid var(--qxp-line); border-radius: 12px; transition: border-color .15s ease, transform .15s ease; }
.qxt-card:hover { border-color: var(--qxp-line-2); transform: translateY(-2px); }
.qxt-card a { display: block; padding: 20px; text-decoration: none; color: inherit; }
.qxt-card-name { margin: 0 0 .4rem; color: var(--qxp-ink); font-size: 20px; font-weight: 650; }
.qxt-card-text { margin: 0 0 .9rem; color: var(--qxp-body); font-size: 14.5px; line-height: 1.55; }
.qxt-card-go { color: var(--qxp-hi); font-size: 13px; font-weight: 600; letter-spacing: .02em; }

/* ── candlestick diagram on each pattern card ── */
.qxs-pat-svg { display: block; height: 72px; width: auto; margin: 2px 0 .7rem; }

/* ── products-hub gear shelves (search-link cards) ── */
.qxg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 1.2rem; }
.qxg-card { background: var(--qxp-bg-2); border: 1px solid var(--qxp-line); border-radius: 12px; padding: 18px; }
.qxg-card:hover { border-color: var(--qxp-line-2); }
.qxg-brand { margin: 0; color: var(--qxp-hi); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.qxg-name { margin: 0; color: var(--qxp-ink); font-size: 18px; line-height: 1.2; font-weight: 650; }
.qxg-note { margin: 0; color: var(--qxp-body); font-size: 14px; line-height: 1.55; }
.qxg-cta { align-self: start; margin-top: .3rem; }

/* ── learn glossary ── */
.qx-gloss { margin: 0; display: grid; gap: 0; }
.qx-gloss-row { display: grid; grid-template-columns: 220px 1fr; gap: 1rem; padding: .8rem 0; border-top: 1px solid var(--qxp-line); }
.qx-gloss-t { margin: 0; color: var(--qxp-ink); font-weight: 650; font-size: 15px; }
.qx-gloss-d { margin: 0; color: var(--qxp-body); font-size: 15px; line-height: 1.55; }
@media (max-width: 560px) { .qx-gloss-row { grid-template-columns: 1fr; gap: .2rem; } }

/* chart-pattern diagrams (KB "perfect example" vectors) — on white so the light-theme line colours read on any background */
.qxs-cp-thumb { background: #fff; border-radius: 8px; padding: 5px 6px; margin: 0 0 .7rem; }
.qxs-cp-thumb svg { width: 100%; height: auto; display: block; }
.qxs-cp-figure { max-width: 460px; margin: 0 auto; }
.qxs-cp-figure svg { width: 100%; height: auto; display: block; background: #fff; border-radius: 12px; }
.qxs-cp-figure figcaption { margin: .6rem 0 0; text-align: center; font-size: 13px; color: var(--qxp-muted, #94a3b8); }

/* config reference (R5) — grouped setting list */
.qxs-cf-list { display: flex; flex-direction: column; gap: .9rem; margin: .6rem 0 0; }
.qxs-cf-row { padding: 12px 14px; border: 1px solid var(--qxp-line); border-radius: 10px; background: var(--qxp-bg-2); }
.qxs-cf-k { display: flex; flex-flow: row wrap; align-items: baseline; gap: .5rem; }
.qxs-cf-k code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; color: var(--qxp-ink); }
.qxs-cf-t { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--qxp-hi); }
.qxs-cf-d { margin: .4rem 0 0; color: var(--qxp-body); font-size: 14px; }
.qxs-cf-g { margin: .4rem 0 0; padding: 7px 11px; border-left: 2px solid var(--qxp-hi); background: var(--qxp-bg-3); border-radius: 0 8px 8px 0; color: var(--qxp-body); font-size: 13px; }
.qxs-cf-m { margin: .4rem 0 0; color: var(--qxp-muted); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ── the host band: Quant, the iconkind trader, introducing the site, directly under the hero ──
 * Graham, 2026-10-12, wanting a clean look: ONE quiet surface — a panel a shade off the page ground,
 * a thin 1px border, curved corners, no accent bar and no shadow. Quant sits DIRECTLY on the panel
 * (no tile, no border, no glow ring around him). Phone-first — the figure above the text, the panel
 * self-guttered with min() so the text never touches the screen edge; from 620px the figure moves
 * beside it. The home band and the per-page .qxp-host-card are one family and share this treatment.
 * No raw hex — every colour is a --qxp-* token, same as the rest of the site. */
.qxp-host { box-sizing: border-box; width: min(760px, 100% - 36px); margin: 8px auto 0; padding: 22px 20px;
  background: var(--qxp-bg-2); border: 1px solid var(--qxp-line); border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.qxp-host-art { flex: none; width: 7.5rem; height: 7.5rem; display: grid; place-items: center; }
.qxp-host-fig { display: block; width: 100%; height: auto; }
.qxp-host-said { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.qxp-host-who { margin: 0; color: var(--qxp-hi); font-size: 11px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; }
.qxp-host-line { margin: 0; color: var(--qxp-body); font-size: clamp(1.05rem, 3vw, 1.25rem); line-height: 1.6; }
.qxp-host-badge { margin: 0; color: var(--qxp-muted); font-size: 10.5px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; }
.qxp-host-link { color: var(--qxp-hi); }   /* only present when the estate link-out switch is on */
@media (min-width: 620px) {
  .qxp-host { flex-direction: row; align-items: center; gap: 28px; text-align: left; padding: 26px 28px; }
  .qxp-host-art { width: 9rem; height: 9rem; }
  .qxp-host-said { align-items: flex-start; }
}

/* ── the per-page host CARD: Quant introducing each OTHER page, under its hero (task f8313c8d) ──
 * Graham, 2026-10-12, wanting a clean look ("too cluttered"): the SAME quiet treatment as the home
 * band above — one panel a shade off the ground, a thin 1px border, curved corners, no accent bar
 * and no shadow; Quant sits directly on the panel (no tile/border/glow) and a touch larger; the badge
 * is plain muted small-caps, not a pill. The two are one family: this is that band, card-sized, on
 * every other page. Phone-first; from 620px the figure sits beside the line. Tokens only. */
.qxp-host-card { box-sizing: border-box; width: min(760px, 100% - 36px); margin: 8px auto 0; padding: 22px 20px;
  background: var(--qxp-bg-2); border: 1px solid var(--qxp-line); border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.qxp-host-card-art { flex: none; width: 7.5rem; height: 7.5rem; display: grid; place-items: center; }
.qxp-host-card-fig { display: block; width: 100%; height: auto; }
.qxp-host-card-said { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.qxp-host-card-who { margin: 0; color: var(--qxp-hi); font-size: 11px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; }
.qxp-host-card-line { margin: 0; color: var(--qxp-body); font-size: clamp(1.05rem, 3vw, 1.25rem); line-height: 1.6; }
.qxp-host-card-badge { margin: 0; color: var(--qxp-muted); font-size: 10.5px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; }
.qxp-host-card-link { color: var(--qxp-hi); }   /* only present when the estate link-out switch is on */
@media (min-width: 620px) {
  .qxp-host-card { flex-direction: row; align-items: center; gap: 28px; text-align: left; padding: 26px 28px; }
  .qxp-host-card-art { width: 9rem; height: 9rem; }
  .qxp-host-card-said { align-items: flex-start; }
}

/* ── a sub-page's way around (Graham 2026-10-12): a small back arrow to the directory page in the hero
   strap, and at the foot small pills — one per sibling section, the current one filled ── */
.qxp-back { color: var(--qxp-muted); text-decoration: none; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.qxp-back:hover, .qxp-back:focus-visible { color: var(--qxp-hi); }
.qxp-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding-top: 22px; padding-bottom: 26px; }
.qxp-pill { display: inline-block; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--qxp-line-2); background: transparent;
  color: var(--qxp-body); font-size: 12.5px; font-weight: 500; line-height: 1.3; text-decoration: none; }
.qxp-pill:hover, .qxp-pill:focus-visible { color: var(--qxp-ink); border-color: var(--qxp-hi); }
.qxp-pill-on { color: var(--qxp-bg); background: var(--qxp-mid); border-color: var(--qxp-mid); }

/* ── the public Top 5 panel (objects/scan.top5.json) — the bar stated per card, the scan date, never a silent blank ─*/
.qxp-scan-status { margin: 0 0 .5rem; color: var(--qxp-ink); font-size: 15px; font-weight: 600; }
.qxp-scan-asof { margin: 0 0 1.1rem; }
.qxp-scan-verdict { color: var(--qxp-ink); font-weight: 600; }

/* ═══ Disappointing Returns (task 1a511f25): static backtest charts, trade tables, stat + strategy cards.
   The SVG carries qxr- classes only (no inline colour); strokes/fills resolve from the palette here. ═══ */
.qxr-figure { margin: 0 0 20px; }

/* ── buy-&-hold toggle (pure CSS, SSR-safe): a visually-hidden checkbox + a label switch.
   DEFAULT checked (the line shows on load). The ~-combinator keeps each figure's toggle to its
   OWN chart — input, .qxr-svg and figcaption are siblings inside one .qxr-chart, so a toggle can
   only reach its own chart's .qxr-bh-group. The switch echoes the line's ink colour when on. ── */
.qxr-chart { position: relative; }
.qxr-bh-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.qxr-bh-switch { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 12px; cursor: pointer;
  color: var(--qxp-muted); font-size: 13px; font-weight: 500; user-select: none; }
.qxr-bh-switch-box { position: relative; flex: none; width: 34px; height: 18px; border-radius: 999px;
  border: 1px solid var(--qxp-line-2); background: var(--qxp-bg-3);
  transition: background-color .15s ease, border-color .15s ease; }
.qxr-bh-switch-box::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--qxp-muted); transition: transform .15s ease, background-color .15s ease; }
.qxr-bh-toggle:checked + .qxr-bh-switch { color: var(--qxp-body); }
.qxr-bh-toggle:checked + .qxr-bh-switch .qxr-bh-switch-box { border-color: var(--qxp-ink); background: var(--qxp-line-2); }
.qxr-bh-toggle:checked + .qxr-bh-switch .qxr-bh-switch-box::after { transform: translateX(16px); background: var(--qxp-ink); }
.qxr-bh-toggle:focus-visible + .qxr-bh-switch .qxr-bh-switch-box { outline: 2px solid var(--qxp-hi); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .qxr-bh-switch-box, .qxr-bh-switch-box::after { transition: none; } }
/* unticked → hide the B&H line (its group in the svg) and its legend key, scoped to this chart */
.qxr-chart .qxr-bh-toggle:not(:checked) ~ .qxr-svg .qxr-bh-group { display: none; }
.qxr-chart .qxr-bh-toggle:not(:checked) ~ figcaption .qxr-legend-bh { display: none; }

.qxr-svg { display: block; width: 100%; height: auto; background: var(--qxp-bg-2); border: 1px solid var(--qxp-line); border-radius: 10px; }
.qxr-bg { fill: transparent; }
.qxr-grid { stroke: var(--qxp-line); stroke-width: 1; }
.qxr-base { stroke: var(--qxp-line-2); stroke-width: 1; stroke-dasharray: 2 4; }
.qxr-ylab { fill: var(--qxp-muted); font: 11px/1 Inter, sans-serif; text-anchor: end; }
.qxr-xlab { fill: var(--qxp-muted); font: 11px/1 Inter, sans-serif; text-anchor: start; }
.qxr-xlab-end { text-anchor: end; }
.qxr-eq { stroke: var(--qxp-hi); stroke-width: 2; stroke-linejoin: round; }
.qxr-bh { stroke: var(--qxp-ink); stroke-width: 2; }                            /* buy & hold: a SOLID WHITE line — the reality check */
.qxr-buy { fill: var(--qxp-hi); stroke: var(--qxp-bg); stroke-width: .75; }     /* buy: green up-triangle */
.qxr-sell { fill: var(--qxp-down); stroke: var(--qxp-bg); stroke-width: .75; }  /* sell: red down-triangle */
.qxr-bh-end { fill: var(--qxp-ink); }
.qxr-bh-lab { fill: var(--qxp-muted); font: 11px/1 Inter, sans-serif; text-anchor: end; }
.qxr-legend { list-style: none; display: flex; flex-direction: column; gap: 7px; margin: 12px 0 0; padding: 0; font-size: 13px; color: var(--qxp-body); }
.qxr-legend li { display: flex; align-items: center; gap: 7px; }
.qxr-legend-trades { gap: 18px; }                                              /* buy + sell share their own line */
.qxr-legend-pair { display: inline-flex; align-items: center; gap: 7px; }
.qxr-key { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.qxr-key-eq { background: var(--qxp-hi); }
.qxr-key-buy { width: 0; height: 0; background: none; border-radius: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 8px solid var(--qxp-hi); }
.qxr-key-sell { width: 0; height: 0; background: none; border-radius: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 8px solid var(--qxp-down); }
.qxr-key-bh { background: var(--qxp-ink); height: 3px; }
.qxr-pos { color: var(--qxp-hi); }
.qxr-neg { color: var(--qxp-down); }
.qxr-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--qxp-line); border: 1px solid var(--qxp-line); border-radius: 10px; overflow: hidden; margin: 0 0 20px; }
.qxr-stat { background: var(--qxp-bg-2); padding: 12px 14px; }
.qxr-stat dt { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--qxp-muted); margin: 0; }
.qxr-stat dd { margin: 4px 0 0; font-size: 20px; font-weight: 600; color: var(--qxp-ink); font-variant-numeric: tabular-nums; }
.qxr-stat dd.qxr-big { font-size: 24px; }
.qxr-tablewrap { overflow-x: auto; border: 1px solid var(--qxp-line); border-radius: 10px; }
.qxr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.qxr-table caption { caption-side: top; text-align: left; padding: 12px 14px; color: var(--qxp-muted); font-size: 13px; }
.qxr-table th, .qxr-table td { padding: 8px 12px; border-top: 1px solid var(--qxp-line); text-align: left; white-space: nowrap; }
.qxr-table thead th { color: var(--qxp-muted); font-weight: 500; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; border-top: none; }
.qxr-table .qxr-num { text-align: right; font-variant-numeric: tabular-nums; }
.qxr-cards { gap: 14px; }
.qxr-card a, a.qxr-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; height: 100%; }
/* The catalogue's filter bar (2026-10-18) — every link is a pretty URL (/returns/market/…) that re-runs the same
   query narrowed; the engine marks the current one with aria-current. Rows of pills under a small label. */
.qxr-count { margin: 10px 0 0; font-size: 13px; color: var(--qxp-muted); font-variant-numeric: tabular-nums; }
.qxr-filters { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 0; }
.qxr-filter-group { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; }   /* row: the engine's .qx-container is a column, which centred the label */
.qxr-filter-label { flex: 0 0 100%; color: var(--qxp-muted); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.qxr-filter-links { flex-wrap: wrap; }
.qxr-filter-link { display: inline-block; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--qxp-line-2); background: transparent;
  color: var(--qxp-body); font-size: 12.5px; font-weight: 500; line-height: 1.3; text-decoration: none; }
.qxr-filter-link:hover, .qxr-filter-link:focus-visible { color: var(--qxp-ink); border-color: var(--qxp-hi); }
.qxr-filter-link[aria-current="page"] { color: var(--qxp-bg); background: var(--qxp-mid); border-color: var(--qxp-mid); }
@media (min-width: 760px) { .qxr-filter-label { flex: 0 0 auto; min-width: 86px; } }
/* A Top-5 card's way into the library: the whole-window backtest of that ticker (objects/scan.top5.json). */
.qxp-scan-link { display: inline-block; margin: 10px 0 0; color: var(--qxp-hi); font-size: 12.5px; font-weight: 600; text-decoration: none; }
.qxp-scan-link:hover, .qxp-scan-link:focus-visible { text-decoration: underline; }
.qxr-card-name { font-size: 18px; font-weight: 600; color: var(--qxp-ink); }
.qxr-card-line { font-size: 15px; color: var(--qxp-body); }
.qxr-card-line b { font-size: 18px; font-variant-numeric: tabular-nums; }
.qxr-vs { color: var(--qxp-muted); }
.qxr-card-market { font-size: 12px; color: var(--qxp-muted); }
.qxr-verdict { font-weight: 600; color: var(--qxp-ink); }
@media (min-width: 760px) { .qxr-stats { grid-template-columns: repeat(5, 1fr); } }

/* Head-to-head table (strategy vs buy & hold) + the strategy-only grid — returns pages, 2026-10-17.
   The three measures that compare like-with-like sit in the table; the strategy's own facts sit apart. */
.qxr-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* The summary card — start, end, period, return (Graham 2026-10-19: the v1 stake pill was out of proportion;
   "a rounded rectangle … containing start amount, end, period, percentage"). Four equal cells: 2×2 on a phone,
   one row from 640px. A modest radius, not a pill, so it reads as a panel of figures rather than a button. */
.qxr-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0 0 18px; padding: 0;
  border: 1.5px solid var(--qxp-hi); border-radius: 14px; overflow: hidden; background: var(--qxp-line); }
.qxr-sum { margin: 0; padding: 12px 14px 13px; background: var(--qxp-bg-2); min-width: 0; }
.qxr-sum dt { margin: 0 0 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--qxp-hi); }
.qxr-sum dd { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.1; color: var(--qxp-ink); font-variant-numeric: tabular-nums; }
.qxr-sum dd.qxr-pos { color: var(--qxp-hi); }
.qxr-sum dd.qxr-neg { color: var(--qxp-down); }
.qxr-sum-sub { display: block; margin-top: 4px; font-size: 11.5px; font-weight: 500; line-height: 1.3; color: var(--qxp-muted); }
@media (min-width: 640px) { .qxr-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); } .qxr-sum { padding: 14px 18px 15px; } .qxr-sum dd { font-size: 26px; } }
/* The catalogue's three shelves — All backtests · Best results · Disappointing — tabs with live counts; the
   current one carries aria-current (written by tools/export-return.mjs into data/return-section/<key>.json). */
.qxr-shelves { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 12px 0 0; }
.qxr-shelf { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px 6px; border-radius: 10px;
  border: 1px solid var(--qxp-line-2); color: var(--qxp-body); font-size: 13.5px; font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none; }
@media (min-width: 560px) { .qxr-shelves { display: flex; flex-wrap: wrap; } .qxr-shelf { flex-direction: row; align-items: baseline; gap: 6px; padding: 7px 14px; font-size: 14px; } }
.qxr-shelf:hover, .qxr-shelf:focus-visible { color: var(--qxp-ink); border-color: var(--qxp-hi); }
.qxr-shelf[aria-current="page"] { color: var(--qxp-bg); background: var(--qxp-hi); border-color: var(--qxp-hi); }
.qxr-shelf-n { font-size: 12px; font-weight: 500; opacity: .8; font-variant-numeric: tabular-nums; }
.qxr-compare { width: 100%; border-collapse: collapse; margin: 0 0 12px; border: 1px solid var(--qxp-line); border-radius: 10px; overflow: hidden; font-variant-numeric: tabular-nums; }
.qxr-compare th, .qxr-compare td { padding: 11px 12px; border-top: 1px solid var(--qxp-line); text-align: right; vertical-align: baseline; }
.qxr-compare thead th { border-top: none; background: var(--qxp-bg-2); color: var(--qxp-muted); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.qxr-compare tbody th { text-align: left; font-weight: 500; font-size: 14px; color: var(--qxp-body); }
.qxr-compare tbody td { font-size: 18px; font-weight: 700; color: var(--qxp-ink); white-space: nowrap; }
.qxr-compare .qxr-pos { color: var(--qxp-hi); }
.qxr-compare .qxr-neg { color: var(--qxp-down); }
.qxr-gloss { display: block; margin-top: 2px; font-size: 11px; font-weight: 400; color: var(--qxp-muted); }
.qxr-sub { display: block; margin-top: 3px; font-size: 12px; font-weight: 500; color: var(--qxp-muted); }
.qxr-grid-cap { margin: 0 0 8px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--qxp-muted); }
.qxr-stats-solo { margin-bottom: 20px; }
/* The "steady rate" grid — one row, its own tinted panel so it reads as a derived equivalent, set
   apart from the raw head-to-head above. Shares the compare table's cell rhythm and number styling. */
.qxr-rate { width: 100%; border-collapse: collapse; margin: 0 0 20px; border: 1px solid var(--qxp-line); border-left: 3px solid var(--qxp-muted); border-radius: 10px; overflow: hidden; background: var(--qxp-bg-2); font-variant-numeric: tabular-nums; }
.qxr-rate th, .qxr-rate td { padding: 11px 12px; text-align: right; vertical-align: baseline; }
.qxr-rate thead th { color: var(--qxp-muted); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.qxr-rate tbody th { text-align: left; font-weight: 500; font-size: 14px; color: var(--qxp-body); border-top: 1px solid var(--qxp-line); }
.qxr-rate tbody td { font-size: 20px; font-weight: 700; color: var(--qxp-ink); white-space: nowrap; border-top: 1px solid var(--qxp-line); }
.qxr-rate .qxr-pos { color: var(--qxp-hi); }
.qxr-rate .qxr-neg { color: var(--qxp-down); }
@media (min-width: 760px) {
  .qxr-stats-solo { grid-template-columns: repeat(4, 1fr); }
  .qxr-compare tbody td { font-size: 22px; }
  .qxr-compare th, .qxr-compare td { padding: 13px 16px; }
  .qxr-rate tbody td { font-size: 24px; }
  .qxr-rate th, .qxr-rate td { padding: 13px 16px; }
}

/* ── KNOWLEDGE (2026-10-19) — one knowledge base, front and back: /knowledge, /knowledge/group/:group,
   /knowledge/:slug (records snapshotted from the trading API's KB by tools/fetch-knowledge.mjs). ── */
a.qxk-strap { display: block; text-decoration: none; }
a.qxk-strap:hover, a.qxk-strap:focus-visible { text-decoration: underline; }
.qxk-prose { max-width: 68ch; }
.qxk-prose h2 { margin: 28px 0 10px; color: var(--qxp-ink); font-size: 20px; font-weight: 600; line-height: 1.25; }
.qxk-prose h2:first-child { margin-top: 0; }
.qxk-prose ul, .qxk-prose ol { margin: 0 0 14px; padding-left: 1.3em; }
.qxk-prose li { margin: 0 0 8px; }
.qxk-prose strong { color: var(--qxp-ink); }
.qxk-prose code { font-size: .92em; padding: 1px 5px; border-radius: 5px; background: var(--qxp-bg-3); }
.qxk-figure { max-width: 460px; margin: 0 0 24px; }
.qxk-figure svg, .qxk-card-figure svg { display: block; width: 100%; height: auto; border-radius: 12px; background: var(--qxp-ink); }
.qxk-tests { margin: 30px 0 0; padding: 18px 0 0; border-top: 1px solid var(--qxp-line); }
.qxk-test-list { display: grid; gap: 10px; margin: 10px 0 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .qxk-test-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.qxk-test { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 12px 14px; border: 1px solid var(--qxp-line); border-radius: 12px;
  background: var(--qxp-bg-2); color: inherit; text-decoration: none; }
.qxk-test:hover, .qxk-test:focus-visible { border-color: var(--qxp-hi); }
.qxk-test-name { color: var(--qxp-ink); font-size: 15px; font-weight: 600; }
.qxk-test-line { font-size: 14px; color: var(--qxp-body); }
.qxk-test-line b { font-variant-numeric: tabular-nums; }
.qxk-test-meta { font-size: 12px; color: var(--qxp-muted); }
.qxk-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 22px 0 0; padding: 0; list-style: none; }
.qxk-tags li { padding: 3px 10px; border: 1px solid var(--qxp-line-2); border-radius: 999px; color: var(--qxp-muted); font-size: 12px; }
/* group page: cards with the diagram on top — a group of chart patterns is a page of charts */
.qxk-cards > * { flex: 0 0 100%; min-width: 0; box-sizing: border-box; }   /* row layout (wraps); the card width is set here */
@media (min-width: 620px) { .qxk-cards > * { flex-basis: calc((100% - 14px) / 2); } }
@media (min-width: 980px) { .qxk-cards > * { flex-basis: calc((100% - 28px) / 3); } }
a.qxk-card { display: flex; flex-direction: column; gap: 6px; height: 100%; color: inherit; text-decoration: none; }
a.qxk-card:hover, a.qxk-card:focus-visible { border-color: var(--qxp-hi); }
.qxk-card-figure { margin: 0 0 6px; }
.qxk-card-name { color: var(--qxp-ink); font-size: 17px; font-weight: 600; }
.qxk-card-sum { color: var(--qxp-body); font-size: 14px; line-height: 1.5; }
.qxk-card-meta { color: var(--qxp-muted); font-size: 12px; }
/* landing: one card per group, its articles listed */
.qxk-groups { gap: 14px; }
.qxk-group { display: flex; flex-direction: column; gap: 8px; }
a.qxk-group-name { color: var(--qxp-ink); font-size: 19px; font-weight: 600; text-decoration: none; }
a.qxk-group-name:hover, a.qxk-group-name:focus-visible { color: var(--qxp-hi); }
.qxk-group-blurb { margin: 0; color: var(--qxp-body); font-size: 14px; }
.qxk-links { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.qxk-links a { display: block; padding: 5px 0; color: var(--qxp-body); font-size: 14.5px; text-decoration: none; border-bottom: 1px solid var(--qxp-line); }
.qxk-links a:hover, .qxk-links a:focus-visible { color: var(--qxp-hi); }
a.qxk-group-all { margin-top: 4px; color: var(--qxp-hi); font-size: 13px; font-weight: 600; text-decoration: none; }
.qxk-refs { display: flex; flex-direction: column; gap: 8px; margin: 30px 0 0; }
a.qxk-ref { color: var(--qxp-body); font-size: 15px; text-decoration: none; }
a.qxk-ref:hover, a.qxk-ref:focus-visible { color: var(--qxp-hi); }
/* a backtest's "Understand the strategy" panel — the knowledge articles behind the rule */
.qxr-learn { display: flex; flex-direction: column; gap: 8px; max-width: 62ch; margin: 22px 0 0; }
.qxr-learn-link { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--qxp-line-2); border-left: 3px solid var(--qxp-hi);
  border-radius: 10px; background: var(--qxp-bg-2); color: inherit; text-decoration: none; }
.qxr-learn-link:hover, .qxr-learn-link:focus-visible { border-color: var(--qxp-hi); }
.qxr-learn-title { color: var(--qxp-ink); font-size: 15px; font-weight: 600; }
.qxr-learn-sum { color: var(--qxp-muted); font-size: 13px; line-height: 1.45; }

/* The share card (/dev/share-card, photographed to assets/share.png by tools/shoot-share-image.mjs): 1200 by
   630 in the shooter's 1300px viewport (fluid below it, so a phone opening the dev page does not scroll sideways), the hero's brand sheet set larger on the ground colour with the hero's glow. */
.qxp-share { box-sizing: border-box; width: 100%; max-width: 1200px; aspect-ratio: 1200 / 630; display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: radial-gradient(70% 60% at 50% 0%, var(--qxp-glow), transparent 70%), var(--qxp-bg); }
.qxp-share-in { width: 100%; max-width: 1000px; }
.qxp-share .qxp-hero-mark { width: 124px; height: 124px; }
.qxp-share .qxp-hero-head { font-size: 76px; }
.qxp-share .qxp-strap { font-size: 16px; }
.qxp-share .qxp-values { font-size: 15px; }
.qxp-share .qxp-hero-lede { max-width: 960px; font-size: 22px; line-height: 1.45; }

/* ── THE DOOR — GENERATED by tools/build-qx-doors.mjs and appended to the parent's stylesheet. ──
   Only what a door has and the public site has not: its name beside the wordmark, and the
   parent's clothes for the ENGINE's sign-in form (auth.login) and account menu
   (auth.account-menu). Every colour is the parent's token. */
.qxd-tag { margin-left: 2px; padding: 2px 8px; border: 1px solid var(--qxp-line-2); border-radius: 999px;
  color: var(--qxp-hi); font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.qxp-top .qx-link.qxp-brand { min-height: 44px; }
/* The bar's row is a block of its own here (a V5 container inside a V5 container), so it is told
   to take the width the parent's bar has: the brand at one end, the account at the other. */
.qxp-top > .qxp-top-inner { width: 100%; }
.qxp-brand .qx-html-content { display: block; }
.qxp-brand .qx-html-content.qxp-brand-mark { line-height: 0; }

/* the account menu, where the parent's nav is */
.qxp-nav .auth-whoami-name { margin: 0; color: var(--qxp-muted); font-size: 13px; max-width: 34vw; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.qxp-nav .auth-logout, .qxp-nav .qx-link.auth-signin-link, .qxp-nav .qx-link.qxd-public { display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 12px; border-radius: 9px; font: inherit; font-size: 14px; text-decoration: none; color: var(--qxp-body); }
.qxp-nav .auth-logout { border: 1px solid var(--qxp-line-2); background: transparent; color: var(--qxp-ink); cursor: pointer; }
.qxp-nav .auth-logout:hover, .qxp-nav .auth-logout:focus-visible,
.qxp-nav .qx-link.auth-signin-link:hover, .qxp-nav .qx-link.qxd-public:hover { background: var(--qxp-bg-3); color: var(--qxp-ink); }
/* A phone has room for the mark, the name and the way out. Who is signed in is said on the page. */
@media (max-width: 640px) {
  .qxp-nav .auth-whoami-name, .qxp-nav .qx-link.qxd-public { display: none; }
}

/* the panel a door's page is, and the sign-in form in it */
.qxd-panel { max-width: 27rem; margin: 0 auto; padding: 46px 18px 64px; }
.qxd-small { margin: 18px 0 0; color: var(--qxp-muted); font-size: 13px; }
.qxd-panel .auth-login, .qxd-panel .auth-register, .qxd-panel .auth-recovery { margin: 26px 0 0; }
.qxd-panel .auth-login > .qx-heading, .qxd-panel .auth-register > .qx-heading, .qxd-panel .auth-recovery > .qx-heading { margin: 0 0 4px; color: var(--qxp-ink); font-size: 18px; font-weight: 600; }
.qxd-panel .auth-recovery > .qx-heading ~ .qx-heading { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--qxp-line); align-self: stretch; }
.qxd-panel .qx-text.auth-forgot-status, .qxd-panel .qx-text.auth-reset-status { align-self: stretch; margin: 0; min-height: 1.4em; color: var(--qxp-ink) !important; font-size: 14px; }
/* said once, when it is true: the email was confirmed, or the link was no longer good */
.qxd-note { margin: 18px 0 0; padding: 10px 14px; border: 1px solid var(--qxp-line-2); border-left: 3px solid var(--qxp-hi); border-radius: 9px; color: var(--qxp-ink); font-size: 14px; }
/* what the register form asks for, said before it is asked */
.qxd-panel .auth-register > .qx-text { margin: 0; color: var(--qxp-body) !important; font-size: 14px; line-height: 1.5; }
.qxd-panel .qx-link.qxd-link { display: inline-flex; align-items: center; min-height: 44px; margin: 8px 0 0; color: var(--qxp-hi); font-size: 14px; }
.qxd-panel .qx-link.qxd-link:hover, .qxd-panel .qx-link.qxd-link:focus-visible { color: var(--qxp-ink); }
.qxd-panel .qx-form { align-self: stretch; display: grid; gap: 14px; }
.qxd-panel .qx-form__row { display: grid; gap: 6px; }
.qxd-panel .qx-form__label { color: var(--qxp-body); font-size: 13px; font-weight: 500; }
.qxd-panel .qx-form__required { color: var(--qxp-muted); }
.qxd-panel .qx-form__field { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid var(--qxp-line-2); border-radius: 9px;
  background: var(--qxp-bg-2); color: var(--qxp-ink); font: inherit; font-size: 16px; }
.qxd-panel .qx-form__field:focus-visible { outline: 2px solid var(--qxp-hi); outline-offset: 1px; }
.qxd-panel .qx-form__field-error, .qxd-panel .qx-form__errors { color: var(--qxp-down); font-size: 13px; }
.qxd-panel .qx-form__field-error:empty { display: none; }
.qxd-panel .qx-form__submit { width: 100%; min-height: 46px; border: 1px solid var(--qxp-mid); border-radius: 9px; background: var(--qxp-mid);
  color: var(--qxp-ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.qxd-panel .qx-form__submit:hover, .qxd-panel .qx-form__submit:focus-visible { background: var(--qxp-hi); color: var(--qxp-bg); }
.qxd-panel .qx-form__submit[disabled] { opacity: .6; cursor: progress; }
/* The engine's error line reads "⚠ " before anything has gone wrong: its format wraps an empty
   value (asked of the engine, NOTEBOARD C65). The sign is taken off here, so an empty line is an
   empty line — it keeps its height, and the form does not jump when the words arrive. */
.qxd-panel .qx-text.auth-error, .qxd-panel .auth-register > .qx-text.auth-reg-error { align-self: stretch; margin: 0; min-height: 1.4em; color: var(--qxp-down) !important; font-size: 14px; line-height: 1.4; }
.qxd-panel .qx-text.auth-error::first-letter, .qxd-panel .qx-text.auth-reg-error::first-letter { font-size: 0; }

/* ── top menu (iconkind format) in the header bar: the menu host, the auth cluster ── */
/* every tap in the bar and the panel is a 44px target on a phone (the public site's 2.5rem button and
   1rem links fall short at a 16px base; the gate's phone check counts them) */
.qxp-menu-button, .qxp-action { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
.qxp-menu-link { display: flex; align-items: center; min-height: 44px; }
/* a menu group (its heading and links) is a block of its own, so a group hidden by grant takes its gap with it */
.qxp-menu-group { display: block; min-width: 0; }
/* THE OPEN MENU FITS THE SCREEN (Graham 2026-10-29: admin.iconkind's menu "flows off the bottom of a desktop screen"). It is
   never taller than the viewport below the bar: it scrolls inside itself. CSS does not know the bar's height, so the cap leaves
   room for the tallest bar a door draws (a phone bar whose nav wraps stands 7.3rem); tools/check-door-menus.mjs opens every
   door's menu at 1280x720, 1366x768 and a phone and fails one that runs past the screen. On a desktop the groups flow into as
   many columns as fit, so a short menu is one row; a phone keeps the public site's two columns. */
.qxp-menu-panel { max-height: calc(100vh - 8rem); max-height: calc(100dvh - 8rem); overflow-y: auto; overscroll-behavior: contain; }
@media (min-width: 46.01rem) { .qxp-menu-panel { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); } }
/* the Menu button as a block (task 7bfc836e): a <summary> text block, its word kept for a screen reader but not drawn,
   and the public site's three-line / cross icon drawn by the summary itself (no inner span to hang it on) */
.qxp-menu-button.qx-text { position: relative; font-size: 0; color: var(--qxp-ink); cursor: pointer; }
.qxp-menu-button.qx-text::before, .qxp-menu-button.qx-text::after { content: ""; position: absolute; left: 50%; top: 50%; width: 1.15rem; }
.qxp-menu-button.qx-text::before { height: .55rem; border-top: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: translate(-50%, -50%); }
.qxp-menu-button.qx-text::after { display: none; }
.qxp-menu[open] .qxp-menu-button.qx-text::before { height: 0; border-bottom: 0; transform: translate(-50%, -50%) rotate(45deg); }
.qxp-menu[open] .qxp-menu-button.qx-text::after { display: block; border-top: 1.6px solid currentColor; transform: translate(-50%, -50%) rotate(-45deg); }
.qxp-topright > .qx-html-content { display: inline-flex; align-items: center; }
.qxp-topright > .qxp-nav { margin-left: 0; overflow: visible; }
/* The signed-in user: a person icon in the bar (reuses .qxp-action's framed box), tapped to drop a
   small panel with the email + Sign out. The panel anchors to the icon and dismisses with Close. */
.qxp-user { position: relative; display: inline-flex; }
.qxp-user-btn { cursor: pointer; }
.qxp-user-panel { position: absolute; right: 0; top: calc(100% + .5rem); z-index: 30; min-width: 14rem;
  display: flex; flex-direction: column; gap: .7rem; padding: .9rem 1rem 1rem;
  background: var(--qxp-bg-2); border: 1px solid var(--qxp-line-2); border-radius: 12px;
  box-shadow: 0 .5rem 1.4rem rgba(0,0,0,.28); }
.qxp-user-who { margin: 0; color: var(--qxp-muted); font-size: 13px; line-height: 1.4; word-break: break-all;
  padding-bottom: .7rem; border-bottom: 1px solid var(--qxp-line); }
.qxp-user-logout { width: 100%; min-height: 40px; border: 1px solid var(--qxp-line-2); border-radius: 9px;
  background: transparent; color: var(--qxp-ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.qxp-user-logout:hover, .qxp-user-logout:focus-visible { border-color: var(--qxp-hi); background: var(--qxp-bg-3); }
.qxp-user-dismiss { align-self: center; border: 0; background: transparent; color: var(--qxp-muted); font: inherit;
  font-size: 12px; letter-spacing: .04em; cursor: pointer; padding: .2rem .4rem; }
.qxp-user-dismiss:hover, .qxp-user-dismiss:focus-visible { color: var(--qxp-ink); }

/* ── the private trading pages (watchlists, portfolios) ── */
.qxa-trade { padding: 1.5rem 0 3rem; display: flex; flex-direction: column; gap: 1.1rem; }
/* These are dense app pages, not marketing sections: drop the big .qxp-section top padding (42-58px)
   and its divider under the header (the bar already has its own bottom border). The .qxa-trade wrap's
   own 1.5rem is the only top gap — the title sits close under the bar, no wasted real estate. */
.qxp-section:has(> .qxa-trade) { padding-top: 0; border-top: 0; }
/* /buckets: the two manage actions (create + fund) as link-buttons to their own pages */
.qxa-manage { display: flex; flex-flow: row wrap; gap: .7rem; margin-top: .5rem; }
.qx-link.qxa-linkbtn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 10px;
  border: 1px solid var(--qxp-line-2); background: var(--qxp-bg-2); color: var(--qxp-ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.qx-link.qxa-linkbtn:hover, .qx-link.qxa-linkbtn:focus-visible { border-color: var(--qxp-hi); background: var(--qxp-bg-3); }
.qx-link.qxa-linkbtn-go { border-color: var(--qxp-hi); color: var(--qxp-hi); }
.qx-link.qxa-linkbtn-go:hover, .qx-link.qxa-linkbtn-go:focus-visible { background: var(--qxp-bg-3); color: var(--qxp-ink); }
/* create page: the "bucket created" confirmation line + its inline link to the funding page */
.qxa-note-ok { margin-top: .2rem; padding: 10px 14px; border: 1px solid var(--qxp-line-2); border-left: 3px solid var(--qxp-hi); border-radius: 9px; color: var(--qxp-ink); font-size: 14px; }
.qx-link.qxa-inline-link { color: var(--qxp-hi); text-decoration: none; }
.qx-link.qxa-inline-link:hover, .qx-link.qxa-inline-link:focus-visible { color: var(--qxp-ink); }
/* the retired per-page nav row (the top menu replaced it) */
.qxa-navhidden { display: none; }
/* account home: entry cards */
.qxa-home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px,100%),1fr)); gap: .8rem; margin: 1.4rem 0 .4rem; }
.qx-link.qxa-home-card { display: flex; flex-direction: column; gap: .35rem; padding: 16px 18px; border: 1px solid var(--qxp-line-2); border-radius: 12px;
  background: var(--qxp-bg-2); text-decoration: none; }
.qx-link.qxa-home-card:hover, .qx-link.qxa-home-card:focus-visible { border-color: var(--qxp-hi); background: var(--qxp-bg-3); }
.qxa-home-card-title { color: var(--qxp-ink); font-size: 17px; font-weight: 650; }
.qxa-home-card-desc { color: var(--qxp-body); font-size: 13.5px; line-height: 1.45; }
/* sub-nav across the private pages */
.qxa-nav { display: flex; flex-direction: row; flex-wrap: wrap; gap: .4rem; margin: 0 0 .3rem; }
.qx-link.qxa-navlink { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 9px; border: 1px solid transparent;
  color: var(--qxp-body); font-size: 13.5px; text-decoration: none; }
.qx-link.qxa-navlink:hover, .qx-link.qxa-navlink:focus-visible { color: var(--qxp-ink); background: var(--qxp-bg-2); }
.qx-link.qxa-navlink-on { color: var(--qxp-ink); background: var(--qxp-bg-2); border-color: var(--qxp-line-2); box-shadow: inset 0 -2px 0 var(--qxp-hi); }
.qxa-navlink-t { white-space: nowrap; }
.qxa-pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px,100%),1fr)); gap: 1.1rem; }
.qxa-pf { background: color-mix(in srgb, var(--qxp-bg-3) 45%, var(--qxp-bg-2)); border: 1px solid var(--qxp-line-2); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: .45rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 28px -20px rgba(0, 0, 0, .85); }
.qxa-pf-name { margin: 0; color: var(--qxp-ink); font-size: 19px; font-weight: 650; }
.qxa-pf-head { display: flex; flex-flow: row wrap; align-items: baseline; gap: .5rem .7rem; }
.qxa-pf-badge { font-family: var(--qxp-ui); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--qxp-line-2); color: var(--qxp-muted); }
.qxa-badge-DEMO { color: var(--qxp-muted); border-color: var(--qxp-line-2); }
.qxa-badge-LIVE { color: var(--qxp-hi); border-color: var(--qxp-hi); background: color-mix(in srgb, var(--qxp-hi) 14%, transparent); }
.qxa-pf-foot { margin: .2rem 0 0; color: var(--qxp-muted); font-size: 12.5px; }
/* ── positions as cards (symbol + badge, portfolio·bucket, figures) ── */
.qxa-pos-list { display: flex; flex-direction: column; gap: 1rem; }
.qxa-poscard { border: 1px solid var(--qxp-line-2); border-radius: 14px; background: color-mix(in srgb, var(--qxp-bg-3) 45%, var(--qxp-bg-2)); padding: 14px 16px; display: flex; flex-direction: column; gap: .5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 28px -20px rgba(0, 0, 0, .85); }
.qxa-poscard-head { display: flex; flex-flow: row wrap; align-items: baseline; gap: .4rem .7rem; }
.qxa-card-del { margin-left: auto; align-self: center; }
.qxa-pos-sym { color: var(--qxp-ink); font-size: 17px; font-weight: 650; }
.qxa-pos-dir { color: var(--qxp-hi); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.qxa-pos-sub { color: var(--qxp-muted); font-size: 13px; }
.qxa-pos-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(110px, 100%), 1fr)); gap: .5rem; }
/* ── strategy detail: backtest wrapper (rule only) + discretionary note ── */
.qxa-btwrap { display: flex; flex-direction: column; gap: .6rem; }
.qxa-disc-note { border-left: 3px solid var(--qxp-hi); padding-left: 10px; }
.qxa-pf-venue { font-family: var(--qxp-ui); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--qxp-hi); }
.qxa-pf-status { margin: 0; color: var(--qxp-down); font-size: 13.5px; }
.qxa-pf-what { margin: 0; color: var(--qxp-body); font-size: 13.5px; line-height: 1.5; }
.qxa-home-link { display: block; margin-top: .4rem; }
.qxa-rows { display: flex; flex-direction: column; }
.qxa-row { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr 1fr; gap: .6rem; align-items: center; padding: .7rem 0; border-top: 1px solid var(--qxp-line); }
.qxa-row:first-child { border-top: 0; }
.qxa-cell { font-size: 14px; color: var(--qxp-body); font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.qxa-strong { color: var(--qxp-ink); font-weight: 600; }
.qxa-status { text-transform: uppercase; font-size: 11px; letter-spacing: .06em; color: var(--qxp-hi); }
.qxa-pnl { font-weight: 600; }
.qxa-empty { color: var(--qxp-muted); font-size: 14px; padding: 1rem 0; }
/* ── backtest result: stat tiles, the candlestick chart, the trade ledger ── */
.qxa-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(180px,100%),1fr)); gap: .6rem; }
.qxa-stat { background: var(--qxp-bg-2); border: 1px solid var(--qxp-line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.qxa-stat-label { font-family: var(--qxp-ui); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--qxp-hi); }
.qxa-stat-value { color: var(--qxp-ink); font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.qxd-chart { width: 100%; }
.qxa-row.qxa-trades-head { border-top: 0; border-bottom: 1px solid var(--qxp-line-2); padding-bottom: .5rem; }
.qxa-trades-head .qxa-th { font-family: var(--qxp-ui); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--qxp-hi); }
/* ── per-crypto market-type map: 4-col rows + regime chips (class interpolated qxa-chip-{item.regime}) ── */
.qxa-row.qxa-rg-row { grid-template-columns: 1.6fr 1fr 1.2fr 1fr; }
.qxa-chip { justify-self: start; display: inline-flex; align-items: center; min-height: 22px; padding: 1px 10px; border-radius: 999px;
  font-family: var(--qxp-ui); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; text-wrap: nowrap;
  border: 1px solid var(--qxp-line-2); color: var(--qxp-body); background: var(--qxp-bg-2); }
.qxa-chip-bull { color: var(--qxp-hi); border-color: var(--qxp-hi); }
.qxa-chip-bear { color: var(--qxp-down); border-color: var(--qxp-down); }
.qxa-chip-declining { color: var(--qxp-down); border-color: var(--qxp-line-2); }
.qxa-chip-ranging { color: var(--qxp-body); border-color: var(--qxp-line-2); }
.qxa-chip-unknown { color: var(--qxp-muted); border-color: var(--qxp-line); }
/* ── market-size + sentiment tables (5-col rows) ── */
.qxa-row.qxa-mk-row { grid-template-columns: .6fr 1.3fr 1.4fr 1.4fr 1.3fr; }
.qxa-row.qxa-sn-row { grid-template-columns: 1fr 1.1fr .8fr .9fr 1.4fr; }
.qxa-row.qxa-insp3 { grid-template-columns: 1.1fr 1fr 2.4fr; }
/* ── live balances: 4-col rows + status tint (ok/warn/error) ── */
.qxa-row.qxa-bal-row { grid-template-columns: 1fr 1.2fr 1.2fr 2fr; }
.qxa-row.qxa-px-row { grid-template-columns: 1.3fr 1.2fr 1fr .9fr 1.3fr; }
/* ── buckets: 6-col rows + form inputs ── */
.qxa-row.qxa-bkt-row { grid-template-columns: 1.6fr 1.1fr 1fr 1fr .8fr auto; }
.qxa-input { min-height: 40px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--qxp-line-2); background: var(--qxp-bg); color: var(--qxp-ink); font-size: 14px; }
.qxa-input:focus-visible { outline: 2px solid var(--qxp-hi); outline-offset: 1px; }
.qxa-bal-warn { border-left: 3px solid #d9a441; padding-left: 10px; }
.qxa-bal-error { border-left: 3px solid var(--qxp-down); padding-left: 10px; }
.qxa-bal-warn .qxa-cell:last-child { color: #d9a441; }
.qxa-bal-error .qxa-cell:last-child { color: var(--qxp-down); }
.qxa-bal-total { border-top: 1px solid var(--qxp-line-2); }
.qxa-bal-total .qxa-cell { color: var(--qxp-ink); font-weight: 600; }
.qxa-bal-grandtotal { border-top: 2px solid var(--qxp-hi); }
.qxa-bal-grandtotal .qxa-cell { color: var(--qxp-ink); font-weight: 700; }
/* ── live trading gate status ── */
.qxa-gate-row { display: grid; grid-template-columns: 1fr 2.4fr 1fr; gap: .6rem; align-items: center; padding: .6rem 0; border-top: 1px solid var(--qxp-line); }
.qxa-gate-row:first-child { border-top: 0; }
.qxa-gate-open { color: var(--qxp-down); font-weight: 600; }
.qxa-gate-closed { color: var(--qxp-hi); font-weight: 600; }
/* ── strategy detail: open-lots table + manual buy buttons ── */
.qxa-row.qxa-lot-row { grid-template-columns: .7fr 1fr 1fr .8fr 1fr 1fr auto; }
.qxa-row.qxa-ins-row { grid-template-columns: 1.4fr 1.1fr 1.1fr .9fr 1fr; }
.qxa-row.qxa-asset-row { grid-template-columns: 1.4fr 1fr .9fr .7fr 1fr; }
.qxa-row.qxa-pos-row { grid-template-columns: 1.1fr 1fr 1fr .8fr .9fr 1.3fr .9fr; }
.qxa-row.qxa-rowlink { cursor: pointer; }
.qxa-row.qxa-rowlink:hover, .qxa-row.qxa-rowlink:focus-visible { background: var(--qxp-bg-2); }
/* ── buckets navigation drill (bucket.view): bucket list, a bucket's strategies, the strategy monitor ── */
.qxa-row.qxa-bkv-row { grid-template-columns: 1.8fr 1.1fr 1fr 1fr .8fr auto; }
.qxa-row.qxa-bkv-srow { grid-template-columns: 1.8fr .9fr .9fr .6fr 1fr 1fr .7fr; }
.qxa-row.qxa-mlot-row { grid-template-columns: .7fr 1fr .8fr 1fr 1fr; }
.qxa-row.qxa-ctrade-row { grid-template-columns: 1.3fr 1.3fr 1fr 1fr 1fr; }
.qxa-row.qxa-ord-row { grid-template-columns: .7fr .8fr 1fr 1fr 1.6fr; }
/* The opened bucket / strategy is a full-screen COVER over the list (which stays mounted underneath, so
   the back arrow returns to the exact scroll position) — a page, not an inline expansion. Mobile-safe
   insets; the strategy cover sits above the bucket cover. Mirrors the strategy-detail cover pattern. */
.qxa-drill { position: fixed; inset: 0; z-index: 60; overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; gap: .8rem; background: var(--qxp-bg);
  padding: 1.2rem; padding-inline: max(1.1rem, calc((100% - 940px) / 2));
  padding-top: calc(1.2rem + env(safe-area-inset-top, 0px)); padding-bottom: calc(2.4rem + env(safe-area-inset-bottom, 0px)); }
.qxa-drill.qxa-drill-strat { z-index: 70; }
.qxa-drill .qxa-mini:first-child { align-self: flex-start; }
.qxa-drill-figs { margin: 0; color: var(--qxp-ink); font-size: 14.5px; font-variant-numeric: tabular-nums; }
.qxa-crumbs { font-family: var(--qxp-ui); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--qxp-muted); }
/* ── the signed-in home: bucket cards (reuse the poscard look) + footer nav ── */
.qxa-bklist { display: flex; flex-direction: column; gap: 0.9rem; }
.qxa-poscard.qxa-bkcard { cursor: pointer; }
.qxa-poscard.qxa-bkcard:hover, .qxa-poscard.qxa-bkcard:focus-visible { border-color: var(--qxp-hi); background: var(--qxp-bg-3); }
.qxa-bkcard-strat { color: var(--qxp-body); font-size: 13px; margin-top: .25rem; padding-top: .7rem; border-top: 1px solid var(--qxp-line); }
/* a whole-card LINK to a bucket/strategy page (real route) — the poscard look, as an <a> */
.qx-link.qxa-navcard { border: 1px solid var(--qxp-line-2); border-radius: 16px; background: color-mix(in srgb, var(--qxp-bg-3) 62%, var(--qxp-bg-2)); padding: 18px 20px; display: flex; flex-direction: column; gap: .6rem; text-decoration: none; color: inherit;
  box-shadow: inset 0 1px 0 rgba(238, 244, 242, .045), 0 2px 5px rgba(0, 0, 0, .35), 0 18px 36px -24px rgba(0, 0, 0, .92); transition: border-color .15s ease, transform .12s ease, box-shadow .15s ease; }
@media (hover: hover) { .qx-link.qxa-navcard:hover { border-color: var(--qxp-hi); box-shadow: inset 0 1px 0 rgba(238, 244, 242, .06), 0 2px 5px rgba(0, 0, 0, .35), 0 20px 40px -22px rgba(0, 0, 0, .95); } }
.qx-link.qxa-navcard:focus-visible { border-color: var(--qxp-hi); outline: none; }
.qx-link.qxa-navcard:active { transform: scale(.995); }
/* back link at the top of a bucket/strategy page */
.qx-link.qxa-crumb { display: inline-flex; align-items: center; align-self: flex-start; min-height: 40px; color: var(--qxp-body); font-size: 14px; text-decoration: none; }
.qx-link.qxa-crumb:hover, .qx-link.qxa-crumb:focus-visible { color: var(--qxp-ink); }
/* ── knowledge base: article list tags + article prose ── */
.qxa-kb-tags { color: var(--qxp-muted); font-size: 12px; }
.qxa-kb-art { display: flex; flex-direction: column; }
.qxa-kb-wrap { display: flex; flex-direction: column; gap: .35rem; }
.qxa-kb-body { color: var(--qxp-body); font-size: 15px; line-height: 1.6; margin-top: .6rem; }
.qxa-kb-body h2 { color: var(--qxp-ink); font-size: 20px; margin: 1.4rem 0 .5rem; }
.qxa-kb-body h3 { color: var(--qxp-ink); font-size: 16px; margin: 1.1rem 0 .4rem; }
.qxa-kb-body p { margin: 0 0 .8rem; }
.qxa-kb-body ul, .qxa-kb-body ol { margin: 0 0 .8rem 1.2rem; }
.qxa-kb-body li { margin: .25rem 0; }
.qxa-kb-body a { color: var(--qxp-hi); }
.qxa-kb-body code { font-family: ui-monospace, monospace; background: var(--qxp-bg-3); padding: 1px 5px; border-radius: 5px; font-size: .9em; }
.qxa-kb-body pre { background: var(--qxp-bg-2); border: 1px solid var(--qxp-line); border-radius: 8px; padding: 12px; overflow-x: auto; }
.qxa-kb-body blockquote { margin: 0 0 .8rem; padding-left: 12px; border-left: 2px solid var(--qxp-line-2); color: var(--qxp-muted); }
.qxa-save { align-self: flex-start; }
/* favourites list: each saved item is a link + a remove, in a row */
.qxa-poscard.qxa-fav-row { flex-direction: row; align-items: center; justify-content: space-between; gap: .8rem; }
.qx-link.qxa-fav-link { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; text-decoration: none; color: inherit; }
.qx-link.qxa-fav-link:hover .qxa-pos-sym { color: var(--qxp-hi); }
.qxa-foot { display: flex; flex-direction: column; gap: .5rem; margin-top: 2rem; padding-top: 1.1rem; border-top: 1px solid var(--qxp-line-2); }
.qxa-foot-title { font-family: var(--qxp-ui); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--qxp-muted); }
.qxa-foot-row { display: flex; flex-flow: row wrap; gap: .3rem .9rem; }
.qx-link.qxa-foot-link { color: var(--qxp-body); font-size: 13.5px; text-decoration: none; padding: 4px 0; }
.qx-link.qxa-foot-link:hover, .qx-link.qxa-foot-link:focus-visible { color: var(--qxp-ink); text-decoration: underline; }
.qx-button.qxa-buy { border-color: var(--qxp-hi); color: var(--qxp-ink); }
.qx-button.qxa-buy:hover, .qx-button.qxa-buy:focus-visible { background: var(--qxp-bg-3); }
/* ── live portfolio cards + the demo call-to-action ── */
.qxa-pf-obj { display: flex; flex-direction: column; gap: 1.1rem; }
.qxa-pf-live { gap: .7rem; }
.qxa-pf-figs { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.qxa-fig { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
/* a vendor wallet (/balances/:portfolioId): total, doughnut, per-coin holdings (Binance-style) */
.qxa-bal-total { margin: .2rem 0 0; color: var(--qxp-ink); font-size: 30px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.qxa-bal-sub { margin: .1rem 0 0; color: var(--qxp-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.qxa-bal-sub:empty { display: none; }
.qxa-bal-chart { width: 100%; max-width: 460px; margin: .4rem auto 0; }
.qxa-holding { flex-direction: row; align-items: center; justify-content: space-between; gap: 1rem; }
.qxa-holding-main { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.qxa-holding-figs { display: flex; flex-direction: column; gap: .15rem; align-items: flex-end; text-align: right; min-width: 0; }
.qxa-holding-amt { color: var(--qxp-ink); font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.qxa-holding-val { color: var(--qxp-muted); font-size: 13px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
/* leverage chip on a position card head (hidden for spot venues: empty leverage_text) */
.qxa-lev-chip { font-family: var(--qxp-ui); font-size: 11px; font-weight: 600; letter-spacing: .03em; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--qxp-line-2); color: var(--qxp-hi); white-space: nowrap; }
.qxa-lev-chip:empty { display: none; }
/* research run cards: validated badge (hidden until validated_text present) + disqualified note */
.qxa-valbadge:empty { display: none; }
.qxa-vb-true { border-color: var(--qxp-hi); color: var(--qxp-hi); }
.qxa-vb-false { border-color: var(--qxp-down); color: var(--qxp-down); }
.qxa-dq { color: var(--qxp-down); font-size: 12px; }
.qxa-dq:empty { display: none; }
/* research universes (R7): one row per instrument, ranked by best holdout */
.qxa-univrow { display: flex; flex-direction: column; gap: .6rem; }
.qxa-univrow .qxa-status { text-transform: capitalize; }
.qxa-univ-chip { border-color: var(--qxp-hi); color: var(--qxp-hi); }
.qxa-univ-chip:empty { display: none; }
/* books (B1): the grouping above buckets — risk-budget group for sleeves */
.qxa-bookcard { border-left: 3px solid var(--qxp-hi); }
.qxa-bookcard.qxa-bk-halted { border-left-color: var(--qxp-down); }
.qxa-bookcard.qxa-bk-draft { border-left-color: var(--qxp-line-2); }
.qxa-bookstatus { border-color: var(--qxp-hi); color: var(--qxp-hi); }
.qxa-bookstatus.qxa-bk-halted { border-color: var(--qxp-down); color: var(--qxp-down); font-weight: 700; }
.qxa-bookstatus.qxa-bk-draft { border-color: var(--qxp-line-2); color: var(--qxp-ink); }
.qxa-bookstatus.qxa-bk-active { border-color: var(--qxp-hi); color: var(--qxp-hi); }
.qxa-bookstatus-line { font-weight: 600; margin: .2rem 0 .7rem; }
.qxa-bookstatus-line.qxa-bk-halted { color: var(--qxp-down); font-weight: 700; }
.qxa-bookstatus-line.qxa-bk-active { color: var(--qxp-hi); }
.qxa-bookstatus-line.qxa-bk-draft { color: var(--qxp-ink); opacity: .75; }
.qxa-halt-reason { display: block; margin-top: .3rem; color: var(--qxp-down); font-size: 12px; }
.qxa-halt-reason:empty { display: none; }
.qxa-book-chip { border-color: var(--qxp-hi); color: var(--qxp-hi); }
.qxa-book-chip:empty { display: none; }
.qxa-cta-danger { background: var(--qxp-down); border-color: var(--qxp-down); color: #fff; }
.qxa-linkbtn-danger { color: var(--qxp-down); border-color: var(--qxp-down); }
.qxa-grplist { display: flex; flex-direction: column; gap: .4rem; margin: .3rem 0 1rem; }
.qxa-grp-row { display: flex; justify-content: space-between; gap: .6rem; padding: 6px 10px; border: 1px solid var(--qxp-line-2); border-radius: 8px; font-size: 13px; }
.qxa-grp-row.qxa-over-true { border-color: var(--qxp-down); color: var(--qxp-down); }
.qxa-grp-row.qxa-over-false { border-color: var(--qxp-line-2); }
.qxa-grp-name { font-weight: 600; }
.qxa-grp-exp { font-variant-numeric: tabular-nums; }
.qxa-grp-n { opacity: .7; }
.qxa-sleevecard { display: flex; flex-direction: column; gap: .5rem; }
.qxa-sleeve-main { display: block; }
.qxa-pick { cursor: pointer; }
.qxa-sel-line { margin: .3rem 0; font-weight: 600; color: var(--qxp-hi); }
.qxa-sel-line:empty { display: none; }
/* R9: book equity history table + paper-vs-backtest verdict + readiness checklist */
.qxa-histlist { display: flex; flex-direction: column; margin: .3rem 0 1rem; border: 1px solid var(--qxp-line-2); border-radius: 8px; overflow: hidden; }
.qxa-hist-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr .9fr; gap: .4rem; padding: 6px 10px; font-size: 13px; font-variant-numeric: tabular-nums; border-top: 1px solid var(--qxp-line-2); }
.qxa-hist-head { font-weight: 600; border-top: 0; opacity: .8; }
.qxa-hist-row.qxa-bk-halted { color: var(--qxp-down); }
.qxa-hist-c { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qxa-verdict { font-weight: 700; margin: .2rem 0 .6rem; }
.qxa-verdict:empty { display: none; }
.qxa-critlist { display: flex; flex-direction: column; margin: .3rem 0 1rem; border: 1px solid var(--qxp-line-2); border-radius: 8px; overflow: hidden; }
.qxa-crit-row { display: flex; justify-content: space-between; gap: .6rem; padding: 7px 11px; font-size: 13px; border-top: 1px solid var(--qxp-line-2); border-left: 3px solid var(--qxp-line-2); }
.qxa-crit-row:first-child { border-top: 0; }
.qxa-crit-row.qxa-crit-true { border-left-color: var(--qxp-hi); }
.qxa-crit-row.qxa-crit-false { border-left-color: var(--qxp-down); }
.qxa-crit-name { font-weight: 600; }
.qxa-crit-val { font-variant-numeric: tabular-nums; opacity: .85; }
/* R10: scored news feed */
.qxa-newslist { display: flex; flex-direction: column; gap: .7rem; }
.qxa-newscard { border: 1px solid var(--qxp-line-2); border-left: 3px solid var(--qxp-line-2); border-radius: 10px; padding: 10px 13px; }
.qxa-newscard.qxa-tone-pos { border-left-color: var(--qxp-hi); }
.qxa-newscard.qxa-tone-neg { border-left-color: var(--qxp-down); }
.qxa-news-head { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: .3rem; }
.qxa-news-time { font-size: 12px; opacity: .7; font-variant-numeric: tabular-nums; }
.qxa-news-coin { font-size: 11px; }
.qxa-newsbadge.qxa-tone-pos { border-color: var(--qxp-hi); color: var(--qxp-hi); }
.qxa-newsbadge.qxa-tone-neg { border-color: var(--qxp-down); color: var(--qxp-down); }
.qxa-newsbadge.qxa-tone-flat, .qxa-newsbadge.qxa-tone-none { border-color: var(--qxp-line-2); color: var(--qxp-ink); }
.qxa-news-title { display: block; font-weight: 600; color: var(--qxp-ink); text-decoration: none; line-height: 1.35; }
.qxa-news-title:hover { text-decoration: underline; }
.qxa-news-reason { margin: .3rem 0 .2rem; font-size: 13px; opacity: .8; line-height: 1.45; }
.qxa-news-host { font-size: 12px; opacity: .6; }
/* B4: sizing-ceiling card on the strategy page */
.qxa-sizecard { border: 1px solid var(--qxp-line-2); border-left: 3px solid var(--qxp-hi); border-radius: 10px; padding: 11px 14px; margin: .3rem 0 1rem; display: flex; flex-direction: column; gap: .5rem; }
.qxa-sizecard.qxa-lev-false { border-left-color: #c08a2b; }
.qxa-sizetext { font-weight: 600; margin: 0; }
.qxa-pnl-down { color: var(--qxp-down); }
/* data inspector DIRECTORY — cards linking to each inspection */
.qxa-dirgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: .8rem; margin: .3rem 0 1rem; }
.qxa-dir-card { display: block; padding: 14px 16px; border: 1px solid var(--qxp-line-2); border-left: 3px solid var(--qxp-hi); border-radius: 11px; text-decoration: none; color: var(--qxp-ink); background: var(--qxp-bg-2); }
.qxa-dir-card:hover { border-color: var(--qxp-hi); }
.qxa-dir-title { display: block; font-weight: 700; margin-bottom: .25rem; }
.qxa-dir-desc { margin: 0; font-size: 13px; opacity: .8; line-height: 1.45; }
/* D1: data-collection page — stream health strip + collection status rows */
.qxa-strstrip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: .6rem; margin: .3rem 0 1rem; }
.qxa-strcard { border: 1px solid var(--qxp-line-2); border-left: 3px solid var(--qxp-line-2); border-radius: 10px; padding: 10px 13px; }
.qxa-strcard.qxa-strstat-connected { border-left-color: var(--qxp-hi); }
.qxa-strcard.qxa-strstat-disconnected, .qxa-strcard.qxa-strstat-error { border-left-color: var(--qxp-down); }
.qxa-strcard-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .3rem; }
.qxa-strcard-ven { font-weight: 700; }
.qxa-strbadge.qxa-strstat-connected { border-color: var(--qxp-hi); color: var(--qxp-hi); }
.qxa-strbadge.qxa-strstat-disconnected, .qxa-strbadge.qxa-strstat-error { border-color: var(--qxp-down); color: var(--qxp-down); }
.qxa-strerr { margin: .2rem 0 0; font-size: 12px; color: var(--qxp-down); }
.qxa-strerr:empty { display: none; }
.qxa-collrow.qxa-collstat-ok { border-left: 3px solid var(--qxp-hi); }
.qxa-collrow.qxa-collstat-holes { border-left: 3px solid #c08a2b; }
.qxa-collrow.qxa-collstat-stale { border-left: 3px solid var(--qxp-down); }
.qxa-collbadge.qxa-collstat-ok { border-color: var(--qxp-hi); color: var(--qxp-hi); }
.qxa-collbadge.qxa-collstat-holes { border-color: #c08a2b; color: #c08a2b; }
.qxa-collbadge.qxa-collstat-stale { border-color: var(--qxp-down); color: var(--qxp-down); }
.qxa-collsrc { margin: .3rem 0 0; font-size: 12px; opacity: .65; line-height: 1.4; }
.qxa-collbuilt { margin: .25rem 0 0; font-size: 11px; opacity: .7; font-variant-numeric: tabular-nums; }
/* D1 addendum 2: candle-builder health line + built timeframes */
.qxa-bldcard { border: 1px solid var(--qxp-line-2); border-left: 3px solid var(--qxp-hi); border-radius: 10px; padding: 10px 13px; margin: .3rem 0 1rem; }
.qxa-bldline { display: flex; flex-flow: row wrap; gap: .4rem; font-variant-numeric: tabular-nums; }
.qxa-bldtf { display: flex; flex-flow: row wrap; align-items: center; gap: .35rem; margin-top: .4rem; }
.qxa-bldtf-label { font-size: 12px; font-weight: 700; opacity: .7; min-width: 46px; }
.qxa-bldchips { display: flex; flex-flow: row wrap; gap: .3rem; }
.qxa-tfchip { font-size: 11px; padding: 1px 7px; border: 1px solid var(--qxp-line-2); border-radius: 999px; opacity: .85; }
.qxa-collshort .qxa-fig-val { color: #c08a2b; }
.qxa-collshort-0 .qxa-fig-val { color: inherit; opacity: .8; }
/* B4 part 2: research-run history year-window strip */
.qxa-ystrip { display: flex; flex-flow: row wrap; gap: .25rem; margin: .3rem 0 .4rem; }
.qxa-ybar { display: flex; flex-direction: column; align-items: center; min-width: 46px; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--qxp-line-2); font-variant-numeric: tabular-nums; }
.qxa-ybar-net { font-size: 12px; font-weight: 600; }
.qxa-ybar-lbl { font-size: 10px; opacity: .65; white-space: nowrap; }
.qxa-ybar.qxa-yr-pos { border-color: var(--qxp-hi); color: var(--qxp-hi); }
.qxa-ybar.qxa-yr-neg { border-color: var(--qxp-down); color: var(--qxp-down); }
.qxa-ybar.qxa-yr-flat { border-color: var(--qxp-line-2); }
/* market regime (R8): bull green, bear red, ranging/declining grey; vol as a chip */
.qxa-regrow.qxa-rg-bull { border-left: 3px solid var(--qxp-hi); }
.qxa-regrow.qxa-rg-bear { border-left: 3px solid var(--qxp-down); }
.qxa-regrow.qxa-rg-ranging, .qxa-regrow.qxa-rg-declining { border-left: 3px solid var(--qxp-line-2); }
.qxa-regbadge.qxa-rg-bull { border-color: var(--qxp-hi); color: var(--qxp-hi); }
.qxa-regbadge.qxa-rg-bear { border-color: var(--qxp-down); color: var(--qxp-down); }
.qxa-regbadge.qxa-rg-ranging, .qxa-regbadge.qxa-rg-declining { border-color: var(--qxp-line-2); color: var(--qxp-ink); }
.qxa-vol-quiet { opacity: .55; }
.qxa-vol-normal { opacity: .85; }
.qxa-vol-volatile { border-color: var(--qxp-down); color: var(--qxp-down); }
.qxa-roster-rec { margin: .2rem 0 .9rem; padding: 9px 13px; border-left: 2px solid var(--qxp-hi); background: var(--qxp-bg-2); border-radius: 0 8px 8px 0; font-size: 14px; }
.qxa-roster-rec:empty { display: none; }
.qxa-marketnow { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; font-size: 12px; margin-top: .25rem; }
.qxa-marketnow-lbl { opacity: .6; }
.qxa-marketnow-val { font-weight: 600; }
.qxa-fitchip { font-size: 11px; }
.qxa-fit-in { border-color: var(--qxp-hi); color: var(--qxp-hi); }
.qxa-fit-out { border-color: #c08a2b; color: #c08a2b; }
.qxa-habitat { display: block; font-size: 12px; opacity: .75; margin-top: .2rem; }
.qxa-habitat:empty { display: none; }
.qxa-hablist { display: flex; flex-direction: column; margin: .3rem 0 1rem; border: 1px solid var(--qxp-line-2); border-radius: 8px; overflow: hidden; }
.qxa-hab-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr .8fr .8fr; gap: .4rem; padding: 6px 10px; font-size: 13px; font-variant-numeric: tabular-nums; border-top: 1px solid var(--qxp-line-2); }
.qxa-hab-head { font-weight: 600; border-top: 0; opacity: .8; }
.qxa-hab-row.qxa-rg-bull .qxa-hab-reg { color: var(--qxp-hi); }
.qxa-hab-row.qxa-rg-bear .qxa-hab-reg { color: var(--qxp-down); }
.qxa-hab-c { text-align: right; }
.qxa-hab-reg { text-align: left; text-transform: capitalize; font-weight: 600; }
/* exact-config code block on a research run */
.qxa-codebox { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; background: var(--qxp-bg-2); border: 1px solid var(--qxp-line); border-radius: 10px; padding: 12px 14px; margin: 0; max-height: 440px; overflow: auto; color: var(--qxp-body); }
.qxa-codebox:empty { display: none; }
/* config reference (R5): monospace path + guidance note */
.qxa-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.qxa-guid { margin: .3rem 0 0; padding: 8px 12px; border-left: 2px solid var(--qxp-hi); background: var(--qxp-bg-2); border-radius: 0 8px 8px 0; color: var(--qxp-body); font-size: 13px; line-height: 1.5; }
.qxa-guid:empty { display: none; }
/* KB article diagram (chart patterns): white card only when an SVG is present */
.qxa-kb-figwrap { display: block; }
.qxa-patcard { gap: .4rem; }
.qxa-patcard img { width: 100%; height: auto; display: block; }
.qxa-kb-fig { max-width: 460px; margin: .4rem 0 1rem; }
.qxa-kb-fig:has(svg) { background: #fff; border-radius: 12px; padding: 10px; }
.qxa-kb-fig svg { width: 100%; height: auto; display: block; }
.qxa-fig-label { font-family: var(--qxp-ui); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--qxp-hi); }
.qxa-fig-val { color: var(--qxp-ink); font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.qx-button.qxa-cta { display: inline-flex; align-items: center; min-height: 44px; align-self: flex-start; padding: 0 18px; border-radius: 10px;
  border: 1px solid var(--qxp-hi); background: var(--qxp-bg-2); color: var(--qxp-ink); font-size: 14px; font-weight: 600; cursor: pointer; }
.qx-button.qxa-cta:hover, .qx-button.qxa-cta:focus-visible { background: var(--qxp-bg-3); }
/* ── strategy cards: raw file ⟷ formatted render ── */
.qxa-str { display: flex; flex-direction: column; gap: 1rem; }
.qx-button.qxa-toggle { align-self: flex-start; min-height: 40px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--qxp-line-2);
  background: var(--qxp-bg-2); color: var(--qxp-body); font-size: 13px; cursor: pointer; }
.qx-button.qxa-toggle:hover, .qx-button.qxa-toggle:focus-visible { color: var(--qxp-ink); border-color: var(--qxp-hi); }
.qxa-str-list { display: flex; flex-direction: column; gap: .8rem; }
.qxa-str-card { background: var(--qxp-bg-2); border: 1px solid var(--qxp-line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: .5rem; }
.qxa-str-name { margin: 0; color: var(--qxp-ink); font-size: 17px; font-weight: 650; }
.qxa-str-meta { font-family: var(--qxp-ui); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--qxp-hi); }
.qxa-code { white-space: pre-wrap; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.5;
  color: var(--qxp-body); background: var(--qxp-bg); border: 1px solid var(--qxp-line); border-radius: 8px; padding: 10px 12px; overflow-x: auto; }
.qxa-fmt { white-space: pre-wrap; font-size: 13.5px; line-height: 1.6; color: var(--qxp-body); }
.qxa-str-actions { display: flex; flex-direction: row; flex-wrap: wrap; gap: .5rem; margin-top: .3rem; }
.qx-button.qxa-mini { min-height: 38px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--qxp-line-2); background: var(--qxp-bg); color: var(--qxp-body); font-size: 13px; cursor: pointer; }
.qx-button.qxa-mini:hover, .qx-button.qxa-mini:focus-visible { color: var(--qxp-ink); border-color: var(--qxp-hi); }
.qx-button.qxa-mini-danger:hover, .qx-button.qxa-mini-danger:focus-visible { color: var(--qxp-down); border-color: var(--qxp-down); }
/* ── the kill-switch: one global stop over all automated demo trading ── */
.qxa-kill { display: flex; flex-flow: row wrap; align-items: center; gap: .5rem .8rem; margin: 0 0 1.1rem; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--qxp-line-2); background: var(--qxp-bg-2); }
.qxa-kill-halt { border-color: var(--qxp-down); }
.qxa-kill-dot { font-size: 11px; line-height: 1; }
.qxa-kill-run .qxa-kill-dot { color: var(--qxp-hi); }
.qxa-kill-halt .qxa-kill-dot { color: var(--qxp-down); }
.qxa-kill-msg { font-family: var(--qxp-ui); font-weight: 600; font-size: 14px; color: var(--qxp-ink); }
.qxa-kill-note { color: var(--qxp-muted); font-size: 12.5px; flex: 1 1 100%; margin: .1rem 0 0; }
.qxa-kill-actions { display: flex; flex-flow: row wrap; gap: .5rem; margin-left: auto; }
.qx-button.qxa-halt { min-height: 40px; padding: 0 16px; border-radius: 9px; border: 1px solid var(--qxp-down); background: var(--qxp-down); color: #fff; font-weight: 600; font-size: 13px; cursor: pointer; }
.qx-button.qxa-halt:hover, .qx-button.qxa-halt:focus-visible { filter: brightness(1.08); }
.qx-button.qxa-resume { min-height: 40px; padding: 0 16px; border-radius: 9px; border: 1px solid var(--qxp-hi); background: transparent; color: var(--qxp-ink); font-weight: 600; font-size: 13px; cursor: pointer; }
.qx-button.qxa-resume:hover, .qx-button.qxa-resume:focus-visible { background: var(--qxp-bg-3); }
.qx-button.qxa-flatten { min-height: 40px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--qxp-line-2); background: var(--qxp-bg); color: var(--qxp-body); font-size: 13px; cursor: pointer; }
.qx-button.qxa-flatten:hover, .qx-button.qxa-flatten:focus-visible { color: var(--qxp-down); border-color: var(--qxp-down); }
/* the raw-JSON editor */
.qxa-edit { display: flex; flex-direction: column; gap: .6rem; background: var(--qxp-bg-2); border: 1px solid var(--qxp-hi); border-radius: 12px; padding: 14px 16px; }
.qxa-edit .qx-state-input, .qxa-editbox { width: 100%; }
.qxa-edit textarea, .qxa-editbox textarea { width: 100%; white-space: pre; overflow: auto; background: var(--qxp-bg); color: var(--qxp-ink);
  border: 1px solid var(--qxp-line); border-radius: 8px; padding: 10px 12px; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.5; }
/* template cards */
.qxa-tmpl-list { display: flex; flex-direction: column; gap: .8rem; }
.qxa-tmpl-card { background: var(--qxp-bg-2); border: 1px solid var(--qxp-line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: .5rem; }
.qxa-tmpl-head { display: flex; flex-direction: row; align-items: baseline; justify-content: space-between; gap: .6rem; }
.qxa-stars { color: var(--qxp-hi); font-size: 15px; letter-spacing: 1px; white-space: nowrap; }
.qxa-tmpl-tags { font-family: var(--qxp-ui); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--qxp-hi); }
.qxa-why { margin: 0; color: var(--qxp-body); font-size: 13px; line-height: 1.5; font-style: italic; }
/* ── backtest comparison tool ── */
.qxc-compare { display: flex; flex-direction: column; gap: 1rem; }
.qxa-chiprow { display: flex; flex-direction: row; flex-wrap: wrap; gap: .4rem; }
/* a repeater of chips that flows INTO its parent chip-row (so "All" + the coins are one flow) */
.qxa-chipflow { display: contents !important; }
/* positions Live/Demo/All segmented toggle — selected fill via backgroundBind/colorBind (reactive) */
.qxa-seg { display: flex; flex-flow: row wrap; align-items: center; gap: .45rem; margin: .1rem 0 .3rem; }
.qxa-seg-lbl { font-family: var(--qxp-ui); font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--qxp-muted); margin-right: .15rem; }
.qx-container.qxa-seg-opt { min-height: 34px; padding: 0 16px; font-weight: 600; }
/* live total balance (positions page, Live only) */
.qxa-pos-total { margin: .1rem 0 .2rem; }
.qxa-pos-total-card { display: flex; flex-direction: column; gap: .15rem; padding: 12px 16px; border: 1px solid var(--qxp-line-2); border-radius: 12px; background: color-mix(in srgb, var(--qxp-bg-3) 55%, var(--qxp-bg-2)); }
.qxa-pos-total-lbl { font-family: var(--qxp-ui); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--qxp-hi); }
.qxa-pos-total-val { color: var(--qxp-ink); font-size: 26px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.qx-container.qxa-chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--qxp-line-2); background: var(--qxp-bg-2); color: var(--qxp-body); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.qx-container.qxa-chip:hover, .qx-container.qxa-chip:focus-visible { color: var(--qxp-ink); border-color: var(--qxp-hi); }
.qxa-opt-row { grid-template-columns: 1.4fr 2fr; }
.qxc-lead { display: flex; flex-direction: column; margin: .4rem 0 0; }
.qxa-sub-head { font-size: 1.25rem; margin: 2rem 0 .2rem; }
.qxa-rank-row { display: grid; grid-template-columns: 2fr .8fr .8fr .6fr .6fr .7fr .7fr; gap: .5rem; align-items: center; padding: .6rem 0; border-top: 1px solid var(--qxp-line); cursor: pointer; }
.qxa-rank-row:hover { background: var(--qxp-bg-2); }
.qxa-rank-row.qxa-rank-head { border-top: 0; border-bottom: 1px solid var(--qxp-line-2); cursor: default; }
.qxa-rank-row.qxa-rank-head:hover { background: none; }
.qx-container.qxa-rank-name { display: flex; flex-direction: column; gap: .1rem; cursor: pointer; }
/* the drilled strategy is a full-screen COVER over the ranking (which stays mounted underneath, so
   Back returns to the exact scroll position) */
.qxc-drill { position: fixed; inset: 0; z-index: 60; overflow-y: auto; background: var(--qxp-bg);
  display: flex; flex-direction: column; gap: .7rem; padding: 1.2rem; padding-inline: max(1.1rem, calc((100% - 940px) / 2)); }
.qxc-drill .qxa-mini:first-child { align-self: flex-start; }
/* ── strategies list → focused detail ── */
.qxa-str-listwrap { display: flex; flex-direction: column; gap: 1rem; }
.qxa-str-row { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-top: 1px solid var(--qxp-line); }
.qxa-str-row:first-child { border-top: 0; }
.qxa-str-row-main { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.qxa-str-row-head { display: flex; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: .2rem .7rem; }
.qx-button.qxa-open { flex: none; min-height: 40px; padding: 0 18px; }
/* the focused strategy is a full-screen COVER over the list (which stays mounted underneath, so closing
   returns to the exact scroll position) */
.qxc-strdetail { position: fixed; inset: 0; z-index: 60; overflow-y: auto; background: var(--qxp-bg);
  display: flex; flex-direction: column; gap: .8rem; padding: 1.2rem; padding-inline: max(1.1rem, calc((100% - 940px) / 2)); }
.qxc-strdetail .qxa-mini:first-child { align-self: flex-start; }
.qxa-ver-row { grid-template-columns: .8fr 1fr 1.6fr .8fr; }
.qxa-hi { color: var(--qxp-hi); }

/* ── /markets: every market we collect, a table per venue (tools/lib/markets-board.mjs) ── */
.qxa-mk-group { display: flex; flex-direction: column; gap: .35rem; margin-top: .6rem; }
.qxa-mk-group .qxp-eyebrow { margin: 0; }
.qxa-row.qxa-mk-row { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, var(--qxa-mk-chg, 1.2fr)) 1.2rem; }
.qx-link.qxa-row.qxa-mk-row { color: inherit; text-decoration: none; padding-left: .4rem; padding-right: .4rem; border-radius: 6px; }
.qx-link.qxa-row.qxa-mk-row:hover, .qx-link.qxa-row.qxa-mk-row:focus-visible { background: var(--qxp-bg-2); }
.qxa-mk-name { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.qxa-mk-label { color: var(--qxp-ink); font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.qxa-mk-sym, .qxa-mk-asof { color: var(--qxp-muted); font-size: 11.5px; overflow-wrap: anywhere; }
.qxa-mk-price { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.qxa-mk-chgs { display: flex; flex-flow: row wrap; gap: .25rem .8rem; min-width: 0; }
.qxa-mk-chg { display: inline-flex; align-items: baseline; gap: .3rem; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qxa-mk-per { color: var(--qxp-muted); font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.qxa-mk-dir { text-transform: capitalize; }
.qxa-mk-pct { font-variant-numeric: tabular-nums; }
/* the direction, three ways at once: the word (the text), the symbol (here) and the colour */
.qxa-mk-dir::before { display: inline-block; margin-right: .25rem; }
.qxa-dir-up { color: var(--qxp-hi); }
.qxa-dir-up::before { content: "\25B2"; }
.qxa-dir-down { color: var(--qxp-down); }
.qxa-dir-down::before { content: "\25BC"; }
.qxa-dir-flat { color: var(--qxp-muted); }
.qxa-dir-flat::before { content: "\25C6"; }
.qxa-mk-go { color: var(--qxp-muted); font-size: 16px; text-align: right; }
.qxa-mk-head .qxa-th:last-child { visibility: hidden; }
/* a phone: the market and its price on the first line, the changes under them — never wider than the screen */
@media (max-width: 560px) {
  .qxa-row.qxa-mk-row { grid-template-columns: minmax(0, 1fr) minmax(0, auto) 1rem; gap: .2rem .7rem; }
  .qxa-row.qxa-mk-row > .qxa-mk-chgs { grid-column: 1 / 3; grid-row: 2; }
  .qxa-row.qxa-mk-row > .qxa-mk-go { grid-column: 3; grid-row: 1 / 3; align-self: center; }
  .qxa-row.qxa-mk-head > .qxa-mk-chgs { display: none; }
  .qxa-mk-price { text-align: right; }
}
/* USDT | BTC — the quote a table or chart is priced in (links; the page says which is on) */
.qxa-qsel { display: flex; flex-flow: row wrap; align-items: center; gap: .4rem; margin: .15rem 0 .35rem; }
.qx-link.qxa-tfopt.qxa-qopt-on { border-color: var(--qxp-hi); background: var(--qxp-hi); color: var(--qxp-bg); }
/* a BTC price says what it is: a real Binance pair, or DERIVED (coin ÷ BTC/USDT) — in words, never colour alone */
.qxa-mk-basis { display: inline-flex; align-self: flex-start; align-items: center; gap: .3rem; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 1px 7px; border-radius: 999px; border: 1px solid var(--qxp-line-2); color: var(--qxp-muted); }
.qxa-mk-basis-derived { color: var(--qxp-ink); border-color: var(--qxp-muted); border-style: dashed; }
.qxa-mkb-tick { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.2fr); }
@media (max-width: 560px) { .qxa-row.qxa-mk-row.qxa-mkb-tick { grid-template-columns: minmax(0, 1fr) minmax(0, auto); } .qxa-row.qxa-mkb-tick > .qxa-mk-chgs { grid-column: 1 / 3; } }
/* /markets/:symbol — the timeframe row (links: the server draws the chosen one) */
.qxa-mk-sub { margin: 0; color: var(--qxp-muted); font-size: 13.5px; }
.qxa-tfsel { display: flex; flex-flow: row wrap; align-items: center; gap: .4rem; }
.qx-link.qxa-tfopt { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 40px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--qxp-line-2); background: var(--qxp-bg-2); color: var(--qxp-body); font-size: 14px; font-weight: 600; text-decoration: none; }
.qx-link.qxa-tfopt:hover, .qx-link.qxa-tfopt:focus-visible { border-color: var(--qxp-hi); color: var(--qxp-ink); }
.qxa-mk-group-binance { scroll-margin-top: 4.5rem; }
.qxa-mk-group-hyperliquid { scroll-margin-top: 4.5rem; }
.qxa-mk-group-ig { scroll-margin-top: 4.5rem; }
.qxa-tfsel-5m .qx-link.qxa-tfopt-5m { border-color: var(--qxp-hi); background: var(--qxp-hi); color: var(--qxp-bg); }
.qxa-tfsel-15m .qx-link.qxa-tfopt-15m { border-color: var(--qxp-hi); background: var(--qxp-hi); color: var(--qxp-bg); }
.qxa-tfsel-1h .qx-link.qxa-tfopt-1h { border-color: var(--qxp-hi); background: var(--qxp-hi); color: var(--qxp-bg); }
.qxa-tfsel-4h .qx-link.qxa-tfopt-4h { border-color: var(--qxp-hi); background: var(--qxp-hi); color: var(--qxp-bg); }
.qxa-tfsel-1d .qx-link.qxa-tfopt-1d { border-color: var(--qxp-hi); background: var(--qxp-hi); color: var(--qxp-bg); }
.qxa-tfsel-1w .qx-link.qxa-tfopt-1w { border-color: var(--qxp-hi); background: var(--qxp-hi); color: var(--qxp-bg); }
