/* Android Gradle Tools — landing redesign prototype (v2)
 * Material 3 Expressive, Android-official first; Kotlin/JetBrains as accents.
 *   primary   = Android green     tertiary = Kotlin purple
 *   secondary = Android light blue accents: coral (Kotlin), sun (Google yellow)
 * Light theme is light everywhere, dark theme is dark everywhere —
 * including product screenshots and code surfaces.
 */

/* ───────────────────────── Tokens ───────────────────────── */
:root {
  --brand: #3ddc84;
  --brand-ink: #073042;
  --navy: #073042;

  --font-sans: "Google Sans Flex", "Google Sans", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* M3 shape scale (+ Expressive extra-extra-large) */
  --r-s: 8px;
  --r-m: 12px;
  --r-l: 16px;
  --r-xl: 28px;
  --r-2xl: 36px;
  --r-3xl: 48px;
  --r-full: 999px;

  /* M3 Expressive motion — spring-ish curves */
  --spring-fast: cubic-bezier(0.42, 1.67, 0.21, 0.9);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --emph: cubic-bezier(0.2, 0, 0, 1);
  --emph-decel: cubic-bezier(0.05, 0.7, 0.1, 1);

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
}

/* Light scheme (seed #3DDC84, tertiary #7F52FF) */
:root {
  color-scheme: light;
  --primary: #006d3f;
  --on-primary: #ffffff;
  --primary-container: #9df5bf;
  --on-primary-container: #00210f;
  --secondary: #28617d;
  --secondary-container: #d3ecfd;
  --on-secondary-container: #001e2c;
  --tertiary: #6a45e0;
  --on-tertiary: #ffffff;
  --tertiary-container: #e8deff;
  --on-tertiary-container: #22005d;
  --coral-container: #ffdad6;
  --on-coral-container: #5c0a13;
  --sun-container: #ffe08b;
  --on-sun-container: #241a00;

  --surface: #f6fbf4;
  --surface-lowest: #ffffff;
  --surface-low: #f0f5ee;
  --surface-mid: #eaefe8;
  --surface-high: #e4eae3;
  --surface-highest: #dee4dd;
  --on-surface: #171d19;
  --on-surface-variant: #404943;
  --outline: #707972;
  --outline-variant: #c0c9c1;
  --scrim-tour: rgba(246, 251, 244, 0.72);

  --ai-bg: #efe8ff;
  --final-bg: #3ddc84;
  --final-ink: #073042;
  --final-shape: rgba(7, 48, 66, 0.08);

  /* Code surfaces follow the theme (VS Code / IntelliJ Light) */
  --code-bg: #ffffff;
  --code-panel: #fafafc;
  --code-line: #e3e4e8;
  --code-text: #1f1f1f;
  --code-dim: #7a7e85;
  --code-run-bg: #dcefe2;
  --code-run-ink: #155a2c;
  --code-play: #238b3f;
  --syn-kw: #0033b3;
  --syn-fn: #00627a;
  --syn-str: #067d17;
  --syn-num: #1750eb;
  --syn-cmt: #8c8c8c;
  --syn-ann: #9e880d;
  --log-i: #1e7a42;
  --log-w: #8a6100;
  --log-w-bg: #fff6dc;
  --log-e: #c62828;
  --log-e-bg: #fdecec;

  --card: #ffffff;
  --card-edge: transparent;
  --bar-neutral: #ffffff;
  --onbrand-bg: #ffffff;
  --glow-a: rgba(61, 220, 132, 0.3);
  --glow-b: rgba(127, 82, 255, 0.2);
  --elev-1: 0 1px 2px rgba(0, 33, 15, 0.08), 0 1px 3px 1px rgba(0, 33, 15, 0.04);
  --elev-3: 0 4px 8px 3px rgba(0, 33, 15, 0.08), 0 1px 3px rgba(0, 33, 15, 0.1);
}

:root[data-theme-state="dark"] {
  color-scheme: dark;
  --primary: #7bdba1;
  --on-primary: #00391e;
  --primary-container: #00522d;
  --on-primary-container: #9df5bf;
  --secondary: #95cdee;
  --secondary-container: #0d4a63;
  --on-secondary-container: #c6e7ff;
  --tertiary: #cdbdff;
  --on-tertiary: #36009a;
  --tertiary-container: #4a2bb8;
  --on-tertiary-container: #e8deff;
  --coral-container: #7a1e27;
  --on-coral-container: #ffdad6;
  --sun-container: #4f3d00;
  --on-sun-container: #ffe08b;

  --surface: #0f1511;
  --surface-lowest: #0a0f0c;
  --surface-low: #171d19;
  --surface-mid: #1b211d;
  --surface-high: #252b27;
  --surface-highest: #303632;
  --on-surface: #dee4dd;
  --on-surface-variant: #c0c9c1;
  --outline: #8a938b;
  --outline-variant: #404943;
  --scrim-tour: rgba(15, 21, 17, 0.68);

  --ai-bg: #1b1630;
  --final-bg: #00522d;
  --final-ink: #d7ffe6;
  --final-shape: rgba(157, 245, 191, 0.07);

  --code-bg: #111315;
  --code-panel: #1a1a1a;
  --code-line: #2b2d30;
  --code-text: #dfe1e5;
  --code-dim: #868a91;
  --code-run-bg: #26352a;
  --code-run-ink: #9ad9a5;
  --code-play: #5bb665;
  --syn-kw: #cf8e6d;
  --syn-fn: #56a8f5;
  --syn-str: #6aab73;
  --syn-num: #2aacb8;
  --syn-cmt: #7a7e85;
  --syn-ann: #b3ae60;
  --log-i: #5fb865;
  --log-w: #e0b050;
  --log-w-bg: #201d13;
  --log-e: #f0776f;
  --log-e-bg: rgba(240, 119, 111, 0.12);

  --card: #1f2723;
  --card-edge: rgba(255, 255, 255, 0.07);
  --bar-neutral: #303632;
  --onbrand-bg: rgba(255, 255, 255, 0.14);
  --glow-a: rgba(61, 220, 132, 0.12);
  --glow-b: rgba(127, 82, 255, 0.16);
  --elev-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
  --elev-3: 0 4px 8px 3px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ───────────────────────── Base ───────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.4s var(--emph), color 0.4s var(--emph);
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
}
code,
kbd {
  font-family: var(--font-mono);
  font-size: 0.86em;
}
p code,
li code,
.deck code {
  background: color-mix(in srgb, var(--on-surface) 8%, transparent);
  padding: 1px 6px;
  border-radius: 6px;
}
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}
::selection {
  background: var(--primary-container);
  color: var(--on-primary-container);
}
.wrap {
  width: min(var(--wrap), 100% - var(--gutter) * 2);
  margin-inline: auto;
}
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--surface-lowest);
  padding: 8px 14px;
  border-radius: var(--r-full);
}
.skip:focus {
  left: 8px;
}
.ms {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 1.2em;
  line-height: 1;
  display: inline-block;
  width: 1em;
  height: 1em;
  overflow: hidden;
  vertical-align: -0.2em;
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
  user-select: none;
  flex-shrink: 0;
}
.nowrap {
  white-space: nowrap;
}

