/* ============================================================
   纸飞机 (Telegram) 官网模板 - 全站样式
   风格：Telegram 蓝 + 清爽留白 + 圆角卡片
   支持：响应式 / 深色模式 / 滚动动画
   ============================================================ */

/* ---------- 设计变量 ---------- */
:root {
  --primary: #229ED9;
  --primary-dark: #1B8BC1;
  --primary-light: #5FB8E6;
  --primary-soft: #E8F6FD;
  --accent: #2AABEE;

  --bg: #FFFFFF;
  --bg-alt: #F5F9FC;
  --bg-card: #FFFFFF;
  --bg-nav: rgba(255, 255, 255, 0.85);

  --text: #10212E;
  --text-secondary: #5E7285;
  --text-muted: #8FA3B3;

  --border: #E4EDF4;
  --shadow-sm: 0 1px 2px rgba(16, 33, 46, 0.05);
  --shadow-md: 0 8px 24px rgba(34, 158, 217, 0.10);
  --shadow-lg: 0 16px 48px rgba(16, 33, 46, 0.14);

  --gradient: linear-gradient(135deg, #2AABEE 0%, #229ED9 45%, #1680B3 100%);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Helvetica Neue", Arial, sans-serif;

  --nav-height: 64px;
  --container: 1160px;
}

/* 深色模式 */
html[data-theme="dark"] {
  --bg: #17212B;
  --bg-alt: #1E2A36;
  --bg-card: #212E3B;
  --bg-nav: rgba(23, 33, 43, 0.88);

  --text: #F2F6F9;
  --text-secondary: #A6B6C4;
  --text-muted: #738697;

  --border: #2C3B49;
  --primary-soft: #1C3448;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
}

/* ---------- 基础重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* 仅供屏幕阅读器与搜索引擎识别的隐藏文本（不影响视觉布局） */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text);
}

p {
  margin: 0 0 1em;
}

ul, ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}

button {
  font-family: inherit;
}

::selection {
  background: var(--primary);
  color: #fff;
}

/* ---------- 布局工具 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 88px 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
}

.section-head p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 0;
}

.eyebrow {
  display: inline-block;
  padding: 5px 14px;
  margin-bottom: 16px;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 28px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease,
    background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn svg {
  flex: none;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(34, 158, 217, 0.35);
}

.btn--primary:hover {
  background: var(--primary-dark);
  color: #fff;
  box-shadow: 0 10px 26px rgba(34, 158, 217, 0.45);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn--ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn--light {
  background: #fff;
  color: var(--primary-dark);
}

.btn--light:hover {
  background: #F0FAFF;
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.btn--outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.65);
}

.btn--outline-light:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  transform: translateY(-2px);
}

.btn--sm {
  padding: 9px 20px;
  font-size: 0.92rem;
}

.btn--block {
  width: 100%;
}

/* ---------- 顶部导航 ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--bg-nav);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease,
    background-color 0.25s ease;
}

.navbar.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.navbar__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: var(--nav-height);
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text);
  flex: none;
}

.navbar__logo:hover {
  color: var(--primary);
}

.navbar__logo svg {
  width: 34px;
  height: 34px;
}

.navbar__menu {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 1;
}

.navbar__menu a {
  position: relative;
  display: inline-block;
  padding: 8px 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.navbar__menu a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.navbar__menu a:hover {
  color: var(--primary);
}

.navbar__menu a:hover::after,
.navbar__menu a.is-active::after {
  transform: scaleX(1);
}

.navbar__menu a.is-active {
  color: var(--primary);
  font-weight: 600;
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease,
    background-color 0.2s ease;
}

.theme-toggle:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.theme-toggle .icon-moon {
  display: none;
}

html[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle .icon-moon {
  display: inline-flex;
}

.navbar__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.navbar__toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.navbar__toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar__toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.navbar__toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero 首屏 ---------- */
.hero {
  position: relative;
  padding: calc(var(--nav-height) + 72px) 0 80px;
  background: var(--bg);
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero::before {
  width: 560px;
  height: 560px;
  top: -260px;
  right: -160px;
  background: radial-gradient(circle, rgba(42, 171, 238, 0.16), transparent 68%);
}

.hero::after {
  width: 440px;
  height: 440px;
  bottom: -240px;
  left: -150px;
  background: radial-gradient(circle, rgba(42, 171, 238, 0.10), transparent 68%);
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 56px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  margin-bottom: 24px;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.88rem;
  font-weight: 600;
}

.hero__badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #31A24C;
  box-shadow: 0 0 0 4px rgba(49, 162, 76, 0.18);
}

