/* JQU 224 */
/*
 * XsiaoLung AI company landing — page styles.
 * Shape: alternating diptychs (claim on one side, proof on the other), one
 * dark band for the plan diagrams, one full-bleed product shelf.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text-87);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

html[lang="en"] {
  --font-sans: Inter, "Helvetica Neue", Arial, system-ui, -apple-system, sans-serif;
}

h1,
h2,
h3 {
  margin: 0;
  font-style: normal;
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  min-width: 0;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

:where(a, button, summary):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* anchor travel is tweened in index-company.js (initSmoothAnchors); native
   scroll-behavior would re-animate every position the tween writes */

/* layout shell · Roger.Qu */
.shell {
  width: calc(100% - var(--gutter) * 2);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: var(--space-sm);
  top: -4rem;
  z-index: 60;
  padding: var(--space-2xs) var(--space-sm);
  background: var(--accent);
  color: var(--on-accent);
  transition: top var(--dur-fast) var(--ease-out);
}

.skip:focus-visible {
  top: var(--space-sm);
}

/* ---------------------------------------------------------------- nav ----- */
/* One DOM, two modes: the bar owns the flush look, the inner node owns the
   floating pill. Height stays constant so nothing below shifts on scroll. */
.nav {
  --on-surface: #f4f8f8;
  --text-87: color-mix(in srgb, var(--on-surface) 87%, transparent);
  --text-67: color-mix(in srgb, var(--on-surface) 67%, transparent);
  --text-17: color-mix(in srgb, var(--on-surface) 17%, transparent);
  --text-08: color-mix(in srgb, var(--on-surface) 8%, transparent);
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 50;
  padding-block: 0;
  color: var(--text-87);
  background: #243b3d;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: var(--rule-hair) solid var(--text-17);
  transition: background 480ms var(--ease-out),
    border-color 480ms var(--ease-out);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  height: var(--nav-h);
  width: calc(100% - var(--gutter) * 2);
  max-width: 60rem;
  margin-inline: auto;
  padding-inline: var(--space-md);
  border: var(--rule-hair) solid transparent;
  border-radius: 999px;
  transition: background 480ms var(--ease-out),
    color 480ms var(--ease-out),
    border-color 480ms var(--ease-out),
    box-shadow 480ms var(--ease-out),
    transform 480ms var(--ease-out);
}

