/* ========================================================
   百讯官网 Design System  —  Enterprise Edition
   ======================================================== */

/* ---------- Design Tokens ---------- */
:root {
  --primary:        #c8102e;
  --primary-hover:  #a80d26;
  --primary-light:  #fff1f3;
  --primary-glow:   rgba(200,16,46,.18);

  --text-base:      #1a1a2e;
  --text-muted:     #5a6275;
  --text-subtle:    #8b92a5;

  --border:         #e8eaed;
  --bg-page:        #f8f9fc;
  --bg-surface:     #ffffff;
  --bg-alt:         #f4f5f8;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  20px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.06);
  --shadow-xl:  0 24px 64px rgba(0,0,0,.14);
  --shadow-card-hover: 0 20px 48px rgba(200,16,46,.10), 0 8px 20px rgba(0,0,0,.08);

  --transition: .22s cubic-bezier(.4,0,.2,1);
  --transition-slow: .4s cubic-bezier(.4,0,.2,1);
}

/* ========== 基础 ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--text-base);
  background: var(--bg-surface);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary); }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: 14px; }
ul { list-style: none; }

/* 全局滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: #d0d3da; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #adb3c0; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ========== Header — 毛玻璃吸顶 ========== */
.site-header {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(0,0,0,.06);
  position: sticky; top: 0; z-index: 200;
  transition: box-shadow var(--transition);
}
.site-header.scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
  overflow: visible;          /* 确保子级 fixed 元素不被裁剪 */
}
.brand {
  font-size: 21px; font-weight: 800; color: var(--primary);
  letter-spacing: -.3px;
  display: flex; align-items: center; gap: 8px;
}
.brand::before {
  content: '';
  display: inline-block; width: 6px; height: 20px;
  background: var(--primary); border-radius: 3px;
}
.main-nav { display: flex; gap: 4px; }
.main-nav a {
  font-size: 13.5px; color: var(--text-muted);
  padding: 7px 13px; border-radius: var(--radius-md);
  font-weight: 500;
  position: relative; transition: all var(--transition);
}
.main-nav a::after {
  content: '';
  position: absolute; bottom: 2px; left: 50%; right: 50%;
  height: 2px; background: var(--primary); border-radius: 1px;
  transition: left var(--transition), right var(--transition);
}
.main-nav a:hover { color: var(--primary); background: var(--primary-light); }
.main-nav a:hover::after, .main-nav a.active::after { left: 12px; right: 12px; }
.main-nav a.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--border);
  font-size: 18px; color: var(--text-muted);
  width: 36px; height: 36px; border-radius: var(--radius-md);
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  line-height: 1; padding: 0;
}
/* 移动端菜单头部（含品牌 + 关闭按钮） */
.nav-drawer-head {
  display: none;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: space-between; justify-content: space-between;
  padding: 0 20px;
  height: 56px;
  border-bottom: 1px solid var(--border);
  -webkit-flex-shrink: 0; flex-shrink: 0;
}
.nav-drawer-head .brand {
  font-size: 17px; color: var(--primary);
}
.nav-drawer-head .brand::before { display: none; }
.nav-menu-close {
  display: none;
  background: none; border: none;
  color: var(--text-muted); font-size: 22px;
  width: 36px; height: 36px;
  border-radius: 50%; cursor: pointer;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  line-height: 1; padding: 0;
  transition: background var(--transition), color var(--transition);
}
.nav-menu-close:hover { background: var(--bg-alt); color: var(--text-base); }
/* 底部快捷入口 — PC端必须隐藏，仅移动端显示 */
.nav-drawer-foot {
  display: none;
}
/* 遮罩层 */
.nav-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 9998;
  -webkit-tap-highlight-color: transparent;
}
.nav-overlay.open { display: block; }

