* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  background: #071018;
  color: #e8fbff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background:
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px),
    radial-gradient(circle at 16% 0%, rgba(30, 226, 255, .13), transparent 34rem),
    radial-gradient(circle at 82% 8%, rgba(255, 220, 120, .07), transparent 30rem),
    #071018;
  background-size: 32px 32px, 32px 32px, auto, auto, auto;
}

a {
  color: #62e8ff;
}

button {
  min-height: 42px;
  border: 1px solid rgba(98, 230, 255, .36);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(20, 198, 232, .28), rgba(7, 82, 110, .28));
  color: #effeff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 10px 14px;
}

button:hover,
button:focus-visible {
  border-color: rgba(98, 230, 255, .78);
}

h1,
h2,
h3,
p,
li,
span,
strong {
  overflow-wrap: anywhere;
}

.lab-page {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 34px 0 46px;
}

.lab-hero,
.tool-panel,
.info-card,
.related-section,
.comments-wrap {
  border: 1px solid rgba(111, 228, 255, .18);
  border-radius: 14px;
  background: rgba(8, 20, 28, .78);
  box-shadow: 0 0 38px rgba(0, 216, 255, .08);
}

.lab-hero {
  padding: clamp(26px, 5vw, 56px);
}

.eyebrow {
  margin: 0 0 9px;
  color: #6befff;
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.05rem, 7vw, 4.8rem);
  letter-spacing: 0;
  line-height: 1.06;
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(1.15rem, 3vw, 1.7rem);
}

.lead {
  max-width: 820px;
  margin: 18px 0 0;
  color: rgba(231, 251, 255, .82);
  line-height: 1.85;
}

.hero-actions,
.control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions {
  margin-top: 20px;
}

.primary-link,
.ghost-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border-radius: 10px;
  padding: 10px 14px;
  text-decoration: none;
  font-weight: 800;
}

.primary-link {
  border: 1px solid rgba(98, 230, 255, .45);
  background: rgba(16, 153, 185, .26);
  color: #effeff;
}

.ghost-link {
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .05);
  color: #dffcff;
}

.tool-panel {
  margin-top: 20px;
  padding: clamp(18px, 4vw, 32px);
}

.section-head p,
.status-message {
  color: rgba(231, 251, 255, .76);
  line-height: 1.7;
}

.control-row {
  margin: 16px 0;
}

.command-button.secondary {
  background: rgba(255, 255, 255, .05);
}

.screen-stage {
  position: relative;
  min-height: min(62vh, 520px);
  overflow: hidden;
  border: 1px solid rgba(111, 228, 255, .22);
  border-radius: 12px;
  background: #111;
  isolation: isolate;
}

.screen-stage:fullscreen {
  border: 0;
  border-radius: 0;
}

.stage-label {
  position: absolute;
  z-index: 3;
  left: 12px;
  bottom: 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .62);
  color: #fff;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  padding: 8px 11px;
}

.motion-track {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 24px),
    #070707;
}

.motion-object {
  position: absolute;
  top: 28%;
  left: -60%;
  display: flex;
  align-items: center;
  gap: 20px;
  width: 58%;
  min-width: 280px;
  color: #fff;
  font-size: clamp(1.8rem, 7vw, 4.2rem);
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
  animation: move-horizontal var(--motion-speed, 4s) linear infinite;
}

.motion-bar {
  width: 96px;
  height: 54px;
  background: linear-gradient(90deg, #fff, #1de9ff);
  box-shadow: 0 0 24px rgba(29, 233, 255, .44);
}

.motion-stage.is-light .motion-track {
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .08) 0 1px, transparent 1px 24px),
    #efefef;
}

.motion-stage.is-light .motion-object {
  color: #111;
}

@keyframes move-horizontal {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(280%);
  }
}