.hero h1 {
  color: var(--text);
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.hero__subtitle {
  max-width: 540px;
  margin: 0 0 34px;
  font-size: clamp(1rem, 2vw, 1.14rem);
  color: var(--text-secondary);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.hero__note {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.hero__device {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero__device::before {
  content: "";
  position: absolute;
  inset: 8% 10%;
  border-radius: 48px;
  background: var(--gradient);
  opacity: 0.16;
  filter: blur(48px);
  pointer-events: none;
}

.phone {
  position: relative;
  width: 300px;
  max-width: 100%;
  padding: 12px;
  border-radius: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.phone__notch {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 84px;
  height: 7px;
  border-radius: var(--radius-pill);
  background: var(--border);
  z-index: 2;
}

.phone__screen {
  border-radius: 30px;
  overflow: hidden;
  background: #DCEDF8;
  border: 1px solid var(--border);
}

html[data-theme="dark"] .phone__screen {
  background: #24384A;
}

.phone__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 26px 16px 12px;
  background: var(--primary);
  color: #fff;
}

.phone__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  font-size: 0.82rem;
  font-weight: 700;
  flex: none;
}

.phone__title {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.3;
}

.phone__status {
  display: block;
  font-size: 0.68rem;
  opacity: 0.82;
}

.phone__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-height: 292px;
  padding: 16px 12px;
}

.phone__input {
  display: flex;
  align-items: center;
  margin: 0 12px 14px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: #fff;
  color: #8FA3B3;
  font-size: 0.8rem;
}

html[data-theme="dark"] .phone__input {
  background: #1E2A36;
}

.chat-bubble {
  max-width: 78%;
  padding: 10px 15px;
  margin-bottom: 12px;
  border-radius: 16px;
  font-size: 0.92rem;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(9, 60, 90, 0.12);
}

.chat-bubble--in {
  background: #fff;
  color: #10212E;
  border-bottom-left-radius: 4px;
}

.chat-bubble--out {
  background: #EFFDDE;
  color: #10212E;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.chat-bubble .meta {
  display: block;
  margin-top: 3px;
  font-size: 0.72rem;
  color: #8FA3B3;
  text-align: right;
}

.chat-typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 11px 16px;
  border-radius: 16px 16px 16px 4px;
  background: #fff;
}

.chat-typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #B9CBD8;
  animation: typing 1.2s infinite ease-in-out;
}

.chat-typing i:nth-child(2) {
  animation-delay: 0.15s;
}

.chat-typing i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

/* ---------- 首页 Logo 区（复刻 telegram.org 官网首页原版 tl_main_logo_wrap，尺寸为原版一半） ---------- */
.tl_main_logo_wrap {
  text-align: center;
  max-width: 400px;
  margin: 0 auto;
  padding-top: 60px;
  position: relative;
}

a.tl_main_logo {
  display: block;
}

div.tl_main_logo {
  width: 80px;
  height: 80px;
  margin: 32px auto 0;
  background: url("https://telegram.org/img/t_logo.png") 50% 50% no-repeat;
  background-size: 80px 80px;
}

.tl_main_logo_title_image {
  display: block;
  width: 144px;
  height: 36px;
  margin: 14px auto 0;
}

.tl_main_logo_lead {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 140%;
  color: var(--text-muted);
}

html[data-theme="dark"] .tl_main_logo_title_image path {
  fill: var(--text);
}

/* 移动端：Logo 区进一步缩小 */
@media (max-width: 640px) {
  .tl_main_logo_wrap {
    padding-top: 48px;
  }

  div.tl_main_logo {
    width: 64px;
    height: 64px;
    margin: 30px auto 0;
    background-size: 64px 64px;
  }

  .tl_main_logo_title_image {
    width: 108px;
    height: 27px;
    margin: 12px auto 0;
  }

  .tl_main_logo_lead {
    margin: 7px 0 0;
    font-size: 13px;
  }
}

/* ---------- 首页下载模块（完全复刻 telegram.org 官网首页原版 tl_main_download_mobile） ---------- */
.tl-download-area {
  position: relative;
  padding: 18px 0 48px;
}

