/* The Lab: a gallery of coursework builds. The shell, type, buttons and footer come from
   subpages.css; this file adds the hero stack, the course shelves and the build cards.
   Each course carries one of the site's persona hues (data-tone), so the page stays in the family. */

[data-tone="athlete"] { --t: var(--athlete); --t-ink: #fff; --t-soft: #e4eafc; }
[data-tone="educator"] { --t: var(--educator); --t-ink: #221601; --t-soft: #fff1d6; }
[data-tone="creator"] { --t: var(--creator); --t-ink: #2b0e08; --t-soft: #ffe4dd; }
[data-tone="builder"] { --t: var(--builder); --t-ink: #0c1d06; --t-soft: #e4fbd9; }
[data-tone="overview"] { --t: var(--hero); --t-ink: var(--ink); --t-soft: #eee9ff; }

/* ---------- type: the homepage's Satoshi, tracked for it ----------
   subpages.css sets -.065 to -.075em for its system font; with Satoshi (and with fallback fonts)
   that makes letters collide, so the lab sets its own tracking. */
body { --font: "Satoshi", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-family: var(--font); letter-spacing: -.005em; }
.subhero h1, .section-heading h2, .footer-top h2 { font-family: var(--font); font-weight: 700; }
.lab-hero h1 { max-width: 760px; font-size: clamp(3.4rem, 7vw, 6.6rem); letter-spacing: -.045em; line-height: .94; }
.section-heading h2 { letter-spacing: -.04em; line-height: .98; }
.footer-top h2 { max-width: 860px; font-size: clamp(2.3rem, 4.6vw, 4.4rem); letter-spacing: -.04em; line-height: 1; }

/* ---------- hero ---------- */
.hl { position: relative; white-space: nowrap; z-index: 0; }
.hl::before { content: ""; position: absolute; z-index: -1; left: -.05em; right: -.06em; bottom: .04em; height: .32em; border-radius: .2em .5em .3em .45em; background: var(--educator); transform: rotate(-1.2deg); }
.lab-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.lab-stats li { display: inline-flex; align-items: baseline; gap: 7px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.66); color: var(--muted); font-size: 13.5px; font-weight: 600; }
.lab-stats strong { color: var(--ink); font-size: 16px; letter-spacing: -.02em; }

/* a loose stack of the newest builds, like prints on a desk */
.specimens { position: relative; justify-self: end; width: min(100%, 420px); aspect-ratio: 1 / 1.02; }
.specimen { position: absolute; left: 50%; top: 50%; width: 82%; padding: 10px 10px 14px; border-radius: 22px; background: #fff; color: var(--ink); text-decoration: none; box-shadow: 0 26px 50px -24px rgba(35,27,60,.45), 0 0 0 1px rgba(25,19,45,.06); transform: translate(-50%, -50%) translate(var(--x, 0), var(--y, 0)) rotate(var(--r, 0deg)); transition: transform .55s cubic-bezier(.2,.9,.2,1), box-shadow .3s; }
.specimen figure { margin: 0; }
.specimen img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px; background: var(--t-soft, #eee); }
.specimen figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 11px 6px 0; }
.specimen strong { font-size: 16px; letter-spacing: -.02em; }
.specimen span { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.specimen:nth-child(1) { --x: 6%; --y: -20%; --r: 7deg; z-index: 1; }
.specimen:nth-child(2) { --x: -8%; --y: -2%; --r: -6deg; z-index: 2; }
.specimen:nth-child(3) { --x: 2%; --y: 17%; --r: 2deg; z-index: 3; }
.specimens:hover .specimen:nth-child(1) { --x: 12%; --y: -30%; --r: 11deg; }
.specimens:hover .specimen:nth-child(2) { --x: -16%; --y: -4%; --r: -10deg; }
.specimens:hover .specimen:nth-child(3) { --x: 6%; --y: 22%; --r: 0deg; }
.specimen:hover { box-shadow: 0 34px 60px -24px rgba(35,27,60,.55), 0 0 0 1px rgba(25,19,45,.08); }
.sticker { position: absolute; z-index: 4; top: -14px; right: -10px; padding: 9px 13px; border-radius: 999px; background: var(--educator); color: #221601; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 10px 20px -10px rgba(35,27,60,.5); transform: rotate(9deg); }

/* ---------- shelves: one folder per course ----------
   Abhyas's "Notes" folder (abhyas.iith.online), at its 272 x 220 size: the front panel is cut with
   a diagonal notch at the top right, the builds sit in the notch as sheets of paper, and on hover
   they slide out diagonally while the panel sinks. Here the panel is frosted glass, so what is
   inside the notch is sharp and the rest of each sheet blurs through the front. The back is kept
   much darker than the front: the notch shows the inside of the folder. */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 64px 24px; padding-top: 34px; }
.folder { --pop: cubic-bezier(.34, 1.5, .64, 1); position: relative; display: block; height: 220px; padding: 0; border: 0; border-radius: 28px; background: none; color: var(--t-ink); text-align: left; cursor: pointer; font: inherit; box-shadow: 0 18px 34px -18px color-mix(in srgb, var(--t) 70%, #000 20%); transition: transform .38s cubic-bezier(.16, 1, .3, 1), box-shadow .38s cubic-bezier(.16, 1, .3, 1); }
.folder:hover, .folder:focus-visible, .folder[aria-pressed="true"] { transform: translateY(-6px) scale(1.018); box-shadow: 0 26px 44px -16px color-mix(in srgb, var(--t) 70%, #000 25%); }
.folder:focus-visible { outline: 3px solid var(--deep); outline-offset: 6px; }
.f-back { position: absolute; inset: 0; z-index: 0; border-radius: 28px; background: linear-gradient(135deg, color-mix(in srgb, var(--t) 58%, #000 42%) 0%, color-mix(in srgb, var(--t) 40%, #000 60%) 100%); }
.f-back::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(90% 60% at 80% 0%, rgba(255,255,255,.16), transparent 60%); }

/* the builds, tucked into the notch */
.f-sheet { position: absolute; z-index: 3; top: 13px; right: 13px; width: 52%; height: 108px; display: flex; flex-direction: column; gap: 4px; padding: 10px 11px 11px 12px; overflow: hidden; border-radius: 13px; background: #fff; color: var(--ink); box-shadow: 0 5px 13px -6px rgba(0,0,0,.45); transition: transform .42s var(--pop); }
.f-sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.f-sheet-top i { width: 18px; height: 3.5px; border-radius: 2px; background: var(--t); }
.f-sheet small { color: var(--muted); font: 500 10px/1 var(--mono); letter-spacing: .02em; }
.f-sheet b { overflow: hidden; font-size: 12.5px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; white-space: nowrap; text-overflow: ellipsis; }
.f-sheet img, .f-blank { flex: 1; width: 100%; min-height: 0; height: auto; border-radius: 7px; object-fit: cover; background: var(--t-soft); }
.f-blank { display: block; background: repeating-linear-gradient(-45deg, #fff 0 7px, var(--t-soft) 7px 14px); }
.f-sheet.s2 { z-index: 2; top: 23px; right: 27px; width: 49%; opacity: .82; }
.f-sheet.s3 { display: none; }
.folder.one .f-sheet.s1 { top: 16px; right: 18px; }
.folder:hover .f-sheet.s1, .folder:focus-visible .f-sheet.s1, .folder[aria-pressed="true"] .f-sheet.s1 { transform: translate(7px, -31px) rotate(4.5deg); }
.folder:hover .f-sheet.s2, .folder:focus-visible .f-sheet.s2, .folder[aria-pressed="true"] .f-sheet.s2 { transform: translate(-11px, -39px) rotate(-6.5deg); }

/* the front: frosted glass with the notch cut out of it. The notch is cut with an SVG mask, not
   clip-path: inside the page frame (rounded, overflow: clip) Chrome lets a clip-path'd backdrop blur
   spill into the notch, while a mask clips the blur too. */
.f-front { position: absolute; inset: 0; z-index: 4; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 22px; border-radius: 28px; background: linear-gradient(180deg, color-mix(in srgb, var(--t) 72%, transparent) 0%, color-mix(in srgb, var(--t) 90%, transparent) 100%); -webkit-backdrop-filter: blur(14px) saturate(165%); backdrop-filter: blur(14px) saturate(165%); --cut: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpolygon points='0,0 33,0 46,38 100,38 100,100 0,100'/%3E%3C/svg%3E"); -webkit-mask: var(--cut) 0 0 / 100% 100% no-repeat; mask: var(--cut) 0 0 / 100% 100% no-repeat; box-shadow: inset 0 0 0 1px rgba(255,255,255,.34), inset 0 -22px 34px -24px rgba(0,0,0,.28); transition: transform .35s ease; }
.f-front::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(118deg, rgba(255,255,255,.42) 0%, rgba(255,255,255,.12) 30%, transparent 52%), radial-gradient(70% 50% at 15% 100%, rgba(255,255,255,.14), transparent 70%); pointer-events: none; }
.f-front::after { content: ""; position: absolute; top: 38%; left: 46%; right: 0; height: 1px; background: linear-gradient(90deg, rgba(255,255,255,.8), rgba(255,255,255,.3)); pointer-events: none; }
.folder:hover .f-front, .folder[aria-pressed="true"] .f-front { transform: translateY(3px); }
.f-id, .f-stat { position: relative; z-index: 1; }
.f-id { min-width: 0; }
.f-code { display: block; margin-bottom: 5px; font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.f-title { display: -webkit-box; overflow: hidden; font-size: 17px; font-weight: 700; letter-spacing: -.02em; line-height: 1.22; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.f-open { display: block; margin-top: 9px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.f-open span { display: inline-block; transition: transform .3s var(--pop); }
.folder:hover .f-open span { transform: translateX(3px); }
.f-stat { flex: none; padding-left: 12px; text-align: right; }
.f-stat b { display: block; font-size: 28px; font-weight: 800; line-height: 1; }
.f-stat span { display: block; margin-top: 3px; font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; opacity: .8; }

/* a stuck-on note for the shelf with the newest build, on the solid top-left of the panel */
.f-sticky { position: absolute; z-index: 5; top: -11px; left: 18px; padding: 7px 11px 6px; border-radius: 4px 4px 6px 6px; background: linear-gradient(158deg, #ffe873 0%, #ffd43b 62%, #f5c518 100%); color: #4d3a00; font-size: 10.5px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; box-shadow: 0 5px 12px -4px rgba(80, 60, 0, .45); transform: rotate(-4deg); transition: transform .35s var(--pop); }
.f-sticky::before { content: ""; position: absolute; top: -5px; left: 50%; width: 22px; height: 10px; border-radius: 2px; background: rgba(255,255,255,.55); transform: translateX(-50%); }
.folder:hover .f-sticky { transform: rotate(3deg) scale(1.06); }

/* an empty shelf: the same folder drawn as dashed glass */
.folder.is-sample { box-shadow: none; }
.folder.is-sample .f-back { background: color-mix(in srgb, var(--t) 14%, #fff); border: 2px dashed color-mix(in srgb, var(--t) 65%, #000 8%); }
.folder.is-sample .f-back::after { display: none; }
.folder.is-sample .f-front { color: var(--ink); background: linear-gradient(180deg, rgba(255,255,255,.45), color-mix(in srgb, var(--t) 28%, rgba(255,255,255,.6))); }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: 600 14px/1 var(--font); cursor: pointer; transition: transform .2s, background .2s, color .2s; }
.chip:hover { transform: translateY(-1px); }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--t, var(--ink)); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line); }
.chip em { font-style: normal; color: var(--muted); font-weight: 700; }
.chip[aria-pressed="true"] { border-color: var(--deep); background: var(--deep); color: #fff; }
.chip[aria-pressed="true"] em { color: rgba(255,255,255,.7); }

/* ---------- build cards ---------- */
.lab-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.build { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.85); border-radius: 28px; background: color-mix(in srgb, #fff 82%, var(--t)); color: var(--ink); text-decoration: none; box-shadow: 0 18px 48px -36px rgba(35,27,60,.5); transition: transform .35s cubic-bezier(.2,.9,.2,1), box-shadow .35s; }
a.build:hover { transform: translateY(-6px) rotate(-.4deg); box-shadow: 0 30px 60px -34px rgba(35,27,60,.55); }
.build-media { position: relative; display: block; margin: 10px 10px 0; overflow: hidden; border-radius: 20px; aspect-ratio: 16 / 10; background: var(--t-soft); }
.build-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.9,.2,1); }
a.build:hover .build-media img { transform: scale(1.045); }
.kind { position: absolute; left: 12px; top: 12px; padding: 7px 11px; border-radius: 999px; background: var(--t); color: var(--t-ink); font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; box-shadow: 0 6px 14px -8px rgba(0,0,0,.4); }
.status { position: absolute; right: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--ink); font-size: 11.5px; font-weight: 700; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #2fbf55; box-shadow: 0 0 0 3px rgba(47,191,85,.2); }
.status.soon::before { background: #e2a504; box-shadow: 0 0 0 3px rgba(226,165,4,.2); }
.status.sample::before { background: #9c98ad; box-shadow: none; }
.build-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 18px 22px 22px; }
.build-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
.build-meta .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--t); }
.build-title { font-size: 24px; font-weight: 650; letter-spacing: -.04em; line-height: 1.08; }
.build-summary { color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.build-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding: 10px 52px 0 0; }
.build-tags span { padding: 5px 9px; border-radius: 999px; background: rgba(255,255,255,.75); color: var(--muted); font-size: 12px; font-weight: 650; }
.build-go { position: absolute; right: 18px; bottom: 18px; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--deep); color: #fff; font-size: 17px; transition: transform .3s; }
a.build:hover .build-go { transform: rotate(45deg) scale(1.06); }
.build.is-soon .build-go { background: rgba(25,19,45,.12); color: var(--muted); }

/* the newest build gets a banner across the grid: picture left, story right */
.build.is-featured { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.build.is-featured .build-media { margin: 12px 0 12px 12px; aspect-ratio: 16 / 9.4; }
.build.is-featured .build-body { justify-content: center; gap: 12px; padding: 32px 36px 36px; }
.build.is-featured .build-title { font-size: clamp(30px, 3.4vw, 48px); line-height: 1; }
.build.is-featured .build-summary { font-size: 16.5px; }
.build.is-featured .build-tags { margin-top: 8px; }
.build.is-featured .build-go { right: 26px; bottom: 26px; width: 54px; height: 54px; font-size: 21px; }
.build.is-featured .build-body::before { content: "Newest build"; align-self: flex-start; margin-bottom: 6px; padding: 7px 12px; border-radius: 999px; background: var(--educator); color: #221601; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; transform: rotate(-2deg); }

/* placeholders read as placeholders */
.build.is-sample { border: 2px dashed color-mix(in srgb, var(--t) 60%, #000 10%); background: transparent; box-shadow: none; }
.build.is-sample .build-media { background: repeating-linear-gradient(-45deg, #fff 0 12px, var(--t-soft) 12px 24px); }
.build.is-sample .build-media::after { content: "+ new build"; position: absolute; inset: 0; display: grid; place-items: center; color: color-mix(in srgb, var(--t) 70%, #000 30%); font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.build.is-sample .build-go { display: none; }

.empty { grid-column: 1 / -1; padding: 40px; border: 2px dashed var(--line); border-radius: 24px; color: var(--muted); text-align: center; }

/* cards rise in as they are added (a filter change re-runs it) */
.reveal { animation: rise .6s cubic-bezier(.16,1,.3,1) both; animation-delay: var(--d, 0ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* ---------- method ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; flex-direction: column; gap: 10px; min-height: 210px; padding: 26px; border: 1px solid rgba(255,255,255,.8); border-radius: var(--radius-lg); background: color-mix(in srgb, #fff 72%, var(--tone, var(--hero))); }
.step-n { font-size: 44px; font-weight: 600; letter-spacing: -.06em; line-height: 1; opacity: .35; }
.steps strong { margin-top: auto; font-size: 21px; letter-spacing: -.03em; }
.steps span:last-child { color: var(--muted); font-size: 14.5px; }

/* ---------- footer: the homepage's footer, dark fading into violet, with a wordmark ---------- */
.page-footer { position: relative; isolation: isolate; overflow: hidden; padding-bottom: 26px; background: linear-gradient(180deg, var(--deep) 0%, var(--deep) 44%, color-mix(in srgb, var(--deep) 60%, var(--hero)) 74%, var(--hero) 100%); }
.page-footer::after { content: ""; position: absolute; z-index: -1; left: 50%; bottom: -30%; width: 90%; height: 62%; border-radius: 50%; background: radial-gradient(ellipse, rgba(255,255,255,.55) 0%, rgba(255,255,255,.14) 40%, transparent 72%); filter: blur(24px); transform: translateX(-50%); }
.footer-wordmark { margin: 64px -1vw -.06em; color: rgba(255,255,255,.72); font-size: clamp(5.5rem, 17vw, 15rem); font-weight: 700; letter-spacing: -.055em; line-height: .78; text-align: center; white-space: nowrap; text-shadow: 0 8px 34px rgba(255,255,255,.18); user-select: none; }
.page-footer .footer-bottom { margin-top: 26px; padding: 13px 18px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: color-mix(in srgb, var(--deep) 86%, transparent); color: rgba(255,255,255,.74); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }

/* glass chips on the cards and in the hero */
.status, .lab-stats li { border: 1px solid rgba(255,255,255,.75); background: rgba(255,255,255,.6); -webkit-backdrop-filter: blur(10px) saturate(160%); backdrop-filter: blur(10px) saturate(160%); box-shadow: 0 6px 16px -10px rgba(35,27,60,.35); }
.kind { border: 1px solid rgba(255,255,255,.45); background: color-mix(in srgb, var(--t) 86%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

.noscript { margin: 20px; text-align: center; }

@media (max-width: 980px) {
  .lab-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .build.is-featured { display: flex; }
  .build.is-featured .build-media { margin: 10px 10px 0; }
  .build.is-featured .build-body { padding: 20px 24px 26px; }
  .specimens { justify-self: center; width: min(92%, 400px); margin-top: 10px; }
}
@media (max-width: 680px) {
  .lab-grid { grid-template-columns: 1fr; }
  .footer-wordmark { margin-top: 40px; }
  .page-footer .footer-bottom { flex-direction: column; gap: 6px; border-radius: 20px; text-align: center; }
  .build.is-featured .build-media { aspect-ratio: 16 / 10; }
  .shelf { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 56px 6px 26px; margin: -30px -6px 0; scrollbar-width: none; }
  .shelf::-webkit-scrollbar { display: none; }
  .folder { flex: 0 0 min(78%, 290px); scroll-snap-align: center; }
  .steps { grid-template-columns: 1fr; }
  .steps li { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; }
  .specimen, .f-sheet, .f-front, .folder, .build, .build-media img { transition: none; }
}

/* ---------- the hero stage: a dark lab bench with every build on the homepage's wheel ----------
   Full bleed behind the top bar. The glow behind the middle card takes that build's course hue and
   eases to the next one as the wheel turns (--glow is a registered colour, so it can transition). */
@property --glow { syntax: "<color>"; inherits: true; initial-value: #fe8167; }
@property --glow2 { syntax: "<color>"; inherits: true; initial-value: #bcadff; }
.lab-stage {
  --stage-ink: #fff; --stage-muted: rgba(236, 232, 255, .72);
  --glow: var(--creator); --glow2: var(--hero);
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-rows: auto auto auto; grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: center;
  min-height: max(640px, min(100svh - 90px, 840px));
  margin-top: -92px; padding: 130px 0 22px;
  background: radial-gradient(120% 90% at 50% 118%, #2d2350 0%, #19132d 46%, #120d22 100%);
  color: var(--stage-ink);
  transition: --glow .9s cubic-bezier(.65, 0, .35, 1), --glow2 1.4s cubic-bezier(.65, 0, .35, 1);
}
.stage-sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.stage-sky .glow { position: absolute; border-radius: 50%; filter: blur(10px); }
.stage-sky .g1 { left: 50%; top: 52%; width: min(1100px, 120vw); height: 620px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, color-mix(in srgb, var(--glow) 62%, transparent), color-mix(in srgb, var(--glow) 14%, transparent) 62%, transparent); }
.stage-sky .g2 { left: -12%; top: -18%; width: 640px; height: 640px; background: radial-gradient(closest-side, color-mix(in srgb, var(--glow2) 34%, transparent), transparent); }
.stage-sky .g3 { right: -14%; top: -6%; width: 560px; height: 560px; background: radial-gradient(closest-side, color-mix(in srgb, var(--athlete) 34%, transparent), transparent); }
/* a dotted bench grid, fading out toward the edges */
.stage-sky .grid { position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.16) 1px, transparent 1.4px); background-size: 26px 26px; -webkit-mask-image: radial-gradient(80% 70% at 50% 46%, #000 30%, transparent 78%); mask-image: radial-gradient(80% 70% at 50% 46%, #000 30%, transparent 78%); }
.stage-copy { width: min(1080px, calc(100% - 48px)); text-align: center; }
.lab-stage .kicker { justify-content: center; color: color-mix(in srgb, var(--hero) 86%, #fff); }
.lab-stage h1 { margin: 0 auto; max-width: 1060px; font-family: var(--font); font-weight: 700; font-size: clamp(3.1rem, 6.1vw, 6.5rem); letter-spacing: -.05em; line-height: .9; color: var(--stage-ink); text-wrap: balance; }
.lab-stage .hl::before { background: var(--educator); opacity: .95; height: .3em; bottom: .02em; }
.lab-stage .hl { color: #fff; }


/* the wheel */
.wheel { --cw: clamp(240px, 23vw, 330px); --gap: calc(var(--cw) * .8); position: relative; width: 100%; height: calc(var(--cw) * .62 + 74px); margin-top: clamp(26px, 4vh, 44px); perspective: 1400px; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; outline: none; }
.wheel.dragging { cursor: grabbing; }
.wheel-plane { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)); transition: transform .5s cubic-bezier(.16, 1, .3, 1); }
.wheel:focus-visible .wcard[data-on="true"] { outline: 3px solid var(--educator); outline-offset: 5px; }
.wcard { position: absolute; left: 50%; top: 28px; width: var(--cw); margin-left: calc(var(--cw) / -2); aspect-ratio: 16 / 10; display: block; overflow: hidden; border: 1px solid rgba(255,255,255,.5); border-radius: 24px; background: #2a2244; color: #fff; text-decoration: none;
  transform: translate3d(calc(var(--wx) * var(--gap)), var(--wy), 0) rotate(var(--wr)) scale(var(--ws)); opacity: var(--wo);
  box-shadow: 0 30px 60px -26px rgba(4, 2, 14, .85); transition: box-shadow .25s, outline-color .25s; will-change: transform, opacity; -webkit-user-drag: none; }
.wcard img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; transform: scale(1.02); }
.wcard[data-on="true"] { outline: 3.5px solid rgba(255,255,255,.95); box-shadow: 0 40px 80px -26px color-mix(in srgb, var(--t) 60%, #000), 0 0 0 1px rgba(255,255,255,.4); }
.wcard-label { position: absolute; inset: auto 0 0; display: grid; gap: 2px; padding: 46px 16px 14px; text-align: left; background: linear-gradient(180deg, transparent, rgba(12, 8, 26, .88)); }
.wcard-label strong { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.wcard-label span { color: rgba(255,255,255,.76); font-size: 12.5px; font-weight: 600; }
.wcard-label .dot { position: absolute; top: 14px; left: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--t); box-shadow: 0 0 0 3px rgba(255,255,255,.85); }
.wcard .sticker { top: 12px; right: 12px; z-index: 3; }
/* the middle card's name is already in the row underneath */
.wcard-label { transition: opacity .3s; }
.wcard[data-on="true"] .wcard-label { opacity: 0; }
.wheel-thread { position: absolute; z-index: 0; left: 50%; bottom: -6px; width: min(1180px, 96%); height: calc(var(--cw) * .9); transform: translateX(-50%); pointer-events: none; opacity: .55; }
.wheel-thread path { fill: none; stroke: rgba(255,255,255,.5); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: .55 1.75; vector-effect: non-scaling-stroke; }

/* the middle card's name and a way in, between the arrows */
.now-row { display: flex; align-items: center; justify-content: center; gap: 18px; width: min(760px, calc(100% - 48px)); margin-top: 4px; }
.now { display: flex; align-items: center; justify-content: center; gap: 16px; min-width: 0; text-align: center; }
.now > * { margin: 0; }
.now.swap > * { animation: nowIn .55s cubic-bezier(.16, 1, .3, 1) both; }
.now.swap > :nth-child(2) { animation-delay: .04s; } .now.swap > :nth-child(3) { animation-delay: .08s; } .now.swap > :nth-child(4) { animation-delay: .12s; }
@keyframes nowIn { from { opacity: 0; transform: translateY(10px); } }
.now-title { display: inline-flex; align-items: center; gap: 10px; font-size: clamp(1.3rem, 2vw, 1.75rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; white-space: nowrap; }
.now-title .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--t); box-shadow: 0 0 12px var(--t); }
.now-open { min-height: 42px; padding: 9px 18px; background: #fff; border-color: #fff; color: var(--ink); }
.now-open:hover { box-shadow: 0 14px 30px -10px color-mix(in srgb, var(--glow) 70%, transparent); }
.stage-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: min(1180px, calc(100% - 48px)); margin-top: 10px; }
.lab-stage .lab-stats { margin: 0; }
.lab-stage .lab-stats li { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: var(--stage-muted); backdrop-filter: blur(8px); }
.lab-stage .lab-stats strong { color: #fff; }
.wheel-btn { width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; font-size: 18px; cursor: pointer; transition: background .2s, transform .2s; }
.wheel-btn:hover { background: rgba(255,255,255,.18); transform: translateY(-2px); }
.lab-stage .button.secondary { border-color: rgba(255,255,255,.4); color: #fff; }
/* the top bar takes the stage's colours while it floats over it (lab.js toggles .on-dark) */
.page-frame > .topbar { transition: background .35s, border-color .35s, box-shadow .35s; }
.page-frame > .topbar.on-dark { border-color: rgba(255,255,255,.14); background: color-mix(in srgb, #19132d 58%, transparent); box-shadow: 0 14px 36px rgba(4, 2, 14, .32); }
.topbar.on-dark .brand { color: #fff; }
.topbar.on-dark .brand-portrait { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.14); }
.topbar.on-dark .topnav a { color: rgba(236, 232, 255, .74); }
.topbar.on-dark .topnav a:hover, .topbar.on-dark .topnav a[aria-current="page"] { background: rgba(255,255,255,.14); color: #fff; }
.topbar.on-dark .topnav .nav-cta, .topbar.on-dark .topnav .nav-cta:hover { background: #fff; color: var(--ink); }

/* section headings on one edge with everything else: the label above the heading, not beside it */
.content-section .section-heading { grid-template-columns: 1fr; gap: 12px; }
.content-section .section-index { margin: 0; }

@media (max-width: 760px) {
  .lab-stage { min-height: auto; margin-top: -86px; padding: 118px 0 26px; }
  .lab-stage h1 { font-size: clamp(2.7rem, 12vw, 3.6rem); }
  .wheel { margin-top: 18px; }
  .wheel { --cw: min(66vw, 290px); --gap: calc(var(--cw) * .7); height: calc(var(--cw) * .62 + 70px); }
  .wcard { top: 22px; border-radius: 18px; }
  .wcard-label { padding: 34px 12px 10px; } .wcard-label strong { font-size: 15px; }
  .now-row { gap: 10px; width: calc(100% - 28px); }
  .now { flex-direction: column; gap: 10px; }
  .wheel-btn { width: 42px; height: 42px; flex: none; }
}
@media (prefers-reduced-motion: reduce) { .lab-stage { transition: none; } .now.swap > * { animation: none; } }
/* the content slides up over the stage with rounded corners, as the homepage's panel does */
.lab-stage { padding-bottom: 62px; }
.lab-stage + .content-section { position: relative; z-index: 1; margin-top: -40px; border-radius: var(--radius-xl) var(--radius-xl) 0 0; background: var(--surface); box-shadow: 0 -18px 40px -24px rgba(8, 4, 20, .55); width: 100%; padding-left: max(28px, calc((100% - 1160px) / 2)); padding-right: max(28px, calc((100% - 1160px) / 2)); }
@media (max-width: 760px) { .lab-stage { padding-bottom: 52px; } .lab-stage + .content-section { margin-top: -30px; border-radius: 28px 28px 0 0; } }
