﻿/* Institutional Charts â€” product demo (standalone; uses ./design-tokens.css) */

:root {
  /* Konsole heatmap (from vpi-dashboard.css :root) */
  --vpid-heat-profit: var(--marcus-fairway);
  --vpid-vol-heat: var(--marcus-gold);
  --vpid-vol-on-gold-text: var(--marcus-black);
  --vpid-rvol-mix-2: 20%;
  --vpid-rvol-mix-3: 30%;
  --vpid-rvol-mix-4: 82%;
  --vpid-vol-mix-1: 14%;
  --vpid-vol-mix-2: 50%;
  --vpid-vol-mix-3: 75%;

  --pd-split-konsole: 35fr;
  --pd-split-chart: 65fr;
  --pd-demo-h: min(720px, 88vh);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #050505;
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.pd-page {
  width: min(1280px, 100%);
}

/* Embedded (homepage iframe) - fill container and block scrollbars */
.pd-embedded,
.pd-embedded body {
  height: 100%;
  overflow: hidden;
}

.pd-embedded body {
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
}

.pd-embedded .pd-page {
  width: 100%;
}

.pd-embedded .pd-window {
  height: 100%;
  border-radius: 16px;
}

/* Desktop embedded: prevent any cell text overflow */
@media (min-width: 721px) {
  .pd-embedded .pd-cell {
    font-size: 10px;
    padding: 0 6px;
  }

  .pd-embedded .pd-row--header .pd-cell {
    font-size: 9px;
  }
}

/* â”€â”€ Window chrome â”€â”€ */
.pd-window {
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  overflow: hidden;
  box-shadow: 0 24px 80px color-mix(in srgb, var(--marcus-black) 55%, transparent);
}

.pd-window__bar {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--marcus-slate) 35%, var(--marcus-black));
}

.pd-window__dots {
  display: inline-flex;
  gap: var(--space-2);
}

.pd-window__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  opacity: 0.9;
}

.pd-window__dot--red {
  background: #ff5f57;
}
.pd-window__dot--yellow {
  background: #febc2e;
}
.pd-window__dot--green {
  background: #28c840;
}

.pd-window__title {
  font-family: var(--font-family-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  opacity: 0.85;
}

.pd-window__live {
  font-family: var(--font-family-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--color-success);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pd-window__live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
}

/* â”€â”€ 35 / 65 split â”€â”€ */
.pd-stage {
  position: relative;
  display: grid;
  grid-template-columns: var(--pd-split-konsole) var(--pd-split-chart);
  height: var(--pd-demo-h);
  min-height: 480px;
}

/* Konsole-only view (used by /ic-konsole/ page) */
.pd-view-konsole .pd-stage {
  grid-template-columns: 1fr;
}

.pd-view-konsole .pd-chart {
  display: none;
}

.pd-view-konsole #pd-tour-launch,
.pd-view-konsole #pd-tour-overlay,
.pd-view-konsole .pd-hero {
  display: none !important;
}

.pd-konsole,
.pd-chart {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.pd-konsole {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--color-border);
  background: var(--color-bg);
}

.pd-hero {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  padding: var(--space-4) var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 14px;
  color: var(--marcus-cashmere);
  user-select: none;
  text-align: center;
}

.pd-hero__kicker {
  font-family: var(--font-family);
  font-weight: var(--font-weight-semibold);
  font-size: 31px;
  letter-spacing: -0.02em;
  opacity: 0.92;
}

.pd-hero__headline {
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  font-size: 53px;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

.pd-store-badge__title {
  margin: 0;
  width: 100%;
  font-family: var(--font-family);
  font-size: 18px;
  font-weight: var(--font-weight-semibold);
  color: var(--marcus-cashmere);
  letter-spacing: 0.03em;
  line-height: var(--line-height-tight);
  text-align: center;
}

.pd-store-badge {
  display: block;
  margin: 0 auto;
  line-height: 0;
}

.pd-store-badge img {
  display: block;
  margin: 0 auto;
  max-height: 96px;
  width: min(100%, 300px);
  height: auto;
}

.pd-stage.pd-is-touring .pd-hero {
  opacity: 0;
  pointer-events: none;
}

.pd-konsole__head {
  flex-shrink: 0;
  padding: var(--space-3) var(--space-3) var(--space-2);
}

.pd-konsole__title {
  margin: 0;
  font-size: var(--font-size-xl);
  font-weight: 600;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-3);
}

.pd-konsole__scan {
  font-size: var(--font-size-xs);
  font-weight: 400;
  color: var(--color-text-muted);
}

/* Signal table â€” gold frame around scan grid only (not full Konsole column) */
.pd-konsole__grid-wrap {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  margin: 0 var(--space-3) var(--space-3);
  border: 2px solid color-mix(in srgb, var(--marcus-gold) 65%, transparent);
  border-radius: var(--input-radius);
  overflow: hidden;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--marcus-gold) 18%, transparent);
}

