:root {
  color-scheme: dark;
  --carbon: #0a0d0c;
  --carbon-soft: #111512;
  --chalk: #f2f0e8;
  --acid: #c7ff3e;
  --smoke: #8a8f89;
  --outline: rgb(242 240 232 / 74%);
  --line: rgb(242 240 232 / 20%);
  --display: "Avenir Next Condensed", "DIN Condensed", "Avenir Next", sans-serif;
  --body: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  --header-height: 112px;
  --page-x: clamp(24px, 5vw, 80px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-fw-theme="luckin"] {
  color-scheme: light;
  --carbon: #f5f7ff;
  --carbon-soft: #ffffff;
  --chalk: #111827;
  --acid: #1b4dff;
  --smoke: #68748a;
  --outline: rgb(17 24 39 / 58%);
  --line: rgb(27 77 255 / 15%);
}

:root[data-fw-theme="oat"] {
  color-scheme: light;
  --carbon: #f6f1e8;
  --carbon-soft: #fffdf8;
  --chalk: #292721;
  --acid: #315ed6;
  --smoke: #756f64;
  --outline: rgb(41 39 33 / 58%);
  --line: rgb(49 94 214 / 15%);
}

:root[data-fw-theme="midnight"] {
  color-scheme: dark;
  --carbon: #07101f;
  --carbon-soft: #0d1a2e;
  --chalk: #f2f6ff;
  --acid: #6290ff;
  --smoke: #97a7c2;
  --outline: rgb(242 246 255 / 70%);
  --line: rgb(98 144 255 / 20%);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--carbon);
}

body {
  min-width: 320px;
  overflow: hidden;
  color: var(--chalk);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

button,
a {
  color: inherit;
}

button {
  font: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 5px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-160%);
  background: var(--acid);
  color: var(--carbon);
  font-family: var(--mono);
  font-size: 12px;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

#physics-world,
.field-shade,
.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#physics-world {
  z-index: 0;
  opacity: 0.9;
  transition: opacity 700ms var(--ease-out), filter 700ms var(--ease-out);
}

.field-shade {
  z-index: 1;
  background:
    linear-gradient(90deg, rgb(10 13 12 / 86%) 0, rgb(10 13 12 / 45%) 36%, transparent 68%),
    linear-gradient(0deg, rgb(10 13 12 / 55%) 0, transparent 42%);
  transition: background 700ms var(--ease-out);
}

.grain {
  z-index: 2;
  opacity: 0.11;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.44'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

body.is-reading #physics-world {
  opacity: 0.28;
  filter: blur(2px);
}

body.is-reading .field-shade {
  background: rgb(10 13 12 / 84%);
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--page-x);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: block;
  width: 48px;
  line-height: 0;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.tabs {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 48px);
}

.tab {
  position: relative;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--smoke);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 220ms ease;
}

.tab::after {
  position: absolute;
  right: 0;
  bottom: 5px;
  left: 0;
  height: 2px;
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  background: var(--acid);
  transition: transform 320ms var(--ease-out);
}

.tab:hover,
.tab.is-active {
  color: var(--chalk);
}

.tab.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.site-main {
  position: fixed;
  z-index: 10;
  inset: var(--header-height) 0 48px;
}

.panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 480ms var(--ease-out), transform 480ms var(--ease-out);
}

.panel[hidden] {
  display: none;
}

.panel.is-active {
  opacity: 1;
  transform: translateY(0);
}

.lab-panel {
  padding: clamp(32px, 6vw, 96px) var(--page-x);
}

.hero-copy {
  position: absolute;
  bottom: clamp(84px, 12vh, 148px);
  left: var(--page-x);
  max-width: min(780px, 72vw);
}

