:root {
  --lh-bg: #0b0d10;
  --lh-panel: #12151a;
  --lh-border: #222831;
  --lh-text: #eef1f5;
  --lh-dim: #8c95a4;
  --lh-green: #2ee59d;
  --lh-red: #f46a6a;
  --lh-amber: #f5b942;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--lh-bg);
  color: var(--lh-text);
  font-family: "Instrument Sans", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

.lh-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--lh-border);
  background: #0e1116;
  flex-wrap: wrap;
}

.lh-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lh-brand {
  color: var(--lh-text);
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.lh-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #182220;
  border: 1px solid rgba(46, 229, 157, 0.4);
  font-family: "Geist Mono Variable", ui-monospace, monospace;
  font-size: 13px;
}
.lh-mark i { color: var(--lh-green); font-style: normal; }

.lh-sep { color: #3a4352; }

.lh-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.lh-live-pill {
  font: 600 11px/1 "Geist Mono Variable", ui-monospace, monospace;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(46, 229, 157, 0.12);
  color: var(--lh-green);
  border: 1px solid rgba(46, 229, 157, 0.3);
}

.lh-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.lh-nav a {
  color: var(--lh-dim);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
}
.lh-nav a:hover, .lh-nav a[aria-current="page"] { color: var(--lh-text); }
.lh-nav a.lh-cta {
  background: var(--lh-green);
  color: #08130e;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
}

.lh-main {
  max-width: 1760px;
  margin: 0 auto;
  padding: 12px 16px 32px;
}

.lh-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: var(--lh-panel);
  border: 1px solid var(--lh-border);
  border-radius: 10px;
  margin-bottom: 12px;
}

.lh-seg {
  display: inline-flex;
  background: #0b0d10;
  border: 1px solid var(--lh-border);
  border-radius: 7px;
  padding: 2px;
  gap: 2px;
}

.lh-seg button {
  border: 0;
  background: transparent;
  color: var(--lh-dim);
  padding: 6px 11px;
  border-radius: 5px;
  font: 600 12.5px/1 "Instrument Sans", sans-serif;
  cursor: pointer;
}
.lh-seg button.is-active {
  background: #f0f4f8;
  color: #0b0d10;
}

.lh-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--lh-dim);
}

.lh-ctrl select {
  background: #0b0d10;
  color: var(--lh-text);
  border: 1px solid var(--lh-border);
  border-radius: 6px;
  padding: 5px 10px;
  font: 600 12.5px/1.2 "Instrument Sans", sans-serif;
}

.lh-slider-ctrl input[type="range"] {
  width: 96px;
  accent-color: var(--lh-green);
}

.lh-legend-grad {
  width: 68px;
  height: 10px;
  border-radius: 4px;
  border: 1px solid #2b323d;
  background: linear-gradient(90deg, #1b0c3b 0%, #2a5783 35%, #22a884 70%, #fde725 100%);
}

.lh-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lh-btn {
  background: #171c23;
  color: var(--lh-text);
  border: 1px solid var(--lh-border);
  border-radius: 6px;
  padding: 6px 11px;
  font: 600 12.5px/1 "Instrument Sans", sans-serif;
  cursor: pointer;
}
.lh-btn.is-active {
  border-color: rgba(46, 229, 157, 0.55);
  color: var(--lh-green);
  background: rgba(46, 229, 157, 0.1);
}

.lh-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 12px;
  align-items: start;
}

@media (max-width: 1120px) {
  .lh-workspace { grid-template-columns: 1fr; }
}

.lh-stage {
  position: relative;
  background: var(--lh-panel);
  border: 1px solid var(--lh-border);
  border-radius: 10px;
  padding: 10px;
}

#lhCanvas {
  display: block;
  width: 100%;
  height: clamp(460px, 68vh, 720px);
  border-radius: 6px;
  background: #0c0918;
  cursor: crosshair;
}

.lh-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 10;
  background: rgba(11, 14, 18, 0.95);
  border: 1px solid #333c4a;
  border-radius: 7px;
  padding: 8px 10px;
  font: 500 11.5px/1.45 "Geist Mono Variable", ui-monospace, monospace;
  color: var(--lh-text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  max-width: 260px;
}

