/* =========================================================
   SOUVI 官网 · v1.4 改版新增
   AI 章（固定画面分步讲 / 打字演示 / 消息依次冒出 / 数据流光束）、
   五章导航、四张痛点卡、收藏与朋友圈标签、加密打包、回忆册、
   抹除按住确认、开始步骤追踪线、荧光笔划线。颜色与字体沿用 site.css。
   ========================================================= */

/* ---------- 开场截图：圈出顶栏的「AI 分析」按钮 ----------
   按钮在原图（1266×833）中的位置：x 831–923，y 43–78；框比按钮各大 4px。 */
.hero-new {
  position: absolute; z-index: 4; pointer-events: none;
  left:   calc(6px + (100% - 12px) * 827 / 1266);
  top:    calc(6px + (100% - 12px) * 39 / 833);
  width:  calc((100% - 12px) * 100 / 1266);
  height: calc((100% - 12px) * 43 / 833);
}
/* 高亮框：靛蓝描边 + 柔光，进场时从大到小收拢，之后呼吸三次停住 */
.hero-new i {
  position: absolute; inset: 0; border-radius: 10px;
  border: 2.5px solid var(--indigo);
  box-shadow: 0 0 0 4px rgba(90, 103, 168, .16), 0 0 22px 2px rgba(90, 103, 168, .38);
  opacity: 0; transform: scale(1.35);
  animation: ringIn .5s var(--ease) 1s forwards, ringGlow 1.8s ease-in-out 1.6s 3;
}
/* 绕框一圈的流光，只走一遍 */
.hero-new i::after {
  content: ""; position: absolute; inset: -2.5px; border-radius: 10px; padding: 2.5px;
  background: conic-gradient(from var(--sweep, 0deg), transparent 0 70%, #fff 82%, transparent 94%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; animation: ringSweep 1.2s linear 1.5s 1;
}
.hero-new b {
  position: absolute; left: 50%; top: calc(100% + 10px); white-space: nowrap;
  padding: 4px 11px; border-radius: 99px; background: var(--indigo); color: #fff;
  font-size: 13px; font-weight: 500; letter-spacing: .02em;
  box-shadow: 0 6px 16px -6px rgba(74, 87, 149, .6);
  opacity: 0; transform: translate(-50%, -4px); animation: tagIn .4s var(--ease) 1.35s forwards;
}
.hero-new b::before { /* 指向框的小三角 */
  content: ""; position: absolute; left: 50%; top: -4px; width: 8px; height: 8px; margin-left: -4px;
  background: var(--indigo); transform: rotate(45deg); border-radius: 1px;
}
@property --sweep { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes ringIn { to { opacity: 1; transform: none; } }
@keyframes ringGlow {
  50% { box-shadow: 0 0 0 7px rgba(90, 103, 168, .12), 0 0 30px 6px rgba(90, 103, 168, .5); }
}
@keyframes ringSweep { 0% { opacity: 1; --sweep: 0deg; } 90% { opacity: 1; } 100% { opacity: 0; --sweep: 360deg; } }
@keyframes tagIn { to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- 章节小标签旁的分类名（和小红书图一致） ---------- */
.ch-kind {
  margin-left: 2px; padding-left: 12px; border-left: 1px solid var(--line);
  font-size: 14px; font-weight: 400; color: var(--muted);
}

/* ---------- 四张痛点卡 ---------- */
.pains-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.pains-4 .pain-inner { height: 268px; }
.pains-4 .face { padding: 24px; }
.pains-4 .front h3 { font-size: 22px; }
.pains-4 .back-text { font-size: 17px; }
@media (max-width: 1100px) and (min-width: 761px) {
  .pains-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; margin-left: auto; margin-right: auto; }
  .pains-4 .pain-inner { height: 232px; }
}
@media (max-width: 760px) {
  .pains-4 { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
  .pains-4 .pain-inner { height: 220px; }
}

/* ---------- 荧光笔划线：随所在段落进场划过，划完留着 ---------- */
mark.hl {
  color: inherit; padding: 0 2px; border-radius: 3px;
  background: linear-gradient(transparent 58%, rgba(90, 103, 168, .24) 58%) no-repeat 0 0 / 0% 100%;
  transition: background-size .4s var(--ease) .35s;
}
.in mark.hl, .hl.in { background-size: 100% 100%; }

/* ---------- 小标签切换（收藏 | 朋友圈；私聊 | 群聊） ---------- */
.mini-tabs {
  position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 3px; border-radius: 99px; background: var(--paper); border: 1px solid var(--line);
  margin-bottom: 14px;
}
.mini-tabs button {
  position: relative; z-index: 1; min-height: 34px; padding: 0 16px; border-radius: 99px;
  font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap;
  transition: color var(--t) var(--ease);
}
.mini-tabs button[aria-selected="true"] { color: var(--ink); }
.mini-tabs button .num { margin-left: 2px; color: var(--indigo); }
.mini-tabs-bar {
  position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; border-radius: 99px;
  width: var(--bw, 50%); transform: translateX(var(--bx, 0)); background: var(--card); box-shadow: var(--shadow-sm);
  transition: transform var(--t) var(--ease), width var(--t) var(--ease);
}

/* 收藏与朋友圈：两张图叠放，交叉淡化 */
.fav-thumb { display: grid; }
.fav-thumb .crop { grid-area: 1 / 1; opacity: 0; transition: opacity .4s var(--ease); }
.fav-thumb .crop.on { opacity: 1; }

/* ---------- 加密打包 ---------- */
.enc-row {
  margin-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 16px; border-radius: 14px; background: var(--card); border: 1px solid rgba(226, 217, 200, .8);
}
.enc-l { color: var(--ink); font-weight: 500; display: flex; flex-direction: column; line-height: 1.4; }
.enc-l small { color: var(--muted); font-weight: 400; font-size: 13px; }
.doc-lock {
  position: absolute; right: -8px; bottom: -8px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--indigo); color: #fff; box-shadow: 0 0 0 3px var(--paper-2);
  transform: scale(0) rotate(-30deg); transition: transform .35s var(--ease);
}
.doc-lock svg { width: 18px; height: 18px; stroke-width: 1.8; }
.fmt.enc .doc-lock { transform: none; }
.fmt .files { transition: opacity .35s var(--ease), transform .35s var(--ease); }
.fmt.enc .files { opacity: .45; transform: scale(.97); transform-origin: top left; }
.enc-zip {
  display: flex; align-items: center; gap: 12px; margin-top: 0; max-height: 0; overflow: hidden; opacity: 0;
  padding: 0 14px; border-radius: 14px; background: var(--indigo-l); border: 1px solid transparent; color: var(--ink);
  transition: max-height .35s var(--ease), opacity .3s var(--ease), margin-top .35s var(--ease), padding .35s var(--ease), border-color .35s;
}
.enc-zip > span:last-child { display: flex; flex-direction: column; line-height: 1.4; }
.enc-zip small { color: var(--muted); font-size: 13px; }
.enc-zip .f-ico { background: var(--indigo); color: #fff; }
.fmt.enc .enc-zip { max-height: 90px; opacity: 1; margin-top: 12px; padding: 12px 14px; border-color: #CDD1EA; }

/* ---------- 第四章：固定画面分步讲 ---------- */
.ai-steps {
  margin-top: 72px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 64px; align-items: start;
}
.ai-sticky { position: sticky; top: calc(var(--nav-h) + 48px); }
.ai-stage { position: relative; display: grid; border-radius: var(--r-win); overflow: hidden; }
.ai-stage .crop { grid-area: 1 / 1; opacity: 0; transform: scale(1.015); transition: opacity .45s var(--ease), transform .5s var(--ease); }
.ai-stage .crop.on { opacity: 1; transform: none; z-index: 1; }
.ai-dots { list-style: none; display: flex; justify-content: center; gap: 8px; margin: 18px 0 0; padding: 0; }
.ai-dots li { width: 8px; height: 8px; border-radius: 99px; background: var(--mask); transition: width var(--t) var(--ease), background-color var(--t) var(--ease); }
.ai-dots li.on { width: 24px; background: var(--indigo); }
.ai-text { display: flex; flex-direction: column; }
.ai-step {
  min-height: 62vh; display: flex; flex-direction: column; justify-content: center; padding: 24px 0;
  opacity: .32; transition: opacity .4s var(--ease);
}
.ai-step:first-child { min-height: 52vh; justify-content: flex-start; padding-top: 40px; }
.ai-step.on { opacity: 1; }
.ai-n { font-size: 15px; font-weight: 600; color: var(--indigo); }
.ai-step h3 { margin-top: 6px; font-size: 28px; }
.ai-step > p:not(.ai-n):not(.small) { margin-top: 10px; }
.ai-step .small { margin-top: 10px; font-size: 14px; color: var(--muted); }
.ai-pts { margin: 14px 0 0; padding: 0; list-style: none; }
.ai-pts li { position: relative; padding-left: 22px; margin-top: 6px; color: var(--ink); }
.ai-pts li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--indigo); }
.ai-step .mini-link { margin-top: 14px; align-self: flex-start; }
.ai-mshot { display: none; }

/* 题目胶囊 */
.ai-presets { margin-top: 20px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 6px 14px; border-radius: 99px; background: var(--card); border: 1px solid var(--line);
  color: var(--ink); font-size: 14px; font-weight: 500;
  animation: chipIn .35s var(--ease) both; animation-delay: calc(var(--ci, 0) * 30ms);
}
.chips li.chip-line { background: transparent; border-style: dashed; color: var(--muted); }
@keyframes chipIn { from { opacity: 0; transform: translateY(6px) scale(.96); } to { opacity: 1; transform: none; } }

/* 继续提问演示：消息依次冒出 + 打字 */
.ai-chat {
  position: relative; margin-top: 20px; padding: 16px; border-radius: var(--r-card);
  background: var(--card); border: 1px solid rgba(226, 217, 200, .8); box-shadow: var(--shadow-sm);
  min-height: 236px; display: flex; flex-direction: column; gap: 10px;
}
.ai-chat-tag { position: absolute; right: 14px; top: 10px; font-size: 12px; color: var(--muted); }
.bub { max-width: 86%; border-radius: 14px; padding: 10px 14px; font-size: 15px; opacity: 0; transform: translateY(8px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.bub.me { align-self: flex-end; background: var(--indigo-l); color: var(--ink); margin-top: 18px; }
.bub.ai { align-self: flex-start; width: 86%; background: #F6F4EF; }
.bub.show { opacity: 1; transform: none; }
.bub .typed { min-height: 1.5em; margin-top: 6px; font-weight: 700; color: var(--ink); font-size: 14px; }
.bub .typed:first-child { margin-top: 0; }
.bub .typed.caret::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--indigo); animation: blink .8s steps(1) infinite; }
.bub i { display: block; height: 8px; margin-top: 7px; border-radius: 99px; background: #DCD5C7; width: 0; transition: width .45s var(--ease); }
.bub i.grow { width: var(--w); }
.ai-replay { align-self: flex-start; margin-top: 2px; font-size: 14px; }
@keyframes blink { 50% { opacity: 0; } }

/* 数据去向：数据流光束 */
.ai-flow {
  margin: 96px auto 0; max-width: 880px; display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr) minmax(0, 220px); align-items: center; gap: 0 12px;
}
.af-node {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  padding: 22px 14px; border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow-sm); border: 1px solid rgba(226, 217, 200, .8);
}
.af-node img { border-radius: 12px; }
.af-node b { color: var(--ink); font-size: 17px; }
.af-node small { color: var(--muted); font-size: 13px; }
.af-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--indigo-l); color: var(--indigo-d); }
.af-ico svg { width: 24px; height: 24px; }
.af-line { position: relative; height: 2px; background: repeating-linear-gradient(90deg, var(--ink) 0 6px, transparent 6px 12px); opacity: .5; }
.af-line::after { /* 箭头 */
  content: ""; position: absolute; right: -2px; top: -5px; width: 10px; height: 10px;
  border-top: 2px solid var(--ink); border-right: 2px solid var(--ink); transform: rotate(45deg);
}
.af-beam {
  position: absolute; left: 0; top: -5px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--indigo); box-shadow: 0 0 0 4px rgba(90, 103, 168, .2), 0 0 18px 4px rgba(90, 103, 168, .45);
  opacity: 0;
}
.ai-flow.in .af-beam { animation: beam 1.6s var(--ease) .5s 2 both; }
.ai-flow.in .af-beam-2 { animation-delay: .9s; }
@keyframes beam { 0% { left: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { left: calc(100% - 12px); opacity: 0; } }
.af-notes {
  grid-column: 1 / -1; list-style: none; margin: 26px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; color: var(--text); font-size: 15px;
}
.af-notes li { position: relative; padding-left: 16px; }
.af-notes li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--indigo); }
.af-notes b { color: var(--ink); }