/* ───────────────────────── Ambient cursor glow ───────────────────────── */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.ambient__blob {
  position: absolute;
  left: 0;
  top: 0;
  width: 640px;
  height: 640px;
  margin: -320px 0 0 -320px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-a) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 0.6s var(--emph);
  will-change: transform;
}
.ambient__blob--b {
  width: 460px;
  height: 460px;
  margin: -230px 0 0 -230px;
  background: radial-gradient(circle, var(--glow-b) 0%, transparent 65%);
}
.ambient.is-on .ambient__blob {
  opacity: 1;
}
.page {
  position: relative;
  z-index: 1;
}

/* ───────────────────────── Buttons (M3 Expressive) ───────────────────────── */
.btn {
  --h: 56px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--h);
  padding: 0 28px;
  border-radius: calc(var(--h) / 2);
  border: 0;
  font: 600 17px/1 var(--font-sans);
  font-variation-settings: "ROND" 100;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: border-radius 0.45s var(--spring-fast), transform 0.45s var(--spring), box-shadow 0.3s var(--emph);
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: -1;
}
.btn:hover::after {
  opacity: 0.08;
}
.btn:active::after {
  opacity: 0.12;
}
/* shape morph on press: round → squircle */
.btn:active {
  border-radius: var(--r-l);
  transform: scale(0.97);
}
.btn .ms {
  font-size: 22px;
}
.btn--brand {
  background: var(--brand);
  color: var(--brand-ink);
}
.btn--brand:hover {
  box-shadow: var(--elev-3);
}
.btn--tonal {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}
.btn--outlined {
  background: transparent;
  color: var(--on-surface);
  box-shadow: inset 0 0 0 1px var(--outline);
}
.btn--filled {
  background: var(--primary);
  color: var(--on-primary);
}
.btn--sm {
  --h: 44px;
  padding: 0 20px;
  font-size: 15px;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  border: 0;
  background: transparent;
  color: var(--on-surface-variant);
  cursor: pointer;
  text-decoration: none;
  border-radius: 22px;
  transition: border-radius 0.4s var(--spring-fast), background-color 0.2s;
}
.icon-btn:hover {
  background: color-mix(in srgb, var(--on-surface) 8%, transparent);
}
.icon-btn:active {
  border-radius: var(--r-m);
}
.icon-btn svg {
  width: 20px;
  height: 20px;
}
.icon-btn .ms {
  font-size: 22px;
}
.theme-toggle [data-when] {
  display: none;
}
:root[data-theme-state="light"] .theme-toggle [data-when="light"],
:root[data-theme-state="dark"] .theme-toggle [data-when="dark"] {
  display: inline-block;
}

