:root {
  --bg: #08090b;
  --card: #121419;
  --ink: #f2f3f5;
  --soft: rgba(242, 243, 245, 0.5);
  --line: rgba(255, 255, 255, 0.08);
  --accent: #2fd08a;
  --down: #7b8090;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 12px;
}

.cs { position: relative; width: min(344px, 100%); padding: 14px 14px 12px; border-radius: 24px; background: radial-gradient(120% 70% at 100% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%), var(--card); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 30px 50px -30px #000000; }

.cs__top { display: flex; align-items: center; gap: 10px; height: 40px; }
.cs__mark { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(150deg, #24272f, #181a20); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
.cs__mark svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 2.200; stroke-linecap: round; stroke-linejoin: round; }
.cs__id { flex: 1; min-width: 0; display: grid; gap: 1px; }
.cs__id b { font-size: 15px; line-height: 19px; font-weight: 740; font-stretch: 106%; letter-spacing: 0.02em; }
.cs__id span { font-size: 11.500px; line-height: 15px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs__quote { flex: none; display: grid; justify-items: end; gap: 1px; }
.cs__quote strong { font-size: 19px; line-height: 21px; font-weight: 720; font-variant-numeric: tabular-nums; letter-spacing: -0.015em; transition: color 0.5s ease; }
.cs__quote strong[data-tick="up"] { color: var(--accent); transition-duration: 0.08s; }
.cs__quote strong[data-tick="down"] { color: #b9bdc9; transition-duration: 0.08s; }
.cs__chg { display: inline-flex; align-items: center; gap: 4px; height: 15px; color: var(--accent); transition: color 0.35s ease; }
.cs__chg svg { width: 8px; height: 7px; fill: currentColor; transition: transform 0.5s cubic-bezier(0.3, 1.5, 0.5, 1); }
.cs__chg[data-down] { color: #a9adba; }
.cs__chg[data-down] svg { transform: rotate(180deg); }
.cs__chgtext { display: block; height: 15px; overflow: hidden; }
.cs__chgtext b { display: block; font-size: 11.500px; line-height: 15px; font-weight: 680; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* the reading of the candle under the crosshair: open, high, low, close */
.cs__read { display: flex; align-items: center; gap: 9px; height: 18px; margin-top: 10px; font-size: 10.500px; line-height: 18px; color: var(--soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cs__read b { font-weight: 640; color: var(--ink); transition: color 0.25s ease; }
.cs__read[data-up] b { color: var(--accent); }
.cs__when { margin-left: auto; font-weight: 600; color: var(--soft); }

.cs__plot { position: relative; height: clamp(120px, 44vh, 188px); margin-top: 4px; outline: none; cursor: crosshair; touch-action: pan-y; -webkit-tap-highlight-color: transparent; border-radius: 10px; }
.cs__plot:focus-visible { box-shadow: 0 0 0 1.500px rgba(255, 255, 255, 0.5); }
.cs__plot svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: hidden; }
.cs__gridline { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.cs__wick { fill: var(--down); }
.cs__body { fill: var(--down); }
.cs__volbar { fill: var(--down); opacity: 0.28; }
[data-up] > .cs__wick, [data-up] > .cs__body { fill: var(--accent); }
.cs__volbar[data-up] { fill: var(--accent); }
.cs__candle { transition: opacity 0.3s ease; }
/* with the crosshair on, the other candles step back */
[data-candles][data-reading] .cs__candle { opacity: 0.5; }
[data-candles][data-reading] .cs__candle[data-on] { opacity: 1; }
.cs__candle[data-on] > .cs__body { filter: drop-shadow(0 0 5px color-mix(in srgb, currentColor 60%, transparent)); }
.cs__candle { color: var(--down); }
.cs__candle[data-up] { color: var(--accent); }
.cs__lastline { stroke: color-mix(in srgb, var(--ink) 38%, transparent); stroke-width: 1; stroke-dasharray: 1 3; stroke-linecap: round; }
.cs__cross { stroke: rgba(242, 243, 245, 0.55); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.cs__ylab { position: absolute; right: 0; top: 0; width: 40px; margin-top: -7px; font-size: 9.500px; line-height: 14px; text-align: right; color: rgba(242, 243, 245, 0.36); font-variant-numeric: tabular-nums; pointer-events: none; transition: opacity 0.2s ease; }
.cs__tag { position: absolute; right: 0; top: 0; min-width: 44px; height: 17px; margin-top: -8.500px; padding: 0 5px; border-radius: 5px; font-size: 9.500px; line-height: 17px; font-weight: 680; text-align: center; font-variant-numeric: tabular-nums; pointer-events: none; white-space: nowrap; }
.cs__tag--last { background: #2a2d36; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.cs__tag--y { background: var(--ink); color: #0b0c0f; opacity: 0; box-shadow: 0 6px 10px -6px #000000; }

.cs__axis { display: flex; justify-content: space-between; height: 16px; margin-top: 2px; padding-right: 46px; font-size: 9.500px; line-height: 16px; color: rgba(242, 243, 245, 0.36); font-variant-numeric: tabular-nums; }
.cs__axis span { white-space: nowrap; }

/* the ranges: a thumb slides under the chosen one */
.cs__frames { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); height: 32px; margin-top: 8px; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, 0.045); box-shadow: inset 0 0 0 1px var(--line); }
.cs__thumb { position: absolute; left: 3px; top: 3px; width: calc((100% - 6px) / 4); height: 26px; border-radius: 9px; background: #2a2d36; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 6px 10px -6px #000000; }
.cs__frames button { position: relative; border: 0; background: none; color: var(--soft); font: inherit; font-size: 12px; font-weight: 640; letter-spacing: 0.02em; cursor: pointer; outline: none; border-radius: 9px; transition: color 0.25s ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.cs__frames button[aria-pressed="true"] { color: var(--ink); }
.cs__frames button:focus-visible { box-shadow: 0 0 0 1.500px rgba(255, 255, 255, 0.6); }
@media (hover: hover) { .cs__frames button:hover { color: var(--ink); } }

.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #f2f3f5; stroke: #0b0c0f; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)); z-index: 6; }
