/* Forex Trading Simulator (forex-trading-simulator.aspx), live only.
   Base shell rules mirror live-trading-simulator.aspx's inline block; the rest is the
   forex panel ("B - margin-led ticket" mockup): margin meter, bid/ask buttons with the
   spread between them, lot stepper, SL/TP in pips or price. Notifications use the shared
   s8 receipt/result/achievement styles from Terminal.Master. */

html, body { height: 100%; overflow: hidden; }
.sc-chart-container.dark-mode { background-color: #000 !important; }
.work { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto var(--s8-rail); }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.s8-stage { position: relative; flex: 1; min-height: 0; display: flex; }
.s8-stage__canvas { flex: 1; min-width: 0; min-height: 0; display: flex; }
.chart, .chart #chartContainer { flex: 1; min-width: 0; min-height: 0; width: 100%; height: 100%; }
.chart #chartContainer .sc-chart-container, .chart #chartContainer .sc-price-chart { height: 100% !important; min-height: 0; }
.chart #chartContainer canvas.sc-price-chart { display: block; border: 0; margin-bottom: 0; }
.s8-chart-loading { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; gap: 10px; background: rgba(0,0,0,.45); color: rgba(255,255,255,.85); font-size: 13px; pointer-events: none; }
.s8-chart-loading[hidden] { display: none; }
.s8-chart-loading__ring { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.15); border-top-color: var(--s8-gold, #d4a534); border-radius: 50%; animation: fx-spin .7s linear infinite; }
@keyframes fx-spin { to { transform: rotate(360deg); } }

.s8-terminal-sidebar { display: flex; width: 360px; min-width: 0; min-height: 0; overflow: hidden; }
.side-panels { width: 360px; flex: none; min-width: 0; min-height: 0; overflow: hidden; background: var(--s8-panel); border-left: 1px solid var(--s8-line); }
.s8-side-pane { height: 100%; min-height: 0; }
/* !important: .sim (the trading pane) sets display:flex later in this file. */
.tab-pane:not(.active) { display: none !important; }
.tab-pane.active { display: flex; flex-direction: column; }

.sim { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding-bottom: 8px; background: var(--s8-panel); overflow-x: hidden; overflow-y: auto; }
.sim > [hidden] { display: none !important; }
.sim__head { display: flex; align-items: center; gap: var(--s8-2); height: var(--s8-toolbar); padding: 0 var(--s8-3); margin-bottom: 2px; border-bottom: 1px solid var(--s8-line); background: var(--s8-panel-2); flex: none; }
.sim__head svg { width: 14px; height: 14px; stroke: var(--s8-up); fill: none; stroke-width: 2; }
.sim__head .s8-label { flex: 1; white-space: nowrap; }
.s8-panel-h1 { margin: 0; }
.sim > .s8-hero, .sim > .grp, .sim > .s8-acc, .sim > .s8-navrow { flex: none; margin: 0 8px; background: var(--s8-panel-2); border: 1px solid var(--s8-line); border-radius: var(--s8-r); }
.sim > .s8-acc, .sim > .s8-navrow { overflow: hidden; }
.grp { padding: var(--s8-3); display: flex; flex-direction: column; gap: var(--s8-2); }
.sim > .s8-hero { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: var(--s8-3); }
.s8-hero__top { display: flex; align-items: center; justify-content: space-between; }
.sim .s8-hero__val { margin-top: 4px; font-size: 36px; line-height: 1.1; }
.sim .s8-hero__pnl-row { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; font-size: 14px; font-variant-numeric: tabular-nums; }
.sim .s8-hero__pnl-row > span { font-size: inherit; }
.sim .s8-hero__pnl-percent::before { content: "("; }
.sim .s8-hero__pnl-percent::after { content: ")"; }
.figrow { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s8-2); }
.figrow b { font-variant-numeric: tabular-nums; font-size: var(--s8-fs-xl); font-weight: 600; line-height: 1.15; }
.sim .positive, .fx-up { color: var(--s8-up); }
.sim .negative, .fx-down { color: var(--s8-down); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s8-2); }

