/* ds-allow-hardcode: component-local sizes, radii and spacing for a dense chart workspace; every colour goes through the tokens below (they are the site palette).
   OA Chart Pro workspace. Site colours (green #17684f, up #17a673, down #e5566a), RTL, light and dark.
   No external fonts: IBM Plex Sans Arabic is used when the site already loaded it, otherwise the system font.
   Tokens first; the chart tools bar of the site (.oa-ct, from oa-market-terminal.css) reads the --nav-* tokens defined here. */
:root {
  --cp-bg: #ffffff; --cp-surface: #f5f7f5; --cp-surface-2: #ecf0ed; --cp-ink: #17282b; --cp-muted: #748285; --cp-line: #e7ebe7; --cp-brand: #17684f; --cp-brand-ink: #ffffff;
  --cp-up: #17a673; --cp-down: #e5566a; --cp-warn-bg: #fff4d6; --cp-warn-ink: #6d4b00; --cp-shadow: 0 8px 28px rgba(16, 29, 33, .16);
  --cp-radius: 8px; --cp-tools-w: 46px; --cp-panel-w: 340px; --cp-top-h: 52px;
  --nav-bg: var(--cp-surface); --nav-ink: var(--cp-ink); --nav-line: var(--cp-line); --nav-brand: var(--cp-brand);
  --oa-text-caption: 12px; --oa-radius-pill: 999px; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cp-bg: #000000; --cp-surface: #0a0a0b; --cp-surface-2: #141416; --cp-ink: #e8eaed; --cp-muted: #9aa0a6; --cp-line: #26272b; --cp-brand: #3aa37f; --cp-brand-ink: #08150f;
    --cp-warn-bg: #3a2f10; --cp-warn-ink: #f3d889; --cp-shadow: 0 8px 28px rgba(0, 0, 0, .5); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --cp-bg: #000000; --cp-surface: #0a0a0b; --cp-surface-2: #141416; --cp-ink: #e8eaed; --cp-muted: #9aa0a6; --cp-line: #26272b; --cp-brand: #3aa37f; --cp-brand-ink: #08150f;
  --cp-warn-bg: #3a2f10; --cp-warn-ink: #f3d889; --cp-shadow: 0 8px 28px rgba(0, 0, 0, .5); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--cp-bg); color: var(--cp-ink); }
body { font: 13px/1.5 "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif; -webkit-text-size-adjust: 100%; overflow: hidden; }
.cp-root { height: 100vh; height: 100dvh; display: flex; flex-direction: column; min-width: 0; }
.cp-boot, .cp-fatal { margin: 20vh auto; max-width: 28rem; text-align: center; color: var(--cp-muted); padding: 0 16px; }
.cp-fatal h1 { color: var(--cp-ink); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cp-brand); outline-offset: 2px; }
.cp-muted { color: var(--cp-muted); } .cp-small { font-size: 11.5px; } .cp-grow { flex: 1; } .up { color: var(--cp-up); } .down { color: var(--cp-down); }
.cp-offscreen { position: fixed; top: -200px; opacity: 0; }

/* ---------- buttons */
.cp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 0 10px; border: 1px solid var(--cp-line); border-radius: var(--cp-radius); background: var(--cp-bg); cursor: pointer; white-space: nowrap; }
.cp-btn:hover:not(:disabled) { background: var(--cp-surface-2); }
.cp-btn:disabled { opacity: .45; cursor: not-allowed; }
.cp-btn[aria-pressed="true"], .cp-btn[aria-selected="true"] { color: var(--cp-brand); border-color: var(--cp-brand); background: color-mix(in srgb, var(--cp-brand) 12%, var(--cp-bg)); }
.cp-icon { width: 34px; padding: 0; border-color: transparent; background: transparent; }
.cp-icon.on { color: #d49a00; } .cp-icon.on svg { fill: currentColor; }
.cp-primary { background: var(--cp-brand); color: var(--cp-brand-ink); border-color: var(--cp-brand); }
.cp-primary:hover:not(:disabled) { background: var(--cp-brand); filter: brightness(1.08); }
.cp-danger:hover:not(:disabled) { color: var(--cp-down); }
.cp-ico { display: inline-flex; line-height: 0; }

/* ---------- top bar */
.cp-top { display: flex; align-items: center; gap: 8px; min-height: var(--cp-top-h); padding: 6px 10px; background: var(--cp-surface); border-bottom: 1px solid var(--cp-line); }
.cp-brand { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--cp-ink); font-weight: 700; }
.cp-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--cp-brand); color: var(--cp-brand-ink); font-weight: 800; font-size: 13px; }
.cp-brand-t { letter-spacing: .02em; }
.cp-search { position: relative; display: flex; align-items: center; gap: 6px; width: min(300px, 34vw); min-width: 150px; padding: 0 10px; border: 1px solid var(--cp-line); border-radius: var(--cp-radius); background: var(--cp-bg); }
.cp-search input { flex: 1; min-width: 0; height: 34px; border: 0; outline: 0; background: transparent; }
.cp-search:focus-within { border-color: var(--cp-brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--cp-brand) 22%, transparent); }
.cp-search kbd { font: 11px/1 monospace; padding: 2px 6px; border: 1px solid var(--cp-line); border-radius: 5px; color: var(--cp-muted); }
#cpResults { position: absolute; z-index: 40; top: calc(100% + 6px); inset-inline: 0; margin: 0; padding: 4px; list-style: none; max-height: 60vh; overflow: auto; background: var(--cp-bg); border: 1px solid var(--cp-line); border-radius: var(--cp-radius); box-shadow: var(--cp-shadow); min-width: min(360px, 92vw); }
#cpResults[hidden] { display: none; }
#cpResults li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 6px; cursor: pointer; }
#cpResults li.on, #cpResults li:hover { background: var(--cp-surface-2); }
.cp-res-main { display: flex; flex-direction: column; flex: 1; min-width: 0; } .cp-res-main small { color: var(--cp-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-res-tag { font-size: 11px; color: var(--cp-muted); } .cp-empty { color: var(--cp-muted); cursor: default !important; }
.cp-symhead { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; overflow: hidden; }
.cp-symname { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; } .cp-symname small { color: var(--cp-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.cp-quote { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; } .cp-quote b { font-size: 17px; } .cp-quote em { font-style: normal; font-size: 12px; }
.cp-actions { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
.cp-logo { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; overflow: hidden; background: var(--cp-surface-2); border: 1px solid var(--cp-line); }
.cp-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; } .cp-logo-t { font-size: 9.5px; font-weight: 700; color: var(--cp-muted); }

/* data status chip */
.cp-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; margin: 0 6px; border-radius: var(--oa-radius-pill); border: 1px solid var(--cp-line); font-size: 12px; white-space: nowrap; }
.cp-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--cp-muted); } .cp-chip b { font-weight: 600; }
.cp-chip[data-state="live"] i { background: var(--cp-up); } .cp-chip[data-state="delayed"] i { background: #d49a00; } .cp-chip[data-state="stale"] i { background: #e07b53; } .cp-chip[data-state="offline"] i { background: var(--cp-down); }
.cp-banner { padding: 5px 12px; background: var(--cp-warn-bg); color: var(--cp-warn-ink); text-align: center; font-size: 12.5px; border-bottom: 1px solid var(--cp-line); }
.cp-banner[hidden] { display: none; }
.cp-demo .cp-brand-t::after { content: " · تجريبي"; font-weight: 500; color: var(--cp-muted); }

/* tabs */
.cp-tabs { display: flex; gap: 4px; padding: 4px 8px 0; overflow-x: auto; background: var(--cp-surface); border-bottom: 1px solid var(--cp-line); scrollbar-width: thin; }
.cp-tab { display: inline-flex; align-items: center; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; }
.cp-tab.on { background: var(--cp-bg); border-color: var(--cp-line); }
.cp-tab-b { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px 0 4px; border: 0; background: transparent; cursor: pointer; } .cp-tab-b .cp-logo { width: 20px; height: 20px; }
.cp-tab-x { display: grid; place-items: center; width: 22px; height: 22px; margin-inline-end: 4px; border: 0; border-radius: 50%; background: transparent; color: var(--cp-muted); cursor: pointer; } .cp-tab-x:hover { background: var(--cp-surface-2); color: var(--cp-ink); }

/* ---------- main grid: the tools column on the physical left, the panel on the physical right */
.cp-main { flex: 1; min-height: 0; display: grid; direction: ltr; grid-template-columns: var(--cp-tools-w) minmax(0, 1fr); }
.cp-main > * { direction: rtl; min-width: 0; min-height: 0; }
html.cp-panel-open .cp-main { grid-template-columns: var(--cp-tools-w) minmax(0, 1fr) var(--cp-panel-w); }
.cp-tools { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; overflow-y: auto; background: var(--cp-surface); border-inline-end: 1px solid var(--cp-line); }
.cp-tools .cp-icon { width: 36px; height: 36px; } .cp-sep { width: 22px; height: 1px; background: var(--cp-line); margin: 4px 0; }
.cp-chartcol { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.cp-typebar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--cp-line); overflow-x: auto; }
.cp-seg { display: inline-flex; gap: 2px; padding: 2px; background: var(--cp-surface-2); border-radius: 10px; }
.cp-seg-b { min-height: 28px; border-color: transparent; background: transparent; }
.cp-scale { display: inline-flex; align-items: center; gap: 6px; color: var(--cp-muted); } .cp-scale select, #cpListSel { height: 30px; border: 1px solid var(--cp-line); border-radius: 6px; background: var(--cp-bg); padding: 0 6px; }
.cp-hint { color: var(--cp-muted); font-size: 11.5px; }
.cp-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 4px 12px; font: 12px/1.4 ui-monospace, "SF Mono", Menlo, monospace; color: var(--cp-muted); min-height: 24px; }
.cp-legend b { font-weight: 600; } .cp-leg-sym { color: var(--cp-ink); font-family: inherit; font-weight: 600; }
.cp-wrap { position: relative; flex: 1; min-height: 220px; background: var(--cp-bg); direction: ltr; }
.cp-canvas { position: absolute; inset: 0; }
.cp-overlay { position: absolute; inset: 0; z-index: 6; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: color-mix(in srgb, var(--cp-bg) 72%, transparent); color: var(--cp-muted); pointer-events: none; direction: rtl; }
.cp-overlay.on { display: flex; } .cp-overlay .cp-btn { pointer-events: auto; }
.cp-imgpanel { position: absolute; top: 8px; inset-inline-start: 8px; z-index: 7; display: flex; align-items: center; gap: 6px; padding: 4px 8px; background: var(--cp-bg); border: 1px solid var(--cp-line); border-radius: var(--cp-radius); box-shadow: var(--cp-shadow); direction: rtl; }
.cp-imgpanel[hidden] { display: none; } .cp-imgname { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-inline { display: inline-flex; align-items: center; gap: 6px; }
.cp-tfbar { display: flex; gap: 2px; padding: 6px 10px; border-top: 1px solid var(--cp-line); overflow-x: auto; background: var(--cp-surface); }
.cp-tf { min-height: 30px; min-width: 40px; border-color: transparent; background: transparent; }

/* ---------- right panel */
.cp-panel { display: none; flex-direction: column; gap: 8px; padding: 8px; overflow-y: auto; background: var(--cp-surface); border-inline-start: 1px solid var(--cp-line); }
html.cp-panel-open .cp-panel { display: flex; }
.cp-card { padding: 10px; background: var(--cp-bg); border: 1px solid var(--cp-line); border-radius: var(--cp-radius); } .cp-card h3, .cp-pop-t, .cp-settings h3 { margin: 0 0 8px; font-size: 13px; }
.cp-card-grow { flex: 1; min-height: 160px; display: flex; flex-direction: column; }
.cp-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; } .cp-dl dt { color: var(--cp-muted); } .cp-dl dd { margin: 0; text-align: end; font-weight: 600; }
.cp-link { display: inline-block; margin-top: 8px; color: var(--cp-brand); }
.cp-wl-head { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; } .cp-wl-head h3 { flex-basis: 100%; margin: 0 0 4px; } .cp-wl-head select { flex: 1; min-width: 0; }
.cp-wl { list-style: none; margin: 8px 0; padding: 0; flex: 1; overflow-y: auto; }
.cp-wl li { display: flex; align-items: center; border-radius: 6px; } .cp-wl li.on { background: color-mix(in srgb, var(--cp-brand) 12%, transparent); } .cp-wl li:hover { background: var(--cp-surface-2); }
.cp-wl-b { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px; border: 0; background: transparent; cursor: pointer; text-align: start; }
.cp-wl-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; } .cp-wl-t small { color: var(--cp-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-wl-x { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: var(--cp-muted); cursor: pointer; opacity: 0; } .cp-wl li:hover .cp-wl-x, .cp-wl-x:focus-visible { opacity: 1; } .cp-wl-x:hover { color: var(--cp-down); }

/* ---------- popovers and settings */
.cp-pop { position: fixed; z-index: 60; max-height: 80vh; overflow: auto; padding: 12px; background: var(--cp-bg); border: 1px solid var(--cp-line); border-radius: 12px; box-shadow: var(--cp-shadow); }
.cp-pop[hidden] { display: none; }
.cp-settings { display: grid; gap: 8px; } .cp-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; } .cp-field input[type="color"] { width: 40px; height: 28px; padding: 0; border: 1px solid var(--cp-line); border-radius: 6px; background: transparent; }
.cp-field select { height: 30px; border: 1px solid var(--cp-line); border-radius: 6px; background: var(--cp-bg); padding: 0 6px; } .cp-field input[type="range"] { width: 120px; accent-color: var(--cp-brand); }
.cp-mini { min-height: 26px; padding: 0 8px; border: 1px solid var(--cp-line); border-radius: 6px; background: var(--cp-bg); cursor: pointer; font-size: 12px; }
.cp-notes { margin: 0; color: var(--cp-muted); font-size: 11.5px; min-height: 1em; }
.cp-row { display: flex; gap: 6px; align-items: center; margin: 8px 0; } .cp-row input[type="text"] { flex: 1; min-width: 0; height: 32px; padding: 0 8px; border: 1px solid var(--cp-line); border-radius: 6px; background: var(--cp-bg); } .cp-wrap-row { flex-wrap: wrap; }
.cp-lay-list { list-style: none; margin: 8px 0; padding: 0; max-height: 220px; overflow: auto; } .cp-lay-list li { display: flex; align-items: center; } .cp-lay-b { flex: 1; display: flex; justify-content: space-between; gap: 8px; padding: 7px 8px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; text-align: start; } .cp-lay-b:hover { background: var(--cp-surface-2); } .cp-lay-b small { color: var(--cp-muted); }
.cp-toast { position: fixed; z-index: 80; bottom: 18px; left: 50%; max-width: min(92vw, 460px); transform: translate(-50%, 24px); padding: 9px 16px; border-radius: 10px; background: #17282b; color: #fff; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; text-align: center; }
.cp-toast.on { opacity: 1; transform: translate(-50%, 0); } .cp-toast[data-tone="warn"] { background: #7a4b00; }

@media (max-width: 1180px) { .cp-quote, .cp-symname small { display: none; } .cp-chip b { display: none; } .cp-search { width: min(260px, 30vw); } }
/* ---------- embedded: compact top bar, no brand, no tabs */
.cp-embedded .cp-top { min-height: 42px; padding: 3px 8px; } .cp-embedded .cp-brand, .cp-embedded .cp-tabs, .cp-embedded #cpTheme, .cp-embedded #cpFull { display: none; } .cp-embedded .cp-symname small { display: none; }

/* ---------- narrow screens: the panel becomes a drawer over the chart, the tools row goes horizontal */
@media (max-width: 900px) {
  .cp-search { width: auto; flex: 1; } .cp-symhead { display: none; } .cp-search kbd { display: none; } #cpCopy, #cpShot, #cpFull { display: none; }
  html.cp-panel-open .cp-main { grid-template-columns: var(--cp-tools-w) minmax(0, 1fr); }
  html.cp-panel-open .cp-panel { position: fixed; z-index: 50; top: var(--cp-top-h); bottom: 0; right: 0; width: min(320px, 92vw); box-shadow: var(--cp-shadow); }
}
@media (max-width: 640px) {
  .cp-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); } html.cp-panel-open .cp-main { grid-template-columns: minmax(0, 1fr); }
  .cp-tools { flex-direction: row; padding: 4px 6px; overflow-x: auto; overflow-y: hidden; border-inline-end: 0; border-bottom: 1px solid var(--cp-line); } .cp-sep { width: 1px; height: 22px; margin: 0 4px; }
  .cp-brand-t, .cp-chip b { display: none; } .cp-chip { padding: 0 8px; margin: 0 2px; } #cpPrev, #cpNext, #cpPopout { display: none; } .cp-top { gap: 4px; padding: 4px 6px; }
}
@media (prefers-reduced-motion: reduce) { .cp-toast { transition: none; } }
@media print { .cp-top, .cp-tabs, .cp-tools, .cp-panel, .cp-tfbar, .cp-typebar { display: none !important; } }

/* Super Chart: timeframes in the top toolbar, time ranges under the chart, the symbol watermark, the big price card and the watchlist with prices. */
.cp-tfs { display: inline-flex; align-items: center; gap: 2px; flex: none; } 
.cp-vsep { flex: none; width: 1px; height: 20px; background: var(--cp-line); }
.cp-watermark { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; pointer-events: none; user-select: none; overflow: hidden; } .cp-watermark img { width: min(44%, 560px); height: auto; opacity: .1; } .cp-wm-dark { display: none; }
:root[data-theme="dark"] .cp-wm-light { display: none; } :root[data-theme="dark"] .cp-wm-dark { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cp-wm-light { display: none; } :root:not([data-theme="light"]) .cp-wm-dark { display: block; } }
#cpRange { justify-content: center; }
.cp-big { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 4px; } .cp-big b { font-size: 30px; line-height: 1.1; } .cp-big em { font-style: normal; font-size: 14px; font-weight: 600; }
.cp-statusline { display: flex; align-items: center; gap: 6px; margin: 4px 0 10px; font-size: 12px; color: var(--cp-muted); } .cp-statusline i { flex: none; width: 8px; height: 8px; border-radius: 50%; } .cp-statusline i.ok { background: var(--cp-up); } .cp-statusline i.warn { background: var(--cp-warn-ink); }
.cp-wl-cols { display: flex; gap: 10px; padding: 6px 6px 2px; margin-top: 6px; border-top: 1px solid var(--cp-line); color: var(--cp-muted); font-size: 11px; } .cp-wl-cols span:first-child { flex: 1; } .cp-wl-cols span:nth-child(2) { min-width: 56px; text-align: end; } .cp-wl-cols span:nth-child(3) { min-width: 54px; text-align: end; margin-inline-end: 26px; }
.cp-wl-q { display: flex; align-items: baseline; gap: 10px; flex: none; font-size: 12.5px; } .cp-wl-p { min-width: 56px; text-align: end; font-weight: 600; } .cp-wl-c { min-width: 54px; text-align: end; font-style: normal; }

/* Super Chart, round 2: the grouped timeframe list, the grouped drawing rail with flyouts, replay. */
.cp-tf-menu { min-width: 26px; padding: 0 4px; }
.cp-tfgrp h3 { margin: 10px 0 4px; font-size: 11px; font-weight: 600; color: var(--cp-muted); }
.cp-tfrow { display: flex; align-items: center; gap: 4px; border-radius: 6px; } .cp-tfrow:hover { background: var(--cp-surface-2); } .cp-tfrow.on { background: color-mix(in srgb, var(--cp-brand) 12%, transparent); }
.cp-tfpick { flex: 1; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 0; background: transparent; color: inherit; font: inherit; text-align: start; cursor: pointer; } .cp-tfpick b { min-width: 34px; } .cp-tfpick span { color: var(--cp-muted); }
.cp-tfstar { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--cp-muted); cursor: pointer; } .cp-tfstar:hover { color: var(--cp-brand); } .cp-tfstar.on { color: var(--cp-brand); } .cp-tfstar.on path { fill: currentColor; }
.cp-grp { position: relative; display: inline-flex; }
.cp-caret { position: absolute; right: -4px; top: 0; bottom: 0; width: 12px; padding: 0; border: 0; background: transparent; cursor: pointer; opacity: .55; } .cp-caret::after { content: ""; position: absolute; right: 3px; top: 50%; margin-top: -4px; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 4px solid var(--cp-muted); } .cp-grp:hover .cp-caret, .cp-caret:focus-visible { opacity: 1; }
.cp-tools [data-kit][aria-pressed="false"] { opacity: .8; }
.cp-flyrow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; text-align: start; cursor: pointer; } .cp-flyrow:hover { background: var(--cp-surface-2); } .cp-flyrow.on { background: color-mix(in srgb, var(--cp-brand) 12%, transparent); color: var(--cp-brand); }
.cp-pop-side { padding: 8px; } .cp-pop-side .cp-pop-t { margin: 2px 4px 6px; }
/* the site's own tool bar keeps only Indicators (and undo / redo): drawing tools, magnet, hide and remove live in the rail */
.cp-chartcol .oa-ct-row > button[data-act="draw"], .cp-chartcol .oa-ct-row > button[data-act="magnet"], .cp-chartcol .oa-ct-row > button[data-act="eye"], .cp-chartcol .oa-ct-row > button[data-act="clear"], .cp-chartcol .oa-ct-panel[data-panel="draw"] { display: none !important; }
.cp-replay-btn { gap: 6px; }
.cp-replaybar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 10px; border-top: 1px solid var(--cp-line); background: var(--cp-surface); } .cp-replaybar[hidden] { display: none; }
.cp-rp-title { font-size: 12.5px; } .cp-rp-hint { padding: 2px 10px; border-radius: 999px; background: var(--cp-warn-bg); color: var(--cp-warn-ink); font-size: 12px; }
.cp-rp-speed { height: 30px; border: 1px solid var(--cp-line); border-radius: 6px; background: var(--cp-bg); color: inherit; } .cp-rp-slider { flex: 1; min-width: 120px; accent-color: var(--cp-brand); }
.cp-rp-time { min-width: 112px; text-align: center; color: var(--cp-muted); font-variant-numeric: tabular-nums; }

