/* ── Live chart workspace ──────────────────────────────────────────
   A dense trading desk, not a landing page: the chart is the hero and
   every panel next to it answers one decision question. */

.chart-live {
  --cl-radius: 18px;
  --cl-radius-sm: 12px;
  --cl-gap: 16px;
  --cl-chart-height: clamp(390px, 54vh, 640px);
  --cl-supply: #fb7185;
  --cl-demand: #34d399;
  --cl-session: #fbbf24;
  --cl-fvg: #38bdf8;
  --cl-round: rgba(183, 156, 255, 0.55);
  display: grid;
  gap: var(--cl-gap);
  min-width: 0;
}

[data-theme-mode="light"] .chart-live {
  --cl-round: rgba(96, 37, 191, 0.45);
}
[data-theme-mode="light"] .cl-score {
  background: conic-gradient(
    var(--accent) calc(var(--cl-score, 0) * 1%),
    rgba(16, 24, 40, 0.08) 0
  );
}
[data-theme-mode="light"] .cl-status,
[data-theme-mode="light"] .cl-pill {
  background: rgba(16, 24, 40, 0.025);
}
[data-theme-mode="light"] .cl-setup,
[data-theme-mode="light"] .cl-event,
[data-theme-mode="light"] .cl-pattern,
[data-theme-mode="light"] .cl-insight,
[data-theme-mode="light"] .cl-decision__col,
[data-theme-mode="light"] .cl-decision__verdict {
  background: rgba(16, 24, 40, 0.018);
}
[data-theme-mode="light"] .cl-event.is-new {
  animation: cl-flash-light 1.4s ease-out;
}
[data-theme-mode="light"] .cl-mtf-row:hover,
[data-theme-mode="light"] .cl-level:hover,
[data-theme-mode="light"] .cl-decision__tabs button:hover,
[data-theme-mode="light"] .cl-check:hover {
  background: rgba(16, 24, 40, 0.035);
}

.chart-live h2,
.chart-live h3 {
  margin: 0;
}

/* ── Header rail ─────────────────────────────────────────────────── */
.cl-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) auto;
  gap: 24px;
  align-items: end;
  padding: 24px 26px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--cl-radius);
  background:
    radial-gradient(600px 240px at 92% -30%, rgba(183, 156, 255, 0.18), transparent 65%),
    radial-gradient(420px 220px at 0% 120%, rgba(52, 211, 153, 0.07), transparent 62%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 48%),
    var(--surface);
  box-shadow: var(--shadow);
}
.cl-hero::after {
  content: "";
  position: absolute;
  inset-inline-end: -70px;
  inset-block-start: -90px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 1px solid rgba(183, 156, 255, 0.16);
  pointer-events: none;
}
.cl-hero__copy { min-width: 0; }
.cl-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.cl-kicker__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
  animation: cl-pulse 2.4s ease-in-out infinite;
}
.cl-hero h2 {
  margin-top: 6px;
  font-size: clamp(1.15rem, 1.8vw, 1.55rem);
  line-height: 1.55;
  max-width: 62ch;
}
.cl-hero p {
  margin-top: 8px;
  max-width: 76ch;
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.95;
}
.cl-hero__actions {
  display: grid;
  justify-items: end;
  gap: 10px;
  min-width: 210px;
}
.cl-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-2);
  font-size: 12px;
  white-space: nowrap;
}
.cl-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warn);
}
.cl-status.is-live .cl-status__dot { background: var(--up); box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.14); }
.cl-status.is-error .cl-status__dot { background: var(--down); box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.14); }
.cl-status.is-loading .cl-status__dot { background: var(--accent); animation: cl-pulse 1.1s ease-in-out infinite; }

/* ── Controls ────────────────────────────────────────────────────── */
.cl-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px 18px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--cl-radius-sm);
  background: var(--surface);
  box-shadow: 0 14px 34px -30px rgba(0, 0, 0, 0.7);
}
.cl-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.cl-field > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.cl-input {
  min-height: 38px;
  min-width: 190px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}
