/* ============================================================
   AI大脑 官网（ai.itjt.cn）站点样式 —— 品牌青绿 v3.0
   权威契约：docs/30-官网架构与数据契约.md §4 UI 契约
   ------------------------------------------------------------
   规则（与产品端 design-tokens.css 同语言）：
   1) token 直接落 :root，组件只消费语义变量；
   2) 品牌青绿 --brand 只用于可交互元素/正向语义，一屏一个主按钮；
   3) 墨蓝 --text 承担标题与强调文字；
   4) 卡片 14px 圆角 + 1px 描边 + 柔影；按钮 10px 圆角；
   5) 1200px 容器；section 间距 96px（上下各 48px padding）；
   6) 移动端 ≤768 堆叠，无横向滚动（表格/代码块用自带 overflow 的包裹层）。
   ============================================================ */

:root {
  /* 品牌青绿 */
  --brand: #0FA98E;
  --brand-600: #0D9480;
  --brand-700: #0B7A6A;
  --brand-50: #F0FAF7;
  --brand-100: #D9F2EC;

  /* 语义色 */
  --bg: #f5f8f7;
  --surface: #fff;
  --surface-2: #f4f8f7;
  --border: #e5ecea;
  --text: #1d2d3e;
  --text-2: #5b6c7c;
  --text-3: #93a1ae;
  --danger: #B91C1C;

  /* 形状与节奏 */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-card: 14px; /* 卡片圆角（契约 §4） */
  --r-btn: 10px;  /* 按钮圆角（契约 §4） */

  /* 卡片柔影（契约 §4） */
  --shadow-card: 0 1px 2px rgba(29, 45, 62, .04), 0 8px 24px -12px rgba(29, 45, 62, .1);
  --shadow-float: 0 12px 32px -12px rgba(29, 45, 62, .16);
  --ring: 0 0 0 3px rgba(15, 169, 142, .14);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 1200px;
  --section-pad: 48px; /* section 间距 96px = 上下各 48px */
  --header-h: 64px;
}

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img,
svg { display: block; max-width: 100%; height: auto; }

a { color: var(--brand-700); text-decoration: none; }
a:hover { color: var(--brand-600); }

h1, h2, h3, h4 { margin: 0; line-height: 1.25; color: var(--text); font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* ---------- 布局骨架 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding-block: var(--section-pad); }

.section-head { margin-bottom: 40px; }
.section-head h2 { font-size: 32px; letter-spacing: -.01em; }
.section-head.center { max-width: 720px; margin-inline: auto; text-align: center; }
.section-sub { margin-top: 12px; color: var(--text-2); font-size: 17px; }

.page-head { padding-bottom: 8px; }
.page-head h1 { font-size: clamp(30px, 3.6vw, 44px); letter-spacing: -.02em; }

.empty { padding-block: 20px; color: var(--text-3); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }

.btn-p { background: var(--brand); color: #fff; }
.btn-p:hover { background: var(--brand-600); color: #fff; }

.btn-s { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-s:hover { background: var(--brand-50); border-color: var(--brand); color: var(--brand-700); }

.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }

.badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--brand-100);
  color: var(--brand-700);
  font-size: 13px;
  font-weight: 600;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--brand-100);
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 12px;
  font-weight: 600;
}

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; font-size: 18px; font-weight: 700; color: var(--text); }
.brand:hover { color: var(--text); }
.brand img { width: 32px; height: 32px; }

.site-nav { display: flex; align-items: center; gap: 2px; margin-inline: auto; }
.site-nav a {
  padding: 8px 14px;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--brand-700); background: var(--brand-50); }
.site-nav a.is-active { color: var(--brand-700); background: var(--brand-50); font-weight: 600; }

