/* 0-why：message list 星舱。
   与路线星图同一套视觉语言：深空底、玻璃卡、辉光强调色。
   布局按 .wx-root 的实际宽度（容器查询）切换，不看视口——Alice 侧栏只给 body 加
   padding-right，视口宽度不变。
   注意：theme-bridge.js 会把样式表里 background 上的纯白（含 rgba(255,255,255,a)）
   换成 var(--card)，所以这里的高光一律用 rgba(250,250,255,a)。 */

:root {
  --wx-bg: #04040c;
  --wx-ink: #eef0ff;
  --wx-ink-2: rgba(226, 230, 255, .74);
  --wx-ink-3: rgba(206, 212, 255, .48);
  --wx-line: rgba(160, 170, 255, .16);
  --wx-glass: rgba(14, 14, 34, .56);
  --wx-glass-strong: rgba(16, 16, 40, .82);
  --wx-accent-rgb: 167, 139, 250;
  --wx-system: 167, 139, 250;
  --wx-user: 94, 234, 212;
  --wx-assistant: 96, 165, 250;
  --wx-tool: 251, 191, 36;
  --wx-doc: 244, 114, 182;
  --wx-sft: 52, 211, 153;
  --wx-danger: 251, 113, 133;
  --wx-ease: cubic-bezier(.22, 1, .36, 1);
  --wx-top: 64px;
  --wx-bottom: 68px;
  color-scheme: dark;
}