/* ========== Hero / Banner ========== */
.hero {
  position: relative; height: clamp(380px, 46vw, 600px); overflow: hidden;
  background: #0d0d1a;
}
.hero-slide {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 1s cubic-bezier(.4,0,.2,1);
  background-size: cover; background-position: center center;
  background-repeat: no-repeat;
  display: flex; align-items: center; pointer-events: none;
}
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-slide::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg,
    rgba(10,10,30,.72) 0%,
    rgba(10,10,30,.35) 55%,
    transparent 100%);
  pointer-events: none;
}
.hero-content {
  position: relative; z-index: 1; color: #fff;
  max-width: 640px; padding: 0 24px;
}
.hero-content h1 {
  font-size: clamp(30px, 4vw, 52px);
  margin-bottom: 18px; line-height: 1.15;
  font-weight: 800; letter-spacing: -.5px;
  text-shadow: 0 2px 16px rgba(0,0,0,.3);
}
.hero-content p {
  font-size: clamp(14px, 1.6vw, 18px);
  margin-bottom: 32px; opacity: .88; line-height: 1.7;
}
.hero-dots {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 2;
}
.hero-dots span {
  width: 24px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.35); cursor: pointer;
  transition: all var(--transition);
}
.hero-dots span.active { background: #fff; width: 40px; }

/* ========== Section ========== */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }
.section-title {
  text-align: center; margin-bottom: 56px;
  position: relative;
}
.section-title::after {
  content: '';
  display: block; width: 40px; height: 3px;
  background: var(--primary); border-radius: 2px;
  margin: 16px auto 0;
}
.section-title h2 {
  font-size: clamp(24px, 3vw, 34px);
  margin-bottom: 12px; font-weight: 700;
  color: var(--text-base); letter-spacing: -.3px;
}
.section-title p { color: var(--text-muted); font-size: 15px; }

/* ========== 卡片网格 ========== */
.card-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex; flex-direction: column;
  position: relative;
}
.card::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--primary), #ff6b6b);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--transition);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(200,16,46,.15);
}
.card:hover::after { transform: scaleX(1); }
.card-cover {
  aspect-ratio: 16/10;
  background: var(--bg-alt) center/cover no-repeat;
  flex: none; overflow: hidden; position: relative;
}
.card-cover::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,.08));
}
.card-body { padding: 22px 20px; flex: 1; display: flex; flex-direction: column; }
.card-title {
  font-size: 15.5px; font-weight: 600; margin-bottom: 8px; color: var(--text-base);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  line-height: 1.5; transition: color var(--transition);
}
.card:hover .card-title { color: var(--primary); }
.card-desc {
  color: var(--text-muted); font-size: 13px; flex: 1; line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta {
  color: var(--text-subtle); font-size: 12px; margin-top: 14px;
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 12px; border-top: 1px solid var(--border);
}

/* ========== 按钮 ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 28px; border-radius: var(--radius-md);
  border: 1.5px solid transparent; font-size: 14px; font-weight: 500;
  transition: all var(--transition); text-align: center;
  position: relative; overflow: hidden; white-space: nowrap;
}
.btn::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,.12);
  opacity: 0; transition: opacity var(--transition);
}
.btn:hover::before { opacity: 1; }
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow);
}
.btn-primary:hover {
  background: var(--primary-hover); border-color: var(--primary-hover); color: #fff;
  box-shadow: 0 6px 20px rgba(200,16,46,.35);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent; color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary); color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
  transform: translateY(-1px);
}
.btn-ghost {
  background: var(--bg-surface); color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--bg-alt); color: var(--text-base);
  border-color: #c8cdd6;
}
.btn-white {
  background: #fff; color: var(--primary); border-color: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.btn-white:hover {
  background: var(--primary-light); transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0,0,0,.16);
}

/* ========== Breadcrumb / 页面标题 ========== */
.page-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e1346 50%, #0f172a 100%);
  color: #fff; padding: 88px 0; text-align: center;
  position: relative; overflow: hidden;
}
.page-banner::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 50% 120%, rgba(200,16,46,.22), transparent);
  pointer-events: none;
}
.page-banner .container { position: relative; z-index: 1; }
.page-banner h1 {
  font-size: clamp(26px, 4vw, 40px);
  margin-bottom: 14px; font-weight: 700;
  letter-spacing: -.3px;
}
.page-banner p { opacity: .8; font-size: 15px; max-width: 520px; margin: 0 auto; line-height: 1.7; }