.nav.is-floating {
  background: transparent;
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.nav.is-floating .nav__inner {
  --on-surface: #243b3d;
  --text-87: color-mix(in srgb, var(--on-surface) 87%, transparent);
  --text-67: color-mix(in srgb, var(--on-surface) 67%, transparent);
  --text-17: color-mix(in srgb, var(--on-surface) 17%, transparent);
  --text-08: color-mix(in srgb, var(--on-surface) 8%, transparent);
  color: var(--text-87);
  background: #ffffff;
  border-color: var(--text-17);
  transform: translateY(var(--space-2xs));
  box-shadow:
    0 18px 48px color-mix(in srgb, #243b3d 18%, transparent),
    0 2px 8px color-mix(in srgb, #243b3d 10%, transparent);
}

.nav__brand {
  display: grid;
  gap: 1px;
  white-space: nowrap;
}

.nav__mark {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.nav__brand-sub {
  font-family: var(--font-figure);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: var(--text-67);
}

.language-switch {
  --lang-opt-w: 1.9rem;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 2px;
  color: var(--text-67);
  background: color-mix(in srgb, var(--on-surface) 9%, transparent);
  border: var(--rule-hair) solid var(--text-17);
  border-radius: 999px;
  transition: color 480ms var(--ease-out),
    background 480ms var(--ease-out),
    border-color 480ms var(--ease-out);
}

.language-switch a {
  position: relative;
  /* Fills the pill so the live-language bubble is the full inner height,
     rather than a small bubble floating inside a taller control. */
  align-self: stretch;
  display: inline-flex;
  align-items: stretch;
  color: inherit;
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1;
  border-radius: 999px;
}

/* white bubble marks the live language; it springs across on switch — TQQQ */
.language-switch a::before {
  content: "";
  position: absolute;
  inset-block: 0;
  left: 0;
  width: var(--lang-opt-w);
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 2px 8px color-mix(in srgb, #101d1e 16%, transparent);
  transform: translateX(var(--lang-bubble-x, 0));
  transition: transform 520ms var(--ease-spring);
}

.language-switch[data-active-lang="zh"] a::before {
  --lang-bubble-x: var(--lang-opt-w);
}

.language-switch.is-switching a::before {
  animation: language-bubble-squish 520ms var(--ease-spring);
}

@keyframes language-bubble-squish {
  0% { scale: 1 1; }
  38% { scale: 1.14 0.86; }
  100% { scale: 1 1; }
}

/* No divider between the two options: the moving bubble already says which one
   is live, and a slash read as a third glyph competing with it. */
.language-switch__opt {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--lang-opt-w);
  transition: color 320ms var(--ease-out);
}

.language-switch[data-active-lang="en"] .language-switch__opt[lang="en"],
.language-switch[data-active-lang="zh"] .language-switch__opt[lang="zh-CN"] {
  color: #243b3d;
}

.nav__rail {
  display: none;
  align-items: center;
  gap: clamp(var(--space-sm), 1.6vw, var(--space-lg));
  margin-inline-start: auto;
}

.nav__link {
  position: relative;
  white-space: nowrap;
  font-size: var(--text-meta);
  color: var(--text-67);
  padding-block: var(--space-3xs);
  transition: color var(--dur-fast) var(--ease-out);
}

.nav__link::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: -2px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-fast) var(--ease-out);
}

.nav__link:hover,
.nav__link[aria-current="true"] {
  color: var(--text-87);
}

.nav__link:hover::after,
.nav__link[aria-current="true"]::after {
  transform: scaleX(1);
}

/* Only shown when the link row cannot fit one line; see .is-compact below. */
.nav__toggle {
  display: none;
  align-items: center;
  gap: var(--space-3xs);
  min-height: 44px;
  /* Shares the CTA's fluid sizing: at 390px the leftover track is ~94px and
     「目录」 fits either way, but "Sections" only does once it shrinks. */
  padding-inline: clamp(0.5rem, 2vw, var(--space-sm));
  font: inherit;
  font-size: clamp(0.72rem, 0.35vw + 0.55rem, 0.9rem);
  white-space: nowrap;
  color: var(--text-67);
  background: transparent;
  border: var(--rule-hair) solid var(--text-17);
  border-radius: 999px;
  cursor: pointer;
}

.nav__toggle-caret {
  width: 6px;
  height: 6px;
  border-inline-end: 1.5px solid currentColor;
  border-block-end: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--dur-fast) var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  .nav,
  .nav__inner {
    transition-duration: 1ms;
  }
}

/* -------------------------------------------------------------- buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  min-height: 44px;
  padding: 0 var(--space-md);
  white-space: nowrap;
  font-size: var(--text-meta);
  font-weight: 500;
  border: var(--rule-hair) solid transparent;
  border-radius: 999px;
  transition: background var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn--primary:hover {
  background: var(--accent-deep);
}

.btn--ghost {
  border-color: var(--text-17);
  color: var(--text-87);
}

.btn--ghost:hover {
  border-color: var(--text-67);
  background: var(--paper-2);
}

.band--deep .btn--ghost {
  border-color: color-mix(in srgb, var(--on-surface) 32%, transparent);
}

.band--deep .btn--ghost:hover {
  background: var(--deep-2);
}

/* --------------------------------------------------------- section head --- */
.band {
  padding-block: var(--space-3xl);
  scroll-margin-block-start: calc(var(--nav-h) + var(--space-md));
}

.band--tint {
  background: var(--paper-2);
}

/* Dark regions re-seed the ink AND re-derive the tints in the same scope:
   --text-87 is substituted where it is declared, so a child that only
   overrides --on-surface keeps the light-theme (near-black) ink. */
.band--deep,
.close {
  --on-surface: #f8fbfc;
  --text-87: color-mix(in srgb, var(--on-surface) 87%, transparent);
  --text-67: color-mix(in srgb, var(--on-surface) 67%, transparent);
  --text-17: color-mix(in srgb, var(--on-surface) 17%, transparent);
  --text-08: color-mix(in srgb, var(--on-surface) 8%, transparent);
}

.band--deep {
  background: var(--deep);
  color: var(--text-87);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-size: var(--text-meta);
  color: var(--text-67);
}

.eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 2px;
  background: var(--accent);
}

.sect-head {
  display: grid;
  gap: var(--space-sm);
  max-width: 52ch;
  margin-block-end: var(--space-lg);
}

.sect-head h2 {
  font-size: var(--text-h2);
}

.lede {
  font-size: var(--text-lede);
  line-height: 1.6;
  color: var(--text-67);
  max-width: 46ch;
}

.note {
  font-size: var(--text-meta);
  line-height: 1.6;
  color: var(--text-67);
}

/* ---------------------------------------------------------------- hero ---- */
.hero {
  padding-block: calc(var(--nav-h) + var(--space-2xl)) var(--space-2xl);
}

.hero__grid {
  display: grid;
  gap: var(--space-xl);
  align-items: center;
}

/* The poster carries phone-sized UI copy, so it leads the hero and the claim
   steps down a size rather than competing with it. */
.hero h1 {
  font-size: clamp(1.9rem, 1.1rem + 2.3vw, 3.5rem);
  margin-block: var(--space-sm) var(--space-sm);
  max-width: 16ch;
}

.hero__lede {
  display: grid;
  gap: var(--space-2xs);
  max-width: 40ch;
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--text-67);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-block-start: var(--space-lg);
}