/* Assist chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px 0 10px;
  border-radius: var(--r-s);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--on-surface-variant);
  box-shadow: inset 0 0 0 1px var(--outline-variant);
  background: color-mix(in srgb, var(--surface-lowest) 60%, transparent);
}
.chip .ms {
  font-size: 19px;
  color: var(--primary);
}
.chip strong {
  color: var(--on-surface);
  font-weight: 650;
}

/* Copy command */
.cmd {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
  padding: 6px 6px 6px 18px;
  border-radius: var(--r-full);
  background: var(--surface-high);
  color: var(--on-surface);
  font: 500 14px/1.2 var(--font-mono);
}
.cmd__text {
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.cmd__text::-webkit-scrollbar {
  display: none;
}
.cmd__prompt {
  color: var(--primary);
  user-select: none;
}
.cmd__copy {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 18px;
  background: var(--surface-lowest);
  color: var(--on-surface);
  font: 600 13.5px/1 var(--font-sans);
  cursor: pointer;
  transition: border-radius 0.4s var(--spring-fast), background-color 0.2s;
}
.cmd__copy:active {
  border-radius: var(--r-s);
}
.cmd__copy .ms {
  font-size: 18px;
}
.cmd__copy.is-done {
  background: var(--primary-container);
  color: var(--on-primary-container);
}

/* ───────────────────────── Floating toolbar nav ───────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px var(--gutter) 0;
  pointer-events: none;
}
.nav__bar {
  pointer-events: auto;
  width: min(var(--wrap), 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 64px;
  padding: 0 10px 0 10px;
  border-radius: var(--r-full);
  background: color-mix(in srgb, var(--surface-high) 80%, transparent);
  backdrop-filter: saturate(1.4) blur(18px);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  transition: box-shadow 0.3s var(--emph), background-color 0.3s;
}
.nav.is-scrolled .nav__bar {
  box-shadow: var(--elev-3);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  font-variation-settings: "ROND" 100;
  text-decoration: none;
  margin-right: auto;
  white-space: nowrap;
}
.brand__mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--brand-ink);
}
.brand__mark svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--brand);
  transition: transform 0.8s var(--spring);
}
.brand:hover .brand__mark svg {
  transform: rotate(90deg) scale(1.06);
}
.brand__mark .ms {
  position: relative;
  font-size: 24px;
}
.nav__links {
  display: flex;
  gap: 2px;
}
.nav__link {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 16px;
  border-radius: 22px;
  color: var(--on-surface-variant);
  font-size: 15px;
  font-weight: 550;
  text-decoration: none;
  transition: background-color 0.25s, color 0.25s;
}
.nav__link:hover {
  background: color-mix(in srgb, var(--on-surface) 8%, transparent);
  color: var(--on-surface);
}
.nav__link.is-active {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}

/* ───────────────────────── Hero ───────────────────────── */
.hero {
  position: relative;
  padding: clamp(56px, 7vw, 104px) 0 0;
}
.hero__shapes {
  position: absolute;
  inset: -80px 0 auto 0;
  height: 820px;
  pointer-events: none;
  overflow: hidden;
  mask-image: linear-gradient(#000 70%, transparent);
  -webkit-mask-image: linear-gradient(#000 70%, transparent);
}
.shape {
  position: absolute;
  width: var(--size);
  height: var(--size);
  transform: translate3d(calc(var(--px, 0) * var(--depth) * 1px), calc(var(--py, 0) * var(--depth) * 1px), 0);
  transition: transform 1s var(--emph-decel);
}
.shape svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: var(--fill);
  animation: spin var(--spin, 60s) linear infinite;
}
.shape--1 { --size: 260px; --fill: var(--primary-container); --depth: 26; left: 2%; top: 170px; --spin: 70s; }
.shape--2 { --size: 160px; --fill: var(--tertiary-container); --depth: -34; right: 7%; top: 130px; --spin: 50s; }
.shape--3 { --size: 110px; --fill: var(--secondary-container); --depth: 44; left: 17%; top: 520px; --spin: 40s; }
.shape--4 { --size: 200px; --fill: var(--sun-container); --depth: -22; right: 1%; top: 460px; --spin: 90s; }
.shape--5 { --size: 74px; --fill: var(--coral-container); --depth: 60; right: 24%; top: 70px; --spin: 30s; }
.shape--6 { --size: 58px; --fill: var(--primary-container); --depth: -58; left: 27%; top: 90px; --spin: 26s; }
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
:root[data-theme-state="dark"] .shape svg {
  opacity: 0.6;
}
.hero__copy {
  position: relative;
  text-align: center;
  max-width: 1040px;
  margin-inline: auto;
}
.announce {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 18px 0 6px;
  border-radius: var(--r-full);
  background: var(--surface-lowest);
  box-shadow: var(--elev-1);
  font-size: 15px;
  font-weight: 550;
  color: var(--on-surface-variant);
  text-decoration: none;
  transition: box-shadow 0.3s var(--emph), transform 0.5s var(--spring);
}
:root[data-theme-state="dark"] .announce {
  background: var(--surface-high);
}
.announce:hover {
  box-shadow: var(--elev-3);
  transform: translateY(-2px);
}
.announce__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px 0 4px;
  border-radius: var(--r-full);
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 750;
  font-size: 13.5px;
}
.announce__badge svg {
  width: 24px;
  height: 24px;
  fill: #ffffff;
}
.announce .ms {
  font-size: 18px;
  transition: transform 0.4s var(--spring);
}
.announce:hover .ms {
  transform: translateX(3px);
}
.hero__title {
  font-size: clamp(44px, 7.6vw, 100px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 760;
  font-variation-settings: "ROND" 100;
  margin: 28px 0 26px;
  text-wrap: balance;
}
.hl {
  display: inline-flex;
  align-items: center;
  gap: 0.1em;
  margin: 0.03em 0;
  padding: 0 0.24em 0.04em 0.18em;
  border-radius: 0.5em;
  line-height: 1.04;
  transition: border-radius 0.5s var(--emph), background-color 0.3s var(--emph), color 0.3s var(--emph);
}
.hl .ms {
  font-size: 0.8em;
  vertical-align: 0;
  font-variation-settings: "FILL" 1, "wght" 600, "opsz" 48;
  transition: transform 0.6s var(--spring);
}
.hl--android {
  background: var(--brand);
  color: var(--brand-ink);
}
.hl--code {
  background: var(--tertiary-container);
  color: var(--on-tertiary-container);
}
.hl:hover {
  border-radius: 0.24em;
}
.hl:hover .ms {
  transform: rotate(-12deg) scale(1.08);
}
.hero__lead {
  font-size: clamp(18px, 2vw, 21px);
  color: var(--on-surface-variant);
  max-width: 680px;
  margin: 0 auto 34px;
  text-wrap: pretty;
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.hero__cmd {
  margin-top: 18px;
}
.proof {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}
.proof .ms.star {
  color: #e8a600;
}

/* ───────────────────────── Tour ───────────────────────── */
/* Player = stage (left) + chapter list (right). The whole player is capped so it
   fits one laptop viewport: stage height ≈ 100svh − toolbar − breathing room. */
.tour {
  --ratio: 1.5744; /* 1842 / 1170 */
  --side: 330px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--side);
  gap: 12px;
  width: 100%;
  max-width: calc((100svh - 170px) * var(--ratio) + var(--side) + 36px);
  margin: clamp(48px, 6vw, 76px) auto 0;
  padding: 12px;
  border-radius: var(--r-3xl);
  background: var(--surface-mid);
}
.tour__stage {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-2xl);
  aspect-ratio: 1842 / 1170;
  background: var(--code-panel);
  box-shadow: 0 0 0 1px var(--outline-variant);
}
.tour__canvas {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  transition: transform 1.2s var(--emph);
  will-change: transform;
}
.tour__canvas img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
:root[data-theme-state="light"] .shot--dark,
:root[data-theme-state="dark"] .shot--light {
  display: none;
}
.tour__dim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.tour__dim .shade {
  fill: var(--scrim-tour);
  transition: opacity 0.7s var(--emph);
}
.tour__hl {
  position: absolute;
  border-radius: calc(10px * var(--inv, 1));
  box-shadow: 0 0 0 calc(3px * var(--inv, 1)) var(--primary);
  opacity: 0;
  transition: opacity 0.5s var(--emph) 0.55s;
  pointer-events: none;
}
.tour__hl.is-on {
  opacity: 1;
}

/* The side column never makes the row taller than the stage */
.tour__sidewrap {
  position: relative;
  min-height: 0;
}
.tour__side {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.tour__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 4px 14px;
}
.tour__head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  font-variation-settings: "ROND" 100;
}
.tour__play {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 16px;
  background: var(--primary-container);
  color: var(--on-primary-container);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-radius 0.5s var(--spring-fast);
}
.tour__play.is-playing {
  border-radius: 24px;
}
.tour__play .ms {
  font-size: 24px;
}
.tour__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  align-content: start;
  gap: 3px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  /* M3-style scrollbar: thin, rounded, tinted — only when the list overflows */
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--on-surface) 24%, transparent) transparent;
}
.tour__list::-webkit-scrollbar {
  width: 6px;
}
.tour__list::-webkit-scrollbar-track {
  background: transparent;
  margin: 14px 0;
}
.tour__list::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--on-surface) 24%, transparent);
  border-radius: 99px;
}
.tour__list::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--on-surface) 40%, transparent);
}
.tour__list.is-scrollable {
  padding-right: 8px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%);
}
.tour__item {
  width: 100%;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 6px 14px 6px 8px;
  border: 0;
  border-radius: var(--r-s);
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--card-edge);
  color: var(--on-surface-variant);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-radius 0.5s var(--spring-fast), background-color 0.25s, color 0.25s;
}
.tour__list li:first-child .tour__item {
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
}
.tour__list li:last-child .tour__item {
  border-bottom-left-radius: 22px;
  border-bottom-right-radius: 22px;
}
.tour__item:hover {
  background: color-mix(in srgb, var(--on-surface) 6%, var(--card));
}
.tour__item-icon {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}
.tour__item-icon svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: transparent;
}
.tour__item[aria-selected="true"] .tour__item-icon svg {
  transition: fill 0.3s, transform 0.8s var(--spring);
}
.tour__item-icon .ms {
  position: relative;
  font-size: 21px;
}
.tour__item-label {
  font-size: 15px;
  font-weight: 650;
  line-height: 40px;
  font-variation-settings: "ROND" 100;
}
.tour__item-more {
  display: grid;
  grid-template-rows: 0fr;
}
.tour__item-body {
  display: block;
  min-width: 0;
}
.tour__item-inner {
  display: block;
  overflow: hidden;
  min-height: 0;
}
.tour__item-title {
  display: block;
  padding-top: 9px;
  font-size: 16.5px;
  line-height: 1.3;
  font-weight: 720;
  font-variation-settings: "ROND" 100;
}
.tour__item-text {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.5;
}
.tour__item-text code {
  background: color-mix(in srgb, currentColor 12%, transparent);
  padding: 0 5px;
  border-radius: 5px;
}
.tour__item[aria-selected="true"] {
  padding-top: 10px;
  padding-bottom: 12px;
  border-radius: 22px;
  background: var(--primary-container);
  color: var(--on-primary-container);
  box-shadow: none;
}
.tour__item[aria-selected="true"] .tour__item-label {
  display: none;
}
.tour__item[aria-selected="true"] .tour__item-more {
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.45s var(--emph);
}
.tour__item[aria-selected="true"] .tour__item-icon svg {
  fill: var(--primary);
  transform: rotate(40deg);
}
.tour__item[aria-selected="true"] .tour__item-icon .ms {
  color: var(--on-primary);
}

