/* ==========================================================
   麦米尔听力 · 落地页样式（/landing.html 专用）
   ----------------------------------------------------------
   与 seo.css 完全独立：seo.css 被 6 个内容页共用，不要复用也不要改。
   约束（来自团队规格）：
     · 只用 300 / 400 / 700 三档字重（微软雅黑只有 300/400/700，
       500/600 会走浏览器合成粗体，Windows 上边缘发虚）
     · 底色三档：#F7F6F2 暖白 / #FFFFFF 纯白 / #1C1B19 近黑，相邻区块必须不同
     · 强调色 #4F46E5 扁平使用，无渐变、无发光阴影、无淡紫陪衬
     · 点缀色 #C08A2E 仅用于代码块标签
     · 无外部字体、无外部图片；波形用 CSS 画

   ⚠ 色卡预算（改样式前先数一眼，色相超过 7 种就是"AI 味"回来了）
   ----------------------------------------------------------
   暖中性 4 档起底：  #F7F6F2 / #FFFFFF / #1C1B19 / #8A867C
   文字与线 3 档：    #3A3833 / #E5E2D9 / rgba(255,255,255,.12~.70)（深色带用）
   中性衍生 2 档：    #F3F1EA（chip 底）/ #D6D1C3（波形未播放）
   唯一强调：         #4F46E5 —— 只允许出现在「主按钮底色」和「链接 / 焦点框」，
                      禁止出现在装饰图形里（波形已改近黑），禁止做渐变与光晕。
                      白字压 #4F46E5 = 6.29:1，#4F46E5 压 #F7F6F2 = 5.9:1，均过 AA。
   点缀：             #C08A2E 麦金，仅代码块标签
   语义色 2 档（限定用途，不得混用）：#1F6E52 代码块角色名 / #4F9B7C 深色带步骤序号
                      （序号不能用靛蓝：#4F46E5 压 #1C1B19 只有约 2.5:1，读不清）
   禁止：#EEF2FF #C7D2FE #DDD6FE #F5F3FF 淡紫、#A5B4FC 旧 logo 蓝紫、
        #6366F1 / #7C3AED / #8B5CF6 紫调色阶、rgba(99,102,241,.25) 靛蓝光晕、
        --brand-700 #4338CA（已删，hover 走近黑）
   ========================================================== */

:root {
  --cream: #F7F6F2;
  --white: #FFFFFF;
  --dark: #1C1B19;

  --ink: #1C1B19;
  --ink-2: #3A3833;
  --ink-3: #8A867C;

  --line: #E5E2D9;
  --line-dark: rgba(255, 255, 255, 0.14);
  --line-dark-2: rgba(255, 255, 255, 0.12);

  --brand: #4F46E5;
  --wheat: #C08A2E;

  --role: #1F6E52;
  --step: #4F9B7C;
  --chip: #F3F1EA;

  --shell-w: 1208px;   /* 1160 内容 + 左右 24 padding */
  --gutter: 24px;

  --font-ui: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink-2);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------------- 栅格容器 ---------------- */
