/* RouteLink website. One stylesheet: tokens, base, components, sections, responsive. */

/* ---------- Tokens ---------- */

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

:root {
  --blue: #0a5bff;
  --teal: #14c8c8;
  --green: #30c85a;
  --orange: #ff9f0a;
  --grad: linear-gradient(120deg, #0a5bff 0%, #1a8cff 45%, #14c8c8 100%);
  --ease: cubic-bezier(.2, .75, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI Variable Display", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --nav-h: 60px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f5f7fb;
  --text: #0b0f17;
  --text-2: #4a5465;
  --text-3: #8a93a3;
  --line: rgba(15, 23, 42, .08);
  --line-2: rgba(15, 23, 42, .15);
  --hover: rgba(15, 23, 42, .06);
  --glass: rgba(255, 255, 255, .62);
  --glass-line: rgba(255, 255, 255, .75);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 10px 30px -12px rgba(15, 30, 70, .22);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 14px 36px -18px rgba(15, 30, 70, .18);
  --shadow-lg: 0 40px 90px -30px rgba(20, 45, 110, .35);
  --aurora-1: rgba(10, 91, 255, .2);
  --aurora-2: rgba(20, 200, 200, .2);
  --aurora-3: rgba(130, 90, 255, .12);
  --grid: rgba(15, 23, 42, .05);
  --accent: #0a5bff;
  --accent-2: #0db0b3;
  --tint: rgba(10, 91, 255, .09);
  --seg-bg: rgba(15, 23, 42, .06);
  --seg-thumb: #ffffff;
  --spot: rgba(10, 91, 255, .07);
  --sweep: rgba(10, 91, 255, .32);
  --skel-1: #e9edf3;
  --skel-2: #f6f8fb;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #05070c;
  --surface: #0e121a;
  --surface-2: #141924;
  --text: #f2f5fa;
  --text-2: #a4aebd;
  --text-3: #6c7688;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .15);
  --hover: rgba(255, 255, 255, .08);
  --glass: rgba(20, 25, 35, .55);
  --glass-line: rgba(255, 255, 255, .12);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 10px 30px -12px rgba(0, 0, 0, .7);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 36px -18px rgba(0, 0, 0, .8);
  --shadow-lg: 0 40px 90px -30px rgba(0, 0, 0, .85);
  --aurora-1: rgba(10, 91, 255, .28);
  --aurora-2: rgba(20, 200, 200, .16);
  --aurora-3: rgba(120, 80, 255, .16);
  --grid: rgba(255, 255, 255, .045);
  --accent: #4b8bff;
  --accent-2: #2fd5d5;
  --tint: rgba(75, 139, 255, .14);
  --seg-bg: rgba(255, 255, 255, .07);
  --seg-thumb: rgba(255, 255, 255, .14);
  --spot: rgba(75, 139, 255, .1);
  --sweep: rgba(75, 139, 255, .4);
  --skel-1: #121722;
  --skel-2: #1a2030;
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 30px);
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

.js body { opacity: 0; }
.js.ready body { opacity: 1; transition: opacity .6s ease; }

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font: inherit; color: inherit; }
::selection { background: rgba(10, 91, 255, .22); }

:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 10px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.i {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.i.fill { fill: currentColor; stroke: none; }

.container { width: min(100% - 40px, 1200px); margin-inline: auto; }

.grad {
  background: var(--grad);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 8s linear infinite;
}

/* ---------- Backdrop ---------- */

.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; will-change: transform; }
.aurora.a1 { top: -30vmax; left: -20vmax; background: radial-gradient(closest-side, var(--aurora-1), transparent); animation: drift-a 26s ease-in-out infinite alternate; }
.aurora.a2 { top: -10vmax; right: -30vmax; background: radial-gradient(closest-side, var(--aurora-2), transparent); animation: drift-b 32s ease-in-out infinite alternate; }
.aurora.a3 { bottom: -40vmax; left: 10vmax; background: radial-gradient(closest-side, var(--aurora-3), transparent); animation: drift-c 38s ease-in-out infinite alternate; }
.grid-lines {
  position: absolute;
  inset: 0 0 auto;
  height: 110vh;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 20%, transparent 75%);
}

/* ---------- Glass, buttons, pills ---------- */

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-shadow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 650;
  font-size: .98rem;
  letter-spacing: -.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .35s var(--spring), translate .4s var(--ease), box-shadow .35s var(--ease), background-color .3s, filter .3s;
}
.btn:active { transform: scale(.97); }
.btn-sm { height: 38px; padding: 0 16px; font-size: .9rem; }
.btn-lg { height: 54px; padding: 0 28px; font-size: 1.04rem; }
.btn-primary {
  color: #fff;
  background: var(--grad);
  background-size: 140% 100%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 12px 30px -12px rgba(10, 91, 255, .75);
}
.btn-primary:hover { filter: brightness(1.08) saturate(1.05); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 18px 40px -12px rgba(10, 91, 255, .85); }
.btn-glass {
  color: var(--text);
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  border-color: var(--glass-line);
  box-shadow: var(--glass-shadow);
}
.btn-glass:hover { background: var(--surface); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background-color .25s, transform .35s var(--spring);
}
.icon-btn:hover { background: var(--hover); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.glass:hover { background: var(--surface); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 15px 7px 11px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-2);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 2.2s ease-out infinite; }

.eyebrow {
  display: inline-block;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
:lang(zh) .eyebrow { letter-spacing: .2em; }

h1, h2 { font-weight: 800; letter-spacing: -.04em; }
:lang(zh) h1, :lang(zh) h2 { letter-spacing: -.01em; }
h2 { font-size: clamp(2rem, 4.8vw, 3.6rem); line-height: 1.06; }
:lang(zh) h2 { line-height: 1.18; }
h3 { letter-spacing: -.02em; }
.lead { font-size: clamp(1.04rem, 1.35vw, 1.22rem); line-height: 1.65; color: var(--text-2); }

/* ---------- Navigation ---------- */

.nav { position: fixed; z-index: 50; top: 12px; left: 0; right: 0; padding: 0 12px; pointer-events: none; }
.nav-bar {
  pointer-events: auto;
  max-width: 1160px;
  height: var(--nav-h);
  margin: 0 auto;
  padding: 0 10px 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  transition: background-color .3s, box-shadow .3s, border-color .3s;
}
.nav:not(.scrolled) .nav-bar { background: transparent; border-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.08rem; letter-spacing: -.02em; }
.brand img { border-radius: 8px; box-shadow: 0 4px 14px -6px rgba(10, 91, 255, .6); }
.nav-links { display: flex; gap: 2px; margin: 0 auto; list-style: none; }
.nav-links a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: .93rem;
  font-weight: 560;
  color: var(--text-2);
  transition: color .2s, background-color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--hover); }
