/* console: chart round (Nov 4) — header band, framed axis gutter, footer band, timezone picker */
.cx-chart { --cht-hl: rgba(255,255,255,.075); --cht-band: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.014));
  --cht-gut: rgba(255,255,255,.018); --cht-ax: rgba(255,255,255,.07); }

/* ---------- toolbar: a frosted header band, hairline fades at both ends ---------- */
.cx .cx-chart .cx-ct { position: relative; z-index: 2; height: 44px; min-height: 44px; box-sizing: border-box; margin: 0 -4px 0 -8px; padding: 0 12px; gap: 8px;
  background: var(--cht-band); border-radius: var(--cx-r, 14px) var(--cx-r, 14px) 0 0; }
.cx .cx-chart .cx-ct::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--cht-hl) 6%, var(--cht-hl) 94%, transparent); }
.cx .cx-chart .cx-ct > .sp { display: none; }
.cx .cx-chart .cx-ohlc { margin-left: auto; flex: 0 1 auto; font: 500 11px/1 var(--fm); letter-spacing: -.01em; color: var(--tx3); font-variant-numeric: tabular-nums; text-align: right; padding-left: 6px; }
@container (min-width: 600px) { .cx .cx-chart .cx-ohlc { display: block; } }
@container (max-width: 599px) { .cx .cx-chart .cx-ohlc { display: none; } }

/* ---------- plot frame: the price-axis gutter is part of the frame ---------- */
.cx .cx-chart .chart-box > [data-chart] { background: linear-gradient(var(--cht-gut), var(--cht-gut)) right top / 60px 100% no-repeat; }
.cx .cx-chart .c-axis { border-left: 0; background: linear-gradient(180deg, transparent, var(--cht-ax) 40px, var(--cht-ax)) left top / 1px 100% no-repeat; }
.cx .cx-chart .c-time { border-top: 0; background: linear-gradient(90deg, transparent, var(--cht-ax) 48px, var(--cht-ax)) left top / 100% 1px no-repeat; }
/* level lines: drawn as a masked hairline that fades in at the left and out before the axis gutter */
.cx .cx-chart .c-line { border-top: 0; --dash: repeating-linear-gradient(90deg, var(--lc) 0 4px, transparent 4px 8px); }
.cx .cx-chart .c-line::before { content: ""; position: absolute; left: 0; right: 0; top: -.5px; height: 1px; background: var(--dash); opacity: .9;
  -webkit-mask: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 44px), transparent); mask: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 44px), transparent); }
.cx .cx-chart .c-line.avgs { --dash: linear-gradient(var(--lc), var(--lc)); }
.cx .cx-chart :is(.c-line.mml, .c-line.lms, .c-line.pathl.wait) { --dash: repeating-linear-gradient(90deg, var(--lc) 0 1.5px, transparent 1.5px 4px); }
.cx .cx-chart .c-line span { left: 8px; bottom: 3px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* ---------- footer band: timezone · legend · scale ---------- */
.cx .cx-chart .c-foot { position: relative; display: flex; align-items: center; gap: 12px; height: 38px; min-height: 38px; box-sizing: border-box;
  margin: 0 -4px 0 -8px; padding: 0 12px; border-top: 0; font-size: 11px; }
.cx .cx-chart .c-foot::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--cht-hl) 6%, var(--cht-hl) 94%, transparent); }
.cx .cx-chart .c-foot > .c-leg.c-leg-foot { flex: 1 1 auto; min-width: 0; justify-content: center; align-self: center; line-height: 16px; height: 16px; flex-wrap: nowrap; overflow: hidden; }
.cx .cx-chart .c-foot > .c-leg.c-leg-foot i { width: 7px; height: 7px; align-self: center; }
.cx .cx-chart .c-foot > .c-scale { flex: none; margin-left: auto; height: 26px; box-sizing: border-box; padding: 2px; align-items: center; }
.cx .cx-chart .c-foot > .c-scale button { height: 22px; min-width: 30px; padding: 0 8px; font: 600 11px var(--f); color: var(--tx3); }
.cx .cx-chart .c-foot > .c-scale button:hover { color: var(--tx); }
.cx .cx-chart .c-foot > .c-scale button.on { color: var(--tx); }

