/**
 * Lab — /lab page only (sabella-ca#139). Split out of components.css so the
 * global stylesheet no longer ships the Lab's scene/quiz CSS on every page.
 */
/* Find Your Signal Lab */
.lab {
  position: relative;
  padding: var(--space-8) 0 var(--space-9);
  overflow: hidden;
  min-height: calc(100svh - var(--nav-height));
}

.lab__atmosphere {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 12% -10%, rgb(52 127 234 / 0.18), transparent 55%),
    radial-gradient(ellipse 55% 45% at 100% 30%, rgb(232 180 91 / 0.1), transparent 50%),
    radial-gradient(ellipse 40% 30% at 50% 100%, rgb(79 214 163 / 0.06), transparent 45%),
    linear-gradient(180deg, var(--color-surface) 0%, var(--color-canvas) 100%);
  pointer-events: none;
  z-index: 0;
}

.lab__scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.lab__scene img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: saturate(0.92) contrast(1.05);
  transform: scale(1.04);
  animation: lab-scene-in 1.1s ease-out both;
}

.lab__scene-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgb(5 9 20 / 0.55) 0%, rgb(5 9 20 / 0.72) 42%, rgb(5 9 20 / 0.92) 100%),
    radial-gradient(ellipse 60% 50% at 50% 20%, transparent, rgb(5 9 20 / 0.5));
}

.lab__inner {
  position: relative;
  z-index: 1;
  max-width: 36rem;
}

.lab--result .lab__inner {
  max-width: 34rem;
  padding-top: var(--space-7);
}

.lab__intro {
  margin-bottom: var(--space-6);
}

.lab__eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: var(--text-meta);
}

.lab__glyph {
  color: var(--color-accent-warm);
  font-family: var(--font-display);
  font-size: 1.1em;
  text-transform: none;
  letter-spacing: 0;
}

.lab__intro h1 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: var(--space-3) 0 var(--space-4);
}

.lab__permissions {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  margin: var(--space-5) 0 0;
  font-size: var(--text-small);
  color: var(--color-text-faint);
  letter-spacing: 0.04em;
}

.lab__permissions > span:not(.lab__perm-dot):not(.lab__permissions-note) {
  color: var(--color-accent-boundary);
}

.lab__perm-dot {
  opacity: 0.45;
}