.hero__chain {
  margin-block-start: var(--space-md);
  font-family: var(--font-figure);
  font-size: var(--text-meta);
  letter-spacing: 0.02em;
  color: var(--text-67);
}

.proof {
  margin: 0;
  display: grid;
  gap: var(--space-2xs);
}

.proof img {
  width: 100%;
  border: var(--rule-hair) solid var(--text-17);
  border-radius: var(--radius-lg);
  background: var(--paper-2);
}

/* BP slide 16 supplies a landscape PNG; keep the complete proof visible. */
.hero .proof {
  width: 100%;
  max-width: none;
}

.hero .proof img {
  height: auto;
  object-fit: contain;
}

.proof figcaption {
  font-size: var(--text-meta);
  color: var(--text-67);
}

.figure b {
  display: block;
  font-family: var(--font-figure);
  font-variant-numeric: tabular-nums;
  font-size: var(--text-figure);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.figure span {
  display: block;
  margin-block-start: var(--space-3xs);
  font-size: var(--text-meta);
  color: var(--text-67);
}

/* -------------------------------------------------------------- diptych --- */
.split {
  display: grid;
  gap: var(--space-xl);
  align-items: start;
}

/* ------------------------------------------------- generations spec sheet -- */
.spec {
  display: grid;
  border-top: var(--rule-hair) solid var(--text-17);
}

.spec__row {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: var(--space-sm);
  padding-block: var(--space-sm);
  border-bottom: var(--rule-hair) solid var(--text-17);
}

.spec__ord {
  font-family: var(--font-figure);
  font-variant-numeric: tabular-nums;
  font-size: var(--text-meta);
  color: var(--text-67);
  padding-block-start: 0.35em;
}

.spec__row h3 {
  font-size: var(--text-h3);
}

.spec__row p {
  margin-block-start: var(--space-3xs);
  font-size: var(--text-meta);
  color: var(--text-67);
}

.spec__row--now {
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  border-bottom-color: color-mix(in srgb, var(--accent) 35%, transparent);
  padding-inline: var(--space-sm);
  margin-inline: calc(var(--space-sm) * -1);
}

/* ------------------------------------------------------------- pipeline --- */
.pipeline {
  display: grid;
  gap: var(--space-sm);
}

.pipeline__step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-sm);
  align-items: baseline;
  padding: var(--space-sm) var(--space-md);
  background: var(--paper);
  border: var(--rule-hair) solid var(--text-17);
  border-radius: var(--radius-md);
}

.pipeline__step b {
  font-family: var(--font-figure);
  font-size: var(--text-meta);
  font-weight: 500;
  color: var(--accent);
}

.pipeline__step h3 {
  font-size: var(--text-h3);
}

.pipeline__step p {
  margin-block-start: var(--space-3xs);
  font-size: var(--text-meta);
  color: var(--text-67);
}

.pipeline__loop {
  padding: var(--space-sm) var(--space-md);
  border: var(--rule-hair) dashed var(--text-17);
  border-radius: var(--radius-md);
  font-size: var(--text-meta);
  color: var(--text-67);
}

.pipeline__loop b {
  color: var(--text-87);
  font-weight: 500;
}

/* --------------------------------------------------------- module shelf --- */
/* One row that scrolls, not a wrapping grid: five 3:4 screenshots stacked
   vertically ran past 4,000px on a phone. Snap centres the reading position and
   JS publishes --near (1 at the centre, 0 at the edge) so the middle card is
   the only one at full size. */
.shelf-rail {
  position: relative;
}

.shelf {
  --module-w: min(78vw, 19rem);
  display: flex;
  align-items: start;
  gap: var(--space-md);
  overflow-x: auto;
  /* Side padding is the only way the first and last card can reach the centre:
     scroll-padding does not add scrollable length. */
  padding-inline: max(var(--gutter), calc(50% - var(--module-w) / 2));
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.shelf::-webkit-scrollbar {
  display: none;
}

.shelf:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.module {
  margin: 0;
  /* 0 0: the leftover card must never grow. A wrapping flex row used to live
     here and `flex: 1 1 12rem` blew the last card up to 1303px. */
  flex: 0 0 var(--module-w);
  min-width: 0;
  display: grid;
  gap: var(--space-2xs);
  scroll-snap-align: center;
  /* Scroll-linked, so no transition: the scale must track the finger. */
  transform: scale(calc(0.84 + 0.16 * var(--near, 1)));
  transform-origin: 50% 38%;
  opacity: calc(0.62 + 0.38 * var(--near, 1));
}

.module img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  border: var(--rule-hair) solid var(--text-17);
  border-radius: var(--radius-md);
  background: var(--paper-2);
}

.module h3 {
  margin-block-start: var(--space-2xs);
  font-size: var(--text-h3);
}

.module p {
  font-size: var(--text-meta);
  color: var(--text-67);
}

.module__flow {
  font-family: var(--font-figure);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--text-67);
}