/* ========== 过滤器/Tab ========== */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 20px 0; margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.filter-bar .chip {
  padding: 7px 18px; border-radius: 100px;
  background: var(--bg-alt); color: var(--text-muted);
  font-size: 13px; cursor: pointer; border: 1.5px solid var(--border);
  font-weight: 500; transition: all var(--transition);
}
.filter-bar .chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.filter-bar .chip.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* ========== 分页 ========== */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 40px 0 8px; }
.pagination button {
  min-width: 36px; height: 36px; padding: 0 10px;
  border: 1.5px solid var(--border); background: var(--bg-surface);
  border-radius: var(--radius-md); font-size: 13px;
  color: var(--text-muted); transition: all var(--transition); font-weight: 500;
}
.pagination button:hover {
  color: var(--primary); border-color: var(--primary);
  background: var(--primary-light);
}
.pagination button.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow); font-weight: 600;
}
.pagination button:disabled { opacity: .35; cursor: not-allowed; }

/* ========== 详情页 ========== */
.article-header {
  text-align: center; padding: 56px 0 28px;
  border-bottom: 1px solid var(--border); margin-bottom: 36px;
}
.article-header h1 {
  font-size: clamp(22px, 3.5vw, 32px);
  margin-bottom: 14px; color: var(--text-base);
  font-weight: 700; line-height: 1.35; letter-spacing: -.2px;
}
.article-meta { color: var(--text-subtle); font-size: 13px; }
.article-meta span { margin: 0 10px; }
.article-body { font-size: 15.5px; line-height: 1.95; color: var(--text-muted); padding-bottom: 56px; }
.article-body img { margin: 20px auto; border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
.article-body p { margin: 18px 0; }
.article-body h2 { margin: 32px 0 14px; font-size: 22px; color: var(--text-base); }
.article-body h3 { margin: 24px 0 10px; font-size: 18px; color: var(--text-base); }

/* ========== Form ========== */
.form-row { margin-bottom: 20px; }
.form-row label {
  display: block; margin-bottom: 7px;
  color: var(--text-muted); font-size: 13px; font-weight: 500;
}
.form-row input, .form-row textarea, .form-row select {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md); outline: none;
  color: var(--text-base); background: var(--bg-surface);
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.form-row input::placeholder,
.form-row textarea::placeholder { color: #b8bec9; }
.form-row input:hover, .form-row textarea:hover,
.form-row select:hover { border-color: #b8bec9; }
.form-row input:focus, .form-row textarea:focus,
.form-row select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  background: #fff;
}
.form-row textarea { min-height: 128px; resize: vertical; line-height: 1.65; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ========== Footer ========== */
.site-footer {
  background: linear-gradient(180deg, #151b2d 0%, #0d1120 100%);
  color: #8d94a6; font-size: 13px; margin-top: 0;
  border-top: 1px solid rgba(255,255,255,.05);
}
.footer-inner {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 40px; padding: 64px 24px 44px;
}
.footer-col h4 {
  color: #e8eaed; font-size: 14px; font-weight: 600;
  margin-bottom: 16px; letter-spacing: .3px;
}
.footer-col h4::after {
  content: '';
  display: block; width: 20px; height: 2px;
  background: var(--primary); border-radius: 1px;
  margin-top: 8px;
}
.footer-col a { display: block; color: #8d94a6; padding: 5px 0; transition: color var(--transition); }
.footer-col a:hover { color: #e8eaed; padding-left: 4px; }
.footer-col p { line-height: 1.8; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 20px 0; text-align: center; color: #5a6275;
}

/* ========== FAQ/Accordion ========== */
.accordion-item {
  border-bottom: 1px solid var(--border); padding: 0;
  border-radius: var(--radius-md); overflow: hidden;
  margin-bottom: 8px; border: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.accordion-item:hover { box-shadow: var(--shadow-sm); }
.accordion-item .q {
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; font-weight: 500; color: var(--text-base);
  padding: 18px 20px;
  transition: background var(--transition);
}
.accordion-item .q:hover { background: var(--bg-alt); }
.accordion-item.open .q { background: var(--primary-light); color: var(--primary); }
.accordion-item .a {
  display: none; color: var(--text-muted); padding: 0 20px 18px;
  line-height: 1.8; font-size: 14px;
}
.accordion-item.open .a { display: block; }
.accordion-item .q::after {
  content: '+'; color: var(--primary); font-size: 22px;
  font-weight: 300; flex-shrink: 0; margin-left: 12px;
  transition: transform var(--transition);
}
.accordion-item.open .q::after { content: '−'; }

/* ========== List table (下载中心等) ========== */
.data-table {
  width: 100%; border-collapse: collapse;
  background: var(--bg-surface);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.data-table th {
  padding: 13px 16px; border-bottom: 1px solid var(--border);
  text-align: left; font-size: 12px;
  background: var(--bg-alt); color: var(--text-muted);
  font-weight: 600; letter-spacing: .3px; text-transform: uppercase;
}
.data-table td {
  padding: 13px 16px; border-bottom: 1px solid var(--border);
  text-align: left; font-size: 13.5px; color: var(--text-base);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover td { background: var(--primary-light); }

/* ========== Tabs ========== */
.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--border); margin-bottom: 28px; }
.tabs button {
  padding: 12px 24px; background: none; border: none; font-size: 14.5px;
  color: var(--text-muted); border-bottom: 2px solid transparent;
  margin-bottom: -2px; font-weight: 500; transition: all var(--transition);
}
.tabs button:hover { color: var(--primary); }
.tabs button.active {
  color: var(--primary); border-bottom-color: var(--primary); font-weight: 600;
}

/* ========== Toast ========== */
.toast {
  position: fixed; top: 24px; left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: 12px 24px; border-radius: var(--radius-lg);
  background: #1a1a2e; color: #fff;
  z-index: 9999; opacity: 0;
  transition: opacity .25s, transform .25s;
  font-size: 13.5px; font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  display: flex; align-items: center; gap: 8px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: #027a48; }
.toast.error { background: #b42318; }

/* ========== Loading / Empty ========== */
.loading { text-align: center; padding: 64px 0; color: var(--text-subtle); font-size: 13px; }
.empty { text-align: center; padding: 64px 0; color: var(--text-subtle); font-size: 13px; }

/* ========== Skeleton Loading ========== */
.skeleton {
  background: linear-gradient(90deg, #f0f2f5 25%, #e2e5ea 50%, #f0f2f5 75%);
  background-size: 200% 100%;
  animation: skeleton-wave 1.4s ease infinite;
  border-radius: var(--radius-md);
}
@keyframes skeleton-wave {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========== Lang Toggle ========== */
.lang-toggle {
  background: transparent; border: 1.5px solid var(--border);
  color: var(--text-muted); padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all var(--transition); white-space: nowrap;
}
.lang-toggle:hover {
  border-color: var(--primary); color: var(--primary);
  background: var(--primary-light);
}

/* ========== Header right group ========== */
.header-actions { display: flex; align-items: center; gap: 10px; }

/* ========== 响应式断点 ========== */

/* —— Tablet & 小屏 (769px–900px) —— */
@media (min-width: 769px) and (max-width: 900px) {
  .main-nav { gap: 2px; }
  .main-nav > a { font-size: 13px; padding: 7px 10px; }
}
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .section-title h2 { font-size: 26px; }
  .section { padding: 64px 0; }
}

/* —— Mobile (≤768px) —— */
@media (max-width: 768px) {
  /* Header */
  .header-inner { height: 56px; }
  .brand { font-size: 17px; }

  /* 桌面端水平导航 → 隐藏，改为全屏菜单 */
  .main-nav {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    -webkit-flex-direction: column; flex-direction: column;
    -webkit-align-items: stretch; align-items: stretch;
    padding: 0;
    gap: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 10000;
  }
  .main-nav.open {
    display: -webkit-flex;
    display: flex;
  }
  /* 抽屉头部 — 华为风格顶栏 */
  .nav-drawer-head {
    display: -webkit-flex; display: flex;
    -webkit-flex-shrink: 0; flex-shrink: 0;
    position: sticky; top: 0;
    background: #fff;
    z-index: 10;
  }
  .nav-drawer-head .brand {
    font-size: 18px !important;
    font-weight: 700 !important;
  }
  /* 关闭按钮 */
  .nav-menu-close {
    display: -webkit-flex; display: flex;
    width: 40px; height: 40px;
    font-size: 24px;
    color: var(--text-base);
    transition: all var(--transition);
  }
  .nav-menu-close:active { background: var(--bg-alt); transform: scale(.92); }

  /* 菜单项 — 华为风格全宽列表 */
  .main-nav > a {
    width: 100%;
    padding: 17px 20px;
    font-size: 15.5px; font-weight: 400;
    color: var(--text-base);
    border-bottom: 0.5px solid #f0f0f2;
    border-radius: 0;
    background: none;
    text-align: left;
    position: relative;
    display: -webkit-flex; display: flex;
    -webkit-align-items: center; align-items: center;
    -webkit-justify-content: space-between; justify-content: space-between;
    transition: background .15s, color .15s;
    -webkit-tap-highlight-color: transparent;
  }
  .main-nav > a::after {
    content: '›';
    position: static;
    display: block;
    bottom: auto; left: auto; right: auto;
    width: auto; height: auto;
    background: none;
    font-size: 24px; line-height: 1;
    color: #c5c5cc;
    border-radius: 0;
    -webkit-flex-shrink: 0; flex-shrink: 0;
    transition: color .15s;
    font-weight: 300;
  }
  .main-nav > a:hover,
  .main-nav > a:active { background: #f7f7f9; color: var(--primary); }
  .main-nav > a:hover::after,
  .main-nav > a:active::after { color: var(--primary); }
  .main-nav > a.active { background: #fef2f3; color: var(--primary); font-weight: 600; }
  .main-nav > a.active::after { color: var(--primary); font-weight: 500; }
  .main-nav > a:last-child { border-bottom: none; }

  /* 底部快捷入口区（华为风格底部图标按钮） */
  .nav-drawer-foot {
    display: -webkit-flex; display: flex;
    -webkit-justify-content: center; justify-content: center;
    gap: 48px;
    padding: 28px 20px;
    padding-bottom: max(28px, env(safe-area-inset-bottom));
    border-top: 0.5px solid #f0f0f2;
    -webkit-flex-shrink: 0; flex-shrink: 0;
  }
  .nav-drawer-foot a {
    display: -webkit-flex; display: flex;
    -webkit-flex-direction: column; flex-direction: column;
    -webkit-align-items: center; align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 12px;
    transition: color .15s;
    -webkit-tap-highlight-color: transparent;
  }
  .nav-drawer-foot a:active { color: var(--primary); }
  .nav-drawer-foot-icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1.5px solid #e2e4ea;
    display: -webkit-flex; display: flex;
    -webkit-align-items: center; align-items: center;
    -webkit-justify-content: center; justify-content: center;
    transition: all .15s;
  }
  .nav-drawer-foot a:active .nav-drawer-foot-icon {
    border-color: var(--primary);
    background: var(--primary-light);
  }
  .nav-drawer-foot-icon svg {
    width: 20px; height: 20px;
    stroke: var(--text-muted);
    fill: none;
    transition: stroke .15s;
  }
  .nav-drawer-foot a:active .nav-drawer-foot-icon svg { stroke: var(--primary); }
  .nav-toggle { display: -webkit-flex; display: flex; }

  /* Hero / Banner */
  .hero { height: clamp(220px, 62vw, 340px); }
  .hero-content h1 { font-size: 22px; margin-bottom: 10px; }
  .hero-content p  { font-size: 14px; margin-bottom: 16px; }
  .hero-content .btn { padding: 8px 18px; font-size: 13px; }
  .hero-dots { bottom: 14px; }

  /* Sections */
  .section { padding: 40px 0; }
  .section-title { margin-bottom: 28px; }
  .section-title h2 { font-size: 22px; }
  .section-title p { font-size: 13px; }

  /* Cards */
  .card-grid { grid-template-columns: 1fr; gap: 16px; }

  /* Page Banner */
  .page-banner { padding: 48px 0; }
  .page-banner h1 { font-size: 24px; }
  .page-banner p { font-size: 13px; }

  /* Form */
  .form-grid { grid-template-columns: 1fr; }

  /* Footer — 华为风格手风琴折叠 */
  .site-footer { margin-top: 48px; }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 0 20px;
  }
  .footer-col {
    border-bottom: 0.5px solid rgba(255,255,255,.08);
  }
  .footer-col:last-child {
    border-bottom: none;
  }
  /* 折叠标题栏 */
  .footer-col h4 {
    font-size: 15px;
    margin: 0;
    padding: 16px 20px;
    display: -webkit-flex; display: flex;
    -webkit-align-items: center; align-items: center;
    -webkit-justify-content: space-between; justify-content: space-between;
    cursor: pointer;
    -webkit-user-select: none; user-select: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
  }
  .footer-col h4::after {
    content: '';
    display: block;
    width: 8px; height: 8px;
    border-right: 1.5px solid #8d94a6;
    border-bottom: 1.5px solid #8d94a6;
    transform: rotate(45deg);
    transition: transform .25s cubic-bezier(.4,0,.2,1);
    margin-top: -4px;
    flex-shrink: 0;
    margin-left: 12px;
  }
  .footer-col.open h4::after {
    transform: rotate(-135deg);
    margin-top: 4px;
  }
  /* 折叠内容区 */
  .footer-col > a,
  .footer-col > p {
    display: none;
    padding: 0 20px 12px;
    font-size: 13.5px;
    color: #9ca3b8;
  }
  .footer-col > a {
    display: none;
    padding: 10px 20px 10px 32px;
    position: relative;
  }
  .footer-col > a::before {
    content: '';
    position: absolute;
    left: 20px; top: 50%;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: #5a6275;
    margin-top: -2px;
  }
  .footer-col.open > a {
    display: block;
  }
  .footer-col.open > p {
    display: block;
  }

  /* 联系方式区域 — 独立信息卡片样式（区别于普通折叠列表） */
  .footer-col:last-child h4::after { display: none; } /* 联系方式不显示箭头，始终展开 */
  .footer-col:last-child > p {
    display: block !important;
    padding: 0 20px 16px;
    line-height: 1.85;
    color: #9ca3b8;
    font-size: 13px;
  }
  .footer-col:last-child { position: relative; }
  /* 默认展开第一项 */
  .footer-col:first-child { /* 可选：默认展开 */ }
  .footer-col h4 { font-size: 14px; margin-bottom: 0; }

  /* Article detail */
  .article-header { padding: 28px 0 16px; }
  .article-header h1 { font-size: 20px; }
  .article-body { font-size: 14px; }

  /* Tabs */
  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tabs button { padding: 10px 16px; font-size: 14px; white-space: nowrap; }

  /* Data table 横向滚动 */
  .data-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table { min-width: 560px; }

  /* Filter bar */
  .filter-bar { gap: 8px; padding: 14px 0; }
  .filter-bar .chip { padding: 5px 12px; font-size: 12px; }

  /* Pagination */
  .pagination { flex-wrap: wrap; gap: 4px; }
  .pagination button { min-width: 30px; padding: 5px 8px; font-size: 12px; }

  /* Contact detail 两栏 → 一栏 */
  .contact-grid { grid-template-columns: 1fr !important; }

  /* About tabs */
  .about-tabs { flex-wrap: wrap; }

  /* Stats / 仪表盘 卡片 */
  .stat-grid { grid-template-columns: 1fr 1fr; }

  /* 详情页两列布局 → 一列 */
  [style*="grid-template-columns:minmax"] {
    display: block !important;
  }

  /* ── 客服聊天组件 — 手机端完全重新设计 ── */
  /* 隐藏PC端贴边竖条按钮，改为屏幕内圆形FAB */
  #lc-fab-wrap {
    right: 16px !important;
    bottom: 20px !important;
    z-index: 8999 !important;
  }
  #lc-fab {
    width: 52px !important;
    height: 52px !important;
    padding: 0 !important;
    border-radius: 50% !important;        /* 圆形按钮 */
    box-shadow: 0 4px 20px rgba(200,16,46,.45), 0 2px 8px rgba(0,0,0,.15) !important;
  }
  #lc-fab svg { width: 24px; height: 24px; }
  /* 隐藏"客服"文字标签，移动端只显示图标 */
  #lc-fab-label { display: none !important; }

  /* 聊天窗口 — 近全屏底部弹窗（类似微信/主流IM移动端） */
  #lc-win {
    width: 100vw !important;
    max-width: none !important;
    right: 0 !important;
    bottom: 0 !important;
    top: 0 !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    animation: lcMobileIn .3s cubic-bezier(.25,.8,.25,1) !important;
  }
  @keyframes lcMobileIn {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  #lc-win.open { animation: lcMobileIn .3s cubic-bezier(.25,.8,.25,1) !important; }

  /* 头部 — 更高触控区域 */
  .lc-header {
    padding: 16px 16px;
    padding-top: max(16px, env(safe-area-inset-top));
    min-height: 56px;
  }
  .lc-header-avatar { width: 40px; height: 40px; }
  .lc-header-avatar svg { width: 20px; height: 20px; }
  .lc-header-name { font-size: 15px; }
  .lc-header-status { font-size: 12px; }
  .lc-close {
    padding: 8px;
    border-radius: 50%;
  }
  .lc-close svg { width: 18px; height: 18px; }

  /* 消息区 */
  .lc-msgs { padding: 14px 14px; gap: 10px; }
  .lc-bubble {
    max-width: 82%;
    padding: 10px 13px;
    font-size: 14px;
    line-height: 1.6;
  }
  .lc-bubble .lc-time { font-size: 11px; }
  .lc-welcome { font-size: 13px; }
  .lc-welcome span { padding: 6px 16px; font-size: 13px; }

  /* 输入区 — 底部安全区适配 */
  .lc-input-row {
    padding: 10px 12px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    gap: 8px;
  }
  #lcInput {
    padding: 10px 13px;
    font-size: 14px;
    min-height: 42px;
    max-height: 100px;
    border-radius: 20px;
  }
  #lcSend {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
  }
  #lcSend svg { width: 18px; height: 18px; }

  /* 名字输入面板 */
  #lcNameRow {
    padding: 32px 24px;
    padding-bottom: max(32px, env(safe-area-inset-bottom));
    gap: 16px;
  }
  #lcNameRow p { font-size: 14px; }
  #lcNameInput {
    padding: 13px 16px;
    font-size: 15px;
    border-radius: 12px;
    min-height: 48px;
  }
  #lcStartBtn {
    padding: 14px;
    font-size: 15px;
    border-radius: 12px;
  }

  /* 会话结束面板 */
  #[id="_lcEndPanel"] {
    padding: 32px 20px !important;
  }
}

/* —— Small Mobile (≤480px) —— */
@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .hero-content h1 { font-size: 18px; }
  .section-title h2 { font-size: 20px; }
  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
  .page-banner h1 { font-size: 20px; }
  .article-header h1 { font-size: 18px; }
  .tabs button { padding: 8px 12px; font-size: 13px; }
  .stat-grid { grid-template-columns: 1fr; }

  /* 客服 — 小屏手机微调 */
  #lc-fab-wrap { right: 12px !important; bottom: 16px !important; }
  #lc-fab { width: 48px !important; height: 48px !important; box-shadow: 0 3px 16px rgba(200,16,46,.4) !important; }
  #lc-fab svg { width: 22px; height: 22px; }

  /* 聊天内容区微调 */
  .lc-bubble { max-width: 85%; padding: 9px 12px; font-size: 13.5px; }
  .lc-msgs { padding: 12px; gap: 8px; }
  .lc-input-row { padding: 9px 10px; }
  #lcInput { min-height: 40px; font-size: 13.5px; padding: 9px 12px; }
  #lcSend { width: 38px; height: 38px; }
  #lcNameRow { padding: 28px 20px; gap: 14px; }
  #lcNameRow p { font-size: 13px; }
  #lcNameInput { font-size: 14px; min-height: 44px; padding: 12px 14px; }
  #lcStartBtn { padding: 13px; font-size: 14px; border-radius: 11px; }
}