.kicker {
  margin: 0 0 18px;
  color: var(--acid);
  font-family: var(--mono);
  font-size: clamp(10px, 0.8vw, 12px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1,
.contact-copy h1,
.reading-header h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(64px, 9.4vw, 164px);
  font-stretch: condensed;
  font-weight: 600;
  letter-spacing: -0.065em;
  line-height: 0.76;
  text-wrap: balance;
  text-transform: uppercase;
}

.hero-copy h1 span {
  color: transparent;
  -webkit-text-stroke: 1px var(--outline);
}

.hero-note {
  max-width: 380px;
  margin: 28px 0 0 3px;
  color: var(--smoke);
  font-size: clamp(14px, 1.1vw, 17px);
  line-height: 1.55;
  text-wrap: pretty;
}

.experiment-console {
  position: absolute;
  right: var(--page-x);
  bottom: clamp(72px, 10vh, 120px);
  display: grid;
  width: clamp(208px, 20vw, 286px);
  gap: 20px;
}

.experiment-readout {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#scene-index {
  color: var(--acid);
}

.readout-line {
  height: 1px;
  overflow: hidden;
  background: var(--line);
}

.readout-line::after {
  display: block;
  width: 42%;
  height: 100%;
  content: "";
  animation: scan 10s linear infinite;
  background: var(--acid);
}

.motion-toggle {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.motion-toggle:hover {
  color: var(--acid);
}

.motion-icon {
  width: 12px;
  height: 12px;
  border: 1px solid currentColor;
}

.motion-toggle[aria-pressed="true"] .motion-icon {
  border: 0;
  background: var(--acid);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.reading-panel {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--acid) transparent;
}

.reading-shell {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: clamp(56px, 10vw, 180px);
  width: min(1280px, calc(100% - 2 * var(--page-x)));
  margin: 0 auto;
  padding: clamp(72px, 10vh, 128px) 0 140px;
}

.reading-header {
  position: sticky;
  top: 72px;
  align-self: start;
}

.reading-header > p:first-child,
.effective-date {
  margin: 0 0 28px;
  color: var(--smoke);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.reading-header h1 {
  font-size: clamp(58px, 6.8vw, 108px);
}

.effective-date {
  margin: 36px 0 0;
}

.policy-copy {
  padding-top: 3px;
}

.policy-lead {
  margin: 0 0 72px;
  color: var(--chalk);
  font-size: clamp(23px, 2.2vw, 34px);
  line-height: 1.32;
  letter-spacing: -0.025em;
  text-wrap: pretty;
}

.policy-copy section {
  display: grid;
  grid-template-columns: minmax(130px, 0.4fr) 1fr;
  gap: 32px;
  padding: 27px 0 34px;
  border-top: 1px solid var(--line);
}

.policy-copy h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
}

.policy-copy p {
  margin: 0;
  color: #b6bab4;
  font-size: 15px;
  line-height: 1.75;
  text-wrap: pretty;
}

.policy-copy a {
  text-decoration-color: var(--acid);
  text-underline-offset: 4px;
}

.contact-panel {
  display: grid;
  align-items: center;
  padding: 0 var(--page-x);
}

.contact-copy {
  margin-top: -2vh;
}

.contact-copy h1 {
  font-size: clamp(72px, 10.5vw, 170px);
}

.contact-copy > p:not(.kicker) {
  margin: 32px 0 0;
  color: var(--smoke);
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.6;
}

.email-link {
  display: grid;
  grid-template-columns: 1fr auto;
  width: min(680px, 82vw);
  align-items: center;
  margin-top: clamp(40px, 7vh, 76px);
  padding: 18px 0;
  border-top: 1px solid var(--chalk);
  border-bottom: 1px solid var(--chalk);
  font-family: var(--mono);
  font-size: clamp(16px, 2vw, 28px);
  letter-spacing: -0.03em;
  text-decoration: none;
  transition: color 220ms ease, padding 320ms var(--ease-out);
}

.email-link svg {
  width: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-width: 1.5;
}

.email-link:hover {
  padding-right: 10px;
  padding-left: 10px;
  color: var(--acid);
}

.site-footer {
  position: fixed;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--page-x);
  border-top: 1px solid var(--line);
  color: var(--smoke);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@keyframes scan {
  from { transform: translateX(-100%); }
  to { transform: translateX(340%); }
}

@media (max-width: 800px) {
  :root {
    --header-height: 80px;
    --page-x: clamp(20px, 6vw, 32px);
  }

  html {
    overflow-x: hidden;
    overflow-y: auto;
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
  }

  body {
    min-height: 100%;
    overflow: visible;
    touch-action: pan-y;
    overscroll-behavior-y: contain;
  }

  .site-header {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: clamp(18px, 6vw, 36px);
    padding: 0 var(--page-x);
    background: linear-gradient(180deg, rgb(10 13 12 / 96%), rgb(10 13 12 / 78%));
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }

  .brand {
    width: 38px;
  }

  .tabs {
    --active-tab: 0;
    position: relative;
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
  }

  .tabs::after {
    position: absolute;
    right: auto;
    bottom: 0;
    left: 0;
    width: calc(100% / 3);
    height: 2px;
    content: "";
    transform: translateX(calc(var(--active-tab) * 100%));
    background: var(--acid);
    box-shadow: 0 0 14px rgb(199 255 62 / 58%);
    transition: transform 420ms var(--ease-out);
  }

  .tab {
    min-width: 0;
    min-height: 44px;
    font-size: clamp(8px, 2.55vw, 10px);
    letter-spacing: 0.1em;
    text-align: center;
  }

  .tab::after {
    display: none;
  }

  .site-main {
    position: relative;
    inset: auto;
    min-height: 100%;
  }

  .panel,
  .panel[hidden] {
    position: relative;
    inset: auto;
    display: flex;
    min-height: 100vh;
    min-height: 100svh;
    opacity: 1;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    transform: none;
  }

  .lab-panel {
    flex-direction: column;
    justify-content: flex-end;
    padding: calc(var(--header-height) + 36px) var(--page-x) 64px;
  }

  .hero-copy {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    max-width: none;
  }

  .hero-copy h1 {
    font-size: clamp(50px, 16.5vw, 82px);
    line-height: 0.8;
  }

  .hero-note {
    max-width: 310px;
    margin-top: 22px;
    font-size: 14px;
  }

  .experiment-console {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    gap: 12px;
    margin-top: clamp(40px, 8vh, 72px);
  }

  .reading-panel {
    overflow: visible;
  }

  .reading-shell {
    display: block;
    width: calc(100% - 2 * var(--page-x));
    padding: calc(var(--header-height) + 48px) 0 112px;
  }

  .reading-header {
    position: static;
    margin-bottom: 64px;
  }

  .reading-header h1 {
    font-size: clamp(56px, 17vw, 88px);
  }

  .policy-lead {
    margin-bottom: 56px;
    font-size: clamp(21px, 6vw, 28px);
  }

  .policy-copy section {
    display: block;
    padding: 32px 0 40px;
  }

  .policy-copy h2 {
    margin-bottom: 18px;
  }

  .contact-panel {
    align-items: center;
    padding: calc(var(--header-height) + 48px) var(--page-x) 72px;
  }

  .contact-copy {
    width: 100%;
    margin-top: 0;
  }

  .contact-copy h1 {
    font-size: clamp(58px, 17.5vw, 94px);
    line-height: 0.8;
  }

  .email-link {
    width: 100%;
  }

  .site-footer {
    height: 40px;
    background: rgb(10 13 12 / 86%);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }

  .site-footer span:last-child {
    display: none;
  }

  .field-shade {
    background:
      linear-gradient(0deg, rgb(10 13 12 / 84%) 0, rgb(10 13 12 / 18%) 76%),
      linear-gradient(90deg, rgb(10 13 12 / 42%) 0, transparent 100%);
  }
}

@media (max-width: 800px) and (max-height: 640px) {
  .lab-panel {
    padding-top: calc(var(--header-height) + 24px);
    padding-bottom: 52px;
  }

  .hero-copy h1 {
    font-size: clamp(46px, 14.5vw, 68px);
  }

  .hero-note {
    margin-top: 16px;
  }

  .experiment-console {
    margin-top: 28px;
  }
}

@media (max-height: 650px) and (min-width: 801px) {
  :root { --header-height: 82px; }
  .hero-copy { bottom: 52px; }
  .experiment-console { bottom: 46px; }
  .hero-copy h1 { font-size: clamp(58px, 8.4vw, 108px); }
  .hero-note { margin-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

html[data-fw-ui="1"] .site-header,
html[data-fw-ui="1"] .site-footer {
  background: color-mix(in srgb, var(--carbon) 84%, transparent);
  backdrop-filter: blur(20px) saturate(1.2);
}

html[data-fw-ui="1"][data-fw-theme="luckin"] .field-shade,
html[data-fw-ui="1"][data-fw-theme="oat"] .field-shade {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--carbon) 92%, transparent) 0, color-mix(in srgb, var(--carbon) 60%, transparent) 38%, transparent 72%),
    linear-gradient(0deg, color-mix(in srgb, var(--carbon) 68%, transparent) 0, transparent 46%);
}

html[data-fw-ui="1"][data-fw-theme="luckin"] body.is-reading .field-shade,
html[data-fw-ui="1"][data-fw-theme="oat"] body.is-reading .field-shade {
  background: color-mix(in srgb, var(--carbon) 90%, transparent);
}

html[data-fw-ui="1"] :where(.privacy-panel article,.contact-panel article) {
  border-color: var(--line);
  background: color-mix(in srgb, var(--carbon-soft) 92%, transparent);
  box-shadow: 0 18px 60px color-mix(in srgb, var(--acid) 8%, transparent);
}

html[data-fw-ui="1"] :where(.tab,.experiment-button,.motion-toggle,a) { transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease; }
html[data-fw-ui="1"] :where(.experiment-button,.motion-toggle,a):active { transform: scale(.98); }
html[data-fw-ui="1"] #physics-world { will-change: transform, opacity; }