.banding-stage.is-horizontal {
  background: linear-gradient(90deg, #000, #fff);
}

.banding-stage.is-vertical {
  background: linear-gradient(180deg, #000, #fff);
}

.banding-stage.is-rgb.is-horizontal {
  background: linear-gradient(90deg, #000, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #fff);
}

.banding-stage.is-rgb.is-vertical {
  background: linear-gradient(180deg, #000, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #fff);
}

.banding-stage.is-warm.is-horizontal {
  background: linear-gradient(90deg, #150800, #7b2100, #f0a13a, #fff1cc);
}

.banding-stage.is-warm.is-vertical {
  background: linear-gradient(180deg, #150800, #7b2100, #f0a13a, #fff1cc);
}

.banding-stage.is-cool.is-horizontal {
  background: linear-gradient(90deg, #030819, #173c75, #36bcdf, #f2ffff);
}

.banding-stage.is-cool.is-vertical {
  background: linear-gradient(180deg, #030819, #173c75, #36bcdf, #f2ffff);
}

.uniformity-stage {
  background: #777;
}

.uniformity-stage.is-white {
  background: #fff;
}

.uniformity-stage.is-gray {
  background: #777;
}

.uniformity-stage.is-black {
  background: #000;
}

.uniformity-stage.is-red {
  background: #d71920;
}

.uniformity-stage.is-green {
  background: #00a651;
}

.uniformity-stage.is-blue {
  background: #005bff;
}

.uniformity-stage.is-pale {
  background: #e8fff5;
}

.uniformity-guide {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .16) 1px, transparent 1px);
  background-size: 25% 25%;
  mix-blend-mode: difference;
  opacity: .34;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}

.chip-row button.is-active {
  border-color: rgba(255, 226, 138, .82);
  box-shadow: 0 0 0 2px rgba(255, 226, 138, .12);
}

.color-button[data-color="white"] {
  background: #fff;
  color: #111;
}

.color-button[data-color="gray"] {
  background: #777;
}

.color-button[data-color="black"] {
  background: #000;
}

.color-button[data-color="red"] {
  background: #d71920;
}

.color-button[data-color="green"] {
  background: #00a651;
}

.color-button[data-color="blue"] {
  background: #005bff;
}

.color-button[data-color="pale"] {
  background: #e8fff5;
  color: #123;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.info-card,
.related-section,
.comments-wrap {
  padding: clamp(18px, 3vw, 26px);
}

.info-card p,
.info-card li {
  color: rgba(231, 251, 255, .77);
  line-height: 1.8;
}

.related-section {
  margin-top: 18px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.related-grid a {
  display: block;
  min-width: 0;
  border: 1px solid rgba(111, 228, 255, .17);
  border-radius: 10px;
  background: rgba(3, 13, 18, .75);
  color: #e8fbff;
  padding: 13px;
  text-decoration: none;
}

.related-grid strong,
.related-grid span {
  display: block;
}

.related-grid span {
  margin-top: 5px;
  color: rgba(231, 251, 255, .62);
  line-height: 1.5;
}

.comments-wrap {
  margin-top: 18px;
}

.app-comments,
.app-comment-form-section {
  border: 1px solid rgba(112, 220, 240, .22) !important;
  background: rgba(6, 18, 24, .92) !important;
  color: #e8fbff !important;
}

.app-comment-form input,
.app-comment-form textarea,
.app-comment-form select {
  border: 1px solid rgba(112, 220, 240, .28) !important;
  background: rgba(3, 10, 14, .9) !important;
  color: #e8fbff !important;
}

.return-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: min(760px, 100%);
  margin: 18px auto 0;
}

.site-return,
.mothership-link {
  border-radius: 10px;
  padding: 15px;
  text-align: center;
}

.site-return {
  border: 1px solid rgba(111, 228, 255, .17);
  background: rgba(6, 18, 24, .72);
}

.mothership-link {
  border: 1px solid rgba(255, 216, 112, .18);
  background: rgba(20, 18, 11, .55);
}

.site-return span,
.mothership-link span {
  display: block;
  color: #6befff;
  font-size: .72rem;
  letter-spacing: .12em;
}

.site-return a,
.mothership-link a {
  display: inline-block;
  margin-top: 4px;
  font-weight: 800;
}

.site-return p,
.mothership-link p {
  margin: 5px 0 0;
  color: rgba(231, 251, 255, .62);
  font-size: .84rem;
}

@media (max-width: 820px) {
  .info-grid,
  .return-links {
    grid-template-columns: 1fr;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .lab-page {
    width: min(100% - 18px, 1120px);
    padding-top: 18px;
  }

  .lab-hero,
  .tool-panel,
  .info-card,
  .related-section,
  .comments-wrap {
    border-radius: 10px;
  }

  .screen-stage {
    min-height: 300px;
  }

  .motion-object {
    min-width: 230px;
    width: 70%;
  }
}