.cl-input:hover { border-color: var(--border-strong); }
.cl-field--tfs { min-width: 0; }
.cl-tfs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
}
.cl-tf {
  min-width: 44px;
  min-height: 32px;
  padding: 4px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.cl-tf:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.cl-tf.is-active {
  color: var(--text);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(183, 156, 255, 0.24);
}
.cl-toolbar__right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-inline-start: auto;
}
.cl-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  color: var(--muted-2);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}
.cl-switch input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}
.cl-switch > span {
  position: relative;
  width: 34px;
  height: 19px;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-3);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.cl-switch > span::after {
  content: "";
  position: absolute;
  inset-block-start: 2px;
  inset-inline-start: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
}
.cl-switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.cl-switch input:checked + span { background: var(--accent-soft); border-color: rgba(183, 156, 255, 0.45); }
.cl-switch input:checked + span::after { transform: translateX(-15px); background: var(--accent); }
[dir="rtl"] .cl-switch input:checked + span::after { transform: translateX(-15px); }

.cl-btn {
  min-height: 38px;
  padding: 7px 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.cl-btn:hover { border-color: var(--border-strong); background: var(--surface-3); }
.cl-btn:active { transform: translateY(1px); }
.cl-btn--primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-solid));
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.cl-btn--primary:hover { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.cl-btn--ghost { background: transparent; color: var(--muted-2); }
.cl-btn[disabled] { opacity: 0.55; cursor: wait; }

.cl-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: var(--cl-radius-sm);
  background: rgba(251, 191, 36, 0.08);
  color: var(--warn);
  font-size: 12.5px;
  line-height: 1.8;
}
.cl-banner strong { color: var(--text); }

/* ── Main grid ───────────────────────────────────────────────────── */
.cl-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 372px;
  gap: var(--cl-gap);
  align-items: start;
  min-width: 0;
}
.cl-chart-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--cl-radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 30%),
    var(--surface);
  box-shadow: var(--shadow);
}
.cl-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}
.cl-instrument {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-width: 0;
}
.cl-instrument__symbol {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  direction: ltr;
}
.cl-instrument__price {
  color: var(--text);
  font-family: var(--mono);
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  direction: ltr;
  unicode-bidi: isolate;
}
.cl-instrument__change {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  direction: ltr;
  unicode-bidi: isolate;
}
.cl-instrument__change.is-up { color: var(--up); }
.cl-instrument__change.is-down { color: var(--down); }
.cl-instrument__tf {
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.cl-overlays {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.cl-chip {
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.cl-chip:hover { color: var(--text); border-color: var(--border-strong); }
.cl-chip.is-active {
  color: var(--accent);
  border-color: rgba(183, 156, 255, 0.3);
  background: var(--accent-soft);
}
.cl-chart-wrap {
  position: relative;
  width: 100%;
  height: var(--cl-chart-height);
  min-height: 320px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(183, 156, 255, 0.025), transparent 45%),
    var(--bg-soft);
}
.cl-chart {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.cl-chart-message {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted-2);
  text-align: center;
  font-size: 13px;
  line-height: 1.9;
  background: rgba(10, 10, 12, 0.55);
  backdrop-filter: blur(4px);
  z-index: 2;
}
[data-theme-mode="light"] .cl-chart-message { background: rgba(243, 246, 251, 0.7); }
.cl-skeleton {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 14px;
  padding: 24px;
  background: var(--bg-soft);
  z-index: 3;
}
.cl-skeleton span {
  border-radius: 12px;
  background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2));
  background-size: 220% 100%;
  animation: cl-shimmer 1.5s linear infinite;
}
.cl-chart-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 9px 16px;
  border-top: 1px solid var(--border);
}
.cl-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 10.5px;
}
.cl-legend i {
  display: inline-block;
  width: 14px;
  height: 2px;
  margin-inline-end: 5px;
  vertical-align: middle;
  border-radius: 2px;
}
.cl-chart-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 10.5px;
}
.cl-tv { color: var(--muted); opacity: 0.75; letter-spacing: 0.02em; }