.lab__permissions-note {
  margin-left: var(--space-2);
  padding: 0.15em 0.55em;
  border: 1px solid var(--color-line-soft);
  border-radius: 999px;
  font-size: 0.75em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.lab__notice {
  padding: var(--space-4);
  border: var(--border-strong);
  border-radius: var(--radius-md);
  background: rgb(17 28 49 / 0.85);
  color: var(--color-accent-warm-soft);
  backdrop-filter: blur(8px);
}

.lab-progress {
  margin-bottom: var(--space-5);
}

.lab-progress__track {
  height: 2px;
  background: var(--color-line-soft);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: var(--space-2);
}

.lab-progress__fill {
  display: block;
  height: 100%;
  width: 25%;
  background: linear-gradient(90deg, var(--color-link), var(--color-accent-warm));
  border-radius: inherit;
  transition: width 280ms ease-out;
}

.lab-form {
  display: grid;
  gap: var(--space-6);
}

.lab-form[hidden],
.lab-form--listening,
.lab--listening .lab-form,
.lab--result .lab-form {
  display: none !important;
}

.lab-form--stepped .lab-q:not(.lab-q--active) {
  display: none;
}

.lab-q {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: var(--space-4);
  animation: lab-step-in 360ms ease-out both;
}

.lab-q legend {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  padding: 0;
  margin-bottom: var(--space-1);
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.lab-q__prompt {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--text-lead);
  line-height: 1.45;
}

.lab-form:not(.lab-form--stepped) [data-lab-footer][hidden] {
  display: grid;
}

.lab-form--stepped [data-lab-footer]:not(.lab-form__footer--show) {
  display: none !important;
}

.lab-choice__body {
  display: grid;
  gap: 0.35rem;
  padding: var(--space-4) var(--space-5);
  border: 1px solid rgb(45 61 89 / 0.95);
  border-radius: var(--radius-md);
  background: rgb(17 28 49 / 0.82);
  backdrop-filter: blur(10px);
  transition:
    border-color var(--transition-base),
    background var(--transition-base),
    transform var(--transition-fast),
    box-shadow var(--transition-base);
}

.lab-choice__key {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.lab-choice__text {
  font-size: var(--text-small);
  color: #c4ccda;
  line-height: 1.45;
}

.lab-q legend {
  color: #f5f2ea;
}

.lab-choices {
  display: grid;
  gap: var(--space-3);
}

.lab-choice {
  display: block;
  cursor: pointer;
  margin: 0;
}

.lab-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lab-choice__body {
  display: grid;
  gap: 0.2rem;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--color-line-soft);
  border-radius: var(--radius-md);
  background: rgb(17 28 49 / 0.55);
  backdrop-filter: blur(10px);
  transition:
    border-color var(--transition-base),
    background var(--transition-base),
    transform var(--transition-fast),
    box-shadow var(--transition-base);
}

.lab-choice:hover .lab-choice__body {
  border-color: var(--color-line);
  background: rgb(26 41 67 / 0.72);
  transform: translateY(-1px);
}

.lab-choice input:focus-visible + .lab-choice__body {
  box-shadow: var(--shadow-focus);
}

.lab-choice input:checked + .lab-choice__body {
  border-color: rgb(232 180 91 / 0.65);
  background:
    linear-gradient(135deg, rgb(232 180 91 / 0.12), transparent 55%),
    rgb(17 28 49 / 0.8);
  box-shadow: 0 0 0 1px rgb(232 180 91 / 0.2);
}

.lab-choice__key {
  font-family: var(--font-display);
  font-size: var(--text-body);
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.lab-choice__text {
  font-size: var(--text-small);
  color: var(--color-text-muted);
  line-height: 1.4;
}

.lab-form__footer {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.lab-form__fine {
  margin: 0;
  font-size: var(--text-small);
}

.lab-result {
  display: grid;
  gap: var(--space-4);
  animation: lab-step-in 500ms ease-out both;
}

.lab-result__pattern {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

.lab-result__pattern:focus {
  outline: none;
}

.lab-result__title {
  margin: 0;
  font-size: var(--text-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-warm-soft);
}

.lab-result__title--empty {
  min-height: 1.25em;
  visibility: hidden;
  pointer-events: none;
}

.lab-result__sentence {
  font-family: var(--font-display);
  font-size: var(--text-lead);
  font-style: italic;
  line-height: 1.55;
  margin: var(--space-2) 0 var(--space-4);
  max-width: 28rem;
  min-height: calc(1.55em * 2);
  color: var(--color-text);
  text-wrap: pretty;
}

.lab-result__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  align-items: stretch;
  justify-items: stretch;
  width: min(100%, 18rem);
  margin: var(--space-3) auto 0;
}

.lab-result__again {
  color: var(--color-text-muted);
  font-size: var(--text-small);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.lab-result__again:hover {
  color: var(--color-text);
  border-bottom-color: var(--color-line);
}

@keyframes lab-step-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes lab-scene-in {
  from {
    opacity: 0;
    transform: scale(1.08);
  }
  to {
    opacity: 1;
    transform: scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lab-q,
  .lab-result,
  .lab__scene img {
    animation: none;
  }

  .lab-choice__body,
  .lab-progress__fill {
    transition: none;
  }

  .lab-choice:hover .lab-choice__body {
    transform: none;
  }
}

/* Lab playfulness (hackathon energy) */
.lab--play .lab__atmosphere {
  background:
    radial-gradient(ellipse 80% 60% at 8% -5%, rgb(52 127 234 / 0.28), transparent 50%),
    radial-gradient(ellipse 60% 50% at 95% 15%, rgb(232 180 91 / 0.2), transparent 48%),
    radial-gradient(ellipse 50% 40% at 40% 110%, rgb(79 214 163 / 0.12), transparent 50%),
    linear-gradient(165deg, #07101f 0%, #0b1528 45%, #050914 100%);
}

.lab__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  animation: lab-orb-drift 12s ease-in-out infinite alternate;
}

.lab__orb--a {
  width: 220px;
  height: 220px;
  left: -40px;
  top: 10%;
  background: rgb(52 127 234 / 0.45);
}

.lab__orb--b {
  width: 180px;
  height: 180px;
  right: -20px;
  top: 35%;
  background: rgb(232 180 91 / 0.35);
  animation-delay: -4s;
}

.lab__orb--c {
  width: 160px;
  height: 160px;
  left: 35%;
  bottom: 5%;
  background: rgb(79 214 163 / 0.3);
  animation-delay: -7s;
}

.lab__spark {
  position: absolute;
  font-family: var(--font-display);
  color: rgb(232 180 91 / 0.35);
  font-size: 1.4rem;
  animation: lab-spark-float 7s ease-in-out infinite;
  pointer-events: none;
  user-select: none;
}

.lab__spark--1 { left: 12%; top: 22%; animation-delay: 0s; }
.lab__spark--2 { right: 18%; top: 48%; font-size: 1rem; animation-delay: -2.5s; color: rgb(155 200 255 / 0.35); }
.lab__spark--3 { left: 55%; top: 18%; font-size: 2rem; animation-delay: -1.2s; opacity: 0.25; }

.lab-choice__body {
  position: relative;
  overflow: hidden;
}

.lab-choice__body::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgb(232 180 91 / 0.2), transparent 70%);
  opacity: 0;
  transition: opacity 200ms ease;
}

.lab-choice:hover .lab-choice__body::after,
.lab-choice input:checked + .lab-choice__body::after {
  opacity: 1;
}

.lab-choice input:checked + .lab-choice__body {
  border-color: rgb(232 180 91 / 0.85);
  transform: translateY(-2px) scale(1.01);
}

.lab-form__go {
  font-size: 1rem;
  padding: 0.9rem 1.6rem;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 28px rgb(232 180 91 / 0.35);
}

.lab-form__go:hover {
  transform: translateY(-2px) rotate(-0.5deg);
}

.lab__aside {
  margin-top: var(--space-5);
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-accent-warm-soft);
  min-height: 1.5em;
  animation: lab-step-in 280ms ease-out both;
}

.lab-result__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0;
  color: rgb(232 180 91 / 0.92);
  letter-spacing: 0.1em;
  text-transform: none;
}

.lab-result__meta .lab__glyph {
  color: inherit;
  text-shadow: 0 0 18px rgb(232 180 91 / 0.45);
}

.lab-result__rule {
  width: 2.75rem;
  height: 1px;
  margin: 0 auto;
  background: linear-gradient(
    90deg,
    transparent,
    rgb(232 180 91 / 0.75),
    transparent
  );
  box-shadow: 0 0 12px rgb(232 180 91 / 0.35);
}

.lab-result--door {
  gap: var(--space-3);
}

.lab-result--door .lab-result__pattern {
  text-align: center;
  min-height: 2.2em;
}

.lab-result--door .lab-result__title,
.lab-result--door .lab-result__sentence,
.lab-result--door .lab-result__wink {
  text-align: center;
  margin-inline: auto;
}

.lab-result--door .lab-result__actions .btn {
  width: 100%;
  min-width: 0;
}

.lab-result--door .lab-result__again {
  justify-self: center;
  padding: 0.35rem 0;
}

/* Legacy stamp kept inert if any old markup lingers */
.lab-result__stamp {
  display: none;
}

.lab-result__cta {
  box-shadow: 0 10px 32px rgb(232 180 91 / 0.4);
}

.lab-result__wink {
  margin: var(--space-5) 0 0;
  font-size: var(--text-small);
}

.lab-progress__label {
  color: var(--color-accent-warm-soft);
  font-style: italic;
  letter-spacing: 0.02em;
  text-transform: none;
}

@keyframes lab-orb-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(24px, -18px) scale(1.08); }
}