.pd-tour-col-frame {
  position: absolute;
  pointer-events: none;
  border: 2px solid var(--marcus-gold);
  border-radius: 4px;
  z-index: 6;
  box-shadow: 0 0 14px color-mix(in srgb, var(--marcus-gold) 22%, transparent);
}

.pd-konsole__grid-wrap.pd-tour-focus-p,
.pd-konsole__grid-wrap.pd-tour-focus-vol {
  border-color: color-mix(in srgb, var(--marcus-slate) 70%, transparent);
  box-shadow: none;
}

.pd-konsole__grid-wrap.pd-tour-focus-p .pd-cell:not(.pd-col-p),
.pd-konsole__grid-wrap.pd-tour-focus-vol .pd-cell:not(.pd-col-vol) {
  opacity: 0.26;
}

.pd-konsole__grid-wrap.pd-tour-focus-p .pd-col-p,
.pd-konsole__grid-wrap.pd-tour-focus-vol .pd-col-vol {
  opacity: 1;
  position: relative;
  z-index: 2;
}

.pd-konsole__grid-wrap.pd-tour-focus-row {
  border-color: color-mix(in srgb, var(--marcus-slate) 70%, transparent);
  box-shadow: none;
}

.pd-konsole__grid-wrap.pd-tour-focus-row .pd-row--data:not(.pd-row--selected) {
  opacity: 0.26;
}

.pd-konsole__grid-wrap.pd-tour-focus-row .pd-row--selected {
  opacity: 1;
  outline: none;
  background: transparent;
  z-index: 2;
  position: relative;
}

/* Konsole grid columns (compact for 35% panel) */
.pd-grid {
  --pd-grid-cols:
    minmax(5ch, 1.15fr)
    minmax(4.5ch, 0.8fr)
    minmax(2.2ch, 0.5fr)
    minmax(4.5ch, 0.85fr)
    minmax(4.5ch, 0.85fr)
    minmax(3ch, 0.55fr)
    minmax(3ch, 0.55fr)
    minmax(4ch, 0.7fr)
    minmax(4ch, 0.65fr);
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
}

.pd-grid__header {
  flex-shrink: 0;
}

.pd-grid__body {
  flex-shrink: 0;
}

.pd-row {
  display: grid;
  grid-template-columns: var(--pd-grid-cols);
  height: var(--konsole-grid-row-height);
  align-items: stretch;
}

.pd-cell {
  display: flex;
  align-items: center;
  padding: 0 var(--space-2);
  font-family: var(--font-family-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-right: 1px solid color-mix(in srgb, var(--marcus-slate) 85%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--marcus-slate) 85%, transparent);
  color: var(--color-text);
}

.pd-cell:first-child {
  border-left: 1px solid color-mix(in srgb, var(--marcus-slate) 85%, transparent);
}

.pd-row--header .pd-cell {
  background: var(--marcus-slate);
  color: var(--marcus-cashmere);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pd-row--data.pd-row--selected {
  background: color-mix(in srgb, var(--marcus-gold) 12%, transparent);
  outline: 1px solid color-mix(in srgb, var(--marcus-gold) 35%, transparent);
  outline-offset: -1px;
  z-index: 1;
  position: relative;
}

@media (prefers-reduced-motion: no-preference) {
  .pd-row--data.pd-row--pulse {
    animation: pd-row-pulse 1.1s ease-out 1;
  }
}

@keyframes pd-row-pulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 0 transparent;
  }
  40% {
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--marcus-gold) 55%, transparent);
  }
}

.pd-tier--a {
  color: var(--color-vpi-tier-a);
  font-weight: 600;
}
.pd-tier--b {
  color: var(--color-vpi-tier-b);
  font-weight: 600;
}
.pd-tier--c {
  color: var(--color-vpi-tier-c);
}
.pd-tier--w {
  color: var(--marcus-cashmere);
}
.pd-tier--dash {
  color: var(--color-text-muted);
}

.pd-heat-rvol-2 {
  background: color-mix(in srgb, var(--vpid-heat-profit) var(--vpid-rvol-mix-2), transparent);
}
.pd-heat-rvol-3 {
  background: color-mix(in srgb, var(--vpid-heat-profit) var(--vpid-rvol-mix-3), transparent);
}
.pd-heat-rvol-4 {
  background: color-mix(in srgb, var(--vpid-heat-profit) var(--vpid-rvol-mix-4), transparent);
}