/* Wavy linear progress (M3 Expressive) */
.wavy {
  position: relative;
  display: block;
  height: 14px;
  margin: 12px 0 2px;
}
.wavy__active {
  position: absolute;
  left: 0;
  top: 0;
  height: 14px;
  width: var(--p, 0%);
  overflow: hidden;
}
.wavy__active svg {
  display: block;
  height: 14px;
  width: 2400px;
  animation: wave 1.1s linear infinite;
}
.wavy__active path {
  fill: none;
  stroke: var(--primary);
  stroke-width: 4;
  stroke-linecap: round;
}
@keyframes wave {
  to {
    transform: translateX(-28px);
  }
}
.wavy__track {
  position: absolute;
  top: 5px;
  right: 0;
  left: calc(var(--p, 0%) + 8px);
  height: 4px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--on-primary-container) 16%, transparent);
}
.wavy__stop {
  position: absolute;
  right: 0;
  top: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
}

/* ───────────────────────── Sections ───────────────────────── */
.section {
  position: relative;
  padding: clamp(80px, 11vw, 136px) 0;
}
.section--tint {
  background: color-mix(in srgb, var(--surface-low) 80%, transparent);
}
.label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 15.5px;
  font-weight: 680;
  color: var(--primary);
  font-variation-settings: "ROND" 100;
}
.label svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  animation: spin 16s linear infinite;
}
.label--tertiary {
  color: var(--tertiary);
}
.h2 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 740;
  font-variation-settings: "ROND" 100;
  margin: 0 0 20px;
  text-wrap: balance;
}
.deck {
  font-size: clamp(17px, 1.8vw, 19.5px);
  color: var(--on-surface-variant);
  max-width: 660px;
  margin: 0;
  text-wrap: pretty;
}
.section__head {
  margin-bottom: clamp(40px, 5vw, 60px);
}
.section__head--center {
  text-align: center;
}
.section__head--center .deck {
  margin-inline: auto;
}

/* Spotlight surface — follows the cursor inside cards */
.spot {
  position: relative;
  isolation: isolate;
}
.spot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--primary) 14%, transparent), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s var(--emph);
  pointer-events: none;
}
.spot:hover::before {
  opacity: 1;
}

/* Material shape icon holder */
.shape-icon {
  --c-bg: var(--primary-container);
  --c-ink: var(--on-primary-container);
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  color: var(--c-ink);
}
.shape-icon svg:not(.ico) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--c-bg);
  transition: transform 0.9s var(--spring);
}
.spot:hover .shape-icon svg:not(.ico) {
  transform: rotate(60deg) scale(1.08);
}
.shape-icon .ms {
  position: relative;
  font-size: 26px;
}
.shape-icon .ico {
  font-size: 24px;
}
.shape-icon--tertiary { --c-bg: var(--tertiary-container); --c-ink: var(--on-tertiary-container); }
.shape-icon--secondary { --c-bg: var(--secondary-container); --c-ink: var(--on-secondary-container); }
.shape-icon--coral { --c-bg: var(--coral-container); --c-ink: var(--on-coral-container); }
.shape-icon--sun { --c-bg: var(--sun-container); --c-ink: var(--on-sun-container); }
.shape-icon--onbrand { --c-bg: var(--onbrand-bg); --c-ink: var(--primary); }

/* ───────────────────────── Code-ish surfaces (theme-following) ───────────────────────── */
.codebox {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: var(--r-l);
  box-shadow: inset 0 0 0 1px var(--code-line);
  font: 13px/1.75 var(--font-mono);
  overflow: hidden;
}
.syn-kw { color: var(--syn-kw); }
.syn-fn { color: var(--syn-fn); }
.syn-str { color: var(--syn-str); }
.syn-num { color: var(--syn-num); }
.syn-cmt { color: var(--syn-cmt); }
.syn-dim { color: var(--code-dim); }
.syn-ann { color: var(--syn-ann); }

/* ───────────────────────── Why ───────────────────────── */
.loop {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) auto minmax(0, 0.9fr);
  gap: 16px;
  align-items: stretch;
}
.loop__arrow {
  display: grid;
  place-items: center;
}
.loop__arrow span {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--r-full);
  background: var(--primary-container);
  color: var(--on-primary-container);
}
.pane {
  border-radius: var(--r-2xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.pane__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 22px;
  font: 600 13px/1 var(--font-mono);
  color: var(--code-dim);
  border-bottom: 1px solid var(--code-line);
}
.pane--before {
  background: var(--code-bg);
  box-shadow: inset 0 0 0 1px var(--code-line);
}
.pane__label b {
  color: var(--log-e);
  font-weight: 600;
}
.term {
  margin: 0;
  padding: 18px 22px;
  font: 13px/1.8 var(--font-mono);
  color: var(--code-text);
  white-space: pre;
  overflow-x: auto;
  flex: 1;
}
.term .p { color: var(--code-play); }
.term .o { color: var(--code-dim); }
.term .e { color: var(--log-e); }
.term .cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  vertical-align: -0.2em;
  background: var(--code-text);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.pane--after {
  background: var(--primary-container);
  color: var(--on-primary-container);
}
.pane--after .pane__label {
  color: var(--on-primary-container);
  border-bottom-color: color-mix(in srgb, var(--on-primary-container) 12%, transparent);
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 700;
  font-variation-settings: "ROND" 100;
}
.pane__body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}
.pane__caption {
  margin: 0;
  font-size: 15.5px;
}
.pane__caption kbd,
.compare kbd {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 26px;
  padding: 0 6px;
  border-radius: 7px;
  background: var(--surface-lowest);
  color: var(--on-surface);
  font-size: 12.5px;
}