@keyframes lab-spark-float {
  0%, 100% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(-14px); opacity: 0.7; }
}

@keyframes lab-stamp-in {
  0% { opacity: 0; transform: scale(1.4) rotate(-18deg); }
  100% { opacity: 1; transform: scale(1) rotate(-6deg); }
}

@media (prefers-reduced-motion: reduce) {
  .lab__orb,
  .lab__spark,
  .lab-result__stamp {
    animation: none !important;
  }
  .lab-form__go:hover,
  .lab-choice input:checked + .lab-choice__body {
    transform: none;
  }
}

/* Cinematic one-sheet stage */
.lab--cinema {
  min-height: 100svh;
  padding: 0 0 var(--space-9);
  isolation: isolate;
}

.lab--cinema .lab__inner {
  position: relative;
  z-index: 2;
  width: min(42rem, calc(100% - 2 * var(--gutter)));
  max-width: none;
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 var(--space-8);
  text-align: center;
}

.lab--cinema .lab__intro,
.lab--cinema .lab-form,
.lab--cinema .lab-result,
.lab--cinema .lab__aside {
  margin-inline: auto;
  text-align: center;
}

.lab--cinema .lab__permissions {
  justify-content: center;
}

.lab--cinema .lab-q {
  text-align: center;
}

.lab--cinema .lab-q__prompt {
  margin-inline: auto;
}

.lab__poster {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #02050c;
  pointer-events: none;
}

.lab__plate {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 900ms cubic-bezier(0.33, 0.1, 0.2, 1);
  pointer-events: none;
}

.lab__plate--active {
  opacity: 1;
  z-index: 1;
}

.lab__plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1);
  filter: saturate(1.12) contrast(1.12) brightness(0.92);
}

.lab__plate[data-lab-plate="0"] img,
.lab__plate[data-lab-plate="result"] img {
  object-position: 48% 18%;
}

.lab__plate[data-lab-plate="1"] img {
  object-position: 48% 22%;
}

.lab__plate[data-lab-plate="2"] img {
  object-position: 55% 18%;
}

.lab__plate[data-lab-plate="3"] img {
  object-position: 50% 42%;
}

.lab--js .lab__plate--active img {
  animation: lab-kenburns 22s ease-out forwards;
}

.lab__poster-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(ellipse 55% 50% at 50% 38%, transparent 0%, rgb(2 5 12 / 0.2) 42%, rgb(2 5 12 / 0.72) 100%),
    linear-gradient(180deg, rgb(2 5 12 / 0.4) 0%, rgb(2 5 12 / 0.18) 28%, rgb(2 5 12 / 0.35) 58%, rgb(2 5 12 / 0.92) 100%);
}