.clearfix::before,
.clearfix::after {
  content: " ";
  display: table;
}

.clearfix::after {
  clear: both;
}

.tl_main_download_mobile {
  text-align: center;
  max-width: 1028px;
  margin: 0 auto;
}

.tl_main_download_link {
  text-align: center;
  display: inline-block;
  height: 300px;
  padding-top: 262px;
  padding-bottom: 20px;
  margin: 40px 0;
  font-size: 15px;
  line-height: 18px;
  max-width: 100%;
  position: relative;
  color: #0088CC;
}

a.tl_main_download_link:hover {
  text-decoration: none;
  color: #0088CC;
}

a.tl_main_download_link::after {
  display: block;
  height: 3px;
  background: #179CDE;
  position: absolute;
  border-radius: 2px;
  content: "";
  left: 4px;
  right: 4px;
  opacity: 0;
  bottom: -1px;
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
  transform-origin: center bottom;
  transform: scaleX(0.3) scaleY(0);
}

a.tl_main_download_link:hover::after {
  opacity: 1;
  transform: scaleX(1) scaleY(1);
}

.tl_main_download_link_android {
  width: 28.2101%;
  min-width: 245px;
}

.tl_main_download_link_ios {
  width: 42.9961%;
  min-width: 350px;
}

.tl_main_download_link_tdesktop {
  display: none;
  min-width: 320px;
  background: url("https://telegram.org/img/SiteTDesktop.webp") 50% 0 no-repeat;
}

.tl_main_download_image__ios,
.tl_main_download_image__android {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: 50% 50%;
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.1s ease-in-out;
  padding: 0;
  border: 0;
}

.tl_main_download_image__ios {
  margin: -150px 0 0 -152px;
  width: 304px;
  height: 240px;
  background: url("https://telegram.org/img/SiteiOS.webp") 50% 0 no-repeat;
}

.tl_main_download_image__android {
  margin: -150px 0 0 -152px;
  width: 304px;
  height: 240px;
  background: url("https://telegram.org/img/SiteAndroid.webp") 50% 0 no-repeat;
}

.tl_main_video_player {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: 50% 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s ease-in-out;
  padding: 0;
  border: 0;
}

.tl_main_video_player.video__init_retina {
  display: none;
}

.tl_main_video_player__android {
  margin: -150px 0 0 -96px;
  width: 192px;
  height: 240px;
}

.tl_main_video_player__ios {
  margin: -150px 0 0 -152px;
  width: 304px;
  height: 240px;
}

.video_play .tl_main_video_player {
  opacity: 1;
}

.tl_main_download_more_btn {
  font-weight: normal;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  background-image: none;
  border: 0;
  white-space: nowrap;
  font-size: 15px;
  line-height: 1.33;
  -webkit-user-select: none;
  user-select: none;
  color: #fff;
  background-color: #318FD3;
  margin-top: 5px;
  display: none;
  border-radius: 999px;
  padding: 10px 22px;
}

.tl_main_download_more_btn:hover {
  color: #fff;
  text-decoration: none;
}

/* 下载卡片平台图标（官网同款：currentColor 遮罩上色） */
.icon {
  display: inline-block;
}

.icon-android,
.icon-ios {
  display: inline-block;
  vertical-align: text-top;
  width: 25px;
  height: 27px;
  background: 0 0 no-repeat;
  margin-right: 10px;
  margin-top: -6px;
}

.icon-ios {
  background-image: url("https://telegram.org/img/SiteIconApple.svg");
}

.icon-android {
  background-image: url("https://telegram.org/img/SiteIconAndroid.svg");
}

.icon-arrow-more {
  display: inline-block;
  vertical-align: baseline;
  width: 6px;
  height: 11px;
  background: url("https://telegram.org/img/tl_arrow.png") 0 0 no-repeat;
  margin-left: 10px;
}

.tl_main_download_link .icon-android,
.tl_main_download_link .icon-ios {
  background: none currentcolor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
}

.tl_main_download_link .icon-android {
  -webkit-mask-image: url("https://telegram.org/img/SiteIconAndroid.svg");
  mask-image: url("https://telegram.org/img/SiteIconAndroid.svg");
  -webkit-mask-size: 22px 27px;
  mask-size: 22px 27px;
}