.ai-prov { margin: 56px auto 0; max-width: 880px; text-align: center; }
.ai-prov .chips { justify-content: center; margin-top: 10px; }
.chips-plain li { animation: none; background: transparent; }
.ai-more { display: inline-flex; gap: 4px; margin-top: 22px; font-weight: 500; }
.ai-more span { transition: transform var(--t) var(--ease); }
.ai-more:hover span { transform: translateX(3px); }

/* ---------- 第五章 ---------- */
.report-top { margin-top: 72px; }
.memoir { margin-top: 120px; }
.memo-tags { list-style: none; margin: 18px 0 0; padding: 0; display: flex; gap: 8px; }
.memo-tags li { padding: 5px 16px; border-radius: 99px; background: var(--indigo-l); color: var(--indigo-d); font-weight: 500; font-size: 15px; }
.memoir .small { margin-top: 12px; color: var(--muted); font-size: 15px; }
.sc-head { margin: 120px auto 0; max-width: 640px; text-align: center; }
.sc-head h3 { font-size: 28px; }
.sc-head p { margin-top: 8px; }
.sc-head + .sharecard { margin-top: 40px; }

/* ---------- 安全：AI 数据说明链接 ---------- */
.net-more { display: inline-flex; gap: 4px; margin-top: 14px; font-size: 15px; font-weight: 500; }