/* Super Chart, round 3: draggable edges (panel width, details card height). The width handle sits on the panel's inner edge; the panel is the right column of the (left-to-right) main grid. */
.cp-main { position: relative; }
.cp-split { display: none; position: absolute; z-index: 20; top: 0; bottom: 0; right: calc(var(--cp-panel-w) - 4px); width: 8px; cursor: col-resize; touch-action: none; }
html.cp-panel-open .cp-split { display: block; }
.cp-split::after { content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; background: transparent; transition: background .12s; }
.cp-split:hover::after, .cp-split:focus-visible::after, body.cp-resizing .cp-split::after { background: var(--cp-brand); }
.cp-split-h { flex: none; position: relative; height: 10px; margin: -4px 0; cursor: row-resize; touch-action: none; }
.cp-split-h::after { content: ""; position: absolute; left: 30%; right: 30%; top: 4px; height: 2px; border-radius: 2px; background: var(--cp-line); transition: background .12s; }
.cp-split-h:hover::after, .cp-split-h:focus-visible::after, body.cp-resizing .cp-split-h::after { background: var(--cp-brand); }
#cpDetail { height: var(--cp-detail-h, auto); overflow: auto; }
body.cp-resizing { user-select: none; cursor: col-resize; } body.cp-resizing * { cursor: inherit !important; }
@media (max-width: 900px) { .cp-split, .cp-split-h { display: none !important; } #cpDetail { height: auto; } }

/* Super Chart, round 4: one top row like TradingView. Left to right: back, account, symbol and search, timeframes, chart type, indicators, alert, replay, undo / redo; the right end: layouts, settings, screenshot, full screen, panel. */
.cp-top { direction: ltr; flex-wrap: nowrap; overflow-x: auto; overflow-y: visible; gap: 6px; scrollbar-width: none; } .cp-top::-webkit-scrollbar { display: none; }
.cp-top > * { flex: none; } .cp-top .cp-search { flex: 0 1 260px; min-width: 150px; }
.cp-actions { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.cp-top .cp-topbtn { gap: 6px; padding: 0 10px; } .cp-top .cp-topbtn span { white-space: nowrap; }
.cp-avatar { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--cp-line); border-radius: 50%; background: var(--cp-brand); color: var(--cp-brand-ink); font: inherit; font-weight: 700; cursor: pointer; } .cp-avatar:hover { filter: brightness(1.08); }
.cp-menu-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 8px; border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; text-align: start; text-decoration: none; cursor: pointer; } .cp-menu-row:hover { background: var(--cp-surface-2); }
.cp-acct-mail { margin: 0 0 4px; font-weight: 600; word-break: break-all; }
.cp-chips { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px 4px 8px; list-style: none; cursor: default; }
.cp-chip-f { height: 26px; padding: 0 10px; border: 1px solid var(--cp-line); border-radius: 999px; background: var(--cp-bg); color: inherit; font: inherit; font-size: 12px; cursor: pointer; } .cp-chip-f.on { background: var(--cp-brand); border-color: var(--cp-brand); color: var(--cp-brand-ink); }
.cp-aform { display: grid; gap: 8px; margin-bottom: 8px; } .cp-aform select, .cp-aform input[type="number"] { height: 34px; padding: 0 8px; border: 1px solid var(--cp-line); border-radius: 6px; background: var(--cp-bg); color: inherit; font: inherit; }
.cp-alist { list-style: none; margin: 6px 0; padding: 0; } .cp-alist li { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--cp-line); } .cp-alist li span { flex: 1; font-weight: 600; }
#cpRange { justify-content: flex-start; align-items: center; }
.cp-chartcol .oa-ct-row { display: none !important; }
@media (max-width: 1760px) { .cp-top .cp-symname small, .cp-top .cp-quote em { display: none; } .cp-top .cp-chip b { display: none; } .cp-top .cp-chip { padding: 0 8px; margin: 0 2px; } }
@media (max-width: 1560px) { .cp-top #cpReplay > span:not(.cp-ico), .cp-top #cpAlertBtn > span:not(.cp-ico) { display: none; } .cp-top #cpReplay, .cp-top #cpAlertBtn { padding: 0 8px; } }
@media (max-width: 1280px) { .cp-top #cpTypeBtn > span:not(.cp-ico), .cp-top #cpIndBtn > span:not(.cp-ico) { display: none; } .cp-top .cp-quote { display: none; } }

/* the watchlist is fluid: the ticker always keeps its room, and as the panel narrows the row gives up details in order (name, logo, then the price and change stack, then the change) */
.cp-card-grow { container-type: inline-size; container-name: wl; }
.cp-wl-b { gap: 6px; min-width: 0; } .cp-wl-t { flex: 1 1 0; min-width: 0; } .cp-wl-t b, .cp-wl-t small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-wl-q { flex: 0 0 auto; gap: 6px; } .cp-wl-p { min-width: 48px; } .cp-wl-c { min-width: 50px; }
@container wl (max-width: 300px) { .cp-wl-t small { display: none; } }
@container wl (max-width: 250px) {
  .cp-wl .cp-logo { display: none; } .cp-wl-cols { display: none; }
  .cp-wl-q { flex-direction: column; align-items: flex-end; gap: 0; line-height: 1.25; } .cp-wl-p, .cp-wl-c { min-width: 0; text-align: end; }
}
@container wl (max-width: 190px) { .cp-wl-c { display: none; } }

/* the stock data card is small and sits under the watchlist */
#cpDetail { flex: none; padding: 8px 10px; } #cpDetail h3 { margin: 0 0 4px; font-size: 11.5px; color: var(--cp-muted); }
#cpDetail .cp-big { flex-direction: row; align-items: baseline; gap: 8px; margin: 0; } #cpDetail .cp-big b { font-size: 19px; } #cpDetail .cp-big em { font-size: 12px; }
#cpDetail .cp-statusline { margin: 2px 0 6px; font-size: 11px; }
#cpDetail .cp-dl { grid-template-columns: auto 1fr auto 1fr; gap: 2px 8px; font-size: 11.5px; } #cpDetail .cp-dl dd { font-weight: 600; }
#cpDetail .cp-small { font-size: 10px; margin: 6px 0 0; } #cpDetail .cp-link { margin-top: 4px; font-size: 11.5px; }

.cp-tabs[hidden] { display: none; }

.cp-steps { margin: 6px 0 0; padding-inline-start: 20px; line-height: 1.7; }

.cp-wrap.cp-drop { outline: 2px dashed var(--cp-brand); outline-offset: -4px; }

/* markets and stocks: market tabs, the list tools, the favourite star */
.cp-mkts { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid var(--cp-line); scrollbar-width: thin; }
.cp-mkt { flex: none; height: 28px; padding: 0 10px; border: 1px solid var(--cp-line); border-radius: 999px; background: var(--cp-bg); color: inherit; font: inherit; font-size: 12.5px; cursor: pointer; } .cp-mkt:hover { background: var(--cp-surface-2); } .cp-mkt.on { background: var(--cp-brand); border-color: var(--cp-brand); color: var(--cp-brand-ink); font-weight: 600; }
.cp-mk-tools { display: grid; gap: 6px; margin-bottom: 4px; } .cp-mk-row { display: flex; gap: 6px; } .cp-mk-filter { flex: 1; min-width: 0; height: 30px; padding: 0 8px; border: 1px solid var(--cp-line); border-radius: 6px; background: var(--cp-bg); color: inherit; font: inherit; }
.cp-mk-sort { flex: none; max-width: 46%; height: 30px; border: 1px solid var(--cp-line); border-radius: 6px; background: var(--cp-bg); color: inherit; font: inherit; font-size: 12px; }
.cp-mk-tools .cp-seg { justify-self: start; }
.cp-mk-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 6px; }
.cp-fav { color: var(--cp-muted); } .cp-fav.on { color: var(--cp-brand); } .cp-fav.on path { fill: currentColor; }
.cp-mk .cp-wl-x { opacity: .65; } .cp-mk li:hover .cp-wl-x, .cp-fav.on { opacity: 1; }
@media (max-width: 1560px) { .cp-top #cpMktBtn > span:not(.cp-ico) { display: none; } .cp-top #cpMktBtn { padding: 0 8px; } }

.cp-mk-note { display: flex; align-items: center; gap: 6px; margin: 2px 0 4px; padding: 4px 8px; border-radius: 6px; background: var(--cp-warn-bg); color: var(--cp-warn-ink); font-size: 11.5px; } .cp-mk-note i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--cp-warn-ink); }