/* ── Side panels ─────────────────────────────────────────────────── */
.cl-side {
  display: grid;
  gap: var(--cl-gap);
  min-width: 0;
}
.cl-panel {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: var(--cl-radius);
  background: var(--surface);
  box-shadow: 0 16px 40px -34px rgba(0, 0, 0, 0.8);
}
.cl-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}
.cl-panel__head h3 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.cl-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}
.cl-pill.is-up { color: var(--up); border-color: rgba(52, 211, 153, 0.25); background: rgba(52, 211, 153, 0.08); }
.cl-pill.is-down { color: var(--down); border-color: rgba(251, 113, 133, 0.25); background: rgba(251, 113, 133, 0.08); }
.cl-pill.is-warn { color: var(--warn); border-color: rgba(251, 191, 36, 0.25); background: rgba(251, 191, 36, 0.08); }

/* Decision section: the plain answer to "short or not?", full width */
.cl-decision-section {
  position: relative;
  overflow: hidden;
  padding: 17px 18px;
  border: 1px solid rgba(183, 156, 255, 0.2);
  border-radius: var(--cl-radius);
  background:
    radial-gradient(700px 240px at 100% -20%, rgba(183, 156, 255, 0.14), transparent 68%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.025), transparent 50%),
    var(--surface);
  box-shadow: var(--shadow);
}
.cl-decision__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}
.cl-decision__col {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--cl-radius-sm);
  background: rgba(255, 255, 255, 0.018);
}
.cl-decision__col.is-short { border-color: rgba(251, 113, 133, 0.18); }
.cl-decision__col.is-long { border-color: rgba(52, 211, 153, 0.18); }
.cl-decision__col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
}
.cl-decision__side {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}
.cl-decision__col.is-short .cl-decision__side { color: var(--down); }
.cl-decision__col.is-long .cl-decision__side { color: var(--up); }
.cl-decision__score {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  direction: ltr;
}
.cl-decision__badge {
  margin-inline-start: auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.cl-decision__badge.is-avoid { background: rgba(251, 113, 133, 0.14); color: var(--down); }
.cl-decision__badge.is-wait { background: rgba(251, 191, 36, 0.14); color: var(--warn); }
.cl-decision__badge.is-valid { background: rgba(52, 211, 153, 0.14); color: var(--up); }
.cl-decision__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.cl-decision__head h3 {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 800;
}
.cl-decision__kicker {
  color: var(--accent);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.cl-decision__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}
.cl-decision__tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.cl-decision__tabs button:hover { color: var(--text); background: rgba(255, 255, 255, 0.045); }
.cl-decision__tabs button.is-active {
  color: var(--text);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(183, 156, 255, 0.22);
}
.cl-decision__tabs button b {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 800;
  direction: ltr;
}
.cl-decision__tabs button[data-cl-decision="short"].is-active b { color: var(--down); }
.cl-decision__tabs button[data-cl-decision="long"].is-active b { color: var(--up); }
.cl-decision__verdict {
  margin-top: 10px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.022);
}
.cl-decision__verdict.is-avoid { border-color: rgba(251, 113, 133, 0.28); background: rgba(251, 113, 133, 0.055); }
.cl-decision__verdict.is-wait { border-color: rgba(251, 191, 36, 0.28); background: rgba(251, 191, 36, 0.055); }
.cl-decision__verdict.is-valid { border-color: rgba(52, 211, 153, 0.3); background: rgba(52, 211, 153, 0.055); }
.cl-decision__action {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
}
.cl-decision__verdict.is-avoid .cl-decision__action { background: rgba(251, 113, 133, 0.16); color: var(--down); }
.cl-decision__verdict.is-wait .cl-decision__action { background: rgba(251, 191, 36, 0.15); color: var(--warn); }
.cl-decision__verdict.is-valid .cl-decision__action { background: rgba(52, 211, 153, 0.15); color: var(--up); }
.cl-decision__verdict strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.65;
}
.cl-decision__verdict p {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.85;
}
.cl-decision__related {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.cl-decision__level {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 9.5px;
}
.cl-decision__level b {
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
  direction: ltr;
}
.cl-decision__checks {
  display: grid;
  gap: 3px;
  margin-top: 9px;
}
.cl-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  padding: 5px 6px;
  border-radius: 7px;
}
.cl-check:hover { background: rgba(255, 255, 255, 0.025); }
.cl-check__icon {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}
.cl-check.is-done .cl-check__icon { background: rgba(52, 211, 153, 0.14); color: var(--up); }
.cl-check.is-pending .cl-check__icon { background: rgba(251, 191, 36, 0.14); color: var(--warn); }
.cl-check.is-fail .cl-check__icon { background: rgba(251, 113, 133, 0.14); color: var(--down); }
.cl-check b {
  display: block;
  color: var(--text);
  font-size: 10.5px;
  font-weight: 800;
}
.cl-check span {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}
.cl-decision__plan {
  display: grid;
  gap: 6px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--border);
}
.cl-decision__plan > div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}
.cl-decision__plan span {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
}
.cl-decision__plan b,
.cl-decision__plan p {
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.7;
}
.cl-decision__plan b {
  font-family: var(--mono);
  font-weight: 700;
  direction: ltr;
}