/* Run widget replica — mirrors the real panel in both themes */
.runw {
  background: var(--code-panel);
  border-radius: 18px;
  padding: 12px;
  color: var(--code-text);
  font-size: 14px;
  box-shadow: inset 0 0 0 1px var(--code-line), var(--elev-1);
}
.runw__proj {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--code-dim);
  font-size: 13px;
  padding: 2px 4px 10px;
}
.runw__proj b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--code-text);
  font-weight: 600;
}
.runw__proj b .ms {
  color: var(--code-play);
  font-size: 16px;
}
.runw__card {
  background: var(--code-bg);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 8px;
  box-shadow: inset 0 0 0 1px var(--code-line);
}
.runw__field {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 8px 10px;
  box-shadow: inset 0 0 0 1px var(--code-line);
  min-width: 0;
  white-space: nowrap;
}
.runw__field .ms {
  font-size: 17px;
  color: var(--code-dim);
}
.runw__field .caret {
  margin-left: auto;
}
.runw__sep {
  color: var(--code-dim);
}
.runw__dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--code-play);
}
.runw__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.runw__run {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  background: var(--code-run-bg);
  color: var(--code-run-ink);
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 650;
  white-space: nowrap;
}
.runw__run .ms {
  color: var(--code-play);
  font-size: 19px;
}
.runw__tool {
  font-size: 19px;
  padding: 4px;
}
.runw__tool--build { color: #c98a1c; }
.runw__tool--sync { color: #3a7fd5; }
.runw__tool--bug { color: var(--code-play); }
.runw__tool--more { color: var(--code-dim); }
.runw__status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 4px 0;
  font: 12.5px/1.3 var(--font-mono);
  color: var(--code-dim);
}
.runw__status .ms {
  color: var(--code-play);
  font-size: 16px;
}

/* ───────────────────────── Bento ───────────────────────── */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}
.tile {
  grid-column: span 4;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--card-edge);
  border-radius: var(--r-2xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  transition: transform 0.6s var(--spring), border-radius 0.6s var(--spring-fast);
}
.tile:hover {
  transform: translateY(-4px);
  border-radius: var(--r-3xl);
}
.tile--7 { grid-column: span 7; }
.tile--5 { grid-column: span 5; }
.tile--primary { --tile-bg: var(--primary-container); --tile-ink: var(--on-primary-container); --tile-accent: var(--primary); }
.tile--tertiary { --tile-bg: var(--tertiary-container); --tile-ink: var(--on-tertiary-container); --tile-accent: var(--tertiary); }
.tile--secondary { --tile-bg: var(--secondary-container); --tile-ink: var(--on-secondary-container); --tile-accent: var(--secondary); }
.tile--sun { --tile-bg: var(--sun-container); --tile-ink: var(--on-sun-container); --tile-accent: var(--on-sun-container); }
:root .tile--primary,
:root .tile--tertiary,
:root .tile--secondary,
:root .tile--sun {
  background: var(--tile-bg);
  color: var(--tile-ink);
  box-shadow: none;
}
.tile .shape-icon--onbrand {
  --c-bg: #ffffff;
  --c-ink: var(--tile-accent, var(--primary));
}
.compare__col--us .shape-icon--onbrand {
  --c-bg: #ffffff;
  --c-ink: var(--primary);
}
:root[data-theme-state="dark"] .compare__col--us .shape-icon--onbrand {
  --c-bg: var(--on-primary-container);
  --c-ink: var(--primary-container);
}
:root[data-theme-state="dark"] .tile .shape-icon--onbrand {
  --c-bg: var(--tile-ink);
  --c-ink: var(--tile-bg);
}
.tile--primary p,
.tile--tertiary p,
.tile--secondary p,
.tile--sun p {
  color: inherit;
  opacity: 0.86;
}
.tile h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 700;
  font-variation-settings: "ROND" 100;
}
.tile p {
  margin: 0;
  color: var(--on-surface-variant);
  font-size: 15.5px;
  line-height: 1.55;
}
.tile__top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.tile__viz {
  margin-top: auto;
}

/* Compose Preview on device: code with CodeLens + phone */
.tile h3 .tag {
  vertical-align: 0.2em;
  margin-left: 4px;
}
.compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 14px;
  align-items: end;
}
.compose__code {
  padding: 10px 0;
}
.compose__lens {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 4px 14px;
  padding: 2px 8px 2px 4px;
  border-radius: 99px;
  background: var(--code-run-bg);
  color: var(--code-run-ink);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 650;
}
.compose__lens .ms {
  font-size: 16px;
  color: var(--code-play);
}
.compose__phone {
  position: relative;
  display: grid;
  align-content: start;
  gap: 6px;
  height: 172px;
  padding: 16px 8px 8px;
  border-radius: 18px;
  background: var(--surface-lowest);
  box-shadow: inset 0 0 0 3px var(--on-secondary-container), var(--elev-3);
}
.compose__phone::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--on-secondary-container);
}
.compose__bar {
  height: 10px;
  width: 60%;
  border-radius: 5px;
  background: var(--on-surface);
  opacity: 0.75;
}
.compose__card {
  display: grid;
  gap: 4px;
  padding: 7px;
  border-radius: 10px;
  background: var(--secondary-container);
}
.compose__card i {
  height: 5px;
  border-radius: 3px;
  background: var(--on-secondary-container);
  opacity: 0.55;
}
.compose__card i + i {
  width: 60%;
}
.compose__cta {
  height: 18px;
  margin-top: 4px;
  border-radius: 9px;
  background: var(--primary);
}

/* Cold AVD timeline: a tiny Gantt chart — labels left, text-free bars right */
.coldavd {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 8px 12px;
}
.coldavd__label {
  font-size: 13.5px;
  font-weight: 650;
  white-space: nowrap;
  font-variation-settings: "ROND" 100;
}
.coldavd__track {
  position: relative;
  height: 36px;
  border-radius: var(--r-full);
  background: color-mix(in srgb, var(--surface-lowest) 50%, transparent);
}
.coldavd__bar {
  position: absolute;
  top: 4px;
  bottom: 4px;
  min-width: 28px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 5px;
  border-radius: var(--r-full);
}
.coldavd__bar .ms {
  font-size: 18px;
}
.coldavd__bar--emu { left: 4px; width: 62%; background: var(--tertiary-container); color: var(--on-tertiary-container); }
.coldavd__bar--gradle { left: 4px; width: 52%; background: var(--bar-neutral); color: var(--on-surface); }
.coldavd__bar--install { left: calc(62% + 8px); right: 4px; background: var(--primary); color: var(--on-primary); }
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal.is-in .coldavd__bar {
    animation: grow 1.4s var(--emph) both;
  }
  html.js .reveal.is-in .coldavd__bar--install {
    animation-delay: 1.1s;
  }
}
@keyframes grow {
  from {
    clip-path: inset(0 100% 0 0 round 99px);
  }
  to {
    clip-path: inset(0 0 0 0 round 99px);
  }
}

.list-mock {
  border-radius: var(--r-xl);
  background: var(--surface-low);
  padding: 6px;
  font-size: 14px;
}
:root[data-theme-state="dark"] .list-mock {
  background: var(--surface-high);
}
.list-mock__group {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
  padding: 10px 12px 6px;
}
.list-mock__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-l);
  min-width: 0;
  white-space: nowrap;
}
.list-mock__row .ms {
  font-size: 19px;
  color: var(--on-surface-variant);
}
.list-mock__row small {
  margin-left: auto;
  color: var(--on-surface-variant);
  font-size: 12.5px;
}
.list-mock__row.is-active {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  border-radius: var(--r-full);
  font-weight: 650;
}
.list-mock__row.is-active .ms,
.list-mock__row.is-active small {
  color: inherit;
}
.list-mock__row--link {
  color: var(--primary);
  font-weight: 650;
}
.list-mock__row--link .ms {
  color: inherit;
}

