/* Correlation vs. Causation and Sample Size Sandbox.
   Uses only the site theme variables from ui.css, so light and dark
   mode both work. British spelling in the page copy. */

.cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-bottom: var(--s4);
}

.cc-chart-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  padding: var(--s2);
  margin-bottom: var(--s3);
}

.cc-canvas {
  display: block;
  width: 100%;
  height: 280px;
}

.cc-result {
  font-size: var(--fs-lg);
  font-weight: 650;
  color: var(--ink);
  margin: 0 0 var(--s2);
}

.cc-lesson {
  color: var(--ink-2);
  margin: 0 0 var(--s2);
}

.cc-lesson:last-child {
  margin-bottom: 0;
}

.cc-details {
  margin-top: var(--s3);
}

.cc-details summary {
  cursor: pointer;
  font-size: var(--fs-sm);
  color: var(--primary);
  font-weight: 600;
}

.cc-data {
  max-height: 220px;
  overflow: auto;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--s3);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  line-height: 1.5;
  white-space: pre;
  margin-top: var(--s2);
}

.cc-ten-list {
  list-style: none;
  margin: var(--s2) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--s2);
}

.cc-ten-list li {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--s2) var(--s3);
  font-size: var(--fs-sm);
  background: var(--surface);
}

.cc-ten-list li.cc-ten-max {
  background: var(--warn-soft);
  border-color: var(--warn);
  font-weight: 650;
  color: var(--ink);
}

@media (max-width: 480px) {
  .cc-canvas {
    height: 220px;
  }

  .cc-ten-list {
    grid-template-columns: 1fr 1fr;
  }
}