.lab__poster-grain {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0.18;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.lab__letterbox {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 4;
  height: clamp(36px, 5.5vw, 64px);
  background: #000;
  pointer-events: none;
  box-shadow: 0 0 40px rgb(0 0 0 / 0.65);
  transform-origin: center;
}

.lab__letterbox--top { top: 0; transform-origin: top center; }
.lab__letterbox--bottom { bottom: 0; transform-origin: bottom center; }

.lab__plate-credit {
  position: absolute;
  right: max(var(--gutter), 2rem);
  bottom: calc(clamp(36px, 5.5vw, 64px) + 14px);
  z-index: 5;
  margin: 0;
  max-width: 42%;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgb(245 242 234 / 0.62);
  text-shadow: 0 1px 12px rgb(0 0 0 / 0.9);
  text-align: right;
}

.lab__plate-credit::before {
  content: "still · ";
  letter-spacing: 0.12em;
  color: rgb(232 180 91 / 0.7);
}

.lab-form--poster {
  padding: var(--space-5);
  border: 1px solid rgb(245 242 234 / 0.14);
  border-radius: var(--radius-lg);
  background: rgb(4 8 18 / 0.58);
  backdrop-filter: blur(18px) saturate(1.15);
  box-shadow:
    0 28px 80px rgb(0 0 0 / 0.55),
    inset 0 1px 0 rgb(255 255 255 / 0.08);
}

.lab--cinema .lab__intro {
  max-width: 34rem;
}

.lab--cinema .lab__intro .lead,
.lab--cinema .lab__intro h1 {
  text-shadow:
    0 2px 28px rgb(0 0 0 / 0.75),
    0 0 1px rgb(0 0 0 / 0.8);
}

.lab--cinema .lab__eyebrow {
  text-shadow: 0 1px 12px rgb(0 0 0 / 0.7);
}

.lab--cinema .lab__aside {
  color: rgb(232 180 91 / 0.85);
  text-shadow: 0 1px 10px rgb(0 0 0 / 0.7);
}

.lab--result .lab__poster-veil {
  background:
    radial-gradient(ellipse 55% 70% at 70% 40%, transparent 0%, rgb(2 5 12 / 0.18) 55%, rgb(2 5 12 / 0.55) 100%),
    linear-gradient(90deg, rgb(2 5 12 / 0.55) 0%, rgb(2 5 12 / 0.18) 48%, rgb(2 5 12 / 0.32) 100%),
    linear-gradient(180deg, rgb(2 5 12 / 0.22) 0%, transparent 32%, rgb(2 5 12 / 0.78) 100%);
}

.lab--result .lab-result {
  width: min(100%, 36rem);
  padding: clamp(var(--space-5), 5vw, var(--space-7));
  border-radius: var(--radius-lg);
  background: rgb(4 8 18 / 0.52);
  border: 1px solid rgb(245 242 234 / 0.14);
  box-shadow:
    0 28px 80px rgb(0 0 0 / 0.45),
    inset 0 1px 0 rgb(255 255 255 / 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@keyframes lab-kenburns {
  from { transform: scale(1.16) translate3d(1.2%, 0.5%, 0); }
  to { transform: scale(1.05) translate3d(-2%, -1.5%, 0); }
}

@media (min-width: 1100px) {
  .lab--cinema .lab__inner {
    width: min(40rem, 46vw);
  }

  .lab__poster-veil {
    background:
      radial-gradient(ellipse 48% 52% at 50% 36%, transparent 0%, rgb(2 5 12 / 0.12) 40%, rgb(2 5 12 / 0.68) 100%),
      linear-gradient(180deg, rgb(2 5 12 / 0.32) 0%, rgb(2 5 12 / 0.12) 30%, rgb(2 5 12 / 0.4) 62%, rgb(2 5 12 / 0.9) 100%);
  }
}

@media (max-width: 720px) {
  .lab--cinema .lab__inner {
    margin-inline: auto;
    width: min(40rem, calc(100% - 2 * var(--gutter)));
  }

  .lab__poster-veil {
    background:
      linear-gradient(180deg, rgb(2 5 12 / 0.28) 0%, rgb(2 5 12 / 0.45) 38%, rgb(2 5 12 / 0.88) 72%, rgb(2 5 12 / 0.96) 100%),
      radial-gradient(ellipse 90% 55% at 50% 18%, transparent 0%, rgb(2 5 12 / 0.35) 100%);
  }

  .lab__plate img {
    object-position: center 14%;
  }

  .lab__plate-credit {
    max-width: none;
    left: var(--gutter);
    right: var(--gutter);
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lab--js .lab__plate--active img {
    animation: none;
    transform: scale(1.04);
  }
  .lab__plate {
    transition: none;
  }
}

/* Film-take selection (cinematic picks) */
.lab-form--poster {
  padding: var(--space-4) 0 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  backdrop-filter: none;
  box-shadow: none;
}

.lab-progress__reels {
  display: flex;
  gap: 0.45rem;
  margin-bottom: var(--space-3);
  max-width: 14rem;
}

.lab-progress__reel {
  flex: 1;
  height: 3px;
  border-radius: 1px;
  background: rgb(245 242 234 / 0.12);
  position: relative;
  overflow: hidden;
}

.lab-progress__reel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(232 180 91 / 0.25);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 400ms ease;
}

.lab-progress__reel--done::before {
  background: rgb(232 180 91 / 0.7);
  transform: scaleX(1);
}

.lab-progress__reel--live::before {
  background: linear-gradient(90deg, rgb(232 180 91), rgb(245 242 234));
  transform: scaleX(1);
  animation: lab-reel-pulse 1.4s ease-in-out infinite;
}

.lab--cinema .lab-progress__label {
  margin: 0;
}

.lab--cinema .lab-q legend {
  font-size: clamp(1.75rem, 3.4vw, 2.35rem);
  letter-spacing: -0.03em;
  text-shadow: 0 2px 20px rgb(0 0 0 / 0.65);
}

.lab--cinema .lab-q__prompt {
  color: rgb(230 234 242 / 0.9);
  font-size: 1.08rem;
  max-width: 28rem;
  text-shadow: 0 1px 12px rgb(0 0 0 / 0.55);
}

.lab--cinema .lab-choices {
  display: grid;
  gap: 0.55rem;
  margin-top: var(--space-3);
}

.lab--cinema .lab-choice__body {
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  grid-template-areas:
    "meta key"
    "meta text";
  column-gap: 0.95rem;
  row-gap: 0.15rem;
  align-items: start;
  padding: 0.85rem 1rem 0.9rem 0.85rem;
  border: 1px solid rgb(245 242 234 / 0.16);
  border-radius: 0;
  background: rgb(2 5 12 / 0.48);
  backdrop-filter: none;
  box-shadow: 0 10px 36px rgb(0 0 0 / 0.28);
  position: relative;
  overflow: visible;
  transition:
    border-color 220ms ease,
    background 220ms ease,
    opacity 280ms ease,
    transform 280ms ease,
    filter 280ms ease;
}

.lab--cinema .lab-choice__body::before,
.lab--cinema .lab-choice__body::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: rgb(232 180 91 / 0);
  border-style: solid;
  transition: border-color 220ms ease, opacity 220ms ease;
  pointer-events: none;
}

.lab--cinema .lab-choice__body::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.lab--cinema .lab-choice__body::after {
  right: -1px;
  bottom: -1px;
  border-width: 0 2px 2px 0;
}

.lab--cinema .lab-choice__meta {
  grid-area: meta;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: horizontal-tb;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgb(232 180 91 / 0.7);
  border-right: 1px solid rgb(245 242 234 / 0.12);
  padding-right: 0.75rem;
  margin: 0;
  min-height: 100%;
}

.lab--cinema .lab-choice__key {
  grid-area: key;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
  color: #f5f2ea;
  padding-top: 0.1rem;
}

.lab--cinema .lab-choice__text {
  grid-area: text;
  color: rgb(196 204 218 / 0.9);
  font-size: 0.92rem;
  line-height: 1.45;
}

.lab--cinema .lab-choice:hover .lab-choice__body {
  border-color: rgb(245 242 234 / 0.32);
  background: rgb(8 14 28 / 0.55);
  transform: translateX(4px);
}

.lab--cinema .lab-choice:hover .lab-choice__body::before,
.lab--cinema .lab-choice:hover .lab-choice__body::after {
  border-color: rgb(232 180 91 / 0.55);
}

.lab--cinema .lab-choice input:focus-visible + .lab-choice__body {
  box-shadow: 0 0 0 2px rgb(232 180 91 / 0.45);
}

.lab--cinema .lab-choice input:checked + .lab-choice__body,
.lab--cinema .lab-choice--picked .lab-choice__body {
  border-color: rgb(232 180 91 / 0.85);
  background:
    linear-gradient(90deg, rgb(232 180 91 / 0.16), transparent 42%),
    rgb(10 16 30 / 0.62);
  transform: translateX(6px) scale(1.01);
}

.lab--cinema .lab-choice input:checked + .lab-choice__body::before,
.lab--cinema .lab-choice input:checked + .lab-choice__body::after,
.lab--cinema .lab-choice--picked .lab-choice__body::before,
.lab--cinema .lab-choice--picked .lab-choice__body::after {
  border-color: rgb(232 180 91);
}

.lab--cinema .lab-choice--picked .lab-choice__meta {
  color: rgb(232 180 91);
}

.lab--cinema .lab-choice--dim {
  pointer-events: none;
}

.lab--cinema .lab-choice--dim .lab-choice__body {
  opacity: 0.28;
  filter: grayscale(0.35);
  transform: none;
}

.lab--cinema .lab-q--locking {
  position: relative;
}

.lab--cinema .lab-q--locking::after {
  content: "";
  position: absolute;
  inset: -8% -4%;
  background: radial-gradient(circle at 40% 45%, rgb(245 242 234 / 0.22), transparent 55%);
  animation: lab-shutter 480ms ease-out both;
  pointer-events: none;
  z-index: 3;
  mix-blend-mode: screen;
}

.lab--cinema .lab-q--active .lab-choice {
  animation: lab-take-in 420ms ease-out both;
}

.lab--cinema .lab-q--active .lab-choice:nth-child(1) { animation-delay: 40ms; }
.lab--cinema .lab-q--active .lab-choice:nth-child(2) { animation-delay: 90ms; }
.lab--cinema .lab-q--active .lab-choice:nth-child(3) { animation-delay: 140ms; }
.lab--cinema .lab-q--active .lab-choice:nth-child(4) { animation-delay: 190ms; }

.lab--cinema .lab-form__go {
  width: 100%;
  justify-content: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

@keyframes lab-take-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes lab-shutter {
  0% { opacity: 0; }
  18% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes lab-reel-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
  .lab--cinema .lab-q--active .lab-choice,
  .lab--cinema .lab-q--locking::after,
  .lab-progress__reel--live::before {
    animation: none !important;
  }
  .lab--cinema .lab-choice:hover .lab-choice__body,
  .lab--cinema .lab-choice input:checked + .lab-choice__body,
  .lab--cinema .lab-choice--picked .lab-choice__body {
    transform: none;
  }
}


/* NEXUS listening chamber */
.lab--signal .lab-progress__reels {
  margin-inline: auto;
  max-width: 12rem;
  gap: 0.55rem;
}

.lab--signal .lab-progress__reel {
  height: 4px;
  border-radius: 999px;
  background: rgb(245 242 234 / 0.1);
}

.lab--signal .lab-progress__label {
  text-align: center;
}

.lab--signal .lab-q legend {
  font-size: clamp(1.85rem, 4vw, 2.5rem);
}

.lab--signal.lab--cinema .lab-choices {
  display: grid;
  justify-items: center;
  margin-top: var(--space-5);
}

.lab--signal.lab--cinema .lab-choice__body {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "meta"
    "key"
    "text"
    "wave";
  gap: 0.65rem;
  padding: 1.75rem 1.8rem 1.4rem;
  min-height: 0;
  border: 0;
  border-radius: 999px 999px 2.5rem 2.5rem;
  background:
    radial-gradient(ellipse 80% 70% at 50% 20%, rgb(79 214 163 / 0.1), transparent 55%),
    radial-gradient(ellipse 90% 80% at 50% 100%, rgb(232 180 91 / 0.08), transparent 50%),
    rgb(4 10 22 / 0.55);
  box-shadow:
    0 0 0 1px rgb(245 242 234 / 0.12),
    0 0 0 8px rgb(79 214 163 / 0.04),
    0 28px 70px rgb(0 0 0 / 0.4);
  backdrop-filter: blur(14px) saturate(1.15);
  text-align: center;
  justify-items: center;
  overflow: visible;
  position: relative;
}

.lab--signal.lab--cinema .lab-choice__body::before,
.lab--signal.lab--cinema .lab-choice__body::after {
  content: none;
}

.lab--signal .lab-choice__meta {
  grid-area: meta;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgb(79 214 163 / 0.1);
  color: rgb(143 240 201 / 0.9);
  letter-spacing: 0.18em;
  font-size: 0.68rem;
  min-height: 0;
}

.lab--signal .lab-choice__key {
  grid-area: key;
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  line-height: 1.12;
  padding: 0;
  text-wrap: balance;
}

.lab--signal .lab-choice__text {
  grid-area: text;
  max-width: 26rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgb(220 226 236 / 0.9);
  text-wrap: pretty;
}

.lab--signal .lab-choice:hover .lab-choice__body {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgb(232 180 91 / 0.28),
    0 0 0 10px rgb(232 180 91 / 0.05),
    0 32px 80px rgb(0 0 0 / 0.45);
}

.lab--signal .lab-choice--picked .lab-choice__body {
  background:
    radial-gradient(ellipse 80% 70% at 50% 18%, rgb(232 180 91 / 0.18), transparent 55%),
    rgb(8 14 28 / 0.7);
  box-shadow:
    0 0 0 1px rgb(232 180 91 / 0.55),
    0 0 0 12px rgb(232 180 91 / 0.08),
    0 28px 70px rgb(0 0 0 / 0.5);
}

.lab--signal .lab-choice--picked .lab-choice__key {
  text-shadow: none;
  animation: none;
}

.lab--signal .lab-signal-nav {
  justify-items: center;
  width: min(100%, 28rem);
  margin-inline: auto;
}

.lab--signal .lab-form__go {
  border-radius: 999px;
  max-width: 22rem;
  margin-inline: auto;
}

.lab--signal .lab__aside {
  font-style: italic;
  color: rgb(143 240 201 / 0.75);
}

.lab--signal .lab__plate-credit::before {
  content: "listening · ";
  color: rgb(79 214 163 / 0.7);
}

/* Smooth chamber controls */
.lab--signal .lab-choices--stage {
  position: relative;
  display: grid;
  justify-items: center;
  min-height: 13.5rem;
  margin-top: var(--space-5);
}

.lab--signal .lab-choices--stage .lab-choice {
  grid-area: 1 / 1;
  width: min(100%, 34rem);
  transition: opacity 280ms ease, transform 280ms ease, filter 280ms ease;
}

.lab--signal .lab-choices--stage .lab-choice--away {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.97);
  filter: blur(1px);
  visibility: hidden;
}

.lab--signal .lab-choices--stage .lab-choice--focus {
  opacity: 1;
  transform: none;
  filter: none;
  visibility: visible;
  z-index: 1;
}

.lab--signal .lab-choice--in-right .lab-choice__body {
  animation: lab-soft-in-right 280ms ease both;
}

.lab--signal .lab-choice--in-left .lab-choice__body {
  animation: lab-soft-in-left 280ms ease both;
}

.lab--signal.lab--cinema .lab-choice__body {
  animation: none;
}

.lab--signal .lab-choice--picked .lab-choice__body {
  animation: lab-soft-hold 380ms ease both;
  transform: none;
}

.lab--signal .lab-choice--picked .lab-choice__key {
  animation: none;
  text-shadow: none;
}

.lab--signal .lab-signal-nav {
  gap: var(--space-4);
  width: min(100%, 34rem);
  margin-top: var(--space-2);
}

.lab--signal .lab-form__go {
  width: 100%;
  max-width: 34rem;
  min-height: 3.4rem;
  font-size: 0.95rem;
  padding: 1rem 1.5rem;
}

.lab--signal .lab-q--holding .lab-choice--focus .lab-choice__body {
  box-shadow:
    0 0 0 1px rgb(232 180 91 / 0.55),
    0 0 0 14px rgb(232 180 91 / 0.08),
    0 28px 70px rgb(0 0 0 / 0.45);
}

@keyframes lab-soft-in-right {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes lab-soft-in-left {
  from { opacity: 0; transform: translateX(-18px); }
  to { opacity: 1; transform: none; }
}

@keyframes lab-soft-hold {
  0% { transform: scale(1); }
  45% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .lab--signal .lab-choices--stage .lab-choice,
  .lab--signal .lab-choice--in-right .lab-choice__body,
  .lab--signal .lab-choice--in-left .lab-choice__body,
  .lab--signal .lab-choice--picked .lab-choice__body {
    animation: none !important;
    transition: none !important;
  }
}

/* Story fades for chamber real estate */
.lab--signal .lab__intro {
  margin-bottom: var(--space-4);
  transition: margin 480ms ease;
}

.lab--signal .lab__intro h1 {
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  margin: var(--space-2) 0 var(--space-3);
  transition: font-size 480ms ease, margin 480ms ease, opacity 480ms ease;
}

.lab--signal .lab__story {
  overflow: hidden;
  max-height: 12rem;
  opacity: 1;
  transition: max-height 560ms ease, opacity 480ms ease, margin 480ms ease, transform 480ms ease;
  transform: translateY(0);
}

.lab--signal.lab--immersed .lab__intro {
  margin-bottom: var(--space-2);
}

.lab--signal.lab--immersed .lab__intro h1 {
  font-size: clamp(1.35rem, 2.8vw, 1.75rem);
  margin: var(--space-1) 0 0;
  opacity: 0.72;
}

.lab--signal.lab--immersed .lab__eyebrow {
  opacity: 0.55;
}

.lab--signal.lab--immersed .lab__story {
  max-height: 0;
  opacity: 0;
  margin: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

.lab--signal.lab--immersed .lab-form {
  margin-top: var(--space-2);
}

.lab--signal.lab--immersed .lab-choices--stage {
  min-height: 14.5rem;
}

@media (prefers-reduced-motion: reduce) {
  .lab--signal .lab__intro,
  .lab--signal .lab__intro h1,
  .lab--signal .lab__story {
    transition: none;
  }
}

/* Simple Lab — calm stepped quiz */
.lab--simple .lab__letterbox,
.lab--simple .lab__poster-grain {
  display: none !important;
}

.lab--simple .lab__poster-veil {
  background:
    radial-gradient(ellipse 60% 55% at 50% 35%, transparent 0%, rgb(2 5 12 / 0.35) 55%, rgb(2 5 12 / 0.82) 100%),
    linear-gradient(180deg, rgb(2 5 12 / 0.35) 0%, rgb(2 5 12 / 0.25) 40%, rgb(2 5 12 / 0.9) 100%);
}

.lab--simple .lab__inner {
  width: min(36rem, calc(100% - 2 * var(--gutter)));
  padding-top: clamp(1.75rem, 4vw, 3rem);
}

.lab--simple .lab__intro {
  margin-bottom: var(--space-4);
}

.lab--simple .lab__intro h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  margin: var(--space-2) 0 var(--space-3);
  opacity: 1;
}

.lab--simple .lab__story {
  max-height: none;
  opacity: 1;
  transform: none;
}

.lab--simple .lab__story .lead {
  font-size: 1rem;
  max-width: 28rem;
  margin-inline: auto;
  color: rgb(220 226 236 / 0.85);
}

.lab--simple .lab-progress {
  margin-bottom: var(--space-4);
}

.lab--simple .lab-progress__reels {
  margin-inline: auto;
  max-width: 10rem;
}

.lab--simple .lab-progress__label {
  text-align: center;
  color: rgb(232 180 91 / 0.9);
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: none;
}

.lab--simple .lab-form--stepped .lab-q:not(.lab-q--active) {
  display: none;
}

.lab--simple .lab-q {
  text-align: center;
}

.lab--simple .lab-q legend {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  margin-bottom: var(--space-2);
}

.lab--simple .lab-q__prompt {
  font-size: 1rem;
  max-width: 28rem;
  margin: 0 auto var(--space-4);
  color: rgb(220 226 236 / 0.88);
}

.lab--simple .lab-choices,
.lab--simple .lab-choices--stage {
  display: grid;
  gap: 0.65rem;
  margin-top: 0;
  min-height: 0;
  position: static;
  justify-items: stretch;
}

.lab--simple .lab-choice {
  width: 100%;
  grid-area: auto;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  filter: none !important;
  pointer-events: auto !important;
}

.lab--simple .lab-choice__body,
.lab--simple.lab--cinema .lab-choice__body {
  display: grid;
  grid-template-columns: 2rem 1fr;
  grid-template-areas:
    "meta key"
    "meta text";
  column-gap: 0.85rem;
  row-gap: 0.2rem;
  align-items: start;
  text-align: left;
  justify-items: stretch;
  padding: 1rem 1.1rem;
  min-height: 0;
  border-radius: 12px;
  border: 1px solid rgb(245 242 234 / 0.16);
  background: rgb(4 10 22 / 0.62);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.25);
  backdrop-filter: blur(10px);
  animation: none !important;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.lab--simple .lab-choice__body::before,
.lab--simple .lab-choice__body::after {
  content: none !important;
}

.lab--simple .lab-choice__meta {
  grid-area: meta;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-top: 0.15rem;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: rgb(232 180 91 / 0.14);
  color: rgb(232 180 91);
  font-size: 0.75rem;
  letter-spacing: 0;
  min-height: 0;
}

.lab--simple .lab-choice__key {
  grid-area: key;
  font-size: 1.15rem;
  padding: 0;
  line-height: 1.25;
}

.lab--simple .lab-choice__text {
  grid-area: text;
  font-size: 0.92rem;
  max-width: none;
  color: rgb(196 204 218 / 0.92);
}

.lab--simple .lab-choice:hover .lab-choice__body {
  border-color: rgb(232 180 91 / 0.45);
  background: rgb(10 18 34 / 0.72);
  transform: translateY(-1px);
}

.lab--simple .lab-choice input:focus-visible + .lab-choice__body {
  outline: 2px solid rgb(232 180 91 / 0.7);
  outline-offset: 2px;
}

.lab--simple .lab-choice--picked .lab-choice__body,
.lab--simple .lab-choice input:checked + .lab-choice__body {
  border-color: rgb(232 180 91 / 0.85);
  background:
    linear-gradient(90deg, rgb(232 180 91 / 0.14), transparent 50%),
    rgb(10 18 34 / 0.78);
  box-shadow: 0 0 0 1px rgb(232 180 91 / 0.25);
  transform: none;
  animation: none !important;
}

.lab--simple .lab-form__footer {
  margin-top: var(--space-5);
}

.lab--simple .lab-form__go {
  width: 100%;
  max-width: none;
  min-height: 3.25rem;
  border-radius: 999px;
  font-size: 0.95rem;
}

.lab--simple .lab__aside {
  margin-top: var(--space-4);
  font-size: 0.95rem;
  color: rgb(220 226 236 / 0.7);
}

.lab--simple .lab__plate-credit {
  opacity: 0.55;
}

.lab--simple .lab__plate-credit::before {
  content: "";
}

.lab--js.lab--simple .lab__plate--active img {
  animation: none;
  transform: scale(1.06);
}

/* Lab back control */
.lab--simple .lab-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: var(--space-4) auto 0;
  padding: 0.7rem 1.15rem;
  min-height: 2.75rem;
  border: 1px solid rgb(245 242 234 / 0.22);
  border-radius: 999px;
  background: rgb(4 10 22 / 0.55);
  color: #f5f2ea;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.lab--simple .lab-back:hover {
  border-color: rgb(232 180 91 / 0.55);
  color: rgb(232 180 91);
  background: rgb(10 18 34 / 0.72);
}

.lab--simple .lab-back[hidden] {
  display: none !important;
}

.lab--simple .lab-form__footer {
  display: grid;
  gap: var(--space-3);
}

.lab--simple .lab-form__footer[hidden],
.lab-form--stepped .lab-form__footer[hidden] {
  display: none !important;
}

/* Lab listening handoff */
.lab--simple .lab-form__go {
  position: relative;
  overflow: hidden;
  transition: transform 200ms ease, opacity 200ms ease, filter 200ms ease, box-shadow 200ms ease;
}

.lab--simple .lab-form__go:disabled,
.lab--listening .lab-form__go {
  cursor: wait;
  pointer-events: none;
  transform: scale(0.98);
  box-shadow: 0 0 0 1px rgb(232 180 91 / 0.35), 0 0 28px rgb(232 180 91 / 0.28);
  filter: saturate(1.05);
}

.lab--listening .lab-form__go-label {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.lab--listening .lab-form__go::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / 0.28) 48%, transparent 62%);
  transform: translateX(-120%);
  animation: lab-listen-sheen 1.1s ease-in-out infinite;
}