/* Super Chart, round 5: the gold OA logo and the member's picture at the far right; the search list floats above the bar; the chart is fixed and fills the screen (every helper floats over it in glass). */
.cp-brand .cp-gold { display: block; width: 34px; height: 34px; } .cp-brand { padding: 0 2px; }
.cp-avatar.has-img { padding: 0; overflow: hidden; background: var(--cp-surface-2); } .cp-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
#cpResults { position: fixed !important; inset-inline: auto !important; z-index: 80; }
.cp-chartcol { position: relative; }
#cpToolsAnchor { height: 0; overflow: visible; }
.cp-chartcol > .oa-ct { position: absolute; top: 0; left: 0; right: 0; z-index: 14; height: 0; overflow: visible; pointer-events: none; background: transparent; border: 0; padding: 0; margin: 0; }
.cp-glass, .cp-chartcol > .oa-ct .oa-ct-hint, .cp-chartcol > .oa-ct .oa-ct-sel, .cp-chartcol > .oa-ct .oa-ct-panel { pointer-events: auto; background: color-mix(in srgb, var(--cp-bg) 58%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5); border: 1px solid color-mix(in srgb, var(--cp-line) 70%, transparent); border-radius: 12px; box-shadow: var(--cp-shadow); color: var(--cp-ink); }
.cp-chartcol > .oa-ct .oa-ct-hint { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: auto; max-width: min(520px, 90%); padding: 6px 14px; font-size: 12.5px; border-radius: 999px; white-space: nowrap; }
.cp-chartcol > .oa-ct .oa-ct-sel { position: absolute; top: 48px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 6px 10px; flex-wrap: wrap; max-width: 92%; }
.cp-chartcol > .oa-ct .oa-ct-sel[hidden], .cp-chartcol > .oa-ct .oa-ct-hint[hidden], .cp-chartcol > .oa-ct .oa-ct-panel[hidden] { display: none; }
.cp-chartcol > .oa-ct .oa-ct-panel { position: absolute; top: 10px; right: 10px; width: min(400px, calc(100% - 20px)); max-height: calc(100vh - 220px); overflow: auto; padding: 10px; }
.cp-legend { position: absolute; top: 6px; left: 10px; z-index: 5; padding: 0; min-height: 0; pointer-events: none; background: transparent; }
.cp-chartcol > .cp-wrap { flex: 1 1 0; min-height: 0; }
.cp-pop, .cp-replaybar { -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); }
.cp-replaybar { background: color-mix(in srgb, var(--cp-surface) 72%, transparent); }