/* Plan card — the first thing the eye should land on after the chart */
.cl-plan {
  position: relative;
  overflow: hidden;
  padding: 17px 18px;
  border: 1px solid rgba(183, 156, 255, 0.2);
  border-radius: var(--cl-radius);
  background:
    radial-gradient(320px 160px at 100% -10%, rgba(183, 156, 255, 0.18), transparent 70%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.035), transparent 50%),
    var(--surface);
  box-shadow: var(--shadow);
}
.cl-plan__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.cl-plan__label {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.cl-plan__bias {
  display: block;
  margin-top: 3px;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.cl-plan__bias.is-up { color: var(--up); }
.cl-plan__bias.is-down { color: var(--down); }
.cl-plan__bias.is-flat { color: var(--warn); }
.cl-score {
  position: relative;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  flex-shrink: 0;
  border-radius: 50%;
  background: conic-gradient(
    var(--accent) calc(var(--cl-score, 0) * 1%),
    rgba(255, 255, 255, 0.08) 0
  );
}
.cl-score::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--surface);
}
.cl-score b {
  position: relative;
  z-index: 1;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
  direction: ltr;
}
.cl-plan__rec {
  margin-top: 11px;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.95;
}
.cl-plan__concept {
  margin-top: 8px;
  padding-inline-start: 9px;
  border-inline-start: 2px solid var(--border-strong);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.85;
}
.cl-plan__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.cl-plan__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 12px;
}
.cl-setup {
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: var(--cl-radius-sm);
  background: rgba(255, 255, 255, 0.022);
  min-width: 0;
}
.cl-setup.is-long { border-color: rgba(52, 211, 153, 0.2); }
.cl-setup.is-short { border-color: rgba(251, 113, 133, 0.2); }
.cl-setup.is-muted { opacity: 0.62; }
.cl-setup.is-recommended {
  background: rgba(183, 156, 255, 0.055);
  border-color: rgba(183, 156, 255, 0.34);
}
.cl-setup.is-recommended.is-long { border-color: rgba(52, 211, 153, 0.42); background: rgba(52, 211, 153, 0.055); }
.cl-setup.is-recommended.is-short { border-color: rgba(251, 113, 133, 0.42); background: rgba(251, 113, 133, 0.055); }
.cl-setup.is-dim { opacity: 0.55; }
.cl-setup__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.cl-setup__head b { color: var(--text); font-size: 11.5px; }
.cl-setup__levels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  direction: ltr;
  text-align: center;
}
.cl-setup__levels span { color: var(--muted); font-size: 9px; display: block; direction: rtl; }
.cl-setup__levels b { font-weight: 700; }
.cl-setup__quality {
  display: inline-block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
}
.cl-setup__text {
  margin-top: 6px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.7;
}
.cl-plan__verdicts {
  display: grid;
  gap: 5px;
  margin-top: 9px;
}
.cl-plan__verdicts p {
  padding: 7px 9px;
  border-inline-start: 2px solid var(--border-strong);
  border-radius: 0 7px 7px 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.75;
}
[dir="rtl"] .cl-plan__verdicts p { border-radius: 7px 0 0 7px; }
.cl-plan__verdicts p b { color: var(--text); font-family: var(--mono); direction: ltr; }
.cl-plan__verdicts p.is-long { border-inline-start-color: var(--up); background: rgba(52, 211, 153, 0.045); }
.cl-plan__verdicts p.is-short { border-inline-start-color: var(--down); background: rgba(251, 113, 133, 0.045); }
.cl-plan__warn {
  margin-top: 11px;
  padding: 9px 11px;
  border-inline-start: 2px solid var(--warn);
  border-radius: 0 8px 8px 0;
  background: rgba(251, 191, 36, 0.07);
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.85;
}
[dir="rtl"] .cl-plan__warn { border-radius: 8px 0 0 8px; }
.cl-plan__warn.is-critical {
  border-inline-start-color: var(--down);
  background: rgba(251, 113, 133, 0.08);
}