.nav-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-links + .nav-actions { margin-left: 0; }
.lang-btn span { font-weight: 750; font-size: .84rem; }
.nav-cta { margin-left: 6px; }

.theme-btn { position: relative; }
.theme-btn .i { position: absolute; transition: transform .6s var(--spring), opacity .3s; }
[data-theme="light"] .theme-btn .sun { opacity: 0; transform: rotate(-90deg) scale(.4); }
[data-theme="dark"] .theme-btn .moon { opacity: 0; transform: rotate(90deg) scale(.4); }

.menu-btn { display: none; }
.burger, .burger::before, .burger::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .4s var(--spring), opacity .2s;
}
.burger { position: relative; }
.burger::before, .burger::after { content: ''; position: absolute; left: 0; }
.burger::before { top: -6px; }
.burger::after { top: 6px; }
.nav.open .burger { background: transparent; }
.nav.open .burger::before { transform: translateY(6px) rotate(45deg); }
.nav.open .burger::after { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  pointer-events: none;
  position: absolute;
  top: calc(var(--nav-h) + 8px);
  left: 12px;
  right: 12px;
  padding: 10px;
  border-radius: 26px;
  display: grid;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(.98);
  transform-origin: top center;
  transition: opacity .25s, transform .4s var(--spring), visibility 0s .4s;
}
.mobile-menu a { padding: 14px 16px; border-radius: 16px; font-weight: 600; font-size: 1.05rem; }
.mobile-menu a:hover { background: var(--hover); }
.nav.open .mobile-menu { pointer-events: auto; opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }

/* ---------- Device frames ---------- */

.device { container-type: inline-size; }
.phone {
  position: relative;
  padding: 3.2cqw;
  border-radius: 15.6cqw;
  background: linear-gradient(150deg, #3a3e46 0%, #16181d 40%, #0c0d10 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .16),
    inset 0 0 0 .9cqw #07080a,
    0 2px 4px rgba(0, 0, 0, .18),
    0 30px 60px -28px rgba(10, 30, 80, .55),
    0 50px 100px -40px rgba(10, 40, 120, .35);
}
.phone.ios::before, .phone.ios::after {
  content: '';
  position: absolute;
  width: 1cqw;
  border-radius: 1cqw;
  background: linear-gradient(90deg, #2b2e35, #4a4e57);
}
.phone.ios::before { right: -.7cqw; top: 25%; height: 11%; }
.phone.ios::after { left: -.7cqw; top: 20%; height: 7%; box-shadow: 0 9cqw 0 #3a3e46; }
.phone.android { border-radius: 11cqw; padding: 2.8cqw; }
.phone.android::after {
  content: '';
  position: absolute;
  z-index: 2;
  top: 5.6cqw;
  left: 50%;
  width: 3.6cqw;
  height: 3.6cqw;
  margin-left: -1.8cqw;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a3140 0 25%, #050608 45%);
  box-shadow: 0 0 0 .5cqw rgba(0, 0, 0, .55);
}
.screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1206 / 2622;
  border-radius: 12.6cqw;
  background: linear-gradient(110deg, var(--skel-1) 30%, var(--skel-2) 50%, var(--skel-1) 70%);
  background-size: 220% 100%;
  animation: skeleton 1.6s linear infinite;
  transform: translateZ(0);
}
.phone.android .screen { aspect-ratio: 9 / 20; border-radius: 8.4cqw; }
.screen.loaded { animation: none; }
.screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  user-select: none;
  -webkit-user-drag: none;
}
.screen img.shot-next { opacity: 0; transition: opacity .5s var(--ease); }
.screen img.shot-next.in { opacity: 1; }

/* ---------- Hero ---------- */

.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 120px 0 90px; }
.hero-grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: 40px; align-items: center; }
.hero-title { margin: 24px 0 20px; font-size: clamp(2.9rem, 7vw, 5.7rem); line-height: 1.02; }
:lang(zh) .hero-title { line-height: 1.1; }
.hero-lead { max-width: 33em; font-size: clamp(1.06rem, 1.45vw, 1.26rem); line-height: 1.65; color: var(--text-2); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 30px; list-style: none; font-size: .9rem; color: var(--text-3); }
.hero-meta li { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta .i { width: 16px; height: 16px; color: var(--green); stroke-width: 2.4; }
.hero-meta b { color: var(--text-2); font-weight: 650; }

.hero-visual { position: relative; container-type: inline-size; perspective: 1600px; }
.hero-stage {
  --mx: 0;
  --my: 0;
  position: relative;
  width: 100%;
  aspect-ratio: 560 / 600;
  transform-style: preserve-3d;
  transform: rotateY(calc(var(--mx) * 7deg)) rotateX(calc(var(--my) * -6deg));
}
.layer {
  --d: 1;
  position: absolute;
  transform: translate3d(calc(var(--mx) * var(--d) * 14px), calc(var(--my) * var(--d) * 12px), calc(var(--d) * 30px));
}
.hero-halo {
  position: absolute;
  inset: 8% 6%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--aurora-1), transparent 70%), radial-gradient(closest-side at 70% 60%, var(--aurora-2), transparent 70%);
  filter: blur(10px);
}
.hero-ios { left: 20%; top: 2%; width: 49%; }
.hero-android { left: 56%; top: 9%; width: 41%; }
.hero-ios .phone { transform: rotate(-4deg); }
.hero-android .phone { transform: rotate(6deg); }