/* ---------- 首页 hero ---------- */
.hero {
  padding-block: 72px var(--section-pad);
  background: linear-gradient(180deg, var(--brand-50) 0%, var(--bg) 88%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(32px, 4.6vw, 56px);
  letter-spacing: -.02em;
  margin-block: 20px 16px;
}

.hero-sub { color: var(--text-2); font-size: 18px; max-width: 34em; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.hero-img { border-radius: var(--r-lg); box-shadow: var(--shadow-float); }
.hero-svg { width: 100%; height: auto; filter: drop-shadow(0 24px 48px rgba(29, 45, 62, .12)); }

/* ---------- 数据条 ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.stat { padding: 28px 24px; text-align: center; }
.stat-value { font-size: 36px; font-weight: 800; color: var(--brand-700); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-label { margin-top: 6px; color: var(--text-2); font-size: 14px; }

/* ---------- 功能卡网格 ---------- */
.features-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature-card { padding: 28px; }
.feature-card .feat-icon {
  width: 44px;
  height: 44px;
  padding: 10px;
  margin-bottom: 16px;
  border-radius: var(--r-md);
  background: var(--brand-50);
  color: var(--brand-700);
}
.feature-card h3 { font-size: 18px; }
.feature-card p { margin-top: 8px; color: var(--text-2); font-size: 15px; }

/* ---------- 工作流 / 适用人群 ---------- */
.workflow-grid,
.audience-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

.step-card { padding: 28px; }
.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}
.step-card h3, .audience-card h3 { font-size: 18px; }
.step-card p, .audience-card p { margin-top: 8px; color: var(--text-2); font-size: 15px; }

.audience-card { padding: 28px; }

/* ---------- FAQ（details 折叠） ---------- */
.faq-list { display: grid; gap: 12px; max-width: 760px; margin-inline: auto; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow-card); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '';
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--text-3);
  border-bottom: 2px solid var(--text-3);
  transform: rotate(45deg);
  transition: transform .15s ease;
}
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item summary:hover { color: var(--brand-700); }
.faq-answer { padding: 0 22px 20px; color: var(--text-2); font-size: 15px; }
.faq-answer p + p { margin-top: 8px; }

/* ---------- 底部 CTA ---------- */
.cta-band {
  padding: 56px 48px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--brand-700), var(--brand));
  color: #fff;
  text-align: center;
}
.cta-band h2 { color: #fff; font-size: 30px; }
.cta-band p { margin-top: 12px; color: rgba(255, 255, 255, .85); font-size: 17px; }
.cta-band .btn { margin-top: 28px; }
.cta-band .btn-p { background: #fff; color: var(--brand-700); }
.cta-band .btn-p:hover { background: var(--brand-50); color: var(--brand-700); }

/* ---------- 定价页 ---------- */
/* 会员套餐只有「免费 + 年费」两张，用 auto-fit 居中，撑满三列会空一格 */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; align-items: stretch; max-width: 820px; margin-inline: auto; }
.plan { position: relative; display: flex; flex-direction: column; padding: 32px 28px; }
.plan-featured { border: 2px solid var(--brand); box-shadow: var(--shadow-float); }
.plan-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.plan-name { font-size: 20px; }
.plan-list { display: grid; gap: 10px; margin-block: 20px 24px; }
.plan-list li { position: relative; padding-left: 24px; color: var(--text-2); font-size: 15px; overflow-wrap: anywhere; }
.plan-list li::before { content: '✓'; position: absolute; left: 0; color: var(--brand); font-weight: 700; }
.plan .btn { margin-top: auto; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
table.compare-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; }
.compare-table th,
.compare-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
.compare-table thead th { background: var(--surface-2); color: var(--text-2); font-size: 14px; font-weight: 600; white-space: nowrap; }
.compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table tbody tr:hover { background: var(--brand-50); }
.compare-table td:first-child { font-weight: 600; }

/* ---------- 功能页 分组详表 ---------- */
.feature-group + .feature-group { margin-top: 48px; }
.feature-group > .btn { margin-top: 20px; }
.feature-table { overflow: hidden; }
.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 24px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.feature-row:last-child { border-bottom: 0; }
.feature-row:hover { background: var(--brand-50); }
.feature-name { font-weight: 600; }
.feature-desc { color: var(--text-2); font-size: 15px; }

/* ---------- 视频能力卡（首页 / 功能页） ---------- */
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-more { margin-top: 32px; text-align: center; }

/* 7 张卡用 flex 换行而非定列：4+3 两行，第二行自动居中，不会留一张孤零零靠左 */
.videos-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.vcard { flex: 1 1 250px; max-width: 350px; display: flex; flex-direction: column; padding: 26px; }
.vcard-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.vcard-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  color: var(--brand-700);
}
.vcard-name { font-size: 18px; }
.vcard-tag { margin-top: 6px; color: var(--brand-700); font-size: 14px; font-weight: 600; }
.vcard-desc { margin-top: 10px; color: var(--text-2); font-size: 14.5px; line-height: 1.68; }
.vcard-meta { margin-top: 12px; color: var(--text-3); font-size: 13px; }