/* ---------- 一键抹除：按住确认 ---------- */
.wipe-go { overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; }
.hold-fill {
  position: absolute; inset: 0; border-radius: inherit; background: rgba(255, 255, 255, .42);
  transform: scaleX(0); transform-origin: left center; transition: transform .2s var(--ease);
}
.wipe-go.holding .hold-fill { transform: scaleX(1); transition: transform 1s linear; }
.wipe-hint { margin-top: 12px; text-align: center; color: #fff; font-size: 14px; text-shadow: 0 1px 6px rgba(0, 0, 0, .35); }
.wipe-hint.nudge { animation: shake .42s cubic-bezier(.36, .07, .19, .97); }

/* ---------- 开始使用：追踪线 ---------- */
.steps.trace { position: relative; }
.steps.trace::before, .steps.trace::after {
  content: ""; position: absolute; left: var(--lx, 34px); top: var(--lt, 30px); width: 2px; border-radius: 2px; pointer-events: none;
}
.steps.trace::before { height: var(--lh, 80%); background: var(--line); }
.steps.trace::after { height: calc(var(--lh, 80%) * var(--p, 0)); background: var(--indigo); }
.steps.trace .step-n { position: relative; z-index: 1; transition: background-color var(--t) var(--ease), color var(--t) var(--ease); }
.steps.trace .acc-item.lit .step-n { background: var(--indigo); color: #fff; }

/* ---------- 日历定位后的高亮框（新截图里的位置） ---------- */
.ring {
  left: calc(100% * 1111 / 1266); top: calc(100% * 368 / 833);
  width: calc(100% * 79 / 1266); height: calc(100% * 49 / 833);
}

/* ---------- 平板 / 手机 ---------- */
@media (max-width: 980px) {
  .ai-steps { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 48px; max-width: 620px; margin-left: auto; margin-right: auto; }
  .ai-sticky { display: none; }
  .ai-step, .ai-step:first-child { min-height: 0; opacity: 1; padding: 0; margin-top: 56px; justify-content: flex-start; }
  .ai-step:first-child { margin-top: 0; }
  .ai-mshot { display: block; order: -1; margin-bottom: 18px; border-radius: 14px; box-shadow: var(--shadow); }
  .ai-flow { grid-template-columns: minmax(0, 1fr); gap: 0; max-width: 360px; margin-top: 72px; }
  .af-line { width: 2px; height: 56px; justify-self: center; background: repeating-linear-gradient(180deg, var(--ink) 0 6px, transparent 6px 12px); }
  .af-line::after { right: -4px; top: auto; bottom: -2px; transform: rotate(135deg); }
  .af-beam { left: -5px; top: 0; }
  .ai-flow.in .af-beam { animation-name: beamV; }
  @keyframes beamV { 0% { top: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { top: calc(100% - 12px); opacity: 0; } }
  .af-notes { flex-direction: column; align-items: flex-start; gap: 6px; }
  .memoir .memo-shot { order: -1; }
}
@media (max-width: 760px) {
  .ch-kind { font-size: 13px; padding-left: 10px; }
  .ai-step h3 { font-size: 24px; }
  .ai-chat { min-height: 220px; }
  .memoir, .sc-head { margin-top: 72px; }
  .report-top { margin-top: 40px; }
  .hero-new { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-new i::after, .ai-flow.in .af-beam { animation: none !important; }
  .chips li { animation: none; }
  mark.hl { transition: none; }
}