/* replay: floating glass bar over the chart (the chart never resizes) and the pick-the-start overlay */
.cp-chartcol > .cp-replaybar { position: absolute; left: 50%; transform: translateX(-50%); bottom: 58px; z-index: 16; width: min(760px, calc(100% - 32px)); border: 1px solid var(--cp-line); border-radius: 14px; box-shadow: 0 8px 28px color-mix(in srgb, var(--cp-ink) 22%, transparent); }
.cp-wrap.cp-picking, .cp-wrap.cp-picking * { cursor: col-resize !important; }
.cp-pick-shade { position: absolute; top: 0; right: 0; bottom: 0; z-index: 12; pointer-events: none; background: color-mix(in srgb, var(--cp-bg) 55%, transparent); }
.cp-pick-line { position: absolute; top: 0; bottom: 0; width: 0; z-index: 13; pointer-events: none; border-left: 2px dashed var(--cp-brand); }
.cp-pick-tag { position: absolute; top: 12px; left: 8px; white-space: nowrap; padding: 4px 10px; border-radius: 999px; background: var(--cp-brand); color: var(--cp-brand-ink); font-size: 12px; direction: rtl; }
.cp-chartcol > .cp-replaybar { flex-wrap: nowrap; } .cp-chartcol > .cp-replaybar .cp-rp-hint { display: none; } .cp-chartcol > .cp-replaybar .cp-rp-slider { min-width: 80px; }
/* the selection toolbar is one compact glass row */
.cp-chartcol > .oa-ct .oa-ct-sel { flex-wrap: nowrap; gap: 6px; padding: 5px 8px; border-radius: 14px; max-width: calc(100% - 24px); overflow-x: auto; }
.cp-chartcol > .oa-ct .oa-ct-sel button, .cp-chartcol > .oa-ct .oa-ct-sel select, .cp-chartcol > .oa-ct .oa-ct-sel input { min-height: 30px; height: 30px; font-size: 12px; padding: 0 9px; white-space: nowrap; border-radius: 8px; }
.cp-chartcol > .oa-ct .oa-ct-sel input[type=color] { width: 30px; padding: 2px; }
.cp-chartcol > .oa-ct .oa-ct-sel-name { flex: none; white-space: nowrap; font-size: 12px; padding-inline: 4px; }
.cp-chartcol > .oa-ct .oa-ct-pos { display: inline-flex; gap: 6px; align-items: center; } .cp-chartcol > .oa-ct .oa-ct-pos[hidden] { display: none; }
.cp-chartcol > .oa-ct .oa-ct-pos label { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; white-space: nowrap; } .cp-chartcol > .oa-ct .oa-ct-pos input { width: 74px; }

