/* journal / terminal pages — additions on top of ct.css (the copy-trade design
   system). Only tokens from ct.css are used, so every theme (typewriter, matrix,
   balatro) applies; nothing here redefines a ct.css rule. */

/* page nav: the .books pill group, but real links (no sliding indicator) */
.books.pages a { padding: 4px 12px; color: var(--muted); border-radius: var(--radius); text-decoration: none; white-space: nowrap;
  transition: color .25s ease, background-color .25s ease; }
.books.pages a:hover { color: var(--ink); }
.books.pages a.on { color: var(--accent-ink); background: var(--accent); }
:root[data-theme="balatro"] .books.pages a.on { box-shadow: 0 3px 0 #005fa8; }
@media (max-width: 640px) { .books.pages { flex-wrap: wrap; } }

.hero.one { grid-template-columns: minmax(0, 1fr); }
.chartcard.tall { min-height: 560px; }
.chartcard.tall .chart { min-height: 460px; }

/* inputs follow the tokens */
input, select, textarea { font: inherit; font-size: 13px; color: var(--ink); background: var(--sunk); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 4px 8px; }
input:focus, select:focus, textarea:focus { outline: 1px solid var(--accent); }
textarea { width: 100%; min-height: 84px; }
.toolbar, .filters { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 0 0 12px; font-size: 12px; color: var(--muted); }
.toolbar label, .filters label { display: inline-flex; gap: 6px; align-items: center; }
.btn { padding: 4px 12px; font-size: 12px; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.btn:hover { border-color: var(--accent); }
:root[data-theme="balatro"] .btn { background: #2f4145; border: 0; box-shadow: 0 3px 0 #0e1517; margin-bottom: 3px; }

/* data age line + named gaps */
.hint { font-size: 11px; color: var(--muted); text-transform: none; letter-spacing: 0; margin-left: 10px; }
.hint.stale { color: var(--neg); }
.sub { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.note.gap { color: var(--warn); }
.alerts .note { margin-bottom: 8px; }
tbody tr.clickable { cursor: pointer; }
td a, .sub-h a { color: var(--accent); text-decoration: none; border-bottom: 1px dotted currentColor; }
.kvrow { display: flex; flex-wrap: wrap; gap: 4px 20px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.kvrow > :first-child { min-width: 170px; color: var(--muted); }
ul.known { margin: 6px 0 0; padding-left: 18px; font-size: 12px; color: var(--muted); }
.fact-s { font-size: 11px; color: var(--muted); white-space: normal; }
.facts.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.facts.six .fact:nth-child(4) { padding-left: 0; border-left: 0; }
.facts.six .fact:nth-child(n+4) { border-top: 1px solid var(--line); }
.tf { font-size: 12px; color: var(--muted); }

/* calendar: day cells tinted from the pos/neg tokens */
.calgrid { display: grid; grid-template-columns: repeat(7, minmax(64px, 1fr)) minmax(88px, 1.1fr); gap: 4px; }
.calhead { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: center; padding-bottom: 2px; }
.calcell { min-height: 64px; padding: 4px 6px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 11px; background: var(--surface); overflow: hidden; }
.calcell .d { font-size: 10px; color: var(--muted); }
.calcell .n { font-size: 13px; font-weight: 700; }
.calcell.blank { background: transparent; border-style: dashed; opacity: .45; }
.calcell.wk { background: var(--sunk); }
.calcell.up1 { background: color-mix(in srgb, var(--pos) 12%, var(--surface)); }
.calcell.up2 { background: color-mix(in srgb, var(--pos) 24%, var(--surface)); }
.calcell.up3 { background: color-mix(in srgb, var(--pos) 38%, var(--surface)); }
.calcell.dn1 { background: color-mix(in srgb, var(--neg) 12%, var(--surface)); }
.calcell.dn2 { background: color-mix(in srgb, var(--neg) 24%, var(--surface)); }
.calcell.dn3 { background: color-mix(in srgb, var(--neg) 38%, var(--surface)); }
.calcell.mon { grid-column: 8; }
.alert.banner { align-items: flex-start; font-size: 12px; }
.alert.banner .banner-l > div + div { margin-top: 3px; }
@media (max-width: 640px) { .calgrid { grid-template-columns: repeat(7, minmax(40px, 1fr)); } .calcell.wk { display: none; } .calhead:last-child { display: none; }
  .calcell.wk.mon { display: block; grid-column: 1 / -1; } }

/* fill-arrow hover tooltip (chart + trade detail) */
.jr-tip { position: absolute; z-index: 5; max-width: 360px; max-height: 60%; overflow: auto; padding: 6px 9px; font-size: 12px; line-height: 1.5;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); }
.jr-tip-h { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.jr-tip-r { white-space: nowrap; }
.jr-tip-a { display: inline-block; margin-top: 2px; }

/* ---- order ticket (only exists once /api/trade/capabilities says trading is on) ---- */
.jr-tk { position: fixed; right: 14px; bottom: 14px; z-index: 50; font-family: var(--font); font-size: 12px; }
.jr-tk-fab { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 10px; cursor: pointer; opacity: .75; }
.jr-tk-fab:hover { opacity: 1; }
.jr-tk-panel { position: absolute; right: 0; bottom: 34px; width: 320px; max-height: 80vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.jr-tk-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.jr-tk-net { padding: 1px 6px; border-radius: var(--radius); font-size: 11px; border: 1px solid var(--line); }
.jr-tk-net.real, .jr-tk-net-big.real { color: var(--neg); border-color: var(--neg); }
.jr-tk-net.test, .jr-tk-net-big.test { color: var(--warn); border-color: var(--warn); }
.jr-tk-net-big { text-align: center; font-weight: bold; padding: 4px; border: 1px solid; border-radius: var(--radius); margin: 6px 0; }
.jr-tk-sub { color: var(--muted); margin: 4px 0; word-break: break-word; }
.jr-tk-sides, .jr-tk-two, .jr-tk-pct { display: flex; gap: 6px; margin: 6px 0; }
.jr-tk-two > *, .jr-tk-pct > * { flex: 1; }
.jr-tk-f { display: flex; flex-direction: column; gap: 2px; margin: 4px 0; color: var(--muted); }
.jr-tk-f input, .jr-tk-f select { background: var(--sunk); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 3px 5px; font: inherit; width: 100%; box-sizing: border-box; }
.jr-tk-side, .jr-tk-sm, .jr-tk-go { background: var(--sunk); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 8px; cursor: pointer; font: inherit; }
.jr-tk-side { flex: 1; }
.jr-tk-side.buy.on, .jr-tk-go.buy { background: var(--pos-soft); border-color: var(--pos); color: var(--pos); }
.jr-tk-side.sell.on, .jr-tk-go.sell { background: var(--neg-soft); border-color: var(--neg); color: var(--neg); }
.jr-tk-go { width: 100%; margin: 8px 0 4px; padding: 6px; }
.jr-tk-go:disabled, .jr-tk-sm:disabled { opacity: .5; cursor: default; }
.jr-tk-sm.neg { color: var(--neg); }
.jr-tk-msg { margin: 6px 0; padding: 4px 6px; border: 1px solid var(--line); border-radius: var(--radius); }
.jr-tk-msg.neg { color: var(--neg); border-color: var(--neg); }
.jr-tk-msg.warn { color: var(--warn); border-color: var(--warn); }
.jr-tk-msg.pos { color: var(--pos); border-color: var(--pos); }
.jr-tk-kv { display: flex; justify-content: space-between; gap: 8px; margin: 2px 0; }
.jr-tk-kv span { color: var(--muted); }
.jr-tk-sec { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 4px; }
.jr-tk-ord { display: flex; justify-content: space-between; align-items: center; margin: 2px 0; }
.jr-tk-more { margin-top: 6px; color: var(--muted); }
.jr-tk-chk { display: block; margin: 4px 0; color: var(--muted); }

/* ---- pixel coin icons (inline SVG from jr_app.js; colours are the theme tokens) ---- */
.jr-ico { width: 14px; height: 14px; flex: none; vertical-align: -2px; margin-right: 5px; image-rendering: pixelated; }
.jr-ico .pk { fill: var(--ink); }
.jr-ico .pa { fill: var(--accent); }
.jr-ico .pg { fill: var(--pos); }
.jr-ico .pr { fill: var(--neg); }
.jr-ico .py { fill: var(--gold, var(--warn)); }
.jr-ico .pm { fill: var(--muted); }

/* ---- real coin logos (Gabriel 2026-11-11): same-origin SVG files in static/coins/ (sources: SOURCES.md): crypto from
 * cryptocurrency-icons / Hyperliquid, the xyz HIP-3 markets are Hyperliquid's own tiles (app.hyperliquid.xyz/coins/xyz:*.svg).
 * Drawn as a CSS background so the page sets no src/href and no markup; a coin without a logo keeps its pixel icon ---- */
.jr-logo { display: inline-block; background: transparent center / contain no-repeat; border-radius: 50%; image-rendering: auto; overflow: hidden; }
.jr-logo-btc { background-image: url("coins/BTC.svg"); }
.jr-logo-eth { background-image: url("coins/ETH.svg"); }
.jr-logo-sol { background-image: url("coins/SOL.svg"); }
.jr-logo-hype { background-image: url("coins/HYPE.svg"); }
.jr-logo-doge { background-image: url("coins/DOGE.svg"); }
.jr-logo-sp500 { background-image: url("coins/SP500.svg"); }
.jr-logo-xyz100 { background-image: url("coins/XYZ100.svg"); }
.jr-logo-cl { background-image: url("coins/CL.svg"); }
.jr-logo-brentoil { background-image: url("coins/BRENTOIL.svg"); }
.jr-logo-tsla { background-image: url("coins/TSLA.svg"); }
.jr-logo-nvda { background-image: url("coins/NVDA.svg"); }
.jr-logo-sndk { background-image: url("coins/SNDK.svg"); }
.jr-logo-spcx { background-image: url("coins/SPCX.svg"); }
.jr-ico .ps { fill: var(--surface); }
.jr-coin { display: inline-flex; align-items: center; white-space: nowrap; }
.jr-ico-slot { display: inline-flex; align-items: center; }
.chart-t .jr-ico, .state .jr-ico { width: 16px; height: 16px; }

/* ---- ticket: coin dropdown, sliders, readout, always-open sections ---- */
.jr-tk-coin { display: flex; align-items: center; gap: 2px; }
.jr-tk-coin select { flex: 1; }
.jr-tk-f input[type="range"], .jr-tk-lev input[type="range"] { padding: 0; border: 0; background: transparent; accent-color: var(--accent); }
.jr-tk-ro { margin: 2px 0 6px; color: var(--ink); }
.jr-tk-ro b.neg { color: var(--neg); }
.jr-tk-h { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 10px; margin: 2px 0; }
.jr-tk-lev { display: flex; align-items: center; gap: 8px; }
.jr-tk-lev input[type="range"] { flex: 1; }
.jr-tk-levn { flex-direction: row; align-items: center; width: 64px; margin: 0; }
.jr-tk-pl { font-size: 11px; min-height: 13px; color: var(--muted); }
.jr-tk-pl.pos { color: var(--pos); }
.jr-tk-pl.neg { color: var(--neg); }
.jr-tk-levn input { width: 44px; }

/* ---- positions: split close button + inline confirm ---- */
.jr-split { display: inline-flex; white-space: nowrap; }
.jr-split button, .jr-cl-go { font: inherit; font-size: 11px; padding: 2px 8px; cursor: pointer; color: var(--ink); background: var(--sunk); border: 1px solid var(--line); }
.jr-split .jr-split-a { border-radius: var(--radius) 0 0 var(--radius); color: var(--neg); border-color: var(--neg); }
.jr-split .jr-split-b { border-radius: 0 var(--radius) var(--radius) 0; border-left: 0; }
.jr-split button:hover { background: var(--surface); }
.jr-cl-row { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.jr-parts .jr-part { color: var(--neg); border-color: var(--neg); border-left: 0; border-radius: 0; padding: 2px 6px; }
.jr-parts .jr-part:first-child { border-left: 1px solid var(--neg); border-radius: var(--radius) 0 0 var(--radius); }
.jr-parts .jr-part:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.jr-parts .jr-part:disabled { opacity: .4; cursor: not-allowed; }
.jr-sz-coin { display: block; font-size: 10px; color: var(--muted); }
.jr-cl-box { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 11px; max-width: 420px; white-space: normal; }
.jr-cl-what { color: var(--ink); }
.jr-cl-go { border-radius: var(--radius); }
.jr-cl-go.sell { background: var(--neg-soft); border-color: var(--neg); color: var(--neg); }
.jr-cl-go.buy { background: var(--pos-soft); border-color: var(--pos); color: var(--pos); }
.jr-cl-box .jr-tk-sm { font: inherit; font-size: 11px; padding: 1px 6px; cursor: pointer; background: var(--sunk); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); }

/* ---- limit close window ---- */
.jr-modal-bg { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; font-family: var(--font); font-size: 12px; }
.jr-modal { width: 420px; max-width: calc(100vw - 24px); max-height: 85vh; overflow: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.35); }
.jr-modal .jr-tk-head { gap: 8px; }
.jr-modal .jr-tk-head b { display: inline-flex; align-items: center; flex: 1; }
.jr-modal-x { padding: 0 6px; }

/* ---- positions tab: TP/SL column (HL "TP/SL  View Orders ✎") and the TP/SL edit window ---- */
.jr-tpsl { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.jr-tpsl .jr-tpsl-v { color: var(--muted); }
.jr-tpsl .jr-tpsl-v b { color: var(--ink); font-weight: 500; }
.jr-tpsl-pen { font: inherit; font-size: 12px; line-height: 1; padding: 1px 4px; cursor: pointer; color: var(--accent); background: transparent; border: 1px solid transparent; border-radius: var(--radius); }
.jr-tpsl-pen:hover { border-color: var(--line); }
.jr-tpsl-pen[disabled] { color: var(--muted); cursor: not-allowed; }
.jr-tpsl-leg { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 6px; }
.jr-tpsl-leg .jr-tk-two { align-items: end; }
.jr-tpsl-loud { font-weight: 700; border: 1px solid var(--neg); }

/* ---- terminal, desktop (>= 1400px): [ mini charts | the page as before | order ticket docked ] ----------------------
   Below 1400px none of this applies: the side columns are hidden, the page is one column, the ticket is the corner button. */
.tgrid { display: block; }
.dock-l, .dock-r { display: none; }
@media (min-width: 1400px) {
  .wrap:has(.tgrid) { max-width: 2000px; }
  .tgrid { display: flex; gap: 20px; align-items: flex-start; justify-content: center; }
  .tcentre { flex: 1 1 0; min-width: 0; max-width: 1240px; }
  .dock-l { display: block; flex: 0 0 236px; padding-top: 12px; }
  .dock-r { display: flex; flex-direction: column; gap: 12px; flex: 0 0 300px; padding-top: 12px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
  .dock-r > .jr-tk { order: 1; }
  .dock-r > .flow { order: 2; }
  .dock-r:empty { display: none; }
  .tcentre .hero { grid-template-columns: minmax(0, 1fr); }              /* a narrow centre: balance card above the chart */
}
@media (min-width: 1700px) { .tcentre .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* docked ticket: the same panel, in the right column instead of floating over the corner (no fab) */
.jr-tk.docked { position: static; right: auto; bottom: auto; z-index: auto; }
.jr-tk.docked .jr-tk-fab { display: none; }
.jr-tk.docked .jr-tk-panel { position: static; width: auto; max-height: none; overflow: visible; box-shadow: none; }

/* mini charts */
.mini-h { display: flex; justify-content: space-between; align-items: center; margin: 0 0 6px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.mini-ivs { display: flex; gap: 2px; }
.mini-ivs button { background: var(--sunk); color: var(--muted); border: 1px solid var(--line); border-radius: var(--radius); padding: 1px 6px; font: inherit; font-size: 11px; cursor: pointer; text-transform: none; letter-spacing: 0; }
.mini-ivs button.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.mini { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 10px; height: 200px; display: flex; flex-direction: column; overflow: hidden; }
.mini.lost { border-color: var(--neg); }
.mini-top { display: flex; align-items: center; gap: 6px; padding: 4px 8px; font-size: 12px; cursor: pointer; white-space: nowrap; min-height: 22px; }
.mini-top:hover { background: var(--sunk); }
.mini-top .mini-sz { color: var(--muted); }
.mini-top .mini-pnl { margin-left: auto; font-weight: bold; }
.mini-top a { color: var(--muted); font-size: 11px; text-decoration: underline; margin-left: 4px; }
.mini-top .jr-coin { font-weight: bold; }
.mini-chart { flex: 1 1 auto; min-height: 0; position: relative; }
.mini-st { padding: 1px 8px; font-size: 10px; color: var(--muted); min-height: 14px; }
.mini.lost .mini-st { color: var(--neg); font-weight: bold; }
/* TP/SL window, round 6: one box per leg, size slider, market | limit SL */
.jr-tpsl-row { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.jr-tpsl-row input:not([type="range"]) { background: var(--sunk); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 3px 5px; font: inherit; width: 96px; box-sizing: border-box; }
.jr-tpsl-row input[type="range"] { flex: 1; accent-color: var(--accent); }
.jr-tpsl-k { width: 22px; font-weight: 600; }
.jr-tpsl-sz { color: var(--muted); font-size: 11px; white-space: nowrap; min-width: 110px; text-align: right; }
.jr-tpsl-modes { display: inline-flex; }
.jr-tpsl-mode { font: inherit; font-size: 11px; padding: 2px 6px; cursor: pointer; color: var(--muted); background: var(--sunk); border: 1px solid var(--line); }
.jr-tpsl-mode:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.jr-tpsl-mode:last-child { border-radius: 0 var(--radius) var(--radius) 0; border-left: 0; }
.jr-tpsl-mode.on { color: var(--ink); background: var(--surface); border-color: var(--accent); }
.jr-tpsl-mode[disabled] { cursor: not-allowed; opacity: .5; }
.jr-tpsl-lim { font-size: 11px; color: var(--muted); }
.jr-tpsl-limv { color: var(--ink); }
.jr-tpsl-row input.jr-tpsl-off { width: 42px; padding: 1px 3px; font-size: 11px; }
.jr-tpsl-plan { margin: 8px 0 4px; font-size: 11px; color: var(--ink); min-height: 13px; }
.jr-tpsl-step { margin: 4px 0; font-weight: 500; }
/* mini charts: price-line tags at the LEFT edge (round 6), so the forming candle on the right stays visible */
.mini-tags { position: absolute; left: 2px; top: 0; bottom: 0; width: 0; z-index: 3; pointer-events: none; }
.mini-tag { position: absolute; left: 0; font-size: 9px; line-height: 12px; padding: 0 2px; border: 1px solid; border-radius: 2px; background: var(--surface); white-space: nowrap; }

/* ---- aggr BTC flow (W323): Gabriel's aggr counters under the docked ticket, desktop >= 1400px only ---------------------
   One row per step: buy vs sell bar, $buy / $sell, delta. 15m emphasised. A GAP / short / silent tag, never a zero. */
.flow { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: 12px; }
.fl-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; margin-bottom: 6px; }
.fl-h .hint { margin-left: 0; }
.fl-t { font-weight: 600; letter-spacing: .02em; }
.fl-rows { display: flex; flex-direction: column; gap: 3px; }
.fl-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; padding: 3px 0; font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--line); }
.fl-row:last-child { border-bottom: 0; }
.fl-row .fl-step { grid-row: 1 / span 2; align-self: center; }
.fl-row .fl-bar { grid-column: 2 / 4; }
.fl-row .fl-v { grid-column: 2; grid-row: 2; overflow: hidden; text-overflow: ellipsis; }
.fl-row .fl-d { grid-column: 3; grid-row: 2; }
.fl-row .fl-tags { grid-column: 2 / 4; grid-row: 3; display: flex; gap: 4px; flex-wrap: wrap; }
.fl-row.em { padding: 5px 4px; margin: 2px -4px; border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: inset 2px 0 0 var(--accent); font-weight: 600; font-size: 13px; }
.fl-row.em .fl-bar { height: 9px; }
.fl-step { color: var(--muted); }
.fl-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--line); }
.fl-bar .fl-b { background: var(--pos); }
.fl-bar .fl-s { background: var(--neg); }
.fl-row.isgap .fl-bar { opacity: .45; }
.fl-v { white-space: nowrap; }
.fl-d { text-align: right; white-space: nowrap; }
.fl-tag { font-size: 10px; padding: 0 5px; border-radius: 3px; border: 1px solid currentColor; text-transform: uppercase; letter-spacing: .04em; }
.fl-tag.gap { color: var(--neg); }
.fl-tag.short, .fl-tag.silent { color: var(--warn); }
.fl-alert { margin: 0 0 8px; padding: 6px 8px; color: var(--neg); border-left: 3px solid var(--neg); font-weight: 600; }
.fl-foot { margin-top: 6px; color: var(--muted); font-size: 11px; }
.fl-foot.warn > div { color: var(--warn); }

/* ---- every theme (theme round, Gabriel 2026-11-14): the wordmark's Hyperliquid mark, cards arriving, a press ----
   The mark is static/coins/HYPE.svg (the same file the coin logos use), drawn as a CSS background. It turns about its
   vertical axis once every 8 s: MEASURED on the Iris Xe, a turn without a pause keeps the compositor drawing 60 frames
   a second for good (24-34 s of GPU-process CPU per minute against ~10 s with the pause). Transform / opacity only;
   nothing moves under prefers-reduced-motion (ct.css also cuts every animation there). */
.brand { display: inline-flex; align-items: center; }
.brand-logo { display: inline-block; width: 18px; height: 18px; margin-right: 8px; flex: none; background: url("coins/HYPE.svg") center / contain no-repeat; }
@media (prefers-reduced-motion: no-preference) {
  .brand-logo { animation: jr-coin 8s cubic-bezier(.45, 0, .2, 1) infinite; }
  @keyframes jr-coin { 0%, 80% { transform: perspective(120px) rotateY(0deg); } 100% { transform: perspective(120px) rotateY(360deg); } }
  .dock-l, .dock-r > *, .tabs { animation: rise .5s ease both; }
  .btn:active, .rng:active { transform: translateY(1px) scale(.985); }      /* not the order-entry buttons: a moved target can swallow a click */
}

/* W333 footprint layer on the chart tab (drawn by the chart as a series primitive), its chips and the legend under it */
.fp-chips { display: inline-flex; gap: 4px; margin-left: 6px; }
.rng.fp-chip[disabled] { opacity: .45; cursor: not-allowed; }
.fp-legend { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 6px; font-size: 11px; line-height: 1.5; color: var(--muted); }
.fp-legend .fp-w { color: var(--neg); }
/* chart overhaul r1: the chart chrome (autoscale / log / now) and the chart's keyboard focus */
.ch-ctl { display: inline-flex; gap: 4px; margin-left: 8px; }
.chart:focus { outline: none; }
.chart:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
/* W341: the chart tab (and aggr mode) fills the window below the header: full width, to the bottom, no page scrollbar.
   Anything taller than the window (many banner lines) scrolls inside the page area instead of pushing the chart off. */
body:has(#jr[data-page="chart"]) { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
body:has(#jr[data-page="chart"]) > .bar { flex: 0 0 auto; }
.wrap:has(> #jr[data-page="chart"]) { flex: 1 1 auto; min-height: 0; width: 100%; max-width: none; padding: 10px 14px 12px; display: flex; flex-direction: column; overflow: auto; }
#jr[data-page="chart"] { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
#jr[data-page="chart"] > .alerts, #jr[data-page="chart"] > .pulse { flex: 0 0 auto; }
#jr[data-page="chart"] > .hero.one { flex: 1 1 auto; min-height: 0; display: flex; padding: 0; }
#jr[data-page="chart"] .chartcard.tall { flex: 1 1 auto; min-height: 320px; width: 100%; }
#jr[data-page="chart"] .chartcard.tall .chart { flex: 1 1 0; min-height: 220px; }
#jr[data-page="chart"] .chartcard.tall .toolbar { margin-bottom: 6px; }
@media (max-width: 640px) { .wrap:has(> #jr[data-page="chart"]) { padding: 8px 8px 10px; } }
/* type-to-switch: what is being typed, over the chart (display only, never takes the pointer) */
.jr-type { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); z-index: 6; pointer-events: none; min-width: 180px;
  padding: 14px 30px 12px; text-align: center; background: var(--surface); border: 1px solid var(--accent); border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
.jr-type[hidden] { display: none; }
.jr-type-buf { font-size: 46px; line-height: 1.1; font-weight: 700; letter-spacing: .06em; color: var(--ink); }
.jr-type-to { margin-top: 4px; font-size: 14px; color: var(--muted); }
.jr-type-to.ok { color: var(--accent); }
.jr-type-to.no { color: var(--neg); }
.rng.tf-tmp { outline: 1px dashed var(--accent); outline-offset: -1px; }

/* subaccounts (terminal round): account tag, coin groups with a net line, margin strip, close all accounts, ticket picker */
.jr-acct { display: inline-block; margin-left: 4px; padding: 0 5px; font-size: 10px; line-height: 15px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--mute, var(--ink)); white-space: nowrap; }
tr.jr-grp td { border-bottom-color: transparent; }
tr.jr-net td { font-weight: 600; border-top: 1px dashed var(--line); }
.jr-net-l { font-size: 11px; letter-spacing: .02em; }
.jr-mstrip { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.jr-mchip { display: inline-flex; gap: 8px; align-items: baseline; padding: 3px 8px; font-size: 11px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--sunk); }
.jr-mchip.empty { opacity: .7; }
.jr-closeall { flex-direction: column; align-items: flex-start; }
.jr-closeall-b { border-radius: var(--radius); color: var(--neg); border: 1px solid var(--neg); background: transparent; font: inherit; font-size: 11px; padding: 1px 8px; cursor: pointer; }
.jr-tk-acct select { min-width: 9em; }

/* ---- Lighter venue (W347, read-only) -------------------------------------------------------------------------------- */
.lt-info { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 4px 2px 0; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lt-info b { font-weight: 600; color: var(--text, inherit); }
.lt-venues { display: inline-flex; gap: 4px; margin-right: 8px; }
.rng.off { opacity: .55; cursor: default; }
.lt-thin { display: inline-block; padding: 0 6px; border: 1px solid var(--line); border-radius: 9px; font-size: 11px; white-space: nowrap; }
.lt-thin.amber { color: var(--warn); border-color: var(--warn); }
.lt-thin.red { color: var(--neg); border-color: var(--neg); }
.lt-thin.ok { color: var(--muted); }
.lt-legend { font-size: 12px; color: var(--muted); margin: 4px 0 8px; }
.lt-search { width: min(320px, 100%); margin: 0 0 8px; padding: 5px 8px; font: inherit; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: inherit; }
.lt-sort, .lt-pick { all: unset; cursor: pointer; }
.lt-sort.on { text-decoration: underline; }
.lt-pick { font-weight: 600; }
.lt-pick.on { text-decoration: underline; }
.lt-table td, .lt-table th { white-space: nowrap; }
.lt-sort:focus-visible, .lt-pick:focus-visible { outline: 1px solid var(--muted); outline-offset: 2px; }
/* the Lighter view keeps the chart card at a fixed share of the screen and lets the markets / account panel scroll under it */
#jr.lt-venue[data-page="chart"] > .hero.one { flex: 0 0 auto; height: 64vh; height: 64dvh; min-height: 440px; }
#jr.lt-venue[data-page="chart"] > .tabs, #jr.lt-venue[data-page="chart"] > .panel { flex: 0 0 auto; }
#jr.lt-venue .chartcard.tall { display: flex; flex-direction: column; }
#jr.lt-venue .chartcard.tall .chart { flex: 1 1 auto; min-height: 280px; }
.lt-info { flex: 0 0 auto; }

/* ---- studies (W350): layout picker, studies panel, legends, subpanes ------------------------------------------------- */
.ind-ctl { display: inline-flex; gap: 4px; align-items: center; margin-left: 8px; }
.ind-layout { font-size: 12px; padding: 1px 6px; }
.chartcard.tall { position: relative; }
.ind-legend { position: absolute; left: 6px; top: 4px; z-index: 4; display: flex; flex-direction: column; gap: 1px; max-width: calc(100% - 96px);
  font-size: 11px; line-height: 1.35; pointer-events: none; font-variant-numeric: tabular-nums; }
.ind-legend[hidden] { display: none; }
.ind-row { display: flex; gap: 6px; align-items: baseline; white-space: nowrap; overflow: hidden; align-self: flex-start; max-width: 100%;
  padding: 0 4px; border-radius: 3px; background: color-mix(in srgb, var(--opaque, var(--surface)) 72%, transparent); }
.ind-row.off { opacity: .5; }
.ind-sw { flex: 0 0 auto; display: inline-block; width: 10px; height: 3px; align-self: center; border-radius: 2px; }
.ind-name { all: unset; cursor: pointer; pointer-events: auto; color: var(--muted); }
.ind-name:hover { color: var(--ink); }
.ind-vals { color: var(--ink); }
.ind-note { color: var(--warn); overflow: hidden; text-overflow: ellipsis; }
/* chart P3: the Flow stat strip above the chart (text only) */
.ind-strip { display: flex; flex-wrap: wrap; gap: 2px 14px; padding: 3px 6px; border-bottom: 1px solid var(--line); font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); }
.ind-strip[hidden] { display: none; }
.ind-strip b { font-weight: 400; color: var(--muted); margin-right: 5px; }
.ind-strip i { font-style: normal; font-variant-numeric: tabular-nums; }
.ind-pane { position: relative; flex: 1 1 0; min-height: 48px; margin-top: 2px; border-top: 1px solid var(--line); }
.ind-pane.collapsed { flex: 0 0 24px; min-height: 24px; overflow: hidden; }
.ind-pane[hidden], .ind-sep[hidden] { display: none; }
.ind-sep { flex: 0 0 6px; height: 6px; margin: 1px 0; cursor: ns-resize; position: relative; touch-action: none; user-select: none; }
.ind-sep::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); transition: background-color .12s ease; }
.ind-sep:hover::after, .ind-sep.dragging::after { height: 2px; background: var(--accent, var(--ink)); }
.ind-col { all: unset; position: absolute; right: 66px; top: 3px; z-index: 5; display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 3px; cursor: pointer; color: var(--muted); background: color-mix(in srgb, var(--opaque, var(--surface)) 78%, transparent); }
.ind-col:hover { color: var(--ink); }
.jr-svg-ico { width: 13px; height: 13px; display: inline-block; vertical-align: -2px; flex-shrink: 0; }
.ind-panel { position: absolute; right: 16px; top: 44px; z-index: 8; width: min(390px, calc(100% - 32px)); max-height: calc(100% - 60px); overflow: auto;
  padding: 10px 12px; font-size: 12px; background: var(--opaque, var(--surface)); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
.ind-panel[hidden] { display: none; }
.ind-ph { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.ind-x, .ind-gear { all: unset; cursor: pointer; color: var(--muted); padding: 0 4px; }
.ind-x { font-size: 16px; }
.ind-x:hover, .ind-gear:hover { color: var(--ink); }
.ind-g { margin: 10px 0 2px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ind-item { padding: 4px 0; border-bottom: 1px dashed var(--line); }
.ind-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ind-lab { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; color: var(--ink); }
.ind-help { margin: 1px 0 0 22px; font-size: 11px; color: var(--muted); }
.ind-box { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 6px 0 2px 22px; }
.ind-box[hidden] { display: none; }
.ind-f, .ind-st { display: inline-flex; gap: 4px; align-items: center; color: var(--muted); }
.ind-f input[type="number"] { width: 5.5em; }
.ind-st input[type="color"] { width: 26px; height: 20px; padding: 0; border: 1px solid var(--line); }
.ind-pnote { margin: 4px 0; font-size: 11px; color: var(--muted); }
.ind-pnote.neg { color: var(--neg); }
.ind-pf { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.ind-gear:focus-visible, .ind-x:focus-visible, .ind-name:focus-visible { outline: 1px solid var(--accent); outline-offset: 1px; }
/* with subpanes the main chart takes 3.1 shares and each pane 1: with the maximum of 3 panes it keeps more than half */
#jr .chartcard.tall.ind-has-panes > .chart { flex: 3.1 1 0; min-height: 150px; }
/* the Lighter view keeps its chart card at a fixed share of the screen: with subpanes that share grows so they fit inside it */
#jr.lt-venue[data-page="chart"] > .hero.one:has(.ind-has-panes) { height: 86vh; height: 86dvh; min-height: 620px; }
/* default Lighter chart matches HL full-viewport height so RSI / subpanes never squeeze; bottom markets/account drawer stays hidden unless opened */
#jr.lt-venue:not(.lt-drawer) > .tabs, #jr.lt-venue:not(.lt-drawer) > .panel { display: none; }
#jr.lt-venue:not(.lt-drawer)[data-page="chart"] > .hero.one,
#jr.lt-venue:not(.lt-drawer)[data-page="chart"] > .hero.one:has(.ind-has-panes) { flex: 1 1 auto; height: auto; min-height: 0; }
#jr.lt-venue:not(.lt-drawer) .chartcard.tall .chart { min-height: 150px; }
#jr.lt-venue:not(.lt-drawer) .chartcard.tall.ind-has-panes > .chart { flex: 3.1 1 0; min-height: 150px; }
/* on a phone the chart header wraps, so the layout picker and the studies button stay reachable */
@media (max-width: 640px) { #jr[data-page="chart"] .chart-h { flex-wrap: wrap; gap: 4px; } #jr[data-page="chart"] .chart-h .ranges { flex-wrap: wrap; } }

/* ---- drawings (W355): tools in the coin row, the selected drawing's controls on the chart ---------------------------- */
.dr-bar { display: inline-flex; flex-wrap: wrap; gap: 2px; align-items: center; margin-left: 8px; }
.dr-bar .rng { font-size: 12px; line-height: 1.3; }
.rng.dr-t { min-width: 1.9em; text-align: center; }
.rng.dr-t[disabled], .rng.dr-x[disabled] { opacity: .45; cursor: not-allowed; }
.rng.dr-x.dr-warn { color: var(--neg); outline: 1px solid var(--neg); outline-offset: -1px; }
.dr-stat { margin-left: 6px; font-size: 11px; color: var(--muted); }
.dr-stat.neg { color: var(--neg); }
.dr-insp { position: absolute; left: 6px; bottom: 34px; z-index: 5; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; max-width: calc(100% - 90px);
  padding: 4px 6px; font-size: 12px; color: var(--muted); background: var(--opaque, var(--surface)); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .18); }
.dr-insp b { color: var(--ink); font-weight: 600; }
.dr-insp .dr-label { width: 14em; max-width: 100%; padding: 1px 6px; }
.dr-insp .dr-ext { padding: 1px 4px; }
.dr-insp .rng.dr-del { color: var(--neg); }
.dr-chk { display: inline-flex; gap: 4px; align-items: center; }
#jr .chart.dr-tool * { cursor: crosshair !important; }
#jr .chart.dr-hov * { cursor: move !important; }
/* chart polish r1: a box side handle resizes one axis only */
#jr .chart.dr-ew * { cursor: ew-resize !important; }
#jr .chart.dr-ns * { cursor: ns-resize !important; }
/* chart polish r2: the box ladder panel (gated order script) floats top-right over the chart; its stop line is dragged with ns-resize */
.jr-ld { position: absolute; right: 64px; top: 8px; z-index: 6; width: 430px; max-width: calc(100% - 80px); max-height: calc(100% - 60px); overflow: auto;
  padding: 8px 10px; font-size: 12px; color: var(--ink); background: var(--opaque, var(--surface)); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.jr-ld-hd { display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px; }
.jr-ld-hd b { font-weight: 600; }
.jr-ld-x { margin-left: auto; background: none; border: 0; color: var(--muted); font: inherit; font-size: 15px; cursor: pointer; }
.jr-ld-sub { color: var(--muted); font-size: 11px; }
.jr-ld-f { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 4px 0; }
.jr-ld-f > span:first-child { width: 6.5em; color: var(--muted); }
.jr-ld-in { background: var(--sunk); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 2px 6px; font: inherit; max-width: 15em; }
.jr-ld-t { width: 100%; border-collapse: collapse; margin: 6px 0; font-variant-numeric: tabular-nums; }
.jr-ld-t th, .jr-ld-t td { text-align: right; padding: 2px 4px; border-bottom: 1px solid var(--line); white-space: normal; overflow-wrap: anywhere; }
.jr-ld-t th:first-child, .jr-ld-t td:first-child, .jr-ld-t td:nth-child(2):not(:last-child) { text-align: left; }
.jr-ld-t td:first-child { white-space: nowrap; overflow-wrap: normal; }
.jr-ld-t th { color: var(--muted); font-weight: 500; }
.jr-ld-kv { display: flex; justify-content: space-between; gap: 8px; margin: 2px 0; }
.jr-ld-kv span { color: var(--muted); }
.jr-ld-msg { margin: 4px 0; padding: 3px 6px; border-radius: 6px; }
.jr-ld-msg.neg, .jr-ld .neg { color: var(--neg); }
.jr-ld-msg.warn { color: var(--muted); background: var(--sunk); }
.jr-ld .pos { color: var(--pos); }
.jr-ld-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.jr-ld-go, .jr-ld-sm { background: var(--sunk); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 10px; cursor: pointer; font: inherit; }
.jr-ld-go.buy { background: var(--pos-soft); border-color: var(--pos); color: var(--pos); }
.jr-ld-go.sell { background: var(--neg-soft); border-color: var(--neg); color: var(--neg); }
.jr-ld-go:disabled, .jr-ld-sm:disabled { opacity: .5; cursor: default; }
.dr-insp .rng.dr-act { color: var(--accent, var(--ink)); }
/* chart P4: the flow reader card (text only; read-only context) */
/* top-left: the last item of the main legend column (.ind-legend), so it sits under the legend rows and clear of the top-right
 * box-ladder panel (.jr-ld) and the bottom-left drawing inspector (.dr-insp); jr_app.js caps its height above the bottom band */
.rd-card { position: relative; align-self: flex-start; margin-top: 4px; pointer-events: auto; width: 310px; max-width: 100%; overflow: auto; box-sizing: border-box;
  padding: 6px 9px 7px; font: 11px/1.45 var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace); color: var(--ink);
  background: color-mix(in srgb, var(--opaque, var(--surface)) 90%, transparent); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 6px; }
.rd-card[hidden] { display: none; }
.rd-card.min { width: auto; max-width: 340px; }
.rd-card.rd-up, .rd-card.rd-up2 { border-left-color: var(--pos, #26a69a); }
.rd-card.rd-dn, .rd-card.rd-dn2 { border-left-color: var(--neg, #ef5350); }
.rd-card.rd-sq { border-left-color: #c9b37e; } .rd-card.rd-fl { border-left-color: #b07acc; } .rd-card.rd-abs { border-left-color: var(--ink); }
.rd-h { display: flex; gap: 8px; align-items: baseline; }
.rd-h b { font-weight: 600; letter-spacing: .08em; font-size: 10px; color: var(--muted); }
.rd-ro { flex: 1; font-size: 10px; color: var(--muted); }
.rd-x, .rd-clr { all: unset; cursor: pointer; color: var(--muted); padding: 0 4px; }
.rd-x:hover, .rd-clr:hover { color: var(--ink); }
.rd-clr { text-decoration: underline; }
.rd-s { font-size: 13px; font-weight: 600; margin-top: 2px; }
.rd-t { color: var(--muted); font-size: 10px; }
.rd-m { margin: 1px 0 3px; }
.rd-r { margin: 3px 0; padding-left: 14px; } .rd-r li { margin: 1px 0; }
.rd-ev { display: grid; gap: 0 8px; margin: 4px 0; padding-top: 3px; border-top: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
.rd-e { display: flex; gap: 8px; } .rd-e b { font-weight: 400; color: var(--muted); min-width: 64px; } .rd-e i { font-style: normal; }
.rd-c { color: var(--muted); border-top: 1px dashed var(--line); padding-top: 3px; }
.rd-g { color: var(--warn); }
.rd-f { margin-top: 4px; color: var(--muted); font-size: 10px; }

/* ---- unified HL + LIT terminal & venue selector (lighter_p2) ---- */
.dock-r > .jr-venue-bar { order: 0; }
.dock-r > .jr-lt-tk { order: 1; }
.jr-venue-bar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; font-family: var(--font); font-size: 12px; }
.jr-venue-bar .jr-tk-f { margin: 0; }
.jr-lt-tk.docked { position: static; right: auto; bottom: auto; z-index: auto; }
.jr-lt-tk.docked .jr-tk-fab { display: none; }
.jr-lt-tk.docked .jr-tk-panel { position: static; inset: auto; width: auto; max-height: none; overflow: visible; box-shadow: none; }
.jr-tk-inline { display: flex; gap: 4px; align-items: center; margin: 4px 0; flex-wrap: wrap; }
.jr-tk-inline input, .jr-tk-inline select { background: var(--sunk); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 3px 5px; font: inherit; min-width: 0; flex: 1; box-sizing: border-box; }
.jr-tk-tif { width: 88px; flex: 0 0 auto; }
.jr-acct.lit, .jr-mchip.lit b { color: var(--accent); border-color: var(--accent); }
.jr-stat-shared { margin: 6px 0 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--sunk); font-size: 11.5px; display: flex; flex-direction: column; gap: 3px; }
.jr-stat-shared .jr-tk-kv { margin: 0; }
.jr-tk input[type="number"]::-webkit-outer-spin-button,
.jr-tk input[type="number"]::-webkit-inner-spin-button,
.jr-modal input[type="number"]::-webkit-outer-spin-button,
.jr-modal input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.jr-tk input[type="number"], .jr-modal input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.lt-fav-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 8px; }
.lt-fav-bar .lt-search { margin: 0; }
.lt-orders-sec { margin-top: 8px; }

/* ---- chart right-click context menu & collapsible right-side watchlist ---- */
#jr[data-page="chart"] > .hero.one { display: flex; gap: 8px; align-items: stretch; }
#jr[data-page="chart"] > .hero.one > .chartcard { flex: 1 1 auto; min-width: 0; }
.jr-wl { flex: 0 0 248px; width: 248px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-card, var(--radius)); overflow: hidden; font-size: 12px; }
.jr-wl[hidden] { display: none; }
.jr-wl-h { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 6px; border-bottom: 1px solid var(--line); }
.jr-wl-h b { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.jr-wl-tabs { display: flex; gap: 4px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.jr-wl-tab { all: unset; cursor: pointer; font-size: 11px; padding: 2px 8px; border: 1px solid transparent; border-radius: var(--radius); color: var(--muted); }
.jr-wl-tab:hover { color: var(--ink); }
.jr-wl-tab.on { color: var(--accent, var(--ink)); border-color: var(--line-2, var(--line)); background: var(--sunk); }
.jr-wl-list { flex: 1 1 auto; overflow-y: auto; padding: 4px; display: flex; flex-direction: column; gap: 1px; }
.jr-wl-row { all: unset; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: var(--radius);
  font-variant-numeric: tabular-nums; box-sizing: border-box; width: 100%; }
.jr-wl-row:hover { background: var(--sunk); }
.jr-wl-row.on { background: var(--sunk); outline: 1px solid var(--line-2, var(--line)); outline-offset: -1px; }
.jr-wl-sym { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.jr-wl-pos { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.jr-wl-pos.pos { background: var(--pos); }
.jr-wl-pos.neg { background: var(--neg); }
.jr-wl-px { margin-left: auto; text-align: right; color: var(--muted); transition: color .2s ease; }
.jr-wl-row.on .jr-wl-px { color: var(--ink); }
.jr-wl-px.tick-up { color: var(--pos); }
.jr-wl-px.tick-dn { color: var(--neg); }
.jr-wl-btn { display: inline-flex; align-items: center; gap: 4px; }

.jr-ctx { position: fixed; z-index: 40; min-width: 224px; padding: 6px; background: var(--opaque, var(--surface)); border: 1px solid var(--line-2, var(--line));
  border-radius: var(--radius-card, var(--radius)); box-shadow: 0 12px 32px rgba(0, 0, 0, .35); font-size: 12px; color: var(--ink); user-select: none; }
.jr-ctx[hidden] { display: none; }
.jr-ctx-lays { display: flex; gap: 4px; padding: 2px 2px 4px; }
.jr-ctx-seg { all: unset; flex: 1; text-align: center; cursor: pointer; font-size: 11px; padding: 3px 6px; border-radius: var(--radius);
  color: var(--muted); border: 1px solid var(--line); }
.jr-ctx-seg:hover { color: var(--ink); background: var(--sunk); }
.jr-ctx-seg.on { color: var(--accent, var(--ink)); border-color: var(--accent, var(--ink)); }
.jr-ctx-sep { height: 1px; margin: 4px 0; background: var(--line); }
.jr-ctx-it { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: var(--radius); cursor: pointer; }
.jr-ctx-it:hover { background: var(--sunk); }
.jr-ctx-i { width: 14px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.jr-ctx-l { flex: 1 1 auto; white-space: nowrap; }
.jr-ctx-k { margin-left: auto; font-size: 10px; color: var(--muted); padding-left: 12px; }
.jr-ctx-chk { margin-left: auto; color: var(--accent, var(--ink)); display: inline-flex; align-items: center; }

@media (max-width: 760px) {
  #jr[data-page="chart"] > .hero.one { flex-direction: column; }
  .jr-wl { width: auto; flex: 0 0 auto; max-height: 240px; }
}

/* ---- drawing price alerts floating dialog & list ---- */
.jr-al-list { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; max-height: 240px; overflow-y: auto; }
.jr-al-row { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--sunk); }
.jr-al-main { all: unset; flex: 1 1 auto; min-width: 0; cursor: pointer; display: flex; flex-direction: column; gap: 2px; font-variant-numeric: tabular-nums; }
.jr-al-main:hover b { color: var(--accent, var(--ink)); }
.jr-al-st { font-size: 10px; padding: 1px 5px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); white-space: nowrap; }
.jr-al-st.on { color: var(--ink); border-color: var(--accent, var(--line-2)); }
.jr-al-st.done { color: var(--pos); border-color: var(--pos); }

/* ---- top-bar status ribbon (jr_ribbon.js): ONE line between the page links and "updated", inside the bar's own height
   (never taller than the links: no chart height lost). Pills split by 1px hairlines; numbers mono + tabular in fixed-width
   cells, so the 1 s tick changes text, never the layout. Lower-priority pills leave first as the window narrows. ---- */
.rb { flex: 1 1 0; min-width: 0;   /* basis 0: the ribbon only ever takes the free space; the links and "updated" keep theirs */
  display: flex; align-items: center; justify-content: flex-end; height: 24px; margin: 0 8px 0 16px;
  overflow: hidden; white-space: nowrap; font-family: var(--font, ui-monospace, monospace); font-size: 11px; line-height: 16px;
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; color: var(--muted); contain: layout paint; }
.rb[hidden] { display: none; }
.rb-p { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 24px; padding: 0 8px; margin: 0; border: 0; border-left: 1px solid var(--line);
  border-radius: 0; background: transparent; color: inherit; font: inherit; letter-spacing: 0; cursor: pointer; }
.rb-p:first-child, .rb-p.rb-first { border-left: 0; }   /* rb-first: the first VISIBLE pill (jr_ribbon.js fit) */
.rb-p[hidden], .rb-p > [hidden] { display: none; }
.rb-p:hover { color: var(--ink); }
span.rb-p { cursor: default; }
.rb-l { color: var(--faint); font-family: var(--font-head, inherit); font-weight: 300; letter-spacing: .04em; }
.rb-v { color: var(--ink); }
.rb-mu { color: var(--faint); }
.rb-warn { color: var(--warn, var(--muted)); }   /* a venue not read (HL — / LIT — / LIT 1/2): never left to read as FLAT */
.rb-n { display: inline-block; min-width: 6ch; text-align: right; }
.rb-b { display: inline-block; min-width: 6ch; color: var(--ink); letter-spacing: .04em; }
.rb-up { display: inline-block; min-width: 19ch; text-align: right; }
.rb-d { display: inline-block; min-width: 11ch; margin-left: 4px; text-align: right; }   /* 12px from the up-next countdown */
.rb-t { display: inline-block; min-width: 8ch; }
.rb-z { display: inline-block; min-width: 4ch; }
.rb-soon { color: var(--ink); box-shadow: inset 0 -1px 0 var(--accent); }
.rb-bar { position: relative; display: inline-block; width: 32px; height: 2px; background: var(--neg); }
.rb-bar > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--pos); }
.rb-bar.na { background: var(--line-2, var(--line)); }
.rb .pos { color: var(--pos); } .rb .neg { color: var(--neg); } .rb .zero { color: var(--muted); }
/* the read-only glance under a pill: hairline box, opaque, rows on a 4 / 8 px grid */
.rb-pop { position: absolute; top: 100%; right: 8px; z-index: 30; min-width: 248px; max-width: min(420px, calc(100vw - 16px)); margin-top: 1px; padding: 4px 0;
  background: var(--opaque, var(--bg)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  font-family: var(--font, ui-monospace, monospace); font-size: 11px; line-height: 16px; font-variant-numeric: tabular-nums; color: var(--muted); }
.rb-pop[hidden] { display: none; }
.rb-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, auto); grid-template-columns: minmax(8ch, 1fr); gap: 16px; padding: 2px 12px; white-space: nowrap; }
.rb-row + .rb-row { border-top: 1px solid var(--line); }
.rb-row .rb-n { min-width: 0; }
.rb-pop-pos .rb-row { grid-auto-flow: row; grid-template-columns: minmax(3ch, auto) minmax(4ch, auto) minmax(10ch, 1fr) 8ch 8ch; }
.rb-pop-pos .rb-row > .rb-all { grid-column: 1 / -1; }   /* a one-cell line (FLAT, POS —, a venue not read) spans the row */
.rb-pop-ses .rb-row { grid-auto-flow: row; grid-template-columns: minmax(12ch, 1fr) 6ch 9ch; }
.rb-pop .rb-foot { display: flex; justify-content: space-between; }
.rb-r { text-align: right; }
.rb-k { color: var(--ink); }
.rb-go { justify-self: end; color: var(--muted); text-decoration: none; }
.rb-go:hover { color: var(--ink); }
/* narrow: jr_ribbon.js fit() drops pills (aggr, 1D, session, positions, then the clock) by measuring, so no theme ever clips one; phones
   (the bar wraps there) show no ribbon at all */
.rb .rb-fit { display: none; }
@media (max-width: 860px) { .rb { display: none; } }