.lh-ruler-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 9;
  background: rgba(12, 16, 22, 0.92);
  border: 1px solid var(--lh-amber);
  color: var(--lh-amber);
  padding: 6px 10px;
  border-radius: 6px;
  font: 600 11.5px/1.3 "Geist Mono Variable", ui-monospace, monospace;
}

.lh-caption {
  margin: 8px 4px 2px;
  font-size: 12px;
  color: var(--lh-dim);
}

.lh-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lh-card {
  background: var(--lh-panel);
  border: 1px solid var(--lh-border);
  border-radius: 10px;
  padding: 14px 16px;
}

.lh-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.lh-card-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.lh-sub {
  margin: 0;
  font-size: 12px;
  color: var(--lh-dim);
}

.lh-badge {
  font: 700 10.5px/1 "Geist Mono Variable", ui-monospace, monospace;
  padding: 4px 8px;
  border-radius: 5px;
  background: #1c222b;
  color: var(--lh-text);
}
.lh-badge.bull { background: rgba(46, 229, 157, 0.16); color: var(--lh-green); border: 1px solid rgba(46, 229, 157, 0.4); }
.lh-badge.bear { background: rgba(244, 106, 106, 0.16); color: var(--lh-red); border: 1px solid rgba(244, 106, 106, 0.4); }
.lh-badge.neutral { background: rgba(245, 185, 66, 0.14); color: var(--lh-amber); border: 1px solid rgba(245, 185, 66, 0.35); }

.lh-mr-summary {
  margin: 0 0 10px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #cbd3df;
}

.lh-mr-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.lh-mr-metrics div {
  background: #0d1015;
  border: 1px solid #1d232c;
  border-radius: 6px;
  padding: 7px 9px;
}
.lh-mr-metrics span { display: block; font-size: 11px; color: var(--lh-dim); }
.lh-mr-metrics strong { font: 700 13px/1.3 "Geist Mono Variable", ui-monospace, monospace; }
.pos { color: var(--lh-green); }
.neg { color: var(--lh-red); }

.lh-trade-link {
  display: block;
  text-align: center;
  padding: 8px 10px;
  border-radius: 6px;
  background: #182220;
  border: 1px solid rgba(46, 229, 157, 0.35);
  color: var(--lh-green);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
}

.lh-lvl-group + .lh-lvl-group {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #1c222b;
}

.lh-lvl-title {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--lh-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.dot.short { background: var(--lh-red); }
.dot.long { background: var(--lh-green); }

.lh-lvl-rows {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.lh-lvl-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 8px;
  font: 600 12px/1.2 "Geist Mono Variable", ui-monospace, monospace;
}

.lh-lvl-bar-track {
  height: 5px;
  background: #1b212b;
  border-radius: 999px;
  overflow: hidden;
}
.lh-lvl-bar-fill { height: 100%; border-radius: 999px; }
.lh-lvl-bar-fill.short { background: var(--lh-red); }
.lh-lvl-bar-fill.long { background: var(--lh-green); }

.lh-lvl-amt small {
  color: var(--lh-dim);
  font-weight: 500;
  margin-left: 4px;
}

.lh-big-total {
  margin: 4px 0 10px;
  font: 700 24px/1.15 "Geist Mono Variable", ui-monospace, monospace;
}

.lh-split-bar {
  display: flex;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: #1b212b;
  gap: 2px;
  margin-bottom: 8px;
}
.lh-split-long { background: var(--lh-green); }
.lh-split-short { background: var(--lh-red); }

.lh-split-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--lh-dim);
  margin-bottom: 12px;
}
.lh-split-labels strong {
  display: block;
  color: var(--lh-text);
  font: 700 12.5px/1.3 "Geist Mono Variable", ui-monospace, monospace;
  margin-top: 2px;
}
.lh-split-labels .right { text-align: right; }

.lh-meta-grid {
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid #1c222b;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lh-meta-grid > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}
.lh-meta-grid dt { color: var(--lh-dim); }
.lh-meta-grid dd {
  margin: 0;
  font: 600 12px/1.2 "Geist Mono Variable", ui-monospace, monospace;
}