.tl_main_download_link .icon-ios {
  -webkit-mask-image: url("https://telegram.org/img/SiteIconApple.svg");
  mask-image: url("https://telegram.org/img/SiteIconApple.svg");
  -webkit-mask-size: 21px 27px;
  mask-size: 21px 27px;
}

/* 桌面端区块（Telegram for PC / Linux + macOS，官网同款） */
.tl_main_download_desktop_header {
  text-align: center;
}

.tl_main_download_desktop_wrap1 {
  height: 291px;
  overflow: hidden;
}

.tl_main_download_desktop_wrap {
  position: absolute;
  left: 0;
  right: 0;
}

.tl_main_download_desktop {
  position: absolute;
  left: 0;
  right: 0;
  min-width: 804px;
  background: url("https://telegram.org/img/SiteDesktop.webp") 50% 19px no-repeat;
}

.tl_main_download_desktop_links {
  width: 595px;
  margin: 0 auto;
}

.tl_main_download_desktop_link {
  text-align: center;
  display: inline-block;
  padding: 270px 0 20px;
  font-size: 15px;
  line-height: 18px;
  vertical-align: top;
  transition: box-shadow 0.2s ease-in-out;
  position: relative;
  float: left;
  color: #0088CC;
}

.tl_main_download_desktop_link:hover {
  text-decoration: none;
  color: #0088CC;
}

a.tl_main_download_desktop_link::after {
  display: block;
  height: 3px;
  background: #179CDE;
  position: absolute;
  border-radius: 2px;
  content: "";
  left: 4px;
  right: 4px;
  opacity: 0;
  bottom: -1px;
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
  transform-origin: center bottom;
  transform: scaleX(0.3) scaleY(0);
}

a.tl_main_download_desktop_link:hover::after {
  opacity: 1;
  transform: scaleX(1) scaleY(1);
}

.tl_main_download_link_td {
  width: 52%;
  padding-left: 20px;
  padding-right: 20px;
}

.tl_main_download_link_osx {
  width: 48%;
}

/* 深色模式（官网 dark 规则同款） */
html[data-theme="dark"] .video_play .tl_main_video_player {
  opacity: 0;
}

html[data-theme="dark"] .tl_main_download_link,
html[data-theme="dark"] .tl_main_download_link b,
html[data-theme="dark"] .tl_main_download_desktop_link,
html[data-theme="dark"] .tl_main_download_desktop_link b {
  color: #6AB2F2;
}

html[data-theme="dark"] a.tl_main_download_link::after,
html[data-theme="dark"] a.tl_main_download_desktop_link::after {
  background: #6AB2F2;
}

/* 2x 高分屏适配（官网同款） */
@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
  only screen and (min--moz-device-pixel-ratio: 1.5),
  only screen and (min-device-pixel-ratio: 1.5),
  only screen and (min-resolution: 144dpi) {
  .icon-arrow-more {
    background-image: url("https://telegram.org/img/tl_arrow_2x.png");
    background-size: 6px 11px;
  }

  .tl_main_download_desktop {
    background-image: url("https://telegram.org/img/SiteDesktop_2x.webp");
    background-size: 1246px 260px;
  }

  .tl_main_download_image__android {
    background-image: url("https://telegram.org/img/SiteAndroid_2x.webp");
    background-size: 290px 270px;
  }

  .tl_main_download_image__ios {
    background-image: url("https://telegram.org/img/SiteiOS_2x.webp");
    background-size: 442px 270px;
  }

  .tl_main_download_link_tdesktop {
    background-image: url("https://telegram.org/img/SiteTDesktop_2x.webp");
    background-size: 320px 157px;
  }
}

/* 移动端断点（官网 ≤640px 规则） */
@media (max-width: 640px) {
  .tl_main_download_mobile {
    padding: 0 20px;
  }

  .tl_main_download_link {
    width: auto;
    min-width: 0;
    display: block;
    margin-top: 20px;
    margin-bottom: 30px;
  }

  a.tl_main_download_link::after {
    display: none;
  }

  .tl_main_download_link_ios {
    padding-top: 210px;
    height: 245px;
    padding-bottom: 15px;
  }

  .tl_main_download_image__ios {
    margin: -123px 0 0 -121px;
    background-size: 360px 220px;
    width: 248px;
    height: 198px;
  }

  .tl_main_video_player__ios {
    margin: -124px 0 0 -121px;
    width: 248px;
    height: 198px;
  }

  .tl_main_download_link_tdesktop {
    display: block;
    padding-top: 156px;
    height: 188px;
  }

  .tl_main_download_desktop_section,
  .tl_main_download_desktop_wrap1 {
    display: none;
  }

  .tl_main_download_more_btn {
    display: inline-block;
  }

  .tl_main_download_link:hover,
  .tl_main_download_desktop_link:hover {
    box-shadow: none;
  }
}