.float-card {
  border-radius: 22px;
  padding: 14px 16px;
  font-size: clamp(11px, 2.4cqw, 14.5px);
  color: var(--text);
  animation: bob 7s ease-in-out infinite;
}
.fc-head { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.fc-icon { display: inline-grid; place-items: center; width: 2em; height: 2em; border-radius: .65em; color: #fff; }
.fc-icon .i { width: 1.2em; height: 1.2em; stroke-width: 2.2; }
.fc-icon.blue { background: linear-gradient(135deg, #0a5bff, #3d8bff); }
.fc-icon.teal { background: linear-gradient(135deg, #0fb5b8, #3ad8c8); }
.card-live { left: -3%; top: 56%; width: 46%; animation-delay: -2s; }
.fc-rates { display: flex; gap: 1.4em; margin: .7em 0 .3em; }
.fc-rates small { display: block; color: var(--text-3); font-weight: 600; font-size: .8em; }
.fc-rates b { font-size: 1.55em; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fc-rates em { font-style: normal; font-size: .78em; font-weight: 650; color: var(--text-3); margin-left: .25em; }
.rate.down { color: var(--accent); }
.rate.up { color: var(--accent-2); }
.spark { display: block; width: 100%; height: 4.2em; overflow: visible; }
.spark-down, .spark-up { fill: none; stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark-down { stroke: var(--accent); }
.spark-up { stroke: var(--accent-2); opacity: .9; }
.card-devices { right: -4%; top: 3%; width: 31%; animation-delay: -4s; }
.fc-big { display: flex; align-items: baseline; gap: .5em; margin-top: .5em; }
.fc-big b { font-size: 2.6em; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.fc-big span { color: var(--text-3); font-weight: 600; font-size: .85em; line-height: 1.3; }
.card-toast { right: -5%; top: 79%; width: 52%; display: flex; align-items: center; gap: .8em; border-radius: 20px; animation-delay: -1s; }
.card-toast img { width: 2.4em; height: 2.4em; border-radius: .6em; flex: none; }
.card-toast b { display: block; font-weight: 700; }
.card-toast span { display: block; color: var(--text-2); font-size: .9em; line-height: 1.35; }

.scroll-hint { position: absolute; left: 50%; bottom: 26px; translate: -50% 0; width: 26px; height: 42px; border-radius: 14px; border: 2px solid var(--line-2); }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--text-3); animation: wheel 2s var(--ease) infinite; }

/* intro and reveal */
.js .intro { opacity: 0; transform: translateY(26px); filter: blur(10px); }
.ready .intro {
  opacity: 1;
  transform: none;
  filter: none;
  transition: opacity 1s var(--ease), transform 1.1s var(--ease), filter 1s var(--ease);
  transition-delay: calc(var(--i, 0) * 110ms + 120ms);
}
.js [data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  /* hover effects use translate and box-shadow, so they stay undelayed */
  transition: opacity .9s var(--ease), transform 1s var(--ease), translate .5s var(--ease), box-shadow .5s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 90ms), 0s, 0s;
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Marquee ---------- */

.marquee {
  padding: 22px 0;
  border-block: 1px solid var(--line);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 46s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; flex: none; gap: 44px; padding-right: 44px; list-style: none; }
.marquee li { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font-weight: 600; color: var(--text-2); }
.marquee li .i { color: var(--accent); }
.marquee li:not(:has(.i))::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--grad); }

/* ---------- Sections ---------- */

.section { position: relative; padding: clamp(72px, 9vw, 124px) 0; }
.section-head { max-width: 780px; margin: 0 auto clamp(44px, 6vw, 76px); text-align: center; }
.section-head h2 { margin: 14px 0 18px; }
.section-head.left { margin-left: 0; text-align: left; }
.section-head.row { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 28px; max-width: none; text-align: left; }
.section-head.row > div { max-width: 640px; }

/* ---------- Segmented controls (shared) ---------- */

.seg, .tab-list {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--seg-bg);
}
.seg button, .tab-list button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border: 0;
  border-radius: 999px;
  background: none;
  font-weight: 650;
  font-size: .88rem;
  white-space: nowrap;
  color: var(--text-2);
  cursor: pointer;
  transition: color .3s;
}
.seg button[aria-selected="true"], .tab-list button[aria-selected="true"] { color: var(--text); }
.seg-lg button { padding: 10px 20px; font-size: .98rem; }
.seg-lg .i { width: 18px; height: 18px; }
.seg-thumb, .tab-thumb {
  position: absolute;
  z-index: 0;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: var(--seg-thumb);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 6px 16px -6px rgba(0, 0, 0, .2);
  transition: transform .5s var(--spring), width .5s var(--spring);
}
.no-anim .seg-thumb, .no-anim .tab-thumb, .seg-thumb.no-anim, .tab-thumb.no-anim { transition: none; }

/* ---------- Bento ---------- */

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.tile {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 26px;
  min-height: 380px;
  padding: 30px;
  border-radius: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: translate .5s var(--ease), box-shadow .5s var(--ease), opacity .9s var(--ease), transform 1s var(--ease);
}
.tile::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(500px circle at var(--x, 50%) var(--y, 0%), var(--spot), transparent 45%);
  opacity: 0;
  transition: opacity .4s;
}
.tile:hover { translate: 0 -4px; box-shadow: var(--shadow-lg); }
.tile:hover::before { opacity: 1; }
.tile > :last-child { margin-top: auto; }
.tile-text h3 { margin: 16px 0 8px; font-size: 1.36rem; }
.tile-text p { color: var(--text-2); font-size: .98rem; line-height: 1.6; max-width: 34em; }
.tile-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--tint); color: var(--accent); }
.tile-icon .i { width: 22px; height: 22px; }
.tile-discover, .tile-traffic, .tile-ai, .tile-widgets { grid-column: span 3; }
.tile-safe, .tile-ssh, .tile-multi, .tile-demo { grid-column: span 2; }
.tile-glass { grid-column: span 4; }

/* radar */
.tile-discover { flex-direction: row; align-items: center; }
.tile-discover .tile-text { flex: 1 1 45%; }
.radar { position: relative; flex: 1 1 55%; max-width: 300px; aspect-ratio: 1; margin: 0 auto !important; }
.radar-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--line-2); }
.radar-ring.r2 { inset: 18%; }
.radar-ring.r3 { inset: 36%; border-style: dashed; }
.radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 280deg, var(--sweep) 360deg);
  animation: spin 4s linear infinite;
}
.radar-core {
  position: absolute;
  inset: 41%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 0 0 6px var(--tint), 0 10px 24px -8px rgba(10, 91, 255, .7);
}
.radar-core .i { width: 55%; height: 55%; }
.blip { position: absolute; left: calc(50% + cos(var(--a)) * var(--r) / 2); top: calc(50% + sin(var(--a)) * var(--r) / 2); }
.blip i {
  position: absolute;
  width: 11px;
  height: 11px;
  margin: -5.5px 0 0 -5.5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--tint);
  animation: blip 4s var(--t) linear infinite;
}
.blip span {
  position: absolute;
  top: 10px;
  left: 50%;
  translate: -50% 0;
  padding: 4px 9px;
  border-radius: 9px;
  background: var(--glass);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: .72rem;
  white-space: nowrap;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.blip span b { color: var(--text); margin-right: 4px; }

/* traffic bars */
.traffic-demo { display: grid; gap: 18px; }
.traffic-demo .seg { justify-self: start; }
.bars { list-style: none; display: grid; gap: 14px; }
.bars li { display: grid; grid-template-columns: 20px minmax(96px, 128px) 1fr 4.6em; align-items: center; gap: 12px; font-size: .9rem; font-weight: 600; }
.bars .i { width: 18px; height: 18px; color: var(--text-3); }
.bars .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 8px; border-radius: 99px; background: var(--seg-bg); overflow: hidden; }
.bar i { display: block; width: var(--w, 0%); height: 100%; border-radius: inherit; background: var(--grad); transition: width 1.1s var(--ease); }
.bars b { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }

