/* Onboarding canvas — fills the editor+preview space when the library is empty. */
.onboarding {
  height: 100%;
  overflow: auto;
  display: flex;
  justify-content: center;
  background: var(--bg);
}

/* A readable, centered column; the gallery grid widens within it. */
.inner {
  width: 100%;
  max-width: 760px;
  padding: var(--space-7) var(--space-6);
}

.title {
  margin: 0 0 var(--space-2);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.tagline {
  margin: 0 0 var(--space-6);
  max-width: 56ch;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* The two ways in, side by side: sample-first (primary) and data-first (ghost). */
.ctaRow {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* The two CTAs and the per-example Adds are shared Buttons (arch 09 §4). */

/* The "or start from an example" header row, with Add all pushed to the end. */
.galleryHead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  margin: var(--space-7) 0 var(--space-4);
  padding-top: var(--space-5);
  border-top: var(--border-width) solid var(--border);
}

.galleryTitle {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.addAll {
  flex: 0 0 auto;
}

/* Responsive gallery: cards as wide as ~240px, filling the column. */
.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-4);
}

.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-3);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  background: var(--layer-01);
}

/* The live chart's host. Width fills the card; height is fixed inline (THUMB_HEIGHT). */
.thumb {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cardBody {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 1 1 auto;
}

.cardName {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.cardDesc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Per-example Add — a shared secondary Button, aligned to the card's start. */
.add {
  align-self: flex-start;
}