.lab-wait {
  position: relative;
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: var(--space-3);
  margin: var(--space-4) auto 0;
  padding: clamp(var(--space-5), 6vw, var(--space-7));
  max-width: 28rem;
  text-align: center;
  border: 1px solid rgb(245 242 234 / 0.16);
  border-radius: var(--radius-lg);
  background: rgb(4 8 18 / 0.88);
  box-shadow:
    0 24px 72px rgb(0 0 0 / 0.52),
    inset 0 1px 0 rgb(255 255 255 / 0.06);
  animation: lab-wait-in 420ms ease both;
}

.lab-wait[hidden] {
  display: none !important;
}

.lab-wait__ring {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  border: 1px solid rgb(232 180 91 / 0.35);
  box-shadow:
    0 0 0 8px rgb(232 180 91 / 0.06),
    inset 0 0 24px rgb(79 214 163 / 0.12);
  animation: lab-wait-pulse 1.4s ease-in-out infinite;
}

.lab-wait__eyebrow {
  margin: 0;
  color: rgb(232 180 91 / 0.85);
}

.lab-wait__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  letter-spacing: -0.02em;
}

.lab-wait__line {
  margin: 0;
  max-width: 22rem;
}

.lab-wait--quiet .lab-wait__ring {
  border-color: rgb(79 214 163 / 0.35);
  box-shadow:
    0 0 0 8px rgb(79 214 163 / 0.06),
    inset 0 0 24px rgb(232 180 91 / 0.08);
  animation-duration: 2.2s;
}