/* rail chrome — built by JS so the copy follows <html lang>; without it the
   shelf is still a swipeable snap row. Roger.Qu */
.rail__nav {
  position: absolute;
  inset-block-start: 38%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  color: var(--text-87);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  border: var(--rule-hair) solid var(--text-17);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: border-color var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out);
}

.rail__nav:hover {
  border-color: var(--text-67);
  background: var(--paper);
}

.rail__nav[data-rail="prev"] {
  inset-inline-start: 0;
}

.rail__nav[data-rail="next"] {
  inset-inline-end: 0;
}

/* Chevron drawn from two borders, same trick as the nav caret. */
.rail__nav::before {
  content: "";
  width: 8px;
  height: 8px;
  border-inline-end: 2px solid currentColor;
  border-block-end: 2px solid currentColor;
}

.rail__nav[data-rail="prev"]::before {
  transform: translateX(2px) rotate(135deg);
}

.rail__nav[data-rail="next"]::before {
  transform: translateX(-2px) rotate(-45deg);
}

.rail__dots {
  display: flex;
  justify-content: center;
  gap: var(--space-2xs);
  margin-block-start: var(--space-md);
}

.rail__dot {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.rail__dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--text-17);
  transition: background var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

.rail__dot[aria-current="true"]::before {
  background: var(--accent);
  transform: scale(1.35);
}

@media (max-width: 30rem) {
  .rail__nav {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  /* Mandatory snap plus a smooth programmatic scroll is motion the user opted
     out of; proximity still parks a card near centre without fighting them. */
  .shelf {
    scroll-snap-type: x proximity;
  }
}

/* ----------------------------------------------------------- case band ---- */
.case__figure img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
}

.case__figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  margin: 0;
}

/* ----------------------------------------------- business-plan diagrams --- */
/* V19 geometry and colors stay verbatim; journey and funnel are inline so the
   scroll timeline can address their parts. The money model keeps the deck's
   palette while rebuilding paths from its controls. Roger.Qu */
.diagram {
  margin: 0;
  display: grid;
  gap: var(--space-2xs);
}

.diagram__scroll {
  background: var(--paper);
  border: var(--rule-hair) solid var(--text-17);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  min-width: 0;
}

.diagram img,
.motion-diagram svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Wide artwork switches to text reflow when its own container is narrow. */
/* the artwork was drawn for a 1600 px slide; past that it only adds dead space */
.diagram--wide {
  width: 100%;
  max-width: none;
}

.diagram--wide img,
.diagram--wide .motion-diagram svg {
  min-width: 0;
}

.diagram--tall img {
  min-width: 0;
}

/* A portrait diagram capped at its drawn width (632px). Stretching it past
   that trades legibility for nothing: the art gains no detail and the row
   grows taller than the viewport. */
.diagram--tall {
  width: 100%;
  max-width: 39.5rem;
}

/* Reading key beside the positioning matrix — TQQQ */
.matrix-key {
  display: grid;
  gap: var(--space-sm);
  align-content: start;
}

.matrix-key__lead {
  font-size: var(--text-h3);
  line-height: 1.25;
}

.matrix-key__claim {
  font-size: var(--text-meta);
  color: var(--text-67);
}

/* the one phrase the matrix exists to make: keep it at full ink */
.matrix-key__claim b {
  font-weight: 600;
  color: var(--text-87);
}

/* Footnotes under a figure. Self-balancing: as many columns as fit at a
   readable measure, so notes never end up as one short column facing a tall
   figure — that pairing left a 366px void beside the positioning matrix. */
.notes {
  display: grid;
  gap: var(--space-md) var(--space-xl);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  margin-block-start: var(--space-md);
}

.diagram figcaption {
  font-size: var(--text-meta);
  color: var(--text-67);
}

/* Diagram headline lifted out of the artwork: a caption baked into the vector
   cannot rewrap, so the English copy kept colliding with its own banner box. */
.diagram figcaption.diagram__title {
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-87);
}

.money-model {
  gap: var(--space-sm);
  padding: clamp(0.9rem, 1.5vw, 1.25rem);
  background: var(--paper);
  border: var(--rule-hair) solid var(--text-17);
  border-radius: var(--radius-lg);
}

.money-model__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-md);
}

.money-model__head h3 {
  margin-block-start: var(--space-3xs);
  font-size: var(--text-h3);
}

.money-model__controls {
  display: grid;
  gap: var(--space-sm);
}

.money-model fieldset {
  margin: 0;
  min-width: 0;
  padding: var(--space-3xs) var(--space-sm) var(--space-2xs);
  border: var(--rule-hair) solid var(--text-17);
  border-radius: var(--radius-md);
}

/* cost sliders pair up: half the width each, two rows instead of four */
.money-model__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--space-md);
}

.money-model legend {
  padding-inline: var(--space-3xs);
  font-weight: 700;
  color: var(--text-87);
}