.shell {
  width: 100%;
  max-width: var(--shell-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- 顶栏 ---------------- */
.site-head {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.head-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  height: 72px;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  color: var(--ink);
  flex-shrink: 0;
}
.brand:hover { color: var(--ink); }
.brand-cn {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
}
.brand-en {
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.head-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
  min-width: 0;
}
.head-nav a {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-2);
  white-space: nowrap;
}
.head-nav a:hover { color: var(--brand); }

.head-app {
  display: none;
  font-size: 14px;
  font-weight: 400;
  color: var(--brand);
  white-space: nowrap;
}

/* ---------------- 区块骨架 ---------------- */
.sec { padding: 96px 0; }
.sec-hero { padding: 88px 0 80px; background: var(--cream); }
.sec-dark { background: var(--dark); }
.sec-cream { background: var(--cream); }
.sec-white { background: var(--white); }

/* ---------------- 标题 ---------------- */
.h1 {
  margin: 18px 0 0;
  font-size: 56px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
/* 中文可以任意断字：「英语听力制作」必须留在第一行，用 nowrap 锁死 */
.h1 span { white-space: nowrap; }
.h1-2 {
  font-size: 44px;
  line-height: 1.25;
  font-weight: 400;
  color: var(--ink-2);
  letter-spacing: 0;
}

.h2 {
  margin: 0;
  font-size: 40px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.h2-inv { color: #FFFFFF; }

.sub {
  margin: 14px 0 0;
  max-width: 640px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-2);
}
.sub-inv { color: rgba(255, 255, 255, 0.66); }

/* ---------------- 首屏 ---------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(440px, 520px) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

.eyebrow {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.eyebrow-cn {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.04em;
}
.eyebrow-en {
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.lede {
  margin: 24px 0 0;
  max-width: 46ch;
  font-size: 18px;
  line-height: 1.75;
  color: var(--ink-2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  margin-top: 32px;
  background: var(--brand);
  color: #FFFFFF;
}
/* hover 不走"更深的靛蓝"（那等于把紫调色阶引回来），直接压到近黑，
   颜色仍然只在既有色卡内，视觉上是"按下去"而不是"变亮" */
.btn-primary:hover {
  background: var(--ink);
  color: #FFFFFF;
}
.btn-light {
  background: #FFFFFF;
  color: var(--ink);
}
.btn-light:hover {
  background: var(--cream);
  color: var(--ink);
}

/* ---------------- 首屏右侧预览卡 ---------------- */
.pv {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 24px 20px;
  margin-top: 2px;
}
.pv-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.pv-name {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}
.pv-roles {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-3);
  white-space: nowrap;
}
.pv-script {
  margin: 16px 0 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 2.05;
  color: var(--ink-2);
}
.pv-script p { margin: 0; }
.pv-script b {
  font-weight: 700;
  color: var(--role);
}
.pv-script .t { color: var(--wheat); }
.pv-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.pv-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
  margin-left: auto;
}

/* ---------------- 波形（纯 CSS，11 根一个循环） ---------------- */
.wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 34px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
/* 柱宽自适应：2–3px 之间浮动，正好铺满容器，不靠调 bar 数量对齐宽度 */
.wave i {
  display: block;
  flex: 1 1 0;
  width: 2px;
  min-width: 1px;
  max-width: 3px;
  border-radius: 1px;
  background: #D6D1C3;
  height: 38%;
}
.wave i:nth-child(11n+2)  { height: 64%; }
.wave i:nth-child(11n+3)  { height: 88%; }
.wave i:nth-child(11n+4)  { height: 52%; }
.wave i:nth-child(11n+5)  { height: 74%; }
.wave i:nth-child(11n+6)  { height: 44%; }
.wave i:nth-child(11n+7)  { height: 92%; }
.wave i:nth-child(11n+8)  { height: 58%; }
.wave i:nth-child(11n+9)  { height: 80%; }
.wave i:nth-child(11n+10) { height: 48%; }
.wave i:nth-child(11n)    { height: 68%; }

/* 已播放段用近黑，不用靛蓝：波形是装饰图形，
   强调色只留给"能点的地方"，装饰一铺色就会重新变回模板感 */
.wave--played i { background: var(--ink); }
.wave--played i:nth-child(n+35) { background: #D6D1C3; }

/* ---------------- 脚本示例 ---------------- */
.script-grid {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(0, 336px);
  gap: 48px;
  align-items: start;
  margin-top: 40px;
}

.card-code {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  min-width: 0;
}
.code-label {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--wheat);
  letter-spacing: 0.04em;
}
/* white-space: pre + 容器横向滚动。
   绝对不能用 pre-wrap：[0.8] 和 [/0.8] 会被拆到两行，配对关系失效。 */
.script {
  margin: 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 2;
  color: var(--ink-2);
  white-space: pre;
  -webkit-overflow-scrolling: touch;
}
.script .r { color: var(--role); font-weight: 700; }
.script .t { color: var(--wheat); }

.out {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.out-name {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-2);
  word-break: break-all;
}
.out-meta {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-3);
}
.out .wave {
  margin-top: 20px;
  height: 40px;
  width: 100%;
}