/* ---------- 会员套餐：价格与积分构成 ---------- */
.plan-price { margin-top: 10px; display: flex; align-items: baseline; gap: 0; color: var(--brand-700); }
.plan-price b { font-size: 34px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.plan-period { color: var(--text-2); font-size: 15px; font-weight: 600; }
.plan-points { margin-top: 10px; color: var(--text-2); font-size: 14px; }

/* ---------- 充值积分包 ---------- */
.packs-block { margin-top: 44px; }
.packs-head { margin-bottom: 18px; text-align: center; }
.packs-head h3 { font-size: 20px; }
.packs-head p { margin-top: 6px; color: var(--text-2); font-size: 14.5px; }
.packs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.pack {
  position: relative;
  min-width: 0;
  padding: 20px 18px;
  text-align: center;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.pack:hover { border-color: var(--brand-100); box-shadow: var(--shadow-soft); transform: translateY(-2px); }
.pack-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.pack-price { color: var(--text-2); font-size: 14.5px; font-weight: 600; }
.pack-points { margin-top: 6px; color: var(--brand-700); font-size: 13.5px; white-space: nowrap; }
.pack-points b { font-size: 21px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ---------- 关于/联系 通用区块 ---------- */
.about-block + .about-block { margin-top: 48px; }
.about-block > .btn { margin-top: 20px; }
.prose-narrow { max-width: 760px; }

/* ---------- 文章列表 ---------- */
.article-list { display: grid; gap: 20px; }
.article-card { display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; }
.article-card.has-cover { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); }
.article-card-cover { min-height: 150px; background: var(--surface-2); }
.article-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-card-body { padding: 24px 28px; }
.article-card h2 { font-size: 20px; margin-block: 10px 8px; }
.article-card h2 a { color: var(--text); }
.article-card h2 a:hover { color: var(--brand-700); }
.article-card p { color: var(--text-2); font-size: 15px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; color: var(--text-3); font-size: 13px; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding-inline: 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text-2);
  font-size: 14px;
}
.pagination a:hover { border-color: var(--brand); background: var(--brand-50); color: var(--brand-700); }
.pagination .current { border-color: var(--brand); background: var(--brand); color: #fff; font-weight: 600; }
.pagination .disabled { opacity: .45; }

/* ---------- 文章详情 ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 24px; color: var(--text-3); font-size: 14px; }
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--brand-700); }
.breadcrumb .sep { color: var(--border); }
.breadcrumb .current { max-width: 42em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }

.article-head { padding-bottom: 24px; margin-bottom: 32px; border-bottom: 1px solid var(--border); }
.article-head h1 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.02em; margin-block: 14px 16px; }
.h1-prefix {
  display: inline-block;
  margin-right: 12px;
  padding: 4px 12px;
  border: 1px solid var(--brand-100);
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 15px;
  font-weight: 600;
  vertical-align: middle;
}
.article-cover { margin-bottom: 32px; border: 1px solid var(--border); border-radius: var(--r-lg); }

.article-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
.article-nav a { padding: 18px 22px; }
.article-nav a:hover { border-color: var(--brand); }
.article-nav .next { text-align: right; }
.article-nav .nav-label { display: block; margin-bottom: 4px; color: var(--text-3); font-size: 13px; }
.article-nav .nav-title { display: block; overflow: hidden; color: var(--text); font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 文章正文 prose ---------- */
.prose { max-width: 720px; }
.prose p { margin-block: 14px; line-height: 1.8; }
.prose h2 { margin-block: 40px 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); font-size: 26px; }
.prose h3 { margin-block: 30px 10px; font-size: 20px; }
.prose h4 { margin-block: 24px 8px; font-size: 17px; }
.prose ul,
.prose ol { display: grid; gap: 6px; margin-block: 14px; padding-left: 24px; list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { line-height: 1.7; }
.prose blockquote {
  margin-block: 18px;
  padding: 12px 18px;
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--brand-50);
  color: var(--text-2);
}
.prose blockquote p { margin: 0; }
.prose code {
  padding: 2px 6px;
  border: 1px solid var(--brand-100);
  border-radius: 6px;
  background: var(--brand-50);
  color: var(--brand-700);
  font-family: var(--mono);
  font-size: .9em;
}
.prose pre {
  margin-block: 18px;
  padding: 18px 20px;
  border-radius: var(--r-md);
  background: #1d2d3e;
  color: #e6edf5;
  overflow-x: auto;
  line-height: 1.6;
}
.prose pre code { padding: 0; border: 0; background: none; color: inherit; font-size: 14px; }
.prose hr { margin-block: 32px; border: 0; border-top: 1px solid var(--border); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose img { margin-block: 18px; border-radius: var(--r-md); }
.prose table { width: 100%; margin-block: 18px; border-collapse: collapse; font-size: 15px; }
.prose th,
.prose td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; }
.prose thead th { background: var(--surface-2); color: var(--text-2); font-weight: 600; }

/* ---------- 联系页 ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 24px; align-items: start; }
.contact-form { display: grid; gap: 18px; padding: 32px; }
.field label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.field .req { color: var(--danger); }
.field input,
.field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.field textarea { min-height: 128px; resize: vertical; }
.field-error { margin-top: 6px; color: var(--danger); font-size: 13px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

.alert { margin-bottom: 24px; padding: 14px 18px; border-radius: var(--r-md); font-size: 15px; }
.alert-success { border: 1px solid var(--brand-100); background: var(--brand-50); color: var(--brand-700); }

.contact-channels { padding: 28px; }
.contact-channels h2 { margin-bottom: 16px; font-size: 18px; }
.channel { display: flex; gap: 12px; padding-block: 12px; border-bottom: 1px solid var(--border); }
.channel:last-child { border-bottom: 0; }
.channel-label { flex-shrink: 0; width: 56px; padding-top: 2px; color: var(--text-3); font-size: 13px; }
.channel-value { color: var(--text); font-size: 15px; word-break: break-all; }

/* ---------- 404 ---------- */
.error-page { padding-block: 112px 96px; text-align: center; }
.error-code { color: var(--brand-100); font-size: clamp(72px, 12vw, 120px); font-weight: 800; line-height: 1; }
.error-page h1 { margin-block: 16px 12px; font-size: 24px; }
.error-page p { color: var(--text-2); }
.error-page .btn { margin-top: 28px; }

/* ---------- 页脚 ---------- */
.site-footer { margin-top: 96px; padding-block: 56px 32px; background: var(--surface); border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; }
.footer-col h3 { margin-bottom: 16px; color: var(--text-3); font-size: 14px; font-weight: 600; }
.footer-col ul { display: grid; gap: 10px; }
.footer-col a,
.footer-col .ci { color: var(--text-2); font-size: 14px; }
.footer-col a:hover { color: var(--brand-700); }
.footer-col .ci { display: grid; gap: 10px; }
.footer-col .ci .k { color: var(--text-3); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 13px;
}
.footer-record { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-record a { color: var(--text-3); }
.footer-record a:hover { color: var(--brand-700); }

/* ---------- 响应式（≤1024 过渡 / ≤768 堆叠，无横向滚动） ---------- */
@media (max-width: 1024px) {
  .features-grid,
  .workflow-grid,
  .audience-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* videos-grid 是 flex：缩小基准宽度即可变两列 */
  .vcard { flex-basis: 300px; }
  /* min(…, 100%) 不能写成固定 560px：手机宽度下会撑出屏幕，整页横向溢出 */
  .plans-grid { grid-template-columns: minmax(0, 1fr); max-width: min(560px, 100%); margin-inline: auto; }
  .hero-grid { gap: 36px; }
}

@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; gap: 12px; height: auto; padding-block: 12px; }
  .site-nav {
    order: 3;
    width: 100%;
    margin-inline: 0;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .btn-login { margin-left: auto; }

  .hero { padding-block: 48px var(--section-pad); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { max-width: 560px; }

  .section-head h2 { font-size: 26px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features-grid,
  .workflow-grid,
  .audience-grid,
  .plans-grid { grid-template-columns: minmax(0, 1fr); }
  /* ≤768：视频卡单列，取消 max-width 限制让卡片吃满屏宽 */
  .vcard { flex-basis: 100%; max-width: none; }
  /* 积分包固定两列并允许数字换行——nowrap 在小屏会把卡片撑出屏幕 */
  .packs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pack-points { white-space: normal; }
  .pack-points b { font-size: 19px; }

  .contact-grid,
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .article-card.has-cover { grid-template-columns: minmax(0, 1fr); }
  .article-card-cover { min-height: 0; max-height: 200px; }
  .article-nav { grid-template-columns: minmax(0, 1fr); }
  .article-nav .next { text-align: left; }
  .feature-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }

  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  .cta-band { padding: 40px 24px; }
  .cta-band h2 { font-size: 24px; }
  .error-page { padding-block: 72px 64px; }
  .site-footer { margin-top: 64px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-bottom { justify-content: flex-start; }
}