.money-model label {
  display: grid;
  gap: 0.15rem;
  margin-block: var(--space-2xs);
  font-size: var(--text-meta);
  color: var(--text-67);
}

.money-model label span {
  display: flex;
  justify-content: space-between;
  gap: var(--space-sm);
}

.money-model output,
.money-model strong {
  color: var(--text-87);
  font-variant-numeric: tabular-nums;
}

.money-model input[type="range"] {
  width: 100%;
  min-height: 1.5rem;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.money-model fieldset p,
.money-model__equation {
  margin: var(--space-xs) 0 0;
  font-size: var(--text-meta);
  color: var(--text-67);
}

.money-model__equation {
  padding: var(--space-xs) var(--space-sm);
  background: var(--paper-2);
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 700;
  color: var(--text-87);
  font-variant-numeric: tabular-nums;
}

.money-sankey {
  min-height: 20rem;
}

.money-sankey svg {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
}

.money-sankey .flow {
  opacity: 0.72;
  transition: opacity 160ms ease;
}

.money-sankey .flow:hover {
  opacity: 1;
}

.money-sankey text {
  fill: var(--text-87);
  font-family: var(--font-body);
}

/* legend and caption start where the income captions end: --money-axis is the
   axis as a fraction of the drawing, and the drawing is inset by the scroll
   padding on both sides. Roger.Qu */
.money-model__legend,
.money-model > figcaption {
  padding-inline-start: calc(
    var(--space-sm) + (100% - 2 * var(--space-sm)) * var(--money-axis, 0.11)
  );
}

.money-model__legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: var(--text-meta);
  color: var(--text-67);
}

.money-model__legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.money-model__key {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
}

.money-model__key--income {
  background: #79a7c7;
}

.money-model__key--cost {
  background: #cb7b8b;
}

.money-model__key--profit {
  background: #7aa75e;
}

/* -------------------------------------------------- business · JCQU ------- */
.payers {
  display: grid;
  gap: var(--space-md);
}

.payer {
  display: grid;
  gap: var(--space-2xs);
  padding: var(--space-md);
  background: var(--paper);
  border: var(--rule-hair) solid var(--text-17);
  border-radius: var(--radius-md);
}

.payer--lead {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.payer h3 {
  font-size: var(--text-h3);
}

.payer dl {
  margin: 0;
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: var(--space-3xs) var(--space-sm);
  font-size: var(--text-meta);
}

.payer dt {
  color: var(--text-67);
}

.payer dd {
  margin: 0;
}

/* ----------------------------------------------------------------- raise -- */
.raise {
  display: grid;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--paper);
  border: var(--rule-hair) solid var(--text-17);
  border-radius: var(--radius-lg);
}

.raise__title {
  font-size: var(--text-h3);
}

.targets {
  display: grid;
  gap: var(--space-sm);
  border-top: var(--rule-hair) solid var(--text-17);
  padding-block-start: var(--space-md);
}

.targets li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: var(--space-sm);
  font-size: var(--text-meta);
}

.targets b {
  font-family: var(--font-figure);
  font-weight: 500;
  color: var(--text-67);
}

.capability {
  display: grid;
  gap: var(--space-sm);
}

.capability li {
  padding-block: var(--space-sm);
  border-top: var(--rule-hair) solid var(--text-17);
}

.capability h3 {
  font-size: var(--text-h3);
}

.capability p {
  margin-block-start: var(--space-3xs);
  font-size: var(--text-meta);
  color: var(--text-67);
}

/* --------------------------------------------- close · Build In Private --- */
.close {
  background: var(--deep);
  color: var(--text-87);
  padding-block: var(--space-3xl) var(--space-2xl);
}

.close__line {
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: 1.12;
  max-width: 22ch;
}

.close__grid {
  display: grid;
  gap: var(--space-xl);
  margin-block-start: var(--space-xl);
  padding-block-start: var(--space-lg);
  border-top: var(--rule-hair) solid color-mix(in srgb, var(--on-surface) 20%, transparent);
}

.qr {
  /* One width for the code and its caption: the column can be wider than the
     card, so centring in the column would not centre under the code. */
  --qr-w: clamp(9rem, 26vw, 11.5rem);
  margin: 0;
  display: grid;
  gap: var(--space-2xs);
  justify-items: start;
}

.qr img {
  width: var(--qr-w);
  padding: var(--space-2xs);
  background: #ffffff;
  border-radius: var(--radius-md);
}

.contact {
  display: grid;
  gap: var(--space-2xs);
  font-size: var(--text-meta);
}

.contact a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  min-height: 40px;
  white-space: nowrap;
  color: var(--text-87);
}

.contact a:hover {
  color: var(--accent);
}

.contact svg {
  width: 1.1em;
  height: 1.1em;
  fill: currentColor;
}

.contact span {
  color: var(--text-67);
}