/* the script editor opens in a glass window over the chart */
.cp-script-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; background: color-mix(in srgb, var(--cp-ink) 38%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cp-script-card { position: relative; width: min(1100px, 100%); height: min(720px, 100%); overflow: hidden; border-radius: 16px; border: 1px solid var(--cp-line); background: var(--cp-bg); color: var(--cp-ink); box-shadow: 0 20px 60px color-mix(in srgb, var(--cp-ink) 30%, transparent); }
.cp-script-box { height: 100%; overflow: auto; } .cp-script-x { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 2; }
#cpScriptBtn { gap: 6px; }
.oa-ct-ind-q { width: 100%; box-sizing: border-box; height: 34px; margin: 0 0 8px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--cp-line); background: var(--cp-bg); color: inherit; position: sticky; top: 0; z-index: 2; }

/* the indicators window */
.oid-back { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; background: color-mix(in srgb, var(--cp-ink) 38%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.oid { display: flex; flex-direction: column; width: min(860px, 100%); height: min(640px, 84vh); border-radius: 12px; border: 1px solid var(--cp-line); background: var(--cp-bg); color: var(--cp-ink); box-shadow: var(--cp-shadow); overflow: hidden; }
.oid-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 4px; } .oid-title { margin: 0; font-size: 15px; }
.oid-x { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--cp-muted); font-size: 22px; line-height: 1; cursor: pointer; } .oid-x:hover { background: var(--cp-surface-2); color: var(--cp-ink); }
.oid-search { padding: 6px 16px 10px; border-bottom: 1px solid var(--cp-line); }
.oid-q { width: 100%; box-sizing: border-box; height: 42px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--cp-line); background: var(--cp-surface); color: inherit; font-size: 15px; } .oid-q:focus { outline: 2px solid var(--cp-brand); outline-offset: 0; }
.oid-body { flex: 1; display: flex; min-height: 0; }
.oid-side { display: flex; flex-direction: column; gap: 2px; width: 200px; flex: none; padding: 10px; overflow: auto; border-inline-end: 1px solid var(--cp-line); background: var(--cp-surface); }
.oid-tab { text-align: start; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--cp-ink); font-size: 13px; cursor: pointer; } .oid-tab:hover { background: var(--cp-surface-2); } .oid-tab.on { background: var(--cp-surface-2); color: var(--cp-brand); font-weight: 600; }
.oid-prog { margin-top: auto; border: 1px solid var(--cp-line); direction: ltr; text-align: center; }
.oid-main { flex: 1; min-width: 0; display: flex; flex-direction: column; } .oid-list { flex: 1; overflow: auto; padding: 6px 8px; }
.oid-h { margin: 10px 8px 4px; font-size: 12px; font-weight: 600; color: var(--cp-muted); }
.oid-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; } .oid-row.act { background: var(--cp-surface-2); } .oid-row.on .oid-state { color: var(--cp-brand); font-weight: 600; }
.oid-star { width: 28px; height: 28px; flex: none; border: 0; border-radius: 8px; background: transparent; color: var(--cp-muted); font-size: 16px; cursor: pointer; } .oid-star.on { color: var(--cp-brand); }
.oid-names { flex: 1; min-width: 0; display: flex; flex-direction: column; } .oid-en { font-size: 13px; font-weight: 600; } .oid-ar { font-size: 12px; color: var(--cp-muted); }
.oid-names mark { background: color-mix(in srgb, var(--cp-brand) 28%, transparent); color: inherit; border-radius: 8px; }
.oid-tag { flex: none; font-size: 12px; color: var(--cp-muted); } .oid-state { flex: none; min-width: 64px; text-align: end; font-size: 12px; color: var(--cp-muted); }
.oid-empty { padding: 28px 16px; text-align: center; color: var(--cp-muted); font-size: 13px; }
.oid-foot { padding: 8px 16px; border-top: 1px solid var(--cp-line); font-size: 12px; color: var(--cp-muted); }
@media (max-width: 640px) { .oid-side { width: 120px; } .oid-tag { display: none; } }
/* medium screens: the top bar keeps every button (and the gold OA mark and the account at the far end) by showing icons only */
@media (max-width: 1640px) { .cp-top .cp-topbtn > span:not(.cp-ico) { display: none; } .cp-top .cp-topbtn { padding-inline: 8px; } }