.pd-heat-vol-1 {
  background: color-mix(in srgb, var(--vpid-vol-heat) var(--vpid-vol-mix-1), transparent);
}
.pd-heat-vol-2 {
  background: color-mix(in srgb, var(--vpid-vol-heat) var(--vpid-vol-mix-2), transparent);
}
.pd-heat-vol-3 {
  background: color-mix(in srgb, var(--vpid-vol-heat) var(--vpid-vol-mix-3), transparent);
}
.pd-heat-vol-4 {
  background: var(--vpid-vol-heat);
  color: var(--vpid-vol-on-gold-text);
}

/* â”€â”€ Chart panel â”€â”€ */
.pd-chart {
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  position: relative;
}

/* Step 5 only: gold frame around the full chart panel */
.pd-chart.pd-tour-chart-frame::after {
  content: "";
  position: absolute;
  inset: var(--space-2);
  border-radius: var(--input-radius);
  border: 2px solid color-mix(in srgb, var(--marcus-gold) 65%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--marcus-gold) 18%, transparent);
  pointer-events: none;
  z-index: 10;
}

.pd-chart__toolbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.pd-chart__tools {
  display: flex;
  gap: 4px;
}

.pd-chart__tool {
  min-width: 36px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--input-radius);
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-accent);
  font-family: var(--font-family-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: default;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pd-chart__tfs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-left: auto;
}

.pd-chart__tf {
  padding: 4px 8px;
  border: none;
  border-radius: var(--input-radius);
  background: transparent;
  color: var(--color-accent);
  font-family: var(--font-family-mono);
  font-size: 11px;
  cursor: default;
}

.pd-chart__tf--active {
  background: color-mix(in srgb, var(--marcus-gold) 25%, transparent);
}

.pd-chart__meta {
  flex-shrink: 0;
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-family-mono);
  font-size: 11px;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}

.pd-chart__meta strong {
  color: var(--color-text);
  font-weight: 600;
}

.pd-chart__meta span {
  margin-right: var(--space-3);
}

.pd-chart__plot {
  flex: 1;
  min-height: 0;
  position: relative;
  margin: var(--space-2);
  border-radius: var(--input-radius);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  overflow: hidden;
}

.pd-chart__svg {
  position: absolute;
  inset: 28px 48px 24px 8px;
  width: calc(100% - 56px);
  height: calc(100% - 52px);
  display: block;
}

.pd-chart__ma {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.pd-chart__ma--9 {
  stroke: color-mix(in srgb, var(--marcus-cashmere) 55%, transparent);
}

.pd-chart__ma--21 {
  stroke: var(--chart-indicator-series-2);
  stroke-width: 2.25;
}

.pd-chart__ma--50 {
  stroke: color-mix(in srgb, var(--marcus-cashmere) 88%, transparent);
  stroke-width: 2;
}

.pd-chart__wick {
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.pd-chart__wick--up {
  stroke: var(--chart-candle-up);
}

.pd-chart__wick--down {
  stroke: var(--chart-candle-down);
}

.pd-chart__body {
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.pd-chart__body--up {
  fill: var(--chart-candle-up);
  stroke: color-mix(in srgb, var(--chart-candle-up) 70%, var(--marcus-black));
}

.pd-chart__body--down {
  fill: var(--chart-candle-down);
  stroke: color-mix(in srgb, var(--chart-candle-down) 70%, var(--marcus-black));
}

.pd-chart__grid-line {
  stroke: color-mix(in srgb, var(--marcus-cashmere) 8%, transparent);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.pd-chart__price-line {
  position: absolute;
  left: 8px;
  right: 48px;
  height: 1px;
  background: var(--marcus-ghost);
  z-index: 3;
  pointer-events: none;
}

.pd-chart__price-tag {
  position: absolute;
  right: 8px;
  padding: 4px 8px;
  font-family: var(--font-family-mono);
  font-size: 10px;
  background: var(--marcus-slate);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  color: var(--color-accent);
  z-index: 2;
}

.pd-chart__axis-y {
  display: none;
  position: absolute;
  top: 48px;
  right: 8px;
  bottom: 28px;
  width: 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--font-family-mono);
  font-size: 9px;
  color: var(--color-text-muted);
  text-align: right;
}

.pd-chart__axis-x {
  position: absolute;
  left: 12px;
  right: 56px;
  bottom: 6px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-family-mono);
  font-size: 9px;
  color: var(--color-text-muted);
}

/* â”€â”€ Product tour: dim chart only; Konsole stays full brightness â”€â”€ */
.pd-tour-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: var(--pd-split-konsole) var(--pd-split-chart);
  pointer-events: none;
  z-index: 20;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.pd-tour-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.pd-tour-dim {
  grid-column: 2;
  background: transparent;
  pointer-events: none;
}

/* Remove the grey last-price label (requested) */
#pd-price-tag,
#pd-price-line {
  display: none !important;
}

.pd-tour-card {
  position: absolute;
  z-index: 25;
  width: min(300px, calc(100% - 24px));
  padding: var(--space-3) var(--space-4);
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--marcus-gold) 40%, transparent);
  background: color-mix(in srgb, var(--marcus-slate) 94%, var(--marcus-black));
  box-shadow: 0 16px 48px color-mix(in srgb, var(--marcus-black) 55%, transparent);
  pointer-events: auto;
}