.close__meta {
  margin-block-start: var(--space-xl);
  font-size: var(--text-meta);
  color: var(--text-67);
}

/* ---------------------------------------------------------------- reveal -- */
@media (prefers-reduced-motion: no-preference) {
  /* No transition here: both this rule and .is-in resolve to opacity 1, so the
     class-driven fallback has nothing to ease, while GSAP writes opacity /
     transform every frame — a 1s transition just chases those writes and
     stretches a 0.7s row fade into a mushy ~1.7s one. */
  .reveal,
  .motion-line {
    opacity: 1;
    transform: none;
    transform-style: preserve-3d;
    backface-visibility: hidden;
  }

  .reveal.is-in,
  .motion-line.is-in {
    opacity: 1;
    transform: none;
  }

  .motion-diagram {
    perspective: 70rem;
  }

  .figure b {
    backface-visibility: hidden;
    transform-origin: 50% 70%;
  }
}

/* ------------------------------------------------------------ responsive -- */
@media (min-width: 40rem) {
  .close__grid {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: var(--space-2xl);
  }

  .payers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Container, not viewport: the reading shell is only 60-80% of the window (see
   the --page-width ladder), so a 62rem *media* query fired while the shell was
   748px — two columns of 338px, section headings wrapping to three lines, and
   art squeezed to 56% of its natural size. Ask the column how wide it is.
   56rem matches the hero's threshold; both now measure the same container. */
@container (min-width: 56rem) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-2xl);
  }

  .split--wide-aside {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  }

  .split--flip .split__lede {
    order: 2;
  }

  /* The matrix is portrait and drawn at 632px, so it takes the larger share
     and the key reads up its right side. Centred, because a short column
     pinned to the top of a tall figure is what left the void here before. */
  /* Definite maxima, not fr ratios. A fr track grows past the art's own cap
     and opens a hole between the columns (measured 215px on a 1965px window);
     `fit-content` collapses the track to 0, because the img inside is
     `width: 100%` and a percentage against a content-sized track is circular.
     Both tracks grow to their cap, and the leftover becomes page margin. */
  .split--matrix {
    grid-template-columns: minmax(0, 38rem) minmax(15rem, 26rem);
    gap: var(--space-xl);
    justify-content: start;
  }

  .split--matrix .matrix-key {
    align-self: center;
  }

  .money-model__controls {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }

}

/* 21:9 — widen the working column and let the shelves use it. TQQQ */
@media (min-width: 100rem) and (min-aspect-ratio: 2 / 1) {
  .hero h1 {
    max-width: 18ch;
  }

  /* only the two-column hero pins the screenshot right; stacked, it stays flush */
  .hero .proof {
    justify-self: end;
  }

  .shelf {
    --module-w: 21rem;
  }

  .split--wide-aside {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }
}

/* Sidebar mode has no top bar to clear. These live down here because .hero and
   .band are declared after the nav block, and a media query adds no specificity. */
@media (min-width: 50rem) {
  .hero {
    padding-block: var(--space-2xl);
  }

  .band {
    scroll-margin-block-start: var(--space-md);
  }
}

@media (max-width: 30rem) {
  .nav__inner {
    gap: var(--space-2xs);
  }

  .nav__cta {
    display: none;
  }

  .case__figures {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.diagram__scroll { border: 0; border-radius: 0; background: transparent; }

/* JQU 224 — content reflows; only the document owns scrolling. */
.diagram { container-type: inline-size; }
.diagram-reflow { display: none; }
.diagram-steps { display: grid; gap: var(--space-sm); }
.diagram-steps li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: var(--space-sm);
  padding: var(--space-md);
  border: 1px solid var(--text-17);
  border-radius: var(--radius-md);
  background: var(--paper-2);
}
.diagram-steps li.is-unvalidated { border-style: dashed; }
.diagram-steps__number { font-weight: 700; color: var(--accent-deep); }
.diagram-steps h3 { font-size: var(--text-h3); margin-bottom: var(--space-xs); }
.diagram-steps p { overflow-wrap: anywhere; }
.diagram-steps__feedback { margin-top: var(--space-md); }
@container (max-width: 64rem) {
  .diagram > .motion-diagram { display: none; }
  .diagram-reflow { display: block; }
}
.money-sankey { container-type: inline-size; min-height: 0; }
.money-breakdown { display: none; }
.money-breakdown section { min-width: 0; }
.money-breakdown h4 { margin: 0 0 var(--space-sm); }
.money-breakdown dl { margin: 0; }
.money-breakdown dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-sm);
  padding-block: var(--space-xs);
  border-bottom: 1px solid var(--text-17);
}
.money-breakdown dt { overflow-wrap: anywhere; }
.money-breakdown dd { margin: 0; font-variant-numeric: tabular-nums; }
@container (max-width: 52rem) {
  .money-sankey > svg { display: none; }
  .money-breakdown { display: grid; gap: var(--space-lg); }
}
/* No drawing to hang off once the breakdown takes over; the figure query runs
   a touch wider than the drawing's, so the indent drops first, never last. */