@media (max-width: 340px) {
  .tl_main_download_image__android {
    margin: -109px 0 0 -101px;
    background-size: 196px 183px;
    width: 205px;
    height: 162px;
  }

  .tl_main_download_image__ios {
    margin: -103px 0 0 -101px;
    background-size: 300px 183px;
    width: 206px;
    height: 165px;
  }

  .tl_main_video_player__android {
    margin: -109px 0 0 -101px;
    width: 205px;
    height: 162px;
  }

  .tl_main_video_player__ios {
    margin: -104px 0 0 -101px;
    width: 206px;
    height: 165px;
  }
}

/* ---------- 平台下载卡片 ---------- */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.platform-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 24px 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.platform-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.platform-card.is-detected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-soft), var(--shadow-md);
}

.platform-card__tag {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  display: none;
}

.platform-card.is-detected .platform-card__tag {
  display: inline-block;
}

.platform-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  border-radius: 18px;
  background: var(--primary-soft);
  color: var(--primary);
}

.platform-card__icon svg {
  width: 34px;
  height: 34px;
}

.platform-card h3 {
  margin-bottom: 6px;
  font-size: 1.12rem;
}

.platform-card p {
  margin-bottom: 22px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  flex: 1;
}

.platform-card .btn {
  width: 100%;
}

.platform-card__version {
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---------- 功能网格 ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.feature-card {
  padding: 32px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: transform 0.2s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.feature-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
}

.feature-card__icon svg {
  width: 26px;
  height: 26px;
}

.feature-card h3 {
  font-size: 1.08rem;
}

.feature-card p {
  margin-bottom: 0;
  font-size: 0.93rem;
  color: var(--text-secondary);
}

/* ---------- 数据统计条 ---------- */
.stats {
  background: var(--gradient);
  color: #fff;
  padding: 64px 0;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  text-align: center;
}

.stat__value {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat__label {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- 分栏板块 ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
}

.split--reverse .split__media {
  order: 2;
}

.split__body h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.split__body p {
  color: var(--text-secondary);
}

.check-list {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 14px;
  color: var(--text-secondary);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23229ED9' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

.split__media {
  position: relative;
}

.visual-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
}

.visual-card__row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  margin-bottom: 12px;
}

.visual-card__row:last-child {
  margin-bottom: 0;
}

.visual-card__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  flex: none;
}

.visual-card__name {
  font-weight: 600;
  font-size: 0.95rem;
}

.visual-card__msg {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.visual-card__badge {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  flex: none;
}

/* ---------- 步骤流程 ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 30px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
}

.step h3 {
  font-size: 1.02rem;
}

.step p {
  margin-bottom: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ---------- FAQ 手风琴 ---------- */
.faq-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 36px;
}

.faq-search {
  position: relative;
  width: min(420px, 100%);
}

