@charset "UTF-8";

:root {
    color-scheme: dark;
    --bg: #111411;
    --panel: #171b18;
    --panel-raised: #1d221e;
    --line: #2a312b;
    --line-soft: #222823;
    --text: #e4e9e4;
    --muted: #838d84;
    --subtle: #59645b;
    --lime: #c8f169;
    --green: #83d6a0;
    --red: #f08a7f;
    --teal: #70c8bd;
    --mono: "Inter";
    --ui: "Inter";
}

* { box-sizing: border-box; }

body {
    min-width: 0;
    min-height: 100vh;
    margin: 0;
    background: radial-gradient(ellipse at 53% -20%, #252e25 0, #161a16 42%, var(--bg) 78%);
    color: var(--text);
    font-family: var(--ui);
    font-size: 15px;
}

button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 1px solid var(--lime); outline-offset: 2px; }

.terminal-shell { height: 100vh; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.topbar { height: 68px; flex: 0 0 68px; display: flex; align-items: center; gap: 38px; padding: 0 22px; border-bottom: 1px solid var(--line); background: rgb(17 20 17 / 88%); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 185px; color: var(--text); text-decoration: none; }
.brand-mark { color: var(--lime); font: 700 17px var(--mono); letter-spacing: 0; }
.brand-mark span { color: var(--text); }
.brand-name { padding-left: 10px; border-left: 1px solid #394139; color: #a5afa6; font-size: 13px; font-weight: 700; letter-spacing: 1.3px; }
.market-tickers { display: flex; align-self: stretch; gap: 0; }
.ticker { min-width: 150px; padding: 12px 21px; border-left: 1px solid var(--line-soft); display: grid; grid-template-columns: 1fr auto; column-gap: 10px; align-content: center; }
.ticker:last-child { border-right: 1px solid var(--line-soft); }
.ticker > span { align-self: center; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .7px; }
.ticker strong { font: 600 14px var(--mono); text-align: right; }
.ticker small { grid-column: 1 / -1; margin-top: 4px; color: var(--subtle); font-size: 12px; text-align: right; }
.topbar-status { display: flex; align-items: center; gap: 23px; margin-left: auto; color: var(--muted); font: 10px var(--mono); white-space: nowrap; }
.market-state, .connection-state { display: inline-flex; align-items: center; gap: 8px; }
.market-state i, .connection-state i, .live-dot, .status-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: #667268; }
.connection-state.is-live i, .connection-state.is-connected i { background: var(--green); box-shadow: 0 0 9px rgb(131 214 160 / 55%); }
.market-state.is-live i { background: var(--green); box-shadow: 0 0 9px rgb(131 214 160 / 55%); }
.market-state.is-live i::after, .connection-state.is-live i::after { content: ''; position: absolute; inset: -5px; border: 1px solid rgb(131 214 160 / 75%); border-radius: 50%; animation: live-ripple 1.7s ease-out infinite; }
@keyframes live-ripple { 0% { opacity: .85; transform: scale(.45); } 100% { opacity: 0; transform: scale(2.15); } }
.connection-state.is-error i, .connection-state.is-auth-error i { background: var(--red); box-shadow: 0 0 9px rgb(240 138 127 / 45%); }
.connection-state.is-connecting i, .connection-state.is-reconnecting i { background: var(--lime); animation: connection-pulse 1.2s ease-in-out infinite alternate; }
@keyframes connection-pulse { to { opacity: .45; } }
.topbar-status time { padding-left: 19px; border-left: 1px solid var(--line); color: #b6beb7; }

.terminal-main { --watchlist-width: 0px; --activity-width: 0px; --watchlist-size: min(250px, 25vw); --activity-size: min(282px, 28vw); flex: 1; min-width: 0; min-height: 0; display: grid; grid-template-columns: var(--watchlist-width) minmax(0, 1fr) var(--activity-width); grid-template-rows: minmax(0, 1fr); gap: 1px; overflow: hidden; background: var(--line); transition: grid-template-columns 300ms ease; }
.terminal-main.has-watchlist { --watchlist-width: var(--watchlist-size); }
.terminal-main.has-activity { --activity-width: var(--activity-size); }
.panel { min-width: 0; background: var(--panel); }
.watchlist-panel, .activity-panel { grid-row: 1; min-width: 0; min-height: 0; overflow: hidden; opacity: 0; pointer-events: none; transition: transform 300ms ease, opacity 180ms ease; }
.watchlist-panel { grid-column: 1; width: var(--watchlist-size); display: flex; flex-direction: column; padding: 17px 15px; transform: translateX(-100%); }
.watchlist-panel.is-open, .activity-panel.is-open { opacity: 1; pointer-events: auto; transform: translateX(0); }
.chart-panel { grid-column: 2; grid-row: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: #151915; }
.activity-panel { grid-column: 3; width: var(--activity-size); display: flex; flex-direction: column; padding: 14px 12px; transform: translateX(100%); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; min-height: 35px; }
.eyebrow { display: block; margin-bottom: 4px; color: var(--subtle); font: 700 11px var(--mono); letter-spacing: 1.2px; }
.panel-heading h1, .panel-heading h2 { margin: 0; font-size: 16px; font-weight: 600; }
.icon-button { width: 30px; height: 30px; display: inline-grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 3px; background: transparent; color: #8f998f; cursor: pointer; font-size: 18px; }
.icon-button:hover, .icon-button.is-active { border-color: #384338; background: #202720; color: var(--lime); }
.search-box { height: 34px; display: flex; align-items: center; gap: 8px; margin: 18px 0 15px; padding: 0 9px; border: 1px solid var(--line); border-radius: 3px; background: #121612; color: var(--muted); }
.search-box > span { font-size: 19px; line-height: 1; }
.search-box input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.search-box input::placeholder { color: #69736a; }
.search-box kbd { padding: 2px 5px; border: 1px solid #343c35; border-radius: 2px; color: #879187; font: 10px var(--mono); }
.watchlist-label { display: flex; justify-content: space-between; padding: 0 8px 8px; border-bottom: 1px solid var(--line); color: var(--subtle); font: 9px var(--mono); letter-spacing: .4px; }
.watchlist { min-height: 0; overflow: auto; padding: 0; margin: 0; list-style: none; }
.watch-item { width: 100%; height: 53px; display: flex; align-items: center; gap: 9px; padding: 0 7px; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; text-align: left; cursor: pointer; }
.watch-item:hover { background: #1e251e; }
.watch-item.is-selected { background: #20291f; box-shadow: inset 2px 0 var(--lime); }
.symbol-icon { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; border-radius: 4px; color: var(--teal); background: #1b302d; font: 700 11px var(--mono); }
.index-icon { color: var(--lime); background: #2d351e; }
.symbol-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 3px; }
.symbol-copy strong { overflow: hidden; color: #d5ddd5; font-size: 13px; font-weight: 600; text-overflow: ellipsis; }
.symbol-copy small { overflow: hidden; color: #718075; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.symbol-quote { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.symbol-quote strong { color: #a9b3a9; font: 10px var(--mono); }
.symbol-quote small { color: var(--subtle); font: 11px var(--mono); }
.watchlist-footer { display: flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 14px; color: var(--subtle); font-size: 12px; }
.watchlist-footer .live-dot { width: 6px; height: 6px; }

.chart-topline { min-width: 0; min-height: 58px; display: flex; flex: 0 0 auto; align-items: center; gap: 8px; padding: 0 10px; border-bottom: 1px solid var(--line-soft); }
.chart-actions { min-width: 0; display: flex; align-items: center; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.chart-actions::-webkit-scrollbar { display: none; }
.panel-toggle { flex: 0 0 30px; border-color: #303830; background: #191f1a; font-size: 15px; }
.panel-close { flex: 0 0 30px; color: #8f998f; font-size: 21px; }
.view-switch { min-height: 29px; padding: 0 9px; border: 1px solid #354037; border-radius: 3px; background: #1b211c; color: #aab5ab; cursor: pointer; font-size: 12px; }
.view-switch[aria-pressed="true"], .view-switch.is-active { border-color: #687b51; background: #263020; color: var(--lime); }
#chart-workspace { min-width: 0; min-height: 0; flex: 1 1 0; display: flex; flex-direction: column; }
#chart-workspace[hidden], .option-chain-view[hidden], .option-chain-scroll[hidden] { display: none; }
.selected-instrument { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.instrument-symbol { color: var(--text); font-size: 18px; font-weight: 650; }
.instrument-name { overflow: hidden; color: #758075; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.exchange-tag { align-self: center; padding: 3px 5px; border: 1px solid #354037; border-radius: 2px; color: #9ca89d; font: 11px var(--mono); }
html.option-chart-mode .selected-instrument { min-width: 0; gap: 10px; align-items: center; }
html.option-chart-mode .instrument-name { min-width: 0; max-width: min(44vw, 360px); flex: 0 1 auto; padding-left: 10px; border-left: 1px solid #303830; color: #829083; font: 10px var(--mono); }
.chart-actions select { max-width: 145px; padding: 7px 25px 7px 9px; border: 1px solid #343c35; border-radius: 3px; background: #1b211c; color: #bbc4bc; font-size: 12px; }
.chart-toolbar { height: auto; min-width: 0; display: flex; flex: 1 1 auto; align-items: center; gap: 5px; padding: 0; border: 0; overflow-x: auto; scrollbar-width: thin; }
.segmented-control { display: flex; align-items: center; gap: 2px; }
.chart-toolbar > .segmented-control { flex: 0 0 auto; }
.segmented-control button { min-width: 31px; height: 27px; padding: 0 7px; border: 0; border-radius: 2px; background: transparent; color: #7d887e; cursor: pointer; font: 10px var(--mono); }
.segmented-control button:hover { color: var(--text); }
.segmented-control button.is-active { background: #283128; color: var(--lime); }
.chart-types button { min-width: 30px; font-size: 16px; }
.toolbar-divider { width: 1px; height: 18px; background: #303830; }
.toolbar-spacer { flex: 1; }
.crosshair-button { font-size: 15px; }
.chart-viewport { position: relative; flex: 1 1 0; min-height: 0; overflow: hidden; background: radial-gradient(ellipse at 50% 45%, #171c18, #151915 72%); cursor: default; }
.chart-viewport.is-panning, .chart-viewport.is-panning canvas { cursor: grabbing; }
.chart-viewport.is-price-scale-adjusting, .chart-viewport.is-price-scale-adjusting canvas { cursor: ns-resize; }
.chart-viewport.is-time-scale-adjusting, .chart-viewport.is-time-scale-adjusting canvas { cursor: ew-resize; }
.chart-viewport canvas { width: 100%; height: 100%; display: block; }
.chart-viewport.is-drawing, .chart-viewport.is-drawing canvas { cursor: crosshair; }
.drawing-tools-panel { position: absolute; z-index: 18; top: 42px; left: 12px; width: 184px; padding: 8px; border: 1px solid #4a5847; border-radius: 3px; background: rgb(20 27 21 / 97%); box-shadow: 0 8px 20px rgb(0 0 0 / 35%); color: #9ca99c; font: 10px var(--mono); }
.drawing-tools-heading { display: flex; align-items: center; justify-content: space-between; padding: 2px 1px 7px; color: var(--lime); letter-spacing: .5px; }
.drawing-tools-heading > span { display: flex; gap: 5px; }
.drawing-tools-heading button:disabled { opacity: .4; cursor: default; }
.drawing-tools-heading button { border: 0; background: transparent; color: #d79188; cursor: pointer; font: 10px var(--mono); }
.drawing-tools-list { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.drawing-tools-list button { min-height: 26px; padding: 3px 5px; border: 1px solid #303c31; border-radius: 2px; background: #1b231c; color: #aeb9ae; cursor: pointer; font: 10px var(--mono); text-align: left; }
.drawing-tools-list button:hover, .drawing-tools-list button.is-active { border-color: #718654; background: #2a3524; color: var(--lime); }
.drawing-tools-options { display: flex; gap: 9px; padding-top: 8px; }
.drawing-tools-options label { display: flex; align-items: center; gap: 4px; }
.drawing-tools-options input { width: 23px; height: 21px; padding: 0; border: 0; background: transparent; }
.drawing-tools-options select { height: 22px; border: 1px solid #3a463a; background: #1b231c; color: #c3cec2; font: 10px var(--mono); }
.drawing-tools-options button { width: 20px; height: 22px; padding: 0; border: 1px solid #3a463a; border-radius: 2px; background: #1b231c; cursor: pointer; }.drawing-color-green { color: #62d38b; }.drawing-color-red { color: #ef7f75; }
.drawing-tools-panel small { display: block; padding-top: 7px; color: #6f7c70; font-size: 11px; }
.drawing-tools-panel .drawing-save-status.is-error { color: #ef8c82; }
.option-strike-widget { position: absolute; z-index: 17; top: 12px; right: 12px; box-sizing: border-box; width: 245px; overflow: hidden; border: 1px solid #485646; border-radius: 3px; background: rgb(19 25 20 / 95%); box-shadow: 0 5px 16px rgb(0 0 0 / 30%); font: 10px var(--mono); user-select: none; }
.option-strike-handle { display: flex; align-items: center; justify-content: space-between; min-height: 25px; padding: 0 6px; border-bottom: 1px solid #403534; background: #202920; color: #c6d2b6; cursor: ns-resize; letter-spacing: .25px; }
.option-strike-handle label { display: flex; align-items: center; gap: 3px; color: #849184; cursor: pointer; font-size: 11px; letter-spacing: 0; }
.option-strike-handle input { width: 11px; height: 11px; margin: 0; accent-color: #9fca61; }
.option-strike-main-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 5px; border-bottom: 1px solid #344034; }.option-strike-main-controls button { height: 24px; border: 1px solid transparent; border-radius: 2px; cursor: pointer; font: 700 11px var(--mono); }.option-strike-main-ce { background: #1f482f; color: #a8e0b2; }.option-strike-main-pe { background: #4a2928; color: #efb2aa; }.option-strike-main-controls button.is-selected { border-color: #edf6c9; box-shadow: inset 0 0 0 1px rgb(237 246 201 / 25%); filter: brightness(1.25); }
.option-strike-rows[hidden] { display: none; }.option-strike-row { display: grid; grid-template-columns: 35px 43px 1fr 43px 35px; min-height: 25px; align-items: center; border-bottom: 1px solid #293328; }
.option-strike-row:last-child { border-bottom: 0; }
.option-strike-row.is-atm { background: #2a3423; }
.option-strike-row button { height: 19px; margin: 0 4px; border: 1px solid transparent; border-radius: 2px; cursor: pointer; font: 700 11px var(--mono); }
.option-strike-ce { background: #1f482f; color: #a8e0b2; }.option-strike-pe { background: #4a2928; color: #efb2aa; }
.option-strike-row button:hover, .option-strike-row button.is-selected { border-color: #dce9b2; box-shadow: inset 0 0 0 1px rgb(220 233 178 / 20%); }
.option-strike-row button:disabled { opacity: .35; cursor: not-allowed; }.option-strike-price, .option-strike-ltp { color: #e1e8db; text-align: center; font-weight: 700; }.option-strike-ce-ltp { color: #9bcba6; }.option-strike-pe-ltp { color: #df9d92; }.option-strike-empty { padding: 8px; color: #788378; line-height: 1.4; }.option-strike-resize-handle { position: absolute; right: 0; bottom: 0; left: 0; height: 7px; cursor: ns-resize; background: linear-gradient(transparent 45%, #536150 45%, #536150 55%, transparent 55%); }
.chart-empty-state { position: absolute; z-index: 2; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 7px; padding: 15px; background: rgb(21 25 21 / 88%); text-align: center; }
.chart-empty-state[hidden] { display: none; }
.chart-empty-state strong { color: #a8b2a8; font-size: 12px; font-weight: 600; }
.chart-empty-state small { max-width: min(420px, 100%); color: #687369; font-size: 12px; line-height: 1.5; }
.chart-empty-state.is-error .empty-mark { color: var(--red); }
.chart-loader { width: 23px; height: 23px; margin-bottom: 5px; border: 2px solid #354035; border-top-color: var(--lime); border-radius: 50%; animation: chart-spin .8s linear infinite; }
.chart-retry-button { min-width: 76px; height: 30px; margin-top: 7px; padding: 0 12px; border: 1px solid #4e5d47; border-radius: 3px; background: #242d22; color: var(--lime); cursor: pointer; font-size: 12px; font-weight: 600; }
.chart-retry-button:hover { background: #303b2b; }
@keyframes chart-spin { to { transform: rotate(360deg); } }
.empty-mark { margin-bottom: 4px; color: #5b765b; font-size: 28px; }
.chart-crosshair-label { position: absolute; z-index: 3; display: none; max-width: min(320px, calc(100% - 16px)); padding: 6px 8px; border: 1px solid #566451; background: rgb(29 37 29 / 96%); color: #c5d2c4; font: 11px/1.5 var(--mono); white-space: pre-wrap; pointer-events: none; }
.crosshair-price-label, .crosshair-time-label { position: absolute; z-index: 4; display: none; padding: 4px 6px; border: 1px solid #8ba058; border-radius: 2px; background: #2f3c29; color: #e4f6b4; font: 600 12px var(--mono); white-space: nowrap; pointer-events: none; }
.crosshair-price-label { width: 90px; box-sizing: border-box; text-align: right; }
.crosshair-time-label { transform: translateX(-50%); }
.chart-debug-panel { position: absolute; z-index: 3; top: 9px; left: 9px; max-width: calc(100% - 18px); margin: 0; padding: 7px 9px; border: 1px solid #475447; border-radius: 3px; background: rgb(15 19 15 / 94%); color: #c8f169; font: 11px/1.55 var(--mono); white-space: pre-wrap;  }
.chart-footer { height: 28px; display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; padding: 0 13px; border-top: 1px solid var(--line-soft); color: #657067; font: 11px var(--mono); letter-spacing: .35px; }
.option-chain-view { min-width: 0; min-height: 0; flex: 1; display: flex; flex-direction: column; overflow: hidden; background: #151915; }
.option-chain-controls { min-height: 54px; display: flex; flex: 0 0 auto; align-items: center; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--line); }
.option-chain-controls label { display: flex; align-items: center; gap: 7px; color: #7e897f; font: 11px var(--mono); white-space: nowrap; }
.option-chain-controls select { max-width: 145px; min-height: 29px; padding: 0 22px 0 8px; border: 1px solid #343c35; border-radius: 3px; background: #1b211c; color: #c0c9c0; font-size: 12px; }
.chain-range-control { display: flex; flex: 0 0 auto; align-items: center; gap: 2px; }
.chain-range-control button { min-width: 34px; height: 27px; padding: 0 6px; border: 0; border-radius: 2px; background: transparent; color: #839084; cursor: pointer; font: 11px var(--mono); }
.chain-range-control button.is-active { background: #283128; color: var(--lime); }
.atm-indicator { margin-left: auto; color: var(--lime); font: 10px var(--mono); white-space: nowrap; }
.chain-sources { flex: 0 0 auto; padding: 6px 12px; border-bottom: 1px solid var(--line-soft); color: #758176; font-size: 11px; line-height: 1.4; }
.chain-message { flex: 0 0 auto; padding: 7px 12px; color: #c1aa70; font-size: 12px; }
.chain-message.is-error { color: var(--red); }
.option-chain-scroll { min-width: 0; min-height: 0; flex: 1; overflow: auto; overscroll-behavior: contain; scrollbar-color: #3b453b #151915; }
.option-chain-table { width: 100%; min-width: 1110px; border-collapse: separate; border-spacing: 0; color: #c2cbc2; font: 11px var(--mono); font-variant-numeric: tabular-nums; }
.option-chain-table th, .option-chain-table td { height: 31px; padding: 0 7px; border-right: 1px solid #242b25; border-bottom: 1px solid #252d27; text-align: right; white-space: nowrap; }
.option-chain-table thead { position: sticky; z-index: 2; top: 0; background: #1a201b; }
.option-chain-table thead tr:first-child th { height: 28px; color: #9eaa9f; text-align: center; }
.option-chain-table thead tr:nth-child(2) th { height: 30px; color: #718073; font-size: 12px; }
.option-chain-table .strike-header, .option-chain-table .strike-cell { position: sticky; z-index: 1; left: 0; background: #202720; text-align: center; }
.option-chain-table .strike-header { z-index: 3; color: var(--lime) !important; }
.option-chain-table .strike-cell { color: #dfe8dc; font-weight: 700; }
.option-chain-table tbody tr:hover td { background-color: #202820; }
.option-chain-table tbody tr.is-atm td { background-color: #293322; }
.option-chain-table .call-side { color: #9bcba6; }
.option-chain-table .put-side { color: #df9d92; }
.option-chain-table .quote-empty { color: #515c53; }
.option-chain-table .quote-live { color: #e0e8df; }
.option-chain-table .quote-positive { color: var(--green); }
.option-chain-table .quote-negative { color: var(--red); }
.option-chain-table .chain-spacer td { padding: 0; border: 0; }
.option-chain-table td[data-contract-side] { cursor: pointer; }
.contract-chart-link { width: 18px; height: 18px; margin-left: 4px; padding: 0; border: 1px solid #4b5a47; border-radius: 2px; background: #20291f; color: #bad28d; cursor: pointer; font: 11px/1 var(--mono); vertical-align: middle; }
.contract-chart-link:hover { border-color: #91ab68; background: #303d2c; color: #e3f0c7; }
.option-chain-table tr.inspecting-call td.call-side, .option-chain-table tr.inspecting-put td.put-side { background-color: #29352a; box-shadow: inset 0 0 0 1px rgb(183 213 142 / 14%); }
.option-chain-table tr.inspecting-call td.call-side:first-child, .option-chain-table tr.inspecting-put td.put-side:first-child { box-shadow: inset 2px 0 #a7ce74; }
.option-chain-table td[data-contract-side]:hover { background-color: #344231; color: #edf5e9; }
html.option-chart-mode .watchlist-panel,
html.option-chart-mode .activity-panel,
html.option-chart-mode #watchlist-toggle,
html.option-chart-mode #activity-toggle,
html.option-chart-mode #symbol-select,
html.option-chart-mode .chart-actions label,
html.option-chart-mode #option-chain-toggle { display: none !important; }

/* Full chart engine reused inside the three compact scalper panels. */
html.scalper-chart-embed, html.scalper-chart-embed body, html.scalper-chart-embed .terminal-shell { min-height: 0; height: 100%; overflow: hidden; }
html.scalper-chart-embed .topbar,
html.scalper-chart-embed .watchlist-panel,
html.scalper-chart-embed .activity-panel,
html.scalper-chart-embed .chart-actions,
html.scalper-chart-embed .option-chain-view,
html.scalper-chart-embed .option-strike-widget { display: none !important; }
html.scalper-chart-embed .terminal-main { display: block; min-height: 0; height: 100%; padding: 0; }
html.scalper-chart-embed .chart-panel { height: 100%; min-height: 0; border: 0; border-radius: 0; }
html.scalper-chart-embed .chart-topline { min-height: 32px; padding: 2px 6px; }
html.scalper-chart-embed .chart-toolbar { gap: 2px; overflow-x: auto; }
html.scalper-chart-embed .chart-toolbar [aria-label="Chart type"],
html.scalper-chart-embed .chart-toolbar .toolbar-divider,
html.scalper-chart-embed .chart-toolbar .chart-types,
html.scalper-chart-embed .chart-toolbar [aria-label="Chart timeframe"] { display: none; }
html.scalper-chart-embed .chart-toolbar .view-switch { min-height: 28px; padding: 0 9px; font-size: 13px; }
html.scalper-chart-embed .chart-crosshair-label { font-size: 13px; }
html.scalper-chart-embed .crosshair-price-label, html.scalper-chart-embed .crosshair-time-label { font-size: 13px; padding: 4px 7px; }
html.scalper-chart-embed .crosshair-price-label { width: 96px; }
html.scalper-chart-embed .chart-footer { font-size: 12px; }
html.scalper-chart-embed .indicator-overlay-controls, html.scalper-chart-embed .indicator-overlay-controls * { font-size: 12px; }
html.scalper-chart-embed #chart-workspace { min-height: 0; }

.activity-header { min-height: 0; display: flex; flex: 0 0 auto; flex-direction: column; border-bottom: 1px solid var(--line); }
.activity-panel-heading { display: flex; align-items: center; gap: 8px; min-height: 35px; margin-bottom: 9px; }
.activity-panel-heading > div { min-width: 0; flex: 1; }
.activity-panel-heading h2 { margin: 0; font-size: 14px; font-weight: 600; }
.activity-panel-heading .eyebrow { margin-bottom: 2px; }
.activity-count { color: #657067; font: 11px var(--mono); white-space: nowrap; }
.activity-tabs { display: flex; flex-direction: column; gap: 1px; max-height: 240px; overflow-y: auto; padding-bottom: 8px; }
.activity-tabs button { position: relative; min-height: 32px; flex: 0 0 auto; padding: 0 10px; border: 0; border-radius: 2px; background: transparent; color: #7b867c; cursor: pointer; font-size: 11px; text-align: left; }
.activity-tabs button:hover, .activity-tabs button.is-active { color: #e0e6df; }
.activity-tabs button.is-active { background: #202720; box-shadow: inset 2px 0 var(--lime); }
.activity-content { min-height: 0; flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; overflow: auto; color: #778178; font-size: 11px; }
.activity-record-list { align-self: stretch; width: 100%; display: grid; align-content: start; gap: 5px; padding: 6px; }
.activity-record { position: relative; display: grid; gap: 3px; padding: 7px; border: 1px solid #344034; background: #151a15; color: #aab5a7; font: 11px var(--mono); }
.activity-record strong { color: #d8e3d3; padding-right: 43px; }.activity-paper { position: absolute; top: 6px; right: 6px; color: #a9db98; font-size: 11px; }
.table-empty-mark { color: #82977c; font: 17px var(--mono); }
.statusbar { min-height: 27px; display: flex; align-items: center; gap: 21px; padding: 0 14px; border-top: 1px solid #2a312b; background: #131713; color: #778178; font: 11px var(--mono); letter-spacing: .45px; }
.statusbar > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.statusbar b { color: #a0aaa0; font-weight: 500; }
.status-dot { width: 6px; height: 6px; background: var(--lime); }
.statusbar-spacer { flex: 1; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

@media (min-width: 701px) {
    .terminal-shell { height: 100vh; min-height: 0; }
}

@media (min-width: 1500px) {
    .terminal-main { --watchlist-size: min(274px, 25vw); --activity-size: min(300px, 28vw); }
    .watchlist-panel { padding-right: 18px; padding-left: 18px; }
}

@media (max-width: 1050px) {
    .topbar { gap: 15px; padding: 0 14px; }
    .brand { min-width: 125px; }
    .ticker { min-width: 125px; padding-right: 13px; padding-left: 13px; }
    .topbar-status { gap: 13px; }
    .market-state { display: none; }
    .terminal-main { --watchlist-size: min(220px, 25vw); --activity-size: min(250px, 27vw); }
    #chart-workspace { min-height: 0; }
    .chart-topline { flex-wrap: wrap; padding-top: 5px; padding-bottom: 5px; }
    .chart-toolbar { order: 3; min-width: 100%; flex: 1 0 100%; flex-wrap: wrap; row-gap: 3px; overflow: visible; }
    .chart-toolbar > .segmented-control:first-child { flex: 1 0 250px; }
    .chart-toolbar .toolbar-spacer { display: none; }
}

@media (max-width: 700px) {
    .topbar { height: auto; min-height: 60px; flex: 0 0 auto; flex-wrap: wrap; gap: 0; padding: 0 12px; }
    .brand { height: 58px; flex: 1; }
    .market-tickers { order: 3; width: 100%; height: 52px; border-top: 1px solid var(--line-soft); }
    .ticker { flex: 1; min-width: 0; padding: 7px 12px; }
    .ticker:first-child { border-left: 0; }
    .ticker:last-child { border-right: 0; }
    .ticker > span { font-size: 11px; }
    .ticker strong { font-size: 11px; }
    .ticker small { font-size: 11px; }
    .topbar-status { gap: 10px; margin-left: 0; font-size: 11px; }
    .topbar-status time { display: none; }
    .connection-state { gap: 5px; }
    .terminal-main { --watchlist-size: min(240px, 48vw); --activity-size: min(240px, 48vw); }
    .terminal-main.has-watchlist.has-activity { --watchlist-size: min(190px, 26vw); --activity-size: min(190px, 26vw); }
    .watchlist-panel, .activity-panel { padding: 12px; }
    .watchlist-panel .panel-heading { min-height: 28px; }
    .watchlist-panel .eyebrow, .watchlist-footer { display: none; }
    .watchlist-panel h1 { font-size: 14px; }
    .search-box { margin: 10px 0; }
    .watchlist { display: block; }
    .watch-item { height: 48px; gap: 7px; padding: 0 5px; }
    .symbol-icon { width: 23px; height: 23px; flex-basis: 23px; }
    .symbol-copy strong { font-size: 12px; }
    .symbol-copy small { font-size: 11px; }
    .symbol-quote { display: none; }
    .chart-topline { min-height: 51px; padding: 0 8px; }
    #chart-workspace { min-height: 0; }
    .chart-actions { gap: 4px; }
    .panel-toggle { width: 27px; flex-basis: 27px; }
    .instrument-name { display: inline; }
    html.option-chart-mode .selected-instrument { flex: 1 1 100%; gap: 7px; }
    html.option-chart-mode .instrument-name { max-width: calc(100% - 170px); padding-left: 7px; }
    .chart-actions select { max-width: 105px; }
    .view-switch { padding-right: 6px; padding-left: 6px; font-size: 11px; }
    .chart-topline { flex-wrap: wrap; gap: 4px; }
    .selected-instrument { order: 1; flex: 1 1 auto; }
    .chart-actions { order: 2; flex: 0 1 auto; }
    .chart-toolbar { order: 3; min-width: 100%; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; gap: 3px; }
    .chart-toolbar > .segmented-control:first-child { flex: 0 0 auto; }
    .option-chain-controls { flex-wrap: wrap; gap: 7px; padding: 8px; }
    .option-chain-controls label { gap: 4px; font-size: 11px; }
    .option-chain-controls select { max-width: 112px; }
    .atm-indicator { margin-left: 0; }
    .chain-sources { padding: 6px 8px; }
    .chart-viewport { min-height: 0; }
    .activity-tabs { max-height: none; }
    .activity-tabs button { font-size: 11px; }
    .activity-count { display: none; }
    .statusbar { gap: 10px; overflow: hidden; padding: 0 8px; font-size: 11px; }
    .statusbar > span:nth-child(2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .terminal-main, .watchlist-panel, .activity-panel { transition: none; }
}
.sentiment-group { display: flex; gap: 8px; margin-right: 38px; }
.sentiment-button { --ripple: #70c979; position: relative; min-height: 26px; padding: 0 10px; border: 1px solid #3b4838; border-radius: 3px; background: #101510; color: #9ba797; cursor: pointer; font: 700 10px var(--mono, monospace); }
.sentiment-button[data-sentiment="bullish"] { --ripple: #62d38b; }
.sentiment-button[data-sentiment="neutral"] { --ripple: #5bc0eb; }
.sentiment-button[data-sentiment="bearish"] { --ripple: #ef6f67; }
.sentiment-button[aria-pressed="true"] { border-color: var(--ripple); color: var(--ripple); }
.sentiment-button[aria-pressed="true"]::after { content: ""; position: absolute; inset: 0; border: 1px solid var(--ripple); border-radius: 6px; opacity: 0; pointer-events: none; animation: sentiment-ripple 2.4s ease-out infinite; }
@keyframes sentiment-ripple { 0% { inset: 0; opacity: .55; } 100% { inset: -40px; opacity: 0; border-radius: 40px; } }
@media (prefers-reduced-motion: reduce) { .sentiment-button[aria-pressed="true"]::after { animation: none; inset: -3px; opacity: .45; } }
.chart-toolbar .sentiment-group { flex: 0 0 auto; margin: 0 10px; }.chart-toolbar .sentiment-button { min-height: 28px; font-size: 12px; }
