/* Live lab previews (static/js/lab-previews.js) on cards, and the "Which lab is for me?"
 * finder (static/js/lab-finder.js) on the Labs page. */
.lab-card-preview { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.lab-card-preview canvas, .finder-pick canvas, .demo-card canvas[data-preview] {
  display: block; width: 100%; height: auto; aspect-ratio: 320 / 130; border-bottom: 1px solid rgb(var(--c-line)); background: rgb(var(--c-paper)); }

.finder { padding: 20px; }
.finder-q { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.finder-q p { flex-basis: 100%; margin: 0; font-weight: 600; font-size: 14px; color: rgb(var(--c-ink)); }
.finder-q button { padding: 8px 13px; border-radius: 999px; border: 1px solid rgb(var(--c-line)); background: rgb(var(--c-paper)); color: rgb(var(--c-ink));
  font-size: 14px; font-weight: 500; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.finder-q button:hover { border-color: rgb(var(--c-accent-1, 30 74 59)); }
.finder-q button.is-on { background: rgb(var(--c-accent-1, 30 74 59)); border-color: rgb(var(--c-accent-1, 30 74 59)); color: #fff; }
.finder-out { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgb(var(--c-line)); }
.finder-why { margin: 0 0 10px; font-weight: 600; color: rgb(var(--c-ink)); }
.finder-picks { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.finder-pick { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.finder-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.finder-body b { font-family: Fredoka, Nunito, sans-serif; font-size: 17px; color: rgb(var(--c-ink)); }
.finder-body span { font-size: 14px; color: rgb(var(--c-slate-500)); }
.finder-body small { font-size: 12px; color: rgb(var(--c-slate-500)); opacity: .8; }
.finder-body em { margin-top: 4px; font-style: normal; font-weight: 600; font-size: 14px; color: rgb(var(--c-accent-1, 30 74 59)); }
.finder-best { position: absolute; top: 8px; left: 8px; z-index: 1; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: #fff; background: linear-gradient(90deg, rgb(var(--c-accent-1, 30 74 59)), #6366f1); }

/* "See it working" at the top of a lab (templates/tutorials/_lab_demo.html) */
.lab-demo { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 0;
  margin: 0 0 14px; overflow: hidden; border: 1px solid rgb(var(--c-line)); border-radius: 16px; background: rgb(var(--c-card)); }
.lab-demo[hidden] { display: none; }
.lab-demo canvas { display: block; width: 100%; height: auto; aspect-ratio: 480 / 195; }
.lab-demo-text { padding: 14px 44px 14px 18px; }
.lab-demo-kicker { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgb(var(--c-accent-1, 30 74 59)); }
.lab-demo-what { margin: 0; font-size: 14px; line-height: 1.5; color: rgb(var(--c-slate-500)); }
.lab-demo-what b { color: rgb(var(--c-ink)); }
.lab-demo-close { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgb(var(--c-line));
  background: rgb(var(--c-paper)); color: rgb(var(--c-ink)); cursor: pointer; }
.lab-demo-open { margin: 0 0 12px; padding: 5px 12px; border-radius: 999px; border: 1px solid rgb(var(--c-line)); background: rgb(var(--c-paper));
  color: rgb(var(--c-accent-1, 30 74 59)); font-size: 13px; font-weight: 600; cursor: pointer; }
.lab-demo-open[hidden] { display: none; }
@media (max-width: 720px) { .lab-demo { grid-template-columns: 1fr; } .lab-demo-text { padding: 12px 44px 14px 14px; } }