.faq-search input {
  width: 100%;
  padding: 13px 20px 13px 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.faq-search svg {
  position: absolute;
  left: 17px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.faq-list {
  max-width: 780px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  margin-bottom: 14px;
  overflow: hidden;
  scroll-margin-top: calc(var(--nav-height) + 20px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item.is-open {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.faq-item__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  padding: 20px 24px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.faq-item__q:hover {
  color: var(--primary);
}

.faq-item__q svg {
  flex: none;
  color: var(--text-muted);
  transition: transform 0.3s ease, color 0.2s ease;
}

.faq-item.is-open .faq-item__q svg {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-item__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-item__a-inner {
  padding: 0 24px 22px;
  color: var(--text-secondary);
  font-size: 0.94rem;
}

.faq-item__a-inner p:last-child {
  margin-bottom: 0;
}

.faq-empty {
  display: none;
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
}

.faq-empty.is-visible {
  display: block;
}

/* ---------- 内页头部 ---------- */
.page-header {
  padding: calc(var(--nav-height) + 64px) 0 64px;
  background: var(--gradient);
  color: #fff;
  text-align: center;
}

.page-header h1 {
  color: #fff;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  margin-bottom: 12px;
}

.page-header p {
  max-width: 560px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.02rem;
}

.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.9);
}

.breadcrumb a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ---------- 下载页信息条 ---------- */
.info-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  max-width: 780px;
  margin: 0 auto 48px;
  padding: 16px 24px;
  border: 1px dashed var(--primary-light);
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--text-secondary);
  font-size: 0.92rem;
  text-align: center;
}

.info-banner strong {
  color: var(--primary-dark);
}

/* ---------- 常见问题简介（首页） ---------- */
.faq-teaser-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-teaser {
  display: block;
  padding: 20px 26px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  font-weight: 600;
  transition: border-color 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease;
}

.faq-teaser:hover {
  color: var(--primary);
  border-color: var(--primary-light);
  transform: translateX(6px);
  box-shadow: var(--shadow-sm);
}

/* ---------- 新闻资讯（首页） ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.news-card {
  display: flex;
  flex-direction: column;
  padding: 28px 26px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: transform 0.2s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.news-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.news-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.news-card__tag {
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 600;
}

.news-card__tag--green {
  background: #E6F6EB;
  color: #2E8B47;
}

.news-card__tag--purple {
  background: #EFEAF9;
  color: #6A4FBC;
}

.news-card__tag--amber {
  background: #FCF1DC;
  color: #B87406;
}

html[data-theme="dark"] .news-card__tag {
  color: var(--primary-light);
}

html[data-theme="dark"] .news-card__tag--green {
  background: rgba(49, 162, 76, 0.2);
  color: #82D79B;
}

html[data-theme="dark"] .news-card__tag--purple {
  background: rgba(123, 97, 196, 0.24);
  color: #B8A4E8;
}

html[data-theme="dark"] .news-card__tag--amber {
  background: rgba(245, 166, 35, 0.2);
  color: #F2C078;
}

.news-card__meta time {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.news-card h3 {
  font-size: 1.04rem;
  margin-bottom: 10px;
}

.news-card p {
  margin-bottom: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ---------- 订阅动态条（首页） ---------- */
.newsletter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  margin-top: 48px;
  padding: 38px 44px;
  border-radius: var(--radius-lg);
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 18px 44px rgba(34, 158, 217, 0.28);
}

.newsletter__body {
  flex: 1 1 320px;
}

.newsletter__body h3 {
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.newsletter__body p {
  margin: 0;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85);
}

.newsletter__form {
  display: flex;
  gap: 12px;
  flex: 0 1 430px;
}

.newsletter__form input {
  flex: 1;
  min-width: 0;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  color: #10212E;
  outline: none;
  transition: box-shadow 0.2s ease;
}

.newsletter__form input::placeholder {
  color: #8FA3B3;
}

.newsletter__form input:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.55);
}

.newsletter__msg {
  flex: 1 0 100%;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
}

.newsletter__msg:empty {
  display: none;
}

.newsletter__msg.is-error {
  color: #FFD9A8;
}

.newsletter__msg.is-success {
  color: #FFFFFF;
}

/* ---------- 更新日志（首页） ---------- */
.changelog {
  max-width: 760px;
  margin: 0 auto;
}

.changelog-item {
  position: relative;
  padding: 0 0 36px 40px;
}

.changelog-item:last-child {
  padding-bottom: 0;
}

.changelog-item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.changelog-item::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 28px;
  bottom: 4px;
  width: 2px;
  background: var(--border);
}

.changelog-item:last-child::after {
  display: none;
}

html[data-theme="dark"] .changelog-item::after {
  background: #3B4E60;
}

.changelog-item__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.changelog-item__version {
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}