@container (max-width: 54rem) {
  .money-model__legend,
  .money-model > figcaption { padding-inline-start: 0; }
}
@media (min-width: 50rem) and (max-height: 44rem) {
  .nav { position: absolute; inset-block-end: auto; }
  .nav__inner, .nav.is-floating .nav__inner { height: auto; }
}

/* by jqu224 — the closing statement and contact block form one composition. */
.close { container-type: inline-size; }
.close__layout { display: grid; gap: var(--space-xl); }
.close__intro { min-width: 0; }
.close__intro .eyebrow { margin-bottom: var(--space-sm); }
.close__intro .lede { max-width: 44ch; }
.close__grid {
  margin-block-start: 0;
  align-items: start;
  min-width: 0;
}
.close .contact { min-width: 0; align-content: start; }
.close .contact a { white-space: normal; overflow-wrap: anywhere; }
.close .contact svg { flex: 0 0 1.1em; }
.close .contact > span { margin-top: var(--space-sm); }
.close .qr figcaption { width: var(--qr-w); text-align: center; }
@container (min-width: 56rem) {
  .close__layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    /* Both columns start on one line. Centring the shorter text column used to
       float it below the QR card, since the card column is top-aligned. */
    align-items: start;
    column-gap: clamp(2rem, 5cqi, 6rem);
  }
  .close__grid {
    grid-template-columns: minmax(8rem, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(1.25rem, 2.5cqi, 3rem);
    padding-block-start: 0;
    border-top: 0;
  }
  /* The tag hangs above the row so the headline, not the tag, runs level with
     the QR card. Out of flow rather than a negative margin: the tag's height
     tracks a fluid font size, and a hard-coded lift would drift with it. */
  .close__intro { position: relative; }
  .close__intro .eyebrow {
    position: absolute;
    inset-block-end: 100%;
    inset-inline-start: 0;
  }
  .close .qr { --qr-w: min(100%, 11.5rem); }
}

