body {
  margin: 0;
  padding: 24px;
  background: #f8fafc;
  color: #0f172a;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.page {
  width: 84%;
  max-width: 860px;
  margin: 0 auto;
}

header {
  margin: 0 0 20px;
  padding: 22px;
  background: #1e293b;
  color: #f8fafc;
  border-radius: 14px;
}

header h1,
header p {
  margin: 0 0 8px;
}

.lesson-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.lesson-nav a {
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #1e293b;
  text-decoration: none;
  font-weight: 700;
}

.panel,
.panel-alt {
  margin: 0 0 16px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
}

.panel-alt {
  background: #f1f5f9;
}

.panel h2,
.panel-alt h2 {
  margin: 0 0 12px;
}

.code-sample {
  margin: 0 0 12px;
  padding: 12px;
  background: #0f172a;
  border-radius: 8px;
  color: #e2e8f0;
  overflow: auto;
}

.demo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
  margin: 14px 0;
}

.swatch {
  width: 140px;
  height: 140px;
  background: #0f766e;
  color: #ecfeff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  text-align: center;
}

.swatch-circle {
  clip-path: circle(50%);
}

.swatch-ellipse {
  clip-path: ellipse(45% 35% at 50% 50%);
}

.swatch-inset {
  clip-path: inset(12% 8% 12% 8% round 16px);
}

.swatch-triangle {
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.swatch-diamond {
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.swatch-hex {
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.ghost {
  outline: 2px dashed #94a3b8;
  outline-offset: 4px;
}

.photo {
  display: block;
  width: 280px;
  height: 280px;
  object-fit: cover;
}

.photo-circle {
  clip-path: circle(48%);
}

.photo-blob {
  clip-path: polygon(20% 0%, 80% 5%, 100% 35%, 90% 80%, 55% 100%, 10% 85%, 0% 40%);
}

.card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.shaped-card {
  width: 200px;
  min-height: 180px;
  padding: 28px 20px;
  background: #312e81;
  color: #e0e7ff;
}

.shaped-card h3,
.shaped-card p {
  margin: 0 0 8px;
}

.card-slant {
  clip-path: polygon(0 0, 100% 0, 100% 78%, 0 100%);
}

.card-ticket {
  clip-path: inset(0 0 0 0 round 18px);
  background: #9f1239;
  color: #ffe4e6;
}

.card-tag {
  clip-path: polygon(0 0, 85% 0, 100% 50%, 85% 100%, 0 100%);
  background: #b45309;
  color: #fffbeb;
}

.label {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: #475569;
}

@media (max-width: 560px) {
  .page {
    width: 94%;
  }

  .photo {
    width: 100%;
    max-width: 280px;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}
