:root {
  --lab-ink: #172033;
  --lab-muted: #667085;
  --lab-bg: #f3f6fb;
  --lab-panel: #ffffff;
  --lab-blue: #2563eb;
  --lab-cyan: #0891b2;
  --lab-green: #16a34a;
  --lab-red: #dc2626;
}

body {
  background: var(--lab-bg);
  color: var(--lab-ink);
}

.lab-sidebar {
  background: #111827;
}

.lab-brand {
  gap: 0.75rem;
  letter-spacing: 0;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, var(--lab-blue), var(--lab-cyan));
  border-radius: 0.5rem;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  height: 2rem;
  justify-content: center;
  width: 2rem;
}

.lab-topbar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

.navbar-title {
  font-size: 1.15rem;
  line-height: 1.2;
  margin: 0;
}

.hero-panel {
  align-items: center;
  background:
    linear-gradient(120deg, rgba(37, 99, 235, 0.96), rgba(8, 145, 178, 0.88)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='420' viewBox='0 0 900 420'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.18'%3E%3Cpath d='M20 80h260M120 120h220M40 170h310M520 70h260M480 130h330M560 190h240M110 285h250M510 300h310'/%3E%3Ccircle cx='408' cy='170' r='70'/%3E%3Cpath d='M408 92v156M330 170h156'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  border-radius: 0.5rem;
  color: #fff;
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 1.5rem;
  min-height: 18rem;
  overflow: hidden;
  padding: 2rem;
}

.hero-panel h2 {
  font-size: clamp(2rem, 4vw, 3.7rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0;
  max-width: 760px;
}

.hero-copy {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
  line-height: 1.75;
  margin: 1rem 0 0;
  max-width: 780px;
}

.eyebrow {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.hero-stat {
  align-items: center;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 11rem;
  padding: 1rem;
}

.hero-stat strong {
  font-size: 4rem;
  line-height: 1;
}

.lesson-card {
  color: inherit;
  height: 100%;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}

.lesson-card:hover {
  box-shadow: 0 1rem 2.5rem rgba(15, 23, 42, 0.12);
  transform: translateY(-3px);
}

.lesson-card-footer {
  align-items: center;
  color: var(--lab-blue);
  display: flex;
  font-weight: 700;
  justify-content: space-between;
  margin-top: 1.25rem;
}

.lab-form + .lab-form {
  margin-top: 1.5rem;
}

.lab-pre {
  background: #0f172a;
  border-radius: 0.5rem;
  color: #dbeafe;
  font-size: 0.875rem;
  line-height: 1.6;
  max-height: 18rem;
  overflow: auto;
  padding: 1rem;
  white-space: pre-wrap;
}

.fix-box {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 0.5rem;
  margin-top: 1rem;
  padding: 1rem;
}

.fix-box p {
  margin: .5rem 0 0;
}

.unsafe-output {
  background: #fff7ed;
  border: 1px dashed #fb923c;
  border-radius: 0.5rem;
  min-height: 4rem;
  padding: 1rem;
}

.monospace,
.lab-pre,
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.error-page {
  display: grid;
  min-height: 100vh;
  padding: 2rem;
  place-items: center;
}

@media (max-width: 768px) {
  .hero-panel {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 1.5rem;
  }

  .hero-stat {
    align-items: flex-start;
  }
}