.lab-wait--quiet .lab-wait__eyebrow {
  color: rgb(79 214 163 / 0.9);
}

.lab-wait--still .lab-wait__ring,
.lab-wait--longer .lab-wait__ring {
  border-color: rgb(232 180 91 / 0.5);
  box-shadow:
    0 0 0 8px rgb(232 180 91 / 0.1),
    inset 0 0 24px rgb(79 214 163 / 0.16);
}

.lab-wait--longer .lab-wait__ring {
  animation-duration: 1.1s;
}

.lab-result-shell {
  position: relative;
  z-index: 2;
  margin: var(--space-4) auto 0;
  max-width: 22rem;
  scroll-margin-top: clamp(5rem, 10vh, 7rem);
  animation: lab-wait-in 480ms ease both;
}

.lab-result-shell[hidden] {
  display: none !important;
}

.lab-door {
  display: grid;
  justify-items: center;
  gap: var(--space-4);
  padding: clamp(var(--space-5), 5vw, var(--space-6)) var(--space-4);
  border: 1px solid rgb(232 180 91 / 0.18);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 70% 55% at 50% 35%, rgb(232 180 91 / 0.08), transparent 65%),
    rgb(4 8 18 / 0.42);
  box-shadow:
    0 20px 56px rgb(0 0 0 / 0.4),
    inset 0 1px 0 rgb(255 255 255 / 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
  user-select: none;
}