/* MTF matrix */
.cl-mtf { display: grid; gap: 5px; }
.cl-mtf-row {
  display: grid;
  grid-template-columns: 34px 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 7px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.cl-mtf-row:hover { background: rgba(255, 255, 255, 0.035); }
.cl-mtf-row.is-active { border-color: rgba(183, 156, 255, 0.28); background: var(--accent-soft); }
.cl-mtf-row__tf {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.cl-mtf-row__bar {
  position: relative;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.cl-mtf-row__bar i {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 50%;
  width: var(--cl-w, 0%);
  max-width: 50%;
  border-radius: 999px;
  background: var(--cl-c, var(--muted));
}
.cl-mtf-row__bar i.is-up { inset-inline-start: 50%; }
.cl-mtf-row__bar i.is-down { inset-inline-end: 50%; inset-inline-start: auto; }
.cl-mtf-row__state {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}
.cl-mtf-row__rsi {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  direction: ltr;
}
.cl-mtf-row__rsi.is-hot { color: var(--warn); }

/* Levels */
.cl-level-filters {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.cl-filter {
  min-height: 27px;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}
.cl-filter:hover { color: var(--text); }
.cl-filter.is-active { color: var(--accent); background: var(--accent-soft); border-color: rgba(183, 156, 255, 0.2); }
.cl-level-key {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 9.5px;
}
.cl-level-key span { display: inline-flex; align-items: center; gap: 4px; }
.cl-level-key i {
  width: 11px;
  height: 2px;
  border-radius: 2px;
  background: var(--muted);
}
.cl-level-key i.is-supply { background: var(--cl-supply); }
.cl-level-key i.is-demand { background: var(--cl-demand); }
.cl-level-key i.is-session { background: var(--cl-session); }
.cl-level-key i.is-fvg { background: var(--cl-fvg); }
.cl-level-key i.is-round { background: var(--cl-round); }
.cl-levels {
  display: grid;
  gap: 4px;
  max-height: 292px;
  overflow: auto;
  padding-inline-end: 2px;
}
.cl-level {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.cl-level:hover { background: rgba(255, 255, 255, 0.03); }
.cl-level:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.cl-level.is-off { opacity: 0.42; }
.cl-level.is-fresh { border-color: rgba(251, 191, 36, 0.18); background: rgba(251, 191, 36, 0.035); }
.cl-level input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}
.cl-level__check {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: var(--surface-2);
  color: transparent;
  font-size: 10px;
  font-weight: 900;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.cl-level input:checked + .cl-level__check {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
}
.cl-level__main { min-width: 0; }
.cl-level__top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.cl-level__badge {
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}
.cl-level__badge.is-supply { color: var(--cl-supply); background: rgba(251, 113, 133, 0.1); }
.cl-level__badge.is-demand { color: var(--cl-demand); background: rgba(52, 211, 153, 0.1); }
.cl-level__badge.is-session { color: var(--cl-session); background: rgba(251, 191, 36, 0.1); }
.cl-level__badge.is-fvg { color: var(--cl-fvg); background: rgba(56, 189, 248, 0.1); }
.cl-level__badge.is-round { color: var(--accent); background: var(--accent-soft); }
.cl-level__price {
  color: var(--text);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 800;
  direction: ltr;
  unicode-bidi: isolate;
}
.cl-level__dist {
  margin-inline-start: auto;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  direction: ltr;
}
.cl-level__meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}
.cl-level__state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
}
.cl-level__state.is-fresh { color: var(--cl-session); }
.cl-level__state.is-inside { color: var(--accent); }
.cl-level__state.is-broken { color: var(--muted); text-decoration: line-through; }
.cl-hint {
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

/* ── Lower panels ────────────────────────────────────────────────── */
.cl-lower {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--cl-gap);
  min-width: 0;
}
.cl-lower > .cl-panel { min-height: 150px; }
.cl-lower .cl-levels-panel { grid-column: 1 / -1; }
.cl-lower .cl-levels-panel .cl-levels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 340px;
}

.cl-events { display: grid; gap: 7px; max-height: 320px; overflow: auto; padding-inline-end: 2px; }
.cl-event {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}
.cl-event.is-new { animation: cl-flash 1.4s ease-out; }
.cl-event__dot { width: 7px; height: 7px; margin-top: 6px; border-radius: 50%; background: var(--muted); }
.cl-event.is-critical .cl-event__dot,
.cl-event.is-high .cl-event__dot { background: var(--down); box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.12); }
.cl-event.is-medium .cl-event__dot { background: var(--warn); box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1); }
.cl-event.is-low .cl-event__dot { background: var(--muted); }
.cl-event__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cl-event__title { color: var(--text); font-size: 11.5px; font-weight: 800; }
.cl-event__time { color: var(--muted); font-family: var(--mono); font-size: 9.5px; direction: ltr; white-space: nowrap; }
.cl-event__body { margin-top: 2px; color: var(--muted-2); font-size: 10.5px; line-height: 1.75; }
.cl-event__meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; color: var(--muted); font-size: 9.5px; }
.cl-event__meta b { color: var(--muted-2); font-family: var(--mono); direction: ltr; }