.logmock__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  border-bottom: 1px solid var(--code-line);
  background: var(--code-panel);
}
.logmock__chip {
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: var(--code-bg);
  box-shadow: inset 0 0 0 1px var(--code-line);
}
.logmock__chip--x {
  color: var(--log-e);
  text-decoration: line-through;
}
.logmock__chip--re {
  color: var(--syn-num);
}
.logmock__lines {
  padding: 8px 0;
}
.logmock__line {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  padding: 0 12px;
  white-space: nowrap;
}
.logmock__line > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}
.lv {
  font-weight: 700;
}
.logmock__line--w {
  background: var(--log-w-bg);
  color: var(--log-w);
}
.logmock__line--e {
  background: var(--log-e-bg);
  color: var(--log-e);
}
.logmock__link {
  color: var(--syn-fn);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.variants {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font: 600 13.5px/1 var(--font-mono);
}
.variants > span {
  padding: 14px;
  border-radius: var(--r-l);
  background: color-mix(in srgb, var(--surface-lowest) 50%, transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.variants > span.is-on {
  background: var(--tertiary);
  color: var(--on-tertiary);
  border-radius: var(--r-full);
}
.variants .ms {
  font-size: 18px;
}

.diff {
  padding: 10px 0;
}
.diff div {
  padding: 0 14px;
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
}
.diff .add {
  background: color-mix(in srgb, var(--log-i) 12%, transparent);
}
.diff .add::before {
  content: "+ ";
  color: var(--log-i);
}
.diff .ctx::before {
  content: "  ";
}
.diff .bp {
  background: var(--log-e-bg);
}
.diff .bp::before {
  content: "● ";
  color: var(--log-e);
}

.modes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.modes span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px 0 12px;
  border-radius: var(--r-full);
  background: color-mix(in srgb, var(--surface-lowest) 60%, transparent);
  font-size: 14.5px;
  font-weight: 650;
}
.modes .ms {
  font-size: 19px;
}

.meter {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  color: var(--on-surface-variant);
  font-size: 13px;
}
.meter svg {
  flex: 1;
  height: 48px;
}
.meter b {
  display: block;
  color: var(--on-surface);
  font-size: 24px;
  font-weight: 750;
  font-variation-settings: "ROND" 100;
}

.keys {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.keys div {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 650;
}
.keys kbd {
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  height: 42px;
  padding: 0 10px;
  border-radius: var(--r-m);
  background: var(--surface-lowest);
  color: var(--on-surface);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--on-sun-container) 28%, transparent);
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.3s var(--spring), box-shadow 0.3s;
}
.keys kbd:hover {
  transform: translateY(2px);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--on-sun-container) 28%, transparent);
}

/* ───────────────────────── AI ───────────────────────── */
.ai__box {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-3xl);
  background: var(--ai-bg);
  padding: clamp(24px, 5vw, 64px);
  isolation: isolate;
}
.ai__box > svg {
  position: absolute;
  z-index: -1;
  right: -120px;
  top: -140px;
  width: 440px;
  height: 440px;
  fill: color-mix(in srgb, var(--tertiary) 10%, transparent);
  animation: spin 80s linear infinite;
}
.ai__box .h2 {
  font-size: clamp(34px, 4.2vw, 54px);
}
.ai__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}
.ai__items {
  display: grid;
  gap: 4px;
  margin-top: 32px;
}
.ai-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  padding: 20px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--card-edge);
  border-radius: var(--r-s);
}
.ai-item:first-child {
  border-radius: var(--r-xl) var(--r-xl) var(--r-s) var(--r-s);
}
.ai-item:last-child {
  border-radius: var(--r-s) var(--r-s) var(--r-xl) var(--r-xl);
}
.ai-item h3 {
  margin: 0 0 4px;
  font-size: 18.5px;
  font-variation-settings: "ROND" 100;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ai-item p {
  margin: 0;
  font-size: 15px;
  color: var(--on-surface-variant);
}
.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.02em;
}
.tag--exp { background: var(--sun-container); color: var(--on-sun-container); }
.tag--next { background: var(--tertiary-container); color: var(--on-tertiary-container); }
.tag--new { background: var(--brand); color: var(--brand-ink); }

.agent-panel {
  background: var(--code-panel);
  border-radius: var(--r-xl);
  box-shadow: inset 0 0 0 1px var(--code-line), var(--elev-3);
  overflow-x: auto;
  color: var(--code-text);
}
.agent-panel__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--code-line);
  font-size: 13.5px;
  color: var(--code-dim);
}
.agent-panel__bar b {
  color: var(--code-text);
}
.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.matrix th,
.matrix td {
  padding: 12px 8px;
  text-align: center;
  border-bottom: 1px solid var(--code-line);
}
.matrix th {
  font-weight: 650;
}
.matrix .is-dim {
  opacity: 0.35;
}
.matrix td:first-child,
.matrix th:first-child {
  text-align: left;
  padding-left: 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  white-space: nowrap;
}
.tick {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--primary);
  color: var(--on-primary);
}
.tick .ms {
  font-size: 17px;
}
.tick--off {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--outline);
}
.agent-panel__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  font-size: 13px;
  color: var(--code-dim);
}
.mcp {
  margin-top: 12px;
  border-radius: var(--r-xl);
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--card-edge);
  overflow: hidden;
}
.mcp__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 8px;
}
.mcp__head h3 {
  margin: 0;
  font-size: 18.5px;
  font-variation-settings: "ROND" 100;
}
.mcp__head p {
  margin: 0;
  width: 100%;
  font-size: 15px;
  color: var(--on-surface-variant);
}
.mcp__code {
  margin: 12px;
  padding: 14px 16px;
  border-radius: var(--r-l);
  background: var(--code-bg);
  color: var(--code-text);
  box-shadow: inset 0 0 0 1px var(--code-line);
  font: 12.5px/1.8 var(--font-mono);
  overflow-x: auto;
}