.pd-tour-card__step {
  font-family: var(--font-family-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-2);
}

.pd-tour-card__title {
  margin: 0 0 var(--space-2);
  font-size: 15px;
  font-weight: 600;
}

.pd-tour-card__body {
  margin: 0 0 var(--space-3);
  font-size: var(--font-size-xs);
  line-height: 1.5;
  color: color-mix(in srgb, var(--color-text) 82%, transparent);
  white-space: pre-line;
}

.pd-tour-card__actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.pd-tour-launch {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  z-index: 15;
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--marcus-gold) 50%, transparent);
  border-radius: 999px;
  padding: 10px 18px;
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  font-weight: 600;
  cursor: pointer;
  background: color-mix(in srgb, var(--marcus-slate) 92%, var(--marcus-black));
  color: var(--marcus-cashmere);
  box-shadow: 0 8px 28px color-mix(in srgb, var(--marcus-black) 50%, transparent);
}

.pd-tour-launch:hover {
  border-color: var(--color-accent);
}

.pd-tour-launch[hidden] {
  display: none;
}

.pd-tour-btn {
  appearance: none;
  border: 1px solid var(--color-border);
  border-radius: var(--input-radius);
  padding: 6px 12px;
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--color-text);
}

.pd-tour-btn--primary {
  background: color-mix(in srgb, var(--marcus-gold) 22%, transparent);
  border-color: color-mix(in srgb, var(--marcus-gold) 45%, transparent);
  color: var(--marcus-cashmere);
}

.pd-tour-btn:hover {
  border-color: var(--color-accent);
}

@media (max-width: 900px) {
  .pd-stage {
    grid-template-columns: 1fr;
    grid-template-rows: 42% 58%;
    height: auto;
    min-height: 640px;
  }

  .pd-konsole {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    max-height: none;
  }

}

/* Mobile-only: homepage embedded demo readability */
@media (max-width: 720px) {
  .pd-embedded .pd-stage {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
    height: 100%;
  }

  .pd-embedded .pd-konsole,
  .pd-embedded .pd-chart {
    flex: 0 0 100%;
    min-width: 100%;
    scroll-snap-align: start;
  }

  .pd-embedded .pd-chart {
    display: flex;
    border-left: 1px solid var(--color-border);
  }

  /* Disable product tour on mobile */
  .pd-embedded #pd-tour-launch,
  .pd-embedded #pd-tour-overlay {
    display: none !important;
  }

  /* Fewer columns: Ticker, Tier, P, D-P, Vol */
  .pd-embedded .pd-grid {
    --pd-grid-cols:
      minmax(6ch, 1.2fr)
      minmax(2.2ch, 0.45fr)
      minmax(5ch, 0.95fr)
      minmax(5ch, 0.95fr)
      minmax(5ch, 0.85fr);
  }

  .pd-embedded .pd-row--header .pd-cell:nth-child(2),
  .pd-embedded .pd-row--header .pd-cell:nth-child(6),
  .pd-embedded .pd-row--header .pd-cell:nth-child(7),
  .pd-embedded .pd-row--header .pd-cell:nth-child(9) {
    display: none;
  }

  .pd-embedded .pd-row--data .pd-cell:nth-child(2),
  .pd-embedded .pd-row--data .pd-cell:nth-child(6),
  .pd-embedded .pd-row--data .pd-cell:nth-child(7),
  .pd-embedded .pd-row--data .pd-cell:nth-child(9) {
    display: none;
  }

  /* Mobile homepage: avoid duplicate hero copy inside demo */
  .pd-embedded .pd-hero {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pd-tour-overlay {
    transition: none;
  }
}