/* Market status pill (data-state = open | closed). */
.fx-status { display: flex; align-items: center; justify-content: center; gap: var(--s8-2); height: 26px; margin-top: 10px; border-radius: var(--s8-r-sm); background: var(--s8-hover); color: var(--s8-fg-3); font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.fx-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.fx-status[data-state="open"] { color: var(--s8-up); background: rgba(62,214,155,.1); }
.fx-status[data-state="open"] i { box-shadow: 0 0 0 3px rgba(62,214,155,.22); }
.fx-status[data-state="closed"] { color: var(--s8-down); background: rgba(255,110,122,.1); }

/* Margin meter: used margin / level, bar, equity / free. */
.fx-mm { margin-top: 10px; display: grid; gap: 5px; }
.fx-mm__row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--s8-fg-3); }
.fx-mm__row b { color: var(--s8-fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.fx-mm__bar { height: 4px; border-radius: 2px; background: var(--s8-active); overflow: hidden; }
.fx-mm__bar i { display: block; height: 100%; width: 0; min-width: 0; border-radius: 2px; background: var(--s8-accent); transition: width .2s; }
.fx-mm__bar i.is-warn { background: var(--s8-warn); }
.fx-mm__bar i.is-danger { background: var(--s8-down); }
#fxMarginLevel.is-ok { color: var(--s8-up); }
#fxMarginLevel.is-warn { color: var(--s8-warn); }
#fxMarginLevel.is-danger { color: var(--s8-down); }

/* Ticket header: pair + leverage tag. */
.fx-ticket__hd { display: flex; align-items: center; justify-content: space-between; gap: var(--s8-2); }
.fx-pair { display: inline-flex; align-items: center; gap: 8px; }
/* Pair picker: a bordered chip with a caret so it reads as a control, not a label. */
.fx-pair__select { appearance: none; -webkit-appearance: none; height: 30px; padding: 0 28px 0 10px; border: 1px solid var(--s8-line-2); border-radius: var(--s8-r); background-color: var(--s8-bg, #0E1014); color: var(--s8-fg); font: 600 14px/1 var(--s8-sans); letter-spacing: .02em; cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: right 14px top 55%, right 10px top 55%; background-size: 4px 4px; background-repeat: no-repeat; }
.fx-pair__select:hover { border-color: var(--s8-fg-3); }
.fx-pair__select:focus-visible { outline: 2px solid var(--s8-accent); outline-offset: 2px; }
.fx-pair__select option { background: var(--s8-panel-2); color: var(--s8-fg); }
.fx-tag { height: 18px; padding: 0 6px; border-radius: 3px; background: var(--s8-active); color: var(--s8-fg-2); font-size: 10.5px; font-weight: 600; display: inline-flex; align-items: center; }

/* Sell (bid) | Buy (ask) quote buttons with the spread pill on the seam. */
.fx-quotes { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.fx-q { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; height: 66px; padding: 0 12px; border: 0; border-radius: var(--s8-r); color: #fff; cursor: pointer; font-family: var(--s8-sans); position: relative; transition: filter .12s; }
.fx-q:hover:not(:disabled) { filter: brightness(1.08); }
.fx-q:disabled { opacity: .45; cursor: not-allowed; }
.fx-q--sell { background: #D9434F; }
.fx-q--buy { background: #1FA56B; align-items: flex-end; }
.fx-q__lbl { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; opacity: .85; }
.fx-q__px { display: flex; align-items: baseline; font-variant-numeric: tabular-nums; }
.fx-q__px .s { font-size: 13px; font-weight: 500; opacity: .8; }
.fx-q__px .m { font-size: 24px; font-weight: 700; letter-spacing: -.01em; margin: 0 1px; }
.fx-q__px .t { font-size: 12px; font-weight: 600; align-self: flex-start; margin-top: 3px; opacity: .85; }
.fx-q .s8-kbd { position: absolute; top: 6px; right: 6px; }
.fx-q--sell .s8-kbd { right: auto; left: auto; right: 6px; }
.fx-q--buy .s8-kbd { right: auto; left: 6px; }
/* Hotkey badges sit on the inner edge of each column (toward the spread pill), so the
   right-column Flat button mirrors Buy: F6 on its left. */
#fxFlatBtn .s8-kbd { right: auto; left: 4px; }
.fx-spread { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; height: 20px; min-width: 34px; padding: 0 6px; border-radius: 999px; background: var(--s8-bg, #0E1014); border: 1px solid var(--s8-line-2); color: var(--s8-fg-2); font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.fx-quotes.flash-up .m, .fx-quotes.flash-down .m { transition: color .15s; }

/* Lot stepper + presets. */
.fx-lots { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; height: 38px; border-radius: var(--s8-r); background: var(--s8-bg, #0E1014); box-shadow: inset 0 0 0 1px var(--s8-line); overflow: hidden; }
.fx-lots button { border: 0; background: transparent; color: var(--s8-fg-2); font-size: 16px; cursor: pointer; }
.fx-lots button:hover { background: var(--s8-hover); color: var(--s8-fg); }
.fx-lots button:first-child { border-right: 1px solid var(--s8-line); }
.fx-lots button:last-child { border-left: 1px solid var(--s8-line); }
.fx-lots__val { position: relative; display: flex; align-items: center; justify-content: center; }
.fx-lots__val input { width: 100%; height: 100%; border: 0; background: transparent; color: var(--s8-fg); text-align: center; font: 600 15px/1 var(--s8-sans); font-variant-numeric: tabular-nums; }
.fx-lots__val input:focus { outline: none; }
.fx-lots__val input[aria-invalid="true"] { color: var(--s8-down); }
.fx-lots__val em { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 11px; color: var(--s8-fg-3); pointer-events: none; }
.fx-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.fx-presets button { height: 30px; border-radius: 999px; border: 1px solid var(--s8-line-2); background: transparent; color: var(--s8-fg-2); font-size: 12.5px; font-weight: 500; cursor: pointer; font-variant-numeric: tabular-nums; }
.fx-presets button:hover { border-color: var(--s8-fg-3); color: var(--s8-fg); }
.fx-presets button[aria-pressed="true"] { background: var(--s8-fg); border-color: var(--s8-fg); color: var(--s8-bg, #08090B); font-weight: 600; }
.fx-meta { display: flex; justify-content: center; align-items: center; gap: 7px; font-size: 12px; color: var(--s8-fg-3); margin-top: 2px; }
.fx-meta b { color: var(--s8-fg-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.fx-meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--s8-line-2); }
.fx-meta .fx-info { position: relative; display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--s8-line-2); color: var(--s8-fg-3); font-size: 9px; font-weight: 700; font-style: normal; cursor: help; }
.fx-meta .fx-info:hover + .fx-tip, .fx-meta .fx-info:focus + .fx-tip { display: block; }
.fx-tip { display: none; position: absolute; z-index: 30; left: 12px; right: 12px; bottom: calc(100% + 6px); padding: 10px 12px; border-radius: 6px; background: var(--s8-fg); color: var(--s8-bg, #14171C); font-size: 12px; line-height: 1.45; box-shadow: 0 12px 30px -8px rgba(0,0,0,.6); }
.fx-tip b { display: block; color: inherit; font-weight: 600; margin-bottom: 2px; }
.fx-meta-wrap { position: relative; }

/* SL / TP block. */
.fx-brk { display: grid; gap: 6px; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--s8-line); }
.fx-brk__hd { display: flex; align-items: center; justify-content: space-between; }
.fx-brk__hd .s8-label { font-size: 10px; }
.fx-seg { display: inline-flex; height: 22px; border-radius: 3px; border: 1px solid var(--s8-line-2); overflow: hidden; }
.fx-seg button { padding: 0 8px; border: 0; background: transparent; color: var(--s8-fg-3); font-size: 10.5px; font-weight: 600; cursor: pointer; }
.fx-seg button[aria-pressed="true"] { background: var(--s8-fg); color: var(--s8-bg, #08090B); }
.fx-brk__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.fx-field { display: flex; align-items: center; gap: 8px; min-width: 0; height: 34px; padding: 0 10px; border-radius: var(--s8-r); background: var(--s8-bg, #0E1014); box-shadow: inset 0 0 0 1px var(--s8-line); }
.fx-field:focus-within { box-shadow: inset 0 0 0 1px var(--s8-accent); }
.fx-field u { text-decoration: none; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; }
.fx-field--sl u { color: var(--s8-down); }
.fx-field--tp u { color: var(--s8-up); }
.fx-field input { flex: 1; width: 0; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--s8-fg); text-align: right; font: 500 13px/1 var(--s8-sans); font-variant-numeric: tabular-nums; }
.fx-field input:focus { outline: none; }
.fx-field input::placeholder { color: var(--s8-fg-3); }
.fx-rr { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--s8-fg-3); }
.fx-rr b { color: var(--s8-fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.fx-rr b.fx-down { color: var(--s8-down); }
.fx-rr b.fx-up { color: var(--s8-up); }
.fx-brk__apply { height: 30px; font-size: 12px; }
.fx-brk__apply[hidden] { display: none; }

/* Position card. */
.fx-pos__qty { display: flex; align-items: baseline; justify-content: space-between; margin-top: 4px; }
.fx-pos__qty b { font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.fx-pos__qty b small { font-size: 14px; color: var(--s8-fg-3); font-weight: 500; letter-spacing: 0; }
.fx-pos__qty span { font-size: 13px; color: var(--s8-fg-3); }
.fx-pos__qty span em { font-style: normal; color: var(--s8-fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.fx-pos__ur { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--s8-line); font-size: 13px; color: var(--s8-fg-2); }
.fx-pos__ur b { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fx-pos__ur .fx-pips { font-size: 12px; font-weight: 500; margin-left: 6px; opacity: .8; }
.fx-pos__brk { display: flex; justify-content: space-between; font-size: 12px; color: var(--s8-fg-3); }
.fx-pos__brk b { color: var(--s8-fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.fx-side.s8-badge--up { color: var(--s8-up); background: rgba(62,214,155,.14); border-color: rgba(62,214,155,.42); }
.fx-side.s8-badge--down { color: var(--s8-down); background: rgba(255,110,122,.14); border-color: rgba(255,110,122,.42); }

/* Pending orders. */
.fx-orders { list-style: none; margin: 0; padding: 0; }
.fx-orders:empty { display: none; }
.fx-orders li { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--s8-line); font-size: 12.5px; color: var(--s8-fg-2); }
.fx-orders li b { color: var(--s8-fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.fx-orders .fx-o-side { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 18px; padding: 0 4px; border-radius: 3px; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; }
.fx-orders .fx-o-side--buy { color: var(--s8-up); background: rgba(62,214,155,.14); }
.fx-orders .fx-o-side--sell { color: var(--s8-down); background: rgba(255,110,122,.14); }
.fx-orders .fx-o-away { margin-left: auto; color: var(--s8-fg-3); font-size: 12px; white-space: nowrap; }
.fx-orders .fx-o-x { border: 0; background: transparent; color: var(--s8-fg-3); cursor: pointer; padding: 2px; display: inline-grid; place-items: center; }
.fx-orders .fx-o-x:hover { color: var(--s8-fg); }
.fx-orders .fx-o-x svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.fx-oform { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; align-items: end; padding: 10px 12px 12px; border-top: 1px solid var(--s8-line); }
.fx-oform .s8-field { display: grid; gap: 5px; }
.fx-oform .s8-label { font-size: 10px; }
.fx-oform .s8-select, .fx-oform .s8-input { height: 36px; }
.fx-oform .fx-oform__away { font-size: 11px; color: var(--s8-fg-3); text-align: right; grid-column: 2; margin-top: -2px; min-height: 14px; }

/* Pairs watchlist pane. */
.fx-list { list-style: none; margin: 0; padding: 0; overflow: auto; }
.fx-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; min-height: 44px; padding: 0 12px; border-bottom: 1px solid var(--s8-line); cursor: pointer; font-variant-numeric: tabular-nums; }
.fx-list li:hover:not([aria-selected="true"]) { background: rgba(43,143,224,.09); }
.fx-list li[aria-selected="true"] { background: var(--s8-accent-tint); box-shadow: inset 2px 0 0 var(--s8-accent); }
.fx-list .fx-l-pair { font-family: var(--s8-mono); font-size: var(--s8-fs-sm); font-weight: 600; color: var(--s8-fg); }
.fx-list .fx-l-pair small { display: block; font-family: var(--s8-sans); font-size: 11px; font-weight: 400; color: var(--s8-fg-3); }
.fx-list .fx-l-px { font-family: var(--s8-mono); font-size: var(--s8-fs-sm); color: var(--s8-fg); text-align: right; }
.fx-list .fx-l-px { margin: -4px -6px; padding: 4px 6px; border-radius: 3px; }
.fx-list .fx-l-px.price-flash-up { animation: fx-cell-up 1.1s ease-out; }
.fx-list .fx-l-px.price-flash-down { animation: fx-cell-down 1.1s ease-out; }
@keyframes fx-cell-up { 0% { background: var(--s8-up-tint); } 100% { background: transparent; } }
@keyframes fx-cell-down { 0% { background: var(--s8-down-tint); } 100% { background: transparent; } }
.fx-list .fx-l-px small { display: block; font-size: 10.5px; color: var(--s8-fg-3); }
.fx-list .fx-l-chg { min-width: 58px; font-family: var(--s8-mono); font-size: var(--s8-fs-sm); text-align: right; }
.s8-market-head { display: flex; align-items: center; gap: var(--s8-2); height: var(--s8-toolbar); padding: 0 var(--s8-3); border-bottom: 1px solid var(--s8-line); background: var(--s8-panel-2); flex: none; }
.s8-market-head .s8-label { flex: 1; }

/* Right rail tabs: same rules as live-trading-simulator.aspx's inline block. */
.s8-rail--right { align-items: stretch; gap: 0; padding: 0; }
.s8-rail--right > .s8-iconbtn { position: relative; width: 100%; height: var(--s8-toolbar); border-radius: 0; flex: none; }
.s8-rail--right > .s8-iconbtn:hover { background: rgba(43, 143, 224, .09); color: var(--s8-accent); }
.s8-rail--right > .s8-iconbtn::before { content: ""; position: absolute; top: 0; right: 0; width: 3px; height: 100%; background: var(--s8-accent); opacity: 0; transition: opacity var(--s8-t-fast) var(--s8-ease); }
.s8-rail--right > .s8-iconbtn:hover::before { opacity: .45; }
.s8-rail--right > .s8-iconbtn.active, .s8-rail--right > .s8-iconbtn.active:hover { background: var(--s8-accent-tint); color: var(--s8-accent-fg); }
.s8-rail--right > .s8-iconbtn.active::before { opacity: 1; }

/* "How fills work" explainer pane. */
.fx-explain { overflow: auto; background: var(--s8-panel); }
.fx-explain__body { padding: 4px 16px 20px; }
.fx-explain__body section { padding: 14px 0; border-bottom: 1px solid var(--s8-line); }
.fx-explain__body section:last-child { border-bottom: 0; }
.fx-explain__body h2 { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--s8-fg); letter-spacing: 0; text-transform: none; }
.fx-explain__body p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--s8-fg-2); }
.fx-explain__body b { color: var(--s8-fg); font-weight: 600; }
.fx-explain__body b.fx-up { color: var(--s8-up); }
.fx-explain__body b.fx-down { color: var(--s8-down); }
.fx-explain__live { margin-top: 10px; padding: 10px 12px; border-radius: var(--s8-r); background: var(--s8-panel-2); border: 1px solid var(--s8-line); font-size: 12.5px; line-height: 1.5; color: var(--s8-fg-2); font-variant-numeric: tabular-nums; }

/* Settings pane: same rules as live-trading-simulator.aspx's inline block. */
.s8-settings { overflow: auto; background: var(--s8-panel); }
.s8-settings__section { padding: var(--s8-4); border-bottom: 1px solid var(--s8-line); }
.s8-settings__title { margin-bottom: var(--s8-3); }
.s8-setting-row { display: flex; align-items: center; gap: var(--s8-3); min-height: 52px; border-bottom: 1px solid var(--s8-line); }
.s8-setting-row:last-child { border-bottom: 0; }
.s8-setting-row__copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; }
.s8-setting-row__copy small { color: var(--s8-fg-3); font-size: var(--s8-fs-xs); }
.s8-setting-key { width: 62px; text-align: center; text-transform: uppercase; }
.s8-settings__commission { display: flex; flex-direction: column; gap: var(--s8-2); padding-top: var(--s8-2); }
.s8-settings__commission .s8-seg label { display: flex; flex: 1; align-items: center; justify-content: center; height: calc(var(--s8-h) - 6px); padding: 0 var(--s8-3); border: 1px solid transparent; border-radius: var(--s8-r-sm); color: var(--s8-fg-2); font-size: var(--s8-fs-sm); font-weight: 500; cursor: pointer; }
.s8-settings__commission .s8-seg input:checked + label { background: var(--s8-panel-2); border-color: var(--s8-accent-line); color: var(--s8-fg); }
.s8-settings__commission.off { opacity: .45; pointer-events: none; }
.fx-comm-hint { color: var(--s8-fg-3); font-size: var(--s8-fs-xs); line-height: 1.45; }

/* Closed trades pane. */
.fx-hist { list-style: none; margin: 0; padding: 0; overflow: auto; }
.fx-hist li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px; border-bottom: 1px solid var(--s8-line); font-size: 12.5px; color: var(--s8-fg-2); font-variant-numeric: tabular-nums; }
.fx-hist li b { color: var(--s8-fg); font-weight: 600; }
.fx-hist li .r { text-align: right; }
.fx-hist li small { color: var(--s8-fg-3); font-size: 11px; }
.fx-empty { padding: 24px 16px; text-align: center; color: var(--s8-fg-3); font-size: 13px; }

/* Narrow screens: stack the panel under the chart. */
@media (max-width: 900px) {
    html, body { overflow: auto; }
    .work { display: flex; flex-direction: column; }
    .main { height: 62vh; flex: none; }
    .s8-terminal-sidebar, .side-panels { width: 100%; }
    .s8-rail--right { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .s8-chart-loading__ring { animation-duration: 2s; }
}