/* ───────────────────────── Quick start ───────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.step {
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--card-edge);
  border-radius: var(--r-2xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-radius 0.6s var(--spring-fast);
}
.step:hover {
  border-radius: var(--r-3xl);
}
.step__num {
  position: relative;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  font: 780 26px/1 var(--font-sans);
  font-variation-settings: "ROND" 100;
  color: var(--c-ink);
}
.step__num svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--c-bg);
  transition: transform 1s var(--spring);
}
.step:hover .step__num svg {
  transform: rotate(120deg);
}
.step__num span {
  position: relative;
}
.step h3 {
  margin: 4px 0 0;
  font-size: 22px;
  font-variation-settings: "ROND" 100;
}
.step p {
  margin: 0;
  color: var(--on-surface-variant);
  font-size: 15.5px;
}
.step > :last-child {
  margin-top: auto;
}
.step .cmd {
  width: 100%;
  border-radius: var(--r-xl);
  align-items: flex-start;
  padding: 12px 8px 12px 16px;
}
.step .cmd__text {
  white-space: normal;
  word-break: break-all;
  line-height: 1.5;
}
.reqs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 24px 0 0;
  font-size: 14.5px;
}
.reqs b {
  margin-right: 6px;
  font-weight: 700;
}

/* ───────────────────────── Compare ───────────────────────── */
.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.compare__col {
  border-radius: var(--r-3xl);
  padding: clamp(24px, 3.5vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.compare__col--us {
  background: var(--primary-container);
  color: var(--on-primary-container);
}
.compare__col--studio {
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--card-edge);
}
.compare__col h3 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.2;
  font-variation-settings: "ROND" 100;
}
.compare__col > p {
  margin: 0;
  opacity: 0.86;
}
.compare__list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 3px;
}
.compare__list li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 13px 16px;
  font-size: 15.5px;
  border-radius: var(--r-s);
  background: color-mix(in srgb, var(--surface-lowest) 55%, transparent);
}
.compare__col--studio .compare__list li {
  background: var(--surface-low);
}
:root[data-theme-state="dark"] .compare__col--studio .compare__list li {
  background: var(--surface-high);
}
.compare__list li:first-child {
  border-radius: var(--r-xl) var(--r-xl) var(--r-s) var(--r-s);
}
.compare__list li:last-child {
  border-radius: var(--r-s) var(--r-s) var(--r-xl) var(--r-xl);
}
.compare__list .ms {
  font-size: 24px;
}
.compare__col--us .compare__list .ms {
  color: var(--primary);
}
.compare__col--studio .compare__list .ms {
  color: var(--on-surface-variant);
}
.compare__both {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px 32px;
  border-radius: var(--r-full);
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}
.compare__both .ms {
  font-size: 30px;
}
.compare__both p {
  margin: 0;
  font-size: 16px;
}
.compare__both code {
  background: color-mix(in srgb, var(--surface-lowest) 60%, transparent);
  padding: 1px 6px;
  border-radius: 6px;
}

/* ───────────────────────── What's new ───────────────────────── */
.news {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 12px;
}
.release {
  border-radius: var(--r-3xl);
  padding: clamp(24px, 3.5vw, 36px);
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--card-edge);
}
:root .release--featured {
  background: var(--tertiary-container);
  color: var(--on-tertiary-container);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.release--featured > svg {
  position: absolute;
  z-index: -1;
  right: -70px;
  bottom: -90px;
  width: 260px;
  height: 260px;
  fill: color-mix(in srgb, var(--on-tertiary-container) 7%, transparent);
  animation: spin 60s linear infinite;
}
.release__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.release__ver {
  font-size: 32px;
  font-weight: 780;
  letter-spacing: -0.02em;
  font-variation-settings: "ROND" 100;
}
.release__date {
  font-size: 14px;
  opacity: 0.75;
}
.release ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.release li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  font-size: 15.5px;
  line-height: 1.5;
}
.release li .ms {
  font-size: 22px;
  color: var(--primary);
}
.release--featured li .ms {
  color: inherit;
}
.release li code {
  background: color-mix(in srgb, currentColor 10%, transparent);
}
.release__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  height: 44px;
  padding: 0 18px;
  border-radius: 22px;
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  font-weight: 650;
  font-size: 15px;
  text-decoration: none;
  transition: border-radius 0.4s var(--spring-fast);
}
.release__more:active {
  border-radius: var(--r-m);
}
.release--featured .release__more {
  background: var(--surface-lowest);
  color: var(--on-surface);
}

/* ───────────────────────── FAQ (Android 16 grouped list) ───────────────────────── */
.faq {
  max-width: 860px;
  margin-inline: auto;
  display: grid;
  gap: 3px;
}
.faq details {
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--card-edge);
  border-radius: var(--r-s);
  transition: border-radius 0.5s var(--spring-fast), background-color 0.25s, margin 0.4s var(--spring);
}
.faq details:first-child {
  border-top-left-radius: var(--r-xl);
  border-top-right-radius: var(--r-xl);
}
.faq details:last-child {
  border-bottom-left-radius: var(--r-xl);
  border-bottom-right-radius: var(--r-xl);
}
:root .faq details[open] {
  border-radius: var(--r-xl);
  margin: 6px 0;
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}
.faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 20px 20px 26px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 640;
  font-variation-settings: "ROND" 100;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary .ms {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 20px;
  background: var(--surface-high);
  font-size: 22px;
  transition: transform 0.5s var(--spring), border-radius 0.5s var(--spring-fast), background-color 0.2s;
}
.faq details[open] summary .ms {
  transform: rotate(45deg);
  border-radius: var(--r-m);
  background: var(--surface-lowest);
}
.faq details p {
  margin: 0;
  padding: 0 26px 24px;
  font-size: 16px;
}
.faq details p code {
  background: color-mix(in srgb, currentColor 10%, transparent);
}

/* ───────────────────────── Final CTA ───────────────────────── */
.final {
  padding: 0 0 clamp(80px, 10vw, 120px);
}
.final__card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--r-3xl);
  padding: clamp(56px, 8vw, 112px) clamp(24px, 5vw, 64px);
  text-align: center;
  background: var(--final-bg);
  color: var(--final-ink);
}
.final__card > svg {
  position: absolute;
  z-index: -1;
  fill: var(--final-shape);
  animation: spin 50s linear infinite;
}
.final__card > svg:nth-of-type(1) {
  left: -90px;
  top: -110px;
  width: 340px;
  height: 340px;
}
.final__card > svg:nth-of-type(2) {
  right: -80px;
  bottom: -120px;
  width: 380px;
  height: 380px;
  animation-direction: reverse;
}
.final__card > svg:nth-of-type(3) {
  right: 18%;
  top: 34px;
  width: 90px;
  height: 90px;
  animation-duration: 20s;
}
.final h2 {
  font-size: clamp(38px, 6vw, 78px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 790;
  font-variation-settings: "ROND" 100;
  margin: 0 auto 18px;
  max-width: 880px;
  text-wrap: balance;
}
.final p {
  margin: 0 auto 32px;
  font-size: 19px;
  opacity: 0.86;
}
.final .btn--brand {
  background: var(--navy);
  color: #fff;
}
:root[data-theme-state="dark"] .final .btn--brand {
  background: var(--brand);
  color: var(--brand-ink);
}
.final .btn--outlined {
  color: inherit;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, currentColor 45%, transparent);
}