.lab-door__lambda {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3rem);
  line-height: 1;
  color: rgb(232 180 91 / 0.92);
  text-shadow: 0 0 28px rgb(232 180 91 / 0.55);
  animation: lab-door-breathe 2.4s ease-in-out infinite;
}

.lab-door__frame {
  position: relative;
  width: 3.25rem;
  height: 5.5rem;
  border: 1px solid rgb(245 242 234 / 0.16);
  border-radius: 2px;
  background: rgb(2 5 12 / 0.55);
  box-shadow: inset 0 0 24px rgb(0 0 0 / 0.55);
  overflow: hidden;
}

.lab-door__slit {
  position: absolute;
  top: 8%;
  bottom: 8%;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgb(232 180 91 / 0.95) 35%,
    rgb(79 214 163 / 0.75) 65%,
    transparent 100%
  );
  box-shadow:
    0 0 10px rgb(232 180 91 / 0.65),
    0 0 22px rgb(79 214 163 / 0.35);
  animation: lab-door-slit 2.2s ease-in-out infinite;
}

.lab-door__promise {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: rgb(245 242 234 / 0.88);
  text-align: center;
  text-wrap: balance;
}

.lab-door__reels {
  display: flex;
  gap: 0.45rem;
}

.lab-door__reels span {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: rgb(232 180 91 / 0.35);
  box-shadow: 0 0 0 1px rgb(232 180 91 / 0.2);
  animation: lab-door-reel 1.4s ease-in-out infinite;
}