/* Roger.Qu — persistent masthead and a quiet marginal table of contents. */
:root { --header-height: 8rem; --nav-w: 0px; }
/* JQU 224 — nav and main share one centered page, including the margin rail. */
body {
  --page-width: 100%;
  width: var(--page-width);
  margin-inline: auto;
  padding-inline-start: 0;
}
main { container-type: inline-size; }
@media (min-width: 50rem) {
  body { --page-width: 80%; }
}
@media (min-width: 50rem) and (min-aspect-ratio: 16 / 9) {
  body { --page-width: 70%; }
}
@media (min-width: 50rem) and (min-aspect-ratio: 21 / 9) {
  body { --page-width: 60%; }
}
.nav, .nav.is-floating {
  position: sticky;
  inset: 0 0 auto;
  width: 100%;
  padding: 0;
  background: #ffffff;
  color: var(--text-87);
  --on-surface: #243b3d;
  --text-87: color-mix(in srgb, var(--on-surface) 87%, transparent);
  --text-67: color-mix(in srgb, var(--on-surface) 67%, transparent);
  --text-17: color-mix(in srgb, var(--on-surface) 17%, transparent);
  border: 0;
  border-bottom: 1px solid var(--text-17);
  isolation: isolate;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
/* Full-width paint stays separate from the centered header contents. JQU 224 */
.nav::before {
  content: "";
  position: absolute;
  inset-block: 0 -1px;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: var(--paper);
  border-bottom: 1px solid var(--text-17);
  z-index: -1;
  pointer-events: none;
}
.nav .nav__inner, .nav.is-floating .nav__inner {
  width: calc(100% - var(--gutter) * 2);
  max-width: none;
  min-height: 4.5rem;
  height: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .5rem 1.25rem;
  padding: .75rem 0;
  margin: 0 auto;
  border: 0;
  border-radius: 0;
  color: var(--text-87);
  background: transparent;
  box-shadow: none;
  transform: none;
}
.nav .language-switch { margin-inline-start: auto; }

/* JCQU — 扫码体验, the language switch and the sections dropdown are one family
   of masthead controls: same height, same hairline weight, same corner. Fill
   and ink differ, geometry does not. The pill radius is height-derived, so the
   corners only match while the heights do. */
.nav {
  --chrome-h: 44px;
}
.nav .nav__cta,
.nav .language-switch,
.nav .nav__toggle {
  box-sizing: border-box;
  min-height: var(--chrome-h);
  height: var(--chrome-h);
  border-width: var(--rule-hair);
  border-style: solid;
  border-radius: 999px;
}
/* The filled button carries the same stroke as the outlined pair, in its own
   colour: a transparent border would leave it a hair shorter than the others. */
.nav .nav__cta { border-color: var(--accent-deep); }
.nav .language-switch,
.nav .nav__toggle { border-color: var(--text-17); }
/* One page-proportional width for both locales, so 扫码体验 / Try on WeChat
   never resize the row and shove the language pill sideways. */
.nav .nav__cta {
  display: inline-flex;
  flex: 0 0 auto;
  width: clamp(7.5rem, 6vw + 3rem, 10rem);
  padding-inline: 0;
  justify-content: center;
  font-size: clamp(0.72rem, 0.35vw + 0.55rem, 0.9rem);
}
.nav .nav__rail {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0 clamp(.75rem, 2vw, 1.75rem);
  min-width: 0;
  margin: 0;
  padding: 0;
}
/* min-height pads the tap target; centering keeps the label on the dot's axis. */
.nav__link { color: var(--text-67); padding: .5rem 0; min-height: 44px; display: flex; align-items: center; }
.nav__link::after {
  display: block;
  width: 5px;
  height: 5px;
  inset-inline: auto;
  left: 50%;
  bottom: 2px;
  border-radius: 50%;
  transform: translateX(-50%);
  opacity: 0;
}
.nav__link:hover::after { transform: translateX(-50%); }
.nav__link[aria-current="true"]::after {
  transform: translateX(-50%);
  opacity: 1;
}
/* Brand, language switch and CTA share one row; only the section links wrap. */
@media (max-width: 60rem) {
  .nav .nav__rail { gap: 0 .75rem; }
}

.nav__link[aria-current="true"], .nav__link:hover { color: var(--text-87); }

/* Compact masthead. Chinese fits five labels down to ~480px, English runs out
   of room much earlier, so index-company.js measures the row and sets
   .is-compact instead of guessing a breakpoint. The wrapper is `contents`
   until then: the rail stays a direct grid item, panel anchoring aside. */
.nav__menu { display: contents; }
.nav.is-compact .nav__menu { position: relative; display: block; min-width: 0; }
.nav.is-compact .nav__toggle { display: inline-flex; }
.nav.is-compact.is-menu-open .nav__toggle { color: var(--text-87); }
.nav.is-compact.is-menu-open .nav__toggle-caret { transform: translateY(1px) rotate(-135deg); }
.nav.is-compact .nav__rail {
  position: absolute;
  inset-block-start: calc(100% + var(--space-2xs));
  inset-inline-start: 0;
  z-index: 1;
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  min-width: 9rem;
  padding-inline: var(--space-sm);
  background: var(--paper);
  border: var(--rule-hair) solid var(--text-17);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 40px color-mix(in srgb, var(--on-surface) 12%, transparent);
}
.nav.is-compact.is-menu-open .nav__rail { display: flex; }
.nav.is-compact .nav__rail .nav__link {
  padding-inline-start: 1rem;
  border-block-end: var(--rule-hair) solid var(--text-08);
}
.nav.is-compact .nav__rail .nav__link:last-of-type { border-block-end: 0; }
.nav.is-compact .nav__rail .nav__cta {
  width: auto;
  margin-block: var(--space-2xs);
  justify-content: center;
}
.nav.is-compact .nav__rail .nav__link::after {
  left: 0;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}
.hero { padding-block-start: var(--space-2xl); }
.band, #contact, #top, #main { scroll-margin-block-start: calc(var(--header-height) + 1.5rem); }
@media (min-width: 90rem) {
  :root { --nav-w: 10rem; }
  .nav .nav__inner { grid-template-columns: minmax(0, 1fr) auto auto; }
  .nav__link { padding-inline-start: 1rem; }
  .nav__link::after,
  .nav__link:hover::after,
  .nav__link[aria-current="true"]::after {
    left: 0;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }
  main, body > .close { margin-inline-start: var(--nav-w); }
  .nav .nav__rail {
    position: fixed;
    inset-block-start: max(calc(var(--header-height) + 2rem), 28vh);
    inset-inline-start: calc((100% - var(--page-width)) / 2);
    width: var(--nav-w);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
    margin: 0;
    padding: .5rem .75rem .5rem 0;
    border-inline-end: 1px solid var(--text-17);
    background: transparent;
  }
  .nav__link { font-size: .8rem; font-weight: 400; overflow-wrap: anywhere; }

}
@media (max-width: 35rem) {
  .nav .nav__cta { width: 6.5rem; font-size: .72rem; }
  .nav__brand-sub { display: none; }
  .nav .nav__inner { gap: .5rem; }
}
/* English opportunity copy grows naturally instead of tracking a slide height. */
#opportunity .split__lede, #opportunity .spec, #opportunity .spec__row > div { min-width: 0; }
#opportunity .spec h3 { overflow-wrap: break-word; }
#opportunity .spec p { overflow-wrap: anywhere; }

/* Roger.Qu — a balanced hero within the actual reading column. */
@container (min-width: 56rem) {
  .hero__grid {
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: var(--space-xl);
  }
  .hero h1 { font-size: clamp(1.9rem, 3.5cqi, 3.5rem); }
}
