.lab-intro { padding: clamp(40px, 6vw, 88px) var(--pad) 36px; max-width: 980px; }
.lab-intro h1 { font-weight: 800; font-size: clamp(44px, 5.6vw, 80px); line-height: .98; letter-spacing: -.045em; margin: 0 0 16px; }
.lab-intro .sub { max-width: 46ch; font-size: clamp(18px, 1.5vw, 22px); }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2vw, 30px); padding: 0 var(--pad) 100px; }
.challenge { display: flex; flex-direction: column; background: #fff; border-radius: 0; overflow: hidden; box-shadow: 0 1px 0 var(--line); transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s; }
.challenge:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -36px rgba(28,24,22,.5); }
.challenge.featured { grid-column: span 2; flex-direction: row; }

/* Covers: real screens in device mockups on the challenge's own colour */
.cover { position: relative; aspect-ratio: 4 / 3.2; background: radial-gradient(120% 90% at 30% 0%, color-mix(in srgb, var(--bg) 82%, #fff), var(--bg)); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.featured .cover { flex: 1.2; aspect-ratio: auto; min-height: 380px; }
.cover figure { margin: 0; position: absolute; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }

.device.phone { width: 30%; aspect-ratio: 690 / 1435; border-radius: 0; padding: 0; background: none; box-shadow: none; filter: drop-shadow(0 22px 20px rgba(0,0,0,.36)) drop-shadow(0 4px 6px rgba(0,0,0,.2)); }
.cover .device.phone img { position: absolute; top: 1.324%; left: 3.375%; width: 93.556%; height: 97.352%; border-radius: 13% / 6%; object-fit: cover; object-position: top; background: #fff; }
.device.phone::before { content: ""; position: absolute; inset: 0; background: url(assets/iphone18pm-frame.webp) center / 100% 100% no-repeat; z-index: 2; pointer-events: none; }
.featured .device.phone { width: 25%; }
/* one, two or three phones fanned */
.phone.pos-1-of-1 { transform: none; }
.phone.pos-1-of-2 { transform: translateX(-34%) rotate(-5deg) translateY(6%); }
.phone.pos-2-of-2 { transform: translateX(34%) rotate(5deg) translateY(-4%); z-index: 2; }
.phone.pos-1-of-3 { transform: translateX(-88%) rotate(-7deg) translateY(10%); }
.phone.pos-2-of-3 { transform: translateY(-2%); z-index: 2; }
.phone.pos-3-of-3 { transform: translateX(88%) rotate(7deg) translateY(10%); }
.challenge:hover .phone.pos-1-of-3 { transform: translateX(-96%) rotate(-9deg) translateY(8%); }
.challenge:hover .phone.pos-3-of-3 { transform: translateX(96%) rotate(9deg) translateY(8%); }
.challenge:hover .phone.pos-2-of-3, .challenge:hover .phone.pos-2-of-2 { transform: translateY(-6%); }

/* iPad Pro 13" frame, generated with ChatGPT image generation (assets/ipadpro-frame.webp, 954x1256) */
.device.tablet { width: 50%; aspect-ratio: 954 / 1256; border-radius: 0; padding: 0; background: none; box-shadow: none; filter: drop-shadow(0 22px 20px rgba(0,0,0,.34)) drop-shadow(0 4px 6px rgba(0,0,0,.2)); }
.cover .device.tablet img { position: absolute; top: 2.787%; left: 3.334%; width: 93.35%; height: 94.586%; border-radius: 3.6% / 2.7%; object-fit: cover; object-position: top; background: #fff; }
.device.tablet::before { content: ""; position: absolute; inset: 0; background: url(assets/ipadpro-frame.webp) center / 100% 100% no-repeat; z-index: 2; pointer-events: none; }
.tablet.pos-1-of-2 { transform: translateX(-30%) rotate(-4deg) translateY(4%); }
.tablet.pos-2-of-2 { transform: translateX(30%) rotate(3deg) translateY(-2%); z-index: 2; }

.poster-frame { width: 48%; padding: 0; box-shadow: 0 26px 50px -22px rgba(0,0,0,.6), 0 0 0 1px rgba(0,0,0,.08); transform: rotate(-2deg); }
.poster-frame img { aspect-ratio: auto; }
.challenge:hover .poster-frame { transform: rotate(0deg) scale(1.03); }

/* Text */
.c-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.featured .c-body { flex: 1; justify-content: center; padding: 30px; }
.c-meta { display: flex; justify-content: space-between; margin: 0; color: var(--ink-2); font-size: 11px; }
.challenge h2 { font-weight: 800; font-size: 24px; letter-spacing: -.025em; line-height: 1.1; margin: 0; }
.featured h2 { font-size: 34px; }
.brief { margin: 0; color: var(--ink); font-size: 16px; font-weight: 600; }
.brief .mono, .made .mono { display: block; color: var(--ink-2); font-size: 10px; font-weight: 400; margin-bottom: 4px; }
.made { margin: 2px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.found { margin: 6px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.45; color: var(--ink); }
.found .mono { display: block; color: var(--burgundy-2); font-size: 10px; margin-bottom: 4px; }

/* Rage Jar, playable */
.play { margin-top: 10px; display: flex; align-items: center; gap: 18px; background: #3B1F9E; color: #fff; border-radius: 0; padding: 16px 18px; }
.rj-jar { position: relative; flex: none; width: 70px; height: 82px; border: 3px solid rgba(255,255,255,.8); border-radius: 12px 12px 18px 18px; background: rgba(255,255,255,.1); overflow: hidden; }
.rj-lid { position: absolute; left: 10px; right: 10px; top: 0; height: 9px; background: #E5322D; border-radius: 0 0 3px 3px; }
.rj-lid::after { content: ""; position: absolute; left: 50%; top: 3px; width: 20px; height: 3px; margin-left: -10px; background: #7A0F0B; }
.rj-coins { position: absolute; left: 0; right: 0; bottom: 0; height: calc(min(var(--n, 0), 12) * 6px); background: radial-gradient(circle at 8px 3px, #F6C23E 5px, #C99212 6px, transparent 7px) 0 0 / 16px 6px; transition: height .25s; }
.rj-drop { position: absolute; left: 50%; top: -20px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: #F6C23E; border: 2px solid #C99212; opacity: 0; }
.play.dropping .rj-drop { animation: drop .45s ease-in; }
@keyframes drop { from { top: -20px; opacity: 1; } to { top: 62px; opacity: 1; } }
.play-side { flex: 1; display: flex; align-items: center; gap: 14px; }
.jar-total { font: 900 30px/1 var(--sans); color: #F6C23E; min-width: 2.2ch; }
.rage { flex: 1; border: 0; border-radius: 0; padding: 13px 18px; background: #E5322D; color: #fff; font: 800 19px/1 var(--sans); box-shadow: 0 4px 0 #8E1612; cursor: pointer; }
.rage:active { transform: translateY(3px); box-shadow: 0 1px 0 #8E1612; }
.play :focus-visible { outline-color: #fff; box-shadow: 0 0 0 6px var(--ink); }

@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .challenge.featured { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .challenge.featured { flex-direction: column; }
  .featured .cover { min-height: 0; aspect-ratio: 4 / 3.2; }
  .featured .device.phone { width: 30%; }
  .play-side { flex-direction: column; align-items: stretch; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .challenge, .cover figure { transition: none; }
  .challenge:hover { transform: none; }
}
.play-side { flex-direction: column; align-items: stretch; gap: 8px; }
.rage { white-space: nowrap; }