.lab-door__reels span:nth-child(2) { animation-delay: 0.18s; }
.lab-door__reels span:nth-child(3) { animation-delay: 0.36s; }

.lab--quiet .lab-door__lambda {
  color: rgb(79 214 163 / 0.92);
  text-shadow: 0 0 28px rgb(79 214 163 / 0.5);
}

.lab--quiet .lab-door__reels span {
  background: rgb(79 214 163 / 0.45);
  box-shadow: 0 0 0 1px rgb(79 214 163 / 0.25);
}

.lab--quiet .lab-door__slit {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgb(79 214 163 / 0.95) 40%,
    rgb(232 180 91 / 0.55) 70%,
    transparent 100%
  );
  box-shadow:
    0 0 10px rgb(79 214 163 / 0.65),
    0 0 22px rgb(232 180 91 / 0.28);
}

.lab--quiet .lab-door {
  border-color: rgb(79 214 163 / 0.22);
  background:
    radial-gradient(ellipse 70% 55% at 50% 35%, rgb(79 214 163 / 0.08), transparent 65%),
    rgb(4 8 18 / 0.42);
}

.lab--quiet.lab--play .lab__eyebrow,
.lab--quiet.lab--result .lab__eyebrow {
  color: rgb(79 214 163 / 0.92);
}

.lab-result--quiet {
  border-color: rgb(79 214 163 / 0.28);
}

.lab-result--quiet .lab-result__meta {
  color: rgb(79 214 163 / 0.92);
}

.lab-result--quiet .lab-result__meta .lab__glyph {
  text-shadow: 0 0 18px rgb(79 214 163 / 0.45);
}

.lab-result--quiet .lab-result__rule {
  background: linear-gradient(
    90deg,
    transparent,
    rgb(79 214 163 / 0.8),
    transparent
  );
  box-shadow: 0 0 12px rgb(79 214 163 / 0.35);
}

.lab-result--quiet .lab-result__title {
  color: rgb(79 214 163 / 0.85);
}

.lab-live-result[hidden] {
  display: none !important;
}

.lab-live-result,
.lab-live-result .lab-result {
  scroll-margin-top: clamp(5rem, 10vh, 7rem);
}

.lab-live-result .lab-result {
  animation: lab-wait-in 520ms ease both;
}

@keyframes lab-listen-sheen {
  to { transform: translateX(120%); }
}

@keyframes lab-wait-pulse {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes lab-wait-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes lab-door-breathe {
  0%, 100% { opacity: 0.72; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

@keyframes lab-door-slit {
  0%, 100% { opacity: 0.55; transform: translateX(-50%) scaleY(0.88); }
  50% { opacity: 1; transform: translateX(-50%) scaleY(1); }
}

@keyframes lab-door-reel {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  .lab--listening .lab-form__go::after,
  .lab-wait__ring,
  .lab-wait,
  .lab-result-shell,
  .lab-door__lambda,
  .lab-door__slit,
  .lab-door__reels span,
  .lab-live-result .lab-result {
    animation: none !important;
  }
}