.changelog-item__meta time {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.changelog-item h3 {
  font-size: 1.06rem;
  margin-bottom: 8px;
}

.changelog-item__list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.changelog-item__list li {
  margin-bottom: 6px;
}

.changelog-item__list li:last-child {
  margin-bottom: 0;
}

/* ---------- 用户评价（首页） ---------- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 30px 28px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.testimonial-card__quote {
  position: relative;
  flex: 1;
  margin: 0;
  padding-top: 30px;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.testimonial-card__quote::before {
  content: "\201C";
  position: absolute;
  top: -8px;
  left: -2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.4rem;
  line-height: 1;
  color: var(--primary-light);
}

.testimonial-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.testimonial-card__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  flex: none;
}

.testimonial-card__person {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.testimonial-card__name {
  font-weight: 600;
  font-size: 0.95rem;
}

.testimonial-card__role {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---------- CTA 区块 ---------- */
.cta {
  padding: 80px 0;
  background: var(--bg-alt);
  text-align: center;
}

.cta h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
}

.cta p {
  max-width: 520px;
  margin: 0 auto 34px;
  color: var(--text-secondary);
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

/* ---------- 对比表格 ---------- */
.compare-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}

.compare-table {
  width: 100%;
  min-width: 640px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  font-size: 0.95rem;
}

.compare-table th,
.compare-table td {
  padding: 16px 22px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.compare-table tbody tr:last-child td {
  border-bottom: 0;
}

.compare-table thead th {
  background: var(--bg-alt);
  font-size: 0.92rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.compare-table td:first-child {
  font-weight: 600;
  color: var(--text);
}

.compare-table .is-highlight {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 600;
}

.compare-table thead .is-highlight {
  color: var(--primary);
}

html[data-theme="dark"] .compare-table .is-highlight {
  color: var(--primary-light);
}

/* ---------- 文档正文（隐私/条款） ---------- */
.doc {
  max-width: 820px;
  margin: 0 auto;
}

.doc h2 {
  font-size: 1.4rem;
  margin-top: 48px;
  padding-top: 8px;
  scroll-margin-top: calc(var(--nav-height) + 20px);
}

.doc h2:first-child {
  margin-top: 0;
}

.doc h3 {
  font-size: 1.08rem;
  margin-top: 30px;
}

.doc p,
.doc li {
  color: var(--text-secondary);
  font-size: 0.97rem;
}

.doc__updated {
  display: inline-block;
  padding: 6px 16px;
  margin-bottom: 36px;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 600;
}

.doc__toc {
  padding: 24px 28px;
  margin-bottom: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
}

.doc__toc h3 {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.doc__toc ol {
  margin: 0;
  columns: 2;
  column-gap: 32px;
}

.doc__toc li {
  margin-bottom: 6px;
}

/* ---------- 页脚 ---------- */
.footer {
  padding: 64px 0 32px;
  background: #10212E;
  color: #B9CBD8;
}

html[data-theme="dark"] .footer {
  background: #0E1720;
  border-top: 1px solid var(--border);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
}

.footer__brand svg {
  width: 32px;
  height: 32px;
}

.footer__desc {
  max-width: 300px;
  font-size: 0.9rem;
  color: #8FA3B3;
}

.footer h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.footer__links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__links li {
  margin-bottom: 10px;
}

.footer__links a {
  color: #8FA3B3;
  font-size: 0.9rem;
}

.footer__links a:hover {
  color: #fff;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: #738697;
}

/* ---------- 滚动出现动画 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .split {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .split--reverse .split__media {
    order: 0;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .hero__subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 64px 0;
  }

  .navbar__menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px 24px 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease,
      visibility 0.25s ease;
  }

  .navbar__menu.is-open {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .navbar__menu a {
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
  }

  .navbar__menu a::after {
    display: none;
  }

  .navbar__menu a:hover,
  .navbar__menu a.is-active {
    background: var(--primary-soft);
  }

  .navbar__toggle {
    display: flex;
  }

  /* 移动端左右布局：Logo 靠左，操作按钮整体靠右 */
  .navbar__actions {
    margin-left: auto;
  }

  .navbar__actions .btn {
    display: none;
  }

  .hero {
    padding-top: calc(var(--nav-height) + 52px);
    padding-bottom: 72px;
  }

  .hero__actions .btn {
    flex: 1 1 220px;
  }

  .newsletter {
    padding: 32px 26px;
  }

  .newsletter__form {
    flex: 1 1 100%;
  }

  .doc__toc ol {
    columns: 1;
  }
}

@media (max-width: 520px) {
  .container {
    padding: 0 18px;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer__bottom {
    justify-content: center;
    text-align: center;
  }

  .stats__grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .newsletter__form {
    flex-direction: column;
  }

  .newsletter__form .btn {
    width: 100%;
  }
}