/* ───────────────────────── Footer ───────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  background: var(--surface-low);
  padding: 56px 0 40px;
  font-size: 14.5px;
  color: var(--on-surface-variant);
  border-radius: var(--r-3xl) var(--r-3xl) 0 0;
}
.footer__top {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.footer__about {
  max-width: 360px;
}
.footer__about p {
  margin: 14px 0 0;
}
.footer__about .brand {
  color: var(--on-surface);
}
.footer__cols {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}
.footer__col h4 {
  margin: 0 0 12px;
  font-size: 14.5px;
  color: var(--on-surface);
  font-variation-settings: "ROND" 100;
}
.footer__col a {
  display: block;
  padding: 4px 0;
  text-decoration: none;
}
.footer__col a:hover {
  color: var(--primary);
}
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
  margin: 40px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--outline-variant);
  font-size: 13px;
  line-height: 1.6;
}
.footer__legal span:first-child {
  color: var(--on-surface);
  font-weight: 600;
}
.footer__legal a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--outline-variant);
  text-underline-offset: 3px;
}
.footer__legal a:hover {
  color: var(--primary);
  text-decoration-color: currentColor;
}

/* ───────────────────────── Extended FAB ───────────────────────── */
.fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  padding: 0 24px 0 20px;
  border-radius: var(--r-l);
  background: var(--brand);
  color: var(--brand-ink);
  font: 680 17px/1 var(--font-sans);
  font-variation-settings: "ROND" 100;
  text-decoration: none;
  box-shadow: var(--elev-3);
  transform: translateY(140%) scale(0.8);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.6s var(--spring), opacity 0.3s, border-radius 0.5s var(--spring-fast);
}
.fab.is-on {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}
.fab:hover {
  border-radius: var(--r-xl);
}
.fab:active {
  border-radius: var(--r-s);
}
.fab .ms {
  font-size: 24px;
}

/* ───────────────────────── Language menu ───────────────────────── */
.lang {
  position: relative;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 14px 0 10px;
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: var(--on-surface-variant);
  font: 600 14px/1 var(--font-sans);
  cursor: pointer;
  transition: background-color 0.2s, border-radius 0.4s var(--spring-fast);
}
.lang-btn:hover,
.lang-btn[aria-expanded="true"] {
  background: color-mix(in srgb, var(--on-surface) 8%, transparent);
  color: var(--on-surface);
}
.lang-btn .ms {
  font-size: 21px;
}
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 200px;
  padding: 6px;
  border-radius: var(--r-xl);
  background: var(--surface-high);
  box-shadow: var(--elev-3);
  display: grid;
  gap: 2px;
  transform-origin: top right;
  transition: opacity 0.2s var(--emph), transform 0.35s var(--spring);
}
.menu[hidden] {
  display: grid;
  opacity: 0;
  transform: scale(0.9) translateY(-6px);
  pointer-events: none;
  visibility: hidden;
}
.menu__item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-s);
  background: transparent;
  color: var(--on-surface);
  font: 550 15px/1 var(--font-sans);
  text-align: left;
  cursor: pointer;
}
.menu__item:first-child {
  border-radius: 22px 22px var(--r-s) var(--r-s);
}
.menu__item:last-child {
  border-radius: var(--r-s) var(--r-s) 22px 22px;
}
.menu__item:hover {
  background: color-mix(in srgb, var(--on-surface) 8%, transparent);
}
.menu__item[aria-checked="true"] {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}
.menu__item .ms {
  margin-left: auto;
  font-size: 20px;
  visibility: hidden;
}
.menu__item[aria-checked="true"] .ms {
  visibility: visible;
}
.menu__item small {
  color: var(--on-surface-variant);
  font-size: 12.5px;
  font-weight: 500;
}

/* Simplified Chinese: CJK-friendly tracking and leading */
:lang(zh) body {
  line-height: 1.75;
}
:lang(zh) .hero__title,
:lang(zh) .h2,
:lang(zh) .final h2 {
  letter-spacing: 0;
  line-height: 1.22;
}
:lang(zh) .hero__title {
  font-size: clamp(38px, 6vw, 72px);
}
:lang(zh) .tile h3,
:lang(zh) .step h3,
:lang(zh) .faq summary {
  letter-spacing: 0;
}

/* ───────────────────────── Reveal ───────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal {
    opacity: 0;
    transform: translateY(24px) scale(0.985);
    transition: opacity 0.7s var(--emph-decel), transform 0.9s var(--spring);
    transition-delay: var(--d, 0ms);
  }
  html.js .reveal.is-in {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ───────────────────────── Responsive ───────────────────────── */
@media (max-width: 1000px) {
  .tour {
    grid-template-columns: minmax(0, 1fr);
    max-width: none;
  }
  .tour__side {
    position: static;
  }
  .tour__list {
    overflow: visible;
  }
}
@media (max-width: 1060px) {
  .nav__links {
    display: none;
  }
  .tile,
  .tile--7,
  .tile--5 {
    grid-column: span 6;
  }
  .ai__grid,
  .news,
  .loop,
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
  .loop__arrow {
    transform: rotate(90deg);
  }
  .shape--3,
  .shape--6 {
    display: none;
  }
}
@media (max-width: 720px) {
  body {
    font-size: 16px;
  }
  .nav {
    padding-top: 8px;
  }
  .nav__gh {
    display: none;
  }
  .nav__bar {
    height: 58px;
    padding: 0 8px;
  }
  .brand {
    font-size: 15px;
    gap: 6px;
  }
  .brand__mark {
    width: 38px;
    height: 38px;
  }
  .tile,
  .tile--7,
  .tile--5 {
    grid-column: 1 / -1;
  }
  .tile {
    padding: 22px;
  }
  .compare {
    grid-template-columns: minmax(0, 1fr);
  }
  .compare__both {
    border-radius: var(--r-2xl);
    flex-direction: column;
    align-items: flex-start;
  }
  .hero__ctas .btn {
    flex: 1 1 auto;
  }
  .announce {
    font-size: 13.5px;
  }
  .hide-sm {
    display: none;
  }
  .tour {
    padding: 8px;
    border-radius: var(--r-2xl);
  }
  .tour__stage {
    border-radius: var(--r-xl);
  }
  .lang-btn .lang-btn__code {
    display: none;
  }
  .lang-btn {
    width: 44px;
    padding: 0;
    justify-content: center;
  }
  .keys {
    grid-template-columns: 1fr;
  }
  .shape--1 { --size: 150px; left: -50px; }
  .shape--2 { --size: 100px; right: -30px; }
  .shape--4,
  .shape--5 { display: none; }
  .fab {
    right: 16px;
    bottom: 16px;
    height: 56px;
  }
}

/* Small phones: the toolbar can't fit the Install button next to language + theme;
   the hero CTA and the extended FAB cover it. */
@media (max-width: 440px) {
  .nav__bar > .btn--brand {
    display: none;
  }
}

/* Custom phone glyph (Material Symbols' phones carry a side button that reads as a glitch when small) */
svg.ico {
  fill: currentColor;
  font-family: inherit;
}