/* ---------------- 三种模板卡 ---------------- */
.tpl {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
  margin-top: 40px;
}
.tpl .card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
}
.card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.5;
  font-weight: 700;
  color: var(--ink);
}
.card-where {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.card p.card-body {
  margin: 14px 0 auto;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-2);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.chips code {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--chip);
  color: var(--ink-2);
  white-space: nowrap;
}

/* ---------------- 深色带：三步 + 能力 ---------------- */
.split {
  display: grid;
  grid-template-columns: 460px minmax(0, 1fr);
  gap: 72px;
  align-items: start;
}

.steps {
  position: relative;
  margin-top: 40px;
}
/* 贯穿三步的竖线，做出往下走的方向感 */
.steps::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 8px;
  bottom: 26px;
  width: 1px;
  background: var(--line-dark);
}
.step {
  position: relative;
  padding: 0 0 32px 58px;
}
.step:last-child { padding-bottom: 0; }
.step-n {
  position: absolute;
  left: 0;
  top: -2px;
  width: 38px;
  font-size: 32px;
  line-height: 1;
  font-weight: 700;
  color: var(--step);
  background: var(--dark);
  font-variant-numeric: tabular-nums;
}
.step h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.5;
  font-weight: 700;
  color: #FFFFFF;
}
.step p {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.66);
}

.caps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 4px;
}
.cap { padding: 30px 0 30px 40px; }
.cap:nth-child(odd) { padding-left: 0; padding-right: 40px; }
.cap:nth-child(even) { border-left: 1px solid var(--line-dark-2); }
.cap:nth-child(n + 3) { border-top: 1px solid var(--line-dark-2); }
.cap:nth-child(-n + 2) { padding-top: 0; }
.cap:nth-child(n + 3) { padding-bottom: 0; }
.cap h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 700;
  color: #FFFFFF;
}
.cap p {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.66);
}

/* ---------------- FAQ ---------------- */
.faq-wrap {
  max-width: 760px;
  margin: 0 auto;
}
.faq {
  margin: 44px 0 0;
}
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--brand); }

/* 描边 +/− ，不用字符，避免字体差异 */
.pm {
  position: relative;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
}
.pm::before,
.pm::after {
  content: "";
  position: absolute;
  background: var(--ink-3);
}
.pm::before { left: 0; top: 6.5px; width: 14px; height: 1px; }
.pm::after {
  left: 6.5px;
  top: 0;
  width: 1px;
  height: 14px;
  transition: transform 0.16s ease, opacity 0.16s ease;
}
.faq details[open] .pm::after { transform: scaleY(0); opacity: 0; }
.faq details[open] summary { color: var(--ink); }

.faq .a {
  margin: 0;
  padding: 0 44px 22px 0;
  max-width: 64ch;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-2);
}

/* ---------------- 六条内链 ---------------- */
.links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 32px;
  margin-top: 40px;
}
.links a {
  display: block;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--ink);
}
.links a:hover { color: var(--brand); }
.links b {
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}
.links span {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink-3);
}

/* ---------------- CTA ---------------- */
.sec-cta { padding: 80px 0; }
.cta-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.cta-h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.3;
  font-weight: 700;
  color: #FFFFFF;
  max-width: 26ch;
}
.cta-sub {
  margin: 16px 0 0;
  max-width: 44ch;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.66);
}
.cta-box .btn-light { margin-top: 32px; }
.cta-note {
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}

