.labs-page {
  color-scheme: dark;
  background: #000;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
}

.lab-sky {
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  height: 100svh;
  pointer-events: none;
  z-index: -1;
}

.lab-main { flex: 1; min-height: 56svh; }

.lab-hero {
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - 76px);
  display: flex;
  align-items: center;
  padding-block: clamp(32px, 5vh, 64px) clamp(56px, 8vh, 96px);
}

.lab-hero-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(36px, 6vh, 68px);
}

.lab-hero-statement {
  max-width: 1020px;
}

.lab-hero h1 {
  margin: 0;
  text-align: left;
  font-family: var(--font-display);
}

.lab-hero-title {
  display: block;
  font-size: clamp(40px, 6.8vw, 94px);
  line-height: 1.02;
  letter-spacing: -.042em;
  font-weight: 520;
  color: #f5f5f7;
}

.lab-hero-halo {
  display: inline-block;
  padding-bottom: .14em;
  margin-bottom: -.14em;
  background: linear-gradient(
    110deg,
    #f5f5f7 0%,
    #e5b8ff 22%,
    #9aa8ff 44%,
    #f5f5f7 66%,
    #c777f0 84%,
    #f5f5f7 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: galactic-text 6s linear infinite;
}

@keyframes galactic-text {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.lab-hero-mission {
  display: block;
  margin-top: clamp(14px, 2vw, 24px);
  font-size: clamp(22px, 3vw, 40px);
  line-height: 1.18;
  letter-spacing: -.028em;
  font-weight: 400;
  color: rgb(245 245 247 / 54%);
}

.lab-hero-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px 32px;
  flex-wrap: wrap;
  padding-top: 22px;
  border-top: 1px solid rgb(255 255 255 / 12%);
}

.lab-hero-dispatch {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  text-decoration: none;
  color: #f5f5f7;
}

.lab-hero-kicker {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgb(245 245 247 / 46%);
}

.lab-hero-dispatch-title {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -.01em;
  color: rgb(245 245 247 / 88%);
  transition: color 160ms ease;
}

.lab-hero-arrow {
  font-size: 14px;
  color: rgb(245 245 247 / 48%);
  transition: transform 160ms ease, color 160ms ease;
}

.lab-hero-dispatch:hover .lab-hero-dispatch-title,
.lab-hero-dispatch:focus-visible .lab-hero-dispatch-title {
  color: #fff;
}

.lab-hero-dispatch:hover .lab-hero-arrow,
.lab-hero-dispatch:focus-visible .lab-hero-arrow {
  color: #fff;
  transform: translateX(3px);
}

.lab-hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.lab-hero-actions a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: rgb(245 245 247 / 64%);
  transition: color 160ms ease;
}

.lab-hero-actions a:hover,
.lab-hero-actions a:focus-visible {
  color: #fff;
}

.lab-hero-meta :focus-visible {
  outline: 2px solid var(--purple-light);
  outline-offset: 4px;
  border-radius: 4px;
}

.lab-page-section {
  padding-block: clamp(56px, 8vh, 108px) clamp(72px, 10vh, 128px);
}

.lab-page-kicker {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgb(245 245 247 / 48%);
}

.lab-page-title {
  margin: 0;
  max-width: 920px;
  font-family: var(--font-display);
  font-size: clamp(34px, 5.2vw, 68px);
  line-height: 1.05;
  letter-spacing: -.038em;
  font-weight: 520;
  color: #f5f5f7;
}

.lab-mission-body {
  margin-top: clamp(28px, 3.8vw, 44px);
  max-width: 680px;
  display: grid;
  gap: 22px;
}

.lab-mission-body p {
  margin: 0;
  font-size: clamp(17px, 1.8vw, 20px);
  line-height: 1.62;
  letter-spacing: -.012em;
  color: rgb(245 245 247 / 74%);
}