/* the floating indicator legend (right side of the chart) */
.cp-chartcol .oa-ct-chips { display: none; }
.cp-chartcol { position: relative; }
.cp-il { position: absolute; top: 10px; right: 72px; z-index: 13; width: 236px; max-height: calc(100% - 90px); overflow: auto; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--cp-line) 70%, transparent); background: color-mix(in srgb, var(--cp-bg) 58%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5); box-shadow: var(--cp-shadow); direction: rtl; pointer-events: auto; }
.cp-il[hidden] { display: none; }
.cp-il-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; border: 0; background: transparent; color: var(--cp-ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.cp-il-head b { padding: 0 8px; border-radius: 999px; background: var(--cp-surface-2); font-size: 12px; } .cp-il-chev { margin-inline-start: auto; color: var(--cp-muted); }
.cp-il-rows { display: grid; padding: 0 6px 6px; }
.cp-il-row { display: flex; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 8px; } .cp-il-row:hover { background: color-mix(in srgb, var(--cp-surface-2) 80%, transparent); } .cp-il-row.off .cp-il-name, .cp-il-row.off .cp-il-dot { opacity: .45; }
.cp-il-dot { flex: none; width: 10px; height: 10px; border-radius: 999px; } .cp-il-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; text-align: left; }
.cp-il-b { flex: none; width: 26px; height: 26px; display: inline-grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--cp-muted); cursor: pointer; } .cp-il-b:hover, .cp-il-b.on { background: var(--cp-surface-2); color: var(--cp-ink); }
.cp-il-set { display: grid; gap: 6px; margin: 2px 4px 6px; padding: 8px; border-radius: 8px; background: color-mix(in srgb, var(--cp-surface-2) 70%, transparent); }
.cp-il-f { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--cp-muted); } .cp-il-f input, .cp-il-f select { width: 84px; height: 28px; box-sizing: border-box; padding: 0 6px; border: 1px solid var(--cp-line); border-radius: 8px; background: var(--cp-bg); color: var(--cp-ink); font-size: 12px; } .cp-il-f input[type=color] { padding: 2px; }
.cp-il-btns { display: flex; justify-content: flex-end; }
@media (max-width: 760px) { .cp-il { right: 8px; top: 44px; width: 200px; } }