.cl-patterns { display: grid; gap: 7px; max-height: 320px; overflow: auto; padding-inline-end: 2px; }
.cl-pattern {
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}
.cl-pattern__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cl-pattern__name { color: var(--text); font-size: 11.5px; font-weight: 800; }
.cl-pattern__quality {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
}
.cl-pattern__meta { margin-top: 3px; color: var(--muted); font-size: 10px; }
.cl-pattern__levels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 10px;
  direction: ltr;
  text-align: center;
}
.cl-pattern__levels span { display: block; color: var(--muted); font-size: 9px; direction: rtl; }
.cl-pattern__levels b { font-weight: 700; }

.cl-insights { display: grid; gap: 7px; max-height: 320px; overflow: auto; padding-inline-end: 2px; }
.cl-insight {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}
.cl-insight__mark {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 900;
}
.cl-insight.is-critical { border-color: rgba(251, 113, 133, 0.28); background: rgba(251, 113, 133, 0.055); }
.cl-insight.is-critical .cl-insight__mark { background: rgba(251, 113, 133, 0.15); color: var(--down); }
.cl-insight.is-high .cl-insight__mark { background: rgba(251, 191, 36, 0.14); color: var(--warn); }
.cl-insight.is-medium .cl-insight__mark { background: var(--accent-soft); color: var(--accent); }
.cl-insight__title { color: var(--text); font-size: 11.5px; font-weight: 800; }
.cl-insight__body { margin-top: 2px; color: var(--muted-2); font-size: 10.5px; line-height: 1.75; }

.cl-structure { display: grid; gap: 9px; }
.cl-structure__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
}
.cl-structure__row:last-child { border-bottom: 0; padding-bottom: 0; }
.cl-structure__row span { color: var(--muted); }
.cl-structure__row b { color: var(--text); font-weight: 700; text-align: end; }
.cl-structure__seq { display: flex; flex-wrap: wrap; gap: 4px; }
.cl-structure__seq i {
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9.5px;
  font-style: normal;
  direction: ltr;
}
.cl-structure__seq i.is-up { color: var(--up); border-color: rgba(52, 211, 153, 0.18); }
.cl-structure__seq i.is-down { color: var(--down); border-color: rgba(251, 113, 133, 0.18); }

.cl-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
  max-width: 90ch;
}

