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

:root {
  --bg: #1a1a2e;
  --panel: #16213e;
  --mid: #0f3460;
  --accent: #e94560;
  --green: #4ecca3;
  --text: #f5f5f5;
  --muted: #a0a0b0;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}

.tour-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  align-items: start;
}

/* Left: scrollable narrative */
.sections {
  padding: 0;
}

.section {
  min-height: 100vh;
}

.step {
  min-height: 80vh;
  padding: 6rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0.3;
  transition: opacity 0.4s ease;
}

.step.active {
  opacity: 1;
}

h1 {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text);
}

h2 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--accent);
}

p {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  max-width: 520px;
}

p strong {
  color: var(--text);
}

code {
  font-family: "Menlo", "Monaco", "Courier New", monospace;
  font-size: 0.9em;
  color: var(--green);
  background: var(--panel);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

.cta-link {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 2rem;
  background: var(--accent);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  border-radius: 4px;
  transition: opacity 0.2s;
}
.cta-link:hover { opacity: 0.85; }

/* Right: sticky visualization panel */
.chart-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--panel);
  border-left: 1px solid var(--mid);
  overflow: hidden;
}

#chart {
  width: 100%;
  height: 100%;
}

/* Responsive: stack at 768px */
@media (max-width: 768px) {
  .tour-wrap {
    grid-template-columns: 1fr;
  }
  .chart-panel {
    position: relative;
    height: 60vw;
    min-height: 320px;
    border-left: none;
    border-top: 1px solid var(--mid);
    order: -1;
  }
  .step {
    padding: 3rem 1.5rem;
    min-height: 60vh;
  }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
}