html { background: var(--wx-bg); }
body.why-page {
  background:
    radial-gradient(70% 50% at 85% 108%, rgba(76, 52, 170, .16), transparent 70%),
    radial-gradient(50% 40% at 0% 70%, rgba(20, 90, 140, .12), transparent 70%),
    var(--wx-bg);
  color: var(--wx-ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.why-page .lesson.wx-root {
  container: wx / inline-size;
  position: relative;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* lesson.js 插入的公众号条：换成深色玻璃 */
.why-page .qr-bar {
  background: linear-gradient(90deg, rgba(30, 22, 60, .9), rgba(18, 16, 40, .9));
  border-bottom: 1px solid var(--wx-line);
  color: var(--wx-ink-2);
}
.why-page .qr-bar .qr-text b { color: #fbbf24; }
.why-page .qr-bar .qr-close { color: var(--wx-ink-2); }

/* 公众号条在文档流里占了顶部一行：舞台扣掉它，首屏仍能看全操作坞 */
body.why-page:has(> .qr-bar) { --wx-qr: 56px; }
/* 嵌入课程阅读器时没有 nav-inject 的顶栏和底部热区 */
html.wx-embed { --wx-top: 40px; --wx-bottom: 28px; }

/* ───────────── 舞台：默认（窄）为纵向流 ───────────── */

.wx-stage {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  padding: calc(var(--wx-top) - var(--wx-qr, 0px) * .6) 18px 0;
}

.wx-hero { position: relative; z-index: 5; }

.why-page .lesson-header { margin: 0; }
.why-page .lesson-header .kicker {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0;
  font-size: 11px; font-weight: 700; letter-spacing: .32em;
  color: var(--wx-ink-3);
}
.why-page .lesson-header .kicker::before {
  content: ""; width: 26px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--wx-accent-rgb), .9));
}
.why-page .lesson-header h1 {
  margin: 14px 0 0;
  font-size: clamp(28px, 7.4cqw, 40px);
  line-height: 1.16; letter-spacing: -.03em; font-weight: 780;
  background: linear-gradient(100deg, #fff 0%, #e4e2ff 46%, rgb(var(--wx-accent-rgb)) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-wrap: balance;
}
.why-page .lesson-header .subtitle {
  margin-top: 10px;
  font-size: 14px; line-height: 1.7; color: var(--wx-ink-2);
}

.why-page .xa-tldr {
  margin: 18px 0 0;
  padding: 12px 16px 12px 18px;
  position: relative;
  border-radius: 14px;
  border: 1px solid rgba(var(--wx-accent-rgb), .22);
  background: linear-gradient(100deg, rgba(var(--wx-accent-rgb), .12), rgba(14, 14, 34, .4) 70%);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.why-page .xa-tldr::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 2px; border-radius: 2px;
  background: rgb(var(--wx-accent-rgb)); box-shadow: 0 0 12px rgb(var(--wx-accent-rgb));
}
.why-page .xa-tldr .xa-tldr-tag {
  margin-bottom: 4px;
  font-size: 10.5px; letter-spacing: .26em; font-weight: 700;
  color: rgba(var(--wx-accent-rgb), .95);
}
.why-page .xa-tldr p { font-size: 14px; line-height: 1.75; color: var(--wx-ink); }

.why-page .thesis-box {
  margin-top: 14px;
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--wx-line);
  background: linear-gradient(180deg, rgba(20, 18, 46, .66), rgba(10, 10, 26, .5));
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(250, 250, 255, .06);
}
.why-page .thesis-icon {
  width: 38px; height: 38px; flex-shrink: 0;
  display: grid; place-items: center; border-radius: 12px;
  color: rgb(var(--wx-accent-rgb));
  background: rgba(var(--wx-accent-rgb), .14);
  box-shadow: inset 0 0 0 1px rgba(var(--wx-accent-rgb), .3), 0 0 24px rgba(var(--wx-accent-rgb), .25);
}
.why-page .thesis-icon svg { width: 20px; height: 20px; }
.why-page .thesis-text h3 { font-size: 16px; line-height: 1.45; font-weight: 720; color: var(--wx-ink); letter-spacing: -.01em; }
.why-page .thesis-text p { margin-top: 6px; font-size: 13.5px; line-height: 1.75; color: var(--wx-ink-2); }
.why-page .thesis-text p b { color: #fff; font-weight: 650; background: linear-gradient(transparent 62%, rgba(var(--wx-accent-rgb), .32) 0); }

/* 控件 */
.wx-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.wx-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--wx-line); background: var(--wx-glass);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: var(--wx-ink-2); font: 600 12px/1 inherit; cursor: pointer;
  transition: color .25s, border-color .25s, background .25s, box-shadow .3s;
}
.wx-btn:hover { color: var(--wx-ink); border-color: rgba(250, 250, 255, .3); }
.wx-btn:focus-visible { outline: 2px solid rgba(var(--wx-accent-rgb), .8); outline-offset: 2px; }
.wx-btn svg { width: 14px; height: 14px; }
.wx-btn-main {
  color: #0b0a1c; border-color: transparent;
  background: linear-gradient(100deg, #c4b5fd, rgb(var(--wx-accent-rgb)));
  box-shadow: 0 0 24px rgba(var(--wx-accent-rgb), .45);
}
.wx-btn-main:hover { color: #0b0a1c; box-shadow: 0 0 34px rgba(var(--wx-accent-rgb), .7); }
.wx-btn-main.is-on { background: linear-gradient(100deg, #fde68a, #fbbf24); box-shadow: 0 0 26px rgba(251, 191, 36, .5); }
.wx-btn[aria-pressed="true"] { color: var(--wx-ink); border-color: rgba(var(--wx-accent-rgb), .55); background: rgba(var(--wx-accent-rgb), .16); }
.wx-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.wx-eq i { width: 2px; height: 3px; border-radius: 1px; background: currentColor; }
.wx-btn[aria-pressed="true"] .wx-eq i { animation: wx-eq 1s ease-in-out infinite; }
.wx-btn[aria-pressed="true"] .wx-eq i:nth-child(2) { animation-delay: -.3s; }
.wx-btn[aria-pressed="true"] .wx-eq i:nth-child(3) { animation-delay: -.6s; }
.wx-btn[aria-pressed="true"] .wx-eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes wx-eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }

/* ── 3D 视窗 ── */
.wx-viewport {
  position: relative;
  z-index: 1;
  height: clamp(480px, calc(100svh - 230px), 660px);
  margin: 14px -18px 0;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 50%, #0c0a24 0%, #05050f 60%, #04040c 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 36px, #000 calc(100% - 36px), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 36px, #000 calc(100% - 36px), transparent 100%);
}
.wx-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  cursor: grab;
  touch-action: pan-y;
  outline: none;
  opacity: 0;
  transition: opacity 1.4s var(--wx-ease);
}
.wx-stage.is-live .wx-canvas { opacity: 1; }
.wx-stage.is-dragging .wx-canvas { cursor: grabbing; }
.wx-stage.is-hovering .wx-canvas { cursor: pointer; }

.wx-labels { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.wx-lbl {
  position: absolute; left: 0; top: 0;
  transform: translate3d(-999px, -999px, 0);
  white-space: nowrap;
  font-size: 11px; font-weight: 650; letter-spacing: .04em;
  color: var(--wx-ink-2);
  text-shadow: 0 0 10px rgba(0, 0, 0, .95), 0 0 2px rgba(0, 0, 0, .9);
  opacity: 0;
  transition: opacity .45s, color .4s;
  will-change: transform, opacity;
}
.wx-lbl.is-on { opacity: 1; }
.wx-lbl b { color: var(--wx-ink); font-weight: 750; font-variant-numeric: tabular-nums; }
.wx-lbl i {
  display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%;
  vertical-align: 1px; background: currentColor; box-shadow: 0 0 10px currentColor;
}
.wx-lbl.mono { font-family: "SF Mono", ui-monospace, Menlo, monospace; font-size: 11.5px; letter-spacing: 0; color: rgba(200, 206, 255, .62); }
.wx-lbl.t-orb { font-size: 12px; color: #c7d2fe; text-align: center; }
.wx-lbl.t-orb small { display: block; margin-top: 2px; font-size: 10.5px; font-weight: 550; color: var(--wx-ink-3); letter-spacing: .02em; }
.wx-lbl.t-kb { color: rgb(var(--wx-doc)); }
.wx-lbl.t-tool { color: rgb(var(--wx-tool)); }
.wx-lbl.t-sft { color: rgb(var(--wx-sft)); }
.wx-lbl.t-cut, .wx-lbl.t-bad { color: rgb(var(--wx-danger)); }
.wx-lbl.t-q {
  padding: 4px 9px; border-radius: 8px;
  border: 1px solid rgba(var(--wx-danger), .45);
  background: rgba(40, 10, 22, .72);
  color: #fecdd3;
}
.wx-lbl.t-diag {
  padding: 7px 11px; border-radius: 10px;
  border: 1px solid rgba(var(--c, var(--wx-accent-rgb)), .5);
  background: rgba(14, 12, 34, .82);
  box-shadow: 0 0 24px rgba(var(--c, var(--wx-accent-rgb)), .25);
  color: var(--wx-ink); font-size: 12px; line-height: 1.45;
}
.wx-lbl.t-diag small { display: block; font-size: 11px; color: rgb(var(--c, var(--wx-accent-rgb))); font-weight: 700; }
.wx-lbl.t-hud { color: var(--wx-ink-3); font-size: 11px; }
.wx-lbl.t-hud.is-over { color: rgb(var(--wx-danger)); }
.wx-lbl.t-hud.is-over b { color: #fecdd3; }

.wx-caption {
  position: absolute; z-index: 6;
  left: 50%; bottom: 18px; top: auto;
  transform: translate(-50%, 10px);
  width: max-content; max-width: min(560px, calc(100% - 32px));
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid rgba(var(--c, var(--wx-accent-rgb)), .4);
  background: linear-gradient(180deg, rgba(22, 20, 52, .82), rgba(10, 10, 26, .78));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .5), 0 0 30px rgba(var(--c, var(--wx-accent-rgb)), .14);
  font-size: 13px; line-height: 1.6; color: var(--wx-ink-2); text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity .4s, transform .5s var(--wx-ease), border-color .4s;
}
.wx-caption.is-on { opacity: 1; transform: translate(-50%, 0); }
.wx-caption b { color: var(--wx-ink); font-weight: 680; }
.wx-caption .wx-cap-k { display: block; margin-bottom: 2px; font-size: 10.5px; font-weight: 750; letter-spacing: .2em; color: rgb(var(--c, var(--wx-accent-rgb))); }
.wx-caption.is-big { padding: 14px 22px; font-size: 14px; }
.wx-caption.is-big .wx-cap-main { display: block; font-size: 17px; font-weight: 720; color: #fff; letter-spacing: -.01em; }

.wx-tip {
  position: absolute; z-index: 7; left: 0; top: 0;
  width: max-content; max-width: 280px;
  padding: 10px 13px; border-radius: 12px;
  border: 1px solid rgba(var(--c, var(--wx-accent-rgb)), .45);
  background: var(--wx-glass-strong);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
  font-size: 12px; color: var(--wx-ink-2); line-height: 1.55;
  pointer-events: none; opacity: 0; transform: translate3d(-999px, -999px, 0);
  transition: opacity .2s;
}
.wx-tip.is-on { opacity: 1; }
.wx-tip strong { display: block; margin-bottom: 3px; color: rgb(var(--c, var(--wx-accent-rgb))); font-size: 11px; letter-spacing: .14em; }
.wx-tip .wx-tip-t { color: var(--wx-ink); font-size: 13px; }
.wx-tip .wx-tip-m { margin-top: 4px; color: var(--wx-ink-3); font-size: 11.5px; }

/* WebGL 不可用：静态 message list */
.wx-fallback { display: none; }
.wx-no-webgl .wx-canvas, .wx-no-webgl .wx-labels, .wx-no-webgl .wx-tip { display: none; }
.wx-no-webgl .wx-fallback {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 24px;
}
.wx-fb-frame {
  display: flex; flex-direction: column; gap: 8px;
  width: min(440px, 100%);
  padding: 18px; border-radius: 18px;
  border: 1px solid rgba(129, 140, 248, .35);
  box-shadow: 0 0 40px rgba(129, 140, 248, .12), inset 0 0 30px rgba(129, 140, 248, .06);
}
.wx-fb-title { font: 600 12px/1 "SF Mono", ui-monospace, Menlo, monospace; color: var(--wx-ink-3); }
.wx-fb-msg {
  --c: var(--wx-system);
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(var(--c), .4);
  background: linear-gradient(90deg, rgba(var(--c), .14), rgba(10, 10, 26, .6));
  font-size: 13px; color: var(--wx-ink);
}
.wx-fb-msg i { font-style: normal; font-size: 10px; font-weight: 750; letter-spacing: .12em; color: rgb(var(--c)); }
.wx-fb-msg.r-user { --c: var(--wx-user); }
.wx-fb-msg.r-assistant { --c: var(--wx-assistant); }

/* ── 操作坞（原左列四张卡） ── */
.wx-dock { position: relative; z-index: 5; margin-top: 4px; }
.wx-dock-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  margin-bottom: 12px;
}
.why-page .col-label {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0; padding: 0;
  font-size: 11.5px; font-weight: 700; letter-spacing: .2em; text-transform: none;
  color: var(--wx-ink-3);
}
.why-page .wx-dock .col-label::before {
  content: ""; width: 18px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--wx-accent-rgb), .9));
}
.wx-progress { display: inline-flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--wx-ink-3); }
.wx-progress b { color: var(--wx-ink); font-variant-numeric: tabular-nums; }
.wx-progress-dots { display: inline-flex; gap: 5px; }
.wx-progress-dots i {
  --c: var(--wx-system);
  width: 7px; height: 7px; border-radius: 50%;
  border: 1px solid rgba(var(--c), .6);
  transition: background .4s, box-shadow .4s;
}
.wx-progress-dots i[data-dot="rag"] { --c: var(--wx-doc); }
.wx-progress-dots i[data-dot="agent"] { --c: var(--wx-tool); }
.wx-progress-dots i[data-dot="sft"] { --c: var(--wx-sft); }
.wx-progress-dots i.is-on { background: rgb(var(--c)); box-shadow: 0 0 10px rgb(var(--c)); }
.wx-reveal-btn {
  height: 26px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--wx-line); background: transparent;
  color: var(--wx-ink-2); font: 700 11.5px/1 inherit; cursor: pointer;
  transition: all .35s;
}
.wx-reveal-btn:hover { color: var(--wx-ink); border-color: rgba(250, 250, 255, .3); }
.wx-progress.is-all .wx-reveal-btn {
  color: #0b0a1c; border-color: transparent;
  background: linear-gradient(100deg, #a7f3d0, #c4b5fd 50%, #fbcfe8);
  box-shadow: 0 0 22px rgba(var(--wx-accent-rgb), .55);
  animation: wx-breathe 2.4s ease-in-out infinite;
}
@keyframes wx-breathe { 50% { box-shadow: 0 0 36px rgba(var(--wx-accent-rgb), .85); } }

.wx-ops {
  display: flex; gap: 10px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -18px; padding: 4px 18px 12px;
  scrollbar-width: none;
}
.wx-ops::-webkit-scrollbar { display: none; }

.why-page .wx-op {
  --c: var(--wx-system);
  position: relative;
  flex: 0 0 min(80cqw, 300px);
  scroll-snap-align: center;
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px 15px;
  border-radius: 18px;
  border: 1px solid rgba(var(--c), .2);
  background: linear-gradient(180deg, rgba(var(--c), .08), rgba(10, 10, 26, .62) 62%);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  cursor: pointer; outline: none;
  overflow: hidden;
  transition: transform .5s var(--wx-ease), border-color .4s, box-shadow .5s, background .5s;
  -webkit-tap-highlight-color: transparent;
}
.why-page .wx-op.c2 { --c: var(--wx-doc); }
.why-page .wx-op.c3 { --c: var(--wx-tool); }
.why-page .wx-op.c4 { --c: var(--wx-sft); }
.why-page .wx-op::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, rgba(var(--c), .95), rgba(var(--c), 0) 42%, rgba(var(--c), 0) 70%, rgba(var(--c), .6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .5s; pointer-events: none;
}
.why-page .wx-op::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: linear-gradient(90deg, transparent, rgb(var(--c)), transparent);
  transform: scaleX(0); transform-origin: left; opacity: 0;
}
.why-page .wx-op:hover, .why-page .wx-op:focus-visible { transform: translateY(-4px); border-color: rgba(var(--c), .45); }
.why-page .wx-op:focus-visible::before { opacity: .7; }
.why-page .wx-op.is-run {
  transform: translateY(-8px);
  border-color: rgba(var(--c), .6);
  background: linear-gradient(180deg, rgba(var(--c), .22), rgba(12, 12, 30, .74) 72%);
  box-shadow: 0 18px 50px rgba(var(--c), .22), 0 0 0 1px rgba(var(--c), .2), inset 0 1px 0 rgba(250, 250, 255, .1);
}
.why-page .wx-op.is-run::before { opacity: 1; }
.why-page .wx-op.is-run::after { opacity: 1; animation: wx-run var(--wx-run-d, 6s) linear forwards; }
@keyframes wx-run { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.why-page .wx-op .card-icon {
  width: 30px; height: 30px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center;
  color: rgb(var(--c)); background: rgba(var(--c), .13);
  box-shadow: inset 0 0 0 1px rgba(var(--c), .28);
  margin: 0;
}
.why-page .wx-op .card-body h4 { font-size: 15px; font-weight: 720; letter-spacing: -.01em; color: var(--wx-ink); }
.why-page .wx-op .card-body p { margin-top: 6px; font-size: 12.5px; line-height: 1.65; color: var(--wx-ink-2); }
.why-page .wx-op .card-body p b { color: var(--wx-ink); font-weight: 650; }
.why-page .wx-op code,
.why-page .thesis-text code {
  padding: 1px 6px; border-radius: 6px;
  font-size: .9em;
  color: rgb(var(--c, var(--wx-accent-rgb)));
  background: rgba(var(--c, var(--wx-accent-rgb)), .14);
}
.wx-op-key {
  position: absolute; right: 14px; top: 16px;
  font-size: 10px; font-weight: 700; color: var(--wx-ink-3);
  border: 1px solid var(--wx-line); border-radius: 6px; padding: 1px 6px; font-variant-numeric: tabular-nums;
  transition: opacity .3s;
}
.wx-op-go {
  position: absolute; right: 12px; top: 13px;
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 11px; font-weight: 750; color: #0b0a1c; background: rgb(var(--c));
  box-shadow: 0 0 18px rgba(var(--c), .55);
  opacity: 0; transform: translateY(3px) scale(.96);
  transition: opacity .3s, transform .4s var(--wx-ease);
}
.why-page .wx-op:hover .wx-op-go, .why-page .wx-op:focus-visible .wx-op-go { opacity: 1; transform: none; }
.why-page .wx-op:hover .wx-op-key, .why-page .wx-op:focus-visible .wx-op-key { opacity: 0; }
.why-page .wx-op.is-done .wx-op-key { color: rgb(var(--c)); border-color: rgba(var(--c), .5); }
.why-page .wx-op.is-lit { border-color: rgba(var(--c), .7); box-shadow: 0 0 36px rgba(var(--c), .35); }

/* ── 卡点区（原右列） ── */
.wx-faults { position: relative; z-index: 1; padding: 56px 18px 8px; }
.wx-sec-head { margin-bottom: 18px; }
.why-page .wx-faults .col-label {
  display: block;
  font-size: clamp(20px, 5.4cqw, 26px); font-weight: 760; letter-spacing: -.02em; line-height: 1.3;
  color: var(--wx-ink);
}
.wx-sec-sub { margin-top: 8px; font-size: 13.5px; line-height: 1.7; color: var(--wx-ink-3); }
.wx-fault-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.why-page .wx-fault {
  --c: var(--wx-danger);
  position: relative;
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px 18px 16px;
  border-radius: 18px;
  border: 1px solid rgba(var(--c), .2);
  background:
    radial-gradient(120% 70% at 0% 0%, rgba(var(--c), .12), transparent 60%),
    linear-gradient(180deg, rgba(20, 16, 40, .72), rgba(10, 10, 24, .62));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  transition: border-color .4s, box-shadow .5s, opacity .4s ease, transform .4s ease, translate .5s var(--wx-ease);
}
.why-page .wx-fault:hover { translate: 0 -3px; border-color: rgba(var(--c), .45); box-shadow: 0 20px 50px rgba(0, 0, 0, .35), 0 0 30px rgba(var(--c), .12); }
.why-page .wx-fault.is-run { border-color: rgba(var(--c), .7); box-shadow: 0 0 40px rgba(var(--c), .25); }
.wx-fault-top { display: flex; align-items: center; justify-content: space-between; }
.why-page .wx-fault .card-icon {
  width: 34px; height: 34px; border-radius: 11px; margin: 0;
  display: grid; place-items: center;
  color: rgb(var(--c)); background: rgba(var(--c), .12);
  box-shadow: inset 0 0 0 1px rgba(var(--c), .3), 0 0 22px rgba(var(--c), .2);
}
.wx-fault-n { font: 700 28px/1 "SF Mono", ui-monospace, Menlo, monospace; color: rgba(var(--wx-danger), .18); letter-spacing: -.04em; }
.why-page .wx-fault .card-body h4 { font-size: 16px; line-height: 1.45; font-weight: 720; color: var(--wx-ink); }
.why-page .wx-fault .card-body p { margin-top: 6px; font-size: 13.5px; line-height: 1.75; color: var(--wx-ink-2); }
.why-page .wx-fault .card-body p b { color: #fecdd3; font-weight: 650; }
.wx-fault-btn {
  align-self: flex-start; margin-top: auto;
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 13px; border-radius: 999px;
  border: 1px solid rgba(var(--wx-danger), .45);
  background: rgba(var(--wx-danger), .1);
  color: #fecdd3; font: 700 12px/1 inherit; cursor: pointer;
  transition: background .3s, box-shadow .3s, color .3s;
}
.wx-fault-btn svg { width: 12px; height: 12px; }
.wx-fault-btn:hover, .wx-fault-btn:focus-visible { background: rgba(var(--wx-danger), .22); box-shadow: 0 0 22px rgba(var(--wx-danger), .35); color: #fff; outline: none; }

/* ── 结论 ── */
.wx-outro { position: relative; z-index: 1; padding: 36px 18px 40px; }
.why-page .bottom-box {
  position: relative;
  display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 14px 16px;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(var(--wx-accent-rgb), .28);
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(var(--wx-accent-rgb), .16), transparent 60%),
    radial-gradient(60% 100% at 0% 100%, rgba(var(--wx-user), .08), transparent 60%),
    linear-gradient(180deg, rgba(20, 18, 46, .7), rgba(10, 10, 26, .6));
  box-shadow: 0 30px 80px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(250, 250, 255, .07);
  overflow: hidden;
}
.why-page .bottom-box .wx-shield {
  width: 40px; height: 40px; padding: 9px; border-radius: 13px;
  color: rgb(var(--wx-accent-rgb)); background: rgba(var(--wx-accent-rgb), .14);
  box-shadow: inset 0 0 0 1px rgba(var(--wx-accent-rgb), .32), 0 0 26px rgba(var(--wx-accent-rgb), .3);
}
.why-page .bottom-box p { font-size: 14.5px; line-height: 1.85; color: var(--wx-ink-2); }
.why-page .bottom-box p b { color: #fff; }
.why-page .bottom-box p em { font-style: normal; font-weight: 700; color: #fda4af; }
.wx-outro-btn {
  grid-column: 1 / -1; justify-self: start;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 8px 18px; border-radius: 999px;
  border: 0; cursor: pointer;
  font: 700 13px/1.35 inherit; text-align: left; color: #0b0a1c;
  background: linear-gradient(100deg, #a7f3d0, #c4b5fd 50%, #fbcfe8);
  box-shadow: 0 0 26px rgba(var(--wx-accent-rgb), .45);
  transition: box-shadow .3s, transform .4s var(--wx-ease);
}
.wx-outro-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.wx-outro-btn:hover { box-shadow: 0 0 40px rgba(var(--wx-accent-rgb), .75); transform: translateY(-2px); }

/* ── 入场：纯 CSS，不依赖脚本 ── */
.wx-hero > *, .wx-dock { animation: wx-in 1.1s var(--wx-ease) both; }
.wx-hero > .lesson-header { animation-delay: .1s; }
.wx-hero > .xa-tldr { animation-delay: .3s; }
.wx-hero > .thesis-box { animation-delay: .45s; }
.wx-hero > .wx-controls { animation-delay: .65s; }
.wx-dock { animation-delay: .55s; }
@keyframes wx-in { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* ───────────── 中等宽度：操作卡两列 ───────────── */
@container wx (min-width: 600px) {
  .wx-stage { padding-left: 28px; padding-right: 28px; }
  .wx-viewport { margin-left: -28px; margin-right: -28px; height: clamp(440px, calc(100svh - 360px), 600px); }
  .wx-ops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; overflow: visible; margin: 0; padding: 4px 0 0; }
  .why-page .wx-op { flex: none; }
  .wx-faults, .wx-outro { padding-left: 28px; padding-right: 28px; }
  .wx-fault-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .why-page .wx-fault .card-body h4 { font-size: 15px; }
  .why-page .wx-fault .card-body p { font-size: 13px; }
  .why-page .bottom-box { padding: 24px 26px; }
}
@container wx (min-width: 600px) and (max-width: 819px) {
  .wx-fault-grid { grid-template-columns: 1fr; }
}

/* ───────────── 宽屏：单屏沉浸，画布铺满整个舞台 ───────────── */
@container wx (min-width: 1000px) {
  .wx-stage {
    display: grid;
    grid-template-columns: minmax(400px, 34cqw) 1fr;
    grid-template-rows: 1fr auto;
    min-height: max(720px, calc(100svh - var(--wx-qr, 0px)));
    padding: calc(var(--wx-top) - var(--wx-qr, 0px) * .6) 2.8cqw var(--wx-bottom);
  }
  .wx-hero { grid-column: 1; grid-row: 1; align-self: start; pointer-events: none; }
  .wx-hero > * { pointer-events: auto; }
  .wx-hero::before {
    content: ""; position: absolute; z-index: -1; inset: -120px -140px -80px -160px;
    background: radial-gradient(closest-side, rgba(3, 3, 12, .82), rgba(3, 3, 12, .46) 58%, transparent);
    pointer-events: none;
  }
  .why-page .lesson-header h1 { font-size: clamp(34px, 3.1cqw, 46px); }
  .wx-viewport {
    position: absolute; inset: 0; z-index: 0;
    height: auto; margin: 0;
    -webkit-mask-image: none; mask-image: none;
  }
  .wx-viewport::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 140px; z-index: 2;
    background: linear-gradient(transparent, var(--wx-bg));
    pointer-events: none;
  }
  .wx-caption { bottom: var(--wx-cap-b, 30%); left: var(--wx-cap-x, 66%); max-width: var(--wx-cap-w, 560px); }
  .wx-dock { grid-column: 1 / -1; grid-row: 2; margin-top: 18px; }
  .wx-ops { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .wx-faults { padding: 72px 2.8cqw 8px; }
  .wx-outro { padding: 40px 2.8cqw 48px; }
  .why-page .bottom-box { grid-template-columns: auto 1fr auto; align-items: center; padding: 26px 30px; }
  .wx-outro-btn { grid-column: auto; justify-self: end; }
  .wx-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; }
  .wx-sec-sub { margin-top: 0; }
}
@container wx (min-width: 1000px) and (max-height: 760px) {
  .why-page .wx-op .card-body p { font-size: 12px; }
}

/* 宽屏但视口矮：舞台按内容撑开，不压缩文字 */
@media (max-height: 780px) {
  .why-page .xa-tldr { margin-top: 14px; }
  .why-page .thesis-box { margin-top: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .wx-hero > *, .wx-dock { animation: none; }
  .wx-canvas, .wx-caption, .why-page .wx-op, .why-page .wx-fault { transition: none !important; }
  .wx-progress.is-all .wx-reveal-btn { animation: none; }
  .why-page .wx-op.is-run::after { animation: none; transform: scaleX(1); }
}