/* safe change ring */
.safe-demo { position: relative; display: grid; justify-items: center; gap: 16px; --p: 1; --ring: var(--accent); }
.safe-demo[data-state="confirmed"] { --ring: var(--green); }
.safe-demo[data-state="rolled"] { --ring: var(--orange); }
.ring { width: 150px; height: 150px; transform: rotate(-90deg); overflow: visible; }
.ring-track, .ring-bar { fill: none; stroke-width: 9; }
.ring-track { stroke: var(--seg-bg); }
.ring-bar { stroke: var(--ring); stroke-linecap: round; stroke-dasharray: 326.73; stroke-dashoffset: calc(326.73 * (1 - var(--p))); transition: stroke .4s; filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--ring) 40%, transparent)); }
.ring-center { position: absolute; top: 0; width: 150px; height: 150px; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.ring-num { font-size: 2.5rem; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.ring-center small { color: var(--text-3); font-weight: 600; }
.safe-status { position: relative; width: 100%; height: 1.8em; }
.st { position: absolute; left: 50%; top: 0; translate: -50% 8px; opacity: 0; white-space: nowrap; font-weight: 650; font-size: .95rem; transition: opacity .35s, translate .5s var(--spring); }
.safe-demo[data-state="waiting"] .st.waiting { opacity: 1; translate: -50% 0; color: var(--text-2); }
.safe-demo[data-state="confirmed"] .st.confirmed { opacity: 1; translate: -50% 0; color: var(--green); }
.safe-demo[data-state="rolled"] .st.rolled { opacity: 1; translate: -50% 0; color: var(--orange); }

/* terminal */
.term {
  overflow: hidden;
  border-radius: 18px;
  background: #0a0d14;
  border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .7);
  font-family: var(--mono);
  font-size: .76rem;
  color: #d6deeb;
}
.term-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #111622; }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: auto; color: #7c879d; font-size: .7rem; }
.term-body { height: 10.4em; margin: 0; padding: 12px 14px; overflow: hidden; line-height: 1.6; white-space: pre-wrap; word-break: break-all; display: flex; flex-direction: column; justify-content: flex-end; }
.term-body .p { color: #7fdbca; }
.term-body .o { color: #9aa4b8; }
.caret { display: inline-block; width: .55em; height: 1.05em; margin-left: 1px; vertical-align: -.15em; background: #7fdbca; animation: blink 1.05s steps(1) infinite; }
.term-keys { display: flex; gap: 6px; padding: 9px 12px; background: #111622; overflow: hidden; }
.term-keys span { padding: 3px 9px; border-radius: 7px; background: #1c2333; color: #c4cede; font-size: .7rem; }

/* routers */
.multi-demo { display: grid; gap: 14px; }
.capsule { justify-self: start; display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px 9px 14px; border-radius: 999px; font-weight: 700; }
.capsule .i { width: 16px; height: 16px; color: var(--text-3); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent); flex: none; }
.capsule-names { display: inline-grid; overflow: hidden; }
.capsule-names span { grid-area: 1 / 1; opacity: 0; translate: 0 110%; transition: translate .55s var(--spring), opacity .35s; }
.capsule-names span.on { opacity: 1; translate: 0 0; }
.capsule-names span.out { opacity: 0; translate: 0 -110%; }
.router-list { list-style: none; overflow: hidden; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); }
.router-list li { display: grid; grid-template-columns: 20px 1fr auto 18px; align-items: center; gap: 10px; padding: 11px 14px; font-weight: 600; font-size: .92rem; transition: background-color .3s; }
.router-list li + li { border-top: 1px solid var(--line); }
.router-list .i { width: 18px; height: 18px; color: var(--text-3); }
.router-list small { color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.router-list .tick { color: var(--accent); opacity: 0; transform: scale(.4); transition: opacity .3s, transform .5s var(--spring); stroke-width: 2.6; }
.router-list li.on { background: var(--tint); }
.router-list li.on .tick { opacity: 1; transform: none; }

/* chat */
.chat { display: flex; flex-direction: column; gap: 10px; }
.bubble {
  max-width: 86%;
  padding: 10px 15px;
  border-radius: 20px;
  font-size: .92rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(10px) scale(.96);
  transition: opacity .4s, transform .55s var(--spring);
}
.bubble.show { opacity: 1; transform: none; }
.bubble.me { align-self: flex-end; transform-origin: right bottom; background: var(--grad); color: #fff; border-bottom-right-radius: 6px; }
.bot-slot { display: grid; align-self: flex-start; max-width: 86%; }
.bot-slot > * { grid-area: 1 / 1; align-self: start; justify-self: start; max-width: 100%; }
.bubble.bot { transform-origin: left bottom; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: typing 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
.confirm-chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 14px;
  border: 1px dashed color-mix(in srgb, var(--orange) 60%, transparent);
  background: color-mix(in srgb, var(--orange) 10%, transparent);
  color: color-mix(in srgb, var(--orange) 80%, var(--text));
  font-size: .85rem;
  font-weight: 650;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s, transform .5s var(--spring);
}
.confirm-chip .i { width: 17px; height: 17px; }
.confirm-chip.show { opacity: 1; transform: none; }
.providers { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; list-style: none; }
.providers li { padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line-2); font-size: .76rem; font-weight: 650; color: var(--text-2); }

/* widgets */
.widgets-demo { position: relative; min-height: 270px; display: flex; align-items: flex-end; justify-content: center; gap: 16px; padding-top: 70px; }
.widget { width: 44%; max-width: 190px; height: auto; border-radius: 20px; box-shadow: 0 24px 50px -24px rgba(10, 30, 80, .5); }
.w-router { rotate: -4deg; }
.w-speed { align-self: center; rotate: 3deg; }
.toast {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(94%, 360px);
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  border-radius: 20px;
  opacity: 0;
  translate: -50% -40px;
  scale: .96;
  transition: translate .7s var(--spring), opacity .4s, scale .6s var(--spring);
}
.toast.show { opacity: 1; translate: -50% 0; scale: 1; }
.toast img { border-radius: 8px; }
.toast b { display: block; font-size: .88rem; }
.toast span { display: block; font-size: .8rem; color: var(--text-2); line-height: 1.35; }
.toast small { align-self: start; color: var(--text-3); font-size: .72rem; }

/* liquid glass */
.glass-demo { position: relative; min-height: 220px; overflow: hidden; border-radius: 24px; background: var(--surface-2); border: 1px solid var(--line); }
.glass-scene i { position: absolute; border-radius: 40%; animation: scene 14s ease-in-out infinite alternate; }
.glass-scene i:nth-child(1) { width: 160px; height: 120px; left: 6%; top: 18%; background: linear-gradient(135deg, #0a5bff, #5aa0ff); }
.glass-scene i:nth-child(2) { width: 130px; height: 130px; left: 34%; top: 45%; background: linear-gradient(135deg, #14c8c8, #7af0d8); animation-duration: 11s; animation-delay: -4s; }
.glass-scene i:nth-child(3) { width: 150px; height: 110px; left: 62%; top: 12%; background: linear-gradient(135deg, #ff9f0a, #ffd166); animation-duration: 16s; animation-delay: -8s; }
.glass-scene i:nth-child(4) { width: 110px; height: 110px; left: 82%; top: 50%; background: linear-gradient(135deg, #a855f7, #ec4899); animation-duration: 13s; animation-delay: -2s; }
.tabbar {
  position: absolute;
  left: 50%;
  bottom: 20px;
  translate: -50% 0;
  isolation: isolate;
  display: flex;
  padding: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 45%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(190%);
  backdrop-filter: blur(16px) saturate(190%);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-shadow), inset 0 -1px 0 rgba(255, 255, 255, .15);
  max-width: calc(100% - 24px);
}
.tabbar button {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 70px;
  padding: 7px 10px;
  border: 0;
  border-radius: 999px;
  background: none;
  font-size: .7rem;
  font-weight: 650;
  color: var(--text);
  cursor: pointer;
  transition: color .3s;
}
.tabbar button[aria-selected="true"] { color: var(--accent); }
.tabbar .i { width: 22px; height: 22px; }
.tabbar .tab-thumb {
  top: 6px;
  bottom: 6px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 4px 14px -6px rgba(0, 0, 0, .25);
}

/* demo mode */
.tile-demo > :last-child { margin-top: 0; }
.demo-capsule { margin-top: auto; justify-self: start; align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 999px; font-weight: 700; }
.demo-capsule .off { display: none; }
.tile-demo.off .demo-capsule .on { display: none; }
.tile-demo.off .demo-capsule .off { display: inline; color: var(--text-3); }
.tile-demo.off .demo-capsule .dot { background: var(--text-3); box-shadow: none; }
.demo-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 650; cursor: pointer; }
.demo-switch input { position: absolute; opacity: 0; pointer-events: none; }
.demo-switch i { position: relative; flex: none; width: 52px; height: 32px; border-radius: 99px; background: var(--line-2); transition: background-color .3s; }
.demo-switch i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .45s var(--spring); }
.demo-switch input:checked + i { background: var(--green); }
.demo-switch input:checked + i::after { transform: translateX(20px); }
.demo-switch input:focus-visible + i { outline: 2.5px solid var(--accent); outline-offset: 3px; }

/* ---------- Tour ---------- */

.tour-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.step { min-height: 76vh; display: flex; flex-direction: column; justify-content: center; max-width: 30em; opacity: .25; transition: opacity .6s var(--ease); }
.step.active { opacity: 1; }
.step-num { font-family: var(--mono); font-size: .85rem; font-weight: 600; color: var(--accent); }
.step-tag { margin-top: 6px; font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.step h3 { margin: 10px 0 16px; font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.12; letter-spacing: -.03em; font-weight: 780; }
:lang(zh) .step h3 { letter-spacing: 0; line-height: 1.25; }
.step p { font-size: 1.08rem; line-height: 1.75; color: var(--text-2); }
.step-shot { display: none; }
.tour-stage { position: relative; }
.tour-sticky { position: sticky; top: calc(50vh - min(36vh, 340px)); height: min(72vh, 680px); display: grid; place-items: center; }
.tour-sticky .device { position: relative; width: clamp(220px, 30vh, 310px); }
.tour-sticky .phone { transform: rotate(-2deg); transition: transform 1s var(--ease); }
.tour-halo { position: absolute; inset: 10% 0; border-radius: 50%; background: radial-gradient(closest-side, var(--aurora-1), transparent 70%), radial-gradient(closest-side at 60% 70%, var(--aurora-2), transparent 70%); }
.tour-dots { position: absolute; right: 0; top: 50%; translate: 0 -50%; display: grid; gap: 10px; list-style: none; }
.tour-dots li { width: 6px; height: 6px; border-radius: 99px; background: var(--line-2); transition: height .5s var(--spring), background-color .3s; }
.tour-dots li.on { height: 28px; background: var(--accent); }

/* ---------- Gallery ---------- */

.rail-wrap { position: relative; }
.rail {
  --edge: max(20px, calc((100vw - 1200px) / 2));
  display: flex;
  gap: 28px;
  padding: 24px var(--edge) 40px;
  scroll-padding-inline: var(--edge);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  cursor: grab;
  transition: opacity .3s, translate .4s var(--ease);
}
.rail::-webkit-scrollbar { display: none; }
.rail.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.rail.swapping { opacity: 0; translate: 0 12px; }
.shot-card { flex: none; width: clamp(180px, 20vw, 240px); scroll-snap-align: start; }
.shot-card .device { transition: transform .6s var(--ease); }
.shot-card:hover .device { transform: translateY(-10px); }
.shot-card figcaption { margin-top: 18px; text-align: center; font-weight: 650; color: var(--text-2); }
.rail-controls { display: flex; align-items: center; gap: 24px; }
.rail-progress { flex: 1; height: 3px; border-radius: 99px; background: var(--line); overflow: hidden; }
.rail-progress i { display: block; width: var(--w, 20%); height: 100%; margin-left: var(--l, 0%); border-radius: inherit; background: var(--grad); transition: margin-left .15s linear; }
.rail-buttons { display: flex; gap: 10px; }
.rail-buttons .icon-btn { width: 46px; height: 46px; }

/* ---------- Feature tabs ---------- */

.tabs { max-width: 1000px; margin: 0 auto; }
.tab-list { display: flex; width: fit-content; max-width: 100%; margin: 0 auto 36px; overflow-x: auto; scrollbar-width: none; }
.tab-list::-webkit-scrollbar { display: none; }
.tab-list button { padding: 10px 22px; font-size: .96rem; }
.tab-panel { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.tab-panel[hidden] { display: none; }
.tab-panel li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 550;
  line-height: 1.5;
  animation: rise .6s var(--ease) both;
  animation-delay: calc(var(--n, 0) * 45ms);
}
.tab-panel li::before, .checks li::before {
  content: '';
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 12.5l3.5 3.5 7.5-8'/%3E%3C/svg%3E") center / 14px no-repeat, var(--grad);
}

/* ---------- Plugin ---------- */

.plugin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.plugin-grid > * { min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 30px; }
.stats > div { padding: 20px 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.stats dt { font-size: clamp(1.6rem, 2.8vw, 2.2rem); font-weight: 800; letter-spacing: -.03em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stats dt b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats dd { margin-top: 2px; font-size: .9rem; color: var(--text-2); }
.checks { list-style: none; display: grid; gap: 14px; }
.checks li { display: flex; gap: 12px; color: var(--text-2); line-height: 1.55; }
.browser {
  overflow: hidden;
  border-radius: 18px;
  padding: 0;
  box-shadow: var(--shadow-lg), var(--glass-shadow);
}
.browser-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.browser-bar i:nth-child(2) { background: #febc2e; }
.browser-bar i:nth-child(3) { background: #28c840; }
.browser-bar span { flex: 1; min-width: 0; margin-left: 10px; padding: 5px 12px; border-radius: 9px; background: var(--seg-bg); color: var(--text-3); font: .74rem/1.4 var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.caption { margin: 14px 0 30px; text-align: center; font-size: .86rem; color: var(--text-3); }
.install { padding: 22px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.code-pane { position: relative; margin-top: 16px; }
.code-pane[hidden] { display: none; }
.code {
  margin: 0;
  padding: 46px 18px 18px;
  border-radius: 16px;
  background: #0a0d14;
  color: #d6deeb;
  font: .76rem/1.7 var(--mono);
  overflow-x: auto;
  white-space: pre;
}
.code .c { color: #6b7d8f; }
.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
  color: #d6deeb;
  font-size: .74rem;
  font-weight: 650;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.copy-btn:hover { background: rgba(255, 255, 255, .12); }
.copy-btn .i { width: 15px; height: 15px; }
.copy-btn.done { color: #7ee2a8; }
.install-app { padding: 18px 20px; border-radius: 16px; background: var(--tint); color: var(--accent); font-weight: 750; font-size: 1.05rem; }
.hint { margin-top: 14px; font-size: .86rem; line-height: 1.6; color: var(--text-3); }

/* ---------- LuCI page (drawn, demo data) ---------- */

.lm-wrap { margin-top: clamp(48px, 7vw, 84px); }
.js .lm-wrap[data-reveal] { transform: perspective(1800px) rotateX(10deg) translateY(50px) scale(.96); transform-origin: center top; transition-duration: 1.3s; }
.js .lm-wrap[data-reveal].is-in { transform: none; }
.lm {
  --lm-bg: #f4f5f7;
  --lm-card: #ffffff;
  --lm-text: #32325d;
  --lm-muted: #8898aa;
  --lm-line: #e9ecef;
  --lm-soft: #f6f9fc;
  --lm-btn: #f0f1f4;
  --lm-primary: #5e72e4;
  --lm-band: linear-gradient(90deg, #5e72e4, #6b7cf0);
  --lm-down: #2f7cf6;
  --lm-up: #f5a524;
  container-type: inline-size;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: var(--shadow-lg), var(--glass-shadow);
}
[data-theme="dark"] .lm {
  --lm-bg: #12151d;
  --lm-card: #1b1f2a;
  --lm-text: #dde2ee;
  --lm-muted: #7c869a;
  --lm-line: #282d3a;
  --lm-soft: #202531;
  --lm-btn: #262b38;
  --lm-primary: #7486f2;
  --lm-band: linear-gradient(90deg, #3b469e, #4855b8);
}
.browser-bar b { font-weight: inherit; color: var(--text-2); }
.lm-page {
  position: relative;
  height: clamp(520px, 62vw, 680px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--lm-bg);
  color: var(--lm-text);
  font-size: 13.5px;
  line-height: 1.5;
  scrollbar-width: thin;
  scrollbar-color: var(--lm-line) transparent;
}
.lm-band { height: 74px; padding: 14px 22px; display: flex; align-items: flex-start; gap: 14px; background: var(--lm-band); color: #fff; }
.lm-brand { font-weight: 800; letter-spacing: -.02em; font-size: 15px; }
.lm-crumb { opacity: .75; font-size: 12.5px; padding-top: 2px; }
.lm-body { margin-top: -30px; padding: 0 20px 22px; display: grid; gap: 14px; }
.lm-card { min-width: 0; background: var(--lm-card); border-radius: 8px; padding: 16px 18px; box-shadow: 0 1px 3px rgba(50, 50, 93, .1), 0 1px 0 rgba(0, 0, 0, .02); }
[data-theme="dark"] .lm-card { box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.lm-card h2 { font-size: 17px; font-weight: 700; letter-spacing: 0; }
.lm-card h3 { margin-bottom: 10px; font-size: 14.5px; font-weight: 700; letter-spacing: 0; }
.lm-card h3 b { font-variant-numeric: tabular-nums; }
.lm-tabs { display: flex; gap: 2px; padding: 0 8px; overflow-x: auto; scrollbar-width: none; }
.lm-tabs::-webkit-scrollbar { display: none; }
.lm-tabs button {
  position: relative;
  flex: none;
  padding: 13px 13px 11px;
  border: 0;
  background: none;
  color: var(--lm-text);
  font-size: 13.5px;
  cursor: pointer;
  transition: color .2s, background-color .2s;
}
.lm-tabs button::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--lm-primary); transform: scaleX(0); transition: transform .35s var(--ease); }
.lm-tabs button:hover { color: var(--lm-primary); }
.lm-tabs button[aria-selected="true"] { color: var(--lm-primary); background: color-mix(in srgb, var(--lm-primary) 9%, transparent); }
.lm-tabs button[aria-selected="true"]::after { transform: none; }
.lm-pane { display: grid; gap: 14px; animation: lm-in .45s var(--ease); }
.lm-pane[hidden] { display: none; }
.lm-desc, .lm-note { color: var(--lm-muted); font-size: 12.5px; }
.lm-desc { margin-top: 6px; }
.lm-note { margin-top: 8px; }
.lm-chart { display: block; width: 100%; height: 130px; margin-top: 6px; overflow: visible; }
.lm-chart.tall { height: 170px; }
.lm-chart .grid { stroke: var(--lm-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.lm-chart .line { fill: none; stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.lm-axis { display: flex; justify-content: space-between; margin-top: 4px; color: var(--lm-muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.lm-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.lm-btns button, .lm-btn {
  display: inline-block;
  padding: 6px 11px;
  border: 0;
  border-radius: 4px;
  background: var(--lm-btn);
  color: var(--lm-muted);
  font-size: 12.5px;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.lm-btns button:hover { color: var(--lm-text); }
.lm-btns button.on, .lm-btn.primary { background: var(--lm-primary); color: #fff; }
.lm-btn.primary { justify-self: start; margin-top: 12px; }
.lm-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12.5px; }
.lm-select, .lm-input { display: inline-block; padding: 5px 10px; border: 1px solid var(--lm-line); border-radius: 4px; background: var(--lm-card); color: var(--lm-muted); font-size: 12.5px; }
.lm-input { min-width: 120px; font-family: var(--mono); font-size: 12px; }
.lm-totals { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 4px 0 2px; }
.lm-totals b { display: block; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lm-totals small { color: var(--lm-muted); font-size: 12px; }
.lm-totals.big b { font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.lm-subtabs { display: flex; gap: 6px; margin-bottom: 10px; }
.lm-subtabs span { padding: 6px 13px; border-radius: 4px 4px 0 0; background: var(--lm-btn); font-size: 12.5px; }
.lm-subtabs span.on { color: var(--lm-primary); box-shadow: inset 0 -2px 0 var(--lm-primary); background: color-mix(in srgb, var(--lm-primary) 9%, var(--lm-card)); }
.lm-table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.lm-table th { padding: 9px 10px; background: var(--lm-soft); font-weight: 600; text-align: left; border-bottom: 1px solid var(--lm-line); white-space: nowrap; }
.lm-table td { padding: 9px 10px; border-bottom: 1px solid var(--lm-line); vertical-align: middle; }
.lm-table tr:last-child td { border-bottom: 0; }
.lm-table tbody tr { transition: background-color .2s; }
.lm-table tbody tr:hover { background: var(--lm-soft); }
.lm-table a { color: var(--lm-primary); }
.lm-table td small { display: block; color: var(--lm-muted); font-size: 11.5px; }
.lm-top td:first-child { width: 34%; }
.lm-top td:last-child, .lm-rank td:last-child { width: 24%; }
.lm-kv td:first-child { width: 34%; color: var(--lm-muted); }
.lm-bar, .lm-meter { display: block; height: 6px; border-radius: 6px; background: var(--lm-line); overflow: hidden; }
.lm-bar::before { content: ''; display: block; width: var(--w); height: 100%; border-radius: inherit; background: var(--lm-down); transition: width .8s var(--ease); }
.lm-meter i { display: block; width: var(--w); height: 100%; border-radius: inherit; background: var(--lm-primary); }
.lm-usage { display: grid; gap: 10px; }
.lm-usage > div { display: grid; grid-template-columns: minmax(90px, 1fr) 60px 2fr auto; align-items: center; gap: 12px; }
.lm-usage span:not(.lm-meter), .lm-usage small { color: var(--lm-muted); font-variant-numeric: tabular-nums; }
.lm-usage .warn i { background: var(--orange); }
.lm-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--c); }
.lm-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; list-style: none; font-size: 12px; }
.lm-legend li { display: inline-flex; align-items: center; gap: 6px; }
.lm-legend li::before { content: ''; width: 14px; height: 3px; border-radius: 2px; background: var(--c); }
.lm-check { display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1px solid var(--lm-line); border-radius: 4px; background: var(--lm-card); vertical-align: middle; }
.lm-check.on { border-color: var(--lm-primary); background: var(--lm-primary); }
.lm-check.on::after { content: ''; width: 8px; height: 4px; margin-top: -2px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.lm-ok { color: #2dce89; }
.lm-form { display: grid; grid-template-columns: minmax(110px, 30%) 1fr; gap: 12px 18px; align-items: start; }
.lm-form > span { padding-top: 4px; text-align: right; }
.lm-form small { display: block; margin-top: 4px; color: var(--lm-muted); font-size: 12px; }
.lm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lm-chips span { padding: 4px 10px; border-radius: 4px; border: 1px solid var(--lm-line); font-family: var(--mono); font-size: 12px; }
.lm-chips .add { color: var(--lm-primary); }
@keyframes lm-in { from { opacity: 0; transform: translateY(8px); } }

@container (max-width: 640px) {
  .lm-page { font-size: 12.5px; }
  .lm-body { padding: 0 10px 14px; gap: 10px; }
  .lm-band { padding: 12px 14px; }
  .lm-card { padding: 13px 12px; }
  .hide-narrow, .lm-rank td:nth-child(3), .lm-rank th:nth-child(3), .lm-rank td small { display: none; }
  .lm-table th, .lm-table td { padding: 8px 6px; }
  .lm-form { grid-template-columns: 1fr; gap: 4px; }
  .lm-form > span { padding-top: 8px; text-align: left; font-weight: 600; }
  .lm-usage > div { grid-template-columns: 1fr auto; }
  .lm-usage .lm-meter { grid-column: 1 / -1; }
  .lm-totals.big b { font-size: 21px; }
}

/* ---------- Privacy ---------- */

.privacy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.p-card {
  padding: 30px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: translate .5s var(--ease), box-shadow .5s var(--ease), opacity .9s var(--ease), transform 1s var(--ease);
}
.p-card:hover { translate: 0 -4px; box-shadow: var(--shadow-lg); }
.p-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 16px; background: var(--grad); color: #fff; box-shadow: 0 12px 26px -12px rgba(10, 91, 255, .8); }
.p-icon .i { width: 24px; height: 24px; }
.p-card h3 { margin: 20px 0 8px; font-size: 1.18rem; }
.p-card p { color: var(--text-2); line-height: 1.6; font-size: .96rem; }

/* ---------- Download ---------- */

.cta-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(44px, 6vw, 84px) clamp(20px, 5vw, 64px);
  border-radius: 40px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.cta-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(from var(--angle), transparent 0 55%, #0a5bff 70%, #14c8c8 85%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: angle 7s linear infinite;
  pointer-events: none;
}
.cta-glow { position: absolute; inset: -30% -10% auto; z-index: -1; height: 90%; background: radial-gradient(closest-side, var(--aurora-1), transparent), radial-gradient(closest-side at 80% 40%, var(--aurora-2), transparent); }
.cta-panel .section-head { margin-bottom: 44px; }
.cta-icon { display: block; margin: 0 auto 22px; border-radius: 22px; box-shadow: 0 22px 44px -16px rgba(10, 91, 255, .7); animation: bob 6s ease-in-out infinite; }
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dl-card { display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: 26px; background: var(--surface-2); border: 1px solid var(--line); transition: translate .5s var(--ease), box-shadow .5s; }
.dl-card:hover { translate: 0 -4px; box-shadow: var(--shadow); }
.dl-card h3 { font-size: 1.3rem; }
.dl-card ul { flex: 1; display: grid; align-content: start; gap: 8px; list-style: none; font-size: .94rem; line-height: 1.5; color: var(--text-2); }
.dl-card li { position: relative; padding-left: 16px; }
.dl-card li::before { content: ''; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--grad); }
.dl-card .btn { align-self: flex-start; }
.dl-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: var(--tint); color: var(--accent); }
.dl-icon .i { width: 24px; height: 24px; }
.dl-version { margin-top: 28px; text-align: center; color: var(--text-3); font-size: .92rem; }
.dl-version b { color: var(--text-2); }
.dl-version a { color: var(--accent); font-weight: 600; }
.dl-version a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Footer ---------- */

.footer { padding: 50px 0 64px; border-top: 1px solid var(--line); font-size: .92rem; color: var(--text-2); }
.footer-grid { display: grid; grid-template-columns: 1.1fr 1fr 1.4fr; gap: 32px; align-items: start; }
.footer-brand p { margin-top: 10px; color: var(--text-3); }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.footer-links a:hover { color: var(--text); }
.footer-note p { color: var(--text-3); }
.footer-note p + p { margin-top: 6px; }
.footer-note a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }

/* ---------- Theme switch transition ---------- */

.theme-vt::view-transition-old(root), .theme-vt::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Keyframes ---------- */

@keyframes shimmer { to { background-position: 200% center; } }
@keyframes drift-a { to { transform: translate(12vmax, 8vmax) scale(1.1); } }
@keyframes drift-b { to { transform: translate(-14vmax, 10vmax) scale(.9); } }
@keyframes drift-c { to { transform: translate(10vmax, -12vmax) scale(1.15); } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(48, 200, 90, .55); }
  70%, 100% { box-shadow: 0 0 0 9px rgba(48, 200, 90, 0); }
}
@keyframes bob { 50% { translate: 0 -10px; } }
@keyframes wheel {
  0% { opacity: 0; transform: translateY(-2px); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(12px); }
}
@keyframes skeleton { to { background-position: -220% 0; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blip {
  0% { transform: scale(1.9); box-shadow: 0 0 0 10px transparent, 0 0 18px var(--accent); }
  25% { transform: scale(1); box-shadow: 0 0 0 4px var(--tint); }
  100% { transform: scale(1); box-shadow: 0 0 0 4px var(--tint); }
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes typing { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes scene { to { transform: translate(-60px, 20px) rotate(25deg) scale(1.15); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes angle { to { --angle: 360deg; } }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .nav-links a { padding: 8px 10px; }
  .tile { padding: 26px; }
}

@media (max-width: 959px) {
  .nav-links, .nav-cta { display: none; }
  .menu-btn { display: inline-grid; }
  .hero { padding-top: 110px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-copy { display: grid; justify-items: center; }
  .hero-cta, .hero-meta { justify-content: center; }
  .hero-visual { width: min(100%, 560px); margin: 0 auto; }
  .card-live { left: 0; }
  .card-devices { right: 0; }
  .card-toast { right: 0; }
  .scroll-hint { display: none; }

  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile-discover, .tile-traffic, .tile-glass { grid-column: span 2; }
  .tile-safe, .tile-ssh, .tile-multi, .tile-ai, .tile-widgets, .tile-demo { grid-column: span 1; }

  .tour-grid { grid-template-columns: 1fr; gap: 0; }
  .tour-stage { display: none; }
  .step { min-height: 0; max-width: none; padding: 34px 0; opacity: 1; text-align: center; }
  .step + .step { border-top: 1px solid var(--line); }
  .step-shot { display: block; width: min(250px, 62vw); margin: 34px auto 0; }

  .plugin-grid { grid-template-columns: 1fr; gap: 44px; }
  .privacy-grid { grid-template-columns: repeat(2, 1fr); }
  .dl-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-note { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 32px, 1200px); }
  .nav { top: 8px; padding: 0 8px; }
  .nav-bar { padding: 0 6px 0 12px; }
  .hide-sm { display: none; }
  .hero-title { font-size: clamp(2.6rem, 12vw, 3.6rem); }
  .btn-lg { height: 50px; padding: 0 22px; font-size: 1rem; }
  .float-card { padding: 10px 12px; border-radius: 16px; }
  .card-toast { border-radius: 16px; }
  .card-devices { top: 0; width: 34%; }

  .bento { grid-template-columns: 1fr; gap: 14px; }
  .tile-discover, .tile-traffic, .tile-glass, .tile-safe, .tile-ssh, .tile-multi, .tile-ai, .tile-widgets, .tile-demo { grid-column: auto; }
  .tile { min-height: 0; padding: 24px; border-radius: 26px; }
  .tile-discover { flex-direction: column; align-items: stretch; }
  .radar { width: 82%; }
  .bars li { grid-template-columns: 18px minmax(80px, 1fr) 1fr 4.4em; gap: 10px; font-size: .84rem; }
  .tabbar button { min-width: 0; padding: 7px 8px; }
  .tabbar span { display: none; }

  .section-head.row { align-items: flex-start; }
  .tab-panel { grid-template-columns: 1fr; }
  .tab-list { margin-left: 0; }
  .stats > div { padding: 16px; }
  .privacy-grid { grid-template-columns: 1fr; }
  .cta-panel { border-radius: 30px; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (hover: none) {
  .tile:hover, .p-card:hover, .dl-card:hover { translate: none; }
  .shot-card:hover .device { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
  .js .intro, .js [data-reveal] { opacity: 1; transform: none; filter: none; }
}