/* timezone readout = a quiet button */
.c-tzb { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 26px; padding: 0 8px; margin-left: -8px; border: 0; border-radius: 7px; background: none;
  font: 500 11px/1 var(--fm); color: var(--tx2); font-variant-numeric: tabular-nums; cursor: pointer; transition: background .15s, color .15s; white-space: nowrap; }
.c-tzb::after { content: ""; width: 5px; height: 5px; margin-top: -3px; border: solid currentColor; border-width: 0 1.4px 1.4px 0; transform: rotate(45deg); opacity: .55; }
.c-tzb:empty::after { display: none; }
.c-tzb:hover, .c-tzb[aria-expanded="true"] { background: rgba(255,255,255,.06); color: var(--tx); }
.c-tzb:focus-visible { outline: 1px solid var(--ac, #c9dcf2); outline-offset: 1px; }
.cx .cx-chart .c-foot > .c-tzb { margin-left: -4px; }

/* the picker */
.cx-tzp { position: fixed; z-index: 1000; left: 0; top: 0; width: 264px; max-width: calc(100vw - 16px); display: flex; flex-direction: column; border-radius: 12px; overflow: hidden;
  background: var(--pop-bg, rgba(20,24,31,.86)); -webkit-backdrop-filter: blur(30px) saturate(1.2); backdrop-filter: blur(30px) saturate(1.2);
  box-shadow: var(--pop-sh, inset 0 1px 0 rgba(255,255,255,.16), inset 0 0 0 1px rgba(255,255,255,.07), 0 30px 70px -24px rgba(0,0,0,.9));
  opacity: 0; transform: translateY(4px); visibility: hidden; transition: opacity .14s ease, transform .14s ease, visibility 0s .14s; font-family: var(--f); }
.cx-tzp.on { opacity: 1; transform: none; visibility: visible; transition: opacity .14s ease, transform .14s ease; }
.cx-tzq { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; color: var(--tx3); box-shadow: inset 0 -1px 0 rgba(255,255,255,.06); }
.cx-tzq input { flex: 1; min-width: 0; border: 0; background: none; color: var(--tx); font: 12.5px var(--f); outline: none; padding: 0; }
.cx-tzl { max-height: 264px; overflow-y: auto; overscroll-behavior: contain; padding: 4px; scrollbar-width: thin; }
.cx-tzr { display: grid; grid-template-columns: minmax(0, 1fr) auto 14px; align-items: center; gap: 8px; width: 100%; height: 30px; padding: 0 8px 0 10px; border: 0; border-radius: 7px;
  background: none; color: var(--tx2); font: 500 12.5px var(--f); text-align: left; cursor: pointer; }
.cx-tzr span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cx-tzr em { font-style: normal; color: var(--tx3); }
.cx-tzr .mono { font: 500 11px var(--fm); color: var(--tx3); }
.cx-tzr i { display: grid; place-items: center; color: var(--ac, #c9dcf2); }
.cx-tzr:hover, .cx-tzr.act { background: rgba(255,255,255,.065); color: var(--tx); }
.cx-tzr.cur { color: var(--tx); }
.cx-tze { padding: 14px 10px; font-size: 12px; color: var(--tx3); text-align: center; }
@media (prefers-reduced-motion: reduce) { .cx-tzp, .cx-tzp.on { transition: none; } }

/* ---------- light theme ---------- */
html[data-theme="light"] .cx-chart { --cht-hl: rgba(30,50,80,.1); --cht-band: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.22));
  --cht-gut: rgba(30,50,80,.025); --cht-ax: rgba(30,50,80,.1); }
html[data-theme="light"] .c-tzb:hover, html[data-theme="light"] .c-tzb[aria-expanded="true"] { background: rgba(30,50,80,.06); }
html[data-theme="light"] .cx-tzq { box-shadow: inset 0 -1px 0 rgba(30,50,80,.08); }
html[data-theme="light"] .cx-tzr:hover, html[data-theme="light"] .cx-tzr.act { background: rgba(30,50,80,.06); }
html[data-theme="light"] .cx-tzr i { color: var(--ac-tx, #1d4f86); }
html:root:root[data-look="9"][data-theme="light"] .cx .cx-chart .c-line span { background: rgba(255,255,255,.78); }