.lab-mission-links {
  margin-top: clamp(32px, 4.5vw, 48px);
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.lab-mission-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  color: rgb(245 245 247 / 82%);
  transition: color 160ms ease;
}

.lab-mission-links a:hover,
.lab-mission-links a:focus-visible {
  color: #fff;
}

.lab-customers-header {
  margin-bottom: clamp(40px, 5vw, 64px);
}

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

.lab-review {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 26px;
  border-radius: 16px;
  border: 1px solid rgb(255 255 255 / 10%);
  background: rgb(16 15 20 / 68%);
}

.lab-review-quote {
  margin: 0;
  font-size: 15px;
  line-height: 1.62;
  color: rgb(245 245 247 / 86%);
}

.lab-review-author {
  display: grid;
  gap: 2px;
  padding-top: 16px;
  border-top: 1px solid rgb(255 255 255 / 8%);
}

.lab-review-author strong {
  font-size: 14px;
  font-weight: 600;
  color: #f5f5f7;
}

.lab-review-author span {
  font-size: 13px;
  color: rgb(245 245 247 / 48%);
}

@media (max-width: 960px) {
  .lab-reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .lab-reviews { grid-template-columns: 1fr; }
}

.lab-header {
  position: sticky;
  top: 0;
  z-index: 20;
}

.lab-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: rgb(10 9 12 / 75%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  backdrop-filter: blur(24px) saturate(145%);
}

.lab-nav {
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.lab-nav a { text-decoration: none; }
.lab-brand { justify-self: start; font-size: 22px; font-weight: 750; letter-spacing: -.055em; }
.lab-links { display: flex; align-items: center; gap: 16px; }
.lab-menu-trigger > a, .lab-try { font-size: 14px; font-weight: 600; padding: 12px; }
.lab-menu-trigger > a:hover { color: var(--purple-light); }

.lab-try {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  white-space: nowrap;
  color: #fff;
  padding-inline: 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background-color: transparent;
}

.lab-try::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    110deg,
    #f5f5f7 0%,
    #e5b8ff 22%,
    #9aa8ff 44%,
    #f5f5f7 66%,
    #c777f0 84%,
    #f5f5f7 100%
  );
  background-size: 200% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: galactic-text 6s linear infinite;
}

.lab-menu { position: relative; --panel-gap: 14px; }