/* ---------------- 页脚 ---------------- */
.site-foot {
  background: var(--dark);
  border-top: 1px solid var(--line-dark-2);
}
.foot-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 24px;
  padding-bottom: 28px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
}
.site-foot a { color: rgba(255, 255, 255, 0.7); }
.site-foot a:hover { color: #FFFFFF; }

/* ==========================================================
   响应式
   ========================================================== */
@media (max-width: 1120px) {
  .hero { gap: 40px; grid-template-columns: minmax(400px, 1fr) minmax(0, 1fr); }
  .h1 { font-size: 48px; }
  .h1-2 { font-size: 38px; }
  .split { grid-template-columns: 1fr; gap: 48px; }
  .cap:nth-child(n + 3) { padding-bottom: 30px; }
  .cap:nth-child(n + 3) { padding-top: 30px; }
  .cap:nth-child(-n + 2) { padding-top: 0; }
}

@media (max-width: 960px) {
  /* 导航在内链不能 display:none（移动优先索引会把隐藏链接当成不存在）。
     这里改成横向滚动条：6 条链接全部留在 DOM 与可访问性树里，
     视觉上露出一截、可滑动。滚动条本身隐藏，靠露边暗示可滑。 */
  .head-nav {
    flex: 1 1 auto;
    gap: 20px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .head-nav::-webkit-scrollbar { display: none; }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }
  .hero-r { max-width: 620px; }
  .script-grid { grid-template-columns: 1fr; gap: 32px; }
  .out { max-width: 420px; }
  .tpl .card { grid-column: span 6; }
  .links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .sec { padding: 64px 0; }
  .sec-hero { padding: 56px 0 64px; }
  .sec-cta { padding: 64px 0; }
  .wave { gap: 1px; }

  /* 手机上导航整条落到第二行，仍然可横向滑动，6 条内链一条不少 */
  .head-in {
    height: auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    padding-top: 12px;
  }
  .head-app { display: inline-block; order: 2; }
  .brand { order: 1; }
  .head-nav {
    order: 3;
    /* 出血到屏幕两侧：最后一条链接被视口裁掉一角，
       用户能看出"右边还有"，而不是被一个看不见的容器边截断 */
    flex: 1 0 auto;
    width: calc(100% + 48px);
    margin: 10px -24px 0;
    padding: 9px 24px 11px;
    border-top: 1px solid var(--line);
    gap: 16px;
  }
  .head-nav a { font-size: 13.5px; }

  .h1 { font-size: 40px; line-height: 1.2; }
  .h1-2 { font-size: 30px; line-height: 1.3; }
  .lede { font-size: 16px; margin-top: 20px; }

  .h2 { font-size: 30px; line-height: 1.25; }
  .sub { font-size: 14px; }

  .eyebrow { gap: 8px; }

  .card-code { padding: 18px; }
  .script { font-size: 12.5px; line-height: 1.95; }
  .pv { padding: 18px; }
  .pv-script { font-size: 12px; }
  .pv-roles { display: none; }

  .tpl .card { grid-column: span 12; padding: 22px; }
  .card h3 { font-size: 18px; }
  .card p.card-body { font-size: 15px; }

  .steps::before { display: none; }
  .step { padding-left: 0; padding-bottom: 26px; }
  .step-n { position: static; display: block; margin-bottom: 6px; }
  .step-n { background: none; }

  .caps { grid-template-columns: 1fr; }
  .cap,
  .cap:nth-child(odd) { padding: 22px 0; }
  .cap:nth-child(even) { border-left: 0; }
  .cap:nth-child(n + 2) { border-top: 1px solid var(--line-dark-2); }
  .cap:first-child { padding-top: 0; }
  .cap:last-child { padding-bottom: 0; }

  .faq summary { font-size: 16px; gap: 16px; }
  .faq .a { padding-right: 0; }
  .links { grid-template-columns: 1fr; row-gap: 24px; }
  .cta-h2 { font-size: 26px; }
  .foot-in { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; }
}