/* ── Empty states ────────────────────────────────────────────────── */
.cl-empty {
  padding: 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  text-align: center;
}

/* ── Toast (page-local) ──────────────────────────────────────────── */
.cl-toast-wrap {
  position: fixed;
  inset-block-end: 22px;
  inset-inline-end: 22px;
  z-index: 90;
  display: grid;
  gap: 8px;
  max-width: min(380px, calc(100vw - 32px));
}
.cl-toast {
  padding: 11px 14px;
  border: 1px solid rgba(183, 156, 255, 0.28);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 12px;
  line-height: 1.8;
  animation: cl-toast-in 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
.cl-toast strong { color: var(--accent); }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .cl-grid { grid-template-columns: minmax(0, 1fr) 340px; }
  .cl-levels { max-height: 260px; }
}

@media (max-width: 1024px) {
  .cl-grid { grid-template-columns: minmax(0, 1fr); }
  .cl-side { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .cl-plan { grid-column: 1 / -1; }
  .cl-levels { max-height: 300px; }
}

@media (max-width: 900px) {
  .cl-decision__grid { grid-template-columns: minmax(0, 1fr); }
  .cl-decision__checks { max-height: 340px; overflow: auto; padding-inline-end: 2px; }
}

@media (max-width: 760px) {
  .chart-live { --cl-chart-height: 380px; gap: 12px; }
  .cl-hero { grid-template-columns: minmax(0, 1fr); padding: 18px 16px; }
  .cl-hero__actions { justify-items: stretch; min-width: 0; }
  .cl-status { justify-content: center; }
  .cl-toolbar { padding: 12px; gap: 12px; }
  .cl-input { min-width: 0; width: 100%; }
  .cl-field { width: 100%; }
  .cl-field--tfs { width: 100%; }
  .cl-tfs { width: 100%; }
  .cl-tf { flex: 1 1 0; min-width: 0; }
  .cl-toolbar__right { width: 100%; margin-inline-start: 0; justify-content: space-between; }
  .cl-side { grid-template-columns: minmax(0, 1fr); }
  .cl-plan { grid-column: auto; }
  .cl-lower { grid-template-columns: minmax(0, 1fr); }
  .cl-lower .cl-levels-panel { grid-column: auto; }
  .cl-lower .cl-levels-panel .cl-levels { grid-template-columns: minmax(0, 1fr); }
  .cl-plan__grid { grid-template-columns: minmax(0, 1fr); }
  .cl-chart-head { align-items: flex-start; }
  .cl-chart-foot { align-items: flex-start; }
  .cl-levels, .cl-events, .cl-patterns, .cl-insights { max-height: 360px; }
}

@media (max-width: 420px) {
  .cl-instrument__price { font-size: 1.1rem; }
  .cl-score { width: 62px; height: 62px; }
  .cl-mtf-row { grid-template-columns: 30px 46px minmax(0, 1fr); }
  .cl-mtf-row__rsi { display: none; }
}

@media (hover: none) {
  .cl-tf:hover, .cl-chip:hover, .cl-mtf-row:hover, .cl-level:hover { background: initial; }
  .cl-level { min-height: 44px; }
  .cl-tf { min-height: 40px; }
  .cl-btn { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .cl-kicker__dot,
  .cl-status.is-loading .cl-status__dot,
  .cl-skeleton span { animation: none; }
  .cl-event.is-new { animation: none; }
  .cl-toast { animation: none; }
  .cl-btn, .cl-tf, .cl-chip, .cl-level, .cl-mtf-row { transition: none; }
}

@keyframes cl-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.9); }
}
@keyframes cl-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -20% 0; }
}
@keyframes cl-flash {
  0% { border-color: rgba(251, 113, 133, 0.65); background: rgba(251, 113, 133, 0.12); }
  100% { border-color: var(--border); background: rgba(255, 255, 255, 0.018); }
}
@keyframes cl-flash-light {
  0% { border-color: rgba(217, 45, 32, 0.55); background: rgba(217, 45, 32, 0.08); }
  100% { border-color: var(--border); background: rgba(16, 24, 40, 0.018); }
}
@keyframes cl-toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