.lab-menu:has(.lab-panel:not([hidden]))::after {
  content: "";
  position: absolute;
  top: 100%;
  inset-inline: 0;
  height: var(--panel-gap);
}
.lab-menu-trigger { display: flex; align-items: center; border-radius: 999px; }
.lab-menu:has(.lab-panel:not([hidden])) .lab-menu-trigger { background: #ffffff12; }
.lab-menu-trigger > a { padding-right: 4px; }
.lab-menu button {
  width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  border-radius: 999px;
}

.lab-menu button { display: grid; place-items: center; }
.menu-chevron { display: block; flex: none; transition: transform 160ms ease; }
.lab-menu button[aria-expanded="true"] .menu-chevron,
.archive-popover[open] > summary .menu-chevron { transform: rotate(180deg); }

.lab-panel {
  position: absolute;
  top: calc(100% + var(--panel-gap));
  left: 0;
  width: 244px;
  padding: 16px;
  border-radius: 18px;
  background: rgb(12 11 15 / 72%);
  -webkit-backdrop-filter: blur(26px) saturate(135%);
  backdrop-filter: blur(26px) saturate(135%);
  box-shadow: 0 14px 42px #0009;
  opacity: 1;
  scale: 1;
  transform-origin: top center;
  transition: opacity 150ms ease, scale 180ms cubic-bezier(.2, .75, .35, 1),
    visibility 0s;
}

.lab-panel[hidden] {
  display: block;
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  scale: .97;
  transition: opacity 130ms ease, scale 150ms ease, visibility 0s 150ms;
}

.lab-panel p { margin: 2px 10px 8px; color: var(--muted); font-size: 13px; }
.lab-panel a { display: block; padding: 10px; border-radius: 8px; }
.lab-panel a:hover, .lab-panel a:focus-visible { background: #ffffff12; }
.lab-nav :focus-visible { outline: 2px solid var(--purple-light); outline-offset: 2px; }
.labs-page > .site-footer { position: relative; }

@media (max-width: 640px) {
  .lab-nav { grid-template-columns: 1fr auto; gap: 0 12px; min-height: 64px; padding-block: 8px; }
  .lab-links { display: none; }
  .lab-try { grid-row: 1; grid-column: 2; }
}

/* Flagship Frontier Model System Card (New Space Design) */
.deus-page .lab-sky {
  position: fixed;
  height: 100lvh;
}

.deus-main {
  padding-block: clamp(44px, 6vh, 84px) clamp(72px, 10vh, 128px);
}

.deus-article {
  max-width: 860px;
}

.deus-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 32px;
  font-size: 14px;
  font-weight: 500;
  color: rgb(245 245 247 / 60%);
  text-decoration: none;
  transition: color 150ms ease;
}

.deus-back:hover { color: #fff; }

.deus-meta {
  margin: 0 0 14px;
  font-size: 13px;
  color: rgb(245 245 247 / 54%);
  letter-spacing: .01em;
}

.deus-article code {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  font-size: .88em;
  color: #f5f5f7;
  background: rgb(255 255 255 / 7%);
  padding: 2px 7px;
  border-radius: 6px;
}

.deus-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(46px, 7.2vw, 88px);
  line-height: 1.02;
  letter-spacing: -.042em;
  font-weight: 560;
}

.deus-subtitle {
  margin: 20px 0 0;
  max-width: 720px;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.55;
  letter-spacing: -.012em;
  color: rgb(245 245 247 / 80%);
}

.deus-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 36px 0 28px;
}

.deus-stat {
  padding: 20px 18px;
  border-radius: 18px;
  border: 1px solid rgb(255 255 255 / 10%);
  background: rgb(12 11 16 / 74%);
}

.deus-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 36px);
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 8px;
}

.deus-stat span {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: rgb(245 245 247 / 62%);
}

.deus-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 0 0 56px;
}

.deus-toc a {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 12%);
  background: rgb(12 11 16 / 64%);
  color: rgb(245 245 247 / 82%);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 150ms ease, color 150ms ease;
}

.deus-toc a:hover {
  border-color: rgb(199 119 240 / 55%);
  color: #fff;
}

.deus-section {
  margin-top: 64px;
  scroll-margin-top: 96px;
}

.deus-section h2 {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.8vw, 42px);
  line-height: 1.12;
  letter-spacing: -.032em;
  font-weight: 540;
}

.deus-section p {
  margin: 0 0 20px;
  font-size: 17px;
  line-height: 1.72;
  color: rgb(245 245 247 / 86%);
}

.deus-section a {
  color: #e5b8ff;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.deus-lead {
  font-size: clamp(19px, 2vw, 21px);
  line-height: 1.64;
  color: #f5f5f7;
}

.deus-callout {
  margin: 24px 0;
  padding: 22px 24px;
  border-radius: 18px;
  border: 1px solid rgb(255 255 255 / 12%);
  background: rgb(14 13 18 / 76%);
}

.deus-callout.is-alert {
  border-color: rgb(199 119 240 / 38%);
  background: rgb(22 14 30 / 76%);
}

.deus-callout > strong {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  color: #f5f5f7;
}

.deus-callout p:last-child { margin-bottom: 0; }

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

.deus-card {
  padding: 22px;
  border-radius: 18px;
  border: 1px solid rgb(255 255 255 / 10%);
  background: rgb(12 11 16 / 72%);
}

.deus-card h3 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 600;
  color: #f5f5f7;
}

.deus-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.62;
  color: rgb(245 245 247 / 74%);
}

.deus-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 28px 0 32px;
  padding: 24px;
  border-radius: 20px;
  border: 1px solid rgb(255 255 255 / 10%);
  background: rgb(12 11 16 / 74%);
}

