/* Live market terminal (stream 96f1418d). Loaded after landing-v20.css; it overrides only the
   homepage terminal. Colours match market-chart.js's `lab` palette. */
body.velar-lab .market-terminal{--chart-axis-width:84px;--chart-gap:12px;--market-up:#2FD49A;--market-down:#FF5C5C;--market-live:#F7931A;padding:24px 28px;background:#0B0E14}
@media(max-width:760px){body.velar-lab .market-terminal{--chart-axis-width:68px;--chart-gap:8px}}
@media(max-width:600px){body.velar-lab .market-terminal{padding:16px}}

/* Controls: no frames. Segments keep a 1 px step of background, the pressed one a clear fill; the
   only outline is the focus ring. */
body.velar-lab .market-terminal :is(.market-pairs,.market-intervals,.market-display-modes){background:#12161E;border:0;padding:2px;gap:2px}
body.velar-lab .market-terminal :is(.market-pairs,.market-intervals,.market-display-modes) button,
body.velar-lab .market-terminal .market-zoom-controls button{border:0;background:transparent;color:#AEB6C2}
body.velar-lab .market-terminal .market-zoom-controls button{background:#12161E}
body.velar-lab .market-terminal :is(.market-pairs,.market-intervals,.market-display-modes) button[aria-pressed="true"]{background:#232A35;color:#F3F5F8}
@media(hover:hover) and (pointer:fine){body.velar-lab .market-terminal button:not([aria-pressed="true"]):hover{color:#F3F5F8;background:#1A1F29}}

/* The feed's pause: a plain text button beside the intervals. */
body.velar-lab .market-toolbar{justify-content:flex-end}
body.velar-lab .market-terminal .market-feed{display:inline-flex;align-items:center;gap:8px;min-height:44px;margin-right:auto;padding:0 4px;border:0;background:none;color:#AEB6C2;font:500 13px/1.3 var(--font-text)}
body.velar-lab .market-terminal .market-feed[hidden]{display:none}
body.velar-lab .market-terminal .market-feed .ui-icon{width:14px;height:14px}

/* Price with the live dot: it breathes while the feed runs and rests when it is paused. */
body.velar-lab .market-price{display:flex;align-items:center;gap:8px;margin-top:8px;min-width:0}
body.velar-lab .market-price strong{margin-top:0!important;white-space:nowrap;font-size:clamp(24px,2.1vw,32px)!important}
body.velar-lab .market-live-dot{display:none;flex:none;width:8px;height:8px;border-radius:50%;background:var(--market-live)}
body.velar-lab .market-terminal[data-feed] .market-live-dot{display:block}
body.velar-lab .market-terminal[data-feed="paused"] .market-live-dot{background:#5B6472}
body.velar-lab .market-terminal[data-feed="live"] .market-live-dot{animation:market-live 2s ease-in-out infinite}
@keyframes market-live{50%{opacity:.35;transform:scale(.8)}}
@media(prefers-reduced-motion:reduce){body.velar-lab .market-live-dot{animation:none!important}}
body.velar-lab[data-motion-pref="paused"] .market-live-dot{animation:none!important}
body.velar-lab #market-change.is-positive{color:var(--market-up)}
body.velar-lab #market-change.is-negative{color:var(--market-down)}

/* No-JS chart: the same candles as the live one, rising hollow, falling filled. */
body.velar-lab .market-chart .candle path{fill:none;stroke-width:1;vector-effect:non-scaling-stroke}
body.velar-lab .market-chart .candle rect{stroke-width:1;vector-effect:non-scaling-stroke}
body.velar-lab .market-chart .candle-up{stroke:var(--market-up);color:var(--market-up)}
body.velar-lab .market-chart .candle-up rect{fill:#0B0E14}
body.velar-lab .market-chart .candle-down{stroke:var(--market-down);color:var(--market-down)}
body.velar-lab .market-chart .candle-down rect{fill:var(--market-down)}
body.velar-lab .market-volume rect{stroke:none}
body.velar-lab .market-volume .candle-up{fill:rgba(47,212,154,.28)}
body.velar-lab .market-volume .candle-down{fill:rgba(255,92,92,.36)}
body.velar-lab .market-last-price{fill:none;stroke:var(--market-live);stroke-width:1;stroke-dasharray:3 3;vector-effect:non-scaling-stroke}
@media(max-width:900px){body.velar-lab .market-terminal .market-sidebar{border-left:0;padding-left:0}}

/* ——— Exchange-style terminal: 24 h stats above, order book and trade tape beside the chart. ——— */
body.velar-lab .market-terminal .market-workspace{grid-template-columns:minmax(0,1fr) 248px 204px;grid-template-areas:'plot depth rail';gap:24px}
@media(max-width:1100px){body.velar-lab .market-terminal .market-workspace{grid-template-columns:minmax(0,1fr) 236px;grid-template-areas:'rail rail' 'plot depth'}body.velar-lab .market-terminal .market-sidebar{border-left:0;padding-left:0}}
@media(max-width:900px){body.velar-lab .market-terminal .market-workspace{grid-template-columns:minmax(0,1fr);grid-template-areas:'rail' 'plot' 'depth'}}

body.velar-lab .market-stats{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px 32px;margin:0 0 4px;padding:14px 0;border-block:1px solid #161B24;font-variant-numeric:tabular-nums}
/* Provenance above the five numbers: the exchange name and the exact quote time are always visible
   (docs/audit-campaign/wave2-7-market.md M-1). Model, stale and unavailable readings are distinct. */
body.velar-lab .market-source{display:flex;align-items:center;gap:8px;margin:14px 0 0;color:#C8D2DE;font:500 12px/1.5 var(--font-text);font-variant-numeric:tabular-nums}
body.velar-lab .market-source::before{content:"";flex:none;width:6px;height:6px;border-radius:50%;background:#5B6472}
body.velar-lab .market-source[data-state="live"]::before{background:var(--market-up)}
body.velar-lab .market-source[data-state="stale"]{color:#E8C27A}
body.velar-lab .market-source[data-state="stale"]::before{background:#E8C27A}
body.velar-lab .market-source[data-state="unavailable"]{color:#FF8A8A}
body.velar-lab .market-source[data-state="unavailable"]::before{background:#FF5C5C}
body.velar-lab .market-source time{color:inherit;font-variant-numeric:tabular-nums}
body.velar-lab .market-terminal[data-quote="stale"] .market-live-dot{background:#E8C27A;animation:none}
body.velar-lab .market-terminal[data-quote="unavailable"] .market-live-dot{background:#5B6472;animation:none}
body.velar-lab .market-stats>div{min-width:0}
body.velar-lab .market-stats dt{color:#9AA3AF;font-size:12px;line-height:1.4}
body.velar-lab .market-stats dd{margin:4px 0 0;color:#E6E9EE;font:500 14px/1.3 var(--font-text);white-space:nowrap}
body.velar-lab .market-stats-last dd{display:flex;align-items:baseline;gap:6px;font:540 22px/1.1 var(--font-display)}
body.velar-lab #market-last{border-radius:2px;padding:0 2px;margin:0 -2px}
body.velar-lab .market-last-sign{font-size:12px}
body.velar-lab .market-quote-updated{font:400 11px/1.4 var(--font-text);color:#9AA3AF;align-self:baseline}
body.velar-lab .market-last-sign.is-up,body.velar-lab #market-24h-change.is-positive{color:var(--market-up)}
body.velar-lab .market-last-sign.is-down,body.velar-lab #market-24h-change.is-negative{color:var(--market-down)}
body.velar-lab #market-last[data-flash^="up"]{animation:.6s ease-out market-flash-up}
body.velar-lab #market-last[data-flash="up-b"]{animation-name:market-flash-up-b}
body.velar-lab #market-last[data-flash^="down"]{animation:.6s ease-out market-flash-down}
body.velar-lab #market-last[data-flash="down-b"]{animation-name:market-flash-down-b}
@keyframes market-flash-up{from{color:var(--market-up);background:rgba(47,212,154,.16)}}
@keyframes market-flash-up-b{from{color:var(--market-up);background:rgba(47,212,154,.16)}}
@keyframes market-flash-down{from{color:var(--market-down);background:rgba(255,92,92,.18)}}
@keyframes market-flash-down-b{from{color:var(--market-down);background:rgba(255,92,92,.18)}}

body.velar-lab .market-depth{grid-area:depth;min-width:0;display:grid;align-content:start;gap:16px}
body.velar-lab .market-depth>div{min-width:0;display:grid;gap:8px;align-content:start}
body.velar-lab .market-depth[hidden]{display:none}
body.velar-lab .market-depth h3{margin:0;font:500 13px/1.4 var(--font-text);color:#E6E9EE}
body.velar-lab :is(.market-book,.market-trades){width:100%;border-collapse:collapse;table-layout:fixed;font:12px/20px var(--font-text);font-variant-numeric:tabular-nums}
body.velar-lab :is(.market-book,.market-trades) th{color:#9AA3AF;font-weight:400;text-align:right;padding:0 0 4px}
body.velar-lab :is(.market-book,.market-trades) :is(th,td):first-child{text-align:left}
body.velar-lab :is(.market-book,.market-trades) td{padding:0;height:20px;text-align:right;color:#AEB6C2;white-space:nowrap;overflow:hidden}
body.velar-lab .book-ask td:first-child{color:var(--market-down)}
body.velar-lab .book-bid td:first-child{color:var(--market-up)}
body.velar-lab .book-ask{background:linear-gradient(to left,rgba(255,92,92,.14) var(--depth,0%),transparent var(--depth,0%))}
body.velar-lab .book-bid{background:linear-gradient(to left,rgba(47,212,154,.12) var(--depth,0%),transparent var(--depth,0%))}
body.velar-lab .book-mid td{height:32px;border-block:1px solid #161B24;color:#9AA3AF}
body.velar-lab #market-book-last{color:#F3F5F8;font:540 15px/1 var(--font-display)}
body.velar-lab #market-book-spread{color:#E6E9EE;font-weight:500}
body.velar-lab .market-tape{height:424px;overflow:hidden}
body.velar-lab .market-trades .trade-buy td:nth-child(2){color:var(--market-up)}
body.velar-lab .market-trades .trade-sell td:nth-child(2){color:var(--market-down)}
body.velar-lab #market-trades[data-slide="a"]{animation:.24s cubic-bezier(.22,1,.36,1) market-tape-a}
body.velar-lab #market-trades[data-slide="b"]{animation:.24s cubic-bezier(.22,1,.36,1) market-tape-b}
@keyframes market-tape-a{from{transform:translateY(calc(var(--fresh,1) * -20px))}}
@keyframes market-tape-b{from{transform:translateY(calc(var(--fresh,1) * -20px))}}
@media(max-width:900px){body.velar-lab .market-depth{grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:20px}body.velar-lab .market-tape{height:auto;max-height:424px}}
@media(max-width:600px){body.velar-lab .market-depth{grid-template-columns:minmax(0,1fr)}body.velar-lab .market-tape{max-height:224px}body.velar-lab .market-stats{gap:10px 20px}body.velar-lab .market-stats-last{flex-basis:100%}}
@media(prefers-reduced-motion:reduce){body.velar-lab :is(#market-last,#market-trades){animation:none!important}}
body.velar-lab[data-motion-pref="paused"] :is(#market-last,#market-trades){animation:none!important}