.deus-bars-title {
  margin: 0 0 4px !important;
  font-size: 13px !important;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgb(245 245 247 / 56%) !important;
}

.deus-bar-row { display: flex; flex-direction: column; gap: 7px; }
.deus-bar-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.deus-bar-label strong { color: #f5f5f7; font-weight: 600; }
.deus-bar-label span { font-size: 13px; color: rgb(245 245 247 / 62%); font-variant-numeric: tabular-nums; }

.deus-bar-track {
  position: relative;
  height: 9px;
  border-radius: 999px;
  background: rgb(255 255 255 / 8%);
  overflow: hidden;
}

.deus-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #9aa8ff, #c777f0, #f5f5f7);
}

.deus-bar-prev {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  border-radius: 999px;
  background: rgb(255 255 255 / 34%);
  border-right: 2px solid #000;
}

.deus-table-wrap {
  margin: 24px 0 14px;
  border-radius: 18px;
  border: 1px solid rgb(255 255 255 / 10%);
  background: rgb(12 11 16 / 78%);
  overflow-x: auto;
}

.deus-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  font-size: 14.5px;
}

.deus-table th,
.deus-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid rgb(255 255 255 / 7%);
  color: rgb(245 245 247 / 86%);
}

.deus-table thead th {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgb(245 245 247 / 54%);
  border-bottom-color: rgb(255 255 255 / 14%);
}

.deus-table tbody tr:last-child td { border-bottom: 0; }
.deus-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.deus-table .col-deus { background: rgb(199 119 240 / 8%); font-weight: 600; color: #f5f5f7; }
.deus-table .col-deus.is-win { color: #e5b8ff; }

.deus-note {
  font-size: 13.5px !important;
  color: rgb(245 245 247 / 52%) !important;
}

.deus-transcript {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.deus-turn {
  border-radius: 18px;
  border: 1px solid rgb(255 255 255 / 10%);
  background: rgb(12 11 16 / 74%);
  overflow: hidden;
}

.deus-msg {
  padding: 20px 24px;
}

.deus-msg + .deus-msg {
  border-top: 1px solid rgb(255 255 255 / 8%);
}

.deus-msg.is-deus {
  background: rgb(165 72 219 / 5%);
}

.deus-role {
  display: block;
  margin-bottom: 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgb(245 245 247 / 48%);
}

.deus-msg.is-deus .deus-role {
  color: #e5b8ff;
}

.deus-msg p {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.68;
  color: #f5f5f7;
}

.deus-msg p:last-child { margin-bottom: 0; }

@media (max-width: 820px) {
  .deus-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .deus-grid-2 { grid-template-columns: 1fr; }
  .deus-msg { padding: 16px 18px; }
}

.deus-code-wrap {
  margin-top: 24px;
  border-radius: 18px;
  border: 1px solid rgb(255 255 255 / 12%);
  background: rgb(10 9 14 / 86%);
  overflow: hidden;
}

.deus-code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid rgb(255 255 255 / 9%);
  background: rgb(255 255 255 / 3%);
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  color: rgb(245 245 247 / 62%);
}

.deus-copy-btn {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 16%);
  background: transparent;
  color: #f5f5f7;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease;
}

.deus-copy-btn:hover {
  border-color: rgb(199 119 240 / 65%);
  color: #e5b8ff;
}

.deus-code {
  margin: 0;
  padding: 20px 22px;
  overflow-x: auto;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.62;
  color: rgb(245 245 247 / 88%);
}

.deus-code code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  color: inherit;
}

@media (prefers-reduced-transparency: reduce) {
  .lab-header::before, .lab-panel { background: #111014; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lab-panel, .lab-panel[hidden] { transition: none; scale: 1; }
  .menu-chevron, .lab-try { transition: none; }
  .lab-hero-halo, .lab-try::before { animation: none; }
}
